Always declare UAV images as typed if atomic ops occur.
Atomic ops on images with Unknown type will cause SPIR-V validation failure, and assertion failure in Mesa debug builds. D3D12 allows atomics on typed buffers, and this requires a distinction to be made between UAV reads and atomic ops.
Merge request reports
Activity
+static bool vkd3d_shader_instruction_is_uav_atomic_op(const struct vkd3d_shader_instruction *instruction) +{ + enum vkd3d_shader_opcode handler_idx = instruction->handler_idx; + return (VKD3DSIH_ATOMIC_AND <= handler_idx && handler_idx <= VKD3DSIH_ATOMIC_XOR + && instruction->dst[0].reg.type == VKD3DSPR_UAV); +}
Should we take the IMM_ATOMIC_* operations into account here as well, like we do in vkd3d_shader_instruction_is_uav_read()?
added 6 commits
-
173748b1...43631bde - 4 commits from branch
wine:master
- fc652d2b - tests: Test a typed UAV buffer in test_atomic_instructions().
- 1b11b576 - vkd3d-shader: Introduce DESCRIPTOR_INFO_FLAG_UAV_ATOMICS and always declare...
-
173748b1...43631bde - 4 commits from branch
Please register or sign in to reply