summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorPauli Nieminen <[email protected]>2010-02-07 03:06:27 +0200
committerPauli Nieminen <[email protected]>2010-02-07 13:13:23 +0200
commit0943706d35e3955cacbc3b690cfb1e2dfb78d639 (patch)
tree8428ef4aea41d9013e584976006aea96c4fbacbd /src/mesa/drivers/dri/r300
parent76a9831b2b20d59c49b5f25ba5275f17b4e2067b (diff)
r100/r200/r300/r600: Set MaxCombinedTextureImageunits.
Fixes glActiveTexture to set GL_INVALID_ENUM when trying to activate texture unit that is not available. piglit test case general/texunit passes now.
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index eedb7b6ed86..7c21efb1ded 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -333,6 +333,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);
+ ctx->Const.MaxCombinedTextureImageUnits =
+ ctx->Const.MaxVertexTextureImageUnits +
+ ctx->Const.MaxTextureImageUnits;
+
ctx->Const.MaxTextureMaxAnisotropy = 16.0;
ctx->Const.MaxTextureLodBias = 16.0;