ac/nir: Fix accessing an unitialized value.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 29 Nov 2016 07:54:05 +0000 (08:54 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 29 Nov 2016 19:13:28 +0000 (20:13 +0100)
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/common/ac_nir_to_llvm.c

index c9b0106e48f86b1139cf5b95c4e6fa971f2c5f64..d9eef5749e0fb45d897132a5b70f947f1abfd6a4 100644 (file)
@@ -3361,7 +3361,8 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
        unsigned dmask = 0xf;
        LLVMValueRef address[16];
        LLVMValueRef coords[5];
-       LLVMValueRef coord = NULL, lod = NULL, comparitor = NULL, bias, offsets = NULL;
+       LLVMValueRef coord = NULL, lod = NULL, comparitor = NULL;
+       LLVMValueRef bias = NULL, offsets = NULL;
        LLVMValueRef res_ptr, samp_ptr, fmask_ptr = NULL, sample_index = NULL;
        LLVMValueRef ddx = NULL, ddy = NULL;
        LLVMValueRef derivs[6];