mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-02-16 02:30:52 +00:00
Assume GPUs on non-x86 platforms are slow by default
This can be overriden with GL_IS_SLOW=0 at runtime for systems with a fast GPU, though it doesn't make much difference either way for non-KMSDRM cases. For slower GPUs, this enables important scaling and rendering optimizations that can substantially improve performance (especially on fillrate-limited GPUs common in SBCs).
This commit is contained in:
@@ -344,7 +344,7 @@ bool FFmpegVideoDecoder::createFrontendRenderer(PDECODER_PARAMETERS params, bool
|
||||
#ifdef GL_IS_SLOW
|
||||
glIsSlow = true;
|
||||
#else
|
||||
glIsSlow = false;
|
||||
glIsSlow = WMUtils::isGpuSlow();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ bool FFmpegVideoDecoder::createFrontendRenderer(PDECODER_PARAMETERS params, bool
|
||||
#ifdef VULKAN_IS_SLOW
|
||||
vulkanIsSlow = true;
|
||||
#else
|
||||
vulkanIsSlow = false;
|
||||
vulkanIsSlow = WMUtils::isGpuSlow();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1298,7 +1298,7 @@ bool FFmpegVideoDecoder::tryInitializeRendererForUnknownDecoder(const AVCodec* d
|
||||
#ifdef GL_IS_SLOW
|
||||
glIsSlow = true;
|
||||
#else
|
||||
glIsSlow = false;
|
||||
glIsSlow = WMUtils::isGpuSlow();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1306,7 +1306,7 @@ bool FFmpegVideoDecoder::tryInitializeRendererForUnknownDecoder(const AVCodec* d
|
||||
#ifdef VULKAN_IS_SLOW
|
||||
vulkanIsSlow = true;
|
||||
#else
|
||||
vulkanIsSlow = false;
|
||||
vulkanIsSlow = WMUtils::isGpuSlow();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -210,7 +210,8 @@ bool WMUtils::isGpuSlow()
|
||||
bool ret;
|
||||
|
||||
if (!Utils::getEnvironmentVariableOverride("GL_IS_SLOW", &ret)) {
|
||||
#ifdef GL_IS_SLOW
|
||||
#if defined(GL_IS_SLOW) || !defined(Q_PROCESSOR_X86)
|
||||
// We currently assume GPUs on non-x86 hardware are slow by default
|
||||
ret = true;
|
||||
#else
|
||||
ret = false;
|
||||
|
||||
Reference in New Issue
Block a user