aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-09 17:05:56 +0100
committermarha <marha@users.sourceforge.net>2011-11-09 17:05:56 +0100
commit72d7f8d5af476f12dc75eab4fa9d59364cbec190 (patch)
tree1efac13a52811bfd28ae51538b15f87cbfaf8939 /mesalib/src/mesa/main/texobj.c
parenta3d796bcc7de83fd88b42e09c6a82a8df4f9b836 (diff)
parenta8e5f06fe01732fbd643bc435dd3b8eaa602defe (diff)
downloadvcxsrv-72d7f8d5af476f12dc75eab4fa9d59364cbec190.tar.gz
vcxsrv-72d7f8d5af476f12dc75eab4fa9d59364cbec190.tar.bz2
vcxsrv-72d7f8d5af476f12dc75eab4fa9d59364cbec190.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/mapi/glapi/glapi.h
Diffstat (limited to 'mesalib/src/mesa/main/texobj.c')
-rw-r--r--mesalib/src/mesa/main/texobj.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c
index e2f0dc8b6..17c78ce3e 100644
--- a/mesalib/src/mesa/main/texobj.c
+++ b/mesalib/src/mesa/main/texobj.c
@@ -415,10 +415,6 @@ incomplete(struct gl_texture_object *t, const char *fmt, ...)
* The gl_texture_object::Complete flag will be set to GL_TRUE or GL_FALSE
* accordingly.
*
- * XXX TODO: For immutable textures (GL_ARB_texture_storage) we can skip
- * many of the checks below since we know the mipmap images will have
- * consistent sizes.
- *
* \param ctx GL context.
* \param t texture object.
*
@@ -504,6 +500,15 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
/* Compute _MaxLambda = q - b (see the 1.2 spec) used during mipmapping */
t->_MaxLambda = (GLfloat) (t->_MaxLevel - t->BaseLevel);
+ if (t->Immutable) {
+ /* This texture object was created with glTexStorage1/2/3D() so we
+ * know that all the mipmap levels are the right size and all cube
+ * map faces are the same size.
+ * We don't need to do any of the additional checks below.
+ */
+ return;
+ }
+
if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) {
/* make sure that all six cube map level 0 images are the same size */
const GLuint w = t->Image[0][baseLevel]->Width2;