MCPcopy Create free account
hub / github.com/InoriRus/Kyty / ExecuteWithSemaphore

Method ExecuteWithSemaphore

source/emulator/src/Graphics/GraphicsRender.cpp:5513–5550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5511}
5512
5513void CommandBuffer::ExecuteWithSemaphore()
5514{
5515 EXIT_IF(IsInvalid());
5516
5517 auto* buffer = m_pool->buffers[m_index];
5518 auto* fence = m_pool->fences[m_index];
5519
5520 VkSubmitInfo submit_info {};
5521 submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
5522 submit_info.pNext = nullptr;
5523 submit_info.waitSemaphoreCount = 0;
5524 submit_info.pWaitSemaphores = nullptr;
5525 submit_info.pWaitDstStageMask = nullptr;
5526 submit_info.commandBufferCount = 1;
5527 submit_info.pCommandBuffers = &buffer;
5528 submit_info.signalSemaphoreCount = 1;
5529 submit_info.pSignalSemaphores = &m_pool->semaphores[m_index];
5530
5531 EXIT_IF(m_queue < 0 || m_queue >= GraphicContext::QUEUES_NUM);
5532
5533 const auto& queue = g_render_ctx->GetGraphicCtx()->queues[m_queue];
5534
5535 if (queue.mutex != nullptr)
5536 {
5537 queue.mutex->Lock();
5538 }
5539
5540 auto result = vkQueueSubmit(queue.vk_queue, 1, &submit_info, fence);
5541
5542 if (queue.mutex != nullptr)
5543 {
5544 queue.mutex->Lock();
5545 }
5546
5547 m_execute = true;
5548
5549 EXIT_NOT_IMPLEMENTED(result != VK_SUCCESS);
5550}
5551
5552void CommandBuffer::WaitForFence()
5553{

Callers 1

WindowDrawBufferFunction · 0.80

Calls 2

GetGraphicCtxMethod · 0.45
LockMethod · 0.45

Tested by

no test coverage detected