From 62799fcdd55ecf18528fa137667038f772f8dbca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Wed, 4 Sep 2024 11:23:43 +0300 Subject: [PATCH] iris: initialize pixel struct to zero when setting clear color MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise we can end up with uninitialized values, this fixes following valgrind warning: ==71705== Uninitialised byte(s) found during client check request ==71705== at 0x73B6DB8: util_bitpack_uint (bitpack_helpers.h:55) ==71705== by 0x73B6DB8: GFX11_PIPE_CONTROL_pack (gen11_pack.h:19885) ==71705== by 0x73B6DB8: iris_emit_raw_pipe_control (iris_state.c:10022) ==71705== by 0x6F93386: iris_emit_pipe_control_write (iris_pipe_control.c:97) ==71705== by 0x6FBCCAA: iris_resource_update_indirect_color (iris_resolve.c:1241) Signed-off-by: Tapani Pälli Reviewed-by: Rohan Garg Part-of: --- src/gallium/drivers/iris/iris_resolve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c index 90f3896e6a1..ec67cded1ea 100644 --- a/src/gallium/drivers/iris/iris_resolve.c +++ b/src/gallium/drivers/iris/iris_resolve.c @@ -1221,7 +1221,7 @@ iris_resource_update_indirect_color(struct iris_batch *batch, { assert(res->aux.clear_color_bo); - uint32_t pixel[4]; + uint32_t pixel[4] = {}; isl_color_value_pack(&res->aux.clear_color, res->surf.format, pixel); iris_emit_pipe_control_write(batch, "update fast clear color (RG____)",