projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39cc0ee
)
mesa: Consider textures incomplete when maxlevel < baselevel.
author
Eric Anholt
<eric@anholt.net>
Wed, 5 Jan 2011 23:48:31 +0000
(15:48 -0800)
committer
Eric Anholt
<eric@anholt.net>
Wed, 5 Jan 2011 23:51:37 +0000
(15:51 -0800)
See section 3.8.10 of the GL 2.1 specification. There's no way to do
anything sane with that, and drivers would get all sorts of angry.
src/mesa/main/texobj.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/texobj.c
b/src/mesa/main/texobj.c
index 5bc5639dbf725dff01601ebb3d3b1e6985b1f7fa..f61e0237add44fd21542a8082a7d29a19cc8f8eb 100644
(file)
--- a/
src/mesa/main/texobj.c
+++ b/
src/mesa/main/texobj.c
@@
-470,6
+470,12
@@
_mesa_test_texobj_completeness( const struct gl_context *ctx,
ASSERT(maxLevels > 0);
+ if (t->MaxLevel < t->BaseLevel) {
+ incomplete(t, "MAX_LEVEL (%d) < BASE_LEVEL (%d)",
+ t->MaxLevel, t->BaseLevel);
+ return;
+ }
+
t->_MaxLevel = baseLevel + maxLog2;
t->_MaxLevel = MIN2(t->_MaxLevel, t->MaxLevel);
t->_MaxLevel = MIN2(t->_MaxLevel, maxLevels - 1);