summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_resource.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-09-10 11:14:57 -0700
committerKenneth Graunke <[email protected]>2019-09-18 15:44:22 -0700
commitdd83ef0d1a14b144c562129b5572f9ebdbe56042 (patch)
tree6a1c6df6676d2cd4ebae6570304020a025838bc5 /src/gallium/drivers/iris/iris_resource.c
parent1e7daaa6c9a1bcf5f1ae7d85519e61f78cf91518 (diff)
iris: Track per-stage bind history, reduce work accordingly
We now track per-stage bind history for constant and shader buffers, shader images, and sampler views by adding an extra res->bind_stages field to go with res->bind_history. This lets us flag IRIS_DIRTY_CONSTANTS for only the specific stages involved, and also skip some CPU overhead in iris_rebind_buffer. Cuts 4% of 3DSTATE_CONSTANT_XS packets in a Shadow of Mordor trace on Icelake. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/gallium/drivers/iris/iris_resource.c')
-rw-r--r--src/gallium/drivers/iris/iris_resource.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 4de7b2090a8..7394825f637 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -1894,12 +1894,7 @@ iris_dirty_for_history(struct iris_context *ice,
uint64_t dirty = 0ull;
if (res->bind_history & PIPE_BIND_CONSTANT_BUFFER) {
- dirty |= IRIS_DIRTY_CONSTANTS_VS |
- IRIS_DIRTY_CONSTANTS_TCS |
- IRIS_DIRTY_CONSTANTS_TES |
- IRIS_DIRTY_CONSTANTS_GS |
- IRIS_DIRTY_CONSTANTS_FS |
- IRIS_DIRTY_CONSTANTS_CS;
+ dirty |= ((uint64_t)res->bind_stages) << IRIS_SHIFT_FOR_DIRTY_CONSTANTS;
}
ice->state.dirty |= dirty;