From 4790ba783970a9dde9d9ce6a528dd8f7edc50ae6 Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Fri, 28 Jan 2022 19:00:04 -0500 Subject: spirv_atomic: Define U32x2 storage buffers for 64-bit storage atomics Some drivers do not support 64-bit atomics, and fallback to atomically modifying U32x2 vectors. This change ensures that U32x2 storage vectors are defined in the spir-v shader when 64-bit atomics are used. Fixes a hang on some devices, notably Intel GPUs, when booting Pokemon Legends Arceus --- src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp') diff --git a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp index a78c469be..b6a20f904 100644 --- a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp +++ b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp @@ -688,7 +688,7 @@ void VisitUsages(Info& info, IR::Inst& inst) { case IR::Opcode::StorageAtomicAnd64: case IR::Opcode::StorageAtomicOr64: case IR::Opcode::StorageAtomicXor64: - info.used_storage_buffer_types |= IR::Type::U64; + info.used_storage_buffer_types |= IR::Type::U64 | IR::Type::U32x2; info.uses_int64_bit_atomics = true; break; case IR::Opcode::BindlessImageAtomicIAdd32: -- cgit v1.2.3