Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HACK] For Vulkan surfaces, assume opaque alpha composition. #71

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/wayland-eglsurface.c
Expand Up @@ -1021,8 +1021,14 @@ acquire_surface_image(WlEglDisplay *display, WlEglSurface *surface)
/*
* Before sending the format, check if we are ignoring alpha due to a
* surface attribute.
*
* HACK: Also ignore alpha if this is a Vulkan surface.
* Currently the best way to detect a Vulkan surface is 'isSurfaceProducer',
* and the Vulkan driver only exposes OPAQUE_BIT for VK_KHR_surface.
* If the driver exposes more bits, this check should be updated with it!
* -flibit
*/
if (surface->presentOpaque) {
if (surface->presentOpaque || !surface->isSurfaceProducer) {
/*
* We are ignoring alpha, so we need to find a DRM_FORMAT_* that is equivalent to
* the current format, but ignores the alpha. i.e. RGBA -> RGBX
Expand Down