summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2021-10-15 22:59:16 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-16 22:11:31 +0100
commitb7ccc58f235d9e442677eb10259b7196a387c6bc (patch)
tree2a479e907e8019b81aaeb99c5a1966ec05b5aab0 /src/video_core
parenttexture_cache_base: Remove unused function declarations (diff)
downloadyuzu-b7ccc58f235d9e442677eb10259b7196a387c6bc.tar
yuzu-b7ccc58f235d9e442677eb10259b7196a387c6bc.tar.gz
yuzu-b7ccc58f235d9e442677eb10259b7196a387c6bc.tar.bz2
yuzu-b7ccc58f235d9e442677eb10259b7196a387c6bc.tar.lz
yuzu-b7ccc58f235d9e442677eb10259b7196a387c6bc.tar.xz
yuzu-b7ccc58f235d9e442677eb10259b7196a387c6bc.tar.zst
yuzu-b7ccc58f235d9e442677eb10259b7196a387c6bc.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/texture_cache/image_info.cpp4
-rw-r--r--src/video_core/texture_cache/image_info.h1
-rw-r--r--src/video_core/texture_cache/texture_cache.h3
3 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/image_info.cpp b/src/video_core/texture_cache/image_info.cpp
index 7fa8fd4fe..d8e414247 100644
--- a/src/video_core/texture_cache/image_info.cpp
+++ b/src/video_core/texture_cache/image_info.cpp
@@ -102,6 +102,7 @@ ImageInfo::ImageInfo(const TICEntry& config) noexcept {
layer_stride = CalculateLayerStride(*this);
maybe_unaligned_layer_stride = CalculateLayerSize(*this);
rescaleable &= (block.depth == 0) && resources.levels == 1;
+ downscaleable = size.height > 512;
}
}
@@ -135,6 +136,7 @@ ImageInfo::ImageInfo(const Tegra::Engines::Maxwell3D::Regs& regs, size_t index)
size.depth = rt.depth;
} else {
rescaleable = block.depth == 0 && size.height > 256;
+ downscaleable = size.height > 512;
type = ImageType::e2D;
resources.layers = rt.depth;
}
@@ -164,6 +166,7 @@ ImageInfo::ImageInfo(const Tegra::Engines::Maxwell3D::Regs& regs) noexcept {
size.depth = regs.zeta_depth;
} else {
rescaleable = block.depth == 0 && size.height > 256;
+ downscaleable = size.height > 512;
type = ImageType::e2D;
resources.layers = regs.zeta_depth;
}
@@ -197,6 +200,7 @@ ImageInfo::ImageInfo(const Tegra::Engines::Fermi2D::Surface& config) noexcept {
.depth = 1,
};
rescaleable = block.depth == 0 && size.height > 256;
+ downscaleable = size.height > 512;
}
}
diff --git a/src/video_core/texture_cache/image_info.h b/src/video_core/texture_cache/image_info.h
index e874d2870..5932dcaba 100644
--- a/src/video_core/texture_cache/image_info.h
+++ b/src/video_core/texture_cache/image_info.h
@@ -34,6 +34,7 @@ struct ImageInfo {
u32 num_samples = 1;
u32 tile_width_spacing = 0;
bool rescaleable = false;
+ bool downscaleable = false;
};
} // namespace VideoCommon
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index c1fb12679..261cb6c48 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -798,6 +798,9 @@ bool TextureCache<P>::ImageCanRescale(ImageBase& image) {
if (!image.info.rescaleable || True(image.flags & ImageFlagBits::Blacklisted)) {
return false;
}
+ if (Settings::values.resolution_info.downscale && !image.info.downscaleable) {
+ return false;
+ }
if (True(image.flags & (ImageFlagBits::Rescaled | ImageFlagBits::CheckingRescalable))) {
return true;
}