radeon: set max texture size
authorJerome Glisse <glisse@freedesktop.org>
Wed, 20 May 2009 14:34:06 +0000 (16:34 +0200)
committerJerome Glisse <glisse@freedesktop.org>
Wed, 20 May 2009 14:34:06 +0000 (16:34 +0200)
This still need some work to actually report somethings reasonable
if no memory manager is available.

src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r300/r300_context.c
src/mesa/drivers/dri/radeon/radeon_context.c

index f80f0d8..8924849 100644 (file)
@@ -354,6 +354,10 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual,
 
    i = driQueryOptioni( &rmesa->radeon.optionCache, "allow_large_textures");
 
+   /* FIXME: When no memory manager is available we should set this 
+    * to some reasonable value based on texture memory pool size */
+   ctx->Const.MaxTextureLevels = 12;
+
    ctx->Const.MaxTextureMaxAnisotropy = 16.0;
 
    /* No wide AA points.
index be8d480..dbd5ce5 100644 (file)
@@ -268,6 +268,10 @@ 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;
 
index 2600c78..8f780c4 100644 (file)
@@ -283,6 +283,11 @@ r100CreateContext( const __GLcontextModes *glVisual,
 
    i = driQueryOptioni( &rmesa->radeon.optionCache, "allow_large_textures");
 
+   /* FIXME: When no memory manager is available we should set this 
+    * to some reasonable value based on texture memory pool size */
+   /* FIXME: does r100 support 2048x2048 texture ? */
+   ctx->Const.MaxTextureLevels = 12;
+
    ctx->Const.MaxTextureMaxAnisotropy = 16.0;
 
    /* No wide points.