summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-04-08 13:48:34 -0600
committerBrian Paul <[email protected]>2009-04-08 19:37:33 -0600
commited9ba19bbbcdbf864b39da21c314073c1b5462db (patch)
tree0d76279b6283493bba1beab82f1b0e48fcd6731a /src
parentf4468384b6caf2aa5cfc7546c08f349af93d928e (diff)
i965: move the fetch_constants() call before setting conditional mod state
Before, the instruction's CondUpdate field was mistakenly effecting the constant-fetch operation. Fixes progs/glsl/bump.c demo. But there are some other issues related to condition flags and IF/ELSE that need investigation...
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_glsl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
index 575cd45d572..3d360d58d53 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
@@ -2620,6 +2620,10 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
for (i = 0; i < c->nr_fp_insns; i++) {
struct prog_instruction *inst = &c->prog_instructions[i];
+ /* fetch any constants that this instruction needs */
+ if (c->use_const_buffer)
+ fetch_constants(c, inst);
+
if (inst->CondUpdate)
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
else
@@ -2630,10 +2634,6 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
_mesa_print_instruction(inst);
*/
- /* fetch any constants that this instruction needs */
- if (c->use_const_buffer)
- fetch_constants(c, inst);
-
switch (inst->Opcode) {
case WM_PIXELXY:
emit_pixel_xy(c, inst);