summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend
diff options
context:
space:
mode:
authorFernandoS27 <fsahmkow27@gmail.com>2021-05-02 01:50:27 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:30 +0200
commitee61ec2c39e6db53c56e7ac761a2223d99f06908 (patch)
tree2ae3e49e64b845de4db6756e6dfea5fd1694d674 /src/shader_recompiler/backend
parentshader: Stub SR_AFFINITY (diff)
downloadyuzu-ee61ec2c39e6db53c56e7ac761a2223d99f06908.tar
yuzu-ee61ec2c39e6db53c56e7ac761a2223d99f06908.tar.gz
yuzu-ee61ec2c39e6db53c56e7ac761a2223d99f06908.tar.bz2
yuzu-ee61ec2c39e6db53c56e7ac761a2223d99f06908.tar.lz
yuzu-ee61ec2c39e6db53c56e7ac761a2223d99f06908.tar.xz
yuzu-ee61ec2c39e6db53c56e7ac761a2223d99f06908.tar.zst
yuzu-ee61ec2c39e6db53c56e7ac761a2223d99f06908.zip
Diffstat (limited to 'src/shader_recompiler/backend')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_context.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.cpp b/src/shader_recompiler/backend/spirv/emit_context.cpp
index 549df0d4b..be88b76f7 100644
--- a/src/shader_recompiler/backend/spirv/emit_context.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_context.cpp
@@ -840,6 +840,9 @@ void EmitContext::DefineGlobalMemoryFunctions(const Info& info) {
AddLabel();
const size_t num_buffers{info.storage_buffers_descriptors.size()};
for (size_t index = 0; index < num_buffers; ++index) {
+ if (!info.nvn_buffer_used[index]) {
+ continue;
+ }
const auto& ssbo{info.storage_buffers_descriptors[index]};
const Id ssbo_addr_cbuf_offset{Const(ssbo.cbuf_offset / 8)};
const Id ssbo_size_cbuf_offset{Const(ssbo.cbuf_offset / 4 + 2)};