From 4e8ba62481d50b200a5b1a41f3a81af473d888bc Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Sun, 15 Oct 2023 17:48:32 +0200 Subject: [PATCH] vkd3d-shader/spirv: Initialise "symbol.descriptor_array" in spirv_compiler_emit_combined_sampler_declarations(). Besides simply avoiding carrying around some uninitialised data, we check "symbol->descriptor_array" in spirv_compiler_prepare_image(), both for separate resources and for combined resource/sampler symbols. --- libs/vkd3d-shader/spirv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 90f1adeb..bd9e7a33 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -5904,6 +5904,7 @@ static void spirv_compiler_emit_combined_sampler_declarations(struct spirv_compi current->sampler_index == VKD3D_SHADER_DUMMY_SAMPLER_INDEX ? 0 : current->sampler_space, current->sampler_index); symbol.id = var_id; + symbol.descriptor_array = NULL; symbol.info.resource.range = *resource_range; symbol.info.resource.sampled_type = sampled_type; symbol.info.resource.type_id = image_type_id;