{-# language CPP #-}
module Vulkan.Extensions.VK_EXT_buffer_device_address ( pattern STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT
, pattern STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT
, pattern BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT
, pattern BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT
, pattern ERROR_INVALID_DEVICE_ADDRESS_EXT
, getBufferDeviceAddressEXT
, PhysicalDeviceBufferDeviceAddressFeaturesEXT(..)
, BufferDeviceAddressCreateInfoEXT(..)
, PhysicalDeviceBufferAddressFeaturesEXT
, BufferDeviceAddressInfoEXT
, EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION
, pattern EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION
, EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME
, pattern EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME
) where
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
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 Foreign.Ptr (Ptr)
import Data.Kind (Type)
import Vulkan.Core10.BaseType (bool32ToBool)
import Vulkan.Core10.BaseType (boolToBool32)
import Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address (getBufferDeviceAddress)
import Vulkan.Core10.BaseType (Bool32)
import Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address (BufferDeviceAddressInfo)
import Vulkan.Core10.BaseType (DeviceAddress)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
import Vulkan.Core10.Enums.BufferCreateFlagBits (BufferCreateFlags)
import Vulkan.Core10.Enums.BufferCreateFlagBits (BufferCreateFlagBits(BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT))
import Vulkan.Core10.Enums.BufferUsageFlagBits (BufferUsageFlags)
import Vulkan.Core10.Enums.BufferUsageFlagBits (BufferUsageFlagBits(BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT))
import Vulkan.Core10.Enums.Result (Result(ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT))
pattern $bSTRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT :: StructureType
$mSTRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT :: forall r. StructureType -> (Void# -> r) -> (Void# -> r) -> r
STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT = STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT
pattern $bSTRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT :: StructureType
$mSTRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT :: forall r. StructureType -> (Void# -> r) -> (Void# -> r) -> r
STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT = STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO
pattern $bBUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT :: BufferUsageFlagBits
$mBUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT :: forall r. BufferUsageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT = BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT
pattern $bBUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT :: BufferCreateFlagBits
$mBUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT :: forall r. BufferCreateFlagBits -> (Void# -> r) -> (Void# -> r) -> r
BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT
pattern $bERROR_INVALID_DEVICE_ADDRESS_EXT :: Result
$mERROR_INVALID_DEVICE_ADDRESS_EXT :: forall r. Result -> (Void# -> r) -> (Void# -> r) -> r
ERROR_INVALID_DEVICE_ADDRESS_EXT = ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS
getBufferDeviceAddressEXT :: Device -> BufferDeviceAddressInfo -> io DeviceAddress
getBufferDeviceAddressEXT = Device -> BufferDeviceAddressInfo -> io DeviceAddress
forall (io :: * -> *).
MonadIO io =>
Device -> BufferDeviceAddressInfo -> io DeviceAddress
getBufferDeviceAddress
data PhysicalDeviceBufferDeviceAddressFeaturesEXT = PhysicalDeviceBufferDeviceAddressFeaturesEXT
{
PhysicalDeviceBufferDeviceAddressFeaturesEXT -> Bool
bufferDeviceAddress :: Bool
,
PhysicalDeviceBufferDeviceAddressFeaturesEXT -> Bool
bufferDeviceAddressCaptureReplay :: Bool
,
PhysicalDeviceBufferDeviceAddressFeaturesEXT -> Bool
bufferDeviceAddressMultiDevice :: Bool
}
deriving (Typeable)
deriving instance Show PhysicalDeviceBufferDeviceAddressFeaturesEXT
instance ToCStruct PhysicalDeviceBufferDeviceAddressFeaturesEXT where
withCStruct :: PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> (Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT -> IO b)
-> IO b
withCStruct x :: PhysicalDeviceBufferDeviceAddressFeaturesEXT
x f :: Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p -> Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> PhysicalDeviceBufferDeviceAddressFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p PhysicalDeviceBufferDeviceAddressFeaturesEXT
x (Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT -> IO b
f Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p)
pokeCStruct :: Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> PhysicalDeviceBufferDeviceAddressFeaturesEXT -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p PhysicalDeviceBufferDeviceAddressFeaturesEXT{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
bufferDeviceAddress))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
bufferDeviceAddressCaptureReplay))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
bufferDeviceAddressMultiDevice))
IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 PhysicalDeviceBufferDeviceAddressFeaturesEXT
p Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 PhysicalDeviceBufferDeviceAddressFeaturesEXT
p Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceBufferDeviceAddressFeaturesEXT where
peekCStruct :: Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> IO PhysicalDeviceBufferDeviceAddressFeaturesEXT
peekCStruct p :: Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p = do
Bool32
bufferDeviceAddress <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32))
Bool32
bufferDeviceAddressCaptureReplay <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32))
Bool32
bufferDeviceAddressMultiDevice <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
p Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32))
PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> IO PhysicalDeviceBufferDeviceAddressFeaturesEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> IO PhysicalDeviceBufferDeviceAddressFeaturesEXT)
-> PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> IO PhysicalDeviceBufferDeviceAddressFeaturesEXT
forall a b. (a -> b) -> a -> b
$ Bool
-> Bool -> Bool -> PhysicalDeviceBufferDeviceAddressFeaturesEXT
PhysicalDeviceBufferDeviceAddressFeaturesEXT
(Bool32 -> Bool
bool32ToBool Bool32
bufferDeviceAddress) (Bool32 -> Bool
bool32ToBool Bool32
bufferDeviceAddressCaptureReplay) (Bool32 -> Bool
bool32ToBool Bool32
bufferDeviceAddressMultiDevice)
instance Storable PhysicalDeviceBufferDeviceAddressFeaturesEXT where
sizeOf :: PhysicalDeviceBufferDeviceAddressFeaturesEXT -> Int
sizeOf ~PhysicalDeviceBufferDeviceAddressFeaturesEXT
_ = 32
alignment :: PhysicalDeviceBufferDeviceAddressFeaturesEXT -> Int
alignment ~PhysicalDeviceBufferDeviceAddressFeaturesEXT
_ = 8
peek :: Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> IO PhysicalDeviceBufferDeviceAddressFeaturesEXT
peek = Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> IO PhysicalDeviceBufferDeviceAddressFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> PhysicalDeviceBufferDeviceAddressFeaturesEXT -> IO ()
poke ptr :: Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
ptr poked :: PhysicalDeviceBufferDeviceAddressFeaturesEXT
poked = Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
-> PhysicalDeviceBufferDeviceAddressFeaturesEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
ptr PhysicalDeviceBufferDeviceAddressFeaturesEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceBufferDeviceAddressFeaturesEXT where
zero :: PhysicalDeviceBufferDeviceAddressFeaturesEXT
zero = Bool
-> Bool -> Bool -> PhysicalDeviceBufferDeviceAddressFeaturesEXT
PhysicalDeviceBufferDeviceAddressFeaturesEXT
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
data BufferDeviceAddressCreateInfoEXT = BufferDeviceAddressCreateInfoEXT
{
BufferDeviceAddressCreateInfoEXT -> DeviceAddress
deviceAddress :: DeviceAddress }
deriving (Typeable)
deriving instance Show BufferDeviceAddressCreateInfoEXT
instance ToCStruct BufferDeviceAddressCreateInfoEXT where
withCStruct :: BufferDeviceAddressCreateInfoEXT
-> (Ptr BufferDeviceAddressCreateInfoEXT -> IO b) -> IO b
withCStruct x :: BufferDeviceAddressCreateInfoEXT
x f :: Ptr BufferDeviceAddressCreateInfoEXT -> IO b
f = Int
-> Int -> (Ptr BufferDeviceAddressCreateInfoEXT -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr BufferDeviceAddressCreateInfoEXT -> IO b) -> IO b)
-> (Ptr BufferDeviceAddressCreateInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr BufferDeviceAddressCreateInfoEXT
p -> Ptr BufferDeviceAddressCreateInfoEXT
-> BufferDeviceAddressCreateInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BufferDeviceAddressCreateInfoEXT
p BufferDeviceAddressCreateInfoEXT
x (Ptr BufferDeviceAddressCreateInfoEXT -> IO b
f Ptr BufferDeviceAddressCreateInfoEXT
p)
pokeCStruct :: Ptr BufferDeviceAddressCreateInfoEXT
-> BufferDeviceAddressCreateInfoEXT -> IO b -> IO b
pokeCStruct p :: Ptr BufferDeviceAddressCreateInfoEXT
p BufferDeviceAddressCreateInfoEXT{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferDeviceAddressCreateInfoEXT
p Ptr BufferDeviceAddressCreateInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferDeviceAddressCreateInfoEXT
p Ptr BufferDeviceAddressCreateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferDeviceAddressCreateInfoEXT
p Ptr BufferDeviceAddressCreateInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceAddress)) (DeviceAddress
deviceAddress)
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr BufferDeviceAddressCreateInfoEXT -> IO b -> IO b
pokeZeroCStruct p :: Ptr BufferDeviceAddressCreateInfoEXT
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferDeviceAddressCreateInfoEXT
p Ptr BufferDeviceAddressCreateInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferDeviceAddressCreateInfoEXT
p Ptr BufferDeviceAddressCreateInfoEXT -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferDeviceAddressCreateInfoEXT
p Ptr BufferDeviceAddressCreateInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceAddress)) (DeviceAddress
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct BufferDeviceAddressCreateInfoEXT where
peekCStruct :: Ptr BufferDeviceAddressCreateInfoEXT
-> IO BufferDeviceAddressCreateInfoEXT
peekCStruct p :: Ptr BufferDeviceAddressCreateInfoEXT
p = do
DeviceAddress
deviceAddress <- Ptr DeviceAddress -> IO DeviceAddress
forall a. Storable a => Ptr a -> IO a
peek @DeviceAddress ((Ptr BufferDeviceAddressCreateInfoEXT
p Ptr BufferDeviceAddressCreateInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceAddress))
BufferDeviceAddressCreateInfoEXT
-> IO BufferDeviceAddressCreateInfoEXT
forall (f :: * -> *) a. Applicative f => a -> f a
pure (BufferDeviceAddressCreateInfoEXT
-> IO BufferDeviceAddressCreateInfoEXT)
-> BufferDeviceAddressCreateInfoEXT
-> IO BufferDeviceAddressCreateInfoEXT
forall a b. (a -> b) -> a -> b
$ DeviceAddress -> BufferDeviceAddressCreateInfoEXT
BufferDeviceAddressCreateInfoEXT
DeviceAddress
deviceAddress
instance Storable BufferDeviceAddressCreateInfoEXT where
sizeOf :: BufferDeviceAddressCreateInfoEXT -> Int
sizeOf ~BufferDeviceAddressCreateInfoEXT
_ = 24
alignment :: BufferDeviceAddressCreateInfoEXT -> Int
alignment ~BufferDeviceAddressCreateInfoEXT
_ = 8
peek :: Ptr BufferDeviceAddressCreateInfoEXT
-> IO BufferDeviceAddressCreateInfoEXT
peek = Ptr BufferDeviceAddressCreateInfoEXT
-> IO BufferDeviceAddressCreateInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr BufferDeviceAddressCreateInfoEXT
-> BufferDeviceAddressCreateInfoEXT -> IO ()
poke ptr :: Ptr BufferDeviceAddressCreateInfoEXT
ptr poked :: BufferDeviceAddressCreateInfoEXT
poked = Ptr BufferDeviceAddressCreateInfoEXT
-> BufferDeviceAddressCreateInfoEXT -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BufferDeviceAddressCreateInfoEXT
ptr BufferDeviceAddressCreateInfoEXT
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero BufferDeviceAddressCreateInfoEXT where
zero :: BufferDeviceAddressCreateInfoEXT
zero = DeviceAddress -> BufferDeviceAddressCreateInfoEXT
BufferDeviceAddressCreateInfoEXT
DeviceAddress
forall a. Zero a => a
zero
type PhysicalDeviceBufferAddressFeaturesEXT = PhysicalDeviceBufferDeviceAddressFeaturesEXT
type BufferDeviceAddressInfoEXT = BufferDeviceAddressInfo
type EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION = 2
pattern EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION :: a
$mEXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION = 2
type EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME = "VK_EXT_buffer_device_address"
pattern EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME :: a
$mEXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME = "VK_EXT_buffer_device_address"