aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_clip_line.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-06-07 22:22:41 -0700
committerKenneth Graunke <[email protected]>2014-06-26 11:45:40 -0700
commiteedc5bbc69b051a6456563dda0db1890f8a6cea2 (patch)
treeaf303f52dd4444a434f6f0f3470b8374ddea6473 /src/mesa/drivers/dri/i965/brw_clip_line.c
parent7213e1ddc7ae0fd2dac1bd297c9912841c228589 (diff)
i965: Convert Gen4-5 clipping code to the new brw_inst API.
Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_clip_line.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_line.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_line.c b/src/mesa/drivers/dri/i965/brw_clip_line.c
index 7e218f5c293..90cd07cd4a3 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_line.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_line.c
@@ -158,9 +158,9 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
if (brw->has_negative_rhw_bug) {
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_inst_set_cond_modifier(brw, brw_last_inst, 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;
+ brw_inst_set_pred_control(brw, brw_last_inst, BRW_PREDICATE_NORMAL);
}
/* Set the initial vertex source mask: The first 6 planes are the bounds
@@ -177,12 +177,12 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
/* if (planemask & 1)
*/
brw_AND(p, v1_null_ud, c->reg.planemask, brw_imm_ud(1));
- brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
+ brw_inst_set_cond_modifier(brw, brw_last_inst, BRW_CONDITIONAL_NZ);
brw_IF(p, BRW_EXECUTE_1);
{
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_inst_set_cond_modifier(brw, brw_last_inst, BRW_CONDITIONAL_NZ);
brw_IF(p, BRW_EXECUTE_1);
{
/* user clip distance: just fetch the correct float from each vertex */
@@ -228,7 +228,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_G, c->reg.t, c->reg.t1 );
brw_MOV(p, c->reg.t1, c->reg.t);
- brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
+ brw_inst_set_pred_control(brw, brw_last_inst, BRW_PREDICATE_NORMAL);
}
brw_ELSE(p);
{
@@ -250,7 +250,8 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_G, c->reg.t, c->reg.t0 );
brw_MOV(p, c->reg.t0, c->reg.t);
- brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
+ brw_inst_set_pred_control(brw, brw_last_inst,
+ BRW_PREDICATE_NORMAL);
}
if (brw->has_negative_rhw_bug) {
@@ -268,14 +269,14 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
/* while (planemask>>=1) != 0
*/
brw_SHR(p, c->reg.planemask, c->reg.planemask, brw_imm_ud(1));
- brw_last_inst->header.destreg__conditionalmod = BRW_CONDITIONAL_NZ;
+ brw_inst_set_cond_modifier(brw, brw_last_inst, 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_inst_set_pred_control(brw, brw_last_inst, 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_inst_set_pred_control(brw, brw_last_inst, BRW_PREDICATE_NORMAL);
}
brw_WHILE(p);
- brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
+ brw_inst_set_pred_control(brw, brw_last_inst, 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));