yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

Texture Cache: Correctly fix Blits Rescaling.

This commit is contained in:
Fernando Sahmkow 2021-08-07 02:15:24 +02:00
parent 8f78444de3
commit 4b1393a691
1 changed files with 12 additions and 9 deletions

View File

@ -473,18 +473,21 @@ void TextureCache<P>::BlitImage(const Tegra::Engines::Fermi2D::Surface& dst,
PrepareImage(dst_id, true, false); PrepareImage(dst_id, true, false);
Image& dst_image = slot_images[dst_id]; Image& dst_image = slot_images[dst_id];
const Image& src_image = slot_images[src_id]; Image& src_image = slot_images[src_id];
const bool is_src_rescaled = True(src_image.flags & ImageFlagBits::Rescaled); bool is_src_rescaled = True(src_image.flags & ImageFlagBits::Rescaled);
bool is_dst_rescaled = True(dst_image.flags & ImageFlagBits::Rescaled); bool is_dst_rescaled = True(dst_image.flags & ImageFlagBits::Rescaled);
// TODO: This requires the rendertarget image views to be updated with the upscaled sizes, if (is_src_rescaled != is_dst_rescaled) {
// otherwise the blit will use a larger framebuffer size than the image view attachment. if (ImageCanRescale(dst_image)) {
// if (is_src_rescaled && !is_dst_rescaled) { ScaleUp(dst_image);
// if (ImageCanRescale(dst_image)) { is_dst_rescaled = True(dst_image.flags & ImageFlagBits::Rescaled);
// is_dst_rescaled = dst_image.ScaleUp(); }
// } if (ImageCanRescale(src_image)) {
// } ScaleUp(src_image);
is_src_rescaled = True(src_image.flags & ImageFlagBits::Rescaled);
}
}
const auto& resolution = Settings::values.resolution_info; const auto& resolution = Settings::values.resolution_info;
const auto scale_up = [&](u32 value) -> u32 { const auto scale_up = [&](u32 value) -> u32 {