i965: Fix gl_MaxCombinedTextureImageUnits.
authorPaul Berry <stereotype441@gmail.com>
Wed, 23 Oct 2013 20:36:25 +0000 (13:36 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 25 Oct 2013 04:14:26 +0000 (21:14 -0700)
commitfe36154ff3b2c095cf21462dd7ed6b5ae374fccc
tree9ba92a06cf9bc3f5c5cfea6e3f8ece576c48a52f
parenta453242fda0a57012a790e67053545211c0486ed
i965: Fix gl_MaxCombinedTextureImageUnits.

We've always overriden
ctx->Const.{Vertex,Fragment}Program.MaxTextureImageUnits to reflect
the number of texture image units supported by the hardware (rather
than using the default values assigned by Mesa core) so it seems
sensible to do that for GeometryProgram.MaxTextureImageUnits too.  We
set it to 0 if geometry shaders aren't supported.

Once that is done, we can just unconditionally add
GeometryProgram.MaxTextureImageUnits to MaxCombinedTextureImageUnits.

Fixes piglit test "spec/glsl-1.50/built-in
constants/gl_MaxCombinedTextureImageUnits".

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_context.c