summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_resource.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-09-07 22:51:15 -0700
committerKenneth Graunke <[email protected]>2019-09-09 15:08:22 -0700
commit410894c643274975aab781e9c412f7a339a7547b (patch)
treec063e14bf5dbaf1d9cd4e999adfaecf6721a7467 /src/gallium/drivers/iris/iris_resource.h
parent7d28e9ddd62eeccf6c528beee6b1a58fdfb7f5a0 (diff)
iris: Avoid flushing for cache history on transfer range flushes
The VBO module maps a buffer with GL_MAP_FLUSH_EXPLICIT, and keeps appending data, and calling glFlushMappedBufferRange(). We were invalidating the VF cache each time it flushed a new range, which results in a ton of VF flushes. If the contents of the destination in the target range are undefined (never even possibly written), this patch makes us assume that it's likely not in the cache and so cache invalidations are required. If the destination range is defined, we continue cache flushing as we may need to expunge stale data. This eliminates 88% of the VF cache invalidates on Manhattan 3.0. Improves performance in Manhattan 3.0 on my Icelake 8x8 with the GPU frequency locked to 700Mhz by 0.376724% +/- 0.0989183% (n=10).
Diffstat (limited to 'src/gallium/drivers/iris/iris_resource.h')
-rw-r--r--src/gallium/drivers/iris/iris_resource.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.h b/src/gallium/drivers/iris/iris_resource.h
index 304339eb470..5e3356e5055 100644
--- a/src/gallium/drivers/iris/iris_resource.h
+++ b/src/gallium/drivers/iris/iris_resource.h
@@ -232,6 +232,8 @@ struct iris_transfer {
struct blorp_context *blorp;
struct iris_batch *batch;
+ bool dest_had_defined_contents;
+
void (*unmap)(struct iris_transfer *);
};