mirror of
https://github.com/brl/mutter.git
synced 2025-01-14 21:55:51 +00:00
renderer/native: Allow forcing EGLStream backend
The GBM support in the NVIDIA driver is fairly new, and to make it easier to identify whether a problem encountered is related to using GBM instead of EGLStreams, add a debug environment variable to force using EGLStream instead of GBM. To force using EGLStream instead of GBM, use MUTTER_DEBUG_FORCE_EGL_STREAM=1 Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2045 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2132>
This commit is contained in:
parent
3cd77f8a79
commit
d43cc776ef
@ -1664,7 +1664,7 @@ meta_renderer_native_create_renderer_gpu_data (MetaRendererNative *renderer_nat
|
|||||||
MetaBackend *backend = meta_renderer_get_backend (renderer);
|
MetaBackend *backend = meta_renderer_get_backend (renderer);
|
||||||
MetaDevicePool *device_pool =
|
MetaDevicePool *device_pool =
|
||||||
meta_backend_native_get_device_pool (META_BACKEND_NATIVE (backend));
|
meta_backend_native_get_device_pool (META_BACKEND_NATIVE (backend));
|
||||||
MetaRendererNativeGpuData *gbm_renderer_gpu_data;
|
MetaRendererNativeGpuData *gbm_renderer_gpu_data = NULL;
|
||||||
MetaDeviceFileFlags device_file_flags = META_DEVICE_FILE_FLAG_NONE;
|
MetaDeviceFileFlags device_file_flags = META_DEVICE_FILE_FLAG_NONE;
|
||||||
g_autoptr (MetaDeviceFile) device_file = NULL;
|
g_autoptr (MetaDeviceFile) device_file = NULL;
|
||||||
GError *gbm_error = NULL;
|
GError *gbm_error = NULL;
|
||||||
@ -1687,6 +1687,10 @@ meta_renderer_native_create_renderer_gpu_data (MetaRendererNative *renderer_nat
|
|||||||
if (!device_file)
|
if (!device_file)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
#ifdef HAVE_EGL_DEVICE
|
||||||
|
if (g_strcmp0 (getenv ("MUTTER_DEBUG_FORCE_EGL_STREAM"), "1") != 0)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
gbm_renderer_gpu_data = create_renderer_gpu_data_gbm (renderer_native,
|
gbm_renderer_gpu_data = create_renderer_gpu_data_gbm (renderer_native,
|
||||||
device_file,
|
device_file,
|
||||||
gpu_kms,
|
gpu_kms,
|
||||||
@ -1698,6 +1702,14 @@ meta_renderer_native_create_renderer_gpu_data (MetaRendererNative *renderer_nat
|
|||||||
if (meta_render_device_is_hardware_accelerated (render_device))
|
if (meta_render_device_is_hardware_accelerated (render_device))
|
||||||
return gbm_renderer_gpu_data;
|
return gbm_renderer_gpu_data;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#ifdef HAVE_EGL_DEVICE
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_set_error (&gbm_error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
|
"GBM backend was disabled using env var");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_EGL_DEVICE
|
#ifdef HAVE_EGL_DEVICE
|
||||||
egl_stream_renderer_gpu_data =
|
egl_stream_renderer_gpu_data =
|
||||||
|
Loading…
Reference in New Issue
Block a user