summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-09-27 21:25:55 -0700
committerEric Anholt <[email protected]>2010-09-28 09:33:30 -0700
commite10508812aed4c41c62ea27ac540c8d079bece07 (patch)
treed8b5f98692d9ee888e0cc5837be198e3c61f761d /src/mesa/drivers
parentfceb78e3cc67d035a69613826f46a18e62235f5c (diff)
i965: Actually track the "if" depth in loop in the new FS backend.
Fixes: glsl-fs-if-nested-loop.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index d05aa29014f..c324be210a0 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1789,6 +1789,7 @@ fs_visitor::generate_code()
case BRW_OPCODE_IF:
assert(if_stack_depth < 16);
if_stack[if_stack_depth] = brw_IF(p, BRW_EXECUTE_8);
+ if_depth_in_loop[loop_stack_depth]++;
if_stack_depth++;
break;
case BRW_OPCODE_ELSE:
@@ -1798,6 +1799,7 @@ fs_visitor::generate_code()
case BRW_OPCODE_ENDIF:
if_stack_depth--;
brw_ENDIF(p , if_stack[if_stack_depth]);
+ if_depth_in_loop[loop_stack_depth]--;
break;
case BRW_OPCODE_DO: