From 3b1ffe0468a7cc7f646b3eb18959afd368e1ac6d Mon Sep 17 00:00:00 2001 From: Craig Holliday Date: Thu, 29 Feb 2024 12:23:08 -0700 Subject: [PATCH] vulkan/context: Temporary logs to debug MoltenVK context --- video/out/vulkan/context_moltenvk.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/video/out/vulkan/context_moltenvk.m b/video/out/vulkan/context_moltenvk.m index 5124280bb2309..03739d145aa98 100644 --- a/video/out/vulkan/context_moltenvk.m +++ b/video/out/vulkan/context_moltenvk.m @@ -34,12 +34,14 @@ @implementation MetalLayerDelegate - (id)initWithContext: (struct ra_ctx*) ctx { + MP_MSG(ctx, "### MetalLayerDelegate > Called initWithContext\n"); _ra_ctx = ctx; return self; } - (void)layoutSublayersOfLayer: (CALayer*) layer { + MP_MSG(_ra_ctx, "### MetalLayerDelegate > Called layoutSublayersOfLayer\n"); moltenvk_reconfig(_ra_ctx); } @@ -96,6 +98,9 @@ static bool moltenvk_init(struct ra_ctx *ctx) p->delegate = [[MetalLayerDelegate alloc] initWithContext: ctx]; p->layer.delegate = p->delegate; + MP_MSG(ctx, p->delegate, "### Set this delegate\n"); + MP_MSG(ctx, p->layer.delegate, "### Attached delegate to layer\n"); + return true; fail: moltenvk_uninit(ctx); @@ -107,6 +112,7 @@ static bool moltenvk_reconfig(struct ra_ctx *ctx) struct priv *p = ctx->priv; CGSize s = p->layer.drawableSize; ra_vk_ctx_resize(ctx, s.width, s.height); + MP_MSG(ctx, s.width, s.height, "### Called resize\n"); return true; } @@ -116,6 +122,7 @@ static int moltenvk_control(struct ra_ctx *ctx, int *events, int request, void * if (*events & VO_EVENT_RESIZE) { + MP_MSG(ctx, ctx->vo->dwidth, ctx->vo->dheight, "### moltenvk_control > VO_EVENT_RESIZE\n"); ra_vk_ctx_resize(ctx, ctx->vo->dwidth, ctx->vo->dheight); return VO_TRUE; }