summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-03-27 09:51:24 -0700
committerEric Anholt <[email protected]>2012-04-09 14:34:33 -0700
commitdcf42dbd066fe633c28afa36820da9e9430038df (patch)
tree5fbc2c0e37108f7fa028e93836bcac82efbde572 /src/mesa/main/texobj.c
parent18c2ee0df5fa6679996e40c574d37475be230bd7 (diff)
mesa: Handle updating texture state for buffer textures.
We have to skip some work that wants to look at texture images, since buffer textures don't have any of that complexity. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r--src/mesa/main/texobj.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 88dc3b195e7..d7e631efddb 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -449,6 +449,14 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
t->_BaseComplete = GL_TRUE;
t->_MipmapComplete = GL_TRUE;
+ if (t->Target == GL_TEXTURE_BUFFER) {
+ /* Buffer textures are always considered complete. The obvious case where
+ * they would be incomplete (no BO attached) is actually specced to be
+ * undefined rendering results.
+ */
+ return;
+ }
+
/* Detect cases where the application set the base level to an invalid
* value.
*/