gallium: Remove duplicate resource variable.

Fix defect reported by Coverity Scan.

Evaluation order violation (EVALUATION_ORDER)
write_write_typo: In resource = resource =
ntt_ureg_src_indirect(c, ureg_src_register(TGSI_FILE_IMAGE, 0U),
instr->src[0]), resource is written twice with the same value.

Fixes: 34cc6a804e ("gallium: Add a nir-to-TGSI pass.")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7326>
This commit is contained in:
Vinson Lee 2020-10-26 19:55:07 -07:00
parent 78a420ce46
commit 7278f90039
1 changed files with 2 additions and 2 deletions

View File

@ -1222,8 +1222,8 @@ ntt_emit_image_load_store(struct ntt_compile *c, nir_intrinsic_instr *instr)
nir_intrinsic_image_array(instr));
struct ureg_src resource =
resource = ntt_ureg_src_indirect(c, ureg_src_register(TGSI_FILE_IMAGE, 0),
instr->src[0]);
ntt_ureg_src_indirect(c, ureg_src_register(TGSI_FILE_IMAGE, 0),
instr->src[0]);
struct ureg_dst dst;
if (instr->intrinsic == nir_intrinsic_image_store) {