aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen7_wm_state.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-11-15 12:01:18 -0800
committerIan Romanick <[email protected]>2012-01-11 12:51:24 -0800
commitb527dd65c830a2b008816cf390d5be906e29bb23 (patch)
tree7582147e6d7b182608985c0718d0e6a386f55c34 /src/mesa/drivers/dri/i965/gen7_wm_state.c
parentca5b30bf8142d916a40eaaa7091882464a237f1f (diff)
mesa: Track fixed-function fragment shader as a shader
Previously the fixed-function fragment shader was tracked as a gl_program. This means that it shows up in the driver as a Mesa IR program instead of as a GLSL IR program. If a driver doesn't generate Mesa IR from the GLSL IR, that program is empty. If the program is empty there is either no rendering or a GPU hang. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen7_wm_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen7_wm_state.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_wm_state.c b/src/mesa/drivers/dri/i965/gen7_wm_state.c
index 1468fcc1278..32222f922d8 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_state.c
@@ -166,7 +166,9 @@ upload_ps_state(struct brw_context *brw)
dw2 |= (ALIGN(brw->sampler.count, 4) / 4) << GEN7_PS_SAMPLER_COUNT_SHIFT;
/* Use ALT floating point mode for ARB fragment programs, because they
- * require 0^0 == 1.
+ * require 0^0 == 1. Even though _CurrentFragmentProgram is used for
+ * rendering, CurrentFragmentProgram is used for this check to
+ * differentiate between the GLSL and non-GLSL cases.
*/
if (intel->ctx.Shader.CurrentFragmentProgram == NULL)
dw2 |= GEN7_PS_FLOATING_POINT_MODE_ALT;