diff options
author | Brian Paul <[email protected]> | 2011-12-03 10:04:18 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-12-08 08:56:29 -0700 |
commit | 2f88139145da99a695680c813ef5cc669eaef034 (patch) | |
tree | 2431c027f8fd8fcd74866f17ca6e5484998945d3 /src/mesa/main/texobj.c | |
parent | 5acb291f319a0b32d9701b3e6c8624175f1a80e7 (diff) |
mesa: remove the ctx->Driver.IsTextureResident() hook
No driver implemented this and we always returned "True" for residence
queries.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r-- | src/mesa/main/texobj.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 17c78ce3e63..8e447cabdd4 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -1184,10 +1184,7 @@ _mesa_PrioritizeTextures( GLsizei n, const GLuint *texName, * * \return GL_TRUE if all textures are resident and \p residences is left unchanged, * - * \sa glAreTexturesResident(). - * - * Looks up each texture in the hash and calls - * dd_function_table::IsTextureResident. + * Note: we assume all textures are always resident */ GLboolean GLAPIENTRY _mesa_AreTexturesResident(GLsizei n, const GLuint *texName, @@ -1195,7 +1192,7 @@ _mesa_AreTexturesResident(GLsizei n, const GLuint *texName, { GET_CURRENT_CONTEXT(ctx); GLboolean allResident = GL_TRUE; - GLint i, j; + GLint i; ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); if (n < 0) { @@ -1206,6 +1203,7 @@ _mesa_AreTexturesResident(GLsizei n, const GLuint *texName, if (!texName || !residences) return GL_FALSE; + /* We only do error checking on the texture names */ for (i = 0; i < n; i++) { struct gl_texture_object *t; if (texName[i] == 0) { @@ -1217,21 +1215,6 @@ _mesa_AreTexturesResident(GLsizei n, const GLuint *texName, _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident"); return GL_FALSE; } - if (!ctx->Driver.IsTextureResident || - ctx->Driver.IsTextureResident(ctx, t)) { - /* The texture is resident */ - if (!allResident) - residences[i] = GL_TRUE; - } - else { - /* The texture is not resident */ - if (allResident) { - allResident = GL_FALSE; - for (j = 0; j < i; j++) - residences[j] = GL_TRUE; - } - residences[i] = GL_FALSE; - } } return allResident; |