diff options
author | Marcin Ślusarz <marcin.slusarz@intel.com> | 2021-03-25 17:29:11 +0100 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-03-30 07:32:16 +0000 |
commit | 1df3a00dcd5c4c86527e1bdc5c800cc09457d1a5 (patch) | |
tree | 85b6648e5962640e6b59eafc496200907c75b0b7 | |
parent | 33d87eeb5ab0b26f7cbd36cdc030213fad17e382 (diff) |
iris: disable dynamic VAO fastpath on GFX version 9
Enabling this fast path, while making CPU side simpler
(and thus reducing driver's CPU overhead), forces us to
generate multiple VERTEX_BUFFER_STATE packets pointing to
the same buffer, but with slightly shifted BufferStartingAddress.
This is fine on GFX version >= 11 and < 8, but on version
8 and 9, thanks to internal details of the VF cache, vertex
data from each VERTEX_BUFFER_STATE is cached separately
and this results in a lot of cache misses.
Disabling this fast path restores previous performance levels.
On my SKL GT2 machine this improves performance in:
- GLB27 Egypt offscreen by 37%
- GLB27 TRex offscreen by 22%
- gfxbench5 Manhattan offscreen by 1.75%
- gfxbench5 Manhattan31 offscreen by 1.9%
- gfxbench5 Aztec Ruins high by 2.3%
In Intel performance CI on GFX version 9 it improves performance in:
- gfxbench5 Manhattan offscreen by 1.65%
- gfxbench5 Aztec Ruins normal offscreen by 1.33%
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3277
Fixes: 42842306d3c ("mesa,st/mesa: add a fast path for non-static VAOs")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9857>
-rw-r--r-- | src/gallium/drivers/iris/iris_screen.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index 97caf234310..13622fb9bf4 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -394,6 +394,13 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_INTEGER_MULTIPLY_32X16: return true; + case PIPE_CAP_ALLOW_DYNAMIC_VAO_FASTPATH: + /* Internal details of VF cache make this optimization harmful on GFX + * version 8 and 9, because generated VERTEX_BUFFER_STATEs are cached + * separately. + */ + return devinfo->gen >= 11; + default: return u_pipe_screen_get_param_defaults(pscreen, param); } |