diff options
| author | 2020-04-22 21:21:10 -0300 | |
|---|---|---|
| committer | 2020-04-23 17:34:16 -0300 | |
| commit | 3e35101895aed4e0cf2be3f90459fbad6e417203 (patch) | |
| tree | 3e9a0735ab19657b93ef8037a6b349762e8de8a2 /src | |
| parent | vk_pipeline_cache: Unify pipeline cache keys into a single operation (diff) | |
| download | yuzu-3e35101895aed4e0cf2be3f90459fbad6e417203.tar.gz yuzu-3e35101895aed4e0cf2be3f90459fbad6e417203.tar.xz yuzu-3e35101895aed4e0cf2be3f90459fbad6e417203.zip | |
vk_rasterizer: Fix framebuffer creation validation errors
Framebuffer creation was ignoring the number of color attachments.
Diffstat (limited to '')
| -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( | |||
| 692 | FramebufferCacheKey key{renderpass, std::numeric_limits<u32>::max(), | 692 | FramebufferCacheKey key{renderpass, std::numeric_limits<u32>::max(), |
| 693 | std::numeric_limits<u32>::max(), std::numeric_limits<u32>::max()}; | 693 | std::numeric_limits<u32>::max(), std::numeric_limits<u32>::max()}; |
| 694 | 694 | ||
| 695 | const auto try_push = [&](const View& view) { | 695 | const auto try_push = [&key](const View& view) { |
| 696 | if (!view) { | 696 | if (!view) { |
| 697 | return false; | 697 | return false; |
| 698 | } | 698 | } |
| @@ -703,7 +703,9 @@ std::tuple<VkFramebuffer, VkExtent2D> RasterizerVulkan::ConfigureFramebuffers( | |||
| 703 | return true; | 703 | return true; |
| 704 | }; | 704 | }; |
| 705 | 705 | ||
| 706 | for (std::size_t index = 0; index < std::size(color_attachments); ++index) { | 706 | const auto& regs = system.GPU().Maxwell3D().regs; |
| 707 | const std::size_t num_attachments = static_cast<std::size_t>(regs.rt_control.count); | ||
| 708 | for (std::size_t index = 0; index < num_attachments; ++index) { | ||
| 707 | if (try_push(color_attachments[index])) { | 709 | if (try_push(color_attachments[index])) { |
| 708 | texture_cache.MarkColorBufferInUse(index); | 710 | texture_cache.MarkColorBufferInUse(index); |
| 709 | } | 711 | } |