MCPcopy Create free account
hub / github.com/begla/Intrinsic / initVkSynchronization

Method initVkSynchronization

IntrinsicCore/src/IntrinsicRendererRenderSystem.cpp:1252–1280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1250// <-
1251
1252void RenderSystem::initVkSynchronization()
1253{
1254 VkSemaphoreCreateInfo imageAcquiredSemaphoreCreateInfo;
1255 imageAcquiredSemaphoreCreateInfo.sType =
1256 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO;
1257 imageAcquiredSemaphoreCreateInfo.pNext = nullptr;
1258 imageAcquiredSemaphoreCreateInfo.flags = 0;
1259
1260 VkResult result =
1261 vkCreateSemaphore(_vkDevice, &imageAcquiredSemaphoreCreateInfo, nullptr,
1262 &_vkImageAcquiredSemaphore);
1263 _INTR_VK_CHECK_RESULT(result);
1264
1265 _vkDrawFences.resize(_vkSwapchainImages.size());
1266 for (uint32_t i = 0u; i < _vkSwapchainImages.size(); ++i)
1267 {
1268 VkFenceCreateInfo fenceInfo;
1269 fenceInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
1270 fenceInfo.pNext = nullptr;
1271 fenceInfo.flags = VK_FENCE_CREATE_SIGNALED_BIT;
1272 VkResult result =
1273 vkCreateFence(_vkDevice, &fenceInfo, nullptr, &_vkDrawFences[i]);
1274 _INTR_VK_CHECK_RESULT(result);
1275 }
1276
1277 result = vkResetFences(_vkDevice, (uint32_t)_vkDrawFences.size(),
1278 _vkDrawFences.data());
1279 _INTR_VK_CHECK_RESULT(result);
1280}
1281
1282// <-
1283

Callers

nothing calls this directly

Calls 3

resizeMethod · 0.80
dataMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected