| 2587 | } |
| 2588 | |
| 2589 | void 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 | |
| 2606 | vk::ShaderModule Demo::prepare_fs() { |
| 2607 | const uint32_t fragShaderCode[] = { |
nothing calls this directly
no outgoing calls
no test coverage detected