Module: Mesa Branch: main Commit: 33b77ec774a10f052a2814d9ff3668cc0aa13083 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=33b77ec774a10f052a2814d9ff3668cc0aa13083
Author: Marek Olšák <marek.ol...@amd.com> Date: Sun Dec 10 16:20:57 2023 -0500 cso: don't unbind vertex buffers when enabling/disabling u_vbuf The next set_vertex_buffers call always overwrites all slots anyway. Reviewed-By: Mike Blumenkrantz <michael.blumenkra...@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26309> --- src/gallium/auxiliary/cso_cache/cso_context.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index bfaec3ca975..4e2d640df57 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -1329,9 +1329,6 @@ cso_set_vertex_buffers_and_elements(struct cso_context *cso, if (vbuf && (ctx->always_use_vbuf || uses_user_vertex_buffers)) { if (!ctx->vbuf_current) { - /* Unbind all buffers in cso_context, because we'll use u_vbuf. */ - pipe->set_vertex_buffers(pipe, 0, false, NULL); - /* Unset this to make sure the CSO is re-bound on the next use. */ ctx->velements = NULL; ctx->vbuf_current = pipe->vbuf = vbuf; @@ -1345,9 +1342,6 @@ cso_set_vertex_buffers_and_elements(struct cso_context *cso, } if (ctx->vbuf_current) { - /* Unbind all buffers in u_vbuf, because we'll use cso_context. */ - u_vbuf_set_vertex_buffers(vbuf, 0, false, NULL); - /* Unset this to make sure the CSO is re-bound on the next use. */ u_vbuf_unset_vertex_elements(vbuf); ctx->vbuf_current = pipe->vbuf = NULL;