From d6641d7123a48fa7b644f81441f561ba0372f77f Mon Sep 17 00:00:00 2001 From: Niklas Haas <git@haasn.dev> Date: Mon, 19 Jul 2021 11:52:57 +0200 Subject: [PATCH] kmsdrm: Explicitly set the surface transform and alpha mode This is required by the specification. Set these to sensible defaults. Fixes a validation layer error that occurs otherwise. --- src/video/kmsdrm/SDL_kmsdrmvulkan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/video/kmsdrm/SDL_kmsdrmvulkan.c b/src/video/kmsdrm/SDL_kmsdrmvulkan.c index b08a41e78..3b80ac566 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvulkan.c +++ b/src/video/kmsdrm/SDL_kmsdrmvulkan.c @@ -427,6 +427,8 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, /* For now, simply use the first plane. */ display_plane_surface_create_info.planeIndex = 0; display_plane_surface_create_info.imageExtent = image_size; + display_plane_surface_create_info.transform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; + display_plane_surface_create_info.alphaMode = VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR; result = vkCreateDisplayPlaneSurfaceKHR(instance, &display_plane_surface_create_info, NULL,