From f2865308c429286806238f523cdf4861922d6093 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 30 Aug 2023 09:38:54 -0400 Subject: [PATCH] lavapipe: update vbo indices before propagating stride the vbo index is used to set the stride, so it needs to be updated affects dEQP-VK.pipeline.pipeline_library.bind_buffers_2.single.stride_0_4_offset_1_0.count_2 Fixes: 76725452239 ("gallium: move vertex stride to CSO") Part-of: --- src/gallium/frontends/lavapipe/lvp_execute.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c index 099ce763ded..4e4c93fd468 100644 --- a/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/src/gallium/frontends/lavapipe/lvp_execute.c @@ -493,6 +493,9 @@ static void emit_state(struct rendering_state *state) state->stencil_ref_dirty = false; } + if (state->ve_dirty) + update_vertex_elements_buffer_index(state); + if (state->vb_strides_dirty) { for (unsigned i = 0; i < state->velem.count; i++) state->velem.velems[i].src_stride = state->vb_strides[state->velem.velems[i].vertex_buffer_index]; @@ -505,7 +508,6 @@ static void emit_state(struct rendering_state *state) } if (state->ve_dirty) { - update_vertex_elements_buffer_index(state); cso_set_vertex_elements(state->cso, &state->velem); state->ve_dirty = false; }