{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_fragment_density_map ( PhysicalDeviceFragmentDensityMapFeaturesEXT(..)
, PhysicalDeviceFragmentDensityMapPropertiesEXT(..)
, RenderPassFragmentDensityMapCreateInfoEXT(..)
, EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION
, pattern EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION
, EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME
, pattern EXT_FRAGMENT_DENSITY_MAP_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.Pass (AttachmentReference)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.FundamentalTypes (Extent2D)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT))
data PhysicalDeviceFragmentDensityMapFeaturesEXT = PhysicalDeviceFragmentDensityMapFeaturesEXT
{
PhysicalDeviceFragmentDensityMapFeaturesEXT -> Bool
fragmentDensityMap :: Bool
,
PhysicalDeviceFragmentDensityMapFeaturesEXT -> Bool
fragmentDensityMapDynamic :: Bool
,
PhysicalDeviceFragmentDensityMapFeaturesEXT -> Bool
fragmentDensityMapNonSubsampledImages :: Bool
}
deriving (Typeable, PhysicalDeviceFragmentDensityMapFeaturesEXT
-> PhysicalDeviceFragmentDensityMapFeaturesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceFragmentDensityMapFeaturesEXT
-> PhysicalDeviceFragmentDensityMapFeaturesEXT -> Bool
$c/= :: PhysicalDeviceFragmentDensityMapFeaturesEXT
-> PhysicalDeviceFragmentDensityMapFeaturesEXT -> Bool
== :: PhysicalDeviceFragmentDensityMapFeaturesEXT
-> PhysicalDeviceFragmentDensityMapFeaturesEXT -> Bool
$c== :: PhysicalDeviceFragmentDensityMapFeaturesEXT
-> PhysicalDeviceFragmentDensityMapFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentDensityMapFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceFragmentDensityMapFeaturesEXT
instance ToCStruct PhysicalDeviceFragmentDensityMapFeaturesEXT where
withCStruct :: forall b.
PhysicalDeviceFragmentDensityMapFeaturesEXT
-> (Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceFragmentDensityMapFeaturesEXT
x Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p PhysicalDeviceFragmentDensityMapFeaturesEXT
x (Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT -> IO b
f Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
-> PhysicalDeviceFragmentDensityMapFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p PhysicalDeviceFragmentDensityMapFeaturesEXT{Bool
fragmentDensityMapNonSubsampledImages :: Bool
fragmentDensityMapDynamic :: Bool
fragmentDensityMap :: Bool
$sel:fragmentDensityMapNonSubsampledImages:PhysicalDeviceFragmentDensityMapFeaturesEXT :: PhysicalDeviceFragmentDensityMapFeaturesEXT -> Bool
$sel:fragmentDensityMapDynamic:PhysicalDeviceFragmentDensityMapFeaturesEXT :: PhysicalDeviceFragmentDensityMapFeaturesEXT -> Bool
$sel:fragmentDensityMap:PhysicalDeviceFragmentDensityMapFeaturesEXT :: PhysicalDeviceFragmentDensityMapFeaturesEXT -> Bool
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
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 PhysicalDeviceFragmentDensityMapFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentDensityMap))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentDensityMapDynamic))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentDensityMapNonSubsampledImages))
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
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 PhysicalDeviceFragmentDensityMapFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceFragmentDensityMapFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
-> IO PhysicalDeviceFragmentDensityMapFeaturesEXT
peekCStruct Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p = do
Bool32
fragmentDensityMap <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
Bool32
fragmentDensityMapDynamic <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
Bool32
fragmentDensityMapNonSubsampledImages <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool -> Bool -> Bool -> PhysicalDeviceFragmentDensityMapFeaturesEXT
PhysicalDeviceFragmentDensityMapFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
fragmentDensityMap)
(Bool32 -> Bool
bool32ToBool Bool32
fragmentDensityMapDynamic)
(Bool32 -> Bool
bool32ToBool Bool32
fragmentDensityMapNonSubsampledImages)
instance Storable PhysicalDeviceFragmentDensityMapFeaturesEXT where
sizeOf :: PhysicalDeviceFragmentDensityMapFeaturesEXT -> Int
sizeOf ~PhysicalDeviceFragmentDensityMapFeaturesEXT
_ = Int
32
alignment :: PhysicalDeviceFragmentDensityMapFeaturesEXT -> Int
alignment ~PhysicalDeviceFragmentDensityMapFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
-> IO PhysicalDeviceFragmentDensityMapFeaturesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
-> PhysicalDeviceFragmentDensityMapFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
ptr PhysicalDeviceFragmentDensityMapFeaturesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFragmentDensityMapFeaturesEXT where
zero :: PhysicalDeviceFragmentDensityMapFeaturesEXT
zero = Bool -> Bool -> Bool -> PhysicalDeviceFragmentDensityMapFeaturesEXT
PhysicalDeviceFragmentDensityMapFeaturesEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data PhysicalDeviceFragmentDensityMapPropertiesEXT = PhysicalDeviceFragmentDensityMapPropertiesEXT
{
PhysicalDeviceFragmentDensityMapPropertiesEXT -> Extent2D
minFragmentDensityTexelSize :: Extent2D
,
PhysicalDeviceFragmentDensityMapPropertiesEXT -> Extent2D
maxFragmentDensityTexelSize :: Extent2D
,
PhysicalDeviceFragmentDensityMapPropertiesEXT -> Bool
fragmentDensityInvocations :: Bool
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceFragmentDensityMapPropertiesEXT)
#endif
deriving instance Show PhysicalDeviceFragmentDensityMapPropertiesEXT
instance ToCStruct PhysicalDeviceFragmentDensityMapPropertiesEXT where
withCStruct :: forall b.
PhysicalDeviceFragmentDensityMapPropertiesEXT
-> (Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceFragmentDensityMapPropertiesEXT
x Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p PhysicalDeviceFragmentDensityMapPropertiesEXT
x (Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT -> IO b
f Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
-> PhysicalDeviceFragmentDensityMapPropertiesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p PhysicalDeviceFragmentDensityMapPropertiesEXT{Bool
Extent2D
fragmentDensityInvocations :: Bool
maxFragmentDensityTexelSize :: Extent2D
minFragmentDensityTexelSize :: Extent2D
$sel:fragmentDensityInvocations:PhysicalDeviceFragmentDensityMapPropertiesEXT :: PhysicalDeviceFragmentDensityMapPropertiesEXT -> Bool
$sel:maxFragmentDensityTexelSize:PhysicalDeviceFragmentDensityMapPropertiesEXT :: PhysicalDeviceFragmentDensityMapPropertiesEXT -> Extent2D
$sel:minFragmentDensityTexelSize:PhysicalDeviceFragmentDensityMapPropertiesEXT :: PhysicalDeviceFragmentDensityMapPropertiesEXT -> Extent2D
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
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 PhysicalDeviceFragmentDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D)) (Extent2D
minFragmentDensityTexelSize)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) (Extent2D
maxFragmentDensityTexelSize)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
fragmentDensityInvocations))
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
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 PhysicalDeviceFragmentDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceFragmentDensityMapPropertiesEXT where
peekCStruct :: Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
-> IO PhysicalDeviceFragmentDensityMapPropertiesEXT
peekCStruct Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p = do
Extent2D
minFragmentDensityTexelSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Extent2D))
Extent2D
maxFragmentDensityTexelSize <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Extent2D ((Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Extent2D))
Bool32
fragmentDensityInvocations <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Extent2D
-> Extent2D
-> Bool
-> PhysicalDeviceFragmentDensityMapPropertiesEXT
PhysicalDeviceFragmentDensityMapPropertiesEXT
Extent2D
minFragmentDensityTexelSize
Extent2D
maxFragmentDensityTexelSize
(Bool32 -> Bool
bool32ToBool Bool32
fragmentDensityInvocations)
instance Storable PhysicalDeviceFragmentDensityMapPropertiesEXT where
sizeOf :: PhysicalDeviceFragmentDensityMapPropertiesEXT -> Int
sizeOf ~PhysicalDeviceFragmentDensityMapPropertiesEXT
_ = Int
40
alignment :: PhysicalDeviceFragmentDensityMapPropertiesEXT -> Int
alignment ~PhysicalDeviceFragmentDensityMapPropertiesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
-> IO PhysicalDeviceFragmentDensityMapPropertiesEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
-> PhysicalDeviceFragmentDensityMapPropertiesEXT -> IO ()
poke Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
ptr PhysicalDeviceFragmentDensityMapPropertiesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceFragmentDensityMapPropertiesEXT where
zero :: PhysicalDeviceFragmentDensityMapPropertiesEXT
zero = Extent2D
-> Extent2D
-> Bool
-> PhysicalDeviceFragmentDensityMapPropertiesEXT
PhysicalDeviceFragmentDensityMapPropertiesEXT
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data RenderPassFragmentDensityMapCreateInfoEXT = RenderPassFragmentDensityMapCreateInfoEXT
{
RenderPassFragmentDensityMapCreateInfoEXT -> AttachmentReference
fragmentDensityMapAttachment :: AttachmentReference }
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (RenderPassFragmentDensityMapCreateInfoEXT)
#endif
deriving instance Show RenderPassFragmentDensityMapCreateInfoEXT
instance ToCStruct RenderPassFragmentDensityMapCreateInfoEXT where
withCStruct :: forall b.
RenderPassFragmentDensityMapCreateInfoEXT
-> (Ptr RenderPassFragmentDensityMapCreateInfoEXT -> IO b) -> IO b
withCStruct RenderPassFragmentDensityMapCreateInfoEXT
x Ptr RenderPassFragmentDensityMapCreateInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr RenderPassFragmentDensityMapCreateInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RenderPassFragmentDensityMapCreateInfoEXT
p RenderPassFragmentDensityMapCreateInfoEXT
x (Ptr RenderPassFragmentDensityMapCreateInfoEXT -> IO b
f Ptr RenderPassFragmentDensityMapCreateInfoEXT
p)
pokeCStruct :: forall b.
Ptr RenderPassFragmentDensityMapCreateInfoEXT
-> RenderPassFragmentDensityMapCreateInfoEXT -> IO b -> IO b
pokeCStruct Ptr RenderPassFragmentDensityMapCreateInfoEXT
p RenderPassFragmentDensityMapCreateInfoEXT{AttachmentReference
fragmentDensityMapAttachment :: AttachmentReference
$sel:fragmentDensityMapAttachment:RenderPassFragmentDensityMapCreateInfoEXT :: RenderPassFragmentDensityMapCreateInfoEXT -> AttachmentReference
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassFragmentDensityMapCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassFragmentDensityMapCreateInfoEXT
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 RenderPassFragmentDensityMapCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AttachmentReference)) (AttachmentReference
fragmentDensityMapAttachment)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr RenderPassFragmentDensityMapCreateInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr RenderPassFragmentDensityMapCreateInfoEXT
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassFragmentDensityMapCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassFragmentDensityMapCreateInfoEXT
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 RenderPassFragmentDensityMapCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AttachmentReference)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct RenderPassFragmentDensityMapCreateInfoEXT where
peekCStruct :: Ptr RenderPassFragmentDensityMapCreateInfoEXT
-> IO RenderPassFragmentDensityMapCreateInfoEXT
peekCStruct Ptr RenderPassFragmentDensityMapCreateInfoEXT
p = do
AttachmentReference
fragmentDensityMapAttachment <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @AttachmentReference ((Ptr RenderPassFragmentDensityMapCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AttachmentReference))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ AttachmentReference -> RenderPassFragmentDensityMapCreateInfoEXT
RenderPassFragmentDensityMapCreateInfoEXT
AttachmentReference
fragmentDensityMapAttachment
instance Storable RenderPassFragmentDensityMapCreateInfoEXT where
sizeOf :: RenderPassFragmentDensityMapCreateInfoEXT -> Int
sizeOf ~RenderPassFragmentDensityMapCreateInfoEXT
_ = Int
24
alignment :: RenderPassFragmentDensityMapCreateInfoEXT -> Int
alignment ~RenderPassFragmentDensityMapCreateInfoEXT
_ = Int
8
peek :: Ptr RenderPassFragmentDensityMapCreateInfoEXT
-> IO RenderPassFragmentDensityMapCreateInfoEXT
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr RenderPassFragmentDensityMapCreateInfoEXT
-> RenderPassFragmentDensityMapCreateInfoEXT -> IO ()
poke Ptr RenderPassFragmentDensityMapCreateInfoEXT
ptr RenderPassFragmentDensityMapCreateInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RenderPassFragmentDensityMapCreateInfoEXT
ptr RenderPassFragmentDensityMapCreateInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero RenderPassFragmentDensityMapCreateInfoEXT where
zero :: RenderPassFragmentDensityMapCreateInfoEXT
zero = AttachmentReference -> RenderPassFragmentDensityMapCreateInfoEXT
RenderPassFragmentDensityMapCreateInfoEXT
forall a. Zero a => a
zero
type EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION = 2
pattern EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION :: forall a. Integral a => a
$mEXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION = 2
type EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME = "VK_EXT_fragment_density_map"
pattern EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME = "VK_EXT_fragment_density_map"