Moved queue family iteration code shared by KRDevice::createImage and KRDevice::createBuffer into a utility function.

Added imageCreateFlags argument to KRDevice::createImage
This commit is contained in:
2022-07-16 00:45:17 -07:00
parent 22b871ad2f
commit 83ea50384f
3 changed files with 19 additions and 18 deletions

View File

@@ -55,7 +55,7 @@ public:
#endif
);
bool createImage(Vector2i dimensions, VkMemoryPropertyFlags properties, VkImage* image, VmaAllocation* allocation);
bool createImage(Vector2i dimensions, VkImageCreateFlags imageCreateFlags, VkMemoryPropertyFlags properties, VkImage* image, VmaAllocation* allocation);
KrResult selectSurfaceFormat(VkSurfaceKHR& surface, VkSurfaceFormatKHR& surfaceFormat);
KrResult selectDepthFormat(VkFormat& selectedDepthFormat);
@@ -103,4 +103,6 @@ public:
size_t m_graphicsStagingBufferUsage;
void* m_graphicsStagingBufferData;
private:
void getQueueFamiliesForSharing(uint32_t* queueFamilyIndices, uint32_t* familyCount);
};