{-# language CPP #-}
module Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address ( getBufferOpaqueCaptureAddress
, getBufferDeviceAddress
, getDeviceMemoryOpaqueCaptureAddress
, PhysicalDeviceBufferDeviceAddressFeatures(..)
, BufferDeviceAddressInfo(..)
, BufferOpaqueCaptureAddressCreateInfo(..)
, MemoryOpaqueCaptureAddressAllocateInfo(..)
, DeviceMemoryOpaqueCaptureAddressInfo(..)
, StructureType(..)
, Result(..)
, BufferUsageFlagBits(..)
, BufferUsageFlags
, BufferCreateFlagBits(..)
, BufferCreateFlags
, MemoryAllocateFlagBits(..)
, MemoryAllocateFlags
) where
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytesAligned)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Control.Monad.IO.Class (MonadIO)
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 GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import Data.Word (Word64)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Handles (Buffer)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.FundamentalTypes (DeviceAddress)
import Vulkan.Dynamic (DeviceCmds(pVkGetBufferDeviceAddress))
import Vulkan.Dynamic (DeviceCmds(pVkGetBufferOpaqueCaptureAddress))
import Vulkan.Dynamic (DeviceCmds(pVkGetDeviceMemoryOpaqueCaptureAddress))
import Vulkan.Core10.Handles (DeviceMemory)
import Vulkan.Core10.Handles (Device_T)
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.StructureType (StructureType(STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES))
import Vulkan.Core10.Enums.BufferCreateFlagBits (BufferCreateFlagBits(..))
import Vulkan.Core10.Enums.BufferCreateFlagBits (BufferCreateFlags)
import Vulkan.Core10.Enums.BufferUsageFlagBits (BufferUsageFlagBits(..))
import Vulkan.Core10.Enums.BufferUsageFlagBits (BufferUsageFlags)
import Vulkan.Core11.Enums.MemoryAllocateFlagBits (MemoryAllocateFlagBits(..))
import Vulkan.Core11.Enums.MemoryAllocateFlagBits (MemoryAllocateFlags)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.StructureType (StructureType(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetBufferOpaqueCaptureAddress
:: FunPtr (Ptr Device_T -> Ptr BufferDeviceAddressInfo -> IO Word64) -> Ptr Device_T -> Ptr BufferDeviceAddressInfo -> IO Word64
getBufferOpaqueCaptureAddress :: forall io
. (MonadIO io)
=>
Device
->
BufferDeviceAddressInfo
-> io (Word64)
getBufferOpaqueCaptureAddress :: Device -> BufferDeviceAddressInfo -> io Word64
getBufferOpaqueCaptureAddress device :: Device
device info :: BufferDeviceAddressInfo
info = IO Word64 -> io Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> io Word64)
-> (ContT Word64 IO Word64 -> IO Word64)
-> ContT Word64 IO Word64
-> io Word64
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Word64 IO Word64 -> IO Word64
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Word64 IO Word64 -> io Word64)
-> ContT Word64 IO Word64 -> io Word64
forall a b. (a -> b) -> a -> b
$ do
let vkGetBufferOpaqueCaptureAddressPtr :: FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
vkGetBufferOpaqueCaptureAddressPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
pVkGetBufferOpaqueCaptureAddress (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
IO () -> ContT Word64 IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Word64 IO ()) -> IO () -> ContT Word64 IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
vkGetBufferOpaqueCaptureAddressPtr FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetBufferOpaqueCaptureAddress is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetBufferOpaqueCaptureAddress' :: Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64
vkGetBufferOpaqueCaptureAddress' = FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo)
-> IO Word64
mkVkGetBufferOpaqueCaptureAddress FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
vkGetBufferOpaqueCaptureAddressPtr
"pInfo" ::: Ptr BufferDeviceAddressInfo
pInfo <- ((("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> IO Word64)
-> ContT Word64 IO ("pInfo" ::: Ptr BufferDeviceAddressInfo)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> IO Word64)
-> ContT Word64 IO ("pInfo" ::: Ptr BufferDeviceAddressInfo))
-> ((("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> IO Word64)
-> ContT Word64 IO ("pInfo" ::: Ptr BufferDeviceAddressInfo)
forall a b. (a -> b) -> a -> b
$ BufferDeviceAddressInfo
-> (("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> IO Word64
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (BufferDeviceAddressInfo
info)
Word64
r <- IO Word64 -> ContT Word64 IO Word64
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Word64 -> ContT Word64 IO Word64)
-> IO Word64 -> ContT Word64 IO Word64
forall a b. (a -> b) -> a -> b
$ Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64
vkGetBufferOpaqueCaptureAddress' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pInfo" ::: Ptr BufferDeviceAddressInfo
pInfo
Word64 -> ContT Word64 IO Word64
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Word64 -> ContT Word64 IO Word64)
-> Word64 -> ContT Word64 IO Word64
forall a b. (a -> b) -> a -> b
$ (Word64
r)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetBufferDeviceAddress
:: FunPtr (Ptr Device_T -> Ptr BufferDeviceAddressInfo -> IO DeviceAddress) -> Ptr Device_T -> Ptr BufferDeviceAddressInfo -> IO DeviceAddress
getBufferDeviceAddress :: forall io
. (MonadIO io)
=>
Device
->
BufferDeviceAddressInfo
-> io (DeviceAddress)
getBufferDeviceAddress :: Device -> BufferDeviceAddressInfo -> io Word64
getBufferDeviceAddress device :: Device
device info :: BufferDeviceAddressInfo
info = IO Word64 -> io Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> io Word64)
-> (ContT Word64 IO Word64 -> IO Word64)
-> ContT Word64 IO Word64
-> io Word64
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Word64 IO Word64 -> IO Word64
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Word64 IO Word64 -> io Word64)
-> ContT Word64 IO Word64 -> io Word64
forall a b. (a -> b) -> a -> b
$ do
let vkGetBufferDeviceAddressPtr :: FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
vkGetBufferDeviceAddressPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
pVkGetBufferDeviceAddress (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
IO () -> ContT Word64 IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Word64 IO ()) -> IO () -> ContT Word64 IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
vkGetBufferDeviceAddressPtr FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetBufferDeviceAddress is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetBufferDeviceAddress' :: Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64
vkGetBufferDeviceAddress' = FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo)
-> IO Word64
mkVkGetBufferDeviceAddress FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
vkGetBufferDeviceAddressPtr
"pInfo" ::: Ptr BufferDeviceAddressInfo
pInfo <- ((("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> IO Word64)
-> ContT Word64 IO ("pInfo" ::: Ptr BufferDeviceAddressInfo)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> IO Word64)
-> ContT Word64 IO ("pInfo" ::: Ptr BufferDeviceAddressInfo))
-> ((("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> IO Word64)
-> ContT Word64 IO ("pInfo" ::: Ptr BufferDeviceAddressInfo)
forall a b. (a -> b) -> a -> b
$ BufferDeviceAddressInfo
-> (("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64)
-> IO Word64
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (BufferDeviceAddressInfo
info)
Word64
r <- IO Word64 -> ContT Word64 IO Word64
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Word64 -> ContT Word64 IO Word64)
-> IO Word64 -> ContT Word64 IO Word64
forall a b. (a -> b) -> a -> b
$ Ptr Device_T
-> ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO Word64
vkGetBufferDeviceAddress' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pInfo" ::: Ptr BufferDeviceAddressInfo
pInfo
Word64 -> ContT Word64 IO Word64
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Word64 -> ContT Word64 IO Word64)
-> Word64 -> ContT Word64 IO Word64
forall a b. (a -> b) -> a -> b
$ (Word64
r)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetDeviceMemoryOpaqueCaptureAddress
:: FunPtr (Ptr Device_T -> Ptr DeviceMemoryOpaqueCaptureAddressInfo -> IO Word64) -> Ptr Device_T -> Ptr DeviceMemoryOpaqueCaptureAddressInfo -> IO Word64
getDeviceMemoryOpaqueCaptureAddress :: forall io
. (MonadIO io)
=>
Device
->
DeviceMemoryOpaqueCaptureAddressInfo
-> io (Word64)
getDeviceMemoryOpaqueCaptureAddress :: Device -> DeviceMemoryOpaqueCaptureAddressInfo -> io Word64
getDeviceMemoryOpaqueCaptureAddress device :: Device
device info :: DeviceMemoryOpaqueCaptureAddressInfo
info = IO Word64 -> io Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> io Word64)
-> (ContT Word64 IO Word64 -> IO Word64)
-> ContT Word64 IO Word64
-> io Word64
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Word64 IO Word64 -> IO Word64
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Word64 IO Word64 -> io Word64)
-> ContT Word64 IO Word64 -> io Word64
forall a b. (a -> b) -> a -> b
$ do
let vkGetDeviceMemoryOpaqueCaptureAddressPtr :: FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64)
vkGetDeviceMemoryOpaqueCaptureAddressPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64)
pVkGetDeviceMemoryOpaqueCaptureAddress (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
IO () -> ContT Word64 IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Word64 IO ()) -> IO () -> ContT Word64 IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64)
vkGetDeviceMemoryOpaqueCaptureAddressPtr FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64)
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetDeviceMemoryOpaqueCaptureAddress is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetDeviceMemoryOpaqueCaptureAddress' :: Ptr Device_T
-> ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64
vkGetDeviceMemoryOpaqueCaptureAddress' = FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64)
-> Ptr Device_T
-> ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64
mkVkGetDeviceMemoryOpaqueCaptureAddress FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64)
vkGetDeviceMemoryOpaqueCaptureAddressPtr
"pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
pInfo <- ((("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64)
-> IO Word64)
-> ContT
Word64 IO ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64)
-> IO Word64)
-> ContT
Word64 IO ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo))
-> ((("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64)
-> IO Word64)
-> ContT
Word64 IO ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
forall a b. (a -> b) -> a -> b
$ DeviceMemoryOpaqueCaptureAddressInfo
-> (("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64)
-> IO Word64
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DeviceMemoryOpaqueCaptureAddressInfo
info)
Word64
r <- IO Word64 -> ContT Word64 IO Word64
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Word64 -> ContT Word64 IO Word64)
-> IO Word64 -> ContT Word64 IO Word64
forall a b. (a -> b) -> a -> b
$ Ptr Device_T
-> ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO Word64
vkGetDeviceMemoryOpaqueCaptureAddress' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
pInfo
Word64 -> ContT Word64 IO Word64
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Word64 -> ContT Word64 IO Word64)
-> Word64 -> ContT Word64 IO Word64
forall a b. (a -> b) -> a -> b
$ (Word64
r)
data PhysicalDeviceBufferDeviceAddressFeatures = PhysicalDeviceBufferDeviceAddressFeatures
{
PhysicalDeviceBufferDeviceAddressFeatures -> Bool
bufferDeviceAddress :: Bool
,
PhysicalDeviceBufferDeviceAddressFeatures -> Bool
bufferDeviceAddressCaptureReplay :: Bool
,
PhysicalDeviceBufferDeviceAddressFeatures -> Bool
bufferDeviceAddressMultiDevice :: Bool
}
deriving (Typeable, PhysicalDeviceBufferDeviceAddressFeatures
-> PhysicalDeviceBufferDeviceAddressFeatures -> Bool
(PhysicalDeviceBufferDeviceAddressFeatures
-> PhysicalDeviceBufferDeviceAddressFeatures -> Bool)
-> (PhysicalDeviceBufferDeviceAddressFeatures
-> PhysicalDeviceBufferDeviceAddressFeatures -> Bool)
-> Eq PhysicalDeviceBufferDeviceAddressFeatures
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceBufferDeviceAddressFeatures
-> PhysicalDeviceBufferDeviceAddressFeatures -> Bool
$c/= :: PhysicalDeviceBufferDeviceAddressFeatures
-> PhysicalDeviceBufferDeviceAddressFeatures -> Bool
== :: PhysicalDeviceBufferDeviceAddressFeatures
-> PhysicalDeviceBufferDeviceAddressFeatures -> Bool
$c== :: PhysicalDeviceBufferDeviceAddressFeatures
-> PhysicalDeviceBufferDeviceAddressFeatures -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceBufferDeviceAddressFeatures)
#endif
deriving instance Show PhysicalDeviceBufferDeviceAddressFeatures
instance ToCStruct PhysicalDeviceBufferDeviceAddressFeatures where
withCStruct :: PhysicalDeviceBufferDeviceAddressFeatures
-> (Ptr PhysicalDeviceBufferDeviceAddressFeatures -> IO b) -> IO b
withCStruct x :: PhysicalDeviceBufferDeviceAddressFeatures
x f :: Ptr PhysicalDeviceBufferDeviceAddressFeatures -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceBufferDeviceAddressFeatures -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr PhysicalDeviceBufferDeviceAddressFeatures -> IO b) -> IO b)
-> (Ptr PhysicalDeviceBufferDeviceAddressFeatures -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceBufferDeviceAddressFeatures
p -> Ptr PhysicalDeviceBufferDeviceAddressFeatures
-> PhysicalDeviceBufferDeviceAddressFeatures -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceBufferDeviceAddressFeatures
p PhysicalDeviceBufferDeviceAddressFeatures
x (Ptr PhysicalDeviceBufferDeviceAddressFeatures -> IO b
f Ptr PhysicalDeviceBufferDeviceAddressFeatures
p)
pokeCStruct :: Ptr PhysicalDeviceBufferDeviceAddressFeatures
-> PhysicalDeviceBufferDeviceAddressFeatures -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceBufferDeviceAddressFeatures
p PhysicalDeviceBufferDeviceAddressFeatures{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBufferDeviceAddressFeatures
p Ptr PhysicalDeviceBufferDeviceAddressFeatures
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBufferDeviceAddressFeatures
p Ptr PhysicalDeviceBufferDeviceAddressFeatures
-> 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 PhysicalDeviceBufferDeviceAddressFeatures
p Ptr PhysicalDeviceBufferDeviceAddressFeatures -> 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 PhysicalDeviceBufferDeviceAddressFeatures
p Ptr PhysicalDeviceBufferDeviceAddressFeatures -> 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 PhysicalDeviceBufferDeviceAddressFeatures
p Ptr PhysicalDeviceBufferDeviceAddressFeatures -> 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 PhysicalDeviceBufferDeviceAddressFeatures -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceBufferDeviceAddressFeatures
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBufferDeviceAddressFeatures
p Ptr PhysicalDeviceBufferDeviceAddressFeatures
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceBufferDeviceAddressFeatures
p Ptr PhysicalDeviceBufferDeviceAddressFeatures
-> 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 PhysicalDeviceBufferDeviceAddressFeatures
p Ptr PhysicalDeviceBufferDeviceAddressFeatures -> 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 PhysicalDeviceBufferDeviceAddressFeatures
p Ptr PhysicalDeviceBufferDeviceAddressFeatures -> 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 PhysicalDeviceBufferDeviceAddressFeatures
p Ptr PhysicalDeviceBufferDeviceAddressFeatures -> 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 PhysicalDeviceBufferDeviceAddressFeatures where
peekCStruct :: Ptr PhysicalDeviceBufferDeviceAddressFeatures
-> IO PhysicalDeviceBufferDeviceAddressFeatures
peekCStruct p :: Ptr PhysicalDeviceBufferDeviceAddressFeatures
p = do
Bool32
bufferDeviceAddress <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceBufferDeviceAddressFeatures
p Ptr PhysicalDeviceBufferDeviceAddressFeatures -> 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 PhysicalDeviceBufferDeviceAddressFeatures
p Ptr PhysicalDeviceBufferDeviceAddressFeatures -> 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 PhysicalDeviceBufferDeviceAddressFeatures
p Ptr PhysicalDeviceBufferDeviceAddressFeatures -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32))
PhysicalDeviceBufferDeviceAddressFeatures
-> IO PhysicalDeviceBufferDeviceAddressFeatures
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceBufferDeviceAddressFeatures
-> IO PhysicalDeviceBufferDeviceAddressFeatures)
-> PhysicalDeviceBufferDeviceAddressFeatures
-> IO PhysicalDeviceBufferDeviceAddressFeatures
forall a b. (a -> b) -> a -> b
$ Bool -> Bool -> Bool -> PhysicalDeviceBufferDeviceAddressFeatures
PhysicalDeviceBufferDeviceAddressFeatures
(Bool32 -> Bool
bool32ToBool Bool32
bufferDeviceAddress) (Bool32 -> Bool
bool32ToBool Bool32
bufferDeviceAddressCaptureReplay) (Bool32 -> Bool
bool32ToBool Bool32
bufferDeviceAddressMultiDevice)
instance Storable PhysicalDeviceBufferDeviceAddressFeatures where
sizeOf :: PhysicalDeviceBufferDeviceAddressFeatures -> Int
sizeOf ~PhysicalDeviceBufferDeviceAddressFeatures
_ = 32
alignment :: PhysicalDeviceBufferDeviceAddressFeatures -> Int
alignment ~PhysicalDeviceBufferDeviceAddressFeatures
_ = 8
peek :: Ptr PhysicalDeviceBufferDeviceAddressFeatures
-> IO PhysicalDeviceBufferDeviceAddressFeatures
peek = Ptr PhysicalDeviceBufferDeviceAddressFeatures
-> IO PhysicalDeviceBufferDeviceAddressFeatures
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceBufferDeviceAddressFeatures
-> PhysicalDeviceBufferDeviceAddressFeatures -> IO ()
poke ptr :: Ptr PhysicalDeviceBufferDeviceAddressFeatures
ptr poked :: PhysicalDeviceBufferDeviceAddressFeatures
poked = Ptr PhysicalDeviceBufferDeviceAddressFeatures
-> PhysicalDeviceBufferDeviceAddressFeatures -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceBufferDeviceAddressFeatures
ptr PhysicalDeviceBufferDeviceAddressFeatures
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceBufferDeviceAddressFeatures where
zero :: PhysicalDeviceBufferDeviceAddressFeatures
zero = Bool -> Bool -> Bool -> PhysicalDeviceBufferDeviceAddressFeatures
PhysicalDeviceBufferDeviceAddressFeatures
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
data BufferDeviceAddressInfo = BufferDeviceAddressInfo
{
BufferDeviceAddressInfo -> Buffer
buffer :: Buffer }
deriving (Typeable, BufferDeviceAddressInfo -> BufferDeviceAddressInfo -> Bool
(BufferDeviceAddressInfo -> BufferDeviceAddressInfo -> Bool)
-> (BufferDeviceAddressInfo -> BufferDeviceAddressInfo -> Bool)
-> Eq BufferDeviceAddressInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BufferDeviceAddressInfo -> BufferDeviceAddressInfo -> Bool
$c/= :: BufferDeviceAddressInfo -> BufferDeviceAddressInfo -> Bool
== :: BufferDeviceAddressInfo -> BufferDeviceAddressInfo -> Bool
$c== :: BufferDeviceAddressInfo -> BufferDeviceAddressInfo -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (BufferDeviceAddressInfo)
#endif
deriving instance Show BufferDeviceAddressInfo
instance ToCStruct BufferDeviceAddressInfo where
withCStruct :: BufferDeviceAddressInfo
-> (("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO b) -> IO b
withCStruct x :: BufferDeviceAddressInfo
x f :: ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO b
f = Int
-> Int
-> (("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO b) -> IO b)
-> (("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pInfo" ::: Ptr BufferDeviceAddressInfo
p -> ("pInfo" ::: Ptr BufferDeviceAddressInfo)
-> BufferDeviceAddressInfo -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr BufferDeviceAddressInfo
p BufferDeviceAddressInfo
x (("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO b
f "pInfo" ::: Ptr BufferDeviceAddressInfo
p)
pokeCStruct :: ("pInfo" ::: Ptr BufferDeviceAddressInfo)
-> BufferDeviceAddressInfo -> IO b -> IO b
pokeCStruct p :: "pInfo" ::: Ptr BufferDeviceAddressInfo
p BufferDeviceAddressInfo{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr BufferDeviceAddressInfo
p ("pInfo" ::: Ptr BufferDeviceAddressInfo)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr BufferDeviceAddressInfo
p ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr BufferDeviceAddressInfo
p ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Buffer)) (Buffer
buffer)
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> IO b -> IO b
pokeZeroCStruct p :: "pInfo" ::: Ptr BufferDeviceAddressInfo
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr BufferDeviceAddressInfo
p ("pInfo" ::: Ptr BufferDeviceAddressInfo)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr BufferDeviceAddressInfo
p ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr BufferDeviceAddressInfo
p ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Buffer)) (Buffer
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct BufferDeviceAddressInfo where
peekCStruct :: ("pInfo" ::: Ptr BufferDeviceAddressInfo)
-> IO BufferDeviceAddressInfo
peekCStruct p :: "pInfo" ::: Ptr BufferDeviceAddressInfo
p = do
Buffer
buffer <- Ptr Buffer -> IO Buffer
forall a. Storable a => Ptr a -> IO a
peek @Buffer (("pInfo" ::: Ptr BufferDeviceAddressInfo
p ("pInfo" ::: Ptr BufferDeviceAddressInfo) -> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Buffer))
BufferDeviceAddressInfo -> IO BufferDeviceAddressInfo
forall (f :: * -> *) a. Applicative f => a -> f a
pure (BufferDeviceAddressInfo -> IO BufferDeviceAddressInfo)
-> BufferDeviceAddressInfo -> IO BufferDeviceAddressInfo
forall a b. (a -> b) -> a -> b
$ Buffer -> BufferDeviceAddressInfo
BufferDeviceAddressInfo
Buffer
buffer
instance Storable BufferDeviceAddressInfo where
sizeOf :: BufferDeviceAddressInfo -> Int
sizeOf ~BufferDeviceAddressInfo
_ = 24
alignment :: BufferDeviceAddressInfo -> Int
alignment ~BufferDeviceAddressInfo
_ = 8
peek :: ("pInfo" ::: Ptr BufferDeviceAddressInfo)
-> IO BufferDeviceAddressInfo
peek = ("pInfo" ::: Ptr BufferDeviceAddressInfo)
-> IO BufferDeviceAddressInfo
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pInfo" ::: Ptr BufferDeviceAddressInfo)
-> BufferDeviceAddressInfo -> IO ()
poke ptr :: "pInfo" ::: Ptr BufferDeviceAddressInfo
ptr poked :: BufferDeviceAddressInfo
poked = ("pInfo" ::: Ptr BufferDeviceAddressInfo)
-> BufferDeviceAddressInfo -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr BufferDeviceAddressInfo
ptr BufferDeviceAddressInfo
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero BufferDeviceAddressInfo where
zero :: BufferDeviceAddressInfo
zero = Buffer -> BufferDeviceAddressInfo
BufferDeviceAddressInfo
Buffer
forall a. Zero a => a
zero
data BufferOpaqueCaptureAddressCreateInfo = BufferOpaqueCaptureAddressCreateInfo
{
BufferOpaqueCaptureAddressCreateInfo -> Word64
opaqueCaptureAddress :: Word64 }
deriving (Typeable, BufferOpaqueCaptureAddressCreateInfo
-> BufferOpaqueCaptureAddressCreateInfo -> Bool
(BufferOpaqueCaptureAddressCreateInfo
-> BufferOpaqueCaptureAddressCreateInfo -> Bool)
-> (BufferOpaqueCaptureAddressCreateInfo
-> BufferOpaqueCaptureAddressCreateInfo -> Bool)
-> Eq BufferOpaqueCaptureAddressCreateInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BufferOpaqueCaptureAddressCreateInfo
-> BufferOpaqueCaptureAddressCreateInfo -> Bool
$c/= :: BufferOpaqueCaptureAddressCreateInfo
-> BufferOpaqueCaptureAddressCreateInfo -> Bool
== :: BufferOpaqueCaptureAddressCreateInfo
-> BufferOpaqueCaptureAddressCreateInfo -> Bool
$c== :: BufferOpaqueCaptureAddressCreateInfo
-> BufferOpaqueCaptureAddressCreateInfo -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (BufferOpaqueCaptureAddressCreateInfo)
#endif
deriving instance Show BufferOpaqueCaptureAddressCreateInfo
instance ToCStruct BufferOpaqueCaptureAddressCreateInfo where
withCStruct :: BufferOpaqueCaptureAddressCreateInfo
-> (Ptr BufferOpaqueCaptureAddressCreateInfo -> IO b) -> IO b
withCStruct x :: BufferOpaqueCaptureAddressCreateInfo
x f :: Ptr BufferOpaqueCaptureAddressCreateInfo -> IO b
f = Int
-> Int
-> (Ptr BufferOpaqueCaptureAddressCreateInfo -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr BufferOpaqueCaptureAddressCreateInfo -> IO b) -> IO b)
-> (Ptr BufferOpaqueCaptureAddressCreateInfo -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr BufferOpaqueCaptureAddressCreateInfo
p -> Ptr BufferOpaqueCaptureAddressCreateInfo
-> BufferOpaqueCaptureAddressCreateInfo -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BufferOpaqueCaptureAddressCreateInfo
p BufferOpaqueCaptureAddressCreateInfo
x (Ptr BufferOpaqueCaptureAddressCreateInfo -> IO b
f Ptr BufferOpaqueCaptureAddressCreateInfo
p)
pokeCStruct :: Ptr BufferOpaqueCaptureAddressCreateInfo
-> BufferOpaqueCaptureAddressCreateInfo -> IO b -> IO b
pokeCStruct p :: Ptr BufferOpaqueCaptureAddressCreateInfo
p BufferOpaqueCaptureAddressCreateInfo{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferOpaqueCaptureAddressCreateInfo
p Ptr BufferOpaqueCaptureAddressCreateInfo
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferOpaqueCaptureAddressCreateInfo
p Ptr BufferOpaqueCaptureAddressCreateInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word64 -> Word64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferOpaqueCaptureAddressCreateInfo
p Ptr BufferOpaqueCaptureAddressCreateInfo -> Int -> Ptr Word64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word64)) (Word64
opaqueCaptureAddress)
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr BufferOpaqueCaptureAddressCreateInfo -> IO b -> IO b
pokeZeroCStruct p :: Ptr BufferOpaqueCaptureAddressCreateInfo
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferOpaqueCaptureAddressCreateInfo
p Ptr BufferOpaqueCaptureAddressCreateInfo
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferOpaqueCaptureAddressCreateInfo
p Ptr BufferOpaqueCaptureAddressCreateInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word64 -> Word64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferOpaqueCaptureAddressCreateInfo
p Ptr BufferOpaqueCaptureAddressCreateInfo -> Int -> Ptr Word64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word64)) (Word64
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct BufferOpaqueCaptureAddressCreateInfo where
peekCStruct :: Ptr BufferOpaqueCaptureAddressCreateInfo
-> IO BufferOpaqueCaptureAddressCreateInfo
peekCStruct p :: Ptr BufferOpaqueCaptureAddressCreateInfo
p = do
Word64
opaqueCaptureAddress <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr BufferOpaqueCaptureAddressCreateInfo
p Ptr BufferOpaqueCaptureAddressCreateInfo -> Int -> Ptr Word64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word64))
BufferOpaqueCaptureAddressCreateInfo
-> IO BufferOpaqueCaptureAddressCreateInfo
forall (f :: * -> *) a. Applicative f => a -> f a
pure (BufferOpaqueCaptureAddressCreateInfo
-> IO BufferOpaqueCaptureAddressCreateInfo)
-> BufferOpaqueCaptureAddressCreateInfo
-> IO BufferOpaqueCaptureAddressCreateInfo
forall a b. (a -> b) -> a -> b
$ Word64 -> BufferOpaqueCaptureAddressCreateInfo
BufferOpaqueCaptureAddressCreateInfo
Word64
opaqueCaptureAddress
instance Storable BufferOpaqueCaptureAddressCreateInfo where
sizeOf :: BufferOpaqueCaptureAddressCreateInfo -> Int
sizeOf ~BufferOpaqueCaptureAddressCreateInfo
_ = 24
alignment :: BufferOpaqueCaptureAddressCreateInfo -> Int
alignment ~BufferOpaqueCaptureAddressCreateInfo
_ = 8
peek :: Ptr BufferOpaqueCaptureAddressCreateInfo
-> IO BufferOpaqueCaptureAddressCreateInfo
peek = Ptr BufferOpaqueCaptureAddressCreateInfo
-> IO BufferOpaqueCaptureAddressCreateInfo
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr BufferOpaqueCaptureAddressCreateInfo
-> BufferOpaqueCaptureAddressCreateInfo -> IO ()
poke ptr :: Ptr BufferOpaqueCaptureAddressCreateInfo
ptr poked :: BufferOpaqueCaptureAddressCreateInfo
poked = Ptr BufferOpaqueCaptureAddressCreateInfo
-> BufferOpaqueCaptureAddressCreateInfo -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BufferOpaqueCaptureAddressCreateInfo
ptr BufferOpaqueCaptureAddressCreateInfo
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero BufferOpaqueCaptureAddressCreateInfo where
zero :: BufferOpaqueCaptureAddressCreateInfo
zero = Word64 -> BufferOpaqueCaptureAddressCreateInfo
BufferOpaqueCaptureAddressCreateInfo
Word64
forall a. Zero a => a
zero
data MemoryOpaqueCaptureAddressAllocateInfo = MemoryOpaqueCaptureAddressAllocateInfo
{
MemoryOpaqueCaptureAddressAllocateInfo -> Word64
opaqueCaptureAddress :: Word64 }
deriving (Typeable, MemoryOpaqueCaptureAddressAllocateInfo
-> MemoryOpaqueCaptureAddressAllocateInfo -> Bool
(MemoryOpaqueCaptureAddressAllocateInfo
-> MemoryOpaqueCaptureAddressAllocateInfo -> Bool)
-> (MemoryOpaqueCaptureAddressAllocateInfo
-> MemoryOpaqueCaptureAddressAllocateInfo -> Bool)
-> Eq MemoryOpaqueCaptureAddressAllocateInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemoryOpaqueCaptureAddressAllocateInfo
-> MemoryOpaqueCaptureAddressAllocateInfo -> Bool
$c/= :: MemoryOpaqueCaptureAddressAllocateInfo
-> MemoryOpaqueCaptureAddressAllocateInfo -> Bool
== :: MemoryOpaqueCaptureAddressAllocateInfo
-> MemoryOpaqueCaptureAddressAllocateInfo -> Bool
$c== :: MemoryOpaqueCaptureAddressAllocateInfo
-> MemoryOpaqueCaptureAddressAllocateInfo -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (MemoryOpaqueCaptureAddressAllocateInfo)
#endif
deriving instance Show MemoryOpaqueCaptureAddressAllocateInfo
instance ToCStruct MemoryOpaqueCaptureAddressAllocateInfo where
withCStruct :: MemoryOpaqueCaptureAddressAllocateInfo
-> (Ptr MemoryOpaqueCaptureAddressAllocateInfo -> IO b) -> IO b
withCStruct x :: MemoryOpaqueCaptureAddressAllocateInfo
x f :: Ptr MemoryOpaqueCaptureAddressAllocateInfo -> IO b
f = Int
-> Int
-> (Ptr MemoryOpaqueCaptureAddressAllocateInfo -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr MemoryOpaqueCaptureAddressAllocateInfo -> IO b) -> IO b)
-> (Ptr MemoryOpaqueCaptureAddressAllocateInfo -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr MemoryOpaqueCaptureAddressAllocateInfo
p -> Ptr MemoryOpaqueCaptureAddressAllocateInfo
-> MemoryOpaqueCaptureAddressAllocateInfo -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr MemoryOpaqueCaptureAddressAllocateInfo
p MemoryOpaqueCaptureAddressAllocateInfo
x (Ptr MemoryOpaqueCaptureAddressAllocateInfo -> IO b
f Ptr MemoryOpaqueCaptureAddressAllocateInfo
p)
pokeCStruct :: Ptr MemoryOpaqueCaptureAddressAllocateInfo
-> MemoryOpaqueCaptureAddressAllocateInfo -> IO b -> IO b
pokeCStruct p :: Ptr MemoryOpaqueCaptureAddressAllocateInfo
p MemoryOpaqueCaptureAddressAllocateInfo{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MemoryOpaqueCaptureAddressAllocateInfo
p Ptr MemoryOpaqueCaptureAddressAllocateInfo
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MemoryOpaqueCaptureAddressAllocateInfo
p Ptr MemoryOpaqueCaptureAddressAllocateInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word64 -> Word64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MemoryOpaqueCaptureAddressAllocateInfo
p Ptr MemoryOpaqueCaptureAddressAllocateInfo -> Int -> Ptr Word64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word64)) (Word64
opaqueCaptureAddress)
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr MemoryOpaqueCaptureAddressAllocateInfo -> IO b -> IO b
pokeZeroCStruct p :: Ptr MemoryOpaqueCaptureAddressAllocateInfo
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MemoryOpaqueCaptureAddressAllocateInfo
p Ptr MemoryOpaqueCaptureAddressAllocateInfo
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MemoryOpaqueCaptureAddressAllocateInfo
p Ptr MemoryOpaqueCaptureAddressAllocateInfo -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Word64 -> Word64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr MemoryOpaqueCaptureAddressAllocateInfo
p Ptr MemoryOpaqueCaptureAddressAllocateInfo -> Int -> Ptr Word64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word64)) (Word64
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct MemoryOpaqueCaptureAddressAllocateInfo where
peekCStruct :: Ptr MemoryOpaqueCaptureAddressAllocateInfo
-> IO MemoryOpaqueCaptureAddressAllocateInfo
peekCStruct p :: Ptr MemoryOpaqueCaptureAddressAllocateInfo
p = do
Word64
opaqueCaptureAddress <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr MemoryOpaqueCaptureAddressAllocateInfo
p Ptr MemoryOpaqueCaptureAddressAllocateInfo -> Int -> Ptr Word64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word64))
MemoryOpaqueCaptureAddressAllocateInfo
-> IO MemoryOpaqueCaptureAddressAllocateInfo
forall (f :: * -> *) a. Applicative f => a -> f a
pure (MemoryOpaqueCaptureAddressAllocateInfo
-> IO MemoryOpaqueCaptureAddressAllocateInfo)
-> MemoryOpaqueCaptureAddressAllocateInfo
-> IO MemoryOpaqueCaptureAddressAllocateInfo
forall a b. (a -> b) -> a -> b
$ Word64 -> MemoryOpaqueCaptureAddressAllocateInfo
MemoryOpaqueCaptureAddressAllocateInfo
Word64
opaqueCaptureAddress
instance Storable MemoryOpaqueCaptureAddressAllocateInfo where
sizeOf :: MemoryOpaqueCaptureAddressAllocateInfo -> Int
sizeOf ~MemoryOpaqueCaptureAddressAllocateInfo
_ = 24
alignment :: MemoryOpaqueCaptureAddressAllocateInfo -> Int
alignment ~MemoryOpaqueCaptureAddressAllocateInfo
_ = 8
peek :: Ptr MemoryOpaqueCaptureAddressAllocateInfo
-> IO MemoryOpaqueCaptureAddressAllocateInfo
peek = Ptr MemoryOpaqueCaptureAddressAllocateInfo
-> IO MemoryOpaqueCaptureAddressAllocateInfo
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr MemoryOpaqueCaptureAddressAllocateInfo
-> MemoryOpaqueCaptureAddressAllocateInfo -> IO ()
poke ptr :: Ptr MemoryOpaqueCaptureAddressAllocateInfo
ptr poked :: MemoryOpaqueCaptureAddressAllocateInfo
poked = Ptr MemoryOpaqueCaptureAddressAllocateInfo
-> MemoryOpaqueCaptureAddressAllocateInfo -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr MemoryOpaqueCaptureAddressAllocateInfo
ptr MemoryOpaqueCaptureAddressAllocateInfo
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero MemoryOpaqueCaptureAddressAllocateInfo where
zero :: MemoryOpaqueCaptureAddressAllocateInfo
zero = Word64 -> MemoryOpaqueCaptureAddressAllocateInfo
MemoryOpaqueCaptureAddressAllocateInfo
Word64
forall a. Zero a => a
zero
data DeviceMemoryOpaqueCaptureAddressInfo = DeviceMemoryOpaqueCaptureAddressInfo
{
DeviceMemoryOpaqueCaptureAddressInfo -> DeviceMemory
memory :: DeviceMemory }
deriving (Typeable, DeviceMemoryOpaqueCaptureAddressInfo
-> DeviceMemoryOpaqueCaptureAddressInfo -> Bool
(DeviceMemoryOpaqueCaptureAddressInfo
-> DeviceMemoryOpaqueCaptureAddressInfo -> Bool)
-> (DeviceMemoryOpaqueCaptureAddressInfo
-> DeviceMemoryOpaqueCaptureAddressInfo -> Bool)
-> Eq DeviceMemoryOpaqueCaptureAddressInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceMemoryOpaqueCaptureAddressInfo
-> DeviceMemoryOpaqueCaptureAddressInfo -> Bool
$c/= :: DeviceMemoryOpaqueCaptureAddressInfo
-> DeviceMemoryOpaqueCaptureAddressInfo -> Bool
== :: DeviceMemoryOpaqueCaptureAddressInfo
-> DeviceMemoryOpaqueCaptureAddressInfo -> Bool
$c== :: DeviceMemoryOpaqueCaptureAddressInfo
-> DeviceMemoryOpaqueCaptureAddressInfo -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceMemoryOpaqueCaptureAddressInfo)
#endif
deriving instance Show DeviceMemoryOpaqueCaptureAddressInfo
instance ToCStruct DeviceMemoryOpaqueCaptureAddressInfo where
withCStruct :: DeviceMemoryOpaqueCaptureAddressInfo
-> (("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo) -> IO b)
-> IO b
withCStruct x :: DeviceMemoryOpaqueCaptureAddressInfo
x f :: ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo) -> IO b
f = Int
-> Int
-> (("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo) -> IO b)
-> IO b)
-> (("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo) -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
p -> ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> DeviceMemoryOpaqueCaptureAddressInfo -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
p DeviceMemoryOpaqueCaptureAddressInfo
x (("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo) -> IO b
f "pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
p)
pokeCStruct :: ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> DeviceMemoryOpaqueCaptureAddressInfo -> IO b -> IO b
pokeCStruct p :: "pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
p DeviceMemoryOpaqueCaptureAddressInfo{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
p ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
p ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr DeviceMemory -> DeviceMemory -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
p ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> Int -> Ptr DeviceMemory
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceMemory)) (DeviceMemory
memory)
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO b -> IO b
pokeZeroCStruct p :: "pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
p ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
p ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr DeviceMemory -> DeviceMemory -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
p ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> Int -> Ptr DeviceMemory
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceMemory)) (DeviceMemory
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct DeviceMemoryOpaqueCaptureAddressInfo where
peekCStruct :: ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO DeviceMemoryOpaqueCaptureAddressInfo
peekCStruct p :: "pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
p = do
DeviceMemory
memory <- Ptr DeviceMemory -> IO DeviceMemory
forall a. Storable a => Ptr a -> IO a
peek @DeviceMemory (("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
p ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> Int -> Ptr DeviceMemory
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceMemory))
DeviceMemoryOpaqueCaptureAddressInfo
-> IO DeviceMemoryOpaqueCaptureAddressInfo
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DeviceMemoryOpaqueCaptureAddressInfo
-> IO DeviceMemoryOpaqueCaptureAddressInfo)
-> DeviceMemoryOpaqueCaptureAddressInfo
-> IO DeviceMemoryOpaqueCaptureAddressInfo
forall a b. (a -> b) -> a -> b
$ DeviceMemory -> DeviceMemoryOpaqueCaptureAddressInfo
DeviceMemoryOpaqueCaptureAddressInfo
DeviceMemory
memory
instance Storable DeviceMemoryOpaqueCaptureAddressInfo where
sizeOf :: DeviceMemoryOpaqueCaptureAddressInfo -> Int
sizeOf ~DeviceMemoryOpaqueCaptureAddressInfo
_ = 24
alignment :: DeviceMemoryOpaqueCaptureAddressInfo -> Int
alignment ~DeviceMemoryOpaqueCaptureAddressInfo
_ = 8
peek :: ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO DeviceMemoryOpaqueCaptureAddressInfo
peek = ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> IO DeviceMemoryOpaqueCaptureAddressInfo
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> DeviceMemoryOpaqueCaptureAddressInfo -> IO ()
poke ptr :: "pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
ptr poked :: DeviceMemoryOpaqueCaptureAddressInfo
poked = ("pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo)
-> DeviceMemoryOpaqueCaptureAddressInfo -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr DeviceMemoryOpaqueCaptureAddressInfo
ptr DeviceMemoryOpaqueCaptureAddressInfo
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero DeviceMemoryOpaqueCaptureAddressInfo where
zero :: DeviceMemoryOpaqueCaptureAddressInfo
zero = DeviceMemory -> DeviceMemoryOpaqueCaptureAddressInfo
DeviceMemoryOpaqueCaptureAddressInfo
DeviceMemory
forall a. Zero a => a
zero