mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 07:57:58 -05:00
Vulkan Texture Cache: Limit render area to the max width/height of the targets.
This commit is contained in:
@ -26,6 +26,7 @@ struct RenderTargets {
|
||||
ImageViewId depth_buffer_id{};
|
||||
std::array<u8, NUM_RT> draw_buffers{};
|
||||
Extent2D size{};
|
||||
bool is_rescaled{};
|
||||
};
|
||||
|
||||
} // namespace VideoCommon
|
||||
|
@ -357,6 +357,7 @@ void TextureCache<P>::UpdateRenderTargets(bool is_clear) {
|
||||
(maxwell3d->regs.render_area.width * up_scale) >> down_shift,
|
||||
(maxwell3d->regs.render_area.height * up_scale) >> down_shift,
|
||||
};
|
||||
render_targets.is_rescaled = is_rescaling;
|
||||
|
||||
flags[Dirty::DepthBiasGlobal] = true;
|
||||
}
|
||||
@ -1962,6 +1963,7 @@ std::pair<FramebufferId, ImageViewId> TextureCache<P>::RenderTargetFromImage(
|
||||
.color_buffer_ids = {color_view_id},
|
||||
.depth_buffer_id = depth_view_id,
|
||||
.size = {extent.width >> samples_x, extent.height >> samples_y},
|
||||
.is_rescaled = is_rescaled,
|
||||
});
|
||||
return {framebuffer_id, view_id};
|
||||
}
|
||||
|
Reference in New Issue
Block a user