iris: make iris_bind_reserve_3d and Wa_1604061319 only check for dirty render bindings

+    9.31%  drawover:gdrv0  iris_dri.so      [.] iris_binder_reserve_3d

+    2.36%  drawover:gdrv0  iris_dri.so         [.] iris_binder_reserve_3d

If the app never uses compute, then the compute bindings bit will always
be dirty causing these two paths never get shortcuts.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11699>
This commit is contained in:
Dave Airlie 2021-07-03 10:04:47 +10:00 committed by Kenneth Graunke
parent c246af0dd8
commit 4504fabed6
3 changed files with 9 additions and 7 deletions

View file

@ -144,7 +144,7 @@ iris_binder_reserve_3d(struct iris_context *ice)
/* If nothing is dirty, skip all this. */
if (!(ice->state.dirty & IRIS_DIRTY_RENDER_BUFFER) &&
!(ice->state.stage_dirty & IRIS_ALL_STAGE_DIRTY_BINDINGS))
!(ice->state.stage_dirty & IRIS_ALL_STAGE_DIRTY_BINDINGS_FOR_RENDER))
return;
/* Get the binding table sizes for each stage */

View file

@ -165,11 +165,13 @@ enum {
#define IRIS_ALL_STAGE_DIRTY_FOR_RENDER (~IRIS_ALL_STAGE_DIRTY_FOR_COMPUTE)
#define IRIS_ALL_STAGE_DIRTY_BINDINGS (IRIS_STAGE_DIRTY_BINDINGS_VS | \
IRIS_STAGE_DIRTY_BINDINGS_TCS | \
IRIS_STAGE_DIRTY_BINDINGS_TES | \
IRIS_STAGE_DIRTY_BINDINGS_GS | \
IRIS_STAGE_DIRTY_BINDINGS_FS | \
#define IRIS_ALL_STAGE_DIRTY_BINDINGS_FOR_RENDER (IRIS_STAGE_DIRTY_BINDINGS_VS | \
IRIS_STAGE_DIRTY_BINDINGS_TCS | \
IRIS_STAGE_DIRTY_BINDINGS_TES | \
IRIS_STAGE_DIRTY_BINDINGS_GS | \
IRIS_STAGE_DIRTY_BINDINGS_FS)
#define IRIS_ALL_STAGE_DIRTY_BINDINGS (IRIS_ALL_STAGE_DIRTY_BINDINGS_FOR_RENDER | \
IRIS_STAGE_DIRTY_BINDINGS_CS)
/**

View file

@ -5763,7 +5763,7 @@ iris_upload_dirty_render_state(struct iris_context *ice,
*/
const bool emit_const_wa = GFX_VER >= 11 &&
((dirty & IRIS_DIRTY_RENDER_BUFFER) ||
(stage_dirty & IRIS_ALL_STAGE_DIRTY_BINDINGS));
(stage_dirty & IRIS_ALL_STAGE_DIRTY_BINDINGS_FOR_RENDER));
#if GFX_VER >= 12
uint32_t nobuffer_stages = 0;