mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Add util function to identify depth stencil formats
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -209,3 +209,4 @@ enum DescriptorSlotType
|
||||
};
|
||||
|
||||
bool IsBlockFormat(VkFormat f);
|
||||
bool IsDepthStencilFormat(VkFormat f);
|
||||
|
||||
Reference in New Issue
Block a user