diff options
author | Eric Anholt <[email protected]> | 2009-12-22 17:30:13 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2009-12-26 11:18:02 -0800 |
commit | c4ac1f8299ddc3b60f7f32c58c0310deacac22c6 (patch) | |
tree | 173be01af317590ef0fcbc69e0fd1b21d5452f11 /src/mesa/drivers/dri | |
parent | c196a3592a73bfe11db5100a9ba1aff07fb8a60e (diff) |
i965: Extra asserts on flow control instructions to clarify for clang.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_glsl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c index 43646528f5f..eccbfd5fa3a 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c +++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c @@ -2040,6 +2040,7 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c) if_inst[if_depth++] = brw_IF(p, BRW_EXECUTE_8); break; case OPCODE_ELSE: + assert(if_depth > 0); if_inst[if_depth-1] = brw_ELSE(p, if_inst[if_depth-1]); break; case OPCODE_ENDIF: @@ -2095,7 +2096,8 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c) if (intel->is_ironlake) br = 2; - + + assert(loop_depth > 0); loop_depth--; inst0 = inst1 = brw_WHILE(p, loop_inst[loop_depth]); /* patch all the BREAK/CONT instructions from last BGNLOOP */ |