diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-23 02:21:10 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-23 22:34:16 +0200 |
commit | 3e35101895aed4e0cf2be3f90459fbad6e417203 (patch) | |
tree | 3e9a0735ab19657b93ef8037a6b349762e8de8a2 /src/video_core | |
parent | vk_pipeline_cache: Unify pipeline cache keys into a single operation (diff) | |
download | yuzu-3e35101895aed4e0cf2be3f90459fbad6e417203.tar yuzu-3e35101895aed4e0cf2be3f90459fbad6e417203.tar.gz yuzu-3e35101895aed4e0cf2be3f90459fbad6e417203.tar.bz2 yuzu-3e35101895aed4e0cf2be3f90459fbad6e417203.tar.lz yuzu-3e35101895aed4e0cf2be3f90459fbad6e417203.tar.xz yuzu-3e35101895aed4e0cf2be3f90459fbad6e417203.tar.zst yuzu-3e35101895aed4e0cf2be3f90459fbad6e417203.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 8a5482e55..8f4de5665 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -692,7 +692,7 @@ std::tuple<VkFramebuffer, VkExtent2D> RasterizerVulkan::ConfigureFramebuffers( FramebufferCacheKey key{renderpass, std::numeric_limits<u32>::max(), std::numeric_limits<u32>::max(), std::numeric_limits<u32>::max()}; - const auto try_push = [&](const View& view) { + const auto try_push = [&key](const View& view) { if (!view) { return false; } @@ -703,7 +703,9 @@ std::tuple<VkFramebuffer, VkExtent2D> RasterizerVulkan::ConfigureFramebuffers( return true; }; - for (std::size_t index = 0; index < std::size(color_attachments); ++index) { + const auto& regs = system.GPU().Maxwell3D().regs; + const std::size_t num_attachments = static_cast<std::size_t>(regs.rt_control.count); + for (std::size_t index = 0; index < num_attachments; ++index) { if (try_push(color_attachments[index])) { texture_cache.MarkColorBufferInUse(index); } |