llvmpipe: (trivial) initialize src1_alpha var to NULL
authorRoland Scheidegger <sroland@vmware.com>
Fri, 15 Apr 2016 19:11:52 +0000 (21:11 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 15 Apr 2016 20:51:28 +0000 (22:51 +0200)
The blend code would do a conditional assignment based on it, causing valgrind
to complain. Since that variable was actually unused in this case, this
doesn't fix anything but the warning.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94955
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/llvmpipe/lp_state_fs.c

index ca0533b4a0f1999fe731db616c1efe552f6abd99..93460a39e90858ea72d86f9d8fc4e644e85e7ca3 100644 (file)
@@ -1601,7 +1601,7 @@ generate_unswizzled_blend(struct gallivm_state *gallivm,
    LLVMValueRef fs_src[4][TGSI_NUM_CHANNELS];
    LLVMValueRef fs_src1[4][TGSI_NUM_CHANNELS];
    LLVMValueRef src_alpha[4 * 4];
-   LLVMValueRef src1_alpha[4 * 4];
+   LLVMValueRef src1_alpha[4 * 4] = { NULL };
    LLVMValueRef src_mask[4 * 4];
    LLVMValueRef src[4 * 4];
    LLVMValueRef src1[4 * 4];