mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 13:20:14 +01:00
mesa: condense GL_TEXTURE_RESIDENT query code
This commit is contained in:
parent
88a4f2fe54
commit
1254a2b2e4
1 changed files with 4 additions and 16 deletions
|
|
@ -1133,14 +1133,8 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
|
|||
}
|
||||
break;
|
||||
case GL_TEXTURE_RESIDENT:
|
||||
{
|
||||
GLboolean resident;
|
||||
if (ctx->Driver.IsTextureResident)
|
||||
resident = ctx->Driver.IsTextureResident(ctx, obj);
|
||||
else
|
||||
resident = GL_TRUE;
|
||||
*params = ENUM_TO_FLOAT(resident);
|
||||
}
|
||||
*params = ctx->Driver.IsTextureResident ?
|
||||
ctx->Driver.IsTextureResident(ctx, obj) : 1.0F;
|
||||
break;
|
||||
case GL_TEXTURE_PRIORITY:
|
||||
*params = obj->Priority;
|
||||
|
|
@ -1282,14 +1276,8 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
|
|||
}
|
||||
break;;
|
||||
case GL_TEXTURE_RESIDENT:
|
||||
{
|
||||
GLboolean resident;
|
||||
if (ctx->Driver.IsTextureResident)
|
||||
resident = ctx->Driver.IsTextureResident(ctx, obj);
|
||||
else
|
||||
resident = GL_TRUE;
|
||||
*params = (GLint) resident;
|
||||
}
|
||||
*params = ctx->Driver.IsTextureResident ?
|
||||
ctx->Driver.IsTextureResident(ctx, obj) : 1;
|
||||
break;;
|
||||
case GL_TEXTURE_PRIORITY:
|
||||
*params = FLOAT_TO_INT(obj->Priority);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue