summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/TextureConverter.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2017-04-05 00:06:47 +1000
committerStenzek <stenzek@gmail.com>2017-04-12 00:11:22 +1000
commit5e7bd03d0b8aaf16b4baa716d73c4804760a84c0 (patch)
tree59f181cd075c67c482bfd00c2b4d69900cd3bf29 /Source/Core/VideoBackends/Vulkan/TextureConverter.cpp
parente9850aa0f270a1f735562db72d84860611ad7226 (diff)
Vulkan: Linear filter >1xIR EFB copies, matching the other backends
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/TextureConverter.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/TextureConverter.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/TextureConverter.cpp b/Source/Core/VideoBackends/Vulkan/TextureConverter.cpp
index ca5ebe94bc..1bc173d4ee 100644
--- a/Source/Core/VideoBackends/Vulkan/TextureConverter.cpp
+++ b/Source/Core/VideoBackends/Vulkan/TextureConverter.cpp
@@ -27,6 +27,7 @@
#include "VideoCommon/TextureConversionShader.h"
#include "VideoCommon/TextureDecoder.h"
+#include "VideoCommon/VideoConfig.h"
namespace Vulkan
{
@@ -242,10 +243,12 @@ void TextureConverter::EncodeTextureToMemory(VkImageView src_texture, u8* dest_p
scale_by_half ? 2 : 1};
draw.SetPushConstants(position_uniform, sizeof(position_uniform));
- // Doesn't make sense to linear filter depth values
- draw.SetPSSampler(0, src_texture, (scale_by_half && !is_depth_copy) ?
- g_object_cache->GetLinearSampler() :
- g_object_cache->GetPointSampler());
+ // We also linear filtering for both box filtering and downsampling higher resolutions to 1x
+ // TODO: This only produces perfect downsampling for 1.5x and 2x IR, other resolution will
+ // need more complex down filtering to average all pixels and produce the correct result.
+ bool linear_filter = (scale_by_half && !is_depth_copy) || g_ActiveConfig.iEFBScale != SCALE_1X;
+ draw.SetPSSampler(0, src_texture, linear_filter ? g_object_cache->GetLinearSampler() :
+ g_object_cache->GetPointSampler());
u32 render_width = bytes_per_row / sizeof(u32);
u32 render_height = num_blocks_y;