MCPcopy Create free account
hub / github.com/GPUOpen-Tools/GPU-Reshape / CreateQueueState

Function CreateQueueState

Source/Backends/Vulkan/Layer/Source/Queue.cpp:53–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51#include <Schemas/Diagnostic.h>
52
53void 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
77VkCommandBuffer QueueState::PopCommandBuffer() {
78 if (!commandBuffers.empty()) {

Callers 1

Hook_vkCreateDeviceFunction · 0.85

Calls 2

AllocateQueueStateMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected