mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
libs/vkd3d-shader: Emit NonReadable decoration for image variables.
Fixes image writes for UNORM formats on Anv. Anv uses special surface state for write-only storage image descriptors. The SPIR-V spec doesn't state that the NonReadable decoration is required for images used with StorageImageWriteWithoutFormat. On the other hand, glslang requires the 'writeonly' keyword for images without format, and it emits the NonReadable decoration.
This commit is contained in:
parent
2323c36fbd
commit
e7aa2a7bcf
@ -3248,6 +3248,9 @@ static void vkd3d_dxbc_compiler_emit_resource_declaration(struct vkd3d_dxbc_comp
|
||||
|
||||
vkd3d_dxbc_compiler_emit_register_debug_name(builder, var_id, reg);
|
||||
|
||||
if (is_uav && !(scan_info->uav_read_mask & (1u << reg->idx[0].offset)))
|
||||
vkd3d_spirv_build_op_decorate(builder, var_id, SpvDecorationNonReadable, NULL, 0);
|
||||
|
||||
if (is_uav && (scan_info->uav_counter_mask & (1u << reg->idx[0].offset)))
|
||||
{
|
||||
assert(structure_stride); /* counters are valid only for structured buffers */
|
||||
|
Loading…
x
Reference in New Issue
Block a user