lavapipe: don't double-inline ubo0
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 7 Apr 2023 15:23:26 +0000 (11:23 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 11 Apr 2023 01:37:05 +0000 (01:37 +0000)
this was already handled above and causes negative indexing

cc: mesa-stable

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22363>

src/gallium/frontends/lavapipe/lvp_execute.c

index 18ac5da..690541e 100644 (file)
@@ -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;