summaryrefslogtreecommitdiff
path: root/xc/lib
diff options
context:
space:
mode:
Diffstat (limited to 'xc/lib')
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c24
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mgadd.c9
2 files changed, 32 insertions, 1 deletions
diff --git a/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c b/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c
index a0d9cdf73..01aa2670b 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c
+++ b/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c
@@ -311,6 +311,29 @@ GLboolean XMesaCreateContext( Display *dpy, GLvisual *mesaVis,
make_empty_list(&mmesa->TexObjList[i]);
}
+
+ /* Set the maximum texture size small enough that we can guarentee
+ * that both texture units can bind a maximal texture and have them
+ * on the card at once.
+ */
+ {
+ int nr = 2;
+
+ if (mgaScreen->chipset == MGA_CARD_TYPE_G200)
+ nr = 1;
+
+ if (mgaScreen->textureSize[0] < nr*1024*1024) {
+ ctx->Const.MaxTextureLevels = 9;
+ ctx->Const.MaxTextureSize = 1<<8;
+ } else if (mgaScreen->textureSize[0] < nr*4*1024*1024) {
+ ctx->Const.MaxTextureLevels = 10;
+ ctx->Const.MaxTextureSize = 1<<9;
+ } else {
+ ctx->Const.MaxTextureLevels = 11;
+ ctx->Const.MaxTextureSize = 1<<10;
+ }
+ }
+
mmesa->renderindex = -1; /* impossible value */
mmesa->new_state = ~0;
mmesa->dirty = ~0;
@@ -334,6 +357,7 @@ GLboolean XMesaCreateContext( Display *dpy, GLvisual *mesaVis,
ctx->Driver.TriangleCaps = (DD_TRI_CULL|
+/* DD_LIGHTING_CULL| */
DD_TRI_LIGHT_TWOSIDE|
DD_TRI_STIPPLE|
DD_TRI_OFFSET);
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgadd.c b/xc/lib/GL/mesa/src/drv/mga/mgadd.c
index 252e14fd2..ad71274d7 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mgadd.c
+++ b/xc/lib/GL/mesa/src/drv/mga/mgadd.c
@@ -102,7 +102,7 @@ void mgaDDExtensionsInit( GLcontext *ctx )
/* Support multitexture only on the g400.
*/
- if (1 /*!MGA_IS_G400(MGA_CONTEXT(ctx))*/)
+ if (1 || !MGA_IS_G400(MGA_CONTEXT(ctx)))
{
gl_extensions_disable( ctx, "GL_EXT_multitexture" );
gl_extensions_disable( ctx, "GL_SGIS_multitexture" );
@@ -130,6 +130,13 @@ void mgaDDExtensionsInit( GLcontext *ctx )
gl_extensions_disable( ctx, "GL_INGR_blend_func_separate" );
gl_extensions_disable( ctx, "GL_EXT_texture_lod_bias" );
gl_extensions_disable( ctx, "GL_MESA_resize_buffers" );
+
+ gl_extensions_disable( ctx, "GL_SGI_color_matrix" );
+ gl_extensions_disable( ctx, "GL_SGI_color_table" );
+ gl_extensions_disable( ctx, "GL_SGIX_pixel_texture" );
+ gl_extensions_disable( ctx, "GL_ARB_texture_cube_map" );
+ gl_extensions_disable( ctx, "GL_ARB_texture_compression" );
+ gl_extensions_disable( ctx, "GL_EXT_convolution" );
}