{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_map_memory_placed ( PhysicalDeviceMapMemoryPlacedFeaturesEXT(..)
, PhysicalDeviceMapMemoryPlacedPropertiesEXT(..)
, MemoryMapPlacedInfoEXT(..)
, EXT_MAP_MEMORY_PLACED_SPEC_VERSION
, pattern EXT_MAP_MEMORY_PLACED_SPEC_VERSION
, EXT_MAP_MEMORY_PLACED_EXTENSION_NAME
, pattern EXT_MAP_MEMORY_PLACED_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.FundamentalTypes (DeviceSize)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_MEMORY_MAP_PLACED_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_PROPERTIES_EXT))
data PhysicalDeviceMapMemoryPlacedFeaturesEXT = PhysicalDeviceMapMemoryPlacedFeaturesEXT
{
PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Bool
memoryMapPlaced :: Bool
,
PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Bool
memoryMapRangePlaced :: Bool
,
PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Bool
memoryUnmapReserve :: Bool
}
deriving (Typeable, PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Bool
(PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Bool)
-> (PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Bool)
-> Eq PhysicalDeviceMapMemoryPlacedFeaturesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Bool
== :: PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Bool
$c/= :: PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Bool
/= :: PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceMapMemoryPlacedFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceMapMemoryPlacedFeaturesEXT
instance ToCStruct PhysicalDeviceMapMemoryPlacedFeaturesEXT where
withCStruct :: forall b.
PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> (Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> IO b) -> IO b
withCStruct PhysicalDeviceMapMemoryPlacedFeaturesEXT
x Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> IO b
f = Int
-> (Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> IO b) -> IO b)
-> (Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p -> Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> PhysicalDeviceMapMemoryPlacedFeaturesEXT -> IO b -> IO b
forall b.
Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> PhysicalDeviceMapMemoryPlacedFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p PhysicalDeviceMapMemoryPlacedFeaturesEXT
x (Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> IO b
f Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> PhysicalDeviceMapMemoryPlacedFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p PhysicalDeviceMapMemoryPlacedFeaturesEXT{Bool
memoryMapPlaced :: PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Bool
memoryMapRangePlaced :: PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Bool
memoryUnmapReserve :: PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Bool
memoryMapPlaced :: Bool
memoryMapRangePlaced :: Bool
memoryUnmapReserve :: Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> 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 PhysicalDeviceMapMemoryPlacedFeaturesEXT
p Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
memoryMapPlaced))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
memoryMapRangePlaced))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
memoryUnmapReserve))
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> 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 PhysicalDeviceMapMemoryPlacedFeaturesEXT
p Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> 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))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceMapMemoryPlacedFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> IO PhysicalDeviceMapMemoryPlacedFeaturesEXT
peekCStruct Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p = do
memoryMapPlaced <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
p Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
memoryMapRangePlaced <- peek @Bool32 ((p `plusPtr` 20 :: Ptr Bool32))
memoryUnmapReserve <- peek @Bool32 ((p `plusPtr` 24 :: Ptr Bool32))
pure $ PhysicalDeviceMapMemoryPlacedFeaturesEXT
(bool32ToBool memoryMapPlaced)
(bool32ToBool memoryMapRangePlaced)
(bool32ToBool memoryUnmapReserve)
instance Storable PhysicalDeviceMapMemoryPlacedFeaturesEXT where
sizeOf :: PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Int
sizeOf ~PhysicalDeviceMapMemoryPlacedFeaturesEXT
_ = Int
32
alignment :: PhysicalDeviceMapMemoryPlacedFeaturesEXT -> Int
alignment ~PhysicalDeviceMapMemoryPlacedFeaturesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> IO PhysicalDeviceMapMemoryPlacedFeaturesEXT
peek = Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> IO PhysicalDeviceMapMemoryPlacedFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> PhysicalDeviceMapMemoryPlacedFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
poked = Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> PhysicalDeviceMapMemoryPlacedFeaturesEXT -> IO () -> IO ()
forall b.
Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
-> PhysicalDeviceMapMemoryPlacedFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
ptr PhysicalDeviceMapMemoryPlacedFeaturesEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceMapMemoryPlacedFeaturesEXT where
zero :: PhysicalDeviceMapMemoryPlacedFeaturesEXT
zero = Bool -> Bool -> Bool -> PhysicalDeviceMapMemoryPlacedFeaturesEXT
PhysicalDeviceMapMemoryPlacedFeaturesEXT
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
data PhysicalDeviceMapMemoryPlacedPropertiesEXT = PhysicalDeviceMapMemoryPlacedPropertiesEXT
{
PhysicalDeviceMapMemoryPlacedPropertiesEXT -> DeviceSize
minPlacedMemoryMapAlignment :: DeviceSize }
deriving (Typeable, PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> PhysicalDeviceMapMemoryPlacedPropertiesEXT -> Bool
(PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> PhysicalDeviceMapMemoryPlacedPropertiesEXT -> Bool)
-> (PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> PhysicalDeviceMapMemoryPlacedPropertiesEXT -> Bool)
-> Eq PhysicalDeviceMapMemoryPlacedPropertiesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> PhysicalDeviceMapMemoryPlacedPropertiesEXT -> Bool
== :: PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> PhysicalDeviceMapMemoryPlacedPropertiesEXT -> Bool
$c/= :: PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> PhysicalDeviceMapMemoryPlacedPropertiesEXT -> Bool
/= :: PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> PhysicalDeviceMapMemoryPlacedPropertiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceMapMemoryPlacedPropertiesEXT)
#endif
deriving instance Show PhysicalDeviceMapMemoryPlacedPropertiesEXT
instance ToCStruct PhysicalDeviceMapMemoryPlacedPropertiesEXT where
withCStruct :: forall b.
PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> (Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT -> IO b) -> IO b
withCStruct PhysicalDeviceMapMemoryPlacedPropertiesEXT
x Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT -> IO b
f = Int
-> (Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT -> IO b) -> IO b)
-> (Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
p -> Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> PhysicalDeviceMapMemoryPlacedPropertiesEXT -> IO b -> IO b
forall b.
Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> PhysicalDeviceMapMemoryPlacedPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
p PhysicalDeviceMapMemoryPlacedPropertiesEXT
x (Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT -> IO b
f Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> PhysicalDeviceMapMemoryPlacedPropertiesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
p PhysicalDeviceMapMemoryPlacedPropertiesEXT{DeviceSize
minPlacedMemoryMapAlignment :: PhysicalDeviceMapMemoryPlacedPropertiesEXT -> DeviceSize
minPlacedMemoryMapAlignment :: DeviceSize
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
p Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
p Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr DeviceSize -> DeviceSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
p Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize)) (DeviceSize
minPlacedMemoryMapAlignment)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
p Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_PROPERTIES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
p Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr DeviceSize -> DeviceSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
p Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize)) (DeviceSize
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceMapMemoryPlacedPropertiesEXT where
peekCStruct :: Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> IO PhysicalDeviceMapMemoryPlacedPropertiesEXT
peekCStruct Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
p = do
minPlacedMemoryMapAlignment <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
p Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> Int -> Ptr DeviceSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize))
pure $ PhysicalDeviceMapMemoryPlacedPropertiesEXT
minPlacedMemoryMapAlignment
instance Storable PhysicalDeviceMapMemoryPlacedPropertiesEXT where
sizeOf :: PhysicalDeviceMapMemoryPlacedPropertiesEXT -> Int
sizeOf ~PhysicalDeviceMapMemoryPlacedPropertiesEXT
_ = Int
24
alignment :: PhysicalDeviceMapMemoryPlacedPropertiesEXT -> Int
alignment ~PhysicalDeviceMapMemoryPlacedPropertiesEXT
_ = Int
8
peek :: Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> IO PhysicalDeviceMapMemoryPlacedPropertiesEXT
peek = Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> IO PhysicalDeviceMapMemoryPlacedPropertiesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> PhysicalDeviceMapMemoryPlacedPropertiesEXT -> IO ()
poke Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
poked = Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> PhysicalDeviceMapMemoryPlacedPropertiesEXT -> IO () -> IO ()
forall b.
Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
-> PhysicalDeviceMapMemoryPlacedPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
ptr PhysicalDeviceMapMemoryPlacedPropertiesEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceMapMemoryPlacedPropertiesEXT where
zero :: PhysicalDeviceMapMemoryPlacedPropertiesEXT
zero = DeviceSize -> PhysicalDeviceMapMemoryPlacedPropertiesEXT
PhysicalDeviceMapMemoryPlacedPropertiesEXT
DeviceSize
forall a. Zero a => a
zero
data MemoryMapPlacedInfoEXT = MemoryMapPlacedInfoEXT
{
MemoryMapPlacedInfoEXT -> Ptr ()
placedAddress :: Ptr () }
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (MemoryMapPlacedInfoEXT)
#endif
deriving instance Show MemoryMapPlacedInfoEXT
instance ToCStruct MemoryMapPlacedInfoEXT where
withCStruct :: forall b.
MemoryMapPlacedInfoEXT
-> (Ptr MemoryMapPlacedInfoEXT -> IO b) -> IO b
withCStruct MemoryMapPlacedInfoEXT
x Ptr MemoryMapPlacedInfoEXT -> IO b
f = Int -> (Ptr MemoryMapPlacedInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr MemoryMapPlacedInfoEXT -> IO b) -> IO b)
-> (Ptr MemoryMapPlacedInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr MemoryMapPlacedInfoEXT
p -> Ptr MemoryMapPlacedInfoEXT
-> MemoryMapPlacedInfoEXT -> IO b -> IO b
forall b.
Ptr MemoryMapPlacedInfoEXT
-> MemoryMapPlacedInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr MemoryMapPlacedInfoEXT
p MemoryMapPlacedInfoEXT
x (Ptr MemoryMapPlacedInfoEXT -> IO b
f Ptr MemoryMapPlacedInfoEXT
p)
pokeCStruct :: forall b.
Ptr MemoryMapPlacedInfoEXT
-> MemoryMapPlacedInfoEXT -> IO b -> IO b
pokeCStruct Ptr MemoryMapPlacedInfoEXT
p MemoryMapPlacedInfoEXT{Ptr ()
placedAddress :: MemoryMapPlacedInfoEXT -> Ptr ()
placedAddress :: Ptr ()
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MemoryMapPlacedInfoEXT
p Ptr MemoryMapPlacedInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_MEMORY_MAP_PLACED_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MemoryMapPlacedInfoEXT
p Ptr MemoryMapPlacedInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MemoryMapPlacedInfoEXT
p Ptr MemoryMapPlacedInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr ()))) (Ptr ()
placedAddress)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr MemoryMapPlacedInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr MemoryMapPlacedInfoEXT
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MemoryMapPlacedInfoEXT
p Ptr MemoryMapPlacedInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_MEMORY_MAP_PLACED_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MemoryMapPlacedInfoEXT
p Ptr MemoryMapPlacedInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MemoryMapPlacedInfoEXT
p Ptr MemoryMapPlacedInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr ()))) (Ptr ()
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct MemoryMapPlacedInfoEXT where
peekCStruct :: Ptr MemoryMapPlacedInfoEXT -> IO MemoryMapPlacedInfoEXT
peekCStruct Ptr MemoryMapPlacedInfoEXT
p = do
pPlacedAddress <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr MemoryMapPlacedInfoEXT
p Ptr MemoryMapPlacedInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr ())))
pure $ MemoryMapPlacedInfoEXT
pPlacedAddress
instance Storable MemoryMapPlacedInfoEXT where
sizeOf :: MemoryMapPlacedInfoEXT -> Int
sizeOf ~MemoryMapPlacedInfoEXT
_ = Int
24
alignment :: MemoryMapPlacedInfoEXT -> Int
alignment ~MemoryMapPlacedInfoEXT
_ = Int
8
peek :: Ptr MemoryMapPlacedInfoEXT -> IO MemoryMapPlacedInfoEXT
peek = Ptr MemoryMapPlacedInfoEXT -> IO MemoryMapPlacedInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr MemoryMapPlacedInfoEXT -> MemoryMapPlacedInfoEXT -> IO ()
poke Ptr MemoryMapPlacedInfoEXT
ptr MemoryMapPlacedInfoEXT
poked = Ptr MemoryMapPlacedInfoEXT
-> MemoryMapPlacedInfoEXT -> IO () -> IO ()
forall b.
Ptr MemoryMapPlacedInfoEXT
-> MemoryMapPlacedInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr MemoryMapPlacedInfoEXT
ptr MemoryMapPlacedInfoEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero MemoryMapPlacedInfoEXT where
zero :: MemoryMapPlacedInfoEXT
zero = Ptr () -> MemoryMapPlacedInfoEXT
MemoryMapPlacedInfoEXT
Ptr ()
forall a. Zero a => a
zero
type EXT_MAP_MEMORY_PLACED_SPEC_VERSION = 1
pattern EXT_MAP_MEMORY_PLACED_SPEC_VERSION :: forall a . Integral a => a
pattern $mEXT_MAP_MEMORY_PLACED_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bEXT_MAP_MEMORY_PLACED_SPEC_VERSION :: forall a. Integral a => a
EXT_MAP_MEMORY_PLACED_SPEC_VERSION = 1
type EXT_MAP_MEMORY_PLACED_EXTENSION_NAME = "VK_EXT_map_memory_placed"
pattern EXT_MAP_MEMORY_PLACED_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mEXT_MAP_MEMORY_PLACED_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bEXT_MAP_MEMORY_PLACED_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
EXT_MAP_MEMORY_PLACED_EXTENSION_NAME = "VK_EXT_map_memory_placed"