{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_synchronization2 ( cmdWriteBufferMarker2AMD
, getQueueCheckpointData2NV
, pattern STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR
, pattern STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR
, pattern STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR
, pattern STRUCTURE_TYPE_DEPENDENCY_INFO_KHR
, pattern STRUCTURE_TYPE_SUBMIT_INFO_2_KHR
, pattern STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR
, pattern STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR
, pattern STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR
, pattern EVENT_CREATE_DEVICE_ONLY_BIT_KHR
, pattern IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR
, pattern IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR
, pattern PIPELINE_STAGE_NONE_KHR
, pattern ACCESS_NONE_KHR
, pattern PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV
, pattern ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV
, pattern PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV
, pattern PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV
, pattern ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV
, pattern ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV
, pattern PIPELINE_STAGE_2_TASK_SHADER_BIT_NV
, pattern PIPELINE_STAGE_2_MESH_SHADER_BIT_NV
, cmdSetEvent2KHR
, cmdResetEvent2KHR
, cmdWaitEvents2KHR
, cmdPipelineBarrier2KHR
, queueSubmit2KHR
, cmdWriteTimestamp2KHR
, QueueFamilyCheckpointProperties2NV(..)
, CheckpointData2NV(..)
, AccessFlags2KHR
, PipelineStageFlags2KHR
, SubmitFlagsKHR
, AccessFlagBits2KHR
, PipelineStageFlagBits2KHR
, SubmitFlagBitsKHR
, MemoryBarrier2KHR
, ImageMemoryBarrier2KHR
, BufferMemoryBarrier2KHR
, DependencyInfoKHR
, SemaphoreSubmitInfoKHR
, CommandBufferSubmitInfoKHR
, SubmitInfo2KHR
, PhysicalDeviceSynchronization2FeaturesKHR
, KHR_SYNCHRONIZATION_2_SPEC_VERSION
, pattern KHR_SYNCHRONIZATION_2_SPEC_VERSION
, KHR_SYNCHRONIZATION_2_EXTENSION_NAME
, pattern KHR_SYNCHRONIZATION_2_EXTENSION_NAME
) where
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
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 Data.Vector (generateM)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
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 GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import Data.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (cmdPipelineBarrier2)
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (cmdResetEvent2)
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (cmdSetEvent2)
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (cmdWaitEvents2)
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (cmdWriteTimestamp2)
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (queueSubmit2)
import Vulkan.NamedType ((:::))
import Vulkan.Core13.Enums.AccessFlags2 (AccessFlagBits2)
import Vulkan.Core13.Enums.AccessFlags2 (AccessFlags2)
import Vulkan.Core10.Handles (Buffer)
import Vulkan.Core10.Handles (Buffer(..))
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (BufferMemoryBarrier2)
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer))
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (CommandBufferSubmitInfo)
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (DependencyInfo)
import Vulkan.Dynamic (DeviceCmds(pVkCmdWriteBufferMarker2AMD))
import Vulkan.Dynamic (DeviceCmds(pVkGetQueueCheckpointData2NV))
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (ImageMemoryBarrier2)
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (MemoryBarrier2)
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (PhysicalDeviceSynchronization2Features)
import Vulkan.Core13.Enums.PipelineStageFlags2 (PipelineStageFlagBits2)
import Vulkan.Core13.Enums.PipelineStageFlags2 (PipelineStageFlagBits2(..))
import Vulkan.Core13.Enums.PipelineStageFlags2 (PipelineStageFlags2)
import Vulkan.Core10.Handles (Queue)
import Vulkan.Core10.Handles (Queue(..))
import Vulkan.Core10.Handles (Queue(Queue))
import Vulkan.Core10.Handles (Queue_T)
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (SemaphoreSubmitInfo)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core13.Enums.SubmitFlagBits (SubmitFlagBits)
import Vulkan.Core13.Enums.SubmitFlagBits (SubmitFlags)
import Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (SubmitInfo2)
import Vulkan.Core13.Enums.AccessFlags2 (AccessFlags2)
import Vulkan.Core13.Enums.AccessFlags2 (AccessFlagBits2(ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR))
import Vulkan.Core13.Enums.AccessFlags2 (AccessFlags2)
import Vulkan.Core13.Enums.AccessFlags2 (AccessFlagBits2(ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR))
import Vulkan.Core13.Enums.AccessFlags2 (AccessFlags2)
import Vulkan.Core13.Enums.AccessFlags2 (AccessFlagBits2(ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR))
import Vulkan.Core10.Enums.AccessFlagBits (AccessFlags)
import Vulkan.Core10.Enums.AccessFlagBits (AccessFlagBits(ACCESS_NONE))
import Vulkan.Core10.Enums.EventCreateFlagBits (EventCreateFlags)
import Vulkan.Core10.Enums.EventCreateFlagBits (EventCreateFlagBits(EVENT_CREATE_DEVICE_ONLY_BIT))
import Vulkan.Core10.Enums.ImageLayout (ImageLayout(IMAGE_LAYOUT_ATTACHMENT_OPTIMAL))
import Vulkan.Core10.Enums.ImageLayout (ImageLayout(IMAGE_LAYOUT_READ_ONLY_OPTIMAL))
import Vulkan.Core13.Enums.PipelineStageFlags2 (PipelineStageFlags2)
import Vulkan.Core13.Enums.PipelineStageFlags2 (PipelineStageFlagBits2(PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR))
import Vulkan.Core13.Enums.PipelineStageFlags2 (PipelineStageFlags2)
import Vulkan.Core13.Enums.PipelineStageFlags2 (PipelineStageFlagBits2(PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR))
import Vulkan.Core13.Enums.PipelineStageFlags2 (PipelineStageFlags2)
import Vulkan.Core13.Enums.PipelineStageFlags2 (PipelineStageFlagBits2(PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT))
import Vulkan.Core13.Enums.PipelineStageFlags2 (PipelineStageFlags2)
import Vulkan.Core13.Enums.PipelineStageFlags2 (PipelineStageFlagBits2(PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR))
import Vulkan.Core13.Enums.PipelineStageFlags2 (PipelineStageFlags2)
import Vulkan.Core13.Enums.PipelineStageFlags2 (PipelineStageFlagBits2(PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT))
import Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlags)
import Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlagBits(PIPELINE_STAGE_NONE))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEPENDENCY_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_MEMORY_BARRIER_2))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SUBMIT_INFO_2))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdWriteBufferMarker2AMD
:: FunPtr (Ptr CommandBuffer_T -> PipelineStageFlags2 -> Buffer -> DeviceSize -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> PipelineStageFlags2 -> Buffer -> DeviceSize -> Word32 -> IO ()
cmdWriteBufferMarker2AMD :: forall io
. (MonadIO io)
=>
CommandBuffer
->
PipelineStageFlags2
->
("dstBuffer" ::: Buffer)
->
("dstOffset" ::: DeviceSize)
->
("marker" ::: Word32)
-> io ()
cmdWriteBufferMarker2AMD :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> PipelineStageFlags2
-> ("dstBuffer" ::: Buffer)
-> ("dstOffset" ::: DeviceSize)
-> ("marker" ::: Word32)
-> io ()
cmdWriteBufferMarker2AMD CommandBuffer
commandBuffer
PipelineStageFlags2
stage
"dstBuffer" ::: Buffer
dstBuffer
"dstOffset" ::: DeviceSize
dstOffset
"marker" ::: Word32
marker = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let vkCmdWriteBufferMarker2AMDPtr :: FunPtr
(Ptr CommandBuffer_T
-> PipelineStageFlags2
-> ("dstBuffer" ::: Buffer)
-> ("dstOffset" ::: DeviceSize)
-> ("marker" ::: Word32)
-> IO ())
vkCmdWriteBufferMarker2AMDPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> PipelineStageFlags2
-> ("dstBuffer" ::: Buffer)
-> ("dstOffset" ::: DeviceSize)
-> ("marker" ::: Word32)
-> IO ())
pVkCmdWriteBufferMarker2AMD (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> PipelineStageFlags2
-> ("dstBuffer" ::: Buffer)
-> ("dstOffset" ::: DeviceSize)
-> ("marker" ::: Word32)
-> IO ())
vkCmdWriteBufferMarker2AMDPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdWriteBufferMarker2AMD is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCmdWriteBufferMarker2AMD' :: Ptr CommandBuffer_T
-> PipelineStageFlags2
-> ("dstBuffer" ::: Buffer)
-> ("dstOffset" ::: DeviceSize)
-> ("marker" ::: Word32)
-> IO ()
vkCmdWriteBufferMarker2AMD' = FunPtr
(Ptr CommandBuffer_T
-> PipelineStageFlags2
-> ("dstBuffer" ::: Buffer)
-> ("dstOffset" ::: DeviceSize)
-> ("marker" ::: Word32)
-> IO ())
-> Ptr CommandBuffer_T
-> PipelineStageFlags2
-> ("dstBuffer" ::: Buffer)
-> ("dstOffset" ::: DeviceSize)
-> ("marker" ::: Word32)
-> IO ()
mkVkCmdWriteBufferMarker2AMD FunPtr
(Ptr CommandBuffer_T
-> PipelineStageFlags2
-> ("dstBuffer" ::: Buffer)
-> ("dstOffset" ::: DeviceSize)
-> ("marker" ::: Word32)
-> IO ())
vkCmdWriteBufferMarker2AMDPtr
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdWriteBufferMarker2AMD" (Ptr CommandBuffer_T
-> PipelineStageFlags2
-> ("dstBuffer" ::: Buffer)
-> ("dstOffset" ::: DeviceSize)
-> ("marker" ::: Word32)
-> IO ()
vkCmdWriteBufferMarker2AMD'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
(PipelineStageFlags2
stage)
("dstBuffer" ::: Buffer
dstBuffer)
("dstOffset" ::: DeviceSize
dstOffset)
("marker" ::: Word32
marker))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetQueueCheckpointData2NV
:: FunPtr (Ptr Queue_T -> Ptr Word32 -> Ptr CheckpointData2NV -> IO ()) -> Ptr Queue_T -> Ptr Word32 -> Ptr CheckpointData2NV -> IO ()
getQueueCheckpointData2NV :: forall io
. (MonadIO io)
=>
Queue
-> io (("checkpointData" ::: Vector CheckpointData2NV))
getQueueCheckpointData2NV :: forall (io :: * -> *).
MonadIO io =>
Queue -> io ("checkpointData" ::: Vector CheckpointData2NV)
getQueueCheckpointData2NV Queue
queue = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkGetQueueCheckpointData2NVPtr :: FunPtr
(Ptr Queue_T
-> ("pCheckpointDataCount" ::: Ptr ("marker" ::: Word32))
-> ("pCheckpointData" ::: Ptr CheckpointData2NV)
-> IO ())
vkGetQueueCheckpointData2NVPtr = DeviceCmds
-> FunPtr
(Ptr Queue_T
-> ("pCheckpointDataCount" ::: Ptr ("marker" ::: Word32))
-> ("pCheckpointData" ::: Ptr CheckpointData2NV)
-> IO ())
pVkGetQueueCheckpointData2NV (case Queue
queue of Queue{DeviceCmds
$sel:deviceCmds:Queue :: Queue -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Queue_T
-> ("pCheckpointDataCount" ::: Ptr ("marker" ::: Word32))
-> ("pCheckpointData" ::: Ptr CheckpointData2NV)
-> IO ())
vkGetQueueCheckpointData2NVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetQueueCheckpointData2NV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetQueueCheckpointData2NV' :: Ptr Queue_T
-> ("pCheckpointDataCount" ::: Ptr ("marker" ::: Word32))
-> ("pCheckpointData" ::: Ptr CheckpointData2NV)
-> IO ()
vkGetQueueCheckpointData2NV' = FunPtr
(Ptr Queue_T
-> ("pCheckpointDataCount" ::: Ptr ("marker" ::: Word32))
-> ("pCheckpointData" ::: Ptr CheckpointData2NV)
-> IO ())
-> Ptr Queue_T
-> ("pCheckpointDataCount" ::: Ptr ("marker" ::: Word32))
-> ("pCheckpointData" ::: Ptr CheckpointData2NV)
-> IO ()
mkVkGetQueueCheckpointData2NV FunPtr
(Ptr Queue_T
-> ("pCheckpointDataCount" ::: Ptr ("marker" ::: Word32))
-> ("pCheckpointData" ::: Ptr CheckpointData2NV)
-> IO ())
vkGetQueueCheckpointData2NVPtr
let queue' :: Ptr Queue_T
queue' = Queue -> Ptr Queue_T
queueHandle (Queue
queue)
"pCheckpointDataCount" ::: Ptr ("marker" ::: Word32)
pPCheckpointDataCount <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) forall a. Ptr a -> IO ()
free
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetQueueCheckpointData2NV" (Ptr Queue_T
-> ("pCheckpointDataCount" ::: Ptr ("marker" ::: Word32))
-> ("pCheckpointData" ::: Ptr CheckpointData2NV)
-> IO ()
vkGetQueueCheckpointData2NV'
Ptr Queue_T
queue'
("pCheckpointDataCount" ::: Ptr ("marker" ::: Word32)
pPCheckpointDataCount)
(forall a. Ptr a
nullPtr))
"marker" ::: Word32
pCheckpointDataCount <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pCheckpointDataCount" ::: Ptr ("marker" ::: Word32)
pPCheckpointDataCount
"pCheckpointData" ::: Ptr CheckpointData2NV
pPCheckpointData <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @CheckpointData2NV ((forall a b. (Integral a, Num b) => a -> b
fromIntegral ("marker" ::: Word32
pCheckpointDataCount)) forall a. Num a => a -> a -> a
* Int
32)) forall a. Ptr a -> IO ()
free
[()]
_ <- forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\Int
i -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pCheckpointData" ::: Ptr CheckpointData2NV
pPCheckpointData forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i forall a. Num a => a -> a -> a
* Int
32) :: Ptr CheckpointData2NV) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) [Int
0..(forall a b. (Integral a, Num b) => a -> b
fromIntegral ("marker" ::: Word32
pCheckpointDataCount)) forall a. Num a => a -> a -> a
- Int
1]
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetQueueCheckpointData2NV" (Ptr Queue_T
-> ("pCheckpointDataCount" ::: Ptr ("marker" ::: Word32))
-> ("pCheckpointData" ::: Ptr CheckpointData2NV)
-> IO ()
vkGetQueueCheckpointData2NV'
Ptr Queue_T
queue'
("pCheckpointDataCount" ::: Ptr ("marker" ::: Word32)
pPCheckpointDataCount)
(("pCheckpointData" ::: Ptr CheckpointData2NV
pPCheckpointData)))
"marker" ::: Word32
pCheckpointDataCount' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pCheckpointDataCount" ::: Ptr ("marker" ::: Word32)
pPCheckpointDataCount
"checkpointData" ::: Vector CheckpointData2NV
pCheckpointData' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral ("marker" ::: Word32
pCheckpointDataCount')) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @CheckpointData2NV ((("pCheckpointData" ::: Ptr CheckpointData2NV
pPCheckpointData) forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
32 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr CheckpointData2NV)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("checkpointData" ::: Vector CheckpointData2NV
pCheckpointData')
pattern $bSTRUCTURE_TYPE_MEMORY_BARRIER_2_KHR :: StructureType
$mSTRUCTURE_TYPE_MEMORY_BARRIER_2_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR = STRUCTURE_TYPE_MEMORY_BARRIER_2
pattern $bSTRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR :: StructureType
$mSTRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR = STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2
pattern $bSTRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR :: StructureType
$mSTRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR = STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2
pattern $bSTRUCTURE_TYPE_DEPENDENCY_INFO_KHR :: StructureType
$mSTRUCTURE_TYPE_DEPENDENCY_INFO_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
STRUCTURE_TYPE_DEPENDENCY_INFO_KHR = STRUCTURE_TYPE_DEPENDENCY_INFO
pattern $bSTRUCTURE_TYPE_SUBMIT_INFO_2_KHR :: StructureType
$mSTRUCTURE_TYPE_SUBMIT_INFO_2_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
STRUCTURE_TYPE_SUBMIT_INFO_2_KHR = STRUCTURE_TYPE_SUBMIT_INFO_2
pattern $bSTRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR :: StructureType
$mSTRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR = STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO
pattern $bSTRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR :: StructureType
$mSTRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR = STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO
pattern $bSTRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR :: StructureType
$mSTRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR :: forall {r}. StructureType -> ((# #) -> r) -> ((# #) -> r) -> r
STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR = STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES
pattern $bEVENT_CREATE_DEVICE_ONLY_BIT_KHR :: EventCreateFlagBits
$mEVENT_CREATE_DEVICE_ONLY_BIT_KHR :: forall {r}.
EventCreateFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
EVENT_CREATE_DEVICE_ONLY_BIT_KHR = EVENT_CREATE_DEVICE_ONLY_BIT
pattern $bIMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR :: ImageLayout
$mIMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR :: forall {r}. ImageLayout -> ((# #) -> r) -> ((# #) -> r) -> r
IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR = IMAGE_LAYOUT_READ_ONLY_OPTIMAL
pattern $bIMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR :: ImageLayout
$mIMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR :: forall {r}. ImageLayout -> ((# #) -> r) -> ((# #) -> r) -> r
IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR = IMAGE_LAYOUT_ATTACHMENT_OPTIMAL
pattern $bPIPELINE_STAGE_NONE_KHR :: PipelineStageFlagBits
$mPIPELINE_STAGE_NONE_KHR :: forall {r}.
PipelineStageFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
PIPELINE_STAGE_NONE_KHR = PIPELINE_STAGE_NONE
pattern $bACCESS_NONE_KHR :: AccessFlagBits
$mACCESS_NONE_KHR :: forall {r}. AccessFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
ACCESS_NONE_KHR = ACCESS_NONE
pattern $bPIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV :: PipelineStageFlags2
$mPIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV :: forall {r}.
PipelineStageFlags2 -> ((# #) -> r) -> ((# #) -> r) -> r
PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV = PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
pattern $bACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV :: AccessFlagBits2
$mACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV :: forall {r}. AccessFlagBits2 -> ((# #) -> r) -> ((# #) -> r) -> r
ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV = ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR
pattern $bPIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV :: PipelineStageFlags2
$mPIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV :: forall {r}.
PipelineStageFlags2 -> ((# #) -> r) -> ((# #) -> r) -> r
PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV = PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR
pattern $bPIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV :: PipelineStageFlags2
$mPIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV :: forall {r}.
PipelineStageFlags2 -> ((# #) -> r) -> ((# #) -> r) -> r
PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV = PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pattern $bACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV :: AccessFlagBits2
$mACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV :: forall {r}. AccessFlagBits2 -> ((# #) -> r) -> ((# #) -> r) -> r
ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV = ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR
pattern $bACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV :: AccessFlagBits2
$mACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV :: forall {r}. AccessFlagBits2 -> ((# #) -> r) -> ((# #) -> r) -> r
ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV = ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR
pattern $bPIPELINE_STAGE_2_TASK_SHADER_BIT_NV :: PipelineStageFlags2
$mPIPELINE_STAGE_2_TASK_SHADER_BIT_NV :: forall {r}.
PipelineStageFlags2 -> ((# #) -> r) -> ((# #) -> r) -> r
PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT
pattern $bPIPELINE_STAGE_2_MESH_SHADER_BIT_NV :: PipelineStageFlags2
$mPIPELINE_STAGE_2_MESH_SHADER_BIT_NV :: forall {r}.
PipelineStageFlags2 -> ((# #) -> r) -> ((# #) -> r) -> r
PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT
cmdSetEvent2KHR :: CommandBuffer -> Event -> DependencyInfo -> io ()
cmdSetEvent2KHR = forall (io :: * -> *).
MonadIO io =>
CommandBuffer -> Event -> DependencyInfo -> io ()
cmdSetEvent2
cmdResetEvent2KHR :: CommandBuffer -> Event -> PipelineStageFlags2 -> io ()
cmdResetEvent2KHR = forall (io :: * -> *).
MonadIO io =>
CommandBuffer -> Event -> PipelineStageFlags2 -> io ()
cmdResetEvent2
cmdWaitEvents2KHR :: CommandBuffer
-> ("events" ::: Vector Event)
-> ("dependencyInfos" ::: Vector DependencyInfo)
-> io ()
cmdWaitEvents2KHR = forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("events" ::: Vector Event)
-> ("dependencyInfos" ::: Vector DependencyInfo)
-> io ()
cmdWaitEvents2
cmdPipelineBarrier2KHR :: CommandBuffer -> DependencyInfo -> io ()
cmdPipelineBarrier2KHR = forall (io :: * -> *).
MonadIO io =>
CommandBuffer -> DependencyInfo -> io ()
cmdPipelineBarrier2
queueSubmit2KHR :: Queue
-> ("submits" ::: Vector (SomeStruct SubmitInfo2))
-> Fence
-> io ()
queueSubmit2KHR = forall (io :: * -> *).
MonadIO io =>
Queue
-> ("submits" ::: Vector (SomeStruct SubmitInfo2))
-> Fence
-> io ()
queueSubmit2
cmdWriteTimestamp2KHR :: CommandBuffer
-> PipelineStageFlags2
-> QueryPool
-> ("marker" ::: Word32)
-> io ()
cmdWriteTimestamp2KHR = forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> PipelineStageFlags2
-> QueryPool
-> ("marker" ::: Word32)
-> io ()
cmdWriteTimestamp2
data QueueFamilyCheckpointProperties2NV = QueueFamilyCheckpointProperties2NV
{
QueueFamilyCheckpointProperties2NV -> PipelineStageFlags2
checkpointExecutionStageMask :: PipelineStageFlags2 }
deriving (Typeable, QueueFamilyCheckpointProperties2NV
-> QueueFamilyCheckpointProperties2NV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QueueFamilyCheckpointProperties2NV
-> QueueFamilyCheckpointProperties2NV -> Bool
$c/= :: QueueFamilyCheckpointProperties2NV
-> QueueFamilyCheckpointProperties2NV -> Bool
== :: QueueFamilyCheckpointProperties2NV
-> QueueFamilyCheckpointProperties2NV -> Bool
$c== :: QueueFamilyCheckpointProperties2NV
-> QueueFamilyCheckpointProperties2NV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (QueueFamilyCheckpointProperties2NV)
#endif
deriving instance Show QueueFamilyCheckpointProperties2NV
instance ToCStruct QueueFamilyCheckpointProperties2NV where
withCStruct :: forall b.
QueueFamilyCheckpointProperties2NV
-> (Ptr QueueFamilyCheckpointProperties2NV -> IO b) -> IO b
withCStruct QueueFamilyCheckpointProperties2NV
x Ptr QueueFamilyCheckpointProperties2NV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr QueueFamilyCheckpointProperties2NV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr QueueFamilyCheckpointProperties2NV
p QueueFamilyCheckpointProperties2NV
x (Ptr QueueFamilyCheckpointProperties2NV -> IO b
f Ptr QueueFamilyCheckpointProperties2NV
p)
pokeCStruct :: forall b.
Ptr QueueFamilyCheckpointProperties2NV
-> QueueFamilyCheckpointProperties2NV -> IO b -> IO b
pokeCStruct Ptr QueueFamilyCheckpointProperties2NV
p QueueFamilyCheckpointProperties2NV{PipelineStageFlags2
checkpointExecutionStageMask :: PipelineStageFlags2
$sel:checkpointExecutionStageMask:QueueFamilyCheckpointProperties2NV :: QueueFamilyCheckpointProperties2NV -> PipelineStageFlags2
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr QueueFamilyCheckpointProperties2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr QueueFamilyCheckpointProperties2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr QueueFamilyCheckpointProperties2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineStageFlags2)) (PipelineStageFlags2
checkpointExecutionStageMask)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr QueueFamilyCheckpointProperties2NV -> IO b -> IO b
pokeZeroCStruct Ptr QueueFamilyCheckpointProperties2NV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr QueueFamilyCheckpointProperties2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr QueueFamilyCheckpointProperties2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr QueueFamilyCheckpointProperties2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineStageFlags2)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct QueueFamilyCheckpointProperties2NV where
peekCStruct :: Ptr QueueFamilyCheckpointProperties2NV
-> IO QueueFamilyCheckpointProperties2NV
peekCStruct Ptr QueueFamilyCheckpointProperties2NV
p = do
PipelineStageFlags2
checkpointExecutionStageMask <- forall a. Storable a => Ptr a -> IO a
peek @PipelineStageFlags2 ((Ptr QueueFamilyCheckpointProperties2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineStageFlags2))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ PipelineStageFlags2 -> QueueFamilyCheckpointProperties2NV
QueueFamilyCheckpointProperties2NV
PipelineStageFlags2
checkpointExecutionStageMask
instance Storable QueueFamilyCheckpointProperties2NV where
sizeOf :: QueueFamilyCheckpointProperties2NV -> Int
sizeOf ~QueueFamilyCheckpointProperties2NV
_ = Int
24
alignment :: QueueFamilyCheckpointProperties2NV -> Int
alignment ~QueueFamilyCheckpointProperties2NV
_ = Int
8
peek :: Ptr QueueFamilyCheckpointProperties2NV
-> IO QueueFamilyCheckpointProperties2NV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr QueueFamilyCheckpointProperties2NV
-> QueueFamilyCheckpointProperties2NV -> IO ()
poke Ptr QueueFamilyCheckpointProperties2NV
ptr QueueFamilyCheckpointProperties2NV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr QueueFamilyCheckpointProperties2NV
ptr QueueFamilyCheckpointProperties2NV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero QueueFamilyCheckpointProperties2NV where
zero :: QueueFamilyCheckpointProperties2NV
zero = PipelineStageFlags2 -> QueueFamilyCheckpointProperties2NV
QueueFamilyCheckpointProperties2NV
forall a. Zero a => a
zero
data CheckpointData2NV = CheckpointData2NV
{
CheckpointData2NV -> PipelineStageFlags2
stage :: PipelineStageFlags2
,
CheckpointData2NV -> Ptr ()
checkpointMarker :: Ptr ()
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (CheckpointData2NV)
#endif
deriving instance Show CheckpointData2NV
instance ToCStruct CheckpointData2NV where
withCStruct :: forall b.
CheckpointData2NV
-> (("pCheckpointData" ::: Ptr CheckpointData2NV) -> IO b) -> IO b
withCStruct CheckpointData2NV
x ("pCheckpointData" ::: Ptr CheckpointData2NV) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \"pCheckpointData" ::: Ptr CheckpointData2NV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCheckpointData" ::: Ptr CheckpointData2NV
p CheckpointData2NV
x (("pCheckpointData" ::: Ptr CheckpointData2NV) -> IO b
f "pCheckpointData" ::: Ptr CheckpointData2NV
p)
pokeCStruct :: forall b.
("pCheckpointData" ::: Ptr CheckpointData2NV)
-> CheckpointData2NV -> IO b -> IO b
pokeCStruct "pCheckpointData" ::: Ptr CheckpointData2NV
p CheckpointData2NV{Ptr ()
PipelineStageFlags2
checkpointMarker :: Ptr ()
stage :: PipelineStageFlags2
$sel:checkpointMarker:CheckpointData2NV :: CheckpointData2NV -> Ptr ()
$sel:stage:CheckpointData2NV :: CheckpointData2NV -> PipelineStageFlags2
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCheckpointData" ::: Ptr CheckpointData2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCheckpointData" ::: Ptr CheckpointData2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCheckpointData" ::: Ptr CheckpointData2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineStageFlags2)) (PipelineStageFlags2
stage)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCheckpointData" ::: Ptr CheckpointData2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ()))) (Ptr ()
checkpointMarker)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pCheckpointData" ::: Ptr CheckpointData2NV) -> IO b -> IO b
pokeZeroCStruct "pCheckpointData" ::: Ptr CheckpointData2NV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCheckpointData" ::: Ptr CheckpointData2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCheckpointData" ::: Ptr CheckpointData2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCheckpointData" ::: Ptr CheckpointData2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineStageFlags2)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCheckpointData" ::: Ptr CheckpointData2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ()))) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct CheckpointData2NV where
peekCStruct :: ("pCheckpointData" ::: Ptr CheckpointData2NV)
-> IO CheckpointData2NV
peekCStruct "pCheckpointData" ::: Ptr CheckpointData2NV
p = do
PipelineStageFlags2
stage <- forall a. Storable a => Ptr a -> IO a
peek @PipelineStageFlags2 (("pCheckpointData" ::: Ptr CheckpointData2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineStageFlags2))
Ptr ()
pCheckpointMarker <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) (("pCheckpointData" ::: Ptr CheckpointData2NV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ())))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ PipelineStageFlags2 -> Ptr () -> CheckpointData2NV
CheckpointData2NV
PipelineStageFlags2
stage Ptr ()
pCheckpointMarker
instance Storable CheckpointData2NV where
sizeOf :: CheckpointData2NV -> Int
sizeOf ~CheckpointData2NV
_ = Int
32
alignment :: CheckpointData2NV -> Int
alignment ~CheckpointData2NV
_ = Int
8
peek :: ("pCheckpointData" ::: Ptr CheckpointData2NV)
-> IO CheckpointData2NV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pCheckpointData" ::: Ptr CheckpointData2NV)
-> CheckpointData2NV -> IO ()
poke "pCheckpointData" ::: Ptr CheckpointData2NV
ptr CheckpointData2NV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCheckpointData" ::: Ptr CheckpointData2NV
ptr CheckpointData2NV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero CheckpointData2NV where
zero :: CheckpointData2NV
zero = PipelineStageFlags2 -> Ptr () -> CheckpointData2NV
CheckpointData2NV
forall a. Zero a => a
zero
forall a. Zero a => a
zero
type AccessFlags2KHR = AccessFlags2
type PipelineStageFlags2KHR = PipelineStageFlags2
type SubmitFlagsKHR = SubmitFlags
type AccessFlagBits2KHR = AccessFlagBits2
type PipelineStageFlagBits2KHR = PipelineStageFlagBits2
type SubmitFlagBitsKHR = SubmitFlagBits
type MemoryBarrier2KHR = MemoryBarrier2
type ImageMemoryBarrier2KHR = ImageMemoryBarrier2
type BufferMemoryBarrier2KHR = BufferMemoryBarrier2
type DependencyInfoKHR = DependencyInfo
type SemaphoreSubmitInfoKHR = SemaphoreSubmitInfo
type CommandBufferSubmitInfoKHR = CommandBufferSubmitInfo
type SubmitInfo2KHR = SubmitInfo2
type PhysicalDeviceSynchronization2FeaturesKHR = PhysicalDeviceSynchronization2Features
type KHR_SYNCHRONIZATION_2_SPEC_VERSION = 1
pattern KHR_SYNCHRONIZATION_2_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_SYNCHRONIZATION_2_SPEC_VERSION :: forall a. Integral a => a
$mKHR_SYNCHRONIZATION_2_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
KHR_SYNCHRONIZATION_2_SPEC_VERSION = 1
type KHR_SYNCHRONIZATION_2_EXTENSION_NAME = "VK_KHR_synchronization2"
pattern KHR_SYNCHRONIZATION_2_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_SYNCHRONIZATION_2_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mKHR_SYNCHRONIZATION_2_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
KHR_SYNCHRONIZATION_2_EXTENSION_NAME = "VK_KHR_synchronization2"