{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_rgba10x6_formats ( PhysicalDeviceRGBA10X6FormatsFeaturesEXT(..)
, EXT_RGBA10X6_FORMATS_SPEC_VERSION
, pattern EXT_RGBA10X6_FORMATS_SPEC_VERSION
, EXT_RGBA10X6_FORMATS_EXTENSION_NAME
, pattern EXT_RGBA10X6_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_RGBA10X6_FORMATS_FEATURES_EXT))
data PhysicalDeviceRGBA10X6FormatsFeaturesEXT = PhysicalDeviceRGBA10X6FormatsFeaturesEXT
{
PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> Bool
formatRgba10x6WithoutYCbCrSampler :: Bool }
deriving (Typeable, PhysicalDeviceRGBA10X6FormatsFeaturesEXT
-> PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceRGBA10X6FormatsFeaturesEXT
-> PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> Bool
$c/= :: PhysicalDeviceRGBA10X6FormatsFeaturesEXT
-> PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> Bool
== :: PhysicalDeviceRGBA10X6FormatsFeaturesEXT
-> PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> Bool
$c== :: PhysicalDeviceRGBA10X6FormatsFeaturesEXT
-> PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceRGBA10X6FormatsFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceRGBA10X6FormatsFeaturesEXT
instance ToCStruct PhysicalDeviceRGBA10X6FormatsFeaturesEXT where
withCStruct :: forall b.
PhysicalDeviceRGBA10X6FormatsFeaturesEXT
-> (Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> IO b) -> IO b
withCStruct PhysicalDeviceRGBA10X6FormatsFeaturesEXT
x Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
p PhysicalDeviceRGBA10X6FormatsFeaturesEXT
x (Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> IO b
f Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
-> PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
p PhysicalDeviceRGBA10X6FormatsFeaturesEXT{Bool
formatRgba10x6WithoutYCbCrSampler :: Bool
$sel:formatRgba10x6WithoutYCbCrSampler:PhysicalDeviceRGBA10X6FormatsFeaturesEXT :: PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
formatRgba10x6WithoutYCbCrSampler))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceRGBA10X6FormatsFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
-> IO PhysicalDeviceRGBA10X6FormatsFeaturesEXT
peekCStruct Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
p = do
Bool32
formatRgba10x6WithoutYCbCrSampler <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDeviceRGBA10X6FormatsFeaturesEXT
PhysicalDeviceRGBA10X6FormatsFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
formatRgba10x6WithoutYCbCrSampler)
instance Storable PhysicalDeviceRGBA10X6FormatsFeaturesEXT where
sizeOf :: PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> Int
sizeOf ~PhysicalDeviceRGBA10X6FormatsFeaturesEXT
_ = Int
24
alignment :: PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> Int
alignment ~PhysicalDeviceRGBA10X6FormatsFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
-> IO PhysicalDeviceRGBA10X6FormatsFeaturesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
-> PhysicalDeviceRGBA10X6FormatsFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
ptr PhysicalDeviceRGBA10X6FormatsFeaturesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceRGBA10X6FormatsFeaturesEXT where
zero :: PhysicalDeviceRGBA10X6FormatsFeaturesEXT
zero = Bool -> PhysicalDeviceRGBA10X6FormatsFeaturesEXT
PhysicalDeviceRGBA10X6FormatsFeaturesEXT
forall a. Zero a => a
zero
type EXT_RGBA10X6_FORMATS_SPEC_VERSION = 1
pattern EXT_RGBA10X6_FORMATS_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_RGBA10X6_FORMATS_SPEC_VERSION :: forall a. Integral a => a
$mEXT_RGBA10X6_FORMATS_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_RGBA10X6_FORMATS_SPEC_VERSION = 1
type EXT_RGBA10X6_FORMATS_EXTENSION_NAME = "VK_EXT_rgba10x6_formats"
pattern EXT_RGBA10X6_FORMATS_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_RGBA10X6_FORMATS_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_RGBA10X6_FORMATS_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_RGBA10X6_FORMATS_EXTENSION_NAME = "VK_EXT_rgba10x6_formats"