diff options
-rw-r--r-- | src/mapi/glapi/gen/EXT_direct_state_access.xml | 16 | ||||
-rw-r--r-- | src/mapi/glapi/gen/static_data.py | 2 | ||||
-rw-r--r-- | src/mesa/main/tests/dispatch_sanity.cpp | 4 | ||||
-rw-r--r-- | src/mesa/main/texparam.c | 42 | ||||
-rw-r--r-- | src/mesa/main/texparam.h | 9 |
5 files changed, 71 insertions, 2 deletions
diff --git a/src/mapi/glapi/gen/EXT_direct_state_access.xml b/src/mapi/glapi/gen/EXT_direct_state_access.xml index cbbb80805ed..8cb7fac1d85 100644 --- a/src/mapi/glapi/gen/EXT_direct_state_access.xml +++ b/src/mapi/glapi/gen/EXT_direct_state_access.xml @@ -116,6 +116,22 @@ <param name="params" type="float *" /> </function> + <function name="GetTextureLevelParameterivEXT"> + <param name="texture" type="GLuint" /> + <param name="target" type="GLenum" /> + <param name="level" type="GLint" /> + <param name="pname" type="GLenum" /> + <param name="params" type="GLint *" /> + </function> + + <function name="GetTextureLevelParameterfvEXT"> + <param name="texture" type="GLuint" /> + <param name="target" type="GLenum" /> + <param name="level" type="GLint" /> + <param name="pname" type="GLenum" /> + <param name="params" type="float *" /> + </function> + <function name="TextureParameteriEXT"> <param name="texture" type="GLuint" /> <param name="target" type="GLenum" /> diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index da01b15f1f5..29a80afbe20 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -1498,6 +1498,8 @@ offsets = { "TextureParameterfEXT": 1462, "TextureParameterfvEXT": 1463, "GetTextureImageEXT": 1464, + "GetTextureLevelParameterivEXT": 1465, + "GetTextureLevelParameterfvEXT": 1466, } functions = [ diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 607a82e311a..ba5df4b0860 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -1048,8 +1048,8 @@ const struct function common_desktop_functions_possible[] = { { "glGetTextureImageEXT", 11, -1 }, { "glGetTextureParameterfvEXT", 11, -1 }, { "glGetTextureParameterivEXT", 11, -1 }, - //{ "glGetTextureLevelParameterfvEXT", 11, -1 }, - //{ "glGetTextureLevelParameterivEXT", 11, -1 }, + { "glGetTextureLevelParameterfvEXT", 11, -1 }, + { "glGetTextureLevelParameterivEXT", 11, -1 }, /* GL_EXT_direct_state_access - GL 1.2 */ { "glTextureImage3DEXT", 12, -1 }, { "glTextureSubImage3DEXT", 12, -1 }, diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 64bd0b63566..f3a01ae65e5 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -1884,6 +1884,28 @@ _mesa_GetTextureLevelParameterfv(GLuint texture, GLint level, } void GLAPIENTRY +_mesa_GetTextureLevelParameterfvEXT(GLuint texture, GLenum target, GLint level, + GLenum pname, GLfloat *params) +{ + struct gl_texture_object *texObj; + GLint iparam; + GET_CURRENT_CONTEXT(ctx); + + texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true, + "glGetTextureLevelParameterfvEXT"); + if (!texObj) + return; + + if (!valid_tex_level_parameteriv_target(ctx, texObj->Target, true)) + return; + + get_tex_level_parameteriv(ctx, texObj, texObj->Target, level, + pname, &iparam, true); + + *params = (GLfloat) iparam; +} + +void GLAPIENTRY _mesa_GetTextureLevelParameteriv(GLuint texture, GLint level, GLenum pname, GLint *params) { @@ -1902,6 +1924,26 @@ _mesa_GetTextureLevelParameteriv(GLuint texture, GLint level, pname, params, true); } +void GLAPIENTRY +_mesa_GetTextureLevelParameterivEXT(GLuint texture, GLenum target, GLint level, + GLenum pname, GLint *params) +{ + struct gl_texture_object *texObj; + GET_CURRENT_CONTEXT(ctx); + + texObj = _mesa_lookup_or_create_texture(ctx, target, texture, false, true, + "glGetTextureLevelParameterivEXT"); + if (!texObj) + return; + + if (!valid_tex_level_parameteriv_target(ctx, texObj->Target, true)) + return; + + get_tex_level_parameteriv(ctx, texObj, texObj->Target, level, + pname, params, true); +} + + /** * This isn't exposed to the rest of the driver because it is a part of the * OpenGL API that is rarely used. diff --git a/src/mesa/main/texparam.h b/src/mesa/main/texparam.h index 130d32f2c76..77cb6ff6584 100644 --- a/src/mesa/main/texparam.h +++ b/src/mesa/main/texparam.h @@ -96,6 +96,15 @@ extern void GLAPIENTRY _mesa_GetTextureLevelParameteriv(GLuint texture, GLint level, GLenum pname, GLint *params); +extern void GLAPIENTRY +_mesa_GetTextureLevelParameterfvEXT(GLuint texture, GLenum target, + GLint level, GLenum pname, + GLfloat *params); + +extern void GLAPIENTRY +_mesa_GetTextureLevelParameterivEXT(GLuint texture, GLenum target, + GLint level, GLenum pname, + GLint *params); extern void GLAPIENTRY _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ); |