summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2022-10-30 17:34:28 -0700
committerGravatar GitHub2022-10-30 17:34:28 -0700
commitf39d2cf78b7e77ae220f9b1b36ea43243b8aadc6 (patch)
tree258052ec3ccb554f5ddfc3638046bee38f0823ab
parentMerge pull request #9158 from liamwhite/single-bore (diff)
parentVulkan: Fix regression caused by limiting render area to width/height of rend... (diff)
downloadyuzu-f39d2cf78b7e77ae220f9b1b36ea43243b8aadc6.tar.gz
yuzu-f39d2cf78b7e77ae220f9b1b36ea43243b8aadc6.tar.xz
yuzu-f39d2cf78b7e77ae220f9b1b36ea43243b8aadc6.zip
Merge pull request #9155 from FernandoS27/goosfraba
Vulkan: Fix regression caused by limiting render area to width/height of render targets.
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
index 305ad8aee..6ad7efbdf 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
@@ -1782,17 +1782,17 @@ void Framebuffer::CreateFramebuffer(TextureCacheRuntime& runtime,
1782 1782
1783 const auto& resolution = runtime.resolution; 1783 const auto& resolution = runtime.resolution;
1784 1784
1785 u32 width = 0; 1785 u32 width = std::numeric_limits<u32>::max();
1786 u32 height = 0; 1786 u32 height = std::numeric_limits<u32>::max();
1787 for (size_t index = 0; index < NUM_RT; ++index) { 1787 for (size_t index = 0; index < NUM_RT; ++index) {
1788 const ImageView* const color_buffer = color_buffers[index]; 1788 const ImageView* const color_buffer = color_buffers[index];
1789 if (!color_buffer) { 1789 if (!color_buffer) {
1790 renderpass_key.color_formats[index] = PixelFormat::Invalid; 1790 renderpass_key.color_formats[index] = PixelFormat::Invalid;
1791 continue; 1791 continue;
1792 } 1792 }
1793 width = std::max(width, is_rescaled ? resolution.ScaleUp(color_buffer->size.width) 1793 width = std::min(width, is_rescaled ? resolution.ScaleUp(color_buffer->size.width)
1794 : color_buffer->size.width); 1794 : color_buffer->size.width);
1795 height = std::max(height, is_rescaled ? resolution.ScaleUp(color_buffer->size.height) 1795 height = std::min(height, is_rescaled ? resolution.ScaleUp(color_buffer->size.height)
1796 : color_buffer->size.height); 1796 : color_buffer->size.height);
1797 attachments.push_back(color_buffer->RenderTarget()); 1797 attachments.push_back(color_buffer->RenderTarget());
1798 renderpass_key.color_formats[index] = color_buffer->format; 1798 renderpass_key.color_formats[index] = color_buffer->format;
@@ -1804,9 +1804,9 @@ void Framebuffer::CreateFramebuffer(TextureCacheRuntime& runtime,
1804 } 1804 }
1805 const size_t num_colors = attachments.size(); 1805 const size_t num_colors = attachments.size();
1806 if (depth_buffer) { 1806 if (depth_buffer) {
1807 width = std::max(width, is_rescaled ? resolution.ScaleUp(depth_buffer->size.width) 1807 width = std::min(width, is_rescaled ? resolution.ScaleUp(depth_buffer->size.width)
1808 : depth_buffer->size.width); 1808 : depth_buffer->size.width);
1809 height = std::max(height, is_rescaled ? resolution.ScaleUp(depth_buffer->size.height) 1809 height = std::min(height, is_rescaled ? resolution.ScaleUp(depth_buffer->size.height)
1810 : depth_buffer->size.height); 1810 : depth_buffer->size.height);
1811 attachments.push_back(depth_buffer->RenderTarget()); 1811 attachments.push_back(depth_buffer->RenderTarget());
1812 renderpass_key.depth_format = depth_buffer->format; 1812 renderpass_key.depth_format = depth_buffer->format;