i965: Advertise our vertex shader texture units.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 28 Oct 2011 04:57:48 +0000 (21:57 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 20 Dec 2011 00:33:11 +0000 (16:33 -0800)
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.

v2: Enable on Gen4.  I hacked up my tests to not use flat ivec varyings
    and they pass.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_context.c

index faa02bf8a380d2f7f3d5adeb28cf0d0e1eba91b4..5e9cb1f8b2fe208a9d8cdc18a4ba844288b2163b 100644 (file)
@@ -159,7 +159,7 @@ 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 = BRW_MAX_TEX_UNIT;
    ctx->Const.MaxCombinedTextureImageUnits =
       ctx->Const.MaxVertexTextureImageUnits +
       ctx->Const.MaxTextureImageUnits;