iris: initialize pixel struct to zero when setting clear color

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 <tapani.palli@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30990>
This commit is contained in:
Tapani Pälli
2024-09-04 11:23:43 +03:00
committed by Marge Bot
parent 39a1f53890
commit 62799fcdd5

View File

@@ -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____)",