summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-04-17 08:21:03 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:28 +0200
commit0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0 (patch)
tree809cb00a8188a76cb5585379d9982d9e52fcd0e6 /src/shader_recompiler/backend
parentspirv: Fix implicit lod type (diff)
downloadyuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.tar
yuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.tar.gz
yuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.tar.bz2
yuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.tar.lz
yuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.tar.xz
yuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.tar.zst
yuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.zip
Diffstat (limited to 'src/shader_recompiler/backend')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv.h5
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp14
2 files changed, 7 insertions, 12 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.h b/src/shader_recompiler/backend/spirv/emit_spirv.h
index cf8d74f4e..d43c72f6e 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv.h
+++ b/src/shader_recompiler/backend/spirv/emit_spirv.h
@@ -29,9 +29,8 @@ void EmitReturn(EmitContext& ctx);
void EmitUnreachable(EmitContext& ctx);
void EmitDemoteToHelperInvocation(EmitContext& ctx, Id continue_label);
void EmitBarrier(EmitContext& ctx);
-void EmitMemoryBarrierWorkgroupLevel(EmitContext& ctx);
-void EmitMemoryBarrierDeviceLevel(EmitContext& ctx);
-void EmitMemoryBarrierSystemLevel(EmitContext& ctx);
+void EmitWorkgroupMemoryBarrier(EmitContext& ctx);
+void EmitDeviceMemoryBarrier(EmitContext& ctx);
void EmitPrologue(EmitContext& ctx);
void EmitEpilogue(EmitContext& ctx);
void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream);
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp
index 74f523d0f..366dc6a0c 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp
@@ -7,7 +7,7 @@
namespace Shader::Backend::SPIRV {
namespace {
-void EmitMemoryBarrierImpl(EmitContext& ctx, spv::Scope scope) {
+void MemoryBarrier(EmitContext& ctx, spv::Scope scope) {
const auto semantics{
spv::MemorySemanticsMask::AcquireRelease | spv::MemorySemanticsMask::UniformMemory |
spv::MemorySemanticsMask::WorkgroupMemory | spv::MemorySemanticsMask::AtomicCounterMemory |
@@ -27,16 +27,12 @@ void EmitBarrier(EmitContext& ctx) {
ctx.Constant(ctx.U32[1], static_cast<u32>(memory_semantics)));
}
-void EmitMemoryBarrierWorkgroupLevel(EmitContext& ctx) {
- EmitMemoryBarrierImpl(ctx, spv::Scope::Workgroup);
+void EmitWorkgroupMemoryBarrier(EmitContext& ctx) {
+ MemoryBarrier(ctx, spv::Scope::Workgroup);
}
-void EmitMemoryBarrierDeviceLevel(EmitContext& ctx) {
- EmitMemoryBarrierImpl(ctx, spv::Scope::Device);
-}
-
-void EmitMemoryBarrierSystemLevel(EmitContext& ctx) {
- EmitMemoryBarrierImpl(ctx, spv::Scope::CrossDevice);
+void EmitDeviceMemoryBarrier(EmitContext& ctx) {
+ MemoryBarrier(ctx, spv::Scope::Device);
}
} // namespace Shader::Backend::SPIRV