summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/texture_cache/image_info.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/video_core/texture_cache/image_info.cpp b/src/video_core/texture_cache/image_info.cpp
index e8ddde691..b72788c6d 100644
--- a/src/video_core/texture_cache/image_info.cpp
+++ b/src/video_core/texture_cache/image_info.cpp
@@ -22,6 +22,9 @@ using Tegra::Texture::TICEntry;
22using VideoCore::Surface::PixelFormat; 22using VideoCore::Surface::PixelFormat;
23using VideoCore::Surface::SurfaceType; 23using VideoCore::Surface::SurfaceType;
24 24
25constexpr u32 RescaleHeightThreshold = 288;
26constexpr u32 DownscaleHeightThreshold = 512;
27
25ImageInfo::ImageInfo(const TICEntry& config) noexcept { 28ImageInfo::ImageInfo(const TICEntry& config) noexcept {
26 forced_flushed = config.IsPitchLinear() && !Settings::values.use_reactive_flushing.GetValue(); 29 forced_flushed = config.IsPitchLinear() && !Settings::values.use_reactive_flushing.GetValue();
27 dma_downloaded = forced_flushed; 30 dma_downloaded = forced_flushed;
@@ -113,8 +116,9 @@ ImageInfo::ImageInfo(const TICEntry& config) noexcept {
113 layer_stride = CalculateLayerStride(*this); 116 layer_stride = CalculateLayerStride(*this);
114 maybe_unaligned_layer_stride = CalculateLayerSize(*this); 117 maybe_unaligned_layer_stride = CalculateLayerSize(*this);
115 rescaleable &= (block.depth == 0) && resources.levels == 1; 118 rescaleable &= (block.depth == 0) && resources.levels == 1;
116 rescaleable &= size.height > 256 || GetFormatType(format) != SurfaceType::ColorTexture; 119 rescaleable &= size.height > RescaleHeightThreshold ||
117 downscaleable = size.height > 512; 120 GetFormatType(format) != SurfaceType::ColorTexture;
121 downscaleable = size.height > DownscaleHeightThreshold;
118 } 122 }
119} 123}
120 124
@@ -152,8 +156,8 @@ ImageInfo::ImageInfo(const Maxwell3D::Regs::RenderTargetConfig& ct,
152 size.depth = ct.depth; 156 size.depth = ct.depth;
153 } else { 157 } else {
154 rescaleable = block.depth == 0; 158 rescaleable = block.depth == 0;
155 rescaleable &= size.height > 256; 159 rescaleable &= size.height > RescaleHeightThreshold;
156 downscaleable = size.height > 512; 160 downscaleable = size.height > DownscaleHeightThreshold;
157 type = ImageType::e2D; 161 type = ImageType::e2D;
158 resources.layers = ct.depth; 162 resources.layers = ct.depth;
159 } 163 }
@@ -232,8 +236,8 @@ ImageInfo::ImageInfo(const Fermi2D::Surface& config) noexcept {
232 .height = config.height, 236 .height = config.height,
233 .depth = 1, 237 .depth = 1,
234 }; 238 };
235 rescaleable = block.depth == 0 && size.height > 256; 239 rescaleable = block.depth == 0 && size.height > RescaleHeightThreshold;
236 downscaleable = size.height > 512; 240 downscaleable = size.height > DownscaleHeightThreshold;
237 } 241 }
238} 242}
239 243
@@ -275,8 +279,8 @@ ImageInfo::ImageInfo(const Tegra::DMA::ImageOperand& config) noexcept {
275 resources.layers = 1; 279 resources.layers = 1;
276 layer_stride = CalculateLayerStride(*this); 280 layer_stride = CalculateLayerStride(*this);
277 maybe_unaligned_layer_stride = CalculateLayerSize(*this); 281 maybe_unaligned_layer_stride = CalculateLayerSize(*this);
278 rescaleable = block.depth == 0 && size.height > 256; 282 rescaleable = block.depth == 0 && size.height > RescaleHeightThreshold;
279 downscaleable = size.height > 512; 283 downscaleable = size.height > DownscaleHeightThreshold;
280} 284}
281 285
282} // namespace VideoCommon 286} // namespace VideoCommon