{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_ycbcr_2plane_444_formats ( PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT(..)
, EXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION
, pattern EXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION
, EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME
, pattern EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME
) where
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import Foreign.Ptr (Ptr)
import Data.Kind (Type)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT))
data PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT = PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
{
PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> Bool
ycbcr2plane444Formats :: Bool }
deriving (Typeable, PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> Bool
(PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> Bool)
-> (PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> Bool)
-> Eq PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> Bool
$c/= :: PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> Bool
== :: PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> Bool
$c== :: PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
instance ToCStruct PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT where
withCStruct :: PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> (Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
x Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> IO b
f = Int
-> (Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
p -> Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
p PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
x (Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> IO b
f Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
p)
pokeCStruct :: Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
p PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT{Bool
ycbcr2plane444Formats :: Bool
$sel:ycbcr2plane444Formats:PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT :: PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
p Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
p Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
p Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
ycbcr2plane444Formats))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
p Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
p Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
p Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> IO PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
peekCStruct Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
p = do
Bool32
ycbcr2plane444Formats <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
p Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> IO PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> IO PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT)
-> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> IO PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
ycbcr2plane444Formats)
instance Storable PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT where
sizeOf :: PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> Int
sizeOf ~PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
_ = Int
24
alignment :: PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> Int
alignment ~PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> IO PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
peek = Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> IO PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
poked = Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
-> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
ptr PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT where
zero :: PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
zero = Bool -> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
Bool
forall a. Zero a => a
zero
type EXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION = 1
pattern EXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION :: a
$mEXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION = 1
type EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME = "VK_EXT_ycbcr_2plane_444_formats"
pattern EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME :: a
$mEXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME = "VK_EXT_ycbcr_2plane_444_formats"