mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 06:30:55 +00:00
Add VAAPI_FORCE_DIRECT and VAAPI_FORCE_INDIRECT env vars to control rendering technique
This commit is contained in:
@@ -323,6 +323,17 @@ VAAPIRenderer::needsTestFrame()
|
|||||||
bool
|
bool
|
||||||
VAAPIRenderer::isDirectRenderingSupported()
|
VAAPIRenderer::isDirectRenderingSupported()
|
||||||
{
|
{
|
||||||
|
if (qgetenv("VAAPI_FORCE_DIRECT") == "1") {
|
||||||
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
"Using direct rendering due to environment variable");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (qgetenv("VAAPI_FORCE_INDIRECT") == "1") {
|
||||||
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
"Using indirect rendering due to environment variable");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// We only support direct rendering on X11 with VAEntrypointVideoProc support
|
// We only support direct rendering on X11 with VAEntrypointVideoProc support
|
||||||
if (m_WindowSystem != SDL_SYSWM_X11 || m_BlacklistedForDirectRendering) {
|
if (m_WindowSystem != SDL_SYSWM_X11 || m_BlacklistedForDirectRendering) {
|
||||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
|||||||
Reference in New Issue
Block a user