Browse Source

[vk] Adjustment BitScaleHelper

lizzie/evil-meow-meow
CamilleLaVey 6 months ago
committed by lizzie
parent
commit
f05b385ba3
  1. 12
      src/video_core/renderer_vulkan/vk_texture_cache.cpp

12
src/video_core/renderer_vulkan/vk_texture_cache.cpp

@ -2051,6 +2051,18 @@ bool Image::BlitScaleHelper(bool scale_up) {
using namespace VideoCommon;
static constexpr auto BLIT_OPERATION = Tegra::Engines::Fermi2D::Operation::SrcCopy;
const bool is_color{aspect_mask == VK_IMAGE_ASPECT_COLOR_BIT};
const bool has_depth = (aspect_mask & VK_IMAGE_ASPECT_DEPTH_BIT) != 0;
const bool has_stencil = (aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT) != 0;
const bool is_depth_only = has_depth && !has_stencil;
const bool is_stencil_only = has_stencil && !has_depth;
if ((is_depth_only || is_stencil_only) && info.num_samples == 1) {
const VkImage src_image = scale_up ? *original_image : *scaled_image;
const VkImage dst_image = scale_up ? *scaled_image : *original_image;
BlitScale(*scheduler, src_image, dst_image, info, aspect_mask, runtime->resolution,
/*supports_linear_filter=*/false, scale_up);
return true;
}
const bool supports_linear_filter = runtime->SupportsLinearFilter(info.format);
const bool is_bilinear = is_color && supports_linear_filter;
const auto filter_mode = is_bilinear ? Tegra::Engines::Fermi2D::Filter::Bilinear

Loading…
Cancel
Save