summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_clip_line.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2014-05-27 23:50:23 -0700
committerKenneth Graunke <kenneth@whitecape.org>2014-06-02 15:09:25 -0700
commit0bfac24caf89a163d8149e69b9eaa7ae5c71d550 (patch)
tree6e2dae75724c475eab317d3d1c4624ceb25f91b9 /src/mesa/drivers/dri/i965/brw_clip_line.c
parent42c292006c94b0b84645448af958fdb6235acbfb (diff)
downloadexternal_mesa3d-0bfac24caf89a163d8149e69b9eaa7ae5c71d550.zip
external_mesa3d-0bfac24caf89a163d8149e69b9eaa7ae5c71d550.tar.gz
external_mesa3d-0bfac24caf89a163d8149e69b9eaa7ae5c71d550.tar.bz2
i965/clip: Use the new brw_last_inst macro instead of temporaries.
It wasn't too bad before, but the macro is going to be nicer once I start modifying a lot more instructions in this pattern. 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.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_line.c b/src/mesa/drivers/dri/i965/brw_clip_line.c
index a8c2cac..42289e7 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_line.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_line.c
@@ -130,7 +130,6 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
{
struct brw_compile *p = &c->func;
struct brw_context *brw = p->brw;
- struct brw_instruction *inst;
struct brw_indirect vtx0 = brw_indirect(0, 0);
struct brw_indirect vtx1 = brw_indirect(1, 0);
struct brw_indirect newvtx0 = brw_indirect(2, 0);
@@ -229,8 +228,8 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_MUL(p, c->reg.t, c->reg.t, c->reg.dp1);
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_G, c->reg.t, c->reg.t1 );
- inst = brw_MOV(p, c->reg.t1, c->reg.t);
- inst->header.predicate_control = BRW_PREDICATE_NORMAL;
+ brw_MOV(p, c->reg.t1, c->reg.t);
+ brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
}
brw_ELSE(p);
{
@@ -251,8 +250,8 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_MUL(p, c->reg.t, c->reg.t, c->reg.dp0);
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_G, c->reg.t, c->reg.t0 );
- inst = brw_MOV(p, c->reg.t0, c->reg.t);
- inst->header.predicate_control = BRW_PREDICATE_NORMAL;
+ brw_MOV(p, c->reg.t0, c->reg.t);
+ brw_last_inst->header.predicate_control = BRW_PREDICATE_NORMAL;
}
if (brw->has_negative_rhw_bug) {