From a0f4bac7dc44c889f3a648690da05903b8d2cc65 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 13 Feb 2021 20:21:55 -0800 Subject: [PATCH] aco: Initialize ds_state.front.writeMask. Fix defect reported by Coverity Scan. Uninitialized scalar variable (UNINIT) uninit_use: Using uninitialized value ds_state.front. Field ds_state.front.writeMask is uninitialized. Fixes: d488d0fd7ba ("aco: add framework for testing isel and integration tests") Signed-off-by: Vinson Lee Reviewed-by: Rhys Perry Part-of: (cherry picked from commit 7cc83f237efe1fdba075d07b18450c4345d2dc7f) --- .pick_status.json | 2 +- src/amd/compiler/tests/helpers.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index da41e151e46..9bbdfa1d809 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1111,7 +1111,7 @@ "description": "aco: Initialize ds_state.front.writeMask.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "d488d0fd7baff77204dbd3fd0d625b5974728534" }, diff --git a/src/amd/compiler/tests/helpers.cpp b/src/amd/compiler/tests/helpers.cpp index 05395cdfa89..148ab1bb23c 100644 --- a/src/amd/compiler/tests/helpers.cpp +++ b/src/amd/compiler/tests/helpers.cpp @@ -647,6 +647,7 @@ void PipelineBuilder::create_graphics_pipeline() { ds_state.front.depthFailOp = VK_STENCIL_OP_REPLACE; ds_state.front.compareOp = VK_COMPARE_OP_ALWAYS; ds_state.front.compareMask = 0xffffffff, + ds_state.front.writeMask = 0; ds_state.front.reference = 0; ds_state.back = ds_state.front;