From a41f6b22fdf99d908ea40138a2cc4275b11f14a9 Mon Sep 17 00:00:00 2001 From: jojo61 Date: Fri, 15 May 2020 16:37:06 +0200 Subject: [PATCH] Update for latest libplacebo --- video.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/video.c b/video.c index abfefd6..094ae74 100644 --- a/video.c +++ b/video.c @@ -5003,10 +5003,11 @@ void VideoOsdInit(void) OsdWidth = VideoWindowWidth; OsdHeight = VideoWindowHeight; } - +//printf("\nset osd %d x %d\n",OsdWidth,OsdHeight); if (posd) free(posd); posd = (unsigned char *)calloc((OsdWidth + 1) * (OsdHeight + 1) * 4, 1); + // posd = (unsigned char *)calloc((4096 + 1) * (2160 + 1) * 4, 1); VideoOsdClear(); } @@ -5235,26 +5236,24 @@ void InitPlacebo() p->gpu = p->gl->gpu; #else - struct pl_vulkan_params params; + struct pl_vulkan_params params; struct pl_vk_inst_params iparams = pl_vk_inst_default_params; - VkXcbSurfaceCreateInfoKHR xcbinfo; + VkXcbSurfaceCreateInfoKHR xcbinfo; char xcbext[] = { "VK_KHR_xcb_surface" }; char surfext[] = { "VK_KHR_surface" }; + char *ext[2] = {&xcbext,&surfext}; // create Vulkan instance - memcpy(&iparams, &pl_vk_inst_default_params, sizeof(iparams)); +// memcpy(&iparams, &pl_vk_inst_default_params, sizeof(iparams)); // iparams.debug = true; - iparams.num_extensions = 2; - iparams.extensions = malloc(2 * sizeof(const char *)); - *iparams.extensions = surfext; + + iparams.num_extensions = 2; //extensions_count; + iparams.extensions = &ext; iparams.debug = false; - *(iparams.extensions + 1) = xcbext; p->vk_inst = pl_vk_inst_create(p->ctx, &iparams); - free(iparams.extensions); - // create XCB surface for swapchain xcbinfo.sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR; xcbinfo.pNext = NULL;