Add util function to identify depth stencil formats

This commit is contained in:
baldurk
2016-02-07 18:37:47 +01:00
parent b3766dfebf
commit 9edc9bb167
2 changed files with 20 additions and 0 deletions
+19
View File
@@ -89,3 +89,22 @@ bool IsBlockFormat(VkFormat f)
return false;
}
bool IsDepthStencilFormat(VkFormat f)
{
switch(f)
{
case VK_FORMAT_D16_UNORM:
case VK_FORMAT_D24_UNORM:
case VK_FORMAT_D32_SFLOAT:
case VK_FORMAT_S8_UINT:
case VK_FORMAT_D16_UNORM_S8_UINT:
case VK_FORMAT_D24_UNORM_S8_UINT:
case VK_FORMAT_D32_SFLOAT_S8_UINT:
return true;
default:
break;
}
return false;
}
+1
View File
@@ -209,3 +209,4 @@ enum DescriptorSlotType
};
bool IsBlockFormat(VkFormat f);
bool IsDepthStencilFormat(VkFormat f);