mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 17:10:11 +01:00
radeon/r200/r300: fix max texture levels assert
use the actual value set in the context
This commit is contained in:
parent
7f223ff891
commit
a5d92d7ed2
2 changed files with 3 additions and 6 deletions
|
|
@ -265,10 +265,7 @@ static void r300InitConstValues(GLcontext *ctx, radeonScreenPtr screen)
|
|||
driQueryOptioni(&r300->radeon.optionCache, "texture_coord_units");
|
||||
ctx->Const.MaxTextureUnits = MIN2(ctx->Const.MaxTextureImageUnits,
|
||||
ctx->Const.MaxTextureCoordUnits);
|
||||
/* FIXME: When no memory manager is available we should set this
|
||||
* to some reasonable value based on texture memory pool size */
|
||||
/* FIXME: r5xx limit is 4096 */
|
||||
ctx->Const.MaxTextureLevels = 12;
|
||||
|
||||
ctx->Const.MaxTextureMaxAnisotropy = 16.0;
|
||||
ctx->Const.MaxTextureLodBias = 16.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ static void calculate_miptree_layout_r100(radeonContextPtr rmesa, radeon_mipmap_
|
|||
GLuint face;
|
||||
|
||||
numLevels = mt->lastLevel - mt->firstLevel + 1;
|
||||
assert(numLevels <= RADEON_MAX_TEXTURE_LEVELS);
|
||||
assert(numLevels <= rmesa->glCtx->Const.MaxTextureLevels);
|
||||
|
||||
curOffset = 0;
|
||||
for(face = 0; face < mt->faces; face++) {
|
||||
|
|
@ -165,7 +165,7 @@ static void calculate_miptree_layout_r300(radeonContextPtr rmesa, radeon_mipmap_
|
|||
GLuint i;
|
||||
|
||||
numLevels = mt->lastLevel - mt->firstLevel + 1;
|
||||
assert(numLevels <= RADEON_MAX_TEXTURE_LEVELS);
|
||||
assert(numLevels <= rmesa->glCtx->Const.MaxTextureLevels);
|
||||
|
||||
curOffset = 0;
|
||||
for(i = 0; i < numLevels; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue