Mesa (main): zink: Remove duplicate variable unsized.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 2 02:18:09 UTC 2021


Module: Mesa
Branch: main
Commit: 308bd1f00c9cfcd37ebcd15390d513441011d1af
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=308bd1f00c9cfcd37ebcd15390d513441011d1af

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Sat Oct 30 14:17:10 2021 -0700

zink: Remove duplicate variable unsized.

Fix defect reported by Coverity Scan.

Evaluation order violation (EVALUATION_ORDER)
write_write_typo: In unsized = unsized =
glsl_array_type(glsl_uintN_t_type(bit_size), 0U, bit_size / 8U),
unsized is written twice with the same value.

Fixes: f79a25653b9 ("zink: move all shader bo/sharedmem access to compiler passes")
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13607>

---

 src/gallium/drivers/zink/zink_compiler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c
index 6a22716f15e..076c44cea16 100644
--- a/src/gallium/drivers/zink/zink_compiler.c
+++ b/src/gallium/drivers/zink/zink_compiler.c
@@ -751,7 +751,7 @@ get_bo_var(nir_shader *shader, struct bo_vars *bo, bool ssbo, unsigned idx, unsi
       fields[1].name = ralloc_strdup(shader, "unsized");
       const struct glsl_type *array_type = glsl_get_struct_field(var->type, 0);
       const struct glsl_type *type;
-      const struct glsl_type *unsized = unsized = glsl_array_type(glsl_uintN_t_type(bit_size), 0, bit_size / 8);
+      const struct glsl_type *unsized = glsl_array_type(glsl_uintN_t_type(bit_size), 0, bit_size / 8);
       if (bit_size > 32) {
          assert(bit_size == 64);
          type = glsl_array_type(glsl_uintN_t_type(bit_size), glsl_get_length(array_type) / 2, bit_size / 8);



More information about the mesa-commit mailing list