summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_clip_line.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2014-05-30 17:29:55 -0700
committerKenneth Graunke <kenneth@whitecape.org>2014-06-02 15:09:33 -0700
commitfea7b9774215becbaaa58ac825b189460801fac1 (patch)
treed4a46d74002465a9ff1948181ccbb29b5298e26e /src/mesa/drivers/dri/i965/brw_clip_line.c
parent776ad51165b1f7ee18a9a4cccbed1ce3b2c4fcf9 (diff)
downloadexternal_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_line.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_line.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_line.c b/src/mesa/drivers/dri/i965/brw_clip_line.c
index cc5fc38..7e218f5 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_line.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_line.c
@@ -156,9 +156,9 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
/* -ve rhw workaround */
if (brw->has_negative_rhw_bug) {
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2),
brw_imm_ud(1<<20));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud(0x3f));
brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
}
@@ -176,13 +176,13 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
{
/* if (planemask & 1)
*/
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, v1_null_ud, c->reg.planemask, brw_imm_ud(1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_IF(p, BRW_EXECUTE_1);
{
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, v1_null_ud, c->reg.vertex_src_mask, brw_imm_ud(1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_IF(p, BRW_EXECUTE_1);
{
/* user clip distance: just fetch the correct float from each vertex */
@@ -267,8 +267,8 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
/* while (planemask>>=1) != 0
*/
- brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_SHR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud(1));
+ brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
brw_SHR(p, c->reg.vertex_src_mask, c->reg.vertex_src_mask, brw_imm_ud(1));
brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
brw_ADD(p, c->reg.clipdistance_offset, c->reg.clipdistance_offset, brw_imm_w(sizeof(float)));