From a47c23fa1f014139e8c0b973873215e0e8a84e19 Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Mon, 19 Aug 2024 19:51:25 +0200 Subject: [PATCH] vkd3d-shader/spirv: Use unique SPIR-V variables for descriptors where visibility differs. In the case two uav descriptors are mapped to the same variable, and one is read from while the other is not, the variable would get the NonReadable decorator, while being read from later. --- libs/vkd3d-shader/spirv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index aa944d76..48e369e8 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -2156,6 +2156,7 @@ struct vkd3d_symbol_descriptor_array unsigned int set; unsigned int binding; unsigned int push_constant_index; + bool write_only; }; struct vkd3d_symbol_register_data @@ -6152,6 +6153,7 @@ static uint32_t spirv_compiler_build_descriptor_variable(struct spirv_compiler * symbol.key.descriptor_array.set = binding.set; symbol.key.descriptor_array.binding = binding.binding; symbol.key.descriptor_array.push_constant_index = binding_address.push_constant_index; + symbol.key.descriptor_array.write_only = write_only; if ((entry = rb_get(&compiler->symbol_table, &symbol))) { var_info->array_symbol = RB_ENTRY_VALUE(entry, struct vkd3d_symbol, entry);