From 8d679f4f4e8d33402f11ab3da93ff815e4c44538 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 9 Aug 2021 14:24:07 -0700 Subject: [PATCH] nir: Initialize evaluate_cube_face_index_amd dst.x. Fix defect reported by Coverity Scan. Uninitialized scalar variable (UNINIT) uninit_use: Using uninitialized value dst.x. Fixes: a1a2a8dfda7 ("nir: add AMD_gcn_shader extended instructions") Signed-off-by: Vinson Lee Reviewed-by: Jason Ekstrand Part-of: --- src/compiler/nir/nir_opcodes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py index 17a1508c4d5..4a5241a2104 100644 --- a/src/compiler/nir/nir_opcodes.py +++ b/src/compiler/nir/nir_opcodes.py @@ -537,6 +537,7 @@ dst.y = dst.y * (1.0f / ma) + 0.5f; """) unop_horiz("cube_face_index_amd", 1, tfloat32, 3, tfloat32, """ +dst.x = 0.0; float absX = fabsf(src0.x); float absY = fabsf(src0.y); float absZ = fabsf(src0.z);