i965: Use unsynchronized maps for the program cache on LLC platforms.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Aug 2014 21:41:17 +0000 (14:41 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 13 Oct 2014 13:55:08 +0000 (06:55 -0700)
commit02ca66fbc3e2b272afcb9bae66348d3b1900e2c3
tree96613387f81fee43143b87e1da156c0dccf8b751
parent4c766c7959192b455ae752a7759ffc159e0524a6
i965: Use unsynchronized maps for the program cache on LLC platforms.

There's no reason to stall on pwrite - the CPU always appends to the
buffer and never modifies existing contents, and the GPU never writes
it.  Further, the CPU always appends new data before submitting a batch
that requires it.

This code predates the unsynchronized mapping feature, so we simply
didn't have the option when it was written.

Ideally, we would do this for non-LLC platforms too, but unsynchronized
mapping support only exists for LLC systems.

Saves a bunch of stall avoidance copies when uploading shaders.

v2: Rebase on changes to previous patch.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> [v1]
src/mesa/drivers/dri/i965/brw_state_cache.c