summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/settings.cpp2
-rw-r--r--src/common/settings.h1
-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
5 files changed, 11 insertions, 0 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index 12fdb0f9b..bc2c8c7d7 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -109,10 +109,12 @@ float Volume() {
109void UpdateRescalingInfo() { 109void UpdateRescalingInfo() {
110 const auto setup = values.resolution_setup.GetValue(); 110 const auto setup = values.resolution_setup.GetValue();
111 auto& info = values.resolution_info; 111 auto& info = values.resolution_info;
112 info.downscale = false;
112 switch (setup) { 113 switch (setup) {
113 case ResolutionSetup::Res1_2X: 114 case ResolutionSetup::Res1_2X:
114 info.up_scale = 1; 115 info.up_scale = 1;
115 info.down_shift = 1; 116 info.down_shift = 1;
117 info.downscale = true;
116 break; 118 break;
117 case ResolutionSetup::Res1X: 119 case ResolutionSetup::Res1X:
118 info.up_scale = 1; 120 info.up_scale = 1;
diff --git a/src/common/settings.h b/src/common/settings.h
index 09f7cdd84..a09db0822 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -72,6 +72,7 @@ struct ResolutionScalingInfo {
72 f32 up_factor{1.0f}; 72 f32 up_factor{1.0f};
73 f32 down_factor{1.0f}; 73 f32 down_factor{1.0f};
74 bool active{}; 74 bool active{};
75 bool downscale{};
75 76
76 s32 ScaleUp(s32 value) const { 77 s32 ScaleUp(s32 value) const {
77 if (value == 0) { 78 if (value == 0) {
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 {
102 layer_stride = CalculateLayerStride(*this); 102 layer_stride = CalculateLayerStride(*this);
103 maybe_unaligned_layer_stride = CalculateLayerSize(*this); 103 maybe_unaligned_layer_stride = CalculateLayerSize(*this);
104 rescaleable &= (block.depth == 0) && resources.levels == 1; 104 rescaleable &= (block.depth == 0) && resources.levels == 1;
105 downscaleable = size.height > 512;
105 } 106 }
106} 107}
107 108
@@ -135,6 +136,7 @@ ImageInfo::ImageInfo(const Tegra::Engines::Maxwell3D::Regs& regs, size_t index)
135 size.depth = rt.depth; 136 size.depth = rt.depth;
136 } else { 137 } else {
137 rescaleable = block.depth == 0 && size.height > 256; 138 rescaleable = block.depth == 0 && size.height > 256;
139 downscaleable = size.height > 512;
138 type = ImageType::e2D; 140 type = ImageType::e2D;
139 resources.layers = rt.depth; 141 resources.layers = rt.depth;
140 } 142 }
@@ -164,6 +166,7 @@ ImageInfo::ImageInfo(const Tegra::Engines::Maxwell3D::Regs& regs) noexcept {
164 size.depth = regs.zeta_depth; 166 size.depth = regs.zeta_depth;
165 } else { 167 } else {
166 rescaleable = block.depth == 0 && size.height > 256; 168 rescaleable = block.depth == 0 && size.height > 256;
169 downscaleable = size.height > 512;
167 type = ImageType::e2D; 170 type = ImageType::e2D;
168 resources.layers = regs.zeta_depth; 171 resources.layers = regs.zeta_depth;
169 } 172 }
@@ -197,6 +200,7 @@ ImageInfo::ImageInfo(const Tegra::Engines::Fermi2D::Surface& config) noexcept {
197 .depth = 1, 200 .depth = 1,
198 }; 201 };
199 rescaleable = block.depth == 0 && size.height > 256; 202 rescaleable = block.depth == 0 && size.height > 256;
203 downscaleable = size.height > 512;
200 } 204 }
201} 205}
202 206
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 {
34 u32 num_samples = 1; 34 u32 num_samples = 1;
35 u32 tile_width_spacing = 0; 35 u32 tile_width_spacing = 0;
36 bool rescaleable = false; 36 bool rescaleable = false;
37 bool downscaleable = false;
37}; 38};
38 39
39} // namespace VideoCommon 40} // 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) {
798 if (!image.info.rescaleable || True(image.flags & ImageFlagBits::Blacklisted)) { 798 if (!image.info.rescaleable || True(image.flags & ImageFlagBits::Blacklisted)) {
799 return false; 799 return false;
800 } 800 }
801 if (Settings::values.resolution_info.downscale && !image.info.downscaleable) {
802 return false;
803 }
801 if (True(image.flags & (ImageFlagBits::Rescaled | ImageFlagBits::CheckingRescalable))) { 804 if (True(image.flags & (ImageFlagBits::Rescaled | ImageFlagBits::CheckingRescalable))) {
802 return true; 805 return true;
803 } 806 }