From 4889c71857ce2152a9c9e014b9f5831f96dc349b Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Tue, 22 Oct 2024 14:55:44 +1000 Subject: [PATCH] vkd3d: Zero the pipeline state UAV counter view array when the state is invalidated. (Valgrind) Otherwise a comparison with uninitialised data occurs in d3d12_command_list_update_descriptor_table() if virtual heaps are used. --- libs/vkd3d/command.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 5495809f..ed4cc370 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -2005,6 +2005,8 @@ static void d3d12_command_list_invalidate_bindings(struct d3d12_command_list *li vkd3d_array_reserve((void **)&bindings->vk_uav_counter_views, &bindings->vk_uav_counter_views_size, state->uav_counters.binding_count, sizeof(*bindings->vk_uav_counter_views)); + memset(bindings->vk_uav_counter_views, 0, + state->uav_counters.binding_count * sizeof(*bindings->vk_uav_counter_views)); bindings->uav_counters_dirty = true; } }