diff --git a/.pick_status.json b/.pick_status.json index 7af3704d558..7303e59bb82 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -214,7 +214,7 @@ "description": "zink/kopper: Set VK_COMPOSITE_ALPHA_OPAQUE_BIT when PresentOpaque is set", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "8ade5588e39d736bdeab9bdd8ffa7cbfb6a5191e", "notes": null diff --git a/include/kopper_interface.h b/include/kopper_interface.h index fa1f001a728..b1162a95610 100644 --- a/include/kopper_interface.h +++ b/include/kopper_interface.h @@ -97,6 +97,7 @@ struct kopper_loader_info { struct kopper_vk_surface_create_storage bos; int has_alpha; int initial_swap_interval; + bool present_opaque; }; #define __DRI_KOPPER_LOADER "DRI_KopperLoader" diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index f8207a2b69d..623e05a3631 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -2760,6 +2760,7 @@ kopperSetSurfaceCreateInfo(void *_draw, struct kopper_loader_info *out) wlsci->flags = 0; wlsci->display = dri2_dpy->wl_dpy; wlsci->surface = dri2_surf->wl_surface_wrapper; + out->present_opaque = dri2_surf->base.PresentOpaque; } static const __DRIkopperLoaderExtension kopper_loader_extension = { diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index 8d0999cbf49..97436a0254b 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -1454,6 +1454,7 @@ kopperSetSurfaceCreateInfo(void *_draw, struct kopper_loader_info *ci) xcb->connection = dri2_dpy->conn; xcb->window = dri2_surf->drawable; ci->has_alpha = dri2_surf->depth == 32; + ci->present_opaque = dri2_surf->base.PresentOpaque; } static const __DRIkopperLoaderExtension kopper_loader_extension = { diff --git a/src/gallium/drivers/zink/zink_kopper.c b/src/gallium/drivers/zink/zink_kopper.c index f61fec45993..949ee8e88bf 100644 --- a/src/gallium/drivers/zink/zink_kopper.c +++ b/src/gallium/drivers/zink/zink_kopper.c @@ -283,7 +283,9 @@ kopper_CreateSwapchain(struct zink_screen *screen, struct kopper_displaytarget * cswap->scci.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE; cswap->scci.queueFamilyIndexCount = 0; cswap->scci.pQueueFamilyIndices = NULL; - cswap->scci.compositeAlpha = has_alpha ? VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR : VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; + cswap->scci.compositeAlpha = has_alpha && !cdt->info.present_opaque + ? VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR + : VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; cswap->scci.clipped = VK_TRUE; } cswap->scci.presentMode = cdt->present_mode;