diff options
author | bunnei <bunneidev@gmail.com> | 2023-05-03 02:52:41 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2023-06-03 09:05:58 +0200 |
commit | ca4bf3844eb317c816f4b316967c7ae6697473d6 (patch) | |
tree | ac5ff04295d4babc574a70485ba1b5c4187189c0 /src/shader_recompiler/backend | |
parent | android: fix deadzone calculation (diff) | |
download | yuzu-ca4bf3844eb317c816f4b316967c7ae6697473d6.tar yuzu-ca4bf3844eb317c816f4b316967c7ae6697473d6.tar.gz yuzu-ca4bf3844eb317c816f4b316967c7ae6697473d6.tar.bz2 yuzu-ca4bf3844eb317c816f4b316967c7ae6697473d6.tar.lz yuzu-ca4bf3844eb317c816f4b316967c7ae6697473d6.tar.xz yuzu-ca4bf3844eb317c816f4b316967c7ae6697473d6.tar.zst yuzu-ca4bf3844eb317c816f4b316967c7ae6697473d6.zip |
Diffstat (limited to 'src/shader_recompiler/backend')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp index 4b3043b65..0ce73f289 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp @@ -69,6 +69,11 @@ Id StorageAtomicU32(EmitContext& ctx, const IR::Value& binding, const IR::Value& Id StorageAtomicU64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, Id value, Id (Sirit::Module::*atomic_func)(Id, Id, Id, Id, Id), Id (Sirit::Module::*non_atomic_func)(Id, Id, Id)) { + if (!ctx.profile.support_descriptor_aliasing) { + LOG_WARNING(Shader_SPIRV, "Descriptor aliasing not supported, this cannot be atomic."); + return ctx.ConstantNull(ctx.U64); + } + if (ctx.profile.support_int64_atomics) { const Id pointer{StoragePointer(ctx, ctx.storage_types.U64, &StorageDefinitions::U64, binding, offset, sizeof(u64))}; @@ -86,6 +91,11 @@ Id StorageAtomicU64(EmitContext& ctx, const IR::Value& binding, const IR::Value& Id StorageAtomicU32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, Id value, Id (Sirit::Module::*non_atomic_func)(Id, Id, Id)) { + if (!ctx.profile.support_descriptor_aliasing) { + LOG_WARNING(Shader_SPIRV, "Descriptor aliasing not supported, this cannot be atomic."); + return ctx.ConstantNull(ctx.U32[2]); + } + LOG_WARNING(Shader_SPIRV, "Int64 atomics not supported, fallback to non-atomic"); const Id pointer{StoragePointer(ctx, ctx.storage_types.U32x2, &StorageDefinitions::U32x2, binding, offset, sizeof(u32[2]))}; |