diff options
author | Roland Scheidegger <rscheidegger@gmx.ch> | 2006-02-03 13:29:11 +0000 |
---|---|---|
committer | Roland Scheidegger <rscheidegger@gmx.ch> | 2006-02-03 13:29:11 +0000 |
commit | e7276b7fa597f7914f7e10a2e50dae36ae50e10b (patch) | |
tree | 56b65ced65d5e39ab8d13a76e6cc797542fb2570 /src/mesa/drivers/dri/i915/i830_context.c | |
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/i915/i830_context.c')
-rw-r--r-- | src/mesa/drivers/dri/i915/i830_context.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c index 3979f531a8..7a251ac6e8 100644 --- a/src/mesa/drivers/dri/i915/i830_context.c +++ b/src/mesa/drivers/dri/i915/i830_context.c @@ -61,6 +61,7 @@ GLboolean i830CreateContext( const __GLcontextModes *mesaVis, i830ContextPtr i830 = (i830ContextPtr) CALLOC_STRUCT(i830_context); intelContextPtr intel = &i830->intel; GLcontext *ctx = &intel->ctx; + GLuint i; if (!i830) return GL_FALSE; i830InitVtbl( i830 ); @@ -91,7 +92,8 @@ GLboolean i830CreateContext( const __GLcontextModes *mesaVis, /* FIXME: driCalculateMaxTextureLevels assumes that mipmaps are tightly * FIXME: packed, but they're not in Intel graphics hardware. */ - intel->ctx.Const.MaxTextureUnits = 1; + intel->ctx.Const.MaxTextureUnits = I830_TEX_UNITS; + i = driQueryOptioni( &intel->intelScreen->optionCache, "allow_large_textures"); driCalculateMaxTextureLevels( intel->texture_heaps, intel->nr_heaps, &intel->ctx.Const, @@ -101,8 +103,8 @@ GLboolean i830CreateContext( const __GLcontextModes *mesaVis, 10, /* max CUBE texture size is 1024x1024 */ 11, /* max RECT. supported */ 12, - GL_FALSE ); - intel->ctx.Const.MaxTextureUnits = I830_TEX_UNITS; + GL_FALSE, + i ); _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, 18 * sizeof(GLfloat) ); |