mesa: add EXT_dsa glGetTextureLevelParameter*vEXT functions

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2019-05-20 14:12:54 +02:00 committed by Marek Olšák
parent 5fb9c9d628
commit ff0cafc8f3
5 changed files with 71 additions and 2 deletions

View file

@ -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" />

View file

@ -1498,6 +1498,8 @@ offsets = {
"TextureParameterfEXT": 1462,
"TextureParameterfvEXT": 1463,
"GetTextureImageEXT": 1464,
"GetTextureLevelParameterivEXT": 1465,
"GetTextureLevelParameterfvEXT": 1466,
}
functions = [

View file

@ -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 },

View file

@ -1883,6 +1883,28 @@ _mesa_GetTextureLevelParameterfv(GLuint texture, GLint level,
*params = (GLfloat) iparam;
}
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.

View file

@ -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 );