mirror of https://github.com/mpv-player/mpv
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:
parent
3c76afa05b
commit
a8d91b0b13
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue