vk: make upscaler dynamic

The config option was marked as dynamic, but was never actually changed ingame
This commit is contained in:
Megamouse 2021-11-05 00:02:33 +01:00
parent dac0baac0d
commit 88bb26afb4
2 changed files with 8 additions and 3 deletions

View File

@ -384,6 +384,7 @@ private:
std::unique_ptr<vk::text_writer> m_text_writer;
std::unique_ptr<vk::upscaler> m_upscaler;
bool m_use_fsr_upscaling{false};
std::unique_ptr<vk::buffer> m_cond_render_buffer;
u64 m_cond_render_sync_tag = 0;

View File

@ -595,9 +595,13 @@ void VKGSRender::flip(const rsx::display_flip_info_t& info)
target_layout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
}
if (!m_upscaler)
const bool use_fsr_upscaling = g_cfg.video.vk.fsr_upscaling.get();
if (!m_upscaler || m_use_fsr_upscaling != use_fsr_upscaling)
{
if (g_cfg.video.vk.fsr_upscaling)
m_use_fsr_upscaling = use_fsr_upscaling;
if (m_use_fsr_upscaling)
{
m_upscaler = std::make_unique<vk::fsr_upscale_pass>();
}
@ -616,7 +620,7 @@ void VKGSRender::flip(const rsx::display_flip_info_t& info)
if (image_to_flip) calibration_src.push_back(image_to_flip);
if (image_to_flip2) calibration_src.push_back(image_to_flip2);
if (g_cfg.video.vk.fsr_upscaling && !avconfig._3d) // 3D will be implemented later
if (m_use_fsr_upscaling && !avconfig._3d) // 3D will be implemented later
{
// Run upscaling pass before the rest of the output effects pipeline
// This can be done with all upscalers but we already get bilinear upscaling for free if we just out the filters directly