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

Function IsIdentitySwizzle

layers/utils/image_utils.h:95–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93bool CanTransitionDepthSlices(const DeviceExtensions &extensions, VkImageType imageType, VkImageCreateFlags2KHR imageCreateFlags);
94
95static inline bool IsIdentitySwizzle(VkComponentMapping components) {
96 // clang-format off
97 return (
98 ((components.r == VK_COMPONENT_SWIZZLE_IDENTITY) || (components.r == VK_COMPONENT_SWIZZLE_R)) &&
99 ((components.g == VK_COMPONENT_SWIZZLE_IDENTITY) || (components.g == VK_COMPONENT_SWIZZLE_G)) &&
100 ((components.b == VK_COMPONENT_SWIZZLE_IDENTITY) || (components.b == VK_COMPONENT_SWIZZLE_B)) &&
101 ((components.a == VK_COMPONENT_SWIZZLE_IDENTITY) || (components.a == VK_COMPONENT_SWIZZLE_A))
102 );
103 // clang-format on
104}
105
106static inline uint32_t SampleCountSize(VkSampleCountFlagBits sample_count) {
107 uint32_t size = 0;

Calls

no outgoing calls

Tested by

no test coverage detected