From 9f5bb8992f45091e05cc48587bb3ea5ca4086080 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 7 Apr 2023 11:23:26 -0400 Subject: [PATCH] lavapipe: don't double-inline ubo0 this was already handled above and causes negative indexing cc: mesa-stable Reviewed-by: Brian Paul Part-of: --- src/gallium/frontends/lavapipe/lvp_execute.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c index 18ac5da..690541e 100644 --- a/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/src/gallium/frontends/lavapipe/lvp_execute.c @@ -319,6 +319,9 @@ update_inline_shader_state(struct rendering_state *state, enum pipe_shader_type if (constbuf_dirty) { struct pipe_box box = {0}; u_foreach_bit(slot, shader->inlines.can_inline) { + /* this is already inlined above */ + if (slot == 0) + continue; unsigned count = shader->inlines.count[slot]; struct pipe_constant_buffer *cbuf = &state->const_buffer[sh][slot - 1]; struct pipe_resource *pres = cbuf->buffer; -- 2.7.4