diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2014-05-30 17:29:55 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2014-06-02 15:09:33 -0700 |
commit | fea7b9774215becbaaa58ac825b189460801fac1 (patch) | |
tree | d4a46d74002465a9ff1948181ccbb29b5298e26e /src/mesa/drivers/dri/i965/brw_clip_unfilled.c | |
parent | 776ad51165b1f7ee18a9a4cccbed1ce3b2c4fcf9 (diff) | |
download | external_mesa3d-fea7b9774215becbaaa58ac825b189460801fac1.zip external_mesa3d-fea7b9774215becbaaa58ac825b189460801fac1.tar.gz external_mesa3d-fea7b9774215becbaaa58ac825b189460801fac1.tar.bz2 |
i965: Eliminate brw_set_conditionalmod from the Gen4-5 compilers.
With the predication changes eliminated, all this does is set the
conditional modifier on a single instruction. Doing that directly is
easy, and avoids mucking about with default state.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_clip_unfilled.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_clip_unfilled.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_unfilled.c b/src/mesa/drivers/dri/i965/brw_clip_unfilled.c index d8deaa4..302fdc4 100644 --- a/src/mesa/drivers/dri/i965/brw_clip_unfilled.c +++ b/src/mesa/drivers/dri/i965/brw_clip_unfilled.c @@ -231,16 +231,16 @@ static void merge_edgeflags( struct brw_clip_compile *c ) */ brw_IF(p, BRW_EXECUTE_1); { - brw_set_conditionalmod(p, BRW_CONDITIONAL_EQ); brw_AND(p, vec1(brw_null_reg()), get_element_ud(c->reg.R0, 2), brw_imm_ud(1<<8)); + brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_EQ; brw_MOV(p, byte_offset(c->reg.vertex[0], brw_varying_to_offset(&c->vue_map, VARYING_SLOT_EDGE)), brw_imm_f(0)); brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL; - brw_set_conditionalmod(p, BRW_CONDITIONAL_EQ); brw_AND(p, vec1(brw_null_reg()), get_element_ud(c->reg.R0, 2), brw_imm_ud(1<<9)); + brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_EQ; brw_MOV(p, byte_offset(c->reg.vertex[2], brw_varying_to_offset(&c->vue_map, VARYING_SLOT_EDGE)), @@ -291,8 +291,8 @@ static void emit_lines(struct brw_clip_compile *c, apply_one_offset(c, v0); - brw_set_conditionalmod(p, BRW_CONDITIONAL_G); brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1)); + brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_G; } brw_WHILE(p); brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL; @@ -330,8 +330,8 @@ static void emit_lines(struct brw_clip_compile *c, } brw_ENDIF(p); - brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ); brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1)); + brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ; } brw_WHILE(p); brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL; @@ -373,8 +373,8 @@ static void emit_points(struct brw_clip_compile *c, } brw_ENDIF(p); - brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ); brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1)); + brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ; } brw_WHILE(p); brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL; |