MoltenVK/MoltenVK/Utility/MVKFoundation.h
static inline VkComponentMapping mvkUnpackSwizzle(uint32_t packed) {
	VkComponentMapping components;
	components.r = (VkComponentSwizzle)((packed >> 0) & 0xFF);
	components.g = (VkComponentSwizzle)((packed >> 8) & 0xFF);
	components.b = (VkComponentSwizzle)((packed >> 16) & 0xFF);
	components.a = (VkComponentSwizzle)((packed >> 24) & 0xFF);
	return components;
}
/** Unpacks a single 32-bit word containing four swizzle components. */
Unpacks a single 32-bit word containing four swizzle components.
Unpacks a single 32 - bit word containing four swizzle components .
static inline VkComponentMapping mvkUnpackSwizzle(uint32_t packed) {
	VkComponentMapping components;
	components.r = (VkComponentSwizzle)((packed >> 0) & 0xFF);
	components.g = (VkComponentSwizzle)((packed >> 8) & 0xFF);
	components.b = (VkComponentSwizzle)((packed >> 16) & 0xFF);
	components.a = (VkComponentSwizzle)((packed >> 24) & 0xFF);
	return components;
}
static inline VkComponentMapping mvkUnpackSwizzle ( uint32_t packed ) { VkComponentMapping components ; components . r = ( VkComponentSwizzle ) ( ( packed >> 0 ) & 0xFF ) ; components . g = ( VkComponentSwizzle ) ( ( packed >> 8 ) & 0xFF ) ; components . b = ( VkComponentSwizzle ) ( ( packed >> 16 ) & 0xFF ) ; components . a = ( VkComponentSwizzle ) ( ( packed >> 24 ) & 0xFF ) ; return components ; }
Unpacks a single 32-bit word containing four swizzle components.
Unpacks a single 32 - bit word containing four swizzle components .