[Mesa-dev] [PATCH 14/14] i965: Advertise our vertex shader texture units on Gen6+.
Kenneth Graunke
kenneth at whitecape.org
Thu Dec 8 17:08:05 PST 2011
Previously, we advertised 0 VS texture units. Now that we have proper
support for using the sampling engine in the VS, we can advertise 16,
which is conveniently the number required for OpenGL 3.0.
While all the support is in place for Gen4+, it's received essentially
no testing on Gen4-5. So for now, only enable it on Gen6+.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_context.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index faa02bf..f024eaf 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -159,7 +159,8 @@ brwCreateContext(int api,
ctx->Const.MaxTextureCoordUnits = 8; /* Mesa limit */
ctx->Const.MaxTextureUnits = MIN2(ctx->Const.MaxTextureCoordUnits,
ctx->Const.MaxTextureImageUnits);
- ctx->Const.MaxVertexTextureImageUnits = 0; /* no vertex shader textures */
+ ctx->Const.MaxVertexTextureImageUnits = intel->gen >= 6 ? BRW_MAX_TEX_UNIT
+ : 0;
ctx->Const.MaxCombinedTextureImageUnits =
ctx->Const.MaxVertexTextureImageUnits +
ctx->Const.MaxTextureImageUnits;
--
1.7.7.3
More information about the mesa-dev
mailing list