| 51 | #include <Schemas/Diagnostic.h> |
| 52 | |
| 53 | void CreateQueueState(DeviceDispatchTable *table, VkQueue queue, uint32_t familyIndex) { |
| 54 | // Create the state |
| 55 | auto state = new (table->allocators) QueueState(); |
| 56 | state->table = table; |
| 57 | state->object = queue; |
| 58 | state->familyIndex = familyIndex; |
| 59 | |
| 60 | // Pool info |
| 61 | VkCommandPoolCreateInfo poolInfo{VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO}; |
| 62 | poolInfo.queueFamilyIndex = familyIndex; |
| 63 | poolInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; |
| 64 | |
| 65 | // Attempt to create the pool |
| 66 | if (table->next_vkCreateCommandPool(table->object, &poolInfo, nullptr, &state->commandPool) != VK_SUCCESS) { |
| 67 | return; |
| 68 | } |
| 69 | |
| 70 | // Allocate the streaming state |
| 71 | state->exportState = table->exportStreamer->AllocateQueueState(state); |
| 72 | |
| 73 | // OK |
| 74 | table->states_queue.Add(queue, state); |
| 75 | } |
| 76 | |
| 77 | VkCommandBuffer QueueState::PopCommandBuffer() { |
| 78 | if (!commandBuffers.empty()) { |
no test coverage detected