pub const fn stride(&self) -> usize {
        use VulkanFormat::*;

        match self {
            // R8
            R8_Unorm | R8_Snorm | R8_Uscaled | R8_Sscaled | R8_Uint | R8_Sint | R8_sRGB => 1,
            // RG8
            R8G8_Unorm | R8G8_Snorm | R8G8_Uscaled | R8G8_Sscaled | R8G8_Uint | R8G8_Sint
            | R8G8_sRGB => 2,
            // RGB8
            R8G8B8_Unorm | R8G8B8_Snorm | R8G8B8_Uscaled | R8G8B8_Sscaled | R8G8B8_Uint
            | R8G8B8_Sint | R8G8B8_sRGB => 3,
            // BGR8
            B8G8R8_Unorm | B8G8R8_Snorm | B8G8R8_Uscaled | B8G8R8_Sscaled | B8G8R8_Uint
            | B8G8R8_Sint | B8G8R8_sRGB => 3,
            // RGBA8
            R8G8B8A8_Unorm | R8G8B8A8_Snorm | R8G8B8A8_Uscaled | R8G8B8A8_Sscaled
            | R8G8B8A8_Uint | R8G8B8A8_Sint | R8G8B8A8_sRGB => 4,
            // BGRA8
            B8G8R8A8_Unorm | B8G8R8A8_Snorm | B8G8R8A8_Uscaled | B8G8R8A8_Sscaled
            | B8G8R8A8_Uint | B8G8R8A8_Sint | B8G8R8A8_sRGB => 4,
            // ABGR8
            A8B8G8R8_Unorm_Pack32
            | A8B8G8R8_Snorm_Pack32
            | A8B8G8R8_Uscaled_Pack32
            | A8B8G8R8_Sscaled_Pack32
            | A8B8G8R8_Uint_Pack32
            | A8B8G8R8_Sint_Pack32
            | A8B8G8R8_sRGB_Pack32 => 4,

            _ => unimplemented!(),
        }
    }
/// Obtain the size of a pixel represented by given format.
Obtain the size of a pixel represented by given format.
Obtain the size of a pixel represented by given format .
pub const fn stride(&self) -> usize {
        use VulkanFormat::*;
        match self {
            // R8
            R8_Unorm | R8_Snorm | R8_Uscaled | R8_Sscaled | R8_Uint | R8_Sint | R8_sRGB => 1,
            // RG8
            R8G8_Unorm | R8G8_Snorm | R8G8_Uscaled | R8G8_Sscaled | R8G8_Uint | R8G8_Sint
            | R8G8_sRGB => 2,
            // RGB8
            R8G8B8_Unorm | R8G8B8_Snorm | R8G8B8_Uscaled | R8G8B8_Sscaled | R8G8B8_Uint
            | R8G8B8_Sint | R8G8B8_sRGB => 3,
            // BGR8
            B8G8R8_Unorm | B8G8R8_Snorm | B8G8R8_Uscaled | B8G8R8_Sscaled | B8G8R8_Uint
            | B8G8R8_Sint | B8G8R8_sRGB => 3,
            // RGBA8
            R8G8B8A8_Unorm | R8G8B8A8_Snorm | R8G8B8A8_Uscaled | R8G8B8A8_Sscaled
            | R8G8B8A8_Uint | R8G8B8A8_Sint | R8G8B8A8_sRGB => 4,
            // BGRA8
            B8G8R8A8_Unorm | B8G8R8A8_Snorm | B8G8R8A8_Uscaled | B8G8R8A8_Sscaled
            | B8G8R8A8_Uint | B8G8R8A8_Sint | B8G8R8A8_sRGB => 4,
            // ABGR8
            A8B8G8R8_Unorm_Pack32
            | A8B8G8R8_Snorm_Pack32
            | A8B8G8R8_Uscaled_Pack32
            | A8B8G8R8_Sscaled_Pack32
            | A8B8G8R8_Uint_Pack32
            | A8B8G8R8_Sint_Pack32
            | A8B8G8R8_sRGB_Pack32 => 4,
            _ => unimplemented!(),
        }
    }
pub const fn stride ( & self ) -> usize { use VulkanFormat :: * ; match self { // R8 R8_Unorm | R8_Snorm | R8_Uscaled | R8_Sscaled | R8_Uint | R8_Sint | R8_sRGB => 1 , // RG8 R8G8_Unorm | R8G8_Snorm | R8G8_Uscaled | R8G8_Sscaled | R8G8_Uint | R8G8_Sint | R8G8_sRGB => 2 , // RGB8 R8G8B8_Unorm | R8G8B8_Snorm | R8G8B8_Uscaled | R8G8B8_Sscaled | R8G8B8_Uint | R8G8B8_Sint | R8G8B8_sRGB => 3 , // BGR8 B8G8R8_Unorm | B8G8R8_Snorm | B8G8R8_Uscaled | B8G8R8_Sscaled | B8G8R8_Uint | B8G8R8_Sint | B8G8R8_sRGB => 3 , // RGBA8 R8G8B8A8_Unorm | R8G8B8A8_Snorm | R8G8B8A8_Uscaled | R8G8B8A8_Sscaled | R8G8B8A8_Uint | R8G8B8A8_Sint | R8G8B8A8_sRGB => 4 , // BGRA8 B8G8R8A8_Unorm | B8G8R8A8_Snorm | B8G8R8A8_Uscaled | B8G8R8A8_Sscaled | B8G8R8A8_Uint | B8G8R8A8_Sint | B8G8R8A8_sRGB => 4 , // ABGR8 A8B8G8R8_Unorm_Pack32 | A8B8G8R8_Snorm_Pack32 | A8B8G8R8_Uscaled_Pack32 | A8B8G8R8_Sscaled_Pack32 | A8B8G8R8_Uint_Pack32 | A8B8G8R8_Sint_Pack32 | A8B8G8R8_sRGB_Pack32 => 4 , _ => unimplemented ! ( ) , } }
Obtain the size of a pixel represented by given format.
Obtain the size of a pixel represented by given format .
&self
&self