Module: Mesa Branch: master Commit: 9b7f57b18eff3959a525297f068697ac03a75840 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9b7f57b18eff3959a525297f068697ac03a75840
Author: Eric Anholt <[email protected]> Date: Wed Jan 5 15:48:31 2011 -0800 mesa: Consider textures incomplete when maxlevel < baselevel. 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 | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 5bc5639..f61e023 100644 --- 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); _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
