mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
[vulkan] Recreate image available semaphore
It turns out the semaphore used for vkAcquireNextImageKHR may be left in a signaled state for VK_ERROR_OUT_OF_DATE_KHR. While it seems to be possible to clear the semaphore using an empty queue submission, destroying and recreating the semaphore works well. Still have problems with the frame buffer after window resize, though.
This commit is contained in:
parent
0fdba75a6e
commit
7e16822f21
1 changed files with 5 additions and 1 deletions
|
@ -62,7 +62,7 @@ acquire_image (qfv_renderframe_t *rFrame)
|
|||
{
|
||||
vulkan_ctx_t *ctx = rFrame->vulkan_ctx;
|
||||
qfv_device_t *device = ctx->device;
|
||||
//qfv_devfuncs_t *dfunc = device->funcs;
|
||||
qfv_devfuncs_t *dfunc = device->funcs;
|
||||
__auto_type frame = &ctx->frames.a[ctx->curFrame];
|
||||
//outputctx_t *octx = ctx->output_context;
|
||||
//uint32_t curFrame = ctx->curFrame;
|
||||
|
@ -92,6 +92,10 @@ acquire_image (qfv_renderframe_t *rFrame)
|
|||
ctx->output_renderpass->scissor.extent = output.extent;
|
||||
Vulkan_Script_SetOutput (ctx, &output);
|
||||
Vulkan_CreateAttachments (ctx, ctx->output_renderpass);
|
||||
|
||||
dfunc->vkDestroySemaphore (device->dev, frame->imageAvailableSemaphore,
|
||||
0);
|
||||
frame->imageAvailableSemaphore = QFV_CreateSemaphore (device);
|
||||
}
|
||||
ctx->swapImageIndex = imageIndex;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue