Mesa (master): vallium: fix input attachment lowering variable shadowing

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 19 01:23:15 UTC 2020


Module: Mesa
Branch: master
Commit: 6c7383d315f615bb5f003e1af130112f964853cc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6c7383d315f615bb5f003e1af130112f964853cc

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Aug 18 15:17:57 2020 +1000

vallium: fix input attachment lowering variable shadowing

This caused a bunch of tests to crash due to pos being shadowed
wrongly.

Fixes:
dEQP-VK.binding_model.descriptor_copy.graphics.input_attachment*

Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Fixes: b38879f8c5f57b7f1802 ("vallium: initial import of the vulkan frontend")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>

---

 src/gallium/frontends/vallium/val_lower_input_attachments.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/frontends/vallium/val_lower_input_attachments.c b/src/gallium/frontends/vallium/val_lower_input_attachments.c
index a8b8af73928..532f71df29c 100644
--- a/src/gallium/frontends/vallium/val_lower_input_attachments.c
+++ b/src/gallium/frontends/vallium/val_lower_input_attachments.c
@@ -32,7 +32,7 @@ load_frag_coord(nir_builder *b)
       nir_find_variable_with_location(b->shader, nir_var_shader_in,
                                       VARYING_SLOT_POS);
    if (pos == NULL) {
-      nir_variable *pos = nir_variable_create(b->shader, nir_var_shader_in,
+      pos = nir_variable_create(b->shader, nir_var_shader_in,
                                            glsl_vec4_type(), NULL);
       pos->data.location = VARYING_SLOT_POS;
    }



More information about the mesa-commit mailing list