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 15:16:12 -0700
committerKenneth Graunke <kenneth@whitecape.org>2014-06-02 15:09:29 -0700
commitff340ce3c3326959027d7cb9a611c6fab1d89941 (patch)
tree8e9deea67bd14d9acf103ee23944d4fe55255a9a /src/mesa/drivers/dri/i965/brw_clip_line.c
parent0985da542366cb6be8dc287db4a74c828a7e8fa4 (diff)
downloadexternal_mesa3d-ff340ce3c3326959027d7cb9a611c6fab1d89941.zip
external_mesa3d-ff340ce3c3326959027d7cb9a611c6fab1d89941.tar.gz
external_mesa3d-ff340ce3c3326959027d7cb9a611c6fab1d89941.tar.bz2
i965: Stop setting predication from brw_set_conditionalmod.
brw_set_conditionalmod has traditionally been complex: it causes conditionalmod to be set for the next instruction, and then predication to be set on all future instructions after that. We may want to generate a flag condition and not use it immediately, due to instruction scheduling or the like. Even if not, it's easy to set things explicitly, and that's clearer. 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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_line.c b/src/mesa/drivers/dri/i965/brw_clip_line.c
index 42289e7..cc5fc38 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_line.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_line.c
@@ -160,10 +160,9 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2),
brw_imm_ud(1<<20));
brw_OR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud(0x3f));
+ brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
}
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
-
/* Set the initial vertex source mask: The first 6 planes are the bounds
* of the view volume; the next 8 planes are the user clipping planes.
*/
@@ -271,9 +270,12 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_SHR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud(1));
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)));
+ brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
}
brw_WHILE(p);
+ brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
brw_ADD(p, c->reg.t, c->reg.t0, c->reg.t1);
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_L, c->reg.t, brw_imm_f(1.0));