Mesa (staging/22.1): nir: Fix unused-variable compile warnings

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 16 21:43:16 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: 191034cd6a34a574a7e7809c6dfbd7ec0de8a1ff
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=191034cd6a34a574a7e7809c6dfbd7ec0de8a1ff

Author: Christian Gmeiner <christian.gmeiner at gmail.com>
Date:   Sun Jun 12 13:54:11 2022 +0200

nir: Fix unused-variable compile warnings

Fixes: 8492e78f9d1 ("nir/deref: Handle SSBO array bindings specially")

Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17021>
(cherry picked from commit 15f394cc7a2e47c487c7fe7c45e0fc55baa71ddc)

---

 .pick_status.json                     | 2 +-
 src/compiler/nir/tests/vars_tests.cpp | 6 ------
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index fcfc5b8836a..081c7b5225e 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -490,7 +490,7 @@
         "description": "nir: Fix unused-variable compile warnings",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "8492e78f9d14c187596c13725f6974816d02a0e9"
     },
diff --git a/src/compiler/nir/tests/vars_tests.cpp b/src/compiler/nir/tests/vars_tests.cpp
index bdd19ffb9c6..0a6c6a9deee 100644
--- a/src/compiler/nir/tests/vars_tests.cpp
+++ b/src/compiler/nir/tests/vars_tests.cpp
@@ -1429,8 +1429,6 @@ TEST_F(nir_copy_prop_vars_test, ssbo_array_binding_indirect)
    nir_variable *out = create_var(nir_var_mem_ssbo, ifc_type, "out");
    out->data.access = ACCESS_RESTRICT;
 
-   nir_ssa_def *i = nir_load_local_invocation_index(b);
-
    nir_deref_instr *ssbo_0 =
       nir_build_deref_array_imm(b, nir_build_deref_var(b, ssbo_arr), 0);
    nir_deref_instr *ssbo_0_x = nir_build_deref_struct(b, ssbo_0, 0);
@@ -1475,8 +1473,6 @@ TEST_F(nir_copy_prop_vars_test, restrict_ssbo_array_binding)
    nir_variable *out = create_var(nir_var_mem_ssbo, ifc_type, "out");
    out->data.access = ACCESS_RESTRICT;
 
-   nir_ssa_def *i = nir_load_local_invocation_index(b);
-
    nir_deref_instr *ssbo_0 =
       nir_build_deref_array_imm(b, nir_build_deref_var(b, ssbo_arr), 0);
    nir_deref_instr *ssbo_0_x = nir_build_deref_struct(b, ssbo_0, 0);
@@ -1526,8 +1522,6 @@ TEST_F(nir_copy_prop_vars_test, aliasing_ssbo_array_binding)
    nir_variable *out = create_var(nir_var_mem_ssbo, ifc_type, "out");
    out->data.access = ACCESS_RESTRICT;
 
-   nir_ssa_def *i = nir_load_local_invocation_index(b);
-
    nir_deref_instr *ssbo_0 =
       nir_build_deref_array_imm(b, nir_build_deref_var(b, ssbo_arr), 0);
    nir_deref_instr *ssbo_0_x = nir_build_deref_struct(b, ssbo_0, 0);



More information about the mesa-commit mailing list