MCPcopy Create free account
hub / github.com/PacktPublishing/3D-Graphics-Rendering-Cookbook / findDepthFormat

Function findDepthFormat

shared/UtilsVulkan.cpp:1089–1097  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1087}
1088
1089VkFormat findDepthFormat(VkPhysicalDevice device)
1090{
1091 return findSupportedFormat(
1092 device,
1093 { VK_FORMAT_D32_SFLOAT, VK_FORMAT_D32_SFLOAT_S8_UINT, VK_FORMAT_D24_UNORM_S8_UINT },
1094 VK_IMAGE_TILING_OPTIMAL,
1095 VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
1096 );
1097}
1098
1099bool hasStencilComponent(VkFormat format) {
1100 return format == VK_FORMAT_D32_SFLOAT_S8_UINT || format == VK_FORMAT_D24_UNORM_S8_UINT;

Callers 4

createDepthResourcesFunction · 0.85
addDepthTextureMethod · 0.85

Calls 1

findSupportedFormatFunction · 0.85

Tested by

no test coverage detected