backends/drm: enable format modifiers by default

Format modifiers enable the graphics hardware to be much more efficient,
especially when it comes to multi-gpu transfers. With the issues regarding
bandwidth limits now solved, enable them by default to make all supported
systems benefit from them.

CCBUG: 452397
CCBUG: 452219
This commit is contained in:
Xaver Hugl 2022-04-16 03:47:33 +02:00
parent 916f1f4ea8
commit 68a54a67b8

View file

@ -159,7 +159,7 @@ bool EglGbmLayerSurface::createGbmSurface(const QSize &size, uint32_t format, co
static bool modifiersEnvSet = false;
static const bool modifiersEnv = qEnvironmentVariableIntValue("KWIN_DRM_USE_MODIFIERS", &modifiersEnvSet) != 0;
const bool allowModifiers = m_eglBackend->gpu()->addFB2ModifiersSupported() && m_gpu->addFB2ModifiersSupported()
&& ((m_eglBackend->gpu()->isNVidia() && !modifiersEnvSet) || (modifiersEnvSet && modifiersEnv));
&& (!modifiersEnvSet || (modifiersEnvSet && modifiersEnv));
const auto config = m_eglBackend->config(format);