diff options
author | FernandoS27 <fsahmkow27@gmail.com> | 2021-05-02 01:50:27 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:30 +0200 |
commit | ee61ec2c39e6db53c56e7ac761a2223d99f06908 (patch) | |
tree | 2ae3e49e64b845de4db6756e6dfea5fd1694d674 /src/shader_recompiler/frontend/maxwell/program.cpp | |
parent | shader: Stub SR_AFFINITY (diff) | |
download | yuzu-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/frontend/maxwell/program.cpp')
-rw-r--r-- | src/shader_recompiler/frontend/maxwell/program.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/program.cpp b/src/shader_recompiler/frontend/maxwell/program.cpp index a4fa4319d..0d3f00699 100644 --- a/src/shader_recompiler/frontend/maxwell/program.cpp +++ b/src/shader_recompiler/frontend/maxwell/program.cpp @@ -88,17 +88,20 @@ void AddNVNStorageBuffers(IR::Program& program) { }()}; auto& descs{program.info.storage_buffers_descriptors}; for (u32 index = 0; index < num_buffers; ++index) { + if (!program.info.nvn_buffer_used[index]) { + continue; + } const u32 offset{base + index * descriptor_size}; const auto it{std::ranges::find(descs, offset, &StorageBufferDescriptor::cbuf_offset)}; if (it != descs.end()) { + it->is_written |= program.info.stores_global_memory; continue; } - // Assume these are written for now descs.push_back({ .cbuf_index = driver_cbuf, .cbuf_offset = offset, .count = 1, - .is_written = true, + .is_written = program.info.stores_global_memory, }); } } |