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.
This commit is contained in:
Henri Verbeet 2023-10-15 17:48:32 +02:00 committed by Alexandre Julliard
parent 803e5183cc
commit 4e8ba62481
Notes: Alexandre Julliard 2023-10-17 22:40:09 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/411

View File

@ -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;