From f28d9ab1a3d486c1c9535fb3dd7d9f49a65c3e96 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 30 Apr 2019 15:15:04 +0200 Subject: mesa: add EXT_dsa glGetMultiTexParameteriv/fvEXT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/mesa/main/tests/dispatch_sanity.cpp | 4 ++-- src/mesa/main/texparam.c | 42 ++++++++++++++++++++++++++++++++- src/mesa/main/texparam.h | 6 +++++ 3 files changed, 49 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index bb5ba961a68..a0e7bc58f75 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -1085,8 +1085,8 @@ const struct function common_desktop_functions_possible[] = { //{ "glCopyMultiTexSubImage1DEXT", 12, -1 }, //{ "glCopyMultiTexSubImage2DEXT", 12, -1 }, { "glGetMultiTexImageEXT", 12, -1 }, - //{ "glGetMultiTexParameterfvEXT", 12, -1 }, - //{ "glGetMultiTexParameterivEXT", 12, -1 }, + { "glGetMultiTexParameterfvEXT", 12, -1 }, + { "glGetMultiTexParameterivEXT", 12, -1 }, //{ "glGetMultiTexLevelParameterfvEXT", 12, -1 }, //{ "glGetMultiTexLevelParameterivEXT", 12, -1 }, { "glMultiTexImage3DEXT", 12, -1 }, diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index a61bd57d7d2..9b3f77d1a75 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -2597,6 +2597,26 @@ _mesa_GetTextureParameterfvEXT(GLuint texture, GLenum target, GLenum pname, GLfl get_tex_parameterfv(ctx, texObj, pname, params, true); } +void GLAPIENTRY +_mesa_GetMultiTexParameterfvEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat *params) +{ + struct gl_texture_object *texObj; + GET_CURRENT_CONTEXT(ctx); + + texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target, + texunit - GL_TEXTURE0, + false, + "glGetMultiTexParameterfvEXT"); + if (!texObj) + return; + + if (!is_texparameteri_target_valid(texObj->Target)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMultiTexParameterfvEXT"); + return; + } + get_tex_parameterfv(ctx, texObj, pname, params, true); +} + void GLAPIENTRY _mesa_GetTextureParameterfv(GLuint texture, GLenum pname, GLfloat *params) { @@ -2626,7 +2646,27 @@ _mesa_GetTextureParameterivEXT(GLuint texture, GLenum target, GLenum pname, GLin return; } get_tex_parameteriv(ctx, texObj, pname, params, true); - } +} + +void GLAPIENTRY +_mesa_GetMultiTexParameterivEXT(GLenum texunit, GLenum target, GLenum pname, GLint *params) +{ + struct gl_texture_object *texObj; + GET_CURRENT_CONTEXT(ctx); + + texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target, + texunit - GL_TEXTURE0, + false, + "glGetMultiTexParameterivEXT"); + if (!texObj) + return; + + if (!is_texparameteri_target_valid(texObj->Target)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMultiTexParameterivEXT"); + return; + } + get_tex_parameteriv(ctx, texObj, pname, params, true); +} void GLAPIENTRY _mesa_GetTextureParameteriv(GLuint texture, GLenum pname, GLint *params) diff --git a/src/mesa/main/texparam.h b/src/mesa/main/texparam.h index a336d2bb6ad..fa837261402 100644 --- a/src/mesa/main/texparam.h +++ b/src/mesa/main/texparam.h @@ -197,4 +197,10 @@ _mesa_MultiTexParameteriEXT(GLenum texunit, GLenum target, GLenum pname, GLint p extern void GLAPIENTRY _mesa_MultiTexParameterivEXT(GLenum texunit, GLenum target, GLenum pname, const GLint *params); +extern void GLAPIENTRY +_mesa_GetMultiTexParameterfvEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat *params); + +extern void GLAPIENTRY +_mesa_GetMultiTexParameterivEXT(GLenum texunit, GLenum target, GLenum pname, GLint *params); + #endif /* TEXPARAM_H */ -- cgit v1.2.3