diff options
author | Kenneth Graunke <[email protected]> | 2011-04-30 01:30:55 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-05-17 23:33:02 -0700 |
commit | 6e918163dfbdc829f31a0aefc07248c49b890d1d (patch) | |
tree | 1fab53bd8226d346dbda7a35f5c3596d2fd42d4f /src | |
parent | 77397ef96edbc17a698ae2a02ec4807b1059c036 (diff) |
i965: Make the CONT instruction point to the WHILE instruction.
This fixes piglit test glsl-fs-loop-continue.shader_test on Ivybridge.
According to the documentation, the CONT instruction's UIP field should
point to the WHILE instruction on both Sandybridge and Ivybridge.
The previous code made UIP point to the implicit DO instruction, which
seems incorrect. I'm not sure how it could have worked on Sandybridge.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_emit.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 6cfa8fb052c..a00caba822a 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -1244,8 +1244,6 @@ struct brw_instruction *gen6_CONT(struct brw_compile *p, brw_set_src0(p, insn, brw_ip_reg()); brw_set_src1(p, insn, brw_imm_d(0x0)); - insn->bits3.break_cont.uip = br * (do_insn - insn); - insn->header.compression_control = BRW_COMPRESSION_NONE; insn->header.execution_size = BRW_EXECUTE_8; return insn; @@ -2329,10 +2327,9 @@ brw_set_uip_jip(struct brw_compile *p) br * (brw_find_loop_end(p, ip) - ip + (intel->gen == 6 ? 1 : 0)); break; case BRW_OPCODE_CONTINUE: - /* JIP is set at CONTINUE emit time, since that's when we - * know where the start of the loop is. - */ insn->bits3.break_cont.jip = br * (brw_find_next_block_end(p, ip) - ip); + insn->bits3.break_cont.uip = br * (brw_find_loop_end(p, ip) - ip); + assert(insn->bits3.break_cont.uip != 0); assert(insn->bits3.break_cont.jip != 0); break; |