From: Eric Anholt Date: Wed, 5 Jan 2011 23:48:31 +0000 (-0800) Subject: mesa: Consider textures incomplete when maxlevel < baselevel. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b7f57b18eff3959a525297f068697ac03a75840;p=mesa.git 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. --- diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 5bc5639dbf7..f61e0237add 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);