replace the texture level hack used in radeon/r200 to allow larger textures with...
authorRoland Scheidegger <rscheidegger@gmx.ch>
Fri, 3 Feb 2006 13:29:11 +0000 (13:29 +0000)
committerRoland Scheidegger <rscheidegger@gmx.ch>
Fri, 3 Feb 2006 13:29:11 +0000 (13:29 +0000)
15 files changed:
src/mesa/drivers/dri/common/texmem.c
src/mesa/drivers/dri/common/texmem.h
src/mesa/drivers/dri/common/xmlpool/de.po
src/mesa/drivers/dri/common/xmlpool/options.h
src/mesa/drivers/dri/common/xmlpool/t_options.h
src/mesa/drivers/dri/i810/i810context.c
src/mesa/drivers/dri/i915/i830_context.c
src/mesa/drivers/dri/i915/i915_context.c
src/mesa/drivers/dri/i915/intel_screen.c
src/mesa/drivers/dri/mga/mga_xmesa.c
src/mesa/drivers/dri/r128/r128_context.c
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/radeon/radeon_context.c
src/mesa/drivers/dri/radeon/radeon_screen.c
src/mesa/drivers/dri/savage/savage_xmesa.c

index 7cf2e21b63321b2c78495a1eb3639b1b0b6f169c..41316de1fc46e036ca48ad47b62ff0d21a1e58c8 100644 (file)
@@ -971,19 +971,22 @@ get_max_size( unsigned nr_heaps,
  *     For hardware that does not support mipmapping, this will be 1.
  * \param all_textures_one_heap True if the hardware requires that all
  *     textures be in a single texture heap for multitexturing.
+ * \param allow_larger_textures 0 conservative, 1 calculate limits
+ *     so at least one worst-case texture can fit, 2 just use hw limits.
  */
 
 void
 driCalculateMaxTextureLevels( driTexHeap * const * heaps,
                              unsigned nr_heaps,
                              struct gl_constants * limits,
-                             unsigned max_bytes_per_texel, 
+                             unsigned max_bytes_per_texel,
                              unsigned max_2D_size,
                              unsigned max_3D_size,
                              unsigned max_cube_size,
                              unsigned max_rect_size,
                              unsigned mipmaps_at_once,
-                             int all_textures_one_heap )
+                             int all_textures_one_heap,
+                             int allow_larger_textures )
 {
    struct maps_per_heap  max_textures[8];
    unsigned         i;
@@ -1012,18 +1015,22 @@ driCalculateMaxTextureLevels( driTexHeap * const * heaps,
     */
 
    for ( i = 0 ; i < 4 ; i++ ) {
-      if ( max_sizes[ i ] != 0 ) {
-        fill_in_maximums( heaps, nr_heaps, max_bytes_per_texel, 
+      if ( (allow_larger_textures != 2) && (max_sizes[ i ] != 0) ) {
+        fill_in_maximums( heaps, nr_heaps, max_bytes_per_texel,
                           max_sizes[ i ], mipmaps[ i ],
                           dimensions[ i ], faces[ i ],
                           max_textures );
 
-        max_sizes[ i ] = get_max_size( nr_heaps, 
-                                       limits->MaxTextureUnits,
+        max_sizes[ i ] = get_max_size( nr_heaps,
+                                       allow_larger_textures == 1 ?
+                                       1 : limits->MaxTextureUnits,
                                        max_sizes[ i ],
                                        all_textures_one_heap,
                                        max_textures );
       }
+      else if (max_sizes[ i ] != 0) {
+        max_sizes[ i ] += 1;
+      }
    }
 
    SET_MAX( MaxTextureLevels,        0 );
index 22d1755895e376b16d3ce909058654b6c622c9e6..6692efcc3090292d03a3d5347130f7c431e3ecb4 100644 (file)
@@ -291,13 +291,14 @@ void
 driCalculateMaxTextureLevels( driTexHeap * const * heaps,
                              unsigned nr_heaps,
                              struct gl_constants * limits,
-                             unsigned max_bytes_per_texel, 
+                             unsigned max_bytes_per_texel,
                              unsigned max_2D_size,
                              unsigned max_3D_size,
                              unsigned max_cube_size,
                              unsigned max_rect_size,
                              unsigned mipmaps_at_once,
-                             int all_textures_one_heap );
+                             int all_textures_one_heap,
+                             int allow_larger_textures );
 
 void
 driSetTextureSwapCounterLocation( driTexHeap * heap, unsigned * counter );
index e287d0fe79b8bb9550df8e26d44a143a58c74da4..4ea82f9010e75f30f17458cdf91ce449999578d1 100644 (file)
@@ -178,8 +178,8 @@ msgid ""
 "Always synchronize with vertical refresh, application chooses the minimum "
 "swap interval"
 msgstr ""
-"Immer mit der Bildwiederholung synchronisieren, Anwendung wählt das minmale "
-"Bildinterval"
+"Immer mit der Bildwiederholung synchronisieren, Anwendung wählt das minimale "
+"Bildintervall"
 
 #: t_options.h:186
 msgid "Use HyperZ to boost performance"
@@ -190,42 +190,51 @@ msgid "Number of texture units used"
 msgstr "Anzahl der benutzten Textureinheiten"
 
 #: t_options.h:196
-msgid ""
-"Enable hack to allow larger textures with texture compression on radeon/r200"
-msgstr ""
-"Hack aktivieren, der mit Texturkompression auf radeon/r200 größere Texturen "
-"erlaubt"
+msgid "Support larger textures not guaranteed to fit into graphics memory"
+msgstr "Unterstütze grosse Texturen die evtl. nicht in den Grafikspeicher passen"
+
+#: t_options.h:197
+msgid "No"
+msgstr "Nein"
+
+#: t_options.h:198
+msgid "At least 1 texture must fit under worst-case assumptions"
+msgstr "Mindestens 1 Textur muss auch im schlechtesten Fall Platz haben"
 
-#: t_options.h:201
+#: t_options.h:199
+msgid "Announce hardware limits"
+msgstr "Benutze Hardware-Limits"
+
+#: t_options.h:205
 msgid "Texture filtering quality vs. speed, AKA “brilinear” texture filtering"
 msgstr ""
 "Texturfilterqualität versus -geschwindigkeit, auch bekannt als „brilineare“ "
 "Texturfilterung"
 
-#: t_options.h:209
+#: t_options.h:213
 msgid "Used types of texture memory"
 msgstr "Benutzte Arten von Texturspeicher"
 
-#: t_options.h:210
+#: t_options.h:214
 msgid "All available memory"
 msgstr "Aller verfügbarer Speicher"
 
-#: t_options.h:211
+#: t_options.h:215
 msgid "Only card memory (if available)"
 msgstr "Nur Grafikspeicher (falls verfügbar)"
 
-#: t_options.h:212
+#: t_options.h:216
 msgid "Only GART (AGP/PCIE) memory (if available)"
 msgstr "Nur GART-Speicher (AGP/PCIE) (falls verfügbar)"
 
-#: t_options.h:220
+#: t_options.h:224
 msgid "Features that are not hardware-accelerated"
 msgstr "Funktionalität, die nicht hardwarebeschleunigt ist"
 
-#: t_options.h:224
+#: t_options.h:228
 msgid "Enable extension GL_ARB_vertex_program"
 msgstr "Erweiterung GL_ARB_vertex_program aktivieren"
 
-#: t_options.h:229
+#: t_options.h:233
 msgid "Enable extension GL_NV_vertex_program"
 msgstr "Erweiterung GL_NV_vertex_program aktivieren"
index 86d17d024949403e30b0e4af36c98f868aff74bd..a0d617c34444ef93703610e2717e760cc4bba7da 100644 (file)
@@ -341,7 +341,7 @@ DRI_CONF_OPT_BEGIN_V(vblank_mode,enum,def,"0:3") \
                 DRI_CONF_ENUM(0,"Niemals mit der Bildwiederholung synchronisieren, Anweisungen der Anwendung ignorieren") \
                 DRI_CONF_ENUM(1,"Initiales Bildinterval 0, Anweisungen der Anwendung gehorchen") \
                 DRI_CONF_ENUM(2,"Initiales Bildinterval 1, Anweisungen der Anwendung gehorchen") \
-                DRI_CONF_ENUM(3,"Immer mit der Bildwiederholung synchronisieren, Anwendung wählt das minmale Bildinterval") \
+                DRI_CONF_ENUM(3,"Immer mit der Bildwiederholung synchronisieren, Anwendung wählt das minimale Bildintervall") \
         DRI_CONF_DESC_END \
         DRI_CONF_DESC_BEGIN(es,"Sincronización con el refresco vertical (intervalos de intercambio)") \
                 DRI_CONF_ENUM(0,"No sincronizar nunca con el refresco vertical, ignorar la elección de la aplicación") \
@@ -383,13 +383,33 @@ DRI_CONF_OPT_BEGIN_V(texture_units,int,def, # min ":" # max ) \
         DRI_CONF_DESC(fr,"Nombre d'unités de texture") \
 DRI_CONF_OPT_END
 
-#define DRI_CONF_TEXTURE_LEVEL_HACK(def) \
-DRI_CONF_OPT_BEGIN(texture_level_hack,bool,def) \
-        DRI_CONF_DESC(en,"Enable hack to allow larger textures with texture compression on radeon/r200") \
-        DRI_CONF_DESC(de,"Hack aktivieren, der mit Texturkompression auf radeon/r200 größere Texturen erlaubt") \
-        DRI_CONF_DESC(es,"Activar ”hack“ para permitir texturas más grandes con compresión de textura activada en la Radeon/r200") \
-        DRI_CONF_DESC(nl,"Schakel hack in om met textuurcompressie grotere texturen toe te staan op een radeon/r200") \
-        DRI_CONF_DESC(fr,"Activer le hack permettant l'utilisation de textures de grande taille avec la compression de textures sur radeon/r200") \
+#define DRI_CONF_ALLOW_LARGE_TEXTURES(def) \
+DRI_CONF_OPT_BEGIN_V(allow_large_textures,enum,def,"0:2") \
+       DRI_CONF_DESC_BEGIN(en,"Support larger textures not guaranteed to fit into graphics memory") \
+               DRI_CONF_ENUM(0,"No") \
+               DRI_CONF_ENUM(1,"At least 1 texture must fit under worst-case assumptions") \
+               DRI_CONF_ENUM(2,"Announce hardware limits") \
+       DRI_CONF_DESC_END \
+       DRI_CONF_DESC_BEGIN(de,"Unterstütze grosse Texturen die evtl. nicht in den Grafikspeicher passen") \
+               DRI_CONF_ENUM(0,"Nein") \
+               DRI_CONF_ENUM(1,"Mindestens 1 Textur muss auch im schlechtesten Fall Platz haben") \
+               DRI_CONF_ENUM(2,"Benutze Hardware-Limits") \
+       DRI_CONF_DESC_END \
+       DRI_CONF_DESC_BEGIN(es,"Support larger textures not guaranteed to fit into graphics memory") \
+               DRI_CONF_ENUM(0,"No") \
+               DRI_CONF_ENUM(1,"At least 1 texture must fit under worst-case assumptions") \
+               DRI_CONF_ENUM(2,"Announce hardware limits") \
+       DRI_CONF_DESC_END \
+       DRI_CONF_DESC_BEGIN(nl,"Support larger textures not guaranteed to fit into graphics memory") \
+               DRI_CONF_ENUM(0,"No") \
+               DRI_CONF_ENUM(1,"At least 1 texture must fit under worst-case assumptions") \
+               DRI_CONF_ENUM(2,"Announce hardware limits") \
+       DRI_CONF_DESC_END \
+       DRI_CONF_DESC_BEGIN(fr,"Support larger textures not guaranteed to fit into graphics memory") \
+               DRI_CONF_ENUM(0,"No") \
+               DRI_CONF_ENUM(1,"At least 1 texture must fit under worst-case assumptions") \
+               DRI_CONF_ENUM(2,"Announce hardware limits") \
+       DRI_CONF_DESC_END \
 DRI_CONF_OPT_END
 
 #define DRI_CONF_TEXTURE_BLEND_QUALITY(def,range) \
index ab9245ee29cb807668c01a3b8e90c97176fd7485..0330f7560ef516a9301dd35024d2ff0054907c7e 100644 (file)
@@ -191,9 +191,13 @@ DRI_CONF_OPT_BEGIN_V(texture_units,int,def, # min ":" # max ) \
         DRI_CONF_DESC(en,gettext("Number of texture units used")) \
 DRI_CONF_OPT_END
 
-#define DRI_CONF_TEXTURE_LEVEL_HACK(def) \
-DRI_CONF_OPT_BEGIN(texture_level_hack,bool,def) \
-        DRI_CONF_DESC(en,gettext("Enable hack to allow larger textures with texture compression on radeon/r200")) \
+#define DRI_CONF_ALLOW_LARGE_TEXTURES(def) \
+DRI_CONF_OPT_BEGIN_V(allow_large_textures,enum,def,"0:2") \
+       DRI_CONF_DESC_BEGIN(en,gettext("Support larger textures not guaranteed to fit into graphics memory")) \
+               DRI_CONF_ENUM(0,gettext("No")) \
+               DRI_CONF_ENUM(1,gettext("At least 1 texture must fit under worst-case assumptions")) \
+               DRI_CONF_ENUM(2,gettext("Announce hardware limits")) \
+       DRI_CONF_DESC_END \
 DRI_CONF_OPT_END
 
 #define DRI_CONF_TEXTURE_BLEND_QUALITY(def,range) \
index 89546b6ae28dc3e9a251e1b44eb4c4e1065aef32..a622051eddf458fa292c09a588e1ed109dd4a473 100644 (file)
@@ -260,7 +260,8 @@ i810CreateContext( const __GLcontextModes *mesaVis,
                                 0,  /* cube textures unsupported. */
                                 0,  /* texture rectangles unsupported. */
                                 12,
-                                GL_FALSE );
+                                GL_FALSE,
+                                0 );
 
    ctx->Const.MinLineWidth = 1.0;
    ctx->Const.MinLineWidthAA = 1.0;
index 3979f531a8b42e498a2611d4637f6b2be5637686..7a251ac6e891144ebeb6d8054a3ac7446f3c3b8a 100644 (file)
@@ -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) );
index cd0eaf2470f829e63f2c182307d5fe5995cd7a4e..b5c3f58d4581bb782a8aaab94373ed2c4cc4a545 100644 (file)
@@ -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
index fde6d941abca8f34fdcf7a446416d4a96a78e667..66dfe34ec9c273fca4d772e4c08a5a0258b964d0 100644 (file)
@@ -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;
index cd524adc44f817cff07f5ec4c38a58e5a8ba26bd..6450340a48c3fc4bdbea0bb20e83c55dda79dc27 100644 (file)
@@ -540,7 +540,8 @@ mgaCreateContext( const __GLcontextModes *mesaVis,
                                 0,  /* cube textures unsupported. */
                                 11, /* max texture rect size is 2048x2048 */
                                 maxlevels,
-                                GL_FALSE );
+                                GL_FALSE,
+                                0 );
 
    ctx->Const.MinLineWidth = 1.0;
    ctx->Const.MinLineWidthAA = 1.0;
index 73bd3bebd68193a097301cf8edb723d12e3a5a7b..75f618ad37aed0c498c2ef018e5e575d2058b0b4 100644 (file)
@@ -210,7 +210,8 @@ GLboolean r128CreateContext( const __GLcontextModes *glVisual,
                                 0,  /* cube textures unsupported. */
                                 0,  /* texture rectangles unsupported. */
                                 11,
-                                GL_FALSE );
+                                GL_FALSE,
+                                0 );
 
    /* No wide points.
     */
index a3301f3da8ee47d99873e014d883beb7379866dd..bfd8e907a98f1c6b4d641445e1361aeeb8668b90 100644 (file)
@@ -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;
 
index abfe56dd9cfeac6b59c48bacd07bf99ccd587db9..e08358a8e523212892260fb0487091ab32391834 100644 (file)
@@ -327,8 +327,9 @@ radeonCreateContext( const __GLcontextModes *glVisual,
    rmesa->hw.all_dirty = GL_TRUE;
 
    /* 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;
@@ -337,23 +338,20 @@ radeonCreateContext( 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,
                                 4,
                                 11, /* max 2D texture size is 2048x2048 */
-                                0,  /* 3D textures unsupported. */
+                                8,  /* 256^3 */
                                 9,  /* \todo: max cube texture size seems to be 512x512(x6) */
                                 11, /* max rect texture size is 2048x2048. */
                                 12,
-                                GL_FALSE );
+                                GL_FALSE,
+                                i );
 
-   /* 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;
-   }
 
    ctx->Const.MaxTextureMaxAnisotropy = 16.0;
 
index 2c8c66789256f3d94b45eb8827ddbbf826bf4da9..d7c6efd349b25bb5f0702e11da0f66ee83ed9848 100644 (file)
@@ -87,7 +87,7 @@ DRI_CONF_BEGIN
         DRI_CONF_COLOR_REDUCTION(DRI_CONF_COLOR_REDUCTION_DITHER)
         DRI_CONF_ROUND_MODE(DRI_CONF_ROUND_TRUNC)
         DRI_CONF_DITHER_MODE(DRI_CONF_DITHER_XERRORDIFF)
-        DRI_CONF_TEXTURE_LEVEL_HACK(false)
+        DRI_CONF_ALLOW_LARGE_TEXTURES(0)
     DRI_CONF_SECTION_END
     DRI_CONF_SECTION_DEBUG
         DRI_CONF_NO_RAST(false)
@@ -114,7 +114,7 @@ DRI_CONF_BEGIN
         DRI_CONF_COLOR_REDUCTION(DRI_CONF_COLOR_REDUCTION_DITHER)
         DRI_CONF_ROUND_MODE(DRI_CONF_ROUND_TRUNC)
         DRI_CONF_DITHER_MODE(DRI_CONF_DITHER_XERRORDIFF)
-        DRI_CONF_TEXTURE_LEVEL_HACK(false)
+        DRI_CONF_ALLOW_LARGE_TEXTURES(0)
         DRI_CONF_TEXTURE_BLEND_QUALITY(1.0,"0.0:1.0")
     DRI_CONF_SECTION_END
     DRI_CONF_SECTION_DEBUG
index 4f5201491d8bb0273de50a95eea9b300973cafaf..aaba58ed33ee1901b7889cf4df5d9399a334d6e0 100644 (file)
@@ -456,7 +456,8 @@ savageCreateContext( const __GLcontextModes *mesaVis,
                                 0,  /* cube textures unsupported. */
                                 0,  /* texture rectangles unsupported. */
                                 12,
-                                GL_FALSE );
+                                GL_FALSE,
+                                0 );
    if (ctx->Const.MaxTextureLevels <= 6) { /*spec requires at least 64x64*/
        __driUtilMessage("Not enough texture memory. "
                        "Falling back to indirect rendering.");