From a8d91b0b130e6e41b2aff142007531f4c3b1e88a Mon Sep 17 00:00:00 2001 From: der richter Date: Fri, 18 Oct 2024 20:28:46 +0200 Subject: [PATCH] mac/vulkan: add retrieval of color depth and return auto (0) this effectively disables the workaround that picks the color/dither depth based on the source and instead picks it based on the output surface/pixel format. macOS apparently always operates at 10bit internally regardless of the display's bit depth. this changed at some point in the more recent macOS versions, where previously macOS operated at a frame buffer depth corresponding to the display. either 30-Bit Color (ARGB2101010) for 10bit or 24-Bit Color (ARGB8888) for 8bit. Fixes #13767 --- video/out/vulkan/context_mac.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/video/out/vulkan/context_mac.m b/video/out/vulkan/context_mac.m index ee07226b38..204e55d0ca 100644 --- a/video/out/vulkan/context_mac.m +++ b/video/out/vulkan/context_mac.m @@ -50,6 +50,11 @@ static void mac_vk_get_vsync(struct ra_ctx *ctx, struct vo_vsync_info *info) [p->vo_mac fillVsyncWithInfo:info]; } +static int mac_vk_color_depth(struct ra_ctx *ctx) +{ + return 0; +} + static bool mac_vk_init(struct ra_ctx *ctx) { struct priv *p = ctx->priv = talloc_zero(ctx, struct priv); @@ -78,6 +83,7 @@ static bool mac_vk_init(struct ra_ctx *ctx) struct ra_vk_ctx_params params = { .swap_buffers = mac_vk_swap_buffers, .get_vsync = mac_vk_get_vsync, + .color_depth = mac_vk_color_depth, }; VkInstance inst = vk->vkinst->instance;