Skip to content

Commit

Permalink
vk: make upscaler dynamic
Browse files Browse the repository at this point in the history
The config option was marked as dynamic, but was never actually changed ingame
  • Loading branch information
Megamouse committed Nov 6, 2021
1 parent dac0baa commit 88bb26a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions rpcs3/Emu/RSX/VK/VKGSRender.h
Expand Up @@ -384,6 +384,7 @@ class VKGSRender : public GSRender, public ::rsx::reports::ZCULL_control

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;
Expand Down
10 changes: 7 additions & 3 deletions rpcs3/Emu/RSX/VK/VKPresent.cpp
Expand Up @@ -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>();
}
Expand All @@ -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
Expand Down

0 comments on commit 88bb26a

Please sign in to comment.