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:
parent
0a2b134d49
commit
6f4ced5ed6
2 changed files with 6 additions and 5 deletions
|
|
@ -344,7 +344,7 @@ bool FFmpegVideoDecoder::createFrontendRenderer(PDECODER_PARAMETERS params, bool
|
||||||
#ifdef GL_IS_SLOW
|
#ifdef GL_IS_SLOW
|
||||||
glIsSlow = true;
|
glIsSlow = true;
|
||||||
#else
|
#else
|
||||||
glIsSlow = false;
|
glIsSlow = WMUtils::isGpuSlow();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -352,7 +352,7 @@ bool FFmpegVideoDecoder::createFrontendRenderer(PDECODER_PARAMETERS params, bool
|
||||||
#ifdef VULKAN_IS_SLOW
|
#ifdef VULKAN_IS_SLOW
|
||||||
vulkanIsSlow = true;
|
vulkanIsSlow = true;
|
||||||
#else
|
#else
|
||||||
vulkanIsSlow = false;
|
vulkanIsSlow = WMUtils::isGpuSlow();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1298,7 +1298,7 @@ bool FFmpegVideoDecoder::tryInitializeRendererForUnknownDecoder(const AVCodec* d
|
||||||
#ifdef GL_IS_SLOW
|
#ifdef GL_IS_SLOW
|
||||||
glIsSlow = true;
|
glIsSlow = true;
|
||||||
#else
|
#else
|
||||||
glIsSlow = false;
|
glIsSlow = WMUtils::isGpuSlow();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1306,7 +1306,7 @@ bool FFmpegVideoDecoder::tryInitializeRendererForUnknownDecoder(const AVCodec* d
|
||||||
#ifdef VULKAN_IS_SLOW
|
#ifdef VULKAN_IS_SLOW
|
||||||
vulkanIsSlow = true;
|
vulkanIsSlow = true;
|
||||||
#else
|
#else
|
||||||
vulkanIsSlow = false;
|
vulkanIsSlow = WMUtils::isGpuSlow();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,8 @@ bool WMUtils::isGpuSlow()
|
||||||
bool ret;
|
bool ret;
|
||||||
|
|
||||||
if (!Utils::getEnvironmentVariableOverride("GL_IS_SLOW", &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;
|
ret = true;
|
||||||
#else
|
#else
|
||||||
ret = false;
|
ret = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue