diff options
author | Marcin Ślusarz <marcin.slusarz@intel.com> | 2021-03-08 12:30:58 +0100 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-03-30 07:32:16 +0000 |
commit | 33d87eeb5ab0b26f7cbd36cdc030213fad17e382 (patch) | |
tree | 2d7f10969a1d19aef9d1fc2a14e334c58b864f1f | |
parent | 84ad0feec57260c47ba7d5ee156be3b0f85959d7 (diff) |
gallium: add PIPE_CAP_ALLOW_DYNAMIC_VAO_FASTPATH
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/auxiliary/util/u_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_defines.h | 1 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index f8d739bbaa9..6e6aadbfd6a 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -462,6 +462,9 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, case PIPE_CAP_SAMPLER_REDUCTION_MINMAX: return 0; + case PIPE_CAP_ALLOW_DYNAMIC_VAO_FASTPATH: + return 1; + default: unreachable("bad PIPE_CAP_*"); } diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 9475fa2aa84..b0cab4d4544 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -986,6 +986,7 @@ enum pipe_cap PIPE_CAP_GL_CLAMP, PIPE_CAP_TEXRECT, PIPE_CAP_SAMPLER_REDUCTION_MINMAX, + PIPE_CAP_ALLOW_DYNAMIC_VAO_FASTPATH, PIPE_CAP_LAST, /* XXX do not add caps after PIPE_CAP_LAST! */ diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 4b684e1e654..9578c6d07fb 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -610,7 +610,8 @@ void st_init_limits(struct pipe_screen *screen, screen->get_param(screen, PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET); c->MultiDrawWithUserIndices = true; - c->AllowDynamicVAOFastPath = true; + c->AllowDynamicVAOFastPath = + screen->get_param(screen, PIPE_CAP_ALLOW_DYNAMIC_VAO_FASTPATH); c->glBeginEndBufferSize = screen->get_param(screen, PIPE_CAP_GL_BEGIN_END_BUFFER_SIZE); |