diff options
author | Roland Scheidegger <[email protected]> | 2006-02-03 13:29:11 +0000 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2006-02-03 13:29:11 +0000 |
commit | e7276b7fa597f7914f7e10a2e50dae36ae50e10b (patch) | |
tree | 56b65ced65d5e39ab8d13a76e6cc797542fb2570 /src/mesa/drivers/dri/r200 | |
parent | 16a14510c4c134db9268719e9458bf6bf83e618a (diff) |
replace the texture level hack used in radeon/r200 to allow larger textures with different methods to calculate the announced maximum texture sizes. Default is still the same (that is, radeon/r200 default to not announce anything which might not fit, i830/i915 default to 1 texture must fit). Bug #5785.
Diffstat (limited to 'src/mesa/drivers/dri/r200')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_context.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index a3301f3da8e..bfd8e907a98 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -366,8 +366,9 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual, rmesa->hw.all_dirty = 1; /* Set the maximum texture size small enough that we can guarentee that - * all texture units can bind a maximal texture and have them both in - * texturable memory at once. + * all texture units can bind a maximal texture and have all of them in + * texturable memory at once. Depending on the allow_large_textures driconf + * setting allow larger textures. */ ctx = rmesa->glCtx; @@ -376,6 +377,8 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual, ctx->Const.MaxTextureImageUnits = ctx->Const.MaxTextureUnits; ctx->Const.MaxTextureCoordUnits = ctx->Const.MaxTextureUnits; + i = driQueryOptioni( &rmesa->optionCache, "allow_large_textures"); + driCalculateMaxTextureLevels( rmesa->texture_heaps, rmesa->nr_heaps, & ctx->Const, @@ -389,14 +392,8 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual, 11, /* max cube texture size is 2048x2048 */ 11, /* max texture rectangle size is 2048x2048 */ 12, - GL_FALSE ); - - /* adjust max texture size a bit. Hack, but I really want to use larger textures - which will work just fine in 99.999999% of all cases, especially with texture compression... */ - if (driQueryOptionb( &rmesa->optionCache, "texture_level_hack" )) - { - if (ctx->Const.MaxTextureLevels < 12) ctx->Const.MaxTextureLevels += 1; - } + GL_FALSE, + i ); ctx->Const.MaxTextureMaxAnisotropy = 16.0; |