summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
authorRoland Scheidegger <rscheidegger@gmx.ch>2006-02-03 13:29:11 +0000
committerRoland Scheidegger <rscheidegger@gmx.ch>2006-02-03 13:29:11 +0000
commite7276b7fa597f7914f7e10a2e50dae36ae50e10b (patch)
tree56b65ced65d5e39ab8d13a76e6cc797542fb2570 /src/mesa/drivers/dri/i915
parent16a14510c4c134db9268719e9458bf6bf83e618a (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')
-rw-r--r--src/mesa/drivers/dri/i915/i830_context.c8
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c8
-rw-r--r--src/mesa/drivers/dri/i915/intel_screen.c3
3 files changed, 12 insertions, 7 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) );
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index cd0eaf2470..b5c3f58d45 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -102,6 +102,7 @@ GLboolean i915CreateContext( const __GLcontextModes *mesaVis,
i915ContextPtr i915 = (i915ContextPtr) CALLOC_STRUCT(i915_context);
intelContextPtr intel = &i915->intel;
GLcontext *ctx = &intel->ctx;
+ GLuint i;
if (!i915) return GL_FALSE;
@@ -135,7 +136,8 @@ GLboolean i915CreateContext( const __GLcontextModes *mesaVis,
* tightly packed, but they're not in Intel graphics
* hardware.
*/
- ctx->Const.MaxTextureUnits = 1;
+ ctx->Const.MaxTextureUnits = I915_TEX_UNITS;
+ i = driQueryOptioni( &intel->intelScreen->optionCache, "allow_large_textures");
driCalculateMaxTextureLevels( intel->texture_heaps,
intel->nr_heaps,
&intel->ctx.Const,
@@ -145,8 +147,8 @@ GLboolean i915CreateContext( const __GLcontextModes *mesaVis,
11, /* cube texture. */
11, /* rect texture */
12,
- GL_FALSE );
- ctx->Const.MaxTextureUnits = I915_TEX_UNITS;
+ GL_FALSE,
+ i );
/* GL_ARB_fragment_program limits - don't think Mesa actually
* validates programs against these, and in any case one ARB
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c
index fde6d941ab..66dfe34ec9 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -48,9 +48,10 @@ PUBLIC const char __driConfigOptions[] =
DRI_CONF_BEGIN
DRI_CONF_SECTION_PERFORMANCE
DRI_CONF_FORCE_S3TC_ENABLE(false)
+ DRI_CONF_ALLOW_LARGE_TEXTURES(1)
DRI_CONF_SECTION_END
DRI_CONF_END;
-const GLuint __driNConfigOptions = 1;
+const GLuint __driNConfigOptions = 2;
#ifdef USE_NEW_INTERFACE
static PFNGLXCREATECONTEXTMODES create_context_modes = NULL;