diff options
author | marha <marha@users.sourceforge.net> | 2012-11-19 11:21:45 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-11-19 11:21:45 +0100 |
commit | 57b3e446b9b4017ccfdd3227be481df590740426 (patch) | |
tree | 0e4899f530f75d343c090202fc7123c78f9b4866 /mesalib/src/mesa/main/texobj.c | |
parent | 24635abae6008bef13e30d798b3f33abab412770 (diff) | |
parent | b3e1e62c45f525cdd332073aaa34d8452cb23374 (diff) | |
download | vcxsrv-57b3e446b9b4017ccfdd3227be481df590740426.tar.gz vcxsrv-57b3e446b9b4017ccfdd3227be481df590740426.tar.bz2 vcxsrv-57b3e446b9b4017ccfdd3227be481df590740426.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
git update 19 nov 2012
Added bash script to update released branch
Conflicts:
mesalib/src/mapi/glapi/gen/gl_API.xml
mesalib/src/mesa/program/.gitignore
pixman/pixman/pixman-mmx.c
xorg-server/Xi/xiquerypointer.c
xorg-server/xkb/xkb.c
Diffstat (limited to 'mesalib/src/mesa/main/texobj.c')
-rw-r--r-- | mesalib/src/mesa/main/texobj.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c index c083c72e2..d650c75e4 100644 --- a/mesalib/src/mesa/main/texobj.c +++ b/mesalib/src/mesa/main/texobj.c @@ -445,7 +445,7 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx, { const GLint baseLevel = t->BaseLevel; const struct gl_texture_image *baseImage; - GLint maxLog2 = 0, maxLevels = 0; + GLint maxLevels = 0; /* We'll set these to FALSE if tests fail below */ t->_BaseComplete = GL_TRUE; @@ -501,31 +501,22 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx, switch (t->Target) { case GL_TEXTURE_1D: case GL_TEXTURE_1D_ARRAY_EXT: - maxLog2 = baseImage->WidthLog2; maxLevels = ctx->Const.MaxTextureLevels; break; case GL_TEXTURE_2D: case GL_TEXTURE_2D_ARRAY_EXT: - maxLog2 = MAX2(baseImage->WidthLog2, - baseImage->HeightLog2); maxLevels = ctx->Const.MaxTextureLevels; break; case GL_TEXTURE_3D: - maxLog2 = MAX3(baseImage->WidthLog2, - baseImage->HeightLog2, - baseImage->DepthLog2); maxLevels = ctx->Const.Max3DTextureLevels; break; case GL_TEXTURE_CUBE_MAP_ARB: case GL_TEXTURE_CUBE_MAP_ARRAY: - maxLog2 = MAX2(baseImage->WidthLog2, - baseImage->HeightLog2); maxLevels = ctx->Const.MaxCubeTextureLevels; break; case GL_TEXTURE_RECTANGLE_NV: case GL_TEXTURE_BUFFER: case GL_TEXTURE_EXTERNAL_OES: - maxLog2 = 0; /* not applicable */ maxLevels = 1; /* no mipmapping */ break; default: @@ -535,7 +526,8 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx, ASSERT(maxLevels > 0); - t->_MaxLevel = baseLevel + maxLog2; /* 'p' in the GL spec */ + t->_MaxLevel = + baseLevel + baseImage->MaxNumLevels - 1; /* 'p' in the GL spec */ t->_MaxLevel = MIN2(t->_MaxLevel, t->MaxLevel); t->_MaxLevel = MIN2(t->_MaxLevel, maxLevels - 1); /* 'q' in the GL spec */ |