| 1061 | } |
| 1062 | |
| 1063 | void Demo::flush_init_cmd() { |
| 1064 | auto result = cmd.end(); |
| 1065 | VERIFY(result == vk::Result::eSuccess); |
| 1066 | |
| 1067 | auto fenceInfo = vk::FenceCreateInfo(); |
| 1068 | if (force_errors) { |
| 1069 | // Remove sType to intentionally force validation layer errors. |
| 1070 | fenceInfo.sType = vk::StructureType::eRenderPassBeginInfo; |
| 1071 | } |
| 1072 | auto fence_return = device.createFence(fenceInfo); |
| 1073 | VERIFY(fence_return.result == vk::Result::eSuccess); |
| 1074 | auto fence = fence_return.value; |
| 1075 | |
| 1076 | auto const protected_submit_info = vk::ProtectedSubmitInfo().setProtectedSubmit(protected_output); |
| 1077 | result = graphics_queue.submit( |
| 1078 | vk::SubmitInfo().setPNext(protected_output ? &protected_submit_info : nullptr).setCommandBuffers(cmd), fence); |
| 1079 | VERIFY(result == vk::Result::eSuccess); |
| 1080 | |
| 1081 | result = device.waitForFences(fence, VK_TRUE, UINT64_MAX); |
| 1082 | VERIFY(result == vk::Result::eSuccess); |
| 1083 | |
| 1084 | device.freeCommandBuffers(cmd_pool, cmd); |
| 1085 | device.destroyFence(fence); |
| 1086 | } |
| 1087 | |
| 1088 | void Demo::init(int argc, char **argv) { |
| 1089 | vec3 eye = {0.0f, 3.0f, 5.0f}; |
nothing calls this directly
no outgoing calls
no test coverage detected