mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-10 13:44:17 +00:00
Add opt-in for Vulkan rendering for SDR content with PREFER_VULKAN=1
This commit is contained in:
parent
aac5ad3fd0
commit
333d97160e
1 changed files with 15 additions and 0 deletions
|
@ -330,6 +330,21 @@ bool FFmpegVideoDecoder::createFrontendRenderer(PDECODER_PARAMETERS params, bool
|
|||
delete m_FrontendRenderer;
|
||||
m_FrontendRenderer = nullptr;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef HAVE_LIBPLACEBO_VULKAN
|
||||
if (qgetenv("PREFER_VULKAN") == "1") {
|
||||
if (m_BackendRenderer->getRendererType() != IFFmpegRenderer::RendererType::Vulkan) {
|
||||
m_FrontendRenderer = new PlVkRenderer(m_BackendRenderer);
|
||||
if (m_FrontendRenderer->initialize(params)) {
|
||||
return true;
|
||||
}
|
||||
delete m_FrontendRenderer;
|
||||
m_FrontendRenderer = nullptr;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue