diff options
author | Pierre-Eric Pelloux-Prayer <[email protected]> | 2019-05-22 18:04:33 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-08-19 18:50:08 -0400 |
commit | 0f07d18e486c56afa88e512136cf47e44a57ef92 (patch) | |
tree | a31a5ac907667c0119fa33f368c198b969a92c9c /src/mesa/main | |
parent | e8c5dc9c24ae69e53fdde5831f1d9c3bdefb9c07 (diff) |
mesa: add ext_dsa GetMultiTexLevelParameterEXT
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/tests/dispatch_sanity.cpp | 4 | ||||
-rw-r--r-- | src/mesa/main/texparam.c | 45 | ||||
-rw-r--r-- | src/mesa/main/texparam.h | 10 |
3 files changed, 57 insertions, 2 deletions
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 6ccdf3f83f8..6ba5180592e 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -1087,8 +1087,8 @@ const struct function common_desktop_functions_possible[] = { { "glGetMultiTexImageEXT", 12, -1 }, { "glGetMultiTexParameterfvEXT", 12, -1 }, { "glGetMultiTexParameterivEXT", 12, -1 }, - //{ "glGetMultiTexLevelParameterfvEXT", 12, -1 }, - //{ "glGetMultiTexLevelParameterivEXT", 12, -1 }, + { "glGetMultiTexLevelParameterfvEXT", 12, -1 }, + { "glGetMultiTexLevelParameterivEXT", 12, -1 }, { "glMultiTexImage3DEXT", 12, -1 }, { "glMultiTexSubImage3DEXT", 12, -1 }, { "glCopyMultiTexSubImage3DEXT", 12, -1 }, diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 9b3f77d1a75..ade10b2e2b4 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -1978,6 +1978,30 @@ _mesa_GetTextureLevelParameterfvEXT(GLuint texture, GLenum target, GLint level, } void GLAPIENTRY +_mesa_GetMultiTexLevelParameterfvEXT(GLenum texunit, GLenum target, GLint level, + GLenum pname, GLfloat *params) +{ + struct gl_texture_object *texObj; + GLint iparam; + GET_CURRENT_CONTEXT(ctx); + + texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target, + texunit - GL_TEXTURE0, + true, + "glGetMultiTexLevelParameterfvEXT"); + 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) { @@ -2015,6 +2039,27 @@ _mesa_GetTextureLevelParameterivEXT(GLuint texture, GLenum target, GLint level, pname, params, true); } +void GLAPIENTRY +_mesa_GetMultiTexLevelParameterivEXT(GLenum texunit, GLenum target, GLint level, + 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, + true, + "glGetMultiTexLevelParameterivEXT"); + 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 diff --git a/src/mesa/main/texparam.h b/src/mesa/main/texparam.h index fa837261402..858a5126a84 100644 --- a/src/mesa/main/texparam.h +++ b/src/mesa/main/texparam.h @@ -107,6 +107,16 @@ _mesa_GetTextureLevelParameterivEXT(GLuint texture, GLenum target, GLint *params); extern void GLAPIENTRY +_mesa_GetMultiTexLevelParameterfvEXT(GLenum texunit, GLenum target, + GLint level, GLenum pname, + GLfloat *params); + +extern void GLAPIENTRY +_mesa_GetMultiTexLevelParameterivEXT(GLenum texunit, GLenum target, + GLint level, GLenum pname, + GLint *params); + +extern void GLAPIENTRY _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ); extern void GLAPIENTRY |