diff options
author | Kenneth Graunke <[email protected]> | 2014-08-04 14:26:26 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-08-08 00:51:44 -0700 |
commit | e64dbd050d6d5b4ea502ee2fc727e12135833771 (patch) | |
tree | c8d5e9d09eab2c4ba482d2f673830796215ea18a /src/mesa | |
parent | e7a7b3317c5992d230cf55752ef0b6bc25928ff9 (diff) |
i965/eu: Merge brw_CONT and gen6_CONT.
The only difference is setting PopCount on Gen4-5.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_emit.c | 22 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 6 |
4 files changed, 7 insertions, 28 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h index 63cb20b1a55..7efc02816c9 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.h +++ b/src/mesa/drivers/dri/i965/brw_eu.h @@ -334,7 +334,6 @@ brw_inst *brw_WHILE(struct brw_compile *p); brw_inst *brw_BREAK(struct brw_compile *p); brw_inst *brw_CONT(struct brw_compile *p); -brw_inst *gen6_CONT(struct brw_compile *p); brw_inst *gen6_HALT(struct brw_compile *p); /* Forward jumps: diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 845bcd48474..3be4449b4e0 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -1532,7 +1532,7 @@ brw_BREAK(struct brw_compile *p) } brw_inst * -gen6_CONT(struct brw_compile *p) +brw_CONT(struct brw_compile *p) { const struct brw_context *brw = p->brw; brw_inst *insn; @@ -1542,25 +1542,13 @@ gen6_CONT(struct brw_compile *p) brw_set_src0(p, insn, brw_ip_reg()); brw_set_src1(p, insn, brw_imm_d(0x0)); - brw_inst_set_qtr_control(brw, insn, BRW_COMPRESSION_NONE); - brw_inst_set_exec_size(brw, insn, BRW_EXECUTE_8); - return insn; -} + if (brw->gen < 6) { + brw_inst_set_gen4_pop_count(brw, insn, + p->if_depth_in_loop[p->loop_stack_depth]); + } -brw_inst * -brw_CONT(struct brw_compile *p) -{ - const struct brw_context *brw = p->brw; - brw_inst *insn; - insn = next_insn(p, BRW_OPCODE_CONTINUE); - brw_set_dest(p, insn, brw_ip_reg()); - brw_set_src0(p, insn, brw_ip_reg()); - brw_set_src1(p, insn, brw_imm_d(0x0)); brw_inst_set_qtr_control(brw, insn, BRW_COMPRESSION_NONE); brw_inst_set_exec_size(brw, insn, BRW_EXECUTE_8); - /* insn->header.mask_control = BRW_MASK_DISABLE; */ - brw_inst_set_gen4_pop_count(brw, insn, - p->if_depth_in_loop[p->loop_stack_depth]); return insn; } diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 8a7fa92738d..ac2f1b44f2c 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -1582,11 +1582,7 @@ fs_generator::generate_code(exec_list *instructions) brw_set_default_predicate_control(p, BRW_PREDICATE_NONE); break; case BRW_OPCODE_CONTINUE: - /* FINISHME: We need to write the loop instruction support still. */ - if (brw->gen >= 6) - gen6_CONT(p); - else - brw_CONT(p); + brw_CONT(p); brw_set_default_predicate_control(p, BRW_PREDICATE_NONE); break; diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp index c328f349bc9..2129007f988 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp @@ -1085,11 +1085,7 @@ vec4_generator::generate_vec4_instruction(vec4_instruction *instruction, brw_set_default_predicate_control(p, BRW_PREDICATE_NONE); break; case BRW_OPCODE_CONTINUE: - /* FINISHME: We need to write the loop instruction support still. */ - if (brw->gen >= 6) - gen6_CONT(p); - else - brw_CONT(p); + brw_CONT(p); brw_set_default_predicate_control(p, BRW_PREDICATE_NONE); break; |