i965: Don't set NirOptions for stages that will use the vec4 backend.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 10 Apr 2015 06:26:49 +0000 (23:26 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 10 Apr 2015 23:22:48 +0000 (16:22 -0700)
commitc2a0600d5b0645533ba442b5ab879b23c2564a4d
tree1a3cb3ffa016a1e453b5b5c7b6f93ad4050f1e96
parentf9048ee3c85ddaff0c44851b2523aaa2a554e059
i965: Don't set NirOptions for stages that will use the vec4 backend.

We've started using NirOptions != NULL to mean "we're using NIR for this
stage."  However, when INTEL_USE_NIR=1, we set it for a bunch of stages
that still use the vec4 backend, and thus definitely aren't using NIR.

For example, if INTEL_USE_NIR=1 we disable the GLSL IR cubemap
normalization pass, even for vertex shaders and geometry shaders.  This
is wrong, but breaks a very uncommon case.

When I started deleting GLSL IR for stages where we claimed to be using
NIR, this bug quickly became apparent.

For now, only set it for fragment shaders, and vertex shaders if
brw->scalar_vs is set.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_context.c