summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-08-04 08:22:31 -0600
committerBrian Paul <[email protected]>2011-08-04 08:22:31 -0600
commit1254a2b2e45c6961a57d9c60f561907183ef7de7 (patch)
treef4fb2822dccc08879ffe1a0e4e2dc89d62caee94 /src/mesa
parent88a4f2fe543d7c394c0ad732ae60f8cf94c0d357 (diff)
mesa: condense GL_TEXTURE_RESIDENT query code
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texparam.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 78dcc5dccea..0dec0172989 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -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);