summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2024-04-18 10:06:43 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2024-05-10 12:43:52 +0200
commit2b42577eece3c7f43ff1495374326e9bdc0140e1 (patch)
tree5d5dab0fd79a9d70b554b1145c5655f6da23fda6
parenta14eb9e00fbfdf0d3e2fbb1f7dfcc7b12fb6dc93 (diff)
Disable VAAPI without NativePixmap support
Pick-to: 6.7 Change-Id: I755ba82d43b3c67f7218ff2c3e5c8a5f819b2d64 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/core/ozone/ozone_platform_qt.cpp5
-rw-r--r--src/core/web_engine_context.cpp9
2 files changed, 10 insertions, 4 deletions
diff --git a/src/core/ozone/ozone_platform_qt.cpp b/src/core/ozone/ozone_platform_qt.cpp
index 4546a2b6a..623cf43cf 100644
--- a/src/core/ozone/ozone_platform_qt.cpp
+++ b/src/core/ozone/ozone_platform_qt.cpp
@@ -111,9 +111,10 @@ const ui::OzonePlatform::PlatformProperties &OzonePlatformQt::GetPlatformPropert
static base::NoDestructor<ui::OzonePlatform::PlatformProperties> properties;
static bool initialized = false;
if (!initialized) {
- properties->fetch_buffer_formats_for_gmb_on_gpu = true;
+ DCHECK(m_supportsNativePixmaps);
+ properties->fetch_buffer_formats_for_gmb_on_gpu = m_supportsNativePixmaps.value();
#if BUILDFLAG(USE_VAAPI)
- properties->supports_vaapi = true;
+ properties->supports_vaapi = m_supportsNativePixmaps.value();
#endif
initialized = true;
}
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index e803649cf..2017fa80c 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -926,7 +926,11 @@ WebEngineContext::WebEngineContext()
parsedCommandLine->AppendSwitch(cc::switches::kDisableCompositedAntialiasing);
}
-#if QT_CONFIG(webengine_vulkan) && defined(USE_OZONE)
+#if defined(USE_OZONE)
+ if (GPUInfo::instance()->vendor() == GPUInfo::Nvidia)
+ disableFeatures.push_back(media::kVaapiVideoDecodeLinux.name);
+
+#if QT_CONFIG(webengine_vulkan)
if (QQuickWindow::graphicsApi() == QSGRendererInterface::Vulkan) {
enableFeatures.push_back(features::kVulkan.name);
parsedCommandLine->AppendSwitchASCII(switches::kUseVulkan,
@@ -953,7 +957,8 @@ WebEngineContext::WebEngineContext()
qputenv(deviceExtensionsVar, requiredDeviceExtensions.join(';'));
}
}
-#endif // QT_CONFIG(webengine_vulkan) && defined(USE_OZONE)
+#endif // QT_CONFIG(webengine_vulkan)
+#endif // defined(USE_OZONE)
#if defined(Q_OS_WIN)
if (QQuickWindow::graphicsApi() == QSGRendererInterface::Direct3D11