Closed wolfpld closed 7 months ago
We've actually re-worked our Vulkan Wayland WSI pretty heavily for the next major release (545) and this issue has been fixed as part of that. Credit to @dkorkmazturk
As of that version, support for both SRGB and UNORM will be advertised.
Thanks for the update!
This issue sounds like it just might be the caues of a related issue I'm encountering.. (OpenGL rather than Vulkan) Is that likely or should this be tracked separately?
I'm seeing the following when running an OpenGL application on Wayland with nVidia proprietary drivers..
error 7: failed to import supplied dmabufs: Unsupported buffer format 875713345
This only occurs when creating an EGL Context having the following attrib to define an SRGB colourspace
const EGLAttrib egl_surface_attribs[] = {
EGL_GL_COLORSPACE, EGL_GL_COLORSPACE_SRGB,
EGL_RENDER_BUFFER, EGL_BACK_BUFFER,
EGL_NONE,
};
In case the following is relevant:
GL_RENDERER: NVIDIA GeForce GTX 970/PCIe/SSE2
GL_VERSION: 4.6.0 NVIDIA 535.54.03
Fedora 38
GNOME 44.2
Linux 6.3.12-200.fc38.x86_64
Hmm, I don't think that's quite the same issue. Upstream DRM formats don't actually distinguish between sRGB and linear color spaces. However, 875713345 is not a valid upstream DRM format. It looks like our EGL driver defines some extra NVIDIA-specific formats which are used by our embedded Tegra platform. If we're trying to use those on a regular Linux system, though, that's probably a bug.
Thanks @erik-kz I've raised #85 seperately
Closing as fixed.
The
VK_KHR_wayland_surface
extension provides only a single surface formatVK_FORMAT_B8G8R8A8_UNORM
with color spaceVK_COLOR_SPACE_SRGB_NONLINEAR_KHR
.This seems to be a spec violation, which states (https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPhysicalDeviceSurfaceFormatsKHR.html):
Listing supported formats shows that both
VK_FORMAT_B8G8R8A8_UNORM
andVK_FORMAT_B8G8R8A8_SRGB
can indeed be used as a color attachment with optimal tiling.Note that
VK_KHR_xcb_surface
andVK_KHR_xlib_surface
extensions provide two surfaces,VK_FORMAT_B8G8R8A8_UNORM
andVK_FORMAT_B8G8R8A8_SRGB
.This is with driver 535.54.03.