From 2667da5174cb4db9383e730a9c23b2bd4dfbe37c Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Sat, 22 Jul 2023 19:08:02 +0200 Subject: [PATCH] lavapipe: Fix binding immutable samplers with desc buffers Reviewed-by: Roland Scheidegger 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 0cb2c37096e..51e02f4ed02 100644 --- a/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/src/gallium/frontends/lavapipe/lvp_execute.c @@ -4011,7 +4011,9 @@ bind_db_samplers(struct rendering_state *state, bool is_compute, unsigned set) for (uint32_t sampler_index = 0; sampler_index < bind_layout->array_size; sampler_index++) { if (bind_layout->immutable_samplers[sampler_index]) { - desc[sampler_index].sampler = bind_layout->immutable_samplers[sampler_index]->desc.sampler; + struct lp_descriptor *immutable_desc = &bind_layout->immutable_samplers[sampler_index]->desc; + desc[sampler_index].sampler = immutable_desc->sampler; + desc[sampler_index].sampler_index = immutable_desc->sampler_index; u_foreach_bit(stage, set_layout->shader_stages) did_update |= BITFIELD_BIT(vk_to_mesa_shader_stage(1<