Auto stash before merge of "SP3-4-editor" and "origin/SP3-4-editor"

This commit is contained in:
Brandon Mak 2022-09-11 20:03:11 +08:00
parent 4b8c842615
commit bf447c1d1d
2 changed files with 11 additions and 2 deletions

View File

@ -11,6 +11,8 @@ namespace SHADE
SHVkImage::SHVkImage(
VmaAllocator const& vmaAllocator,
SHImageCreateParams const& imageDetails,
unsigned char* data,
uint32_t dataSize,
VmaMemoryUsage memUsage,
VmaAllocationCreateFlags allocFlags
) noexcept
@ -64,7 +66,13 @@ namespace SHADE
VmaAllocationInfo allocInfo{};
VkImage tempImage;
vmaCreateImage(vmaAllocator, &imageCreateInfo.operator VkImageCreateInfo&(), &allocCreateInfo, &tempImage, &alloc, &allocInfo);
auto result = vmaCreateImage(vmaAllocator, &imageCreateInfo.operator VkImageCreateInfo&(), &allocCreateInfo, &tempImage, &alloc, &allocInfo);
if (result != VK_SUCCESS)
SHVulkanDebugUtil::ReportVkError(vk::Result(result), "Failed to create vulkan image. ");
else
SHVulkanDebugUtil::ReportVkSuccess("Successfully created image. ");
vkImage = tempImage;
//if (allocFlags & )

View File

@ -86,10 +86,11 @@ namespace SHADE
/*-----------------------------------------------------------------------*/
SHVkImage(void) noexcept = default;
// TODO: Might need to add flags to parameters
SHVkImage(
VmaAllocator const& vmaAllocator,
SHImageCreateParams const& imageDetails,
unsigned char* data,
uint32_t dataSize,
VmaMemoryUsage memUsage,
VmaAllocationCreateFlags allocFlags
) noexcept;