rusticl/mesa: fix `set_constant_buffer` when passing an empty buffer
authorKarol Herbst <kherbst@redhat.com>
Wed, 20 Sep 2023 10:46:13 +0000 (12:46 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 21 Sep 2023 07:58:34 +0000 (07:58 +0000)
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25303>

src/gallium/frontends/rusticl/mesa/pipe/context.rs

index 13d6589..70814d7 100644 (file)
@@ -389,7 +389,7 @@ impl PipeContext {
                 pipe_shader_type::PIPE_SHADER_COMPUTE,
                 idx,
                 false,
-                &cb,
+                if data.is_empty() { ptr::null() } else { &cb },
             )
         }
     }