diff options
| author | 2023-06-05 21:43:43 -0700 | |
|---|---|---|
| committer | 2023-06-05 21:43:43 -0700 | |
| commit | cb95d7fe1b6d81899fe6b279400da2c991e3132c (patch) | |
| tree | a856ac45b1053009c4c11ee141c49d7faa4c8a19 /src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp | |
| parent | Merge pull request #10611 from liamwhite/audio-deadlock (diff) | |
| parent | Merge pull request #10633 from t895/variable-surface-ratio (diff) | |
| download | yuzu-cb95d7fe1b6d81899fe6b279400da2c991e3132c.tar.gz yuzu-cb95d7fe1b6d81899fe6b279400da2c991e3132c.tar.xz yuzu-cb95d7fe1b6d81899fe6b279400da2c991e3132c.zip | |
Merge pull request #10508 from yuzu-emu/lime
Project Lime - yuzu Android Port
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp')
| -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& | |||
| 69 | Id StorageAtomicU64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, Id value, | 69 | Id StorageAtomicU64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, Id value, |
| 70 | Id (Sirit::Module::*atomic_func)(Id, Id, Id, Id, Id), | 70 | Id (Sirit::Module::*atomic_func)(Id, Id, Id, Id, Id), |
| 71 | Id (Sirit::Module::*non_atomic_func)(Id, Id, Id)) { | 71 | Id (Sirit::Module::*non_atomic_func)(Id, Id, Id)) { |
| 72 | if (!ctx.profile.support_descriptor_aliasing) { | ||
| 73 | LOG_WARNING(Shader_SPIRV, "Descriptor aliasing not supported, this cannot be atomic."); | ||
| 74 | return ctx.ConstantNull(ctx.U64); | ||
| 75 | } | ||
| 76 | |||
| 72 | if (ctx.profile.support_int64_atomics) { | 77 | if (ctx.profile.support_int64_atomics) { |
| 73 | const Id pointer{StoragePointer(ctx, ctx.storage_types.U64, &StorageDefinitions::U64, | 78 | const Id pointer{StoragePointer(ctx, ctx.storage_types.U64, &StorageDefinitions::U64, |
| 74 | binding, offset, sizeof(u64))}; | 79 | binding, offset, sizeof(u64))}; |
| @@ -86,6 +91,11 @@ Id StorageAtomicU64(EmitContext& ctx, const IR::Value& binding, const IR::Value& | |||
| 86 | 91 | ||
| 87 | Id StorageAtomicU32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, Id value, | 92 | Id StorageAtomicU32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, Id value, |
| 88 | Id (Sirit::Module::*non_atomic_func)(Id, Id, Id)) { | 93 | Id (Sirit::Module::*non_atomic_func)(Id, Id, Id)) { |
| 94 | if (!ctx.profile.support_descriptor_aliasing) { | ||
| 95 | LOG_WARNING(Shader_SPIRV, "Descriptor aliasing not supported, this cannot be atomic."); | ||
| 96 | return ctx.ConstantNull(ctx.U32[2]); | ||
| 97 | } | ||
| 98 | |||
| 89 | LOG_WARNING(Shader_SPIRV, "Int64 atomics not supported, fallback to non-atomic"); | 99 | LOG_WARNING(Shader_SPIRV, "Int64 atomics not supported, fallback to non-atomic"); |
| 90 | const Id pointer{StoragePointer(ctx, ctx.storage_types.U32x2, &StorageDefinitions::U32x2, | 100 | const Id pointer{StoragePointer(ctx, ctx.storage_types.U32x2, &StorageDefinitions::U32x2, |
| 91 | binding, offset, sizeof(u32[2]))}; | 101 | binding, offset, sizeof(u32[2]))}; |