mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-29 18:22:47 +01:00
Vulkan: Fix regression caused by limiting render area to width/height of rendef targets.
This commit is contained in:
parent
e09756b2df
commit
67e0d38152
1 changed files with 6 additions and 6 deletions
|
@ -1782,17 +1782,17 @@ void Framebuffer::CreateFramebuffer(TextureCacheRuntime& runtime,
|
||||||
|
|
||||||
const auto& resolution = runtime.resolution;
|
const auto& resolution = runtime.resolution;
|
||||||
|
|
||||||
u32 width = 0;
|
u32 width = std::numeric_limits<u32>::max();
|
||||||
u32 height = 0;
|
u32 height = std::numeric_limits<u32>::max();
|
||||||
for (size_t index = 0; index < NUM_RT; ++index) {
|
for (size_t index = 0; index < NUM_RT; ++index) {
|
||||||
const ImageView* const color_buffer = color_buffers[index];
|
const ImageView* const color_buffer = color_buffers[index];
|
||||||
if (!color_buffer) {
|
if (!color_buffer) {
|
||||||
renderpass_key.color_formats[index] = PixelFormat::Invalid;
|
renderpass_key.color_formats[index] = PixelFormat::Invalid;
|
||||||
continue;
|
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);
|
: 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);
|
: color_buffer->size.height);
|
||||||
attachments.push_back(color_buffer->RenderTarget());
|
attachments.push_back(color_buffer->RenderTarget());
|
||||||
renderpass_key.color_formats[index] = color_buffer->format;
|
renderpass_key.color_formats[index] = color_buffer->format;
|
||||||
|
@ -1804,9 +1804,9 @@ void Framebuffer::CreateFramebuffer(TextureCacheRuntime& runtime,
|
||||||
}
|
}
|
||||||
const size_t num_colors = attachments.size();
|
const size_t num_colors = attachments.size();
|
||||||
if (depth_buffer) {
|
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);
|
: 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);
|
: depth_buffer->size.height);
|
||||||
attachments.push_back(depth_buffer->RenderTarget());
|
attachments.push_back(depth_buffer->RenderTarget());
|
||||||
renderpass_key.depth_format = depth_buffer->format;
|
renderpass_key.depth_format = depth_buffer->format;
|
||||||
|
|
Loading…
Reference in a new issue