{-# language CPP #-}
module Vulkan.Extensions.VK_VALVE_fragment_density_map_layered ( PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE(..)
, PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE(..)
, PipelineFragmentDensityMapLayeredCreateInfoVALVE(..)
, VALVE_FRAGMENT_DENSITY_MAP_LAYERED_SPEC_VERSION
, pattern VALVE_FRAGMENT_DENSITY_MAP_LAYERED_SPEC_VERSION
, VALVE_FRAGMENT_DENSITY_MAP_LAYERED_EXTENSION_NAME
, pattern VALVE_FRAGMENT_DENSITY_MAP_LAYERED_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.Word (Word32)
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_FRAGMENT_DENSITY_MAP_LAYERED_FEATURES_VALVE))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_LAYERED_PROPERTIES_VALVE))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_FRAGMENT_DENSITY_MAP_LAYERED_CREATE_INFO_VALVE))
data PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE = PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
{
PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> Word32
maxFragmentDensityMapLayers :: Word32 }
deriving (Typeable, PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> Bool
(PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> Bool)
-> (PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> Bool)
-> Eq PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> Bool
== :: PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> Bool
$c/= :: PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> Bool
/= :: PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE)
#endif
deriving instance Show PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
instance ToCStruct PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE where
withCStruct :: forall b.
PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> (Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> IO b)
-> IO b
withCStruct PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
x Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> IO b
f = Int
-> (Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> IO b)
-> IO b)
-> (Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
p -> Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> IO b
-> IO b
forall b.
Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
p PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
x (Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> IO b
f Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
p PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE{Word32
maxFragmentDensityMapLayers :: PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> Word32
maxFragmentDensityMapLayers :: Word32
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_LAYERED_PROPERTIES_VALVE)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
maxFragmentDensityMapLayers)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_LAYERED_PROPERTIES_VALVE)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE where
peekCStruct :: Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> IO PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
peekCStruct Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
p = do
maxFragmentDensityMapLayers <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
pure $ PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
maxFragmentDensityMapLayers
instance Storable PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE where
sizeOf :: PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> Int
sizeOf ~PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
_ = Int
24
alignment :: PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> Int
alignment ~PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
_ = Int
8
peek :: Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> IO PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
peek = Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> IO PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE -> IO ()
poke Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
poked = Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> IO ()
-> IO ()
forall b.
Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
ptr PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE where
zero :: PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
zero = Word32 -> PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
PhysicalDeviceFragmentDensityMapLayeredPropertiesVALVE
Word32
forall a. Zero a => a
zero
data PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE = PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
{
PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> Bool
fragmentDensityMapLayered :: Bool }
deriving (Typeable, PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> Bool
(PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> Bool)
-> (PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> Bool)
-> Eq PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> Bool
== :: PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> Bool
$c/= :: PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> Bool
/= :: PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE)
#endif
deriving instance Show PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
instance ToCStruct PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE where
withCStruct :: forall b.
PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> (Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> IO b)
-> IO b
withCStruct PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
x Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> IO b
f = Int
-> (Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
p -> Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> IO b
-> IO b
forall b.
Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
p PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
x (Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> IO b
f Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
p PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE{Bool
fragmentDensityMapLayered :: PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> Bool
fragmentDensityMapLayered :: Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_LAYERED_FEATURES_VALVE)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> 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 PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentDensityMapLayered))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_LAYERED_FEATURES_VALVE)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> 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 PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> 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 PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE where
peekCStruct :: Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> IO PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
peekCStruct Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
p = do
fragmentDensityMapLayered <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
p Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
pure $ PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
(bool32ToBool fragmentDensityMapLayered)
instance Storable PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE where
sizeOf :: PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> Int
sizeOf ~PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
_ = Int
24
alignment :: PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> Int
alignment ~PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
_ = Int
8
peek :: Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> IO PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
peek = Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> IO PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE -> IO ()
poke Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
poked = Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> IO ()
-> IO ()
forall b.
Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
ptr PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE where
zero :: PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
zero = Bool -> PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
PhysicalDeviceFragmentDensityMapLayeredFeaturesVALVE
Bool
forall a. Zero a => a
zero
data PipelineFragmentDensityMapLayeredCreateInfoVALVE = PipelineFragmentDensityMapLayeredCreateInfoVALVE
{
PipelineFragmentDensityMapLayeredCreateInfoVALVE -> Word32
maxFragmentDensityMapLayers :: Word32 }
deriving (Typeable, PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> PipelineFragmentDensityMapLayeredCreateInfoVALVE -> Bool
(PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> PipelineFragmentDensityMapLayeredCreateInfoVALVE -> Bool)
-> (PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> PipelineFragmentDensityMapLayeredCreateInfoVALVE -> Bool)
-> Eq PipelineFragmentDensityMapLayeredCreateInfoVALVE
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> PipelineFragmentDensityMapLayeredCreateInfoVALVE -> Bool
== :: PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> PipelineFragmentDensityMapLayeredCreateInfoVALVE -> Bool
$c/= :: PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> PipelineFragmentDensityMapLayeredCreateInfoVALVE -> Bool
/= :: PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> PipelineFragmentDensityMapLayeredCreateInfoVALVE -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineFragmentDensityMapLayeredCreateInfoVALVE)
#endif
deriving instance Show PipelineFragmentDensityMapLayeredCreateInfoVALVE
instance ToCStruct PipelineFragmentDensityMapLayeredCreateInfoVALVE where
withCStruct :: forall b.
PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> (Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE -> IO b)
-> IO b
withCStruct PipelineFragmentDensityMapLayeredCreateInfoVALVE
x Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE -> IO b
f = Int
-> (Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE -> IO b)
-> IO b)
-> (Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
p -> Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> PipelineFragmentDensityMapLayeredCreateInfoVALVE -> IO b -> IO b
forall b.
Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> PipelineFragmentDensityMapLayeredCreateInfoVALVE -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
p PipelineFragmentDensityMapLayeredCreateInfoVALVE
x (Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE -> IO b
f Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
p)
pokeCStruct :: forall b.
Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> PipelineFragmentDensityMapLayeredCreateInfoVALVE -> IO b -> IO b
pokeCStruct Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
p PipelineFragmentDensityMapLayeredCreateInfoVALVE{Word32
maxFragmentDensityMapLayers :: PipelineFragmentDensityMapLayeredCreateInfoVALVE -> Word32
maxFragmentDensityMapLayers :: Word32
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
p Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_FRAGMENT_DENSITY_MAP_LAYERED_CREATE_INFO_VALVE)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
p Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
p Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
maxFragmentDensityMapLayers)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> IO b -> IO b
pokeZeroCStruct Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
p Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_FRAGMENT_DENSITY_MAP_LAYERED_CREATE_INFO_VALVE)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
p Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
p Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PipelineFragmentDensityMapLayeredCreateInfoVALVE where
peekCStruct :: Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> IO PipelineFragmentDensityMapLayeredCreateInfoVALVE
peekCStruct Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
p = do
maxFragmentDensityMapLayers <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
p Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
pure $ PipelineFragmentDensityMapLayeredCreateInfoVALVE
maxFragmentDensityMapLayers
instance Storable PipelineFragmentDensityMapLayeredCreateInfoVALVE where
sizeOf :: PipelineFragmentDensityMapLayeredCreateInfoVALVE -> Int
sizeOf ~PipelineFragmentDensityMapLayeredCreateInfoVALVE
_ = Int
24
alignment :: PipelineFragmentDensityMapLayeredCreateInfoVALVE -> Int
alignment ~PipelineFragmentDensityMapLayeredCreateInfoVALVE
_ = Int
8
peek :: Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> IO PipelineFragmentDensityMapLayeredCreateInfoVALVE
peek = Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> IO PipelineFragmentDensityMapLayeredCreateInfoVALVE
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> PipelineFragmentDensityMapLayeredCreateInfoVALVE -> IO ()
poke Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
poked = Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> IO ()
-> IO ()
forall b.
Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
-> PipelineFragmentDensityMapLayeredCreateInfoVALVE -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
ptr PipelineFragmentDensityMapLayeredCreateInfoVALVE
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PipelineFragmentDensityMapLayeredCreateInfoVALVE where
zero :: PipelineFragmentDensityMapLayeredCreateInfoVALVE
zero = Word32 -> PipelineFragmentDensityMapLayeredCreateInfoVALVE
PipelineFragmentDensityMapLayeredCreateInfoVALVE
Word32
forall a. Zero a => a
zero
type VALVE_FRAGMENT_DENSITY_MAP_LAYERED_SPEC_VERSION = 1
pattern VALVE_FRAGMENT_DENSITY_MAP_LAYERED_SPEC_VERSION :: forall a . Integral a => a
pattern $mVALVE_FRAGMENT_DENSITY_MAP_LAYERED_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bVALVE_FRAGMENT_DENSITY_MAP_LAYERED_SPEC_VERSION :: forall a. Integral a => a
VALVE_FRAGMENT_DENSITY_MAP_LAYERED_SPEC_VERSION = 1
type VALVE_FRAGMENT_DENSITY_MAP_LAYERED_EXTENSION_NAME = "VK_VALVE_fragment_density_map_layered"
pattern VALVE_FRAGMENT_DENSITY_MAP_LAYERED_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mVALVE_FRAGMENT_DENSITY_MAP_LAYERED_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bVALVE_FRAGMENT_DENSITY_MAP_LAYERED_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
VALVE_FRAGMENT_DENSITY_MAP_LAYERED_EXTENSION_NAME = "VK_VALVE_fragment_density_map_layered"