i965: Pass start_offset to brw_set_uip_jip().
Without this, we would pass over the instructions in the SIMD8 program (which is located earlier in the buffer) when brw_set_uip_jip() is called to handle the SIMD16 program. The assertion about compacted control flow was bogus: halt, cont, break cannot be compacted because they have both JIP and UIP. Instead, we should never see a compacted instruction in this code at all. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
@@ -526,7 +526,7 @@ void brw_math_invert( struct brw_codegen *p,
|
||||
|
||||
void brw_set_src1(struct brw_codegen *p, brw_inst *insn, struct brw_reg reg);
|
||||
|
||||
void brw_set_uip_jip(struct brw_codegen *p);
|
||||
void brw_set_uip_jip(struct brw_codegen *p, int start_offset);
|
||||
|
||||
enum brw_conditional_mod brw_negate_cmod(uint32_t cmod);
|
||||
enum brw_conditional_mod brw_swap_cmod(uint32_t cmod);
|
||||
|
@@ -2775,7 +2775,7 @@ brw_find_loop_end(struct brw_codegen *p, int start_offset)
|
||||
* BREAK, CONT, and HALT instructions to their correct locations.
|
||||
*/
|
||||
void
|
||||
brw_set_uip_jip(struct brw_codegen *p)
|
||||
brw_set_uip_jip(struct brw_codegen *p, int start_offset)
|
||||
{
|
||||
const struct brw_device_info *devinfo = p->devinfo;
|
||||
int offset;
|
||||
@@ -2786,17 +2786,9 @@ brw_set_uip_jip(struct brw_codegen *p)
|
||||
if (devinfo->gen < 6)
|
||||
return;
|
||||
|
||||
for (offset = 0; offset < p->next_insn_offset;
|
||||
offset = next_offset(devinfo, store, offset)) {
|
||||
for (offset = start_offset; offset < p->next_insn_offset; offset += 16) {
|
||||
brw_inst *insn = store + offset;
|
||||
|
||||
if (brw_inst_cmpt_control(devinfo, insn)) {
|
||||
/* Fixups for compacted BREAK/CONTINUE not supported yet. */
|
||||
assert(brw_inst_opcode(devinfo, insn) != BRW_OPCODE_BREAK &&
|
||||
brw_inst_opcode(devinfo, insn) != BRW_OPCODE_CONTINUE &&
|
||||
brw_inst_opcode(devinfo, insn) != BRW_OPCODE_HALT);
|
||||
continue;
|
||||
}
|
||||
assert(brw_inst_cmpt_control(devinfo, insn) == 0);
|
||||
|
||||
int block_end_offset = brw_find_next_block_end(p, offset);
|
||||
switch (brw_inst_opcode(devinfo, insn)) {
|
||||
|
@@ -2127,7 +2127,7 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
|
||||
}
|
||||
}
|
||||
|
||||
brw_set_uip_jip(p);
|
||||
brw_set_uip_jip(p, start_offset);
|
||||
annotation_finalize(&annotation, p->next_insn_offset);
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
@@ -2024,7 +2024,7 @@ generate_code(struct brw_codegen *p,
|
||||
}
|
||||
}
|
||||
|
||||
brw_set_uip_jip(p);
|
||||
brw_set_uip_jip(p, 0);
|
||||
annotation_finalize(&annotation, p->next_insn_offset);
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
Reference in New Issue
Block a user