Merge pull request #629 from aws-lumberyard-dev/ATOM/tonypeng/ATOM-15266-2

ATOM-15266 [RHI][Vulkan][Android] Use warning on fragment pool error …
This commit is contained in:
AMZN-tpeng
2021-05-13 15:38:38 -07:00
committed by GitHub
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 in DescriptorSetAllocator, so warning only
AZ_Warning("Vulkan RHI", false, "Fragmented pool, will be recreated in DescriptorSetAllocator afterward");
}
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";
}