summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2022-10-30 20:47:34 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2022-10-30 21:24:28 +0100
commit67e0d3815257d081ac35b5e5f98b173a493222c7 (patch)
tree70ab4171164d68912b2133f9dade706690b1852e /src
parentMerge pull request #9151 from liamwhite/dram-size (diff)
downloadyuzu-67e0d3815257d081ac35b5e5f98b173a493222c7.tar
yuzu-67e0d3815257d081ac35b5e5f98b173a493222c7.tar.gz
yuzu-67e0d3815257d081ac35b5e5f98b173a493222c7.tar.bz2
yuzu-67e0d3815257d081ac35b5e5f98b173a493222c7.tar.lz
yuzu-67e0d3815257d081ac35b5e5f98b173a493222c7.tar.xz
yuzu-67e0d3815257d081ac35b5e5f98b173a493222c7.tar.zst
yuzu-67e0d3815257d081ac35b5e5f98b173a493222c7.zip
Diffstat (limited to '')
-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,
const auto& resolution = runtime.resolution;
- u32 width = 0;
- u32 height = 0;
+ u32 width = std::numeric_limits<u32>::max();
+ u32 height = std::numeric_limits<u32>::max();
for (size_t index = 0; index < NUM_RT; ++index) {
const ImageView* const color_buffer = color_buffers[index];
if (!color_buffer) {
renderpass_key.color_formats[index] = PixelFormat::Invalid;
continue;
}
- width = std::max(width, is_rescaled ? resolution.ScaleUp(color_buffer->size.width)
+ width = std::min(width, is_rescaled ? resolution.ScaleUp(color_buffer->size.width)
: color_buffer->size.width);
- height = std::max(height, is_rescaled ? resolution.ScaleUp(color_buffer->size.height)
+ height = std::min(height, is_rescaled ? resolution.ScaleUp(color_buffer->size.height)
: color_buffer->size.height);
attachments.push_back(color_buffer->RenderTarget());
renderpass_key.color_formats[index] = color_buffer->format;
@@ -1804,9 +1804,9 @@ void Framebuffer::CreateFramebuffer(TextureCacheRuntime& runtime,
}
const size_t num_colors = attachments.size();
if (depth_buffer) {
- width = std::max(width, is_rescaled ? resolution.ScaleUp(depth_buffer->size.width)
+ width = std::min(width, is_rescaled ? resolution.ScaleUp(depth_buffer->size.width)
: depth_buffer->size.width);
- height = std::max(height, is_rescaled ? resolution.ScaleUp(depth_buffer->size.height)
+ height = std::min(height, is_rescaled ? resolution.ScaleUp(depth_buffer->size.height)
: depth_buffer->size.height);
attachments.push_back(depth_buffer->RenderTarget());
renderpass_key.depth_format = depth_buffer->format;