diff options
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index cb82fb042ef..44fcfa9cad6 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -279,9 +279,14 @@ brw_initialize_context_constants(struct brw_context *brw) MIN2(ctx->Const.MaxTextureCoordUnits, ctx->Const.FragmentProgram.MaxTextureImageUnits); ctx->Const.VertexProgram.MaxTextureImageUnits = BRW_MAX_TEX_UNIT; + if (brw->gen >= 7) + ctx->Const.GeometryProgram.MaxTextureImageUnits = BRW_MAX_TEX_UNIT; + else + ctx->Const.GeometryProgram.MaxTextureImageUnits = 0; ctx->Const.MaxCombinedTextureImageUnits = ctx->Const.VertexProgram.MaxTextureImageUnits + - ctx->Const.FragmentProgram.MaxTextureImageUnits; + ctx->Const.FragmentProgram.MaxTextureImageUnits + + ctx->Const.GeometryProgram.MaxTextureImageUnits; ctx->Const.MaxTextureLevels = 14; /* 8192 */ if (ctx->Const.MaxTextureLevels > MAX_TEXTURE_LEVELS) |