summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-08-07 14:20:56 -0700
committerEric Anholt <eric@anholt.net>2009-08-07 18:33:08 -0700
commit9f981ec27dffa562cf743b4690293569477b4553 (patch)
tree724104018cc0c34794447fa37e8043869e26d4bf /src/mesa/drivers
parent7de5e60c18898715765d610313f9d33b1d1e89fb (diff)
i965: Replace the subroutine-skipping jump in VS with a NOP if it's a NOP.
This showed a 1.9% (+/-.3%, n=3) improvement in OA performance with high geometry settings.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_emit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c
index f56e9862e4..83167b9258 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c
@@ -1262,7 +1262,11 @@ post_vs_emit( struct brw_vs_compile *c,
/* patch up the END code to jump past subroutines, etc */
offset = last_inst - end_inst;
- brw_set_src1(end_inst, brw_imm_d(offset * 16));
+ if (offset > 1) {
+ brw_set_src1(end_inst, brw_imm_d(offset * 16));
+ } else {
+ end_inst->header.opcode = BRW_OPCODE_NOP;
+ }
}
static uint32_t