From c58a2e5f540a0521ee6780ce7dcd7d2985f5e300 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 31 May 2022 11:05:12 +0900 Subject: [PATCH] [vulkan] Remove unused command buffer and fence --- include/vid_vulkan.h | 2 -- libs/video/renderer/vid_render_vulkan.c | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/vid_vulkan.h b/include/vid_vulkan.h index 95ace93b0..89e888d2e 100644 --- a/include/vid_vulkan.h +++ b/include/vid_vulkan.h @@ -77,8 +77,6 @@ typedef struct vulkan_ctx_s { struct composectx_s *compose_context; VkCommandPool cmdpool; - VkCommandBuffer cmdbuffer; - VkFence fence; // for ctx->cmdbuffer only struct qfv_stagebuf_s *staging; size_t curFrame; vulkan_frameset_t frames; diff --git a/libs/video/renderer/vid_render_vulkan.c b/libs/video/renderer/vid_render_vulkan.c index 07ef97e15..1c115a4e2 100644 --- a/libs/video/renderer/vid_render_vulkan.c +++ b/libs/video/renderer/vid_render_vulkan.c @@ -631,11 +631,6 @@ vulkan_vid_render_choose_visual (void *data) vulkan_ctx->cmdpool = QFV_CreateCommandPool (vulkan_ctx->device, vulkan_ctx->device->queue.queueFamily, 0, 1); - __auto_type cmdset = QFV_AllocCommandBufferSet (1, alloca); - QFV_AllocateCommandBuffers (vulkan_ctx->device, vulkan_ctx->cmdpool, 0, - cmdset); - vulkan_ctx->cmdbuffer = cmdset->a[0]; - vulkan_ctx->fence = QFV_CreateFence (vulkan_ctx->device, 1); Sys_MaskPrintf (SYS_vulkan, "vk choose visual %p %p %d %#zx\n", vulkan_ctx->device->dev, vulkan_ctx->device->queue.queue, vulkan_ctx->device->queue.queueFamily, @@ -647,7 +642,7 @@ vulkan_vid_render_create_context (void *data) { vulkan_ctx->create_window (vulkan_ctx); vulkan_ctx->surface = vulkan_ctx->create_surface (vulkan_ctx); - Sys_MaskPrintf (SYS_vulkan, "vk create context %#zx\n", + Sys_MaskPrintf (SYS_vulkan, "vk create context: surface:%#zx\n", (size_t) vulkan_ctx->surface); } @@ -726,7 +721,6 @@ vulkan_vid_render_shutdown (void) Vulkan_DestroyRenderPasses (vulkan_ctx); QFV_DestroyStagingBuffer (vulkan_ctx->staging); - df->vkDestroyFence (dev, vulkan_ctx->fence, 0); df->vkDestroyCommandPool (dev, vulkan_ctx->cmdpool, 0); Vulkan_Shutdown_Common (vulkan_ctx);