Open Saviq opened 1 year ago
When we are on nvidia, we are selecting both rendering platforms:
[2023-11-06 12:35:48.280278] <information> mirserver: Selected rendering driver: mir:eglstream-kms (version 2.15.0) for device ((null): /dev/dri/card0)
[2023-11-06 12:35:48.280494] <information> mirserver: Selected rendering driver: mir:egl-generic (version 2.15.0) for platform
Later on, we seem to be trying to use the egl_wayland_allocator
:
[2023-11-06 12:35:49.420444] < -warning- > frontend:Wayland: Exception processing Surface::commit() request: /home/ubuntu/mir/src/platform/graphics/egl_wayland_allocator.cpp(97): Throw in function EGLint {anonymous}::get_wl_egl_format(wl_resource*, const mir::graphics::EGLExtensions&)
Dynamic exception type: boost::wrapexcept<std::system_error>
std::exception::what: Failed to query Wayland buffer format: EGL_SUCCESS (0x3000)
Which doesn't make sense, since we should be using eglstreams :smile:
Here are some logs to help in an investigation. They are quite curious, and I bet that there is something fishy going on with how we parse the platform-render-libs or how we use the selected libraries.
This only succeeds because we don't actually select egl-generic
for some reason when we manually select them (i.e. --platform-rendering-libs=mir:eglstream-kms,mir:egl-generic
)
Whenever we select egl-generic
in any capacity, we get the following two errors:
[2023-11-06 09:41:56.681814] <information> mirserver: Selected rendering driver: mir:egl-generic (version 2.15.0) for platform
[2023-11-06 09:41:56.751163] <information> platform-generic-egl: Cannot enable linux-dmabuf import support: Failed to query number of modifiers: EGL_BAD_PARAMETER (0x300c)
[2023-11-06 09:41:56.751320] < - debug - > platform-generic-egl: Detailed error: : /home/matthew/Github/mir/src/platform/graphics/linux_dmabuf.cpp(103): Throw in function mir::graphics::DmaBufFormatDescriptors::DmaBufFormatDescriptors(EGLDisplay, const mir::graphics::EGLExtensions::EXTImageDmaBufImportModifiers&)
Dynamic exception type: boost::wrapexcept<std::system_error>
std::exception::what: Failed to query number of modifiers: EGL_BAD_PARAMETER (0x300c)
...
[2023-11-06 09:41:57.005417] < -warning- > frontend:Wayland: Exception processing Surface::commit() request: /home/matthew/Github/mir/src/platform/graphics/egl_wayland_allocator.cpp(97): Throw in function EGLint {anonymous}::get_wl_egl_format(wl_resource*, const mir::graphics::EGLExtensions&)
Dynamic exception type: boost::wrapexcept<std::system_error>
std::exception::what: Failed to query Wayland buffer format: EGL_SUCCESS (0x3000)
Running the GLMark2Wayland.* tests on Nvidia we're getting an error on the Mir side:
And the client dying with: