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
This commit is contained in:
der richter 2024-10-18 20:28:46 +02:00
parent 3c76afa05b
commit a8d91b0b13
1 changed files with 6 additions and 0 deletions

View File

@ -50,6 +50,11 @@ static void mac_vk_get_vsync(struct ra_ctx *ctx, struct vo_vsync_info *info)
[p->vo_mac fillVsyncWithInfo: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) static bool mac_vk_init(struct ra_ctx *ctx)
{ {
struct priv *p = ctx->priv = talloc_zero(ctx, struct priv); 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 = { struct ra_vk_ctx_params params = {
.swap_buffers = mac_vk_swap_buffers, .swap_buffers = mac_vk_swap_buffers,
.get_vsync = mac_vk_get_vsync, .get_vsync = mac_vk_get_vsync,
.color_depth = mac_vk_color_depth,
}; };
VkInstance inst = vk->vkinst->instance; VkInstance inst = vk->vkinst->instance;