summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-12-24 15:11:54 -0800
committerCarl Worth <[email protected]>2014-01-09 12:24:44 -0800
commit3a6271890cd40c1e37870802f9f3231b3170d27f (patch)
tree57555cc10412d94a8e2b0d1260880e79c2454a8a /src/mesa/drivers/dri
parent9b3ed4c8c2e985506628ff9e6be2431b4b01393f (diff)
i965: Don't do the temporary-and-blit-copy for INVALIDATE_RANGE maps.
We definitely want to fall through to the unsynchronized map case, instead of wasting bandwidth on a copy. Prevents a -43.2407% +/- 1.06113% (n=49) performance regression on aa10perf when teaching glamor to provide the GL_INVALIDATE_RANGE_BIT information. This is a performance fix, which I usually wouldn't cherry-pick to stable. But this was really was just a bug in the code, its presence would discourage developers from giving us the best information they can, and I think we've got fairly high confidence in the unsynchronized map path already. Cc: 10.0 9.2 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit f46563fe1c8a5560e4de0adf03e3d8770b7fc734)
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/intel_buffer_objects.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
index 779198f9e51..a87ebf7c593 100644
--- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
@@ -357,7 +357,8 @@ intel_bufferobj_map_range(struct gl_context * ctx,
* BO, and we'll copy what they put in there out at unmap or
* FlushRange time.
*/
- if ((access & GL_MAP_INVALIDATE_RANGE_BIT) &&
+ if (!(access & GL_MAP_UNSYNCHRONIZED_BIT) &&
+ (access & GL_MAP_INVALIDATE_RANGE_BIT) &&
drm_intel_bo_busy(intel_obj->buffer)) {
if (access & GL_MAP_FLUSH_EXPLICIT_BIT) {
intel_obj->range_map_buffer = malloc(length);