summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2021-10-30 01:50:32 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-16 22:11:33 +0100
commit6c97ab571a3d169d1d2a5472040d4373ea61184d (patch)
treefac74b1dab7c2b6d2b8e726f68147ccb31a0e629
parentShaderCache: Better fix for Shuffling gl_FragCoord (diff)
downloadyuzu-6c97ab571a3d169d1d2a5472040d4373ea61184d.tar
yuzu-6c97ab571a3d169d1d2a5472040d4373ea61184d.tar.gz
yuzu-6c97ab571a3d169d1d2a5472040d4373ea61184d.tar.bz2
yuzu-6c97ab571a3d169d1d2a5472040d4373ea61184d.tar.lz
yuzu-6c97ab571a3d169d1d2a5472040d4373ea61184d.tar.xz
yuzu-6c97ab571a3d169d1d2a5472040d4373ea61184d.tar.zst
yuzu-6c97ab571a3d169d1d2a5472040d4373ea61184d.zip
-rw-r--r--src/video_core/texture_cache/image_info.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/image_info.cpp b/src/video_core/texture_cache/image_info.cpp
index 015a2d33d..afb94082b 100644
--- a/src/video_core/texture_cache/image_info.cpp
+++ b/src/video_core/texture_cache/image_info.cpp
@@ -16,6 +16,7 @@ namespace VideoCommon {
using Tegra::Texture::TextureType;
using Tegra::Texture::TICEntry;
using VideoCore::Surface::PixelFormat;
+using VideoCore::Surface::SurfaceType;
ImageInfo::ImageInfo(const TICEntry& config) noexcept {
format = PixelFormatFromTextureInfo(config.format, config.r_type, config.g_type, config.b_type,
@@ -102,6 +103,7 @@ ImageInfo::ImageInfo(const TICEntry& config) noexcept {
layer_stride = CalculateLayerStride(*this);
maybe_unaligned_layer_stride = CalculateLayerSize(*this);
rescaleable &= (block.depth == 0) && resources.levels == 1;
+ rescaleable &= size.height > 256 || GetFormatType(format) != SurfaceType::ColorTexture;
downscaleable = size.height > 512;
}
}
@@ -136,6 +138,7 @@ ImageInfo::ImageInfo(const Tegra::Engines::Maxwell3D::Regs& regs, size_t index)
size.depth = rt.depth;
} else {
rescaleable = block.depth == 0;
+ rescaleable &= size.height > 256;
downscaleable = size.height > 512;
type = ImageType::e2D;
resources.layers = rt.depth;
@@ -200,6 +203,7 @@ ImageInfo::ImageInfo(const Tegra::Engines::Fermi2D::Surface& config) noexcept {
.depth = 1,
};
rescaleable = block.depth == 0;
+ rescaleable &= size.height > 256;
downscaleable = size.height > 512;
}
}