MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / IsDepthSliceView

Function IsDepthSliceView

layers/utils/image_utils.cpp:306–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304}
305
306bool IsDepthSliceView(VkImageType imageType, VkImageCreateFlags2KHR imageCreateFlags, VkImageViewType view_type) {
307 constexpr VkImageCreateFlags2KHR depth_slice_view_flags =
308 VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT | VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT;
309
310 const bool image_supports_depth_slice_view = imageType == VK_IMAGE_TYPE_3D && (imageCreateFlags & depth_slice_view_flags) != 0;
311
312 return image_supports_depth_slice_view && (view_type == VK_IMAGE_VIEW_TYPE_2D || view_type == VK_IMAGE_VIEW_TYPE_2D_ARRAY);
313}
314
315bool CanTransitionDepthSlices(const DeviceExtensions& extensions, VkImageType imageType, VkImageCreateFlags2KHR imageCreateFlags) {
316 return IsExtEnabled(extensions.vk_khr_maintenance9) && imageType == VK_IMAGE_TYPE_3D &&

Callers 3

ImageViewMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected