{-# language CPP #-}
-- No documentation found for Chapter "SamplerYcbcrModelConversion"
module Vulkan.Core11.Enums.SamplerYcbcrModelConversion  (SamplerYcbcrModelConversion( SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY
                                                                                    , SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY
                                                                                    , SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709
                                                                                    , SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601
                                                                                    , SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020
                                                                                    , ..
                                                                                    )) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showsPrec)
import Vulkan.Zero (Zero)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))

-- | VkSamplerYcbcrModelConversion - Color model component of a color space
--
-- = Description
--
-- -   'SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY' specifies that the
--     input values to the conversion are unmodified.
--
-- -   'SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY' specifies no model
--     conversion but the inputs are range expanded as for Y′CBCR.
--
-- -   'SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709' specifies the color model
--     conversion from Y′CBCR to R′G′B′ defined in BT.709 and described in
--     the “BT.709 Y’CBCR conversion” section of the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#data-format Khronos Data Format Specification>.
--
-- -   'SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601' specifies the color model
--     conversion from Y′CBCR to R′G′B′ defined in BT.601 and described in
--     the “BT.601 Y’CBCR conversion” section of the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#data-format Khronos Data Format Specification>.
--
-- -   'SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020' specifies the color
--     model conversion from Y′CBCR to R′G′B′ defined in BT.2020 and
--     described in the “BT.2020 Y’CBCR conversion” section of the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#data-format Khronos Data Format Specification>.
--
-- In the @VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_*@ color models, for the
-- input to the sampler Y′CBCR range expansion and model conversion:
--
-- -   the Y (Y′ luma) channel corresponds to the G channel of an RGB
--     image.
--
-- -   the CB (CB or “U” blue color difference) channel corresponds to the
--     B channel of an RGB image.
--
-- -   the CR (CR or “V” red color difference) channel corresponds to the R
--     channel of an RGB image.
--
-- -   the alpha channel, if present, is not modified by color model
--     conversion.
--
-- These rules reflect the mapping of channels after the channel swizzle
-- operation (controlled by
-- 'Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionCreateInfo'::@components@).
--
-- Note
--
-- For example, an “YUVA” 32-bit format comprising four 8-bit channels can
-- be implemented as 'Vulkan.Core10.Enums.Format.FORMAT_R8G8B8A8_UNORM'
-- with a component mapping:
--
-- -   @components.a@ =
--     'Vulkan.Core10.Enums.ComponentSwizzle.COMPONENT_SWIZZLE_IDENTITY'
--
-- -   @components.r@ =
--     'Vulkan.Core10.Enums.ComponentSwizzle.COMPONENT_SWIZZLE_B'
--
-- -   @components.g@ =
--     'Vulkan.Core10.Enums.ComponentSwizzle.COMPONENT_SWIZZLE_R'
--
-- -   @components.b@ =
--     'Vulkan.Core10.Enums.ComponentSwizzle.COMPONENT_SWIZZLE_G'
--
-- = See Also
--
-- 'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.AndroidHardwareBufferFormatPropertiesANDROID',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionCreateInfo'
newtype SamplerYcbcrModelConversion = SamplerYcbcrModelConversion Int32
  deriving newtype (SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
(SamplerYcbcrModelConversion
 -> SamplerYcbcrModelConversion -> Bool)
-> (SamplerYcbcrModelConversion
    -> SamplerYcbcrModelConversion -> Bool)
-> Eq SamplerYcbcrModelConversion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
$c/= :: SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
== :: SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
$c== :: SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
Eq, Eq SamplerYcbcrModelConversion
Eq SamplerYcbcrModelConversion =>
(SamplerYcbcrModelConversion
 -> SamplerYcbcrModelConversion -> Ordering)
-> (SamplerYcbcrModelConversion
    -> SamplerYcbcrModelConversion -> Bool)
-> (SamplerYcbcrModelConversion
    -> SamplerYcbcrModelConversion -> Bool)
-> (SamplerYcbcrModelConversion
    -> SamplerYcbcrModelConversion -> Bool)
-> (SamplerYcbcrModelConversion
    -> SamplerYcbcrModelConversion -> Bool)
-> (SamplerYcbcrModelConversion
    -> SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion)
-> (SamplerYcbcrModelConversion
    -> SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion)
-> Ord SamplerYcbcrModelConversion
SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
SamplerYcbcrModelConversion
-> SamplerYcbcrModelConversion -> Ordering
SamplerYcbcrModelConversion
-> SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SamplerYcbcrModelConversion
-> SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion
$cmin :: SamplerYcbcrModelConversion
-> SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion
max :: SamplerYcbcrModelConversion
-> SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion
$cmax :: SamplerYcbcrModelConversion
-> SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion
>= :: SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
$c>= :: SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
> :: SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
$c> :: SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
<= :: SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
$c<= :: SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
< :: SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
$c< :: SamplerYcbcrModelConversion -> SamplerYcbcrModelConversion -> Bool
compare :: SamplerYcbcrModelConversion
-> SamplerYcbcrModelConversion -> Ordering
$ccompare :: SamplerYcbcrModelConversion
-> SamplerYcbcrModelConversion -> Ordering
$cp1Ord :: Eq SamplerYcbcrModelConversion
Ord, Ptr b -> Int -> IO SamplerYcbcrModelConversion
Ptr b -> Int -> SamplerYcbcrModelConversion -> IO ()
Ptr SamplerYcbcrModelConversion -> IO SamplerYcbcrModelConversion
Ptr SamplerYcbcrModelConversion
-> Int -> IO SamplerYcbcrModelConversion
Ptr SamplerYcbcrModelConversion
-> Int -> SamplerYcbcrModelConversion -> IO ()
Ptr SamplerYcbcrModelConversion
-> SamplerYcbcrModelConversion -> IO ()
SamplerYcbcrModelConversion -> Int
(SamplerYcbcrModelConversion -> Int)
-> (SamplerYcbcrModelConversion -> Int)
-> (Ptr SamplerYcbcrModelConversion
    -> Int -> IO SamplerYcbcrModelConversion)
-> (Ptr SamplerYcbcrModelConversion
    -> Int -> SamplerYcbcrModelConversion -> IO ())
-> (forall b. Ptr b -> Int -> IO SamplerYcbcrModelConversion)
-> (forall b. Ptr b -> Int -> SamplerYcbcrModelConversion -> IO ())
-> (Ptr SamplerYcbcrModelConversion
    -> IO SamplerYcbcrModelConversion)
-> (Ptr SamplerYcbcrModelConversion
    -> SamplerYcbcrModelConversion -> IO ())
-> Storable SamplerYcbcrModelConversion
forall b. Ptr b -> Int -> IO SamplerYcbcrModelConversion
forall b. Ptr b -> Int -> SamplerYcbcrModelConversion -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr SamplerYcbcrModelConversion
-> SamplerYcbcrModelConversion -> IO ()
$cpoke :: Ptr SamplerYcbcrModelConversion
-> SamplerYcbcrModelConversion -> IO ()
peek :: Ptr SamplerYcbcrModelConversion -> IO SamplerYcbcrModelConversion
$cpeek :: Ptr SamplerYcbcrModelConversion -> IO SamplerYcbcrModelConversion
pokeByteOff :: Ptr b -> Int -> SamplerYcbcrModelConversion -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SamplerYcbcrModelConversion -> IO ()
peekByteOff :: Ptr b -> Int -> IO SamplerYcbcrModelConversion
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SamplerYcbcrModelConversion
pokeElemOff :: Ptr SamplerYcbcrModelConversion
-> Int -> SamplerYcbcrModelConversion -> IO ()
$cpokeElemOff :: Ptr SamplerYcbcrModelConversion
-> Int -> SamplerYcbcrModelConversion -> IO ()
peekElemOff :: Ptr SamplerYcbcrModelConversion
-> Int -> IO SamplerYcbcrModelConversion
$cpeekElemOff :: Ptr SamplerYcbcrModelConversion
-> Int -> IO SamplerYcbcrModelConversion
alignment :: SamplerYcbcrModelConversion -> Int
$calignment :: SamplerYcbcrModelConversion -> Int
sizeOf :: SamplerYcbcrModelConversion -> Int
$csizeOf :: SamplerYcbcrModelConversion -> Int
Storable, SamplerYcbcrModelConversion
SamplerYcbcrModelConversion -> Zero SamplerYcbcrModelConversion
forall a. a -> Zero a
zero :: SamplerYcbcrModelConversion
$czero :: SamplerYcbcrModelConversion
Zero)

-- No documentation found for Nested "VkSamplerYcbcrModelConversion" "VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY"
pattern $bSAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY :: SamplerYcbcrModelConversion
$mSAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY :: forall r.
SamplerYcbcrModelConversion -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY   = SamplerYcbcrModelConversion 0
-- No documentation found for Nested "VkSamplerYcbcrModelConversion" "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY"
pattern $bSAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY :: SamplerYcbcrModelConversion
$mSAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY :: forall r.
SamplerYcbcrModelConversion -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = SamplerYcbcrModelConversion 1
-- No documentation found for Nested "VkSamplerYcbcrModelConversion" "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709"
pattern $bSAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 :: SamplerYcbcrModelConversion
$mSAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 :: forall r.
SamplerYcbcrModelConversion -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709      = SamplerYcbcrModelConversion 2
-- No documentation found for Nested "VkSamplerYcbcrModelConversion" "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601"
pattern $bSAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 :: SamplerYcbcrModelConversion
$mSAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 :: forall r.
SamplerYcbcrModelConversion -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601      = SamplerYcbcrModelConversion 3
-- No documentation found for Nested "VkSamplerYcbcrModelConversion" "VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020"
pattern $bSAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 :: SamplerYcbcrModelConversion
$mSAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 :: forall r.
SamplerYcbcrModelConversion -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020     = SamplerYcbcrModelConversion 4
{-# complete SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY,
             SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY,
             SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709,
             SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601,
             SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 :: SamplerYcbcrModelConversion #-}

conNameSamplerYcbcrModelConversion :: String
conNameSamplerYcbcrModelConversion :: String
conNameSamplerYcbcrModelConversion = "SamplerYcbcrModelConversion"

enumPrefixSamplerYcbcrModelConversion :: String
enumPrefixSamplerYcbcrModelConversion :: String
enumPrefixSamplerYcbcrModelConversion = "SAMPLER_YCBCR_MODEL_CONVERSION_"

showTableSamplerYcbcrModelConversion :: [(SamplerYcbcrModelConversion, String)]
showTableSamplerYcbcrModelConversion :: [(SamplerYcbcrModelConversion, String)]
showTableSamplerYcbcrModelConversion =
  [ (SamplerYcbcrModelConversion
SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY  , "RGB_IDENTITY")
  , (SamplerYcbcrModelConversion
SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY, "YCBCR_IDENTITY")
  , (SamplerYcbcrModelConversion
SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709     , "YCBCR_709")
  , (SamplerYcbcrModelConversion
SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601     , "YCBCR_601")
  , (SamplerYcbcrModelConversion
SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020    , "YCBCR_2020")
  ]

instance Show SamplerYcbcrModelConversion where
  showsPrec :: Int -> SamplerYcbcrModelConversion -> ShowS
showsPrec = String
-> [(SamplerYcbcrModelConversion, String)]
-> String
-> (SamplerYcbcrModelConversion -> Int32)
-> (Int32 -> ShowS)
-> Int
-> SamplerYcbcrModelConversion
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixSamplerYcbcrModelConversion
                            [(SamplerYcbcrModelConversion, String)]
showTableSamplerYcbcrModelConversion
                            String
conNameSamplerYcbcrModelConversion
                            (\(SamplerYcbcrModelConversion x :: Int32
x) -> Int32
x)
                            (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

instance Read SamplerYcbcrModelConversion where
  readPrec :: ReadPrec SamplerYcbcrModelConversion
readPrec = String
-> [(SamplerYcbcrModelConversion, String)]
-> String
-> (Int32 -> SamplerYcbcrModelConversion)
-> ReadPrec SamplerYcbcrModelConversion
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixSamplerYcbcrModelConversion
                          [(SamplerYcbcrModelConversion, String)]
showTableSamplerYcbcrModelConversion
                          String
conNameSamplerYcbcrModelConversion
                          Int32 -> SamplerYcbcrModelConversion
SamplerYcbcrModelConversion