mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
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.
This commit is contained in:
parent
343c7942e1
commit
a47c23fa1f
Notes:
Henri Verbeet
2024-08-20 21:33:46 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1005
@ -2156,6 +2156,7 @@ struct vkd3d_symbol_descriptor_array
|
|||||||
unsigned int set;
|
unsigned int set;
|
||||||
unsigned int binding;
|
unsigned int binding;
|
||||||
unsigned int push_constant_index;
|
unsigned int push_constant_index;
|
||||||
|
bool write_only;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct vkd3d_symbol_register_data
|
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.set = binding.set;
|
||||||
symbol.key.descriptor_array.binding = binding.binding;
|
symbol.key.descriptor_array.binding = binding.binding;
|
||||||
symbol.key.descriptor_array.push_constant_index = binding_address.push_constant_index;
|
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)))
|
if ((entry = rb_get(&compiler->symbol_table, &symbol)))
|
||||||
{
|
{
|
||||||
var_info->array_symbol = RB_ENTRY_VALUE(entry, struct vkd3d_symbol, entry);
|
var_info->array_symbol = RB_ENTRY_VALUE(entry, struct vkd3d_symbol, entry);
|
||||||
|
Loading…
Reference in New Issue
Block a user