ATOM-15266 [RHI][Vulkan][Android] Use warning on fragment pool error due to recreation of the memory pool in subsequent step

JIRA: https://jira.agscollab.com/browse/ATOM-15266
This commit is contained in:
Peng
2021-05-06 16:36:13 -07:00
parent 7d1eedc8c4
commit 6f3b46dc29
2 changed files with 12 additions and 1 deletions
@@ -239,7 +239,16 @@ namespace AZ
allocInfo.pSetLayouts = &nativeLayout;
VkResult result = vkAllocateDescriptorSets(descriptor.m_device->GetNativeDevice(), &allocInfo, &m_nativeDescriptorSet);
AssertSuccess(result);
if (result == VK_ERROR_FRAGMENTED_POOL)
{
// fragmented pool will be re-created subsequently, so warning only
AZ_Warning("Vulkan RHI", false, "Fragmented pool");
}
else
{
AssertSuccess(result);
}
if (result != VK_SUCCESS)
{
return result;
@@ -96,6 +96,8 @@ namespace AZ
return "Validation failed";
case VK_ERROR_OUT_OF_POOL_MEMORY:
return "Pool is out of memory";
case VK_ERROR_FRAGMENTED_POOL:
return "Fragmented pool";
default:
return "Unknown error";
}