i965: Don't flag BRW_NEW_SURFACES unless some push constants are dirty.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 20 Oct 2017 22:38:52 +0000 (15:38 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 31 Oct 2017 03:38:08 +0000 (20:38 -0700)
commit877dd14e88de6ee115617a2a6412e86ba67db443
tree06aa9411a9b1aa0d6e425060f55ddd53c4ce157e
parent28fcf5cd9443ac688692c1f14e31cf4f43fd56d0
i965: Don't flag BRW_NEW_SURFACES unless some push constants are dirty.

Due to a gaffe on my part, we were re-emitting all binding table entries
on every single draw call.  The push_constant_packets atom listens to
BRW_NEW_DRAW_CALL, but skips emitting 3DSTATE_CONSTANT_XS for each stage
unless stage_state->push_constants_dirty is true.  However, it flagged
BRW_NEW_SURFACES unconditionally at the end, by mistake.

Instead, it should only flag it if we actually emit 3DSTATE_CONSTANT_XS
for a stage.  We can move it a few lines up, inside the loop - the early
continues will skip over it if push constants aren't dirty for a stage.

With INTEL_NO_HW=1 set, improves performance of GFXBench5 gl_driver_2
on Apollolake at 1280x720 by 1.01122% +/- 0.470723% (n=35).

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
src/mesa/drivers/dri/i965/genX_state_upload.c