MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / prepare_submission_sync_objects

Method prepare_submission_sync_objects

cube/cube.cpp:2589–2604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2587}
2588
2589void Demo::prepare_submission_sync_objects() {
2590 // Create semaphores to synchronize acquiring presentable buffers before
2591 // rendering and waiting for drawing to be complete before presenting
2592 auto const semaphoreCreateInfo = vk::SemaphoreCreateInfo();
2593
2594 // Create fences that we can use to throttle if we get too far
2595 // ahead of the image presents
2596 auto const fence_ci = vk::FenceCreateInfo().setFlags(vk::FenceCreateFlagBits::eSignaled);
2597 for (auto &submission_resource : submission_resources) {
2598 vk::Result result = device.createFence(&fence_ci, nullptr, &submission_resource.fence);
2599 VERIFY(result == vk::Result::eSuccess);
2600
2601 result = device.createSemaphore(&semaphoreCreateInfo, nullptr, &submission_resource.image_acquired_semaphore);
2602 VERIFY(result == vk::Result::eSuccess);
2603 }
2604}
2605
2606vk::ShaderModule Demo::prepare_fs() {
2607 const uint32_t fragShaderCode[] = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected