Split KRDevice::initialize into multiple helper functions

This commit is contained in:
2022-07-19 00:57:18 -07:00
parent 378b5319bf
commit ff4eb2589c
2 changed files with 108 additions and 43 deletions

View File

@@ -106,4 +106,19 @@ public:
private:
void getQueueFamiliesForSharing(uint32_t* queueFamilyIndices, uint32_t* familyCount);
// Initialization helper functions
bool getAndCheckDeviceCapabilities(const std::vector<const char*>& deviceExtensions);
bool selectQueueFamilies();
bool initDeviceAndQueues(const std::vector<const char*>& deviceExtensions);
bool initCommandPools();
bool initCommandBuffers();
bool initAllocator();
bool initStagingBuffers();
bool createStagingBuffer(VkDeviceSize size, VkBuffer* buffer, VmaAllocation* allocation, void** data
#if KRENGINE_DEBUG_GPU_LABELS
, const char* debug_label
#endif // KRENGINE_DEBUG_GPU_LABELS
);
};