diff options
author | Pierre-Eric Pelloux-Prayer <[email protected]> | 2019-05-20 14:12:54 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-19 20:04:06 -0400 |
commit | ff0cafc8f3ae85b9bc604334082da999a0abb2a0 (patch) | |
tree | f19875710a65d07843a95636dfebe259d4bb288c /src/mesa/main/texparam.c | |
parent | 5fb9c9d628ef4a1ddc3be2e1bbe84fe5387693e7 (diff) |
mesa: add EXT_dsa glGetTextureLevelParameter*vEXT functions
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/texparam.c')
-rw-r--r-- | src/mesa/main/texparam.c | 42 |
1 files changed, 42 insertions, 0 deletions
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. |