- context_t *r600 = R700_CONTEXT(ctx);
-
- ctx->Const.MaxTextureImageUnits =
- driQueryOptioni(&r600->radeon.optionCache, "texture_image_units");
- ctx->Const.MaxTextureCoordUnits =
- driQueryOptioni(&r600->radeon.optionCache, "texture_coord_units");
+ context_t *context = R700_CONTEXT(ctx);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
+
+ if( (context->radeon.radeonScreen->chip_family >= CHIP_FAMILY_CEDAR)
+ &&(context->radeon.radeonScreen->chip_family <= CHIP_FAMILY_HEMLOCK) )
+ {
+ r700->bShaderUseMemConstant = GL_TRUE;
+ }
+ else
+ {
+ r700->bShaderUseMemConstant = GL_FALSE;
+ }
+
+ ctx->Const.GLSLVersion = 120;
+
+ ctx->Const.MaxTextureImageUnits = 16;
+ /* 8 per clause on r6xx, 16 on r7xx
+ * but I think mesa only supports 8 at the moment
+ */
+ ctx->Const.MaxTextureCoordUnits = 8;