From: Pierre-Eric Pelloux-Prayer Date: Tue, 30 Apr 2019 13:15:04 +0000 (+0200) Subject: mesa: add EXT_dsa glGetMultiTexParameteriv/fvEXT X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f28d9ab1a3d486c1c9535fb3dd7d9f49a65c3e96;p=mesa.git mesa: add EXT_dsa glGetMultiTexParameteriv/fvEXT Reviewed-by: Marek Olšák --- diff --git a/src/mapi/glapi/gen/EXT_direct_state_access.xml b/src/mapi/glapi/gen/EXT_direct_state_access.xml index 3eb62d20eef..8d567bd8816 100644 --- a/src/mapi/glapi/gen/EXT_direct_state_access.xml +++ b/src/mapi/glapi/gen/EXT_direct_state_access.xml @@ -411,6 +411,20 @@ + + + + + + + + + + + + + + diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index ff714369535..5d92f61b4ea 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -1534,6 +1534,8 @@ offsets = { "MultiTexSubImage1DEXT": 1498, "MultiTexSubImage2DEXT": 1499, "MultiTexSubImage3DEXT": 1500, + "GetMultiTexParameterivEXT": 1501, + "GetMultiTexParameterfvEXT": 1502, } functions = [ 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 */