{-# language CPP #-}
module Vulkan.Extensions.VK_NV_device_generated_commands ( cmdExecuteGeneratedCommandsNV
, cmdPreprocessGeneratedCommandsNV
, cmdBindPipelineShaderGroupNV
, getGeneratedCommandsMemoryRequirementsNV
, createIndirectCommandsLayoutNV
, withIndirectCommandsLayoutNV
, destroyIndirectCommandsLayoutNV
, PhysicalDeviceDeviceGeneratedCommandsFeaturesNV(..)
, PhysicalDeviceDeviceGeneratedCommandsPropertiesNV(..)
, GraphicsShaderGroupCreateInfoNV(..)
, GraphicsPipelineShaderGroupsCreateInfoNV(..)
, BindShaderGroupIndirectCommandNV(..)
, BindIndexBufferIndirectCommandNV(..)
, BindVertexBufferIndirectCommandNV(..)
, SetStateFlagsIndirectCommandNV(..)
, IndirectCommandsStreamNV(..)
, IndirectCommandsLayoutTokenNV(..)
, IndirectCommandsLayoutCreateInfoNV(..)
, GeneratedCommandsInfoNV(..)
, GeneratedCommandsMemoryRequirementsInfoNV(..)
, IndirectCommandsLayoutUsageFlagsNV
, IndirectCommandsLayoutUsageFlagBitsNV( INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV
, INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV
, INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV
, ..
)
, IndirectStateFlagsNV
, IndirectStateFlagBitsNV( INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV
, ..
)
, IndirectCommandsTokenTypeNV( INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV
, ..
)
, NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION
, pattern NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION
, NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME
, pattern NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME
, IndirectCommandsLayoutNV(..)
) where
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
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 Foreign.Marshal.Utils (maybePeek)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
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 Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
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.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.CStruct.Extends (peekSomeCStruct)
import Vulkan.CStruct.Extends (pokeSomeCStruct)
import Vulkan.CStruct.Extends (withSomeCStruct)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.FundamentalTypes (Bool32(..))
import Vulkan.Core10.Handles (Buffer)
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer))
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Core10.FundamentalTypes (DeviceAddress)
import Vulkan.Dynamic (DeviceCmds(pVkCmdBindPipelineShaderGroupNV))
import Vulkan.Dynamic (DeviceCmds(pVkCmdExecuteGeneratedCommandsNV))
import Vulkan.Dynamic (DeviceCmds(pVkCmdPreprocessGeneratedCommandsNV))
import Vulkan.Dynamic (DeviceCmds(pVkCreateIndirectCommandsLayoutNV))
import Vulkan.Dynamic (DeviceCmds(pVkDestroyIndirectCommandsLayoutNV))
import Vulkan.Dynamic (DeviceCmds(pVkGetGeneratedCommandsMemoryRequirementsNV))
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.Core10.Handles (Device_T)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Enums.IndexType (IndexType)
import Vulkan.Extensions.Handles (IndirectCommandsLayoutNV)
import Vulkan.Extensions.Handles (IndirectCommandsLayoutNV(..))
import Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2 (MemoryRequirements2)
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.Core10.Handles (Pipeline)
import Vulkan.Core10.Handles (Pipeline(..))
import Vulkan.Core10.Enums.PipelineBindPoint (PipelineBindPoint)
import Vulkan.Core10.Enums.PipelineBindPoint (PipelineBindPoint(..))
import Vulkan.Core10.Handles (PipelineLayout)
import Vulkan.Core10.Pipeline (PipelineShaderStageCreateInfo)
import Vulkan.Core10.Pipeline (PipelineTessellationStateCreateInfo)
import Vulkan.Core10.Pipeline (PipelineVertexInputStateCreateInfo)
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.Handles (IndirectCommandsLayoutNV(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdExecuteGeneratedCommandsNV
:: FunPtr (Ptr CommandBuffer_T -> Bool32 -> Ptr GeneratedCommandsInfoNV -> IO ()) -> Ptr CommandBuffer_T -> Bool32 -> Ptr GeneratedCommandsInfoNV -> IO ()
cmdExecuteGeneratedCommandsNV :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("isPreprocessed" ::: Bool)
->
GeneratedCommandsInfoNV
-> io ()
cmdExecuteGeneratedCommandsNV :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("isPreprocessed" ::: Bool) -> GeneratedCommandsInfoNV -> io ()
cmdExecuteGeneratedCommandsNV CommandBuffer
commandBuffer
"isPreprocessed" ::: Bool
isPreprocessed
GeneratedCommandsInfoNV
generatedCommandsInfo = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdExecuteGeneratedCommandsNVPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("isPreprocessed" ::: Bool32)
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
vkCmdExecuteGeneratedCommandsNVPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("isPreprocessed" ::: Bool32)
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
pVkCmdExecuteGeneratedCommandsNV (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ("isPreprocessed" ::: Bool) -> IO () -> IO ()
forall (f :: * -> *).
Applicative f =>
("isPreprocessed" ::: Bool) -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("isPreprocessed" ::: Bool32)
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
vkCmdExecuteGeneratedCommandsNVPtr FunPtr
(Ptr CommandBuffer_T
-> ("isPreprocessed" ::: Bool32)
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("isPreprocessed" ::: Bool32)
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> "isPreprocessed" ::: Bool
forall a. Eq a => a -> a -> "isPreprocessed" ::: Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("isPreprocessed" ::: Bool32)
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
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 String
"" String
"The function pointer for vkCmdExecuteGeneratedCommandsNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdExecuteGeneratedCommandsNV' :: Ptr CommandBuffer_T
-> ("isPreprocessed" ::: Bool32)
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ()
vkCmdExecuteGeneratedCommandsNV' = FunPtr
(Ptr CommandBuffer_T
-> ("isPreprocessed" ::: Bool32)
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> Ptr CommandBuffer_T
-> ("isPreprocessed" ::: Bool32)
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ()
mkVkCmdExecuteGeneratedCommandsNV FunPtr
(Ptr CommandBuffer_T
-> ("isPreprocessed" ::: Bool32)
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
vkCmdExecuteGeneratedCommandsNVPtr
"pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
pGeneratedCommandsInfo <- ((("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> IO ())
-> ContT
() IO ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> IO ())
-> ContT
() IO ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV))
-> ((("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> IO ())
-> ContT
() IO ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
forall a b. (a -> b) -> a -> b
$ GeneratedCommandsInfoNV
-> (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (GeneratedCommandsInfoNV
generatedCommandsInfo)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdExecuteGeneratedCommandsNV" (Ptr CommandBuffer_T
-> ("isPreprocessed" ::: Bool32)
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ()
vkCmdExecuteGeneratedCommandsNV'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
(("isPreprocessed" ::: Bool) -> "isPreprocessed" ::: Bool32
boolToBool32 ("isPreprocessed" ::: Bool
isPreprocessed))
"pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
pGeneratedCommandsInfo)
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdPreprocessGeneratedCommandsNV
:: FunPtr (Ptr CommandBuffer_T -> Ptr GeneratedCommandsInfoNV -> IO ()) -> Ptr CommandBuffer_T -> Ptr GeneratedCommandsInfoNV -> IO ()
cmdPreprocessGeneratedCommandsNV :: forall io
. (MonadIO io)
=>
CommandBuffer
->
GeneratedCommandsInfoNV
-> io ()
cmdPreprocessGeneratedCommandsNV :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer -> GeneratedCommandsInfoNV -> io ()
cmdPreprocessGeneratedCommandsNV CommandBuffer
commandBuffer
GeneratedCommandsInfoNV
generatedCommandsInfo = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdPreprocessGeneratedCommandsNVPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
vkCmdPreprocessGeneratedCommandsNVPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
pVkCmdPreprocessGeneratedCommandsNV (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ("isPreprocessed" ::: Bool) -> IO () -> IO ()
forall (f :: * -> *).
Applicative f =>
("isPreprocessed" ::: Bool) -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
vkCmdPreprocessGeneratedCommandsNVPtr FunPtr
(Ptr CommandBuffer_T
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> "isPreprocessed" ::: Bool
forall a. Eq a => a -> a -> "isPreprocessed" ::: Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
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 String
"" String
"The function pointer for vkCmdPreprocessGeneratedCommandsNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdPreprocessGeneratedCommandsNV' :: Ptr CommandBuffer_T
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ()
vkCmdPreprocessGeneratedCommandsNV' = FunPtr
(Ptr CommandBuffer_T
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> Ptr CommandBuffer_T
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ()
mkVkCmdPreprocessGeneratedCommandsNV FunPtr
(Ptr CommandBuffer_T
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
vkCmdPreprocessGeneratedCommandsNVPtr
"pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
pGeneratedCommandsInfo <- ((("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> IO ())
-> ContT
() IO ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> IO ())
-> ContT
() IO ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV))
-> ((("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> IO ())
-> ContT
() IO ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
forall a b. (a -> b) -> a -> b
$ GeneratedCommandsInfoNV
-> (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (GeneratedCommandsInfoNV
generatedCommandsInfo)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdPreprocessGeneratedCommandsNV" (Ptr CommandBuffer_T
-> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO ()
vkCmdPreprocessGeneratedCommandsNV'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
"pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
pGeneratedCommandsInfo)
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdBindPipelineShaderGroupNV
:: FunPtr (Ptr CommandBuffer_T -> PipelineBindPoint -> Pipeline -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> PipelineBindPoint -> Pipeline -> Word32 -> IO ()
cmdBindPipelineShaderGroupNV :: forall io
. (MonadIO io)
=>
CommandBuffer
->
PipelineBindPoint
->
Pipeline
->
("groupIndex" ::: Word32)
-> io ()
cmdBindPipelineShaderGroupNV :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer -> PipelineBindPoint -> Pipeline -> Flags -> io ()
cmdBindPipelineShaderGroupNV CommandBuffer
commandBuffer
PipelineBindPoint
pipelineBindPoint
Pipeline
pipeline
Flags
groupIndex = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdBindPipelineShaderGroupNVPtr :: FunPtr
(Ptr CommandBuffer_T
-> PipelineBindPoint -> Pipeline -> Flags -> IO ())
vkCmdBindPipelineShaderGroupNVPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> PipelineBindPoint -> Pipeline -> Flags -> IO ())
pVkCmdBindPipelineShaderGroupNV (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
("isPreprocessed" ::: Bool) -> IO () -> IO ()
forall (f :: * -> *).
Applicative f =>
("isPreprocessed" ::: Bool) -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> PipelineBindPoint -> Pipeline -> Flags -> IO ())
vkCmdBindPipelineShaderGroupNVPtr FunPtr
(Ptr CommandBuffer_T
-> PipelineBindPoint -> Pipeline -> Flags -> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> PipelineBindPoint -> Pipeline -> Flags -> IO ())
-> "isPreprocessed" ::: Bool
forall a. Eq a => a -> a -> "isPreprocessed" ::: Bool
/= FunPtr
(Ptr CommandBuffer_T
-> PipelineBindPoint -> Pipeline -> Flags -> IO ())
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 String
"" String
"The function pointer for vkCmdBindPipelineShaderGroupNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdBindPipelineShaderGroupNV' :: Ptr CommandBuffer_T
-> PipelineBindPoint -> Pipeline -> Flags -> IO ()
vkCmdBindPipelineShaderGroupNV' = FunPtr
(Ptr CommandBuffer_T
-> PipelineBindPoint -> Pipeline -> Flags -> IO ())
-> Ptr CommandBuffer_T
-> PipelineBindPoint
-> Pipeline
-> Flags
-> IO ()
mkVkCmdBindPipelineShaderGroupNV FunPtr
(Ptr CommandBuffer_T
-> PipelineBindPoint -> Pipeline -> Flags -> IO ())
vkCmdBindPipelineShaderGroupNVPtr
String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdBindPipelineShaderGroupNV" (Ptr CommandBuffer_T
-> PipelineBindPoint -> Pipeline -> Flags -> IO ()
vkCmdBindPipelineShaderGroupNV'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
(PipelineBindPoint
pipelineBindPoint)
(Pipeline
pipeline)
(Flags
groupIndex))
() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetGeneratedCommandsMemoryRequirementsNV
:: FunPtr (Ptr Device_T -> Ptr GeneratedCommandsMemoryRequirementsInfoNV -> Ptr (SomeStruct MemoryRequirements2) -> IO ()) -> Ptr Device_T -> Ptr GeneratedCommandsMemoryRequirementsInfoNV -> Ptr (SomeStruct MemoryRequirements2) -> IO ()
getGeneratedCommandsMemoryRequirementsNV :: forall a io
. ( Extendss MemoryRequirements2 a
, PokeChain a
, PeekChain a
, MonadIO io )
=>
Device
->
GeneratedCommandsMemoryRequirementsInfoNV
-> io (MemoryRequirements2 a)
getGeneratedCommandsMemoryRequirementsNV :: forall (a :: [*]) (io :: * -> *).
(Extendss MemoryRequirements2 a, PokeChain a, PeekChain a,
MonadIO io) =>
Device
-> GeneratedCommandsMemoryRequirementsInfoNV
-> io (MemoryRequirements2 a)
getGeneratedCommandsMemoryRequirementsNV Device
device GeneratedCommandsMemoryRequirementsInfoNV
info = IO (MemoryRequirements2 a) -> io (MemoryRequirements2 a)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (MemoryRequirements2 a) -> io (MemoryRequirements2 a))
-> (ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> IO (MemoryRequirements2 a))
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> io (MemoryRequirements2 a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> IO (MemoryRequirements2 a)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> io (MemoryRequirements2 a))
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> io (MemoryRequirements2 a)
forall a b. (a -> b) -> a -> b
$ do
let vkGetGeneratedCommandsMemoryRequirementsNVPtr :: FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
vkGetGeneratedCommandsMemoryRequirementsNVPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
pVkGetGeneratedCommandsMemoryRequirementsNV (case Device
device of Device{DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT (MemoryRequirements2 a) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (MemoryRequirements2 a) IO ())
-> IO () -> ContT (MemoryRequirements2 a) IO ()
forall a b. (a -> b) -> a -> b
$ ("isPreprocessed" ::: Bool) -> IO () -> IO ()
forall (f :: * -> *).
Applicative f =>
("isPreprocessed" ::: Bool) -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
vkGetGeneratedCommandsMemoryRequirementsNVPtr FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
-> "isPreprocessed" ::: Bool
forall a. Eq a => a -> a -> "isPreprocessed" ::: Bool
/= FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
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 String
"" String
"The function pointer for vkGetGeneratedCommandsMemoryRequirementsNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetGeneratedCommandsMemoryRequirementsNV' :: Ptr Device_T
-> ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ()
vkGetGeneratedCommandsMemoryRequirementsNV' = FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
-> Ptr Device_T
-> ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ()
mkVkGetGeneratedCommandsMemoryRequirementsNV FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ())
vkGetGeneratedCommandsMemoryRequirementsNVPtr
"pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
pInfo <- ((("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT
(MemoryRequirements2 a)
IO
("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT
(MemoryRequirements2 a)
IO
("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV))
-> ((("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT
(MemoryRequirements2 a)
IO
("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
forall a b. (a -> b) -> a -> b
$ GeneratedCommandsMemoryRequirementsInfoNV
-> (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (GeneratedCommandsMemoryRequirementsInfoNV
info)
Ptr (MemoryRequirements2 a)
pPMemoryRequirements <- ((Ptr (MemoryRequirements2 a) -> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT (MemoryRequirements2 a) IO (Ptr (MemoryRequirements2 a))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @(MemoryRequirements2 _))
IO () -> ContT (MemoryRequirements2 a) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (MemoryRequirements2 a) IO ())
-> IO () -> ContT (MemoryRequirements2 a) IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetGeneratedCommandsMemoryRequirementsNV" (Ptr Device_T
-> ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2))
-> IO ()
vkGetGeneratedCommandsMemoryRequirementsNV'
(Device -> Ptr Device_T
deviceHandle (Device
device))
"pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
pInfo
(Ptr (MemoryRequirements2 a)
-> "pMemoryRequirements" ::: Ptr (SomeStruct MemoryRequirements2)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (MemoryRequirements2 a)
pPMemoryRequirements)))
MemoryRequirements2 a
pMemoryRequirements <- IO (MemoryRequirements2 a)
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO (MemoryRequirements2 a)
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a)
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @(MemoryRequirements2 _) Ptr (MemoryRequirements2 a)
pPMemoryRequirements
MemoryRequirements2 a
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (MemoryRequirements2 a
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a))
-> MemoryRequirements2 a
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall a b. (a -> b) -> a -> b
$ (MemoryRequirements2 a
pMemoryRequirements)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCreateIndirectCommandsLayoutNV
:: FunPtr (Ptr Device_T -> Ptr IndirectCommandsLayoutCreateInfoNV -> Ptr AllocationCallbacks -> Ptr IndirectCommandsLayoutNV -> IO Result) -> Ptr Device_T -> Ptr IndirectCommandsLayoutCreateInfoNV -> Ptr AllocationCallbacks -> Ptr IndirectCommandsLayoutNV -> IO Result
createIndirectCommandsLayoutNV :: forall io
. (MonadIO io)
=>
Device
->
IndirectCommandsLayoutCreateInfoNV
->
("allocator" ::: Maybe AllocationCallbacks)
-> io (IndirectCommandsLayoutNV)
createIndirectCommandsLayoutNV :: forall (io :: * -> *).
MonadIO io =>
Device
-> IndirectCommandsLayoutCreateInfoNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io IndirectCommandsLayoutNV
createIndirectCommandsLayoutNV Device
device
IndirectCommandsLayoutCreateInfoNV
createInfo
"allocator" ::: Maybe AllocationCallbacks
allocator = IO IndirectCommandsLayoutNV -> io IndirectCommandsLayoutNV
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IndirectCommandsLayoutNV -> io IndirectCommandsLayoutNV)
-> (ContT IndirectCommandsLayoutNV IO IndirectCommandsLayoutNV
-> IO IndirectCommandsLayoutNV)
-> ContT IndirectCommandsLayoutNV IO IndirectCommandsLayoutNV
-> io IndirectCommandsLayoutNV
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT IndirectCommandsLayoutNV IO IndirectCommandsLayoutNV
-> IO IndirectCommandsLayoutNV
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT IndirectCommandsLayoutNV IO IndirectCommandsLayoutNV
-> io IndirectCommandsLayoutNV)
-> ContT IndirectCommandsLayoutNV IO IndirectCommandsLayoutNV
-> io IndirectCommandsLayoutNV
forall a b. (a -> b) -> a -> b
$ do
let vkCreateIndirectCommandsLayoutNVPtr :: FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO Result)
vkCreateIndirectCommandsLayoutNVPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO Result)
pVkCreateIndirectCommandsLayoutNV (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT IndirectCommandsLayoutNV IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT IndirectCommandsLayoutNV IO ())
-> IO () -> ContT IndirectCommandsLayoutNV IO ()
forall a b. (a -> b) -> a -> b
$ ("isPreprocessed" ::: Bool) -> IO () -> IO ()
forall (f :: * -> *).
Applicative f =>
("isPreprocessed" ::: Bool) -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO Result)
vkCreateIndirectCommandsLayoutNVPtr FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO Result)
-> "isPreprocessed" ::: Bool
forall a. Eq a => a -> a -> "isPreprocessed" ::: Bool
/= FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO Result)
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 String
"" String
"The function pointer for vkCreateIndirectCommandsLayoutNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCreateIndirectCommandsLayoutNV' :: Ptr Device_T
-> ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO Result
vkCreateIndirectCommandsLayoutNV' = FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO Result)
-> Ptr Device_T
-> ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO Result
mkVkCreateIndirectCommandsLayoutNV FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO Result)
vkCreateIndirectCommandsLayoutNVPtr
"pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
pCreateInfo <- ((("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> IO IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV)
-> ContT
IndirectCommandsLayoutNV
IO
("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> IO IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV)
-> ContT
IndirectCommandsLayoutNV
IO
("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV))
-> ((("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> IO IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV)
-> ContT
IndirectCommandsLayoutNV
IO
("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
forall a b. (a -> b) -> a -> b
$ IndirectCommandsLayoutCreateInfoNV
-> (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> IO IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (IndirectCommandsLayoutCreateInfoNV
createInfo)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT
IndirectCommandsLayoutNV
IO
("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks)
-> IO IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV)
-> ContT
IndirectCommandsLayoutNV
IO
("pAllocator" ::: Ptr AllocationCallbacks)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks)
-> IO IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV)
-> ContT
IndirectCommandsLayoutNV
IO
("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks)
-> IO IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV)
-> ContT
IndirectCommandsLayoutNV
IO
("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks)
-> IO IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
"pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV
pPIndirectCommandsLayout <- ((("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV)
-> ContT
IndirectCommandsLayoutNV
IO
("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV)
-> ContT
IndirectCommandsLayoutNV
IO
("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV))
-> ((("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV)
-> ContT
IndirectCommandsLayoutNV
IO
("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
forall a b. (a -> b) -> a -> b
$ IO ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> (("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO ())
-> (("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @IndirectCommandsLayoutNV Int
8) ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result -> ContT IndirectCommandsLayoutNV IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT IndirectCommandsLayoutNV IO Result)
-> IO Result -> ContT IndirectCommandsLayoutNV IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCreateIndirectCommandsLayoutNV" (Ptr Device_T
-> ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IO Result
vkCreateIndirectCommandsLayoutNV'
(Device -> Ptr Device_T
deviceHandle (Device
device))
"pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
pCreateInfo
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator
("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV
pPIndirectCommandsLayout))
IO () -> ContT IndirectCommandsLayoutNV IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT IndirectCommandsLayoutNV IO ())
-> IO () -> ContT IndirectCommandsLayoutNV IO ()
forall a b. (a -> b) -> a -> b
$ ("isPreprocessed" ::: Bool) -> IO () -> IO ()
forall (f :: * -> *).
Applicative f =>
("isPreprocessed" ::: Bool) -> f () -> f ()
when (Result
r Result -> Result -> "isPreprocessed" ::: Bool
forall a. Ord a => a -> a -> "isPreprocessed" ::: Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
IndirectCommandsLayoutNV
pIndirectCommandsLayout <- IO IndirectCommandsLayoutNV
-> ContT IndirectCommandsLayoutNV IO IndirectCommandsLayoutNV
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO IndirectCommandsLayoutNV
-> ContT IndirectCommandsLayoutNV IO IndirectCommandsLayoutNV)
-> IO IndirectCommandsLayoutNV
-> ContT IndirectCommandsLayoutNV IO IndirectCommandsLayoutNV
forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @IndirectCommandsLayoutNV "pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV
pPIndirectCommandsLayout
IndirectCommandsLayoutNV
-> ContT IndirectCommandsLayoutNV IO IndirectCommandsLayoutNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (IndirectCommandsLayoutNV
-> ContT IndirectCommandsLayoutNV IO IndirectCommandsLayoutNV)
-> IndirectCommandsLayoutNV
-> ContT IndirectCommandsLayoutNV IO IndirectCommandsLayoutNV
forall a b. (a -> b) -> a -> b
$ (IndirectCommandsLayoutNV
pIndirectCommandsLayout)
withIndirectCommandsLayoutNV :: forall io r . MonadIO io => Device -> IndirectCommandsLayoutCreateInfoNV -> Maybe AllocationCallbacks -> (io IndirectCommandsLayoutNV -> (IndirectCommandsLayoutNV -> io ()) -> r) -> r
withIndirectCommandsLayoutNV :: forall (io :: * -> *) r.
MonadIO io =>
Device
-> IndirectCommandsLayoutCreateInfoNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io IndirectCommandsLayoutNV
-> (IndirectCommandsLayoutNV -> io ()) -> r)
-> r
withIndirectCommandsLayoutNV Device
device IndirectCommandsLayoutCreateInfoNV
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator io IndirectCommandsLayoutNV
-> (IndirectCommandsLayoutNV -> io ()) -> r
b =
io IndirectCommandsLayoutNV
-> (IndirectCommandsLayoutNV -> io ()) -> r
b (Device
-> IndirectCommandsLayoutCreateInfoNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io IndirectCommandsLayoutNV
forall (io :: * -> *).
MonadIO io =>
Device
-> IndirectCommandsLayoutCreateInfoNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io IndirectCommandsLayoutNV
createIndirectCommandsLayoutNV Device
device IndirectCommandsLayoutCreateInfoNV
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator)
(\(IndirectCommandsLayoutNV
o0) -> Device
-> IndirectCommandsLayoutNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
forall (io :: * -> *).
MonadIO io =>
Device
-> IndirectCommandsLayoutNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyIndirectCommandsLayoutNV Device
device IndirectCommandsLayoutNV
o0 "allocator" ::: Maybe AllocationCallbacks
pAllocator)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkDestroyIndirectCommandsLayoutNV
:: FunPtr (Ptr Device_T -> IndirectCommandsLayoutNV -> Ptr AllocationCallbacks -> IO ()) -> Ptr Device_T -> IndirectCommandsLayoutNV -> Ptr AllocationCallbacks -> IO ()
destroyIndirectCommandsLayoutNV :: forall io
. (MonadIO io)
=>
Device
->
IndirectCommandsLayoutNV
->
("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyIndirectCommandsLayoutNV :: forall (io :: * -> *).
MonadIO io =>
Device
-> IndirectCommandsLayoutNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyIndirectCommandsLayoutNV Device
device
IndirectCommandsLayoutNV
indirectCommandsLayout
"allocator" ::: Maybe AllocationCallbacks
allocator = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkDestroyIndirectCommandsLayoutNVPtr :: FunPtr
(Ptr Device_T
-> IndirectCommandsLayoutNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroyIndirectCommandsLayoutNVPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> IndirectCommandsLayoutNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
pVkDestroyIndirectCommandsLayoutNV (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ("isPreprocessed" ::: Bool) -> IO () -> IO ()
forall (f :: * -> *).
Applicative f =>
("isPreprocessed" ::: Bool) -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> IndirectCommandsLayoutNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroyIndirectCommandsLayoutNVPtr FunPtr
(Ptr Device_T
-> IndirectCommandsLayoutNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> FunPtr
(Ptr Device_T
-> IndirectCommandsLayoutNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> "isPreprocessed" ::: Bool
forall a. Eq a => a -> a -> "isPreprocessed" ::: Bool
/= FunPtr
(Ptr Device_T
-> IndirectCommandsLayoutNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
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 String
"" String
"The function pointer for vkDestroyIndirectCommandsLayoutNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkDestroyIndirectCommandsLayoutNV' :: Ptr Device_T
-> IndirectCommandsLayoutNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroyIndirectCommandsLayoutNV' = FunPtr
(Ptr Device_T
-> IndirectCommandsLayoutNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> Ptr Device_T
-> IndirectCommandsLayoutNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
mkVkDestroyIndirectCommandsLayoutNV FunPtr
(Ptr Device_T
-> IndirectCommandsLayoutNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroyIndirectCommandsLayoutNVPtr
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkDestroyIndirectCommandsLayoutNV" (Ptr Device_T
-> IndirectCommandsLayoutNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroyIndirectCommandsLayoutNV'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(IndirectCommandsLayoutNV
indirectCommandsLayout)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator)
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
data PhysicalDeviceDeviceGeneratedCommandsFeaturesNV = PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
{
PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> "isPreprocessed" ::: Bool
deviceGeneratedCommands :: Bool }
deriving (Typeable, PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> "isPreprocessed" ::: Bool
(PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> "isPreprocessed" ::: Bool)
-> (PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> "isPreprocessed" ::: Bool)
-> Eq PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
forall a.
(a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool) -> Eq a
/= :: PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> "isPreprocessed" ::: Bool
$c/= :: PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> "isPreprocessed" ::: Bool
== :: PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> "isPreprocessed" ::: Bool
$c== :: PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> "isPreprocessed" ::: Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceDeviceGeneratedCommandsFeaturesNV)
#endif
deriving instance Show PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
instance ToCStruct PhysicalDeviceDeviceGeneratedCommandsFeaturesNV where
withCStruct :: forall b.
PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> (Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV -> IO b)
-> IO b
withCStruct PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
x Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV -> IO b
f = Int
-> (Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
p -> Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
p PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
x (Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV -> IO b
f Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
p PhysicalDeviceDeviceGeneratedCommandsFeaturesNV{"isPreprocessed" ::: Bool
deviceGeneratedCommands :: "isPreprocessed" ::: Bool
$sel:deviceGeneratedCommands:PhysicalDeviceDeviceGeneratedCommandsFeaturesNV :: PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> "isPreprocessed" ::: Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("isPreprocessed" ::: Bool32)
-> ("isPreprocessed" ::: Bool32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> Int -> Ptr ("isPreprocessed" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (("isPreprocessed" ::: Bool) -> "isPreprocessed" ::: Bool32
boolToBool32 ("isPreprocessed" ::: Bool
deviceGeneratedCommands))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("isPreprocessed" ::: Bool32)
-> ("isPreprocessed" ::: Bool32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> Int -> Ptr ("isPreprocessed" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (("isPreprocessed" ::: Bool) -> "isPreprocessed" ::: Bool32
boolToBool32 ("isPreprocessed" ::: Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceDeviceGeneratedCommandsFeaturesNV where
peekCStruct :: Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> IO PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
peekCStruct Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
p = do
"isPreprocessed" ::: Bool32
deviceGeneratedCommands <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> Int -> Ptr ("isPreprocessed" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> IO PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> IO PhysicalDeviceDeviceGeneratedCommandsFeaturesNV)
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> IO PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
forall a b. (a -> b) -> a -> b
$ ("isPreprocessed" ::: Bool)
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
(("isPreprocessed" ::: Bool32) -> "isPreprocessed" ::: Bool
bool32ToBool "isPreprocessed" ::: Bool32
deviceGeneratedCommands)
instance Storable PhysicalDeviceDeviceGeneratedCommandsFeaturesNV where
sizeOf :: PhysicalDeviceDeviceGeneratedCommandsFeaturesNV -> Int
sizeOf ~PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
_ = Int
24
alignment :: PhysicalDeviceDeviceGeneratedCommandsFeaturesNV -> Int
alignment ~PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
_ = Int
8
peek :: Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> IO PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
peek = Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> IO PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV -> IO ()
poke Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
poked = Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
-> IO ()
-> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
ptr PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceDeviceGeneratedCommandsFeaturesNV where
zero :: PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
zero = ("isPreprocessed" ::: Bool)
-> PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
"isPreprocessed" ::: Bool
forall a. Zero a => a
zero
data PhysicalDeviceDeviceGeneratedCommandsPropertiesNV = PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
{
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
maxGraphicsShaderGroupCount :: Word32
,
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
maxIndirectSequenceCount :: Word32
,
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
maxIndirectCommandsTokenCount :: Word32
,
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
maxIndirectCommandsStreamCount :: Word32
,
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
maxIndirectCommandsTokenOffset :: Word32
,
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
maxIndirectCommandsStreamStride :: Word32
,
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
minSequencesCountBufferOffsetAlignment :: Word32
,
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
minSequencesIndexBufferOffsetAlignment :: Word32
,
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
minIndirectCommandsBufferOffsetAlignment :: Word32
}
deriving (Typeable, PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> "isPreprocessed" ::: Bool
(PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> "isPreprocessed" ::: Bool)
-> (PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> "isPreprocessed" ::: Bool)
-> Eq PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
forall a.
(a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool) -> Eq a
/= :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> "isPreprocessed" ::: Bool
$c/= :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> "isPreprocessed" ::: Bool
== :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> "isPreprocessed" ::: Bool
$c== :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> "isPreprocessed" ::: Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceDeviceGeneratedCommandsPropertiesNV)
#endif
deriving instance Show PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
instance ToCStruct PhysicalDeviceDeviceGeneratedCommandsPropertiesNV where
withCStruct :: forall b.
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> (Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> IO b)
-> IO b
withCStruct PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
x Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> IO b
f = Int
-> (Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
56 ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p -> Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
x (Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> IO b
f Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p PhysicalDeviceDeviceGeneratedCommandsPropertiesNV{Flags
minIndirectCommandsBufferOffsetAlignment :: Flags
minSequencesIndexBufferOffsetAlignment :: Flags
minSequencesCountBufferOffsetAlignment :: Flags
maxIndirectCommandsStreamStride :: Flags
maxIndirectCommandsTokenOffset :: Flags
maxIndirectCommandsStreamCount :: Flags
maxIndirectCommandsTokenCount :: Flags
maxIndirectSequenceCount :: Flags
maxGraphicsShaderGroupCount :: Flags
$sel:minIndirectCommandsBufferOffsetAlignment:PhysicalDeviceDeviceGeneratedCommandsPropertiesNV :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
$sel:minSequencesIndexBufferOffsetAlignment:PhysicalDeviceDeviceGeneratedCommandsPropertiesNV :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
$sel:minSequencesCountBufferOffsetAlignment:PhysicalDeviceDeviceGeneratedCommandsPropertiesNV :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
$sel:maxIndirectCommandsStreamStride:PhysicalDeviceDeviceGeneratedCommandsPropertiesNV :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
$sel:maxIndirectCommandsTokenOffset:PhysicalDeviceDeviceGeneratedCommandsPropertiesNV :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
$sel:maxIndirectCommandsStreamCount:PhysicalDeviceDeviceGeneratedCommandsPropertiesNV :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
$sel:maxIndirectCommandsTokenCount:PhysicalDeviceDeviceGeneratedCommandsPropertiesNV :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
$sel:maxIndirectSequenceCount:PhysicalDeviceDeviceGeneratedCommandsPropertiesNV :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
$sel:maxGraphicsShaderGroupCount:PhysicalDeviceDeviceGeneratedCommandsPropertiesNV :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Flags
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Flags
maxGraphicsShaderGroupCount)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Flags
maxIndirectSequenceCount)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Flags
maxIndirectCommandsTokenCount)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Flags
maxIndirectCommandsStreamCount)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Flags
maxIndirectCommandsTokenOffset)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32)) (Flags
maxIndirectCommandsStreamStride)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Flags
minSequencesCountBufferOffsetAlignment)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (Flags
minSequencesIndexBufferOffsetAlignment)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (Flags
minIndirectCommandsBufferOffsetAlignment)
IO b
f
cStructSize :: Int
cStructSize = Int
56
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceDeviceGeneratedCommandsPropertiesNV where
peekCStruct :: Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> IO PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
peekCStruct Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p = do
Flags
maxGraphicsShaderGroupCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
Flags
maxIndirectSequenceCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
Flags
maxIndirectCommandsTokenCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
Flags
maxIndirectCommandsStreamCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32))
Flags
maxIndirectCommandsTokenOffset <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
Flags
maxIndirectCommandsStreamStride <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32))
Flags
minSequencesCountBufferOffsetAlignment <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32))
Flags
minSequencesIndexBufferOffsetAlignment <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32))
Flags
minIndirectCommandsBufferOffsetAlignment <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
p Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32))
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> IO PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> IO PhysicalDeviceDeviceGeneratedCommandsPropertiesNV)
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> IO PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
forall a b. (a -> b) -> a -> b
$ Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
Flags
maxGraphicsShaderGroupCount
Flags
maxIndirectSequenceCount
Flags
maxIndirectCommandsTokenCount
Flags
maxIndirectCommandsStreamCount
Flags
maxIndirectCommandsTokenOffset
Flags
maxIndirectCommandsStreamStride
Flags
minSequencesCountBufferOffsetAlignment
Flags
minSequencesIndexBufferOffsetAlignment
Flags
minIndirectCommandsBufferOffsetAlignment
instance Storable PhysicalDeviceDeviceGeneratedCommandsPropertiesNV where
sizeOf :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Int
sizeOf ~PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
_ = Int
56
alignment :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> Int
alignment ~PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
_ = Int
8
peek :: Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> IO PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
peek = Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> IO PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV -> IO ()
poke Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
poked = Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
-> IO ()
-> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
ptr PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceDeviceGeneratedCommandsPropertiesNV where
zero :: PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
zero = Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
PhysicalDeviceDeviceGeneratedCommandsPropertiesNV
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
data GraphicsShaderGroupCreateInfoNV = GraphicsShaderGroupCreateInfoNV
{
GraphicsShaderGroupCreateInfoNV
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
,
GraphicsShaderGroupCreateInfoNV
-> Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
vertexInputState :: Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
,
GraphicsShaderGroupCreateInfoNV
-> Maybe (SomeStruct PipelineTessellationStateCreateInfo)
tessellationState :: Maybe (SomeStruct PipelineTessellationStateCreateInfo)
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (GraphicsShaderGroupCreateInfoNV)
#endif
deriving instance Show GraphicsShaderGroupCreateInfoNV
instance ToCStruct GraphicsShaderGroupCreateInfoNV where
withCStruct :: forall b.
GraphicsShaderGroupCreateInfoNV
-> (Ptr GraphicsShaderGroupCreateInfoNV -> IO b) -> IO b
withCStruct GraphicsShaderGroupCreateInfoNV
x Ptr GraphicsShaderGroupCreateInfoNV -> IO b
f = Int -> (Ptr GraphicsShaderGroupCreateInfoNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 ((Ptr GraphicsShaderGroupCreateInfoNV -> IO b) -> IO b)
-> (Ptr GraphicsShaderGroupCreateInfoNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr GraphicsShaderGroupCreateInfoNV
p -> Ptr GraphicsShaderGroupCreateInfoNV
-> GraphicsShaderGroupCreateInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GraphicsShaderGroupCreateInfoNV
p GraphicsShaderGroupCreateInfoNV
x (Ptr GraphicsShaderGroupCreateInfoNV -> IO b
f Ptr GraphicsShaderGroupCreateInfoNV
p)
pokeCStruct :: forall b.
Ptr GraphicsShaderGroupCreateInfoNV
-> GraphicsShaderGroupCreateInfoNV -> IO b -> IO b
pokeCStruct Ptr GraphicsShaderGroupCreateInfoNV
p GraphicsShaderGroupCreateInfoNV{Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
Maybe (SomeStruct PipelineTessellationStateCreateInfo)
Vector (SomeStruct PipelineShaderStageCreateInfo)
tessellationState :: Maybe (SomeStruct PipelineTessellationStateCreateInfo)
vertexInputState :: Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
$sel:tessellationState:GraphicsShaderGroupCreateInfoNV :: GraphicsShaderGroupCreateInfoNV
-> Maybe (SomeStruct PipelineTessellationStateCreateInfo)
$sel:vertexInputState:GraphicsShaderGroupCreateInfoNV :: GraphicsShaderGroupCreateInfoNV
-> Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
$sel:stages:GraphicsShaderGroupCreateInfoNV :: GraphicsShaderGroupCreateInfoNV
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsShaderGroupCreateInfoNV
p Ptr GraphicsShaderGroupCreateInfoNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsShaderGroupCreateInfoNV
p Ptr GraphicsShaderGroupCreateInfoNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsShaderGroupCreateInfoNV
p Ptr GraphicsShaderGroupCreateInfoNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) ((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector (SomeStruct PipelineShaderStageCreateInfo) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector (SomeStruct PipelineShaderStageCreateInfo) -> Int)
-> Vector (SomeStruct PipelineShaderStageCreateInfo) -> Int
forall a b. (a -> b) -> a -> b
$ (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages)) :: Word32))
Ptr (PipelineShaderStageCreateInfo Any)
pPStages' <- ((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any)))
-> ((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any))
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @(PipelineShaderStageCreateInfo _) ((Vector (SomeStruct PipelineShaderStageCreateInfo) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
48)
(Int -> SomeStruct PipelineShaderStageCreateInfo -> ContT b IO ())
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i SomeStruct PipelineShaderStageCreateInfo
e -> ((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (SomeStruct PipelineShaderStageCreateInfo)
-> SomeStruct PipelineShaderStageCreateInfo -> IO b -> IO b
forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (Ptr (PipelineShaderStageCreateInfo Any)
-> Ptr (SomeStruct PipelineShaderStageCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineShaderStageCreateInfo Any)
pPStages' Ptr (PipelineShaderStageCreateInfo Any)
-> Int -> Ptr (PipelineShaderStageCreateInfo w)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (PipelineShaderStageCreateInfo _))) (SomeStruct PipelineShaderStageCreateInfo
e) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())) (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr (PipelineShaderStageCreateInfo Any))
-> Ptr (PipelineShaderStageCreateInfo Any) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsShaderGroupCreateInfoNV
p Ptr GraphicsShaderGroupCreateInfoNV
-> Int -> Ptr (Ptr (PipelineShaderStageCreateInfo w))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr (PipelineShaderStageCreateInfo _)))) (Ptr (PipelineShaderStageCreateInfo Any)
pPStages')
Ptr (PipelineVertexInputStateCreateInfo '[])
pVertexInputState'' <- case (Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
vertexInputState) of
Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
Nothing -> Ptr (PipelineVertexInputStateCreateInfo '[])
-> ContT b IO (Ptr (PipelineVertexInputStateCreateInfo '[]))
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr (PipelineVertexInputStateCreateInfo '[])
forall a. Ptr a
nullPtr
Just SomeStruct PipelineVertexInputStateCreateInfo
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
forall {r} {m :: * -> *} {a}. ((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (PipelineVertexInputStateCreateInfo '[])) (((Ptr (PipelineVertexInputStateCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineVertexInputStateCreateInfo '[])))
-> ((Ptr (PipelineVertexInputStateCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineVertexInputStateCreateInfo '[]))
forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineVertexInputStateCreateInfo '[]) -> IO b
cont -> forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
(Extendss a es, PokeChain es) =>
Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @PipelineVertexInputStateCreateInfo (SomeStruct PipelineVertexInputStateCreateInfo
j) (Ptr (PipelineVertexInputStateCreateInfo '[]) -> IO b
cont (Ptr (PipelineVertexInputStateCreateInfo '[]) -> IO b)
-> (Ptr (PipelineVertexInputStateCreateInfo es)
-> Ptr (PipelineVertexInputStateCreateInfo '[]))
-> Ptr (PipelineVertexInputStateCreateInfo es)
-> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (PipelineVertexInputStateCreateInfo es)
-> Ptr (PipelineVertexInputStateCreateInfo '[])
forall a b. Ptr a -> Ptr b
castPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr (PipelineVertexInputStateCreateInfo '[]))
-> Ptr (PipelineVertexInputStateCreateInfo '[]) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsShaderGroupCreateInfoNV
p Ptr GraphicsShaderGroupCreateInfoNV
-> Int -> Ptr (Ptr (PipelineVertexInputStateCreateInfo w))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr (PipelineVertexInputStateCreateInfo _)))) Ptr (PipelineVertexInputStateCreateInfo '[])
pVertexInputState''
Ptr (PipelineTessellationStateCreateInfo '[])
pTessellationState'' <- case (Maybe (SomeStruct PipelineTessellationStateCreateInfo)
tessellationState) of
Maybe (SomeStruct PipelineTessellationStateCreateInfo)
Nothing -> Ptr (PipelineTessellationStateCreateInfo '[])
-> ContT b IO (Ptr (PipelineTessellationStateCreateInfo '[]))
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr (PipelineTessellationStateCreateInfo '[])
forall a. Ptr a
nullPtr
Just SomeStruct PipelineTessellationStateCreateInfo
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
forall {r} {m :: * -> *} {a}. ((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (PipelineTessellationStateCreateInfo '[])) (((Ptr (PipelineTessellationStateCreateInfo '[]) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineTessellationStateCreateInfo '[])))
-> ((Ptr (PipelineTessellationStateCreateInfo '[]) -> IO b)
-> IO b)
-> ContT b IO (Ptr (PipelineTessellationStateCreateInfo '[]))
forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineTessellationStateCreateInfo '[]) -> IO b
cont -> forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
(Extendss a es, PokeChain es) =>
Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @PipelineTessellationStateCreateInfo (SomeStruct PipelineTessellationStateCreateInfo
j) (Ptr (PipelineTessellationStateCreateInfo '[]) -> IO b
cont (Ptr (PipelineTessellationStateCreateInfo '[]) -> IO b)
-> (Ptr (PipelineTessellationStateCreateInfo es)
-> Ptr (PipelineTessellationStateCreateInfo '[]))
-> Ptr (PipelineTessellationStateCreateInfo es)
-> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (PipelineTessellationStateCreateInfo es)
-> Ptr (PipelineTessellationStateCreateInfo '[])
forall a b. Ptr a -> Ptr b
castPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr (PipelineTessellationStateCreateInfo '[]))
-> Ptr (PipelineTessellationStateCreateInfo '[]) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsShaderGroupCreateInfoNV
p Ptr GraphicsShaderGroupCreateInfoNV
-> Int -> Ptr (Ptr (PipelineTessellationStateCreateInfo w))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr (PipelineTessellationStateCreateInfo _)))) Ptr (PipelineTessellationStateCreateInfo '[])
pTessellationState''
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
48
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr GraphicsShaderGroupCreateInfoNV -> IO b -> IO b
pokeZeroCStruct Ptr GraphicsShaderGroupCreateInfoNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsShaderGroupCreateInfoNV
p Ptr GraphicsShaderGroupCreateInfoNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsShaderGroupCreateInfoNV
p Ptr GraphicsShaderGroupCreateInfoNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct GraphicsShaderGroupCreateInfoNV where
peekCStruct :: Ptr GraphicsShaderGroupCreateInfoNV
-> IO GraphicsShaderGroupCreateInfoNV
peekCStruct Ptr GraphicsShaderGroupCreateInfoNV
p = do
Flags
stageCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr GraphicsShaderGroupCreateInfoNV
p Ptr GraphicsShaderGroupCreateInfoNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
Ptr (PipelineShaderStageCreateInfo Any)
pStages <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (PipelineShaderStageCreateInfo _)) ((Ptr GraphicsShaderGroupCreateInfoNV
p Ptr GraphicsShaderGroupCreateInfoNV
-> Int -> Ptr (Ptr (PipelineShaderStageCreateInfo w))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr (PipelineShaderStageCreateInfo _))))
Vector (SomeStruct PipelineShaderStageCreateInfo)
pStages' <- Int
-> (Int -> IO (SomeStruct PipelineShaderStageCreateInfo))
-> IO (Vector (SomeStruct PipelineShaderStageCreateInfo))
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
stageCount) (\Int
i -> Ptr (SomeStruct PipelineShaderStageCreateInfo)
-> IO (SomeStruct PipelineShaderStageCreateInfo)
forall (a :: [*] -> *).
(Extensible a,
forall (es :: [*]).
(Extendss a es, PeekChain es) =>
FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (Ptr (PipelineShaderStageCreateInfo Any)
-> Ptr (SomeStruct PipelineShaderStageCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ((Ptr (PipelineShaderStageCreateInfo Any)
pStages Ptr (PipelineShaderStageCreateInfo Any)
-> Int -> Ptr (PipelineShaderStageCreateInfo Any)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (PipelineShaderStageCreateInfo _)))))
Ptr (PipelineVertexInputStateCreateInfo Any)
pVertexInputState <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (PipelineVertexInputStateCreateInfo _)) ((Ptr GraphicsShaderGroupCreateInfoNV
p Ptr GraphicsShaderGroupCreateInfoNV
-> Int -> Ptr (Ptr (PipelineVertexInputStateCreateInfo w))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr (PipelineVertexInputStateCreateInfo _))))
Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
pVertexInputState' <- (Ptr (PipelineVertexInputStateCreateInfo Any)
-> IO (SomeStruct PipelineVertexInputStateCreateInfo))
-> Ptr (PipelineVertexInputStateCreateInfo Any)
-> IO (Maybe (SomeStruct PipelineVertexInputStateCreateInfo))
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr (PipelineVertexInputStateCreateInfo Any)
j -> Ptr (SomeStruct PipelineVertexInputStateCreateInfo)
-> IO (SomeStruct PipelineVertexInputStateCreateInfo)
forall (a :: [*] -> *).
(Extensible a,
forall (es :: [*]).
(Extendss a es, PeekChain es) =>
FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (Ptr (PipelineVertexInputStateCreateInfo Any)
-> Ptr (SomeStruct PipelineVertexInputStateCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineVertexInputStateCreateInfo Any)
j))) Ptr (PipelineVertexInputStateCreateInfo Any)
pVertexInputState
Ptr (PipelineTessellationStateCreateInfo Any)
pTessellationState <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (PipelineTessellationStateCreateInfo _)) ((Ptr GraphicsShaderGroupCreateInfoNV
p Ptr GraphicsShaderGroupCreateInfoNV
-> Int -> Ptr (Ptr (PipelineTessellationStateCreateInfo w))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr (PipelineTessellationStateCreateInfo _))))
Maybe (SomeStruct PipelineTessellationStateCreateInfo)
pTessellationState' <- (Ptr (PipelineTessellationStateCreateInfo Any)
-> IO (SomeStruct PipelineTessellationStateCreateInfo))
-> Ptr (PipelineTessellationStateCreateInfo Any)
-> IO (Maybe (SomeStruct PipelineTessellationStateCreateInfo))
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr (PipelineTessellationStateCreateInfo Any)
j -> Ptr (SomeStruct PipelineTessellationStateCreateInfo)
-> IO (SomeStruct PipelineTessellationStateCreateInfo)
forall (a :: [*] -> *).
(Extensible a,
forall (es :: [*]).
(Extendss a es, PeekChain es) =>
FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (Ptr (PipelineTessellationStateCreateInfo Any)
-> Ptr (SomeStruct PipelineTessellationStateCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineTessellationStateCreateInfo Any)
j))) Ptr (PipelineTessellationStateCreateInfo Any)
pTessellationState
GraphicsShaderGroupCreateInfoNV
-> IO GraphicsShaderGroupCreateInfoNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GraphicsShaderGroupCreateInfoNV
-> IO GraphicsShaderGroupCreateInfoNV)
-> GraphicsShaderGroupCreateInfoNV
-> IO GraphicsShaderGroupCreateInfoNV
forall a b. (a -> b) -> a -> b
$ Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
-> Maybe (SomeStruct PipelineTessellationStateCreateInfo)
-> GraphicsShaderGroupCreateInfoNV
GraphicsShaderGroupCreateInfoNV
Vector (SomeStruct PipelineShaderStageCreateInfo)
pStages' Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
pVertexInputState' Maybe (SomeStruct PipelineTessellationStateCreateInfo)
pTessellationState'
instance Zero GraphicsShaderGroupCreateInfoNV where
zero :: GraphicsShaderGroupCreateInfoNV
zero = Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
-> Maybe (SomeStruct PipelineTessellationStateCreateInfo)
-> GraphicsShaderGroupCreateInfoNV
GraphicsShaderGroupCreateInfoNV
Vector (SomeStruct PipelineShaderStageCreateInfo)
forall a. Monoid a => a
mempty
Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
forall a. Maybe a
Nothing
Maybe (SomeStruct PipelineTessellationStateCreateInfo)
forall a. Maybe a
Nothing
data GraphicsPipelineShaderGroupsCreateInfoNV = GraphicsPipelineShaderGroupsCreateInfoNV
{
GraphicsPipelineShaderGroupsCreateInfoNV
-> Vector GraphicsShaderGroupCreateInfoNV
groups :: Vector GraphicsShaderGroupCreateInfoNV
,
GraphicsPipelineShaderGroupsCreateInfoNV -> Vector Pipeline
pipelines :: Vector Pipeline
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (GraphicsPipelineShaderGroupsCreateInfoNV)
#endif
deriving instance Show GraphicsPipelineShaderGroupsCreateInfoNV
instance ToCStruct GraphicsPipelineShaderGroupsCreateInfoNV where
withCStruct :: forall b.
GraphicsPipelineShaderGroupsCreateInfoNV
-> (Ptr GraphicsPipelineShaderGroupsCreateInfoNV -> IO b) -> IO b
withCStruct GraphicsPipelineShaderGroupsCreateInfoNV
x Ptr GraphicsPipelineShaderGroupsCreateInfoNV -> IO b
f = Int
-> (Ptr GraphicsPipelineShaderGroupsCreateInfoNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 ((Ptr GraphicsPipelineShaderGroupsCreateInfoNV -> IO b) -> IO b)
-> (Ptr GraphicsPipelineShaderGroupsCreateInfoNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p -> Ptr GraphicsPipelineShaderGroupsCreateInfoNV
-> GraphicsPipelineShaderGroupsCreateInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p GraphicsPipelineShaderGroupsCreateInfoNV
x (Ptr GraphicsPipelineShaderGroupsCreateInfoNV -> IO b
f Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p)
pokeCStruct :: forall b.
Ptr GraphicsPipelineShaderGroupsCreateInfoNV
-> GraphicsPipelineShaderGroupsCreateInfoNV -> IO b -> IO b
pokeCStruct Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p GraphicsPipelineShaderGroupsCreateInfoNV{Vector Pipeline
Vector GraphicsShaderGroupCreateInfoNV
pipelines :: Vector Pipeline
groups :: Vector GraphicsShaderGroupCreateInfoNV
$sel:pipelines:GraphicsPipelineShaderGroupsCreateInfoNV :: GraphicsPipelineShaderGroupsCreateInfoNV -> Vector Pipeline
$sel:groups:GraphicsPipelineShaderGroupsCreateInfoNV :: GraphicsPipelineShaderGroupsCreateInfoNV
-> Vector GraphicsShaderGroupCreateInfoNV
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p Ptr GraphicsPipelineShaderGroupsCreateInfoNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p Ptr GraphicsPipelineShaderGroupsCreateInfoNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p Ptr GraphicsPipelineShaderGroupsCreateInfoNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) ((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector GraphicsShaderGroupCreateInfoNV -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector GraphicsShaderGroupCreateInfoNV -> Int)
-> Vector GraphicsShaderGroupCreateInfoNV -> Int
forall a b. (a -> b) -> a -> b
$ (Vector GraphicsShaderGroupCreateInfoNV
groups)) :: Word32))
Ptr GraphicsShaderGroupCreateInfoNV
pPGroups' <- ((Ptr GraphicsShaderGroupCreateInfoNV -> IO b) -> IO b)
-> ContT b IO (Ptr GraphicsShaderGroupCreateInfoNV)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr GraphicsShaderGroupCreateInfoNV -> IO b) -> IO b)
-> ContT b IO (Ptr GraphicsShaderGroupCreateInfoNV))
-> ((Ptr GraphicsShaderGroupCreateInfoNV -> IO b) -> IO b)
-> ContT b IO (Ptr GraphicsShaderGroupCreateInfoNV)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @GraphicsShaderGroupCreateInfoNV ((Vector GraphicsShaderGroupCreateInfoNV -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector GraphicsShaderGroupCreateInfoNV
groups)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
48)
(Int -> GraphicsShaderGroupCreateInfoNV -> ContT b IO ())
-> Vector GraphicsShaderGroupCreateInfoNV -> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i GraphicsShaderGroupCreateInfoNV
e -> ((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GraphicsShaderGroupCreateInfoNV
-> GraphicsShaderGroupCreateInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (Ptr GraphicsShaderGroupCreateInfoNV
pPGroups' Ptr GraphicsShaderGroupCreateInfoNV
-> Int -> Ptr GraphicsShaderGroupCreateInfoNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr GraphicsShaderGroupCreateInfoNV) (GraphicsShaderGroupCreateInfoNV
e) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())) (Vector GraphicsShaderGroupCreateInfoNV
groups)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr GraphicsShaderGroupCreateInfoNV)
-> Ptr GraphicsShaderGroupCreateInfoNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p Ptr GraphicsPipelineShaderGroupsCreateInfoNV
-> Int -> Ptr (Ptr GraphicsShaderGroupCreateInfoNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr GraphicsShaderGroupCreateInfoNV))) (Ptr GraphicsShaderGroupCreateInfoNV
pPGroups')
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p Ptr GraphicsPipelineShaderGroupsCreateInfoNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) ((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector Pipeline -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Pipeline -> Int) -> Vector Pipeline -> Int
forall a b. (a -> b) -> a -> b
$ (Vector Pipeline
pipelines)) :: Word32))
Ptr Pipeline
pPPipelines' <- ((Ptr Pipeline -> IO b) -> IO b) -> ContT b IO (Ptr Pipeline)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Pipeline -> IO b) -> IO b) -> ContT b IO (Ptr Pipeline))
-> ((Ptr Pipeline -> IO b) -> IO b) -> ContT b IO (Ptr Pipeline)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Pipeline ((Vector Pipeline -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Pipeline
pipelines)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Pipeline -> IO ()) -> Vector Pipeline -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Pipeline
e -> Ptr Pipeline -> Pipeline -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Pipeline
pPPipelines' Ptr Pipeline -> Int -> Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Pipeline) (Pipeline
e)) (Vector Pipeline
pipelines)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Pipeline) -> Ptr Pipeline -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p Ptr GraphicsPipelineShaderGroupsCreateInfoNV
-> Int -> Ptr (Ptr Pipeline)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr Pipeline))) (Ptr Pipeline
pPPipelines')
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
48
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr GraphicsPipelineShaderGroupsCreateInfoNV -> IO b -> IO b
pokeZeroCStruct Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p Ptr GraphicsPipelineShaderGroupsCreateInfoNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p Ptr GraphicsPipelineShaderGroupsCreateInfoNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct GraphicsPipelineShaderGroupsCreateInfoNV where
peekCStruct :: Ptr GraphicsPipelineShaderGroupsCreateInfoNV
-> IO GraphicsPipelineShaderGroupsCreateInfoNV
peekCStruct Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p = do
Flags
groupCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p Ptr GraphicsPipelineShaderGroupsCreateInfoNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
Ptr GraphicsShaderGroupCreateInfoNV
pGroups <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr GraphicsShaderGroupCreateInfoNV) ((Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p Ptr GraphicsPipelineShaderGroupsCreateInfoNV
-> Int -> Ptr (Ptr GraphicsShaderGroupCreateInfoNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr GraphicsShaderGroupCreateInfoNV)))
Vector GraphicsShaderGroupCreateInfoNV
pGroups' <- Int
-> (Int -> IO GraphicsShaderGroupCreateInfoNV)
-> IO (Vector GraphicsShaderGroupCreateInfoNV)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
groupCount) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @GraphicsShaderGroupCreateInfoNV ((Ptr GraphicsShaderGroupCreateInfoNV
pGroups Ptr GraphicsShaderGroupCreateInfoNV
-> Int -> Ptr GraphicsShaderGroupCreateInfoNV
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr GraphicsShaderGroupCreateInfoNV)))
Flags
pipelineCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p Ptr GraphicsPipelineShaderGroupsCreateInfoNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
Ptr Pipeline
pPipelines <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Pipeline) ((Ptr GraphicsPipelineShaderGroupsCreateInfoNV
p Ptr GraphicsPipelineShaderGroupsCreateInfoNV
-> Int -> Ptr (Ptr Pipeline)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr Pipeline)))
Vector Pipeline
pPipelines' <- Int -> (Int -> IO Pipeline) -> IO (Vector Pipeline)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
pipelineCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Pipeline ((Ptr Pipeline
pPipelines Ptr Pipeline -> Int -> Ptr Pipeline
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Pipeline)))
GraphicsPipelineShaderGroupsCreateInfoNV
-> IO GraphicsPipelineShaderGroupsCreateInfoNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GraphicsPipelineShaderGroupsCreateInfoNV
-> IO GraphicsPipelineShaderGroupsCreateInfoNV)
-> GraphicsPipelineShaderGroupsCreateInfoNV
-> IO GraphicsPipelineShaderGroupsCreateInfoNV
forall a b. (a -> b) -> a -> b
$ Vector GraphicsShaderGroupCreateInfoNV
-> Vector Pipeline -> GraphicsPipelineShaderGroupsCreateInfoNV
GraphicsPipelineShaderGroupsCreateInfoNV
Vector GraphicsShaderGroupCreateInfoNV
pGroups' Vector Pipeline
pPipelines'
instance Zero GraphicsPipelineShaderGroupsCreateInfoNV where
zero :: GraphicsPipelineShaderGroupsCreateInfoNV
zero = Vector GraphicsShaderGroupCreateInfoNV
-> Vector Pipeline -> GraphicsPipelineShaderGroupsCreateInfoNV
GraphicsPipelineShaderGroupsCreateInfoNV
Vector GraphicsShaderGroupCreateInfoNV
forall a. Monoid a => a
mempty
Vector Pipeline
forall a. Monoid a => a
mempty
data BindShaderGroupIndirectCommandNV = BindShaderGroupIndirectCommandNV
{
BindShaderGroupIndirectCommandNV -> Flags
groupIndex :: Word32 }
deriving (Typeable, BindShaderGroupIndirectCommandNV
-> BindShaderGroupIndirectCommandNV -> "isPreprocessed" ::: Bool
(BindShaderGroupIndirectCommandNV
-> BindShaderGroupIndirectCommandNV -> "isPreprocessed" ::: Bool)
-> (BindShaderGroupIndirectCommandNV
-> BindShaderGroupIndirectCommandNV -> "isPreprocessed" ::: Bool)
-> Eq BindShaderGroupIndirectCommandNV
forall a.
(a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool) -> Eq a
/= :: BindShaderGroupIndirectCommandNV
-> BindShaderGroupIndirectCommandNV -> "isPreprocessed" ::: Bool
$c/= :: BindShaderGroupIndirectCommandNV
-> BindShaderGroupIndirectCommandNV -> "isPreprocessed" ::: Bool
== :: BindShaderGroupIndirectCommandNV
-> BindShaderGroupIndirectCommandNV -> "isPreprocessed" ::: Bool
$c== :: BindShaderGroupIndirectCommandNV
-> BindShaderGroupIndirectCommandNV -> "isPreprocessed" ::: Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (BindShaderGroupIndirectCommandNV)
#endif
deriving instance Show BindShaderGroupIndirectCommandNV
instance ToCStruct BindShaderGroupIndirectCommandNV where
withCStruct :: forall b.
BindShaderGroupIndirectCommandNV
-> (Ptr BindShaderGroupIndirectCommandNV -> IO b) -> IO b
withCStruct BindShaderGroupIndirectCommandNV
x Ptr BindShaderGroupIndirectCommandNV -> IO b
f = Int -> (Ptr BindShaderGroupIndirectCommandNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
4 ((Ptr BindShaderGroupIndirectCommandNV -> IO b) -> IO b)
-> (Ptr BindShaderGroupIndirectCommandNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr BindShaderGroupIndirectCommandNV
p -> Ptr BindShaderGroupIndirectCommandNV
-> BindShaderGroupIndirectCommandNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BindShaderGroupIndirectCommandNV
p BindShaderGroupIndirectCommandNV
x (Ptr BindShaderGroupIndirectCommandNV -> IO b
f Ptr BindShaderGroupIndirectCommandNV
p)
pokeCStruct :: forall b.
Ptr BindShaderGroupIndirectCommandNV
-> BindShaderGroupIndirectCommandNV -> IO b -> IO b
pokeCStruct Ptr BindShaderGroupIndirectCommandNV
p BindShaderGroupIndirectCommandNV{Flags
groupIndex :: Flags
$sel:groupIndex:BindShaderGroupIndirectCommandNV :: BindShaderGroupIndirectCommandNV -> Flags
..} IO b
f = do
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindShaderGroupIndirectCommandNV
p Ptr BindShaderGroupIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Flags
groupIndex)
IO b
f
cStructSize :: Int
cStructSize = Int
4
cStructAlignment :: Int
cStructAlignment = Int
4
pokeZeroCStruct :: forall b. Ptr BindShaderGroupIndirectCommandNV -> IO b -> IO b
pokeZeroCStruct Ptr BindShaderGroupIndirectCommandNV
p IO b
f = do
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindShaderGroupIndirectCommandNV
p Ptr BindShaderGroupIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct BindShaderGroupIndirectCommandNV where
peekCStruct :: Ptr BindShaderGroupIndirectCommandNV
-> IO BindShaderGroupIndirectCommandNV
peekCStruct Ptr BindShaderGroupIndirectCommandNV
p = do
Flags
groupIndex <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr BindShaderGroupIndirectCommandNV
p Ptr BindShaderGroupIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
BindShaderGroupIndirectCommandNV
-> IO BindShaderGroupIndirectCommandNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (BindShaderGroupIndirectCommandNV
-> IO BindShaderGroupIndirectCommandNV)
-> BindShaderGroupIndirectCommandNV
-> IO BindShaderGroupIndirectCommandNV
forall a b. (a -> b) -> a -> b
$ Flags -> BindShaderGroupIndirectCommandNV
BindShaderGroupIndirectCommandNV
Flags
groupIndex
instance Storable BindShaderGroupIndirectCommandNV where
sizeOf :: BindShaderGroupIndirectCommandNV -> Int
sizeOf ~BindShaderGroupIndirectCommandNV
_ = Int
4
alignment :: BindShaderGroupIndirectCommandNV -> Int
alignment ~BindShaderGroupIndirectCommandNV
_ = Int
4
peek :: Ptr BindShaderGroupIndirectCommandNV
-> IO BindShaderGroupIndirectCommandNV
peek = Ptr BindShaderGroupIndirectCommandNV
-> IO BindShaderGroupIndirectCommandNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr BindShaderGroupIndirectCommandNV
-> BindShaderGroupIndirectCommandNV -> IO ()
poke Ptr BindShaderGroupIndirectCommandNV
ptr BindShaderGroupIndirectCommandNV
poked = Ptr BindShaderGroupIndirectCommandNV
-> BindShaderGroupIndirectCommandNV -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BindShaderGroupIndirectCommandNV
ptr BindShaderGroupIndirectCommandNV
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero BindShaderGroupIndirectCommandNV where
zero :: BindShaderGroupIndirectCommandNV
zero = Flags -> BindShaderGroupIndirectCommandNV
BindShaderGroupIndirectCommandNV
Flags
forall a. Zero a => a
zero
data BindIndexBufferIndirectCommandNV = BindIndexBufferIndirectCommandNV
{
BindIndexBufferIndirectCommandNV -> DeviceAddress
bufferAddress :: DeviceAddress
,
BindIndexBufferIndirectCommandNV -> Flags
size :: Word32
,
BindIndexBufferIndirectCommandNV -> IndexType
indexType :: IndexType
}
deriving (Typeable, BindIndexBufferIndirectCommandNV
-> BindIndexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool
(BindIndexBufferIndirectCommandNV
-> BindIndexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool)
-> (BindIndexBufferIndirectCommandNV
-> BindIndexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool)
-> Eq BindIndexBufferIndirectCommandNV
forall a.
(a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool) -> Eq a
/= :: BindIndexBufferIndirectCommandNV
-> BindIndexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool
$c/= :: BindIndexBufferIndirectCommandNV
-> BindIndexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool
== :: BindIndexBufferIndirectCommandNV
-> BindIndexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool
$c== :: BindIndexBufferIndirectCommandNV
-> BindIndexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (BindIndexBufferIndirectCommandNV)
#endif
deriving instance Show BindIndexBufferIndirectCommandNV
instance ToCStruct BindIndexBufferIndirectCommandNV where
withCStruct :: forall b.
BindIndexBufferIndirectCommandNV
-> (Ptr BindIndexBufferIndirectCommandNV -> IO b) -> IO b
withCStruct BindIndexBufferIndirectCommandNV
x Ptr BindIndexBufferIndirectCommandNV -> IO b
f = Int -> (Ptr BindIndexBufferIndirectCommandNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
16 ((Ptr BindIndexBufferIndirectCommandNV -> IO b) -> IO b)
-> (Ptr BindIndexBufferIndirectCommandNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr BindIndexBufferIndirectCommandNV
p -> Ptr BindIndexBufferIndirectCommandNV
-> BindIndexBufferIndirectCommandNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BindIndexBufferIndirectCommandNV
p BindIndexBufferIndirectCommandNV
x (Ptr BindIndexBufferIndirectCommandNV -> IO b
f Ptr BindIndexBufferIndirectCommandNV
p)
pokeCStruct :: forall b.
Ptr BindIndexBufferIndirectCommandNV
-> BindIndexBufferIndirectCommandNV -> IO b -> IO b
pokeCStruct Ptr BindIndexBufferIndirectCommandNV
p BindIndexBufferIndirectCommandNV{Flags
DeviceAddress
IndexType
indexType :: IndexType
size :: Flags
bufferAddress :: DeviceAddress
$sel:indexType:BindIndexBufferIndirectCommandNV :: BindIndexBufferIndirectCommandNV -> IndexType
$sel:size:BindIndexBufferIndirectCommandNV :: BindIndexBufferIndirectCommandNV -> Flags
$sel:bufferAddress:BindIndexBufferIndirectCommandNV :: BindIndexBufferIndirectCommandNV -> DeviceAddress
..} IO b
f = do
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindIndexBufferIndirectCommandNV
p Ptr BindIndexBufferIndirectCommandNV -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceAddress)) (DeviceAddress
bufferAddress)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindIndexBufferIndirectCommandNV
p Ptr BindIndexBufferIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Flags
size)
Ptr IndexType -> IndexType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindIndexBufferIndirectCommandNV
p Ptr BindIndexBufferIndirectCommandNV -> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr IndexType)) (IndexType
indexType)
IO b
f
cStructSize :: Int
cStructSize = Int
16
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr BindIndexBufferIndirectCommandNV -> IO b -> IO b
pokeZeroCStruct Ptr BindIndexBufferIndirectCommandNV
p IO b
f = do
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindIndexBufferIndirectCommandNV
p Ptr BindIndexBufferIndirectCommandNV -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceAddress)) (DeviceAddress
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindIndexBufferIndirectCommandNV
p Ptr BindIndexBufferIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr IndexType -> IndexType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindIndexBufferIndirectCommandNV
p Ptr BindIndexBufferIndirectCommandNV -> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr IndexType)) (IndexType
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct BindIndexBufferIndirectCommandNV where
peekCStruct :: Ptr BindIndexBufferIndirectCommandNV
-> IO BindIndexBufferIndirectCommandNV
peekCStruct Ptr BindIndexBufferIndirectCommandNV
p = do
DeviceAddress
bufferAddress <- forall a. Storable a => Ptr a -> IO a
peek @DeviceAddress ((Ptr BindIndexBufferIndirectCommandNV
p Ptr BindIndexBufferIndirectCommandNV -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceAddress))
Flags
size <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr BindIndexBufferIndirectCommandNV
p Ptr BindIndexBufferIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32))
IndexType
indexType <- forall a. Storable a => Ptr a -> IO a
peek @IndexType ((Ptr BindIndexBufferIndirectCommandNV
p Ptr BindIndexBufferIndirectCommandNV -> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr IndexType))
BindIndexBufferIndirectCommandNV
-> IO BindIndexBufferIndirectCommandNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (BindIndexBufferIndirectCommandNV
-> IO BindIndexBufferIndirectCommandNV)
-> BindIndexBufferIndirectCommandNV
-> IO BindIndexBufferIndirectCommandNV
forall a b. (a -> b) -> a -> b
$ DeviceAddress
-> Flags -> IndexType -> BindIndexBufferIndirectCommandNV
BindIndexBufferIndirectCommandNV
DeviceAddress
bufferAddress Flags
size IndexType
indexType
instance Storable BindIndexBufferIndirectCommandNV where
sizeOf :: BindIndexBufferIndirectCommandNV -> Int
sizeOf ~BindIndexBufferIndirectCommandNV
_ = Int
16
alignment :: BindIndexBufferIndirectCommandNV -> Int
alignment ~BindIndexBufferIndirectCommandNV
_ = Int
8
peek :: Ptr BindIndexBufferIndirectCommandNV
-> IO BindIndexBufferIndirectCommandNV
peek = Ptr BindIndexBufferIndirectCommandNV
-> IO BindIndexBufferIndirectCommandNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr BindIndexBufferIndirectCommandNV
-> BindIndexBufferIndirectCommandNV -> IO ()
poke Ptr BindIndexBufferIndirectCommandNV
ptr BindIndexBufferIndirectCommandNV
poked = Ptr BindIndexBufferIndirectCommandNV
-> BindIndexBufferIndirectCommandNV -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BindIndexBufferIndirectCommandNV
ptr BindIndexBufferIndirectCommandNV
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero BindIndexBufferIndirectCommandNV where
zero :: BindIndexBufferIndirectCommandNV
zero = DeviceAddress
-> Flags -> IndexType -> BindIndexBufferIndirectCommandNV
BindIndexBufferIndirectCommandNV
DeviceAddress
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
IndexType
forall a. Zero a => a
zero
data BindVertexBufferIndirectCommandNV = BindVertexBufferIndirectCommandNV
{
BindVertexBufferIndirectCommandNV -> DeviceAddress
bufferAddress :: DeviceAddress
,
BindVertexBufferIndirectCommandNV -> Flags
size :: Word32
,
BindVertexBufferIndirectCommandNV -> Flags
stride :: Word32
}
deriving (Typeable, BindVertexBufferIndirectCommandNV
-> BindVertexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool
(BindVertexBufferIndirectCommandNV
-> BindVertexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool)
-> (BindVertexBufferIndirectCommandNV
-> BindVertexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool)
-> Eq BindVertexBufferIndirectCommandNV
forall a.
(a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool) -> Eq a
/= :: BindVertexBufferIndirectCommandNV
-> BindVertexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool
$c/= :: BindVertexBufferIndirectCommandNV
-> BindVertexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool
== :: BindVertexBufferIndirectCommandNV
-> BindVertexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool
$c== :: BindVertexBufferIndirectCommandNV
-> BindVertexBufferIndirectCommandNV -> "isPreprocessed" ::: Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (BindVertexBufferIndirectCommandNV)
#endif
deriving instance Show BindVertexBufferIndirectCommandNV
instance ToCStruct BindVertexBufferIndirectCommandNV where
withCStruct :: forall b.
BindVertexBufferIndirectCommandNV
-> (Ptr BindVertexBufferIndirectCommandNV -> IO b) -> IO b
withCStruct BindVertexBufferIndirectCommandNV
x Ptr BindVertexBufferIndirectCommandNV -> IO b
f = Int -> (Ptr BindVertexBufferIndirectCommandNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
16 ((Ptr BindVertexBufferIndirectCommandNV -> IO b) -> IO b)
-> (Ptr BindVertexBufferIndirectCommandNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr BindVertexBufferIndirectCommandNV
p -> Ptr BindVertexBufferIndirectCommandNV
-> BindVertexBufferIndirectCommandNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BindVertexBufferIndirectCommandNV
p BindVertexBufferIndirectCommandNV
x (Ptr BindVertexBufferIndirectCommandNV -> IO b
f Ptr BindVertexBufferIndirectCommandNV
p)
pokeCStruct :: forall b.
Ptr BindVertexBufferIndirectCommandNV
-> BindVertexBufferIndirectCommandNV -> IO b -> IO b
pokeCStruct Ptr BindVertexBufferIndirectCommandNV
p BindVertexBufferIndirectCommandNV{Flags
DeviceAddress
stride :: Flags
size :: Flags
bufferAddress :: DeviceAddress
$sel:stride:BindVertexBufferIndirectCommandNV :: BindVertexBufferIndirectCommandNV -> Flags
$sel:size:BindVertexBufferIndirectCommandNV :: BindVertexBufferIndirectCommandNV -> Flags
$sel:bufferAddress:BindVertexBufferIndirectCommandNV :: BindVertexBufferIndirectCommandNV -> DeviceAddress
..} IO b
f = do
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindVertexBufferIndirectCommandNV
p Ptr BindVertexBufferIndirectCommandNV -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceAddress)) (DeviceAddress
bufferAddress)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindVertexBufferIndirectCommandNV
p Ptr BindVertexBufferIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Flags
size)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindVertexBufferIndirectCommandNV
p Ptr BindVertexBufferIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (Flags
stride)
IO b
f
cStructSize :: Int
cStructSize = Int
16
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr BindVertexBufferIndirectCommandNV -> IO b -> IO b
pokeZeroCStruct Ptr BindVertexBufferIndirectCommandNV
p IO b
f = do
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindVertexBufferIndirectCommandNV
p Ptr BindVertexBufferIndirectCommandNV -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceAddress)) (DeviceAddress
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindVertexBufferIndirectCommandNV
p Ptr BindVertexBufferIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BindVertexBufferIndirectCommandNV
p Ptr BindVertexBufferIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct BindVertexBufferIndirectCommandNV where
peekCStruct :: Ptr BindVertexBufferIndirectCommandNV
-> IO BindVertexBufferIndirectCommandNV
peekCStruct Ptr BindVertexBufferIndirectCommandNV
p = do
DeviceAddress
bufferAddress <- forall a. Storable a => Ptr a -> IO a
peek @DeviceAddress ((Ptr BindVertexBufferIndirectCommandNV
p Ptr BindVertexBufferIndirectCommandNV -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr DeviceAddress))
Flags
size <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr BindVertexBufferIndirectCommandNV
p Ptr BindVertexBufferIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32))
Flags
stride <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr BindVertexBufferIndirectCommandNV
p Ptr BindVertexBufferIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32))
BindVertexBufferIndirectCommandNV
-> IO BindVertexBufferIndirectCommandNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (BindVertexBufferIndirectCommandNV
-> IO BindVertexBufferIndirectCommandNV)
-> BindVertexBufferIndirectCommandNV
-> IO BindVertexBufferIndirectCommandNV
forall a b. (a -> b) -> a -> b
$ DeviceAddress
-> Flags -> Flags -> BindVertexBufferIndirectCommandNV
BindVertexBufferIndirectCommandNV
DeviceAddress
bufferAddress Flags
size Flags
stride
instance Storable BindVertexBufferIndirectCommandNV where
sizeOf :: BindVertexBufferIndirectCommandNV -> Int
sizeOf ~BindVertexBufferIndirectCommandNV
_ = Int
16
alignment :: BindVertexBufferIndirectCommandNV -> Int
alignment ~BindVertexBufferIndirectCommandNV
_ = Int
8
peek :: Ptr BindVertexBufferIndirectCommandNV
-> IO BindVertexBufferIndirectCommandNV
peek = Ptr BindVertexBufferIndirectCommandNV
-> IO BindVertexBufferIndirectCommandNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr BindVertexBufferIndirectCommandNV
-> BindVertexBufferIndirectCommandNV -> IO ()
poke Ptr BindVertexBufferIndirectCommandNV
ptr BindVertexBufferIndirectCommandNV
poked = Ptr BindVertexBufferIndirectCommandNV
-> BindVertexBufferIndirectCommandNV -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BindVertexBufferIndirectCommandNV
ptr BindVertexBufferIndirectCommandNV
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero BindVertexBufferIndirectCommandNV where
zero :: BindVertexBufferIndirectCommandNV
zero = DeviceAddress
-> Flags -> Flags -> BindVertexBufferIndirectCommandNV
BindVertexBufferIndirectCommandNV
DeviceAddress
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
data SetStateFlagsIndirectCommandNV = SetStateFlagsIndirectCommandNV
{
SetStateFlagsIndirectCommandNV -> Flags
data' :: Word32 }
deriving (Typeable, SetStateFlagsIndirectCommandNV
-> SetStateFlagsIndirectCommandNV -> "isPreprocessed" ::: Bool
(SetStateFlagsIndirectCommandNV
-> SetStateFlagsIndirectCommandNV -> "isPreprocessed" ::: Bool)
-> (SetStateFlagsIndirectCommandNV
-> SetStateFlagsIndirectCommandNV -> "isPreprocessed" ::: Bool)
-> Eq SetStateFlagsIndirectCommandNV
forall a.
(a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool) -> Eq a
/= :: SetStateFlagsIndirectCommandNV
-> SetStateFlagsIndirectCommandNV -> "isPreprocessed" ::: Bool
$c/= :: SetStateFlagsIndirectCommandNV
-> SetStateFlagsIndirectCommandNV -> "isPreprocessed" ::: Bool
== :: SetStateFlagsIndirectCommandNV
-> SetStateFlagsIndirectCommandNV -> "isPreprocessed" ::: Bool
$c== :: SetStateFlagsIndirectCommandNV
-> SetStateFlagsIndirectCommandNV -> "isPreprocessed" ::: Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SetStateFlagsIndirectCommandNV)
#endif
deriving instance Show SetStateFlagsIndirectCommandNV
instance ToCStruct SetStateFlagsIndirectCommandNV where
withCStruct :: forall b.
SetStateFlagsIndirectCommandNV
-> (Ptr SetStateFlagsIndirectCommandNV -> IO b) -> IO b
withCStruct SetStateFlagsIndirectCommandNV
x Ptr SetStateFlagsIndirectCommandNV -> IO b
f = Int -> (Ptr SetStateFlagsIndirectCommandNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
4 ((Ptr SetStateFlagsIndirectCommandNV -> IO b) -> IO b)
-> (Ptr SetStateFlagsIndirectCommandNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr SetStateFlagsIndirectCommandNV
p -> Ptr SetStateFlagsIndirectCommandNV
-> SetStateFlagsIndirectCommandNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SetStateFlagsIndirectCommandNV
p SetStateFlagsIndirectCommandNV
x (Ptr SetStateFlagsIndirectCommandNV -> IO b
f Ptr SetStateFlagsIndirectCommandNV
p)
pokeCStruct :: forall b.
Ptr SetStateFlagsIndirectCommandNV
-> SetStateFlagsIndirectCommandNV -> IO b -> IO b
pokeCStruct Ptr SetStateFlagsIndirectCommandNV
p SetStateFlagsIndirectCommandNV{Flags
data' :: Flags
$sel:data':SetStateFlagsIndirectCommandNV :: SetStateFlagsIndirectCommandNV -> Flags
..} IO b
f = do
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SetStateFlagsIndirectCommandNV
p Ptr SetStateFlagsIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Flags
data')
IO b
f
cStructSize :: Int
cStructSize = Int
4
cStructAlignment :: Int
cStructAlignment = Int
4
pokeZeroCStruct :: forall b. Ptr SetStateFlagsIndirectCommandNV -> IO b -> IO b
pokeZeroCStruct Ptr SetStateFlagsIndirectCommandNV
p IO b
f = do
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SetStateFlagsIndirectCommandNV
p Ptr SetStateFlagsIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct SetStateFlagsIndirectCommandNV where
peekCStruct :: Ptr SetStateFlagsIndirectCommandNV
-> IO SetStateFlagsIndirectCommandNV
peekCStruct Ptr SetStateFlagsIndirectCommandNV
p = do
Flags
data' <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr SetStateFlagsIndirectCommandNV
p Ptr SetStateFlagsIndirectCommandNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
SetStateFlagsIndirectCommandNV -> IO SetStateFlagsIndirectCommandNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SetStateFlagsIndirectCommandNV
-> IO SetStateFlagsIndirectCommandNV)
-> SetStateFlagsIndirectCommandNV
-> IO SetStateFlagsIndirectCommandNV
forall a b. (a -> b) -> a -> b
$ Flags -> SetStateFlagsIndirectCommandNV
SetStateFlagsIndirectCommandNV
Flags
data'
instance Storable SetStateFlagsIndirectCommandNV where
sizeOf :: SetStateFlagsIndirectCommandNV -> Int
sizeOf ~SetStateFlagsIndirectCommandNV
_ = Int
4
alignment :: SetStateFlagsIndirectCommandNV -> Int
alignment ~SetStateFlagsIndirectCommandNV
_ = Int
4
peek :: Ptr SetStateFlagsIndirectCommandNV
-> IO SetStateFlagsIndirectCommandNV
peek = Ptr SetStateFlagsIndirectCommandNV
-> IO SetStateFlagsIndirectCommandNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr SetStateFlagsIndirectCommandNV
-> SetStateFlagsIndirectCommandNV -> IO ()
poke Ptr SetStateFlagsIndirectCommandNV
ptr SetStateFlagsIndirectCommandNV
poked = Ptr SetStateFlagsIndirectCommandNV
-> SetStateFlagsIndirectCommandNV -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SetStateFlagsIndirectCommandNV
ptr SetStateFlagsIndirectCommandNV
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero SetStateFlagsIndirectCommandNV where
zero :: SetStateFlagsIndirectCommandNV
zero = Flags -> SetStateFlagsIndirectCommandNV
SetStateFlagsIndirectCommandNV
Flags
forall a. Zero a => a
zero
data IndirectCommandsStreamNV = IndirectCommandsStreamNV
{
IndirectCommandsStreamNV -> Buffer
buffer :: Buffer
,
IndirectCommandsStreamNV -> DeviceAddress
offset :: DeviceSize
}
deriving (Typeable, IndirectCommandsStreamNV
-> IndirectCommandsStreamNV -> "isPreprocessed" ::: Bool
(IndirectCommandsStreamNV
-> IndirectCommandsStreamNV -> "isPreprocessed" ::: Bool)
-> (IndirectCommandsStreamNV
-> IndirectCommandsStreamNV -> "isPreprocessed" ::: Bool)
-> Eq IndirectCommandsStreamNV
forall a.
(a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool) -> Eq a
/= :: IndirectCommandsStreamNV
-> IndirectCommandsStreamNV -> "isPreprocessed" ::: Bool
$c/= :: IndirectCommandsStreamNV
-> IndirectCommandsStreamNV -> "isPreprocessed" ::: Bool
== :: IndirectCommandsStreamNV
-> IndirectCommandsStreamNV -> "isPreprocessed" ::: Bool
$c== :: IndirectCommandsStreamNV
-> IndirectCommandsStreamNV -> "isPreprocessed" ::: Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (IndirectCommandsStreamNV)
#endif
deriving instance Show IndirectCommandsStreamNV
instance ToCStruct IndirectCommandsStreamNV where
withCStruct :: forall b.
IndirectCommandsStreamNV
-> (Ptr IndirectCommandsStreamNV -> IO b) -> IO b
withCStruct IndirectCommandsStreamNV
x Ptr IndirectCommandsStreamNV -> IO b
f = Int -> (Ptr IndirectCommandsStreamNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
16 ((Ptr IndirectCommandsStreamNV -> IO b) -> IO b)
-> (Ptr IndirectCommandsStreamNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr IndirectCommandsStreamNV
p -> Ptr IndirectCommandsStreamNV
-> IndirectCommandsStreamNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr IndirectCommandsStreamNV
p IndirectCommandsStreamNV
x (Ptr IndirectCommandsStreamNV -> IO b
f Ptr IndirectCommandsStreamNV
p)
pokeCStruct :: forall b.
Ptr IndirectCommandsStreamNV
-> IndirectCommandsStreamNV -> IO b -> IO b
pokeCStruct Ptr IndirectCommandsStreamNV
p IndirectCommandsStreamNV{DeviceAddress
Buffer
offset :: DeviceAddress
buffer :: Buffer
$sel:offset:IndirectCommandsStreamNV :: IndirectCommandsStreamNV -> DeviceAddress
$sel:buffer:IndirectCommandsStreamNV :: IndirectCommandsStreamNV -> Buffer
..} IO b
f = do
Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsStreamNV
p Ptr IndirectCommandsStreamNV -> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Buffer)) (Buffer
buffer)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsStreamNV
p Ptr IndirectCommandsStreamNV -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr DeviceSize)) (DeviceAddress
offset)
IO b
f
cStructSize :: Int
cStructSize = Int
16
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr IndirectCommandsStreamNV -> IO b -> IO b
pokeZeroCStruct Ptr IndirectCommandsStreamNV
p IO b
f = do
Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsStreamNV
p Ptr IndirectCommandsStreamNV -> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Buffer)) (Buffer
forall a. Zero a => a
zero)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsStreamNV
p Ptr IndirectCommandsStreamNV -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr DeviceSize)) (DeviceAddress
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct IndirectCommandsStreamNV where
peekCStruct :: Ptr IndirectCommandsStreamNV -> IO IndirectCommandsStreamNV
peekCStruct Ptr IndirectCommandsStreamNV
p = do
Buffer
buffer <- forall a. Storable a => Ptr a -> IO a
peek @Buffer ((Ptr IndirectCommandsStreamNV
p Ptr IndirectCommandsStreamNV -> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Buffer))
DeviceAddress
offset <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr IndirectCommandsStreamNV
p Ptr IndirectCommandsStreamNV -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr DeviceSize))
IndirectCommandsStreamNV -> IO IndirectCommandsStreamNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (IndirectCommandsStreamNV -> IO IndirectCommandsStreamNV)
-> IndirectCommandsStreamNV -> IO IndirectCommandsStreamNV
forall a b. (a -> b) -> a -> b
$ Buffer -> DeviceAddress -> IndirectCommandsStreamNV
IndirectCommandsStreamNV
Buffer
buffer DeviceAddress
offset
instance Storable IndirectCommandsStreamNV where
sizeOf :: IndirectCommandsStreamNV -> Int
sizeOf ~IndirectCommandsStreamNV
_ = Int
16
alignment :: IndirectCommandsStreamNV -> Int
alignment ~IndirectCommandsStreamNV
_ = Int
8
peek :: Ptr IndirectCommandsStreamNV -> IO IndirectCommandsStreamNV
peek = Ptr IndirectCommandsStreamNV -> IO IndirectCommandsStreamNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr IndirectCommandsStreamNV -> IndirectCommandsStreamNV -> IO ()
poke Ptr IndirectCommandsStreamNV
ptr IndirectCommandsStreamNV
poked = Ptr IndirectCommandsStreamNV
-> IndirectCommandsStreamNV -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr IndirectCommandsStreamNV
ptr IndirectCommandsStreamNV
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero IndirectCommandsStreamNV where
zero :: IndirectCommandsStreamNV
zero = Buffer -> DeviceAddress -> IndirectCommandsStreamNV
IndirectCommandsStreamNV
Buffer
forall a. Zero a => a
zero
DeviceAddress
forall a. Zero a => a
zero
data IndirectCommandsLayoutTokenNV = IndirectCommandsLayoutTokenNV
{
IndirectCommandsLayoutTokenNV -> IndirectCommandsTokenTypeNV
tokenType :: IndirectCommandsTokenTypeNV
,
IndirectCommandsLayoutTokenNV -> Flags
stream :: Word32
,
IndirectCommandsLayoutTokenNV -> Flags
offset :: Word32
,
IndirectCommandsLayoutTokenNV -> Flags
vertexBindingUnit :: Word32
,
IndirectCommandsLayoutTokenNV -> "isPreprocessed" ::: Bool
vertexDynamicStride :: Bool
,
IndirectCommandsLayoutTokenNV -> PipelineLayout
pushconstantPipelineLayout :: PipelineLayout
,
IndirectCommandsLayoutTokenNV -> ShaderStageFlags
pushconstantShaderStageFlags :: ShaderStageFlags
,
IndirectCommandsLayoutTokenNV -> Flags
pushconstantOffset :: Word32
,
IndirectCommandsLayoutTokenNV -> Flags
pushconstantSize :: Word32
,
IndirectCommandsLayoutTokenNV -> IndirectStateFlagBitsNV
indirectStateFlags :: IndirectStateFlagsNV
,
IndirectCommandsLayoutTokenNV -> Vector IndexType
indexTypes :: Vector IndexType
,
IndirectCommandsLayoutTokenNV -> Vector Flags
indexTypeValues :: Vector Word32
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (IndirectCommandsLayoutTokenNV)
#endif
deriving instance Show IndirectCommandsLayoutTokenNV
instance ToCStruct IndirectCommandsLayoutTokenNV where
withCStruct :: forall b.
IndirectCommandsLayoutTokenNV
-> (Ptr IndirectCommandsLayoutTokenNV -> IO b) -> IO b
withCStruct IndirectCommandsLayoutTokenNV
x Ptr IndirectCommandsLayoutTokenNV -> IO b
f = Int -> (Ptr IndirectCommandsLayoutTokenNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
88 ((Ptr IndirectCommandsLayoutTokenNV -> IO b) -> IO b)
-> (Ptr IndirectCommandsLayoutTokenNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr IndirectCommandsLayoutTokenNV
p -> Ptr IndirectCommandsLayoutTokenNV
-> IndirectCommandsLayoutTokenNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr IndirectCommandsLayoutTokenNV
p IndirectCommandsLayoutTokenNV
x (Ptr IndirectCommandsLayoutTokenNV -> IO b
f Ptr IndirectCommandsLayoutTokenNV
p)
pokeCStruct :: forall b.
Ptr IndirectCommandsLayoutTokenNV
-> IndirectCommandsLayoutTokenNV -> IO b -> IO b
pokeCStruct Ptr IndirectCommandsLayoutTokenNV
p IndirectCommandsLayoutTokenNV{"isPreprocessed" ::: Bool
Flags
Vector Flags
Vector IndexType
ShaderStageFlags
PipelineLayout
IndirectCommandsTokenTypeNV
IndirectStateFlagBitsNV
indexTypeValues :: Vector Flags
indexTypes :: Vector IndexType
indirectStateFlags :: IndirectStateFlagBitsNV
pushconstantSize :: Flags
pushconstantOffset :: Flags
pushconstantShaderStageFlags :: ShaderStageFlags
pushconstantPipelineLayout :: PipelineLayout
vertexDynamicStride :: "isPreprocessed" ::: Bool
vertexBindingUnit :: Flags
offset :: Flags
stream :: Flags
tokenType :: IndirectCommandsTokenTypeNV
$sel:indexTypeValues:IndirectCommandsLayoutTokenNV :: IndirectCommandsLayoutTokenNV -> Vector Flags
$sel:indexTypes:IndirectCommandsLayoutTokenNV :: IndirectCommandsLayoutTokenNV -> Vector IndexType
$sel:indirectStateFlags:IndirectCommandsLayoutTokenNV :: IndirectCommandsLayoutTokenNV -> IndirectStateFlagBitsNV
$sel:pushconstantSize:IndirectCommandsLayoutTokenNV :: IndirectCommandsLayoutTokenNV -> Flags
$sel:pushconstantOffset:IndirectCommandsLayoutTokenNV :: IndirectCommandsLayoutTokenNV -> Flags
$sel:pushconstantShaderStageFlags:IndirectCommandsLayoutTokenNV :: IndirectCommandsLayoutTokenNV -> ShaderStageFlags
$sel:pushconstantPipelineLayout:IndirectCommandsLayoutTokenNV :: IndirectCommandsLayoutTokenNV -> PipelineLayout
$sel:vertexDynamicStride:IndirectCommandsLayoutTokenNV :: IndirectCommandsLayoutTokenNV -> "isPreprocessed" ::: Bool
$sel:vertexBindingUnit:IndirectCommandsLayoutTokenNV :: IndirectCommandsLayoutTokenNV -> Flags
$sel:offset:IndirectCommandsLayoutTokenNV :: IndirectCommandsLayoutTokenNV -> Flags
$sel:stream:IndirectCommandsLayoutTokenNV :: IndirectCommandsLayoutTokenNV -> Flags
$sel:tokenType:IndirectCommandsLayoutTokenNV :: IndirectCommandsLayoutTokenNV -> IndirectCommandsTokenTypeNV
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV
-> Int -> Ptr IndirectCommandsTokenTypeNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr IndirectCommandsTokenTypeNV)) (IndirectCommandsTokenTypeNV
tokenType)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Flags
stream)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Flags
offset)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Flags
vertexBindingUnit)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("isPreprocessed" ::: Bool32)
-> ("isPreprocessed" ::: Bool32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV
-> Int -> Ptr ("isPreprocessed" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (("isPreprocessed" ::: Bool) -> "isPreprocessed" ::: Bool32
boolToBool32 ("isPreprocessed" ::: Bool
vertexDynamicStride))
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr PipelineLayout -> PipelineLayout -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr PipelineLayout
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr PipelineLayout)) (PipelineLayout
pushconstantPipelineLayout)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ShaderStageFlags -> ShaderStageFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr ShaderStageFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr ShaderStageFlags)) (ShaderStageFlags
pushconstantShaderStageFlags)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (Flags
pushconstantOffset)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Flags
pushconstantSize)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV
-> Int -> Ptr IndirectStateFlagBitsNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr IndirectStateFlagsNV)) (IndirectStateFlagBitsNV
indirectStateFlags)
let pIndexTypesLength :: Int
pIndexTypesLength = Vector IndexType -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector IndexType -> Int) -> Vector IndexType -> Int
forall a b. (a -> b) -> a -> b
$ (Vector IndexType
indexTypes)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("isPreprocessed" ::: Bool) -> IO () -> IO ()
forall (f :: * -> *).
Applicative f =>
("isPreprocessed" ::: Bool) -> f () -> f ()
unless ((Vector Flags -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Flags -> Int) -> Vector Flags -> Int
forall a b. (a -> b) -> a -> b
$ (Vector Flags
indexTypeValues)) Int -> Int -> "isPreprocessed" ::: Bool
forall a. Eq a => a -> a -> "isPreprocessed" ::: Bool
== Int
pIndexTypesLength) (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 String
"" String
"pIndexTypeValues and pIndexTypes must have the same length" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Word32)) ((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pIndexTypesLength :: Word32))
Ptr IndexType
pPIndexTypes' <- ((Ptr IndexType -> IO b) -> IO b) -> ContT b IO (Ptr IndexType)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr IndexType -> IO b) -> IO b) -> ContT b IO (Ptr IndexType))
-> ((Ptr IndexType -> IO b) -> IO b) -> ContT b IO (Ptr IndexType)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @IndexType ((Vector IndexType -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector IndexType
indexTypes)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
4)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> IndexType -> IO ()) -> Vector IndexType -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i IndexType
e -> Ptr IndexType -> IndexType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr IndexType
pPIndexTypes' Ptr IndexType -> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr IndexType) (IndexType
e)) (Vector IndexType
indexTypes)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr IndexType) -> Ptr IndexType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr (Ptr IndexType)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr (Ptr IndexType))) (Ptr IndexType
pPIndexTypes')
Ptr Flags
pPIndexTypeValues' <- ((Ptr Flags -> IO b) -> IO b) -> ContT b IO (Ptr Flags)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Flags -> IO b) -> IO b) -> ContT b IO (Ptr Flags))
-> ((Ptr Flags -> IO b) -> IO b) -> ContT b IO (Ptr Flags)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Word32 ((Vector Flags -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Flags
indexTypeValues)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
4)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Flags -> IO ()) -> Vector Flags -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Flags
e -> Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Flags
pPIndexTypeValues' Ptr Flags -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Flags
e)) (Vector Flags
indexTypeValues)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Flags) -> Ptr Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr (Ptr Flags)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr (Ptr Word32))) (Ptr Flags
pPIndexTypeValues')
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
88
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr IndirectCommandsLayoutTokenNV -> IO b -> IO b
pokeZeroCStruct Ptr IndirectCommandsLayoutTokenNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV
-> Int -> Ptr IndirectCommandsTokenTypeNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr IndirectCommandsTokenTypeNV)) (IndirectCommandsTokenTypeNV
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr ("isPreprocessed" ::: Bool32)
-> ("isPreprocessed" ::: Bool32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV
-> Int -> Ptr ("isPreprocessed" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (("isPreprocessed" ::: Bool) -> "isPreprocessed" ::: Bool32
boolToBool32 ("isPreprocessed" ::: Bool
forall a. Zero a => a
zero))
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct IndirectCommandsLayoutTokenNV where
peekCStruct :: Ptr IndirectCommandsLayoutTokenNV
-> IO IndirectCommandsLayoutTokenNV
peekCStruct Ptr IndirectCommandsLayoutTokenNV
p = do
IndirectCommandsTokenTypeNV
tokenType <- forall a. Storable a => Ptr a -> IO a
peek @IndirectCommandsTokenTypeNV ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV
-> Int -> Ptr IndirectCommandsTokenTypeNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr IndirectCommandsTokenTypeNV))
Flags
stream <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
Flags
offset <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
Flags
vertexBindingUnit <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32))
"isPreprocessed" ::: Bool32
vertexDynamicStride <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV
-> Int -> Ptr ("isPreprocessed" ::: Bool32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32))
PipelineLayout
pushconstantPipelineLayout <- forall a. Storable a => Ptr a -> IO a
peek @PipelineLayout ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr PipelineLayout
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr PipelineLayout))
ShaderStageFlags
pushconstantShaderStageFlags <- forall a. Storable a => Ptr a -> IO a
peek @ShaderStageFlags ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr ShaderStageFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr ShaderStageFlags))
Flags
pushconstantOffset <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32))
Flags
pushconstantSize <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32))
IndirectStateFlagBitsNV
indirectStateFlags <- forall a. Storable a => Ptr a -> IO a
peek @IndirectStateFlagsNV ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV
-> Int -> Ptr IndirectStateFlagBitsNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr IndirectStateFlagsNV))
Flags
indexTypeCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Word32))
Ptr IndexType
pIndexTypes <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr IndexType) ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr (Ptr IndexType)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr (Ptr IndexType)))
Vector IndexType
pIndexTypes' <- Int -> (Int -> IO IndexType) -> IO (Vector IndexType)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
indexTypeCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @IndexType ((Ptr IndexType
pIndexTypes Ptr IndexType -> Int -> Ptr IndexType
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr IndexType)))
Ptr Flags
pIndexTypeValues <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) ((Ptr IndirectCommandsLayoutTokenNV
p Ptr IndirectCommandsLayoutTokenNV -> Int -> Ptr (Ptr Flags)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr (Ptr Word32)))
Vector Flags
pIndexTypeValues' <- Int -> (Int -> IO Flags) -> IO (Vector Flags)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
indexTypeCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr Flags
pIndexTypeValues Ptr Flags -> Int -> Ptr Flags
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
IndirectCommandsLayoutTokenNV -> IO IndirectCommandsLayoutTokenNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (IndirectCommandsLayoutTokenNV -> IO IndirectCommandsLayoutTokenNV)
-> IndirectCommandsLayoutTokenNV
-> IO IndirectCommandsLayoutTokenNV
forall a b. (a -> b) -> a -> b
$ IndirectCommandsTokenTypeNV
-> Flags
-> Flags
-> Flags
-> ("isPreprocessed" ::: Bool)
-> PipelineLayout
-> ShaderStageFlags
-> Flags
-> Flags
-> IndirectStateFlagBitsNV
-> Vector IndexType
-> Vector Flags
-> IndirectCommandsLayoutTokenNV
IndirectCommandsLayoutTokenNV
IndirectCommandsTokenTypeNV
tokenType
Flags
stream
Flags
offset
Flags
vertexBindingUnit
(("isPreprocessed" ::: Bool32) -> "isPreprocessed" ::: Bool
bool32ToBool "isPreprocessed" ::: Bool32
vertexDynamicStride)
PipelineLayout
pushconstantPipelineLayout
ShaderStageFlags
pushconstantShaderStageFlags
Flags
pushconstantOffset
Flags
pushconstantSize
IndirectStateFlagBitsNV
indirectStateFlags
Vector IndexType
pIndexTypes'
Vector Flags
pIndexTypeValues'
instance Zero IndirectCommandsLayoutTokenNV where
zero :: IndirectCommandsLayoutTokenNV
zero = IndirectCommandsTokenTypeNV
-> Flags
-> Flags
-> Flags
-> ("isPreprocessed" ::: Bool)
-> PipelineLayout
-> ShaderStageFlags
-> Flags
-> Flags
-> IndirectStateFlagBitsNV
-> Vector IndexType
-> Vector Flags
-> IndirectCommandsLayoutTokenNV
IndirectCommandsLayoutTokenNV
IndirectCommandsTokenTypeNV
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
"isPreprocessed" ::: Bool
forall a. Zero a => a
zero
PipelineLayout
forall a. Zero a => a
zero
ShaderStageFlags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
IndirectStateFlagBitsNV
forall a. Zero a => a
zero
Vector IndexType
forall a. Monoid a => a
mempty
Vector Flags
forall a. Monoid a => a
mempty
data IndirectCommandsLayoutCreateInfoNV = IndirectCommandsLayoutCreateInfoNV
{
IndirectCommandsLayoutCreateInfoNV
-> IndirectCommandsLayoutUsageFlagBitsNV
flags :: IndirectCommandsLayoutUsageFlagsNV
,
IndirectCommandsLayoutCreateInfoNV -> PipelineBindPoint
pipelineBindPoint :: PipelineBindPoint
,
IndirectCommandsLayoutCreateInfoNV
-> Vector IndirectCommandsLayoutTokenNV
tokens :: Vector IndirectCommandsLayoutTokenNV
,
IndirectCommandsLayoutCreateInfoNV -> Vector Flags
streamStrides :: Vector Word32
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (IndirectCommandsLayoutCreateInfoNV)
#endif
deriving instance Show IndirectCommandsLayoutCreateInfoNV
instance ToCStruct IndirectCommandsLayoutCreateInfoNV where
withCStruct :: forall b.
IndirectCommandsLayoutCreateInfoNV
-> (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> IO b)
-> IO b
withCStruct IndirectCommandsLayoutCreateInfoNV
x ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV) -> IO b
f = Int
-> (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
56 ((("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> IO b)
-> IO b)
-> (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \"pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p -> ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> IndirectCommandsLayoutCreateInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p IndirectCommandsLayoutCreateInfoNV
x (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV) -> IO b
f "pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p)
pokeCStruct :: forall b.
("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> IndirectCommandsLayoutCreateInfoNV -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p IndirectCommandsLayoutCreateInfoNV{Vector Flags
Vector IndirectCommandsLayoutTokenNV
PipelineBindPoint
IndirectCommandsLayoutUsageFlagBitsNV
streamStrides :: Vector Flags
tokens :: Vector IndirectCommandsLayoutTokenNV
pipelineBindPoint :: PipelineBindPoint
flags :: IndirectCommandsLayoutUsageFlagBitsNV
$sel:streamStrides:IndirectCommandsLayoutCreateInfoNV :: IndirectCommandsLayoutCreateInfoNV -> Vector Flags
$sel:tokens:IndirectCommandsLayoutCreateInfoNV :: IndirectCommandsLayoutCreateInfoNV
-> Vector IndirectCommandsLayoutTokenNV
$sel:pipelineBindPoint:IndirectCommandsLayoutCreateInfoNV :: IndirectCommandsLayoutCreateInfoNV -> PipelineBindPoint
$sel:flags:IndirectCommandsLayoutCreateInfoNV :: IndirectCommandsLayoutCreateInfoNV
-> IndirectCommandsLayoutUsageFlagBitsNV
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr IndirectCommandsLayoutUsageFlagBitsNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr IndirectCommandsLayoutUsageFlagsNV)) (IndirectCommandsLayoutUsageFlagBitsNV
flags)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr PipelineBindPoint -> PipelineBindPoint -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr PipelineBindPoint
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr PipelineBindPoint)) (PipelineBindPoint
pipelineBindPoint)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) ((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector IndirectCommandsLayoutTokenNV -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector IndirectCommandsLayoutTokenNV -> Int)
-> Vector IndirectCommandsLayoutTokenNV -> Int
forall a b. (a -> b) -> a -> b
$ (Vector IndirectCommandsLayoutTokenNV
tokens)) :: Word32))
Ptr IndirectCommandsLayoutTokenNV
pPTokens' <- ((Ptr IndirectCommandsLayoutTokenNV -> IO b) -> IO b)
-> ContT b IO (Ptr IndirectCommandsLayoutTokenNV)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr IndirectCommandsLayoutTokenNV -> IO b) -> IO b)
-> ContT b IO (Ptr IndirectCommandsLayoutTokenNV))
-> ((Ptr IndirectCommandsLayoutTokenNV -> IO b) -> IO b)
-> ContT b IO (Ptr IndirectCommandsLayoutTokenNV)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @IndirectCommandsLayoutTokenNV ((Vector IndirectCommandsLayoutTokenNV -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector IndirectCommandsLayoutTokenNV
tokens)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
88)
(Int -> IndirectCommandsLayoutTokenNV -> ContT b IO ())
-> Vector IndirectCommandsLayoutTokenNV -> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i IndirectCommandsLayoutTokenNV
e -> ((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr IndirectCommandsLayoutTokenNV
-> IndirectCommandsLayoutTokenNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (Ptr IndirectCommandsLayoutTokenNV
pPTokens' Ptr IndirectCommandsLayoutTokenNV
-> Int -> Ptr IndirectCommandsLayoutTokenNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
88 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr IndirectCommandsLayoutTokenNV) (IndirectCommandsLayoutTokenNV
e) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())) (Vector IndirectCommandsLayoutTokenNV
tokens)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr IndirectCommandsLayoutTokenNV)
-> Ptr IndirectCommandsLayoutTokenNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr (Ptr IndirectCommandsLayoutTokenNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr IndirectCommandsLayoutTokenNV))) (Ptr IndirectCommandsLayoutTokenNV
pPTokens')
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) ((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector Flags -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Flags -> Int) -> Vector Flags -> Int
forall a b. (a -> b) -> a -> b
$ (Vector Flags
streamStrides)) :: Word32))
Ptr Flags
pPStreamStrides' <- ((Ptr Flags -> IO b) -> IO b) -> ContT b IO (Ptr Flags)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Flags -> IO b) -> IO b) -> ContT b IO (Ptr Flags))
-> ((Ptr Flags -> IO b) -> IO b) -> ContT b IO (Ptr Flags)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Word32 ((Vector Flags -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Flags
streamStrides)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
4)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Flags -> IO ()) -> Vector Flags -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Flags
e -> Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Flags
pPStreamStrides' Ptr Flags -> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Flags
e)) (Vector Flags
streamStrides)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Flags) -> Ptr Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr (Ptr Flags)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr (Ptr Word32))) (Ptr Flags
pPStreamStrides')
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
56
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> IO b -> IO b
pokeZeroCStruct "pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr PipelineBindPoint -> PipelineBindPoint -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr PipelineBindPoint
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr PipelineBindPoint)) (PipelineBindPoint
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct IndirectCommandsLayoutCreateInfoNV where
peekCStruct :: ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> IO IndirectCommandsLayoutCreateInfoNV
peekCStruct "pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p = do
IndirectCommandsLayoutUsageFlagBitsNV
flags <- forall a. Storable a => Ptr a -> IO a
peek @IndirectCommandsLayoutUsageFlagsNV (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr IndirectCommandsLayoutUsageFlagBitsNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr IndirectCommandsLayoutUsageFlagsNV))
PipelineBindPoint
pipelineBindPoint <- forall a. Storable a => Ptr a -> IO a
peek @PipelineBindPoint (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr PipelineBindPoint
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr PipelineBindPoint))
Flags
tokenCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
Ptr IndirectCommandsLayoutTokenNV
pTokens <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr IndirectCommandsLayoutTokenNV) (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr (Ptr IndirectCommandsLayoutTokenNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr IndirectCommandsLayoutTokenNV)))
Vector IndirectCommandsLayoutTokenNV
pTokens' <- Int
-> (Int -> IO IndirectCommandsLayoutTokenNV)
-> IO (Vector IndirectCommandsLayoutTokenNV)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
tokenCount) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @IndirectCommandsLayoutTokenNV ((Ptr IndirectCommandsLayoutTokenNV
pTokens Ptr IndirectCommandsLayoutTokenNV
-> Int -> Ptr IndirectCommandsLayoutTokenNV
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
88 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr IndirectCommandsLayoutTokenNV)))
Flags
streamCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32))
Ptr Flags
pStreamStrides <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) (("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV
p ("pCreateInfo" ::: Ptr IndirectCommandsLayoutCreateInfoNV)
-> Int -> Ptr (Ptr Flags)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr (Ptr Word32)))
Vector Flags
pStreamStrides' <- Int -> (Int -> IO Flags) -> IO (Vector Flags)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
streamCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr Flags
pStreamStrides Ptr Flags -> Int -> Ptr Flags
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
IndirectCommandsLayoutCreateInfoNV
-> IO IndirectCommandsLayoutCreateInfoNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (IndirectCommandsLayoutCreateInfoNV
-> IO IndirectCommandsLayoutCreateInfoNV)
-> IndirectCommandsLayoutCreateInfoNV
-> IO IndirectCommandsLayoutCreateInfoNV
forall a b. (a -> b) -> a -> b
$ IndirectCommandsLayoutUsageFlagBitsNV
-> PipelineBindPoint
-> Vector IndirectCommandsLayoutTokenNV
-> Vector Flags
-> IndirectCommandsLayoutCreateInfoNV
IndirectCommandsLayoutCreateInfoNV
IndirectCommandsLayoutUsageFlagBitsNV
flags PipelineBindPoint
pipelineBindPoint Vector IndirectCommandsLayoutTokenNV
pTokens' Vector Flags
pStreamStrides'
instance Zero IndirectCommandsLayoutCreateInfoNV where
zero :: IndirectCommandsLayoutCreateInfoNV
zero = IndirectCommandsLayoutUsageFlagBitsNV
-> PipelineBindPoint
-> Vector IndirectCommandsLayoutTokenNV
-> Vector Flags
-> IndirectCommandsLayoutCreateInfoNV
IndirectCommandsLayoutCreateInfoNV
IndirectCommandsLayoutUsageFlagBitsNV
forall a. Zero a => a
zero
PipelineBindPoint
forall a. Zero a => a
zero
Vector IndirectCommandsLayoutTokenNV
forall a. Monoid a => a
mempty
Vector Flags
forall a. Monoid a => a
mempty
data GeneratedCommandsInfoNV = GeneratedCommandsInfoNV
{
GeneratedCommandsInfoNV -> PipelineBindPoint
pipelineBindPoint :: PipelineBindPoint
,
GeneratedCommandsInfoNV -> Pipeline
pipeline :: Pipeline
,
GeneratedCommandsInfoNV -> IndirectCommandsLayoutNV
indirectCommandsLayout :: IndirectCommandsLayoutNV
,
GeneratedCommandsInfoNV -> Vector IndirectCommandsStreamNV
streams :: Vector IndirectCommandsStreamNV
,
GeneratedCommandsInfoNV -> Flags
sequencesCount :: Word32
,
GeneratedCommandsInfoNV -> Buffer
preprocessBuffer :: Buffer
,
GeneratedCommandsInfoNV -> DeviceAddress
preprocessOffset :: DeviceSize
,
GeneratedCommandsInfoNV -> DeviceAddress
preprocessSize :: DeviceSize
,
GeneratedCommandsInfoNV -> Buffer
sequencesCountBuffer :: Buffer
,
GeneratedCommandsInfoNV -> DeviceAddress
sequencesCountOffset :: DeviceSize
,
GeneratedCommandsInfoNV -> Buffer
sequencesIndexBuffer :: Buffer
,
GeneratedCommandsInfoNV -> DeviceAddress
sequencesIndexOffset :: DeviceSize
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (GeneratedCommandsInfoNV)
#endif
deriving instance Show GeneratedCommandsInfoNV
instance ToCStruct GeneratedCommandsInfoNV where
withCStruct :: forall b.
GeneratedCommandsInfoNV
-> (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO b)
-> IO b
withCStruct GeneratedCommandsInfoNV
x ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV) -> IO b
f = Int
-> (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
120 ((("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO b)
-> IO b)
-> (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \"pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p -> ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> GeneratedCommandsInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p GeneratedCommandsInfoNV
x (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV) -> IO b
f "pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p)
pokeCStruct :: forall b.
("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> GeneratedCommandsInfoNV -> IO b -> IO b
pokeCStruct "pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p GeneratedCommandsInfoNV{Flags
DeviceAddress
Vector IndirectCommandsStreamNV
PipelineBindPoint
Pipeline
Buffer
IndirectCommandsLayoutNV
sequencesIndexOffset :: DeviceAddress
sequencesIndexBuffer :: Buffer
sequencesCountOffset :: DeviceAddress
sequencesCountBuffer :: Buffer
preprocessSize :: DeviceAddress
preprocessOffset :: DeviceAddress
preprocessBuffer :: Buffer
sequencesCount :: Flags
streams :: Vector IndirectCommandsStreamNV
indirectCommandsLayout :: IndirectCommandsLayoutNV
pipeline :: Pipeline
pipelineBindPoint :: PipelineBindPoint
$sel:sequencesIndexOffset:GeneratedCommandsInfoNV :: GeneratedCommandsInfoNV -> DeviceAddress
$sel:sequencesIndexBuffer:GeneratedCommandsInfoNV :: GeneratedCommandsInfoNV -> Buffer
$sel:sequencesCountOffset:GeneratedCommandsInfoNV :: GeneratedCommandsInfoNV -> DeviceAddress
$sel:sequencesCountBuffer:GeneratedCommandsInfoNV :: GeneratedCommandsInfoNV -> Buffer
$sel:preprocessSize:GeneratedCommandsInfoNV :: GeneratedCommandsInfoNV -> DeviceAddress
$sel:preprocessOffset:GeneratedCommandsInfoNV :: GeneratedCommandsInfoNV -> DeviceAddress
$sel:preprocessBuffer:GeneratedCommandsInfoNV :: GeneratedCommandsInfoNV -> Buffer
$sel:sequencesCount:GeneratedCommandsInfoNV :: GeneratedCommandsInfoNV -> Flags
$sel:streams:GeneratedCommandsInfoNV :: GeneratedCommandsInfoNV -> Vector IndirectCommandsStreamNV
$sel:indirectCommandsLayout:GeneratedCommandsInfoNV :: GeneratedCommandsInfoNV -> IndirectCommandsLayoutNV
$sel:pipeline:GeneratedCommandsInfoNV :: GeneratedCommandsInfoNV -> Pipeline
$sel:pipelineBindPoint:GeneratedCommandsInfoNV :: GeneratedCommandsInfoNV -> PipelineBindPoint
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr PipelineBindPoint -> PipelineBindPoint -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr PipelineBindPoint
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineBindPoint)) (PipelineBindPoint
pipelineBindPoint)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Pipeline -> Pipeline -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Pipeline)) (Pipeline
pipeline)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IndirectCommandsLayoutNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int
-> "pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr IndirectCommandsLayoutNV)) (IndirectCommandsLayoutNV
indirectCommandsLayout)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) ((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector IndirectCommandsStreamNV -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector IndirectCommandsStreamNV -> Int)
-> Vector IndirectCommandsStreamNV -> Int
forall a b. (a -> b) -> a -> b
$ (Vector IndirectCommandsStreamNV
streams)) :: Word32))
Ptr IndirectCommandsStreamNV
pPStreams' <- ((Ptr IndirectCommandsStreamNV -> IO b) -> IO b)
-> ContT b IO (Ptr IndirectCommandsStreamNV)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr IndirectCommandsStreamNV -> IO b) -> IO b)
-> ContT b IO (Ptr IndirectCommandsStreamNV))
-> ((Ptr IndirectCommandsStreamNV -> IO b) -> IO b)
-> ContT b IO (Ptr IndirectCommandsStreamNV)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @IndirectCommandsStreamNV ((Vector IndirectCommandsStreamNV -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector IndirectCommandsStreamNV
streams)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
16)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> IndirectCommandsStreamNV -> IO ())
-> Vector IndirectCommandsStreamNV -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i IndirectCommandsStreamNV
e -> Ptr IndirectCommandsStreamNV -> IndirectCommandsStreamNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr IndirectCommandsStreamNV
pPStreams' Ptr IndirectCommandsStreamNV -> Int -> Ptr IndirectCommandsStreamNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
16 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr IndirectCommandsStreamNV) (IndirectCommandsStreamNV
e)) (Vector IndirectCommandsStreamNV
streams)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr IndirectCommandsStreamNV)
-> Ptr IndirectCommandsStreamNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr (Ptr IndirectCommandsStreamNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr (Ptr IndirectCommandsStreamNV))) (Ptr IndirectCommandsStreamNV
pPStreams')
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Flags
sequencesCount)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Buffer)) (Buffer
preprocessBuffer)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr DeviceSize)) (DeviceAddress
preprocessOffset)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr DeviceSize)) (DeviceAddress
preprocessSize)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Buffer)) (Buffer
sequencesCountBuffer)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr DeviceSize)) (DeviceAddress
sequencesCountOffset)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr Buffer)) (Buffer
sequencesIndexBuffer)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr DeviceSize)) (DeviceAddress
sequencesIndexOffset)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
120
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO b -> IO b
pokeZeroCStruct "pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr PipelineBindPoint -> PipelineBindPoint -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr PipelineBindPoint
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineBindPoint)) (PipelineBindPoint
forall a. Zero a => a
zero)
Ptr Pipeline -> Pipeline -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Pipeline)) (Pipeline
forall a. Zero a => a
zero)
("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IndirectCommandsLayoutNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int
-> "pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr IndirectCommandsLayoutNV)) (IndirectCommandsLayoutNV
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Buffer)) (Buffer
forall a. Zero a => a
zero)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr DeviceSize)) (DeviceAddress
forall a. Zero a => a
zero)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr DeviceSize)) (DeviceAddress
forall a. Zero a => a
zero)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr DeviceSize)) (DeviceAddress
forall a. Zero a => a
zero)
Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr DeviceSize)) (DeviceAddress
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct GeneratedCommandsInfoNV where
peekCStruct :: ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> IO GeneratedCommandsInfoNV
peekCStruct "pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p = do
PipelineBindPoint
pipelineBindPoint <- forall a. Storable a => Ptr a -> IO a
peek @PipelineBindPoint (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr PipelineBindPoint
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineBindPoint))
Pipeline
pipeline <- forall a. Storable a => Ptr a -> IO a
peek @Pipeline (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Pipeline))
IndirectCommandsLayoutNV
indirectCommandsLayout <- forall a. Storable a => Ptr a -> IO a
peek @IndirectCommandsLayoutNV (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int
-> "pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr IndirectCommandsLayoutNV))
Flags
streamCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32))
Ptr IndirectCommandsStreamNV
pStreams <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr IndirectCommandsStreamNV) (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr (Ptr IndirectCommandsStreamNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr (Ptr IndirectCommandsStreamNV)))
Vector IndirectCommandsStreamNV
pStreams' <- Int
-> (Int -> IO IndirectCommandsStreamNV)
-> IO (Vector IndirectCommandsStreamNV)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
streamCount) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @IndirectCommandsStreamNV ((Ptr IndirectCommandsStreamNV
pStreams Ptr IndirectCommandsStreamNV -> Int -> Ptr IndirectCommandsStreamNV
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
16 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr IndirectCommandsStreamNV)))
Flags
sequencesCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32))
Buffer
preprocessBuffer <- forall a. Storable a => Ptr a -> IO a
peek @Buffer (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Buffer))
DeviceAddress
preprocessOffset <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr DeviceSize))
DeviceAddress
preprocessSize <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr DeviceSize))
Buffer
sequencesCountBuffer <- forall a. Storable a => Ptr a -> IO a
peek @Buffer (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Buffer))
DeviceAddress
sequencesCountOffset <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr DeviceSize))
Buffer
sequencesIndexBuffer <- forall a. Storable a => Ptr a -> IO a
peek @Buffer (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr Buffer))
DeviceAddress
sequencesIndexOffset <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV
p ("pGeneratedCommandsInfo" ::: Ptr GeneratedCommandsInfoNV)
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr DeviceSize))
GeneratedCommandsInfoNV -> IO GeneratedCommandsInfoNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GeneratedCommandsInfoNV -> IO GeneratedCommandsInfoNV)
-> GeneratedCommandsInfoNV -> IO GeneratedCommandsInfoNV
forall a b. (a -> b) -> a -> b
$ PipelineBindPoint
-> Pipeline
-> IndirectCommandsLayoutNV
-> Vector IndirectCommandsStreamNV
-> Flags
-> Buffer
-> DeviceAddress
-> DeviceAddress
-> Buffer
-> DeviceAddress
-> Buffer
-> DeviceAddress
-> GeneratedCommandsInfoNV
GeneratedCommandsInfoNV
PipelineBindPoint
pipelineBindPoint
Pipeline
pipeline
IndirectCommandsLayoutNV
indirectCommandsLayout
Vector IndirectCommandsStreamNV
pStreams'
Flags
sequencesCount
Buffer
preprocessBuffer
DeviceAddress
preprocessOffset
DeviceAddress
preprocessSize
Buffer
sequencesCountBuffer
DeviceAddress
sequencesCountOffset
Buffer
sequencesIndexBuffer
DeviceAddress
sequencesIndexOffset
instance Zero GeneratedCommandsInfoNV where
zero :: GeneratedCommandsInfoNV
zero = PipelineBindPoint
-> Pipeline
-> IndirectCommandsLayoutNV
-> Vector IndirectCommandsStreamNV
-> Flags
-> Buffer
-> DeviceAddress
-> DeviceAddress
-> Buffer
-> DeviceAddress
-> Buffer
-> DeviceAddress
-> GeneratedCommandsInfoNV
GeneratedCommandsInfoNV
PipelineBindPoint
forall a. Zero a => a
zero
Pipeline
forall a. Zero a => a
zero
IndirectCommandsLayoutNV
forall a. Zero a => a
zero
Vector IndirectCommandsStreamNV
forall a. Monoid a => a
mempty
Flags
forall a. Zero a => a
zero
Buffer
forall a. Zero a => a
zero
DeviceAddress
forall a. Zero a => a
zero
DeviceAddress
forall a. Zero a => a
zero
Buffer
forall a. Zero a => a
zero
DeviceAddress
forall a. Zero a => a
zero
Buffer
forall a. Zero a => a
zero
DeviceAddress
forall a. Zero a => a
zero
data GeneratedCommandsMemoryRequirementsInfoNV = GeneratedCommandsMemoryRequirementsInfoNV
{
GeneratedCommandsMemoryRequirementsInfoNV -> PipelineBindPoint
pipelineBindPoint :: PipelineBindPoint
,
GeneratedCommandsMemoryRequirementsInfoNV -> Pipeline
pipeline :: Pipeline
,
GeneratedCommandsMemoryRequirementsInfoNV
-> IndirectCommandsLayoutNV
indirectCommandsLayout :: IndirectCommandsLayoutNV
,
GeneratedCommandsMemoryRequirementsInfoNV -> Flags
maxSequencesCount :: Word32
}
deriving (Typeable, GeneratedCommandsMemoryRequirementsInfoNV
-> GeneratedCommandsMemoryRequirementsInfoNV
-> "isPreprocessed" ::: Bool
(GeneratedCommandsMemoryRequirementsInfoNV
-> GeneratedCommandsMemoryRequirementsInfoNV
-> "isPreprocessed" ::: Bool)
-> (GeneratedCommandsMemoryRequirementsInfoNV
-> GeneratedCommandsMemoryRequirementsInfoNV
-> "isPreprocessed" ::: Bool)
-> Eq GeneratedCommandsMemoryRequirementsInfoNV
forall a.
(a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool) -> Eq a
/= :: GeneratedCommandsMemoryRequirementsInfoNV
-> GeneratedCommandsMemoryRequirementsInfoNV
-> "isPreprocessed" ::: Bool
$c/= :: GeneratedCommandsMemoryRequirementsInfoNV
-> GeneratedCommandsMemoryRequirementsInfoNV
-> "isPreprocessed" ::: Bool
== :: GeneratedCommandsMemoryRequirementsInfoNV
-> GeneratedCommandsMemoryRequirementsInfoNV
-> "isPreprocessed" ::: Bool
$c== :: GeneratedCommandsMemoryRequirementsInfoNV
-> GeneratedCommandsMemoryRequirementsInfoNV
-> "isPreprocessed" ::: Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (GeneratedCommandsMemoryRequirementsInfoNV)
#endif
deriving instance Show GeneratedCommandsMemoryRequirementsInfoNV
instance ToCStruct GeneratedCommandsMemoryRequirementsInfoNV where
withCStruct :: forall b.
GeneratedCommandsMemoryRequirementsInfoNV
-> (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> IO b)
-> IO b
withCStruct GeneratedCommandsMemoryRequirementsInfoNV
x ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV) -> IO b
f = Int
-> (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 ((("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> IO b)
-> IO b)
-> (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p -> ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> GeneratedCommandsMemoryRequirementsInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p GeneratedCommandsMemoryRequirementsInfoNV
x (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV) -> IO b
f "pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p)
pokeCStruct :: forall b.
("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> GeneratedCommandsMemoryRequirementsInfoNV -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p GeneratedCommandsMemoryRequirementsInfoNV{Flags
PipelineBindPoint
Pipeline
IndirectCommandsLayoutNV
maxSequencesCount :: Flags
indirectCommandsLayout :: IndirectCommandsLayoutNV
pipeline :: Pipeline
pipelineBindPoint :: PipelineBindPoint
$sel:maxSequencesCount:GeneratedCommandsMemoryRequirementsInfoNV :: GeneratedCommandsMemoryRequirementsInfoNV -> Flags
$sel:indirectCommandsLayout:GeneratedCommandsMemoryRequirementsInfoNV :: GeneratedCommandsMemoryRequirementsInfoNV
-> IndirectCommandsLayoutNV
$sel:pipeline:GeneratedCommandsMemoryRequirementsInfoNV :: GeneratedCommandsMemoryRequirementsInfoNV -> Pipeline
$sel:pipelineBindPoint:GeneratedCommandsMemoryRequirementsInfoNV :: GeneratedCommandsMemoryRequirementsInfoNV -> PipelineBindPoint
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr PipelineBindPoint -> PipelineBindPoint -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int -> Ptr PipelineBindPoint
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineBindPoint)) (PipelineBindPoint
pipelineBindPoint)
Ptr Pipeline -> Pipeline -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int -> Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Pipeline)) (Pipeline
pipeline)
("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IndirectCommandsLayoutNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int
-> "pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr IndirectCommandsLayoutNV)) (IndirectCommandsLayoutNV
indirectCommandsLayout)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Flags
maxSequencesCount)
IO b
f
cStructSize :: Int
cStructSize = Int
48
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr PipelineBindPoint -> PipelineBindPoint -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int -> Ptr PipelineBindPoint
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineBindPoint)) (PipelineBindPoint
forall a. Zero a => a
zero)
Ptr Pipeline -> Pipeline -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int -> Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Pipeline)) (Pipeline
forall a. Zero a => a
zero)
("pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV)
-> IndirectCommandsLayoutNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int
-> "pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr IndirectCommandsLayoutNV)) (IndirectCommandsLayoutNV
forall a. Zero a => a
zero)
Ptr Flags -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct GeneratedCommandsMemoryRequirementsInfoNV where
peekCStruct :: ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> IO GeneratedCommandsMemoryRequirementsInfoNV
peekCStruct "pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p = do
PipelineBindPoint
pipelineBindPoint <- forall a. Storable a => Ptr a -> IO a
peek @PipelineBindPoint (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int -> Ptr PipelineBindPoint
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineBindPoint))
Pipeline
pipeline <- forall a. Storable a => Ptr a -> IO a
peek @Pipeline (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int -> Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Pipeline))
IndirectCommandsLayoutNV
indirectCommandsLayout <- forall a. Storable a => Ptr a -> IO a
peek @IndirectCommandsLayoutNV (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int
-> "pIndirectCommandsLayout" ::: Ptr IndirectCommandsLayoutNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr IndirectCommandsLayoutNV))
Flags
maxSequencesCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> Int -> Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32))
GeneratedCommandsMemoryRequirementsInfoNV
-> IO GeneratedCommandsMemoryRequirementsInfoNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GeneratedCommandsMemoryRequirementsInfoNV
-> IO GeneratedCommandsMemoryRequirementsInfoNV)
-> GeneratedCommandsMemoryRequirementsInfoNV
-> IO GeneratedCommandsMemoryRequirementsInfoNV
forall a b. (a -> b) -> a -> b
$ PipelineBindPoint
-> Pipeline
-> IndirectCommandsLayoutNV
-> Flags
-> GeneratedCommandsMemoryRequirementsInfoNV
GeneratedCommandsMemoryRequirementsInfoNV
PipelineBindPoint
pipelineBindPoint Pipeline
pipeline IndirectCommandsLayoutNV
indirectCommandsLayout Flags
maxSequencesCount
instance Storable GeneratedCommandsMemoryRequirementsInfoNV where
sizeOf :: GeneratedCommandsMemoryRequirementsInfoNV -> Int
sizeOf ~GeneratedCommandsMemoryRequirementsInfoNV
_ = Int
48
alignment :: GeneratedCommandsMemoryRequirementsInfoNV -> Int
alignment ~GeneratedCommandsMemoryRequirementsInfoNV
_ = Int
8
peek :: ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> IO GeneratedCommandsMemoryRequirementsInfoNV
peek = ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> IO GeneratedCommandsMemoryRequirementsInfoNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> GeneratedCommandsMemoryRequirementsInfoNV -> IO ()
poke "pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
ptr GeneratedCommandsMemoryRequirementsInfoNV
poked = ("pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV)
-> GeneratedCommandsMemoryRequirementsInfoNV -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr GeneratedCommandsMemoryRequirementsInfoNV
ptr GeneratedCommandsMemoryRequirementsInfoNV
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero GeneratedCommandsMemoryRequirementsInfoNV where
zero :: GeneratedCommandsMemoryRequirementsInfoNV
zero = PipelineBindPoint
-> Pipeline
-> IndirectCommandsLayoutNV
-> Flags
-> GeneratedCommandsMemoryRequirementsInfoNV
GeneratedCommandsMemoryRequirementsInfoNV
PipelineBindPoint
forall a. Zero a => a
zero
Pipeline
forall a. Zero a => a
zero
IndirectCommandsLayoutNV
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
type IndirectCommandsLayoutUsageFlagsNV = IndirectCommandsLayoutUsageFlagBitsNV
newtype IndirectCommandsLayoutUsageFlagBitsNV = IndirectCommandsLayoutUsageFlagBitsNV Flags
deriving newtype (IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
(IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool)
-> Eq IndirectCommandsLayoutUsageFlagBitsNV
forall a.
(a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool) -> Eq a
/= :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
$c/= :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
== :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
$c== :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
Eq, Eq IndirectCommandsLayoutUsageFlagBitsNV
Eq IndirectCommandsLayoutUsageFlagBitsNV
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV -> Ordering)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV)
-> Ord IndirectCommandsLayoutUsageFlagBitsNV
IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV -> Ordering
IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
$cmin :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
max :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
$cmax :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
>= :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
$c>= :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
> :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
$c> :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
<= :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
$c<= :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
< :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
$c< :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool
compare :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV -> Ordering
$ccompare :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV -> Ordering
Ord, Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> IO IndirectCommandsLayoutUsageFlagBitsNV
Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IO IndirectCommandsLayoutUsageFlagBitsNV
Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV -> IO ()
Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV -> IO ()
IndirectCommandsLayoutUsageFlagBitsNV -> Int
(IndirectCommandsLayoutUsageFlagBitsNV -> Int)
-> (IndirectCommandsLayoutUsageFlagBitsNV -> Int)
-> (Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IO IndirectCommandsLayoutUsageFlagBitsNV)
-> (Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV -> IO ())
-> (forall b.
Ptr b -> Int -> IO IndirectCommandsLayoutUsageFlagBitsNV)
-> (forall b.
Ptr b -> Int -> IndirectCommandsLayoutUsageFlagBitsNV -> IO ())
-> (Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> IO IndirectCommandsLayoutUsageFlagBitsNV)
-> (Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV -> IO ())
-> Storable IndirectCommandsLayoutUsageFlagBitsNV
forall b. Ptr b -> Int -> IO IndirectCommandsLayoutUsageFlagBitsNV
forall b.
Ptr b -> Int -> IndirectCommandsLayoutUsageFlagBitsNV -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV -> IO ()
$cpoke :: Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV -> IO ()
peek :: Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> IO IndirectCommandsLayoutUsageFlagBitsNV
$cpeek :: Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> IO IndirectCommandsLayoutUsageFlagBitsNV
pokeByteOff :: forall b.
Ptr b -> Int -> IndirectCommandsLayoutUsageFlagBitsNV -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> IndirectCommandsLayoutUsageFlagBitsNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO IndirectCommandsLayoutUsageFlagBitsNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO IndirectCommandsLayoutUsageFlagBitsNV
pokeElemOff :: Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV -> IO ()
$cpokeElemOff :: Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV -> IO ()
peekElemOff :: Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IO IndirectCommandsLayoutUsageFlagBitsNV
$cpeekElemOff :: Ptr IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IO IndirectCommandsLayoutUsageFlagBitsNV
alignment :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
$calignment :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
sizeOf :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
$csizeOf :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
Storable, IndirectCommandsLayoutUsageFlagBitsNV
IndirectCommandsLayoutUsageFlagBitsNV
-> Zero IndirectCommandsLayoutUsageFlagBitsNV
forall a. a -> Zero a
zero :: IndirectCommandsLayoutUsageFlagBitsNV
$czero :: IndirectCommandsLayoutUsageFlagBitsNV
Zero, Eq IndirectCommandsLayoutUsageFlagBitsNV
IndirectCommandsLayoutUsageFlagBitsNV
Eq IndirectCommandsLayoutUsageFlagBitsNV
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV)
-> IndirectCommandsLayoutUsageFlagBitsNV
-> (Int -> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> "isPreprocessed" ::: Bool)
-> (IndirectCommandsLayoutUsageFlagBitsNV -> Maybe Int)
-> (IndirectCommandsLayoutUsageFlagBitsNV -> Int)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> "isPreprocessed" ::: Bool)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV)
-> (IndirectCommandsLayoutUsageFlagBitsNV -> Int)
-> Bits IndirectCommandsLayoutUsageFlagBitsNV
Int -> IndirectCommandsLayoutUsageFlagBitsNV
IndirectCommandsLayoutUsageFlagBitsNV -> "isPreprocessed" ::: Bool
IndirectCommandsLayoutUsageFlagBitsNV -> Int
IndirectCommandsLayoutUsageFlagBitsNV -> Maybe Int
IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> "isPreprocessed" ::: Bool
IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> "isPreprocessed" ::: Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> "isPreprocessed" ::: Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
$cpopCount :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
rotateR :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
$crotateR :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
rotateL :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
$crotateL :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
unsafeShiftR :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
$cunsafeShiftR :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
shiftR :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
$cshiftR :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
unsafeShiftL :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
$cunsafeShiftL :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
shiftL :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
$cshiftL :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
isSigned :: IndirectCommandsLayoutUsageFlagBitsNV -> "isPreprocessed" ::: Bool
$cisSigned :: IndirectCommandsLayoutUsageFlagBitsNV -> "isPreprocessed" ::: Bool
bitSize :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
$cbitSize :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
bitSizeMaybe :: IndirectCommandsLayoutUsageFlagBitsNV -> Maybe Int
$cbitSizeMaybe :: IndirectCommandsLayoutUsageFlagBitsNV -> Maybe Int
testBit :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> "isPreprocessed" ::: Bool
$ctestBit :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> "isPreprocessed" ::: Bool
complementBit :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
$ccomplementBit :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
clearBit :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
$cclearBit :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
setBit :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
$csetBit :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
bit :: Int -> IndirectCommandsLayoutUsageFlagBitsNV
$cbit :: Int -> IndirectCommandsLayoutUsageFlagBitsNV
zeroBits :: IndirectCommandsLayoutUsageFlagBitsNV
$czeroBits :: IndirectCommandsLayoutUsageFlagBitsNV
rotate :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
$crotate :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
shift :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
$cshift :: IndirectCommandsLayoutUsageFlagBitsNV
-> Int -> IndirectCommandsLayoutUsageFlagBitsNV
complement :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
$ccomplement :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
xor :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
$cxor :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
.|. :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
$c.|. :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
.&. :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
$c.&. :: IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
-> IndirectCommandsLayoutUsageFlagBitsNV
Bits, Bits IndirectCommandsLayoutUsageFlagBitsNV
Bits IndirectCommandsLayoutUsageFlagBitsNV
-> (IndirectCommandsLayoutUsageFlagBitsNV -> Int)
-> (IndirectCommandsLayoutUsageFlagBitsNV -> Int)
-> (IndirectCommandsLayoutUsageFlagBitsNV -> Int)
-> FiniteBits IndirectCommandsLayoutUsageFlagBitsNV
IndirectCommandsLayoutUsageFlagBitsNV -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
$ccountTrailingZeros :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
countLeadingZeros :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
$ccountLeadingZeros :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
finiteBitSize :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
$cfiniteBitSize :: IndirectCommandsLayoutUsageFlagBitsNV -> Int
FiniteBits)
pattern $bINDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV :: IndirectCommandsLayoutUsageFlagBitsNV
$mINDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV :: forall {r}.
IndirectCommandsLayoutUsageFlagBitsNV
-> (Void# -> r) -> (Void# -> r) -> r
INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV = IndirectCommandsLayoutUsageFlagBitsNV 0x00000001
pattern $bINDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV :: IndirectCommandsLayoutUsageFlagBitsNV
$mINDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV :: forall {r}.
IndirectCommandsLayoutUsageFlagBitsNV
-> (Void# -> r) -> (Void# -> r) -> r
INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV = IndirectCommandsLayoutUsageFlagBitsNV 0x00000002
pattern $bINDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV :: IndirectCommandsLayoutUsageFlagBitsNV
$mINDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV :: forall {r}.
IndirectCommandsLayoutUsageFlagBitsNV
-> (Void# -> r) -> (Void# -> r) -> r
INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV = IndirectCommandsLayoutUsageFlagBitsNV 0x00000004
conNameIndirectCommandsLayoutUsageFlagBitsNV :: String
conNameIndirectCommandsLayoutUsageFlagBitsNV :: String
conNameIndirectCommandsLayoutUsageFlagBitsNV = String
"IndirectCommandsLayoutUsageFlagBitsNV"
enumPrefixIndirectCommandsLayoutUsageFlagBitsNV :: String
enumPrefixIndirectCommandsLayoutUsageFlagBitsNV :: String
enumPrefixIndirectCommandsLayoutUsageFlagBitsNV = String
"INDIRECT_COMMANDS_LAYOUT_USAGE_"
showTableIndirectCommandsLayoutUsageFlagBitsNV :: [(IndirectCommandsLayoutUsageFlagBitsNV, String)]
showTableIndirectCommandsLayoutUsageFlagBitsNV :: [(IndirectCommandsLayoutUsageFlagBitsNV, String)]
showTableIndirectCommandsLayoutUsageFlagBitsNV =
[
( IndirectCommandsLayoutUsageFlagBitsNV
INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV
, String
"EXPLICIT_PREPROCESS_BIT_NV"
)
,
( IndirectCommandsLayoutUsageFlagBitsNV
INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV
, String
"INDEXED_SEQUENCES_BIT_NV"
)
,
( IndirectCommandsLayoutUsageFlagBitsNV
INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV
, String
"UNORDERED_SEQUENCES_BIT_NV"
)
]
instance Show IndirectCommandsLayoutUsageFlagBitsNV where
showsPrec :: Int -> IndirectCommandsLayoutUsageFlagBitsNV -> ShowS
showsPrec =
String
-> [(IndirectCommandsLayoutUsageFlagBitsNV, String)]
-> String
-> (IndirectCommandsLayoutUsageFlagBitsNV -> Flags)
-> (Flags -> ShowS)
-> Int
-> IndirectCommandsLayoutUsageFlagBitsNV
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixIndirectCommandsLayoutUsageFlagBitsNV
[(IndirectCommandsLayoutUsageFlagBitsNV, String)]
showTableIndirectCommandsLayoutUsageFlagBitsNV
String
conNameIndirectCommandsLayoutUsageFlagBitsNV
(\(IndirectCommandsLayoutUsageFlagBitsNV Flags
x) -> Flags
x)
(\Flags
x -> String -> ShowS
showString String
"0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)
instance Read IndirectCommandsLayoutUsageFlagBitsNV where
readPrec :: ReadPrec IndirectCommandsLayoutUsageFlagBitsNV
readPrec =
String
-> [(IndirectCommandsLayoutUsageFlagBitsNV, String)]
-> String
-> (Flags -> IndirectCommandsLayoutUsageFlagBitsNV)
-> ReadPrec IndirectCommandsLayoutUsageFlagBitsNV
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixIndirectCommandsLayoutUsageFlagBitsNV
[(IndirectCommandsLayoutUsageFlagBitsNV, String)]
showTableIndirectCommandsLayoutUsageFlagBitsNV
String
conNameIndirectCommandsLayoutUsageFlagBitsNV
Flags -> IndirectCommandsLayoutUsageFlagBitsNV
IndirectCommandsLayoutUsageFlagBitsNV
type IndirectStateFlagsNV = IndirectStateFlagBitsNV
newtype IndirectStateFlagBitsNV = IndirectStateFlagBitsNV Flags
deriving newtype (IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
(IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool)
-> (IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool)
-> Eq IndirectStateFlagBitsNV
forall a.
(a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool) -> Eq a
/= :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
$c/= :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
== :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
$c== :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
Eq, Eq IndirectStateFlagBitsNV
Eq IndirectStateFlagBitsNV
-> (IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV -> Ordering)
-> (IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool)
-> (IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool)
-> (IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool)
-> (IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool)
-> (IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV)
-> Ord IndirectStateFlagBitsNV
IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV -> Ordering
IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
$cmin :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
max :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
$cmax :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
>= :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
$c>= :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
> :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
$c> :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
<= :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
$c<= :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
< :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
$c< :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
compare :: IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV -> Ordering
$ccompare :: IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV -> Ordering
Ord, Ptr IndirectStateFlagBitsNV -> IO IndirectStateFlagBitsNV
Ptr IndirectStateFlagBitsNV -> Int -> IO IndirectStateFlagBitsNV
Ptr IndirectStateFlagBitsNV
-> Int -> IndirectStateFlagBitsNV -> IO ()
Ptr IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV -> IO ()
IndirectStateFlagBitsNV -> Int
(IndirectStateFlagBitsNV -> Int)
-> (IndirectStateFlagBitsNV -> Int)
-> (Ptr IndirectStateFlagBitsNV
-> Int -> IO IndirectStateFlagBitsNV)
-> (Ptr IndirectStateFlagBitsNV
-> Int -> IndirectStateFlagBitsNV -> IO ())
-> (forall b. Ptr b -> Int -> IO IndirectStateFlagBitsNV)
-> (forall b. Ptr b -> Int -> IndirectStateFlagBitsNV -> IO ())
-> (Ptr IndirectStateFlagBitsNV -> IO IndirectStateFlagBitsNV)
-> (Ptr IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IO ())
-> Storable IndirectStateFlagBitsNV
forall b. Ptr b -> Int -> IO IndirectStateFlagBitsNV
forall b. Ptr b -> Int -> IndirectStateFlagBitsNV -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV -> IO ()
$cpoke :: Ptr IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV -> IO ()
peek :: Ptr IndirectStateFlagBitsNV -> IO IndirectStateFlagBitsNV
$cpeek :: Ptr IndirectStateFlagBitsNV -> IO IndirectStateFlagBitsNV
pokeByteOff :: forall b. Ptr b -> Int -> IndirectStateFlagBitsNV -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> IndirectStateFlagBitsNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO IndirectStateFlagBitsNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO IndirectStateFlagBitsNV
pokeElemOff :: Ptr IndirectStateFlagBitsNV
-> Int -> IndirectStateFlagBitsNV -> IO ()
$cpokeElemOff :: Ptr IndirectStateFlagBitsNV
-> Int -> IndirectStateFlagBitsNV -> IO ()
peekElemOff :: Ptr IndirectStateFlagBitsNV -> Int -> IO IndirectStateFlagBitsNV
$cpeekElemOff :: Ptr IndirectStateFlagBitsNV -> Int -> IO IndirectStateFlagBitsNV
alignment :: IndirectStateFlagBitsNV -> Int
$calignment :: IndirectStateFlagBitsNV -> Int
sizeOf :: IndirectStateFlagBitsNV -> Int
$csizeOf :: IndirectStateFlagBitsNV -> Int
Storable, IndirectStateFlagBitsNV
IndirectStateFlagBitsNV -> Zero IndirectStateFlagBitsNV
forall a. a -> Zero a
zero :: IndirectStateFlagBitsNV
$czero :: IndirectStateFlagBitsNV
Zero, Eq IndirectStateFlagBitsNV
IndirectStateFlagBitsNV
Eq IndirectStateFlagBitsNV
-> (IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV)
-> IndirectStateFlagBitsNV
-> (Int -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV -> Int -> "isPreprocessed" ::: Bool)
-> (IndirectStateFlagBitsNV -> Maybe Int)
-> (IndirectStateFlagBitsNV -> Int)
-> (IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool)
-> (IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV)
-> (IndirectStateFlagBitsNV -> Int)
-> Bits IndirectStateFlagBitsNV
Int -> IndirectStateFlagBitsNV
IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
IndirectStateFlagBitsNV -> Int
IndirectStateFlagBitsNV -> Maybe Int
IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
IndirectStateFlagBitsNV -> Int -> "isPreprocessed" ::: Bool
IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> "isPreprocessed" ::: Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> "isPreprocessed" ::: Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: IndirectStateFlagBitsNV -> Int
$cpopCount :: IndirectStateFlagBitsNV -> Int
rotateR :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
$crotateR :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
rotateL :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
$crotateL :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
unsafeShiftR :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
$cunsafeShiftR :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
shiftR :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
$cshiftR :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
unsafeShiftL :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
$cunsafeShiftL :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
shiftL :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
$cshiftL :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
isSigned :: IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
$cisSigned :: IndirectStateFlagBitsNV -> "isPreprocessed" ::: Bool
bitSize :: IndirectStateFlagBitsNV -> Int
$cbitSize :: IndirectStateFlagBitsNV -> Int
bitSizeMaybe :: IndirectStateFlagBitsNV -> Maybe Int
$cbitSizeMaybe :: IndirectStateFlagBitsNV -> Maybe Int
testBit :: IndirectStateFlagBitsNV -> Int -> "isPreprocessed" ::: Bool
$ctestBit :: IndirectStateFlagBitsNV -> Int -> "isPreprocessed" ::: Bool
complementBit :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
$ccomplementBit :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
clearBit :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
$cclearBit :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
setBit :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
$csetBit :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
bit :: Int -> IndirectStateFlagBitsNV
$cbit :: Int -> IndirectStateFlagBitsNV
zeroBits :: IndirectStateFlagBitsNV
$czeroBits :: IndirectStateFlagBitsNV
rotate :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
$crotate :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
shift :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
$cshift :: IndirectStateFlagBitsNV -> Int -> IndirectStateFlagBitsNV
complement :: IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
$ccomplement :: IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
xor :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
$cxor :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
.|. :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
$c.|. :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
.&. :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
$c.&. :: IndirectStateFlagBitsNV
-> IndirectStateFlagBitsNV -> IndirectStateFlagBitsNV
Bits, Bits IndirectStateFlagBitsNV
Bits IndirectStateFlagBitsNV
-> (IndirectStateFlagBitsNV -> Int)
-> (IndirectStateFlagBitsNV -> Int)
-> (IndirectStateFlagBitsNV -> Int)
-> FiniteBits IndirectStateFlagBitsNV
IndirectStateFlagBitsNV -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: IndirectStateFlagBitsNV -> Int
$ccountTrailingZeros :: IndirectStateFlagBitsNV -> Int
countLeadingZeros :: IndirectStateFlagBitsNV -> Int
$ccountLeadingZeros :: IndirectStateFlagBitsNV -> Int
finiteBitSize :: IndirectStateFlagBitsNV -> Int
$cfiniteBitSize :: IndirectStateFlagBitsNV -> Int
FiniteBits)
pattern $bINDIRECT_STATE_FLAG_FRONTFACE_BIT_NV :: IndirectStateFlagBitsNV
$mINDIRECT_STATE_FLAG_FRONTFACE_BIT_NV :: forall {r}.
IndirectStateFlagBitsNV -> (Void# -> r) -> (Void# -> r) -> r
INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV = IndirectStateFlagBitsNV 0x00000001
conNameIndirectStateFlagBitsNV :: String
conNameIndirectStateFlagBitsNV :: String
conNameIndirectStateFlagBitsNV = String
"IndirectStateFlagBitsNV"
enumPrefixIndirectStateFlagBitsNV :: String
enumPrefixIndirectStateFlagBitsNV :: String
enumPrefixIndirectStateFlagBitsNV = String
"INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV"
showTableIndirectStateFlagBitsNV :: [(IndirectStateFlagBitsNV, String)]
showTableIndirectStateFlagBitsNV :: [(IndirectStateFlagBitsNV, String)]
showTableIndirectStateFlagBitsNV = [(IndirectStateFlagBitsNV
INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV, String
"")]
instance Show IndirectStateFlagBitsNV where
showsPrec :: Int -> IndirectStateFlagBitsNV -> ShowS
showsPrec =
String
-> [(IndirectStateFlagBitsNV, String)]
-> String
-> (IndirectStateFlagBitsNV -> Flags)
-> (Flags -> ShowS)
-> Int
-> IndirectStateFlagBitsNV
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixIndirectStateFlagBitsNV
[(IndirectStateFlagBitsNV, String)]
showTableIndirectStateFlagBitsNV
String
conNameIndirectStateFlagBitsNV
(\(IndirectStateFlagBitsNV Flags
x) -> Flags
x)
(\Flags
x -> String -> ShowS
showString String
"0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)
instance Read IndirectStateFlagBitsNV where
readPrec :: ReadPrec IndirectStateFlagBitsNV
readPrec =
String
-> [(IndirectStateFlagBitsNV, String)]
-> String
-> (Flags -> IndirectStateFlagBitsNV)
-> ReadPrec IndirectStateFlagBitsNV
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixIndirectStateFlagBitsNV
[(IndirectStateFlagBitsNV, String)]
showTableIndirectStateFlagBitsNV
String
conNameIndirectStateFlagBitsNV
Flags -> IndirectStateFlagBitsNV
IndirectStateFlagBitsNV
newtype IndirectCommandsTokenTypeNV = IndirectCommandsTokenTypeNV Int32
deriving newtype (IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
(IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool)
-> (IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool)
-> Eq IndirectCommandsTokenTypeNV
forall a.
(a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool) -> Eq a
/= :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
$c/= :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
== :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
$c== :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
Eq, Eq IndirectCommandsTokenTypeNV
Eq IndirectCommandsTokenTypeNV
-> (IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> Ordering)
-> (IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool)
-> (IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool)
-> (IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool)
-> (IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool)
-> (IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> IndirectCommandsTokenTypeNV)
-> (IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> IndirectCommandsTokenTypeNV)
-> Ord IndirectCommandsTokenTypeNV
IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> Ordering
IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> IndirectCommandsTokenTypeNV
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> "isPreprocessed" ::: Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> IndirectCommandsTokenTypeNV
$cmin :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> IndirectCommandsTokenTypeNV
max :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> IndirectCommandsTokenTypeNV
$cmax :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> IndirectCommandsTokenTypeNV
>= :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
$c>= :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
> :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
$c> :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
<= :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
$c<= :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
< :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
$c< :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> "isPreprocessed" ::: Bool
compare :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> Ordering
$ccompare :: IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> Ordering
Ord, Ptr IndirectCommandsTokenTypeNV -> IO IndirectCommandsTokenTypeNV
Ptr IndirectCommandsTokenTypeNV
-> Int -> IO IndirectCommandsTokenTypeNV
Ptr IndirectCommandsTokenTypeNV
-> Int -> IndirectCommandsTokenTypeNV -> IO ()
Ptr IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> IO ()
IndirectCommandsTokenTypeNV -> Int
(IndirectCommandsTokenTypeNV -> Int)
-> (IndirectCommandsTokenTypeNV -> Int)
-> (Ptr IndirectCommandsTokenTypeNV
-> Int -> IO IndirectCommandsTokenTypeNV)
-> (Ptr IndirectCommandsTokenTypeNV
-> Int -> IndirectCommandsTokenTypeNV -> IO ())
-> (forall b. Ptr b -> Int -> IO IndirectCommandsTokenTypeNV)
-> (forall b. Ptr b -> Int -> IndirectCommandsTokenTypeNV -> IO ())
-> (Ptr IndirectCommandsTokenTypeNV
-> IO IndirectCommandsTokenTypeNV)
-> (Ptr IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> IO ())
-> Storable IndirectCommandsTokenTypeNV
forall b. Ptr b -> Int -> IO IndirectCommandsTokenTypeNV
forall b. Ptr b -> Int -> IndirectCommandsTokenTypeNV -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> IO ()
$cpoke :: Ptr IndirectCommandsTokenTypeNV
-> IndirectCommandsTokenTypeNV -> IO ()
peek :: Ptr IndirectCommandsTokenTypeNV -> IO IndirectCommandsTokenTypeNV
$cpeek :: Ptr IndirectCommandsTokenTypeNV -> IO IndirectCommandsTokenTypeNV
pokeByteOff :: forall b. Ptr b -> Int -> IndirectCommandsTokenTypeNV -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> IndirectCommandsTokenTypeNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO IndirectCommandsTokenTypeNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO IndirectCommandsTokenTypeNV
pokeElemOff :: Ptr IndirectCommandsTokenTypeNV
-> Int -> IndirectCommandsTokenTypeNV -> IO ()
$cpokeElemOff :: Ptr IndirectCommandsTokenTypeNV
-> Int -> IndirectCommandsTokenTypeNV -> IO ()
peekElemOff :: Ptr IndirectCommandsTokenTypeNV
-> Int -> IO IndirectCommandsTokenTypeNV
$cpeekElemOff :: Ptr IndirectCommandsTokenTypeNV
-> Int -> IO IndirectCommandsTokenTypeNV
alignment :: IndirectCommandsTokenTypeNV -> Int
$calignment :: IndirectCommandsTokenTypeNV -> Int
sizeOf :: IndirectCommandsTokenTypeNV -> Int
$csizeOf :: IndirectCommandsTokenTypeNV -> Int
Storable, IndirectCommandsTokenTypeNV
IndirectCommandsTokenTypeNV -> Zero IndirectCommandsTokenTypeNV
forall a. a -> Zero a
zero :: IndirectCommandsTokenTypeNV
$czero :: IndirectCommandsTokenTypeNV
Zero)
pattern $bINDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV :: IndirectCommandsTokenTypeNV
$mINDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV :: forall {r}.
IndirectCommandsTokenTypeNV -> (Void# -> r) -> (Void# -> r) -> r
INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV = IndirectCommandsTokenTypeNV 0
pattern $bINDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV :: IndirectCommandsTokenTypeNV
$mINDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV :: forall {r}.
IndirectCommandsTokenTypeNV -> (Void# -> r) -> (Void# -> r) -> r
INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV = IndirectCommandsTokenTypeNV 1
pattern $bINDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV :: IndirectCommandsTokenTypeNV
$mINDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV :: forall {r}.
IndirectCommandsTokenTypeNV -> (Void# -> r) -> (Void# -> r) -> r
INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV = IndirectCommandsTokenTypeNV 2
pattern $bINDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV :: IndirectCommandsTokenTypeNV
$mINDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV :: forall {r}.
IndirectCommandsTokenTypeNV -> (Void# -> r) -> (Void# -> r) -> r
INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV = IndirectCommandsTokenTypeNV 3
pattern $bINDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV :: IndirectCommandsTokenTypeNV
$mINDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV :: forall {r}.
IndirectCommandsTokenTypeNV -> (Void# -> r) -> (Void# -> r) -> r
INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV = IndirectCommandsTokenTypeNV 4
pattern $bINDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV :: IndirectCommandsTokenTypeNV
$mINDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV :: forall {r}.
IndirectCommandsTokenTypeNV -> (Void# -> r) -> (Void# -> r) -> r
INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV = IndirectCommandsTokenTypeNV 5
pattern $bINDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV :: IndirectCommandsTokenTypeNV
$mINDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV :: forall {r}.
IndirectCommandsTokenTypeNV -> (Void# -> r) -> (Void# -> r) -> r
INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV = IndirectCommandsTokenTypeNV 6
pattern $bINDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV :: IndirectCommandsTokenTypeNV
$mINDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV :: forall {r}.
IndirectCommandsTokenTypeNV -> (Void# -> r) -> (Void# -> r) -> r
INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV = IndirectCommandsTokenTypeNV 7
pattern $bINDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV :: IndirectCommandsTokenTypeNV
$mINDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV :: forall {r}.
IndirectCommandsTokenTypeNV -> (Void# -> r) -> (Void# -> r) -> r
INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV = IndirectCommandsTokenTypeNV 1000328000
{-# COMPLETE
INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV
, INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV ::
IndirectCommandsTokenTypeNV
#-}
conNameIndirectCommandsTokenTypeNV :: String
conNameIndirectCommandsTokenTypeNV :: String
conNameIndirectCommandsTokenTypeNV = String
"IndirectCommandsTokenTypeNV"
enumPrefixIndirectCommandsTokenTypeNV :: String
enumPrefixIndirectCommandsTokenTypeNV :: String
enumPrefixIndirectCommandsTokenTypeNV = String
"INDIRECT_COMMANDS_TOKEN_TYPE_"
showTableIndirectCommandsTokenTypeNV :: [(IndirectCommandsTokenTypeNV, String)]
showTableIndirectCommandsTokenTypeNV :: [(IndirectCommandsTokenTypeNV, String)]
showTableIndirectCommandsTokenTypeNV =
[
( IndirectCommandsTokenTypeNV
INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV
, String
"SHADER_GROUP_NV"
)
,
( IndirectCommandsTokenTypeNV
INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV
, String
"STATE_FLAGS_NV"
)
,
( IndirectCommandsTokenTypeNV
INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV
, String
"INDEX_BUFFER_NV"
)
,
( IndirectCommandsTokenTypeNV
INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV
, String
"VERTEX_BUFFER_NV"
)
,
( IndirectCommandsTokenTypeNV
INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV
, String
"PUSH_CONSTANT_NV"
)
,
( IndirectCommandsTokenTypeNV
INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV
, String
"DRAW_INDEXED_NV"
)
,
( IndirectCommandsTokenTypeNV
INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV
, String
"DRAW_NV"
)
,
( IndirectCommandsTokenTypeNV
INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV
, String
"DRAW_TASKS_NV"
)
,
( IndirectCommandsTokenTypeNV
INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV
, String
"DRAW_MESH_TASKS_NV"
)
]
instance Show IndirectCommandsTokenTypeNV where
showsPrec :: Int -> IndirectCommandsTokenTypeNV -> ShowS
showsPrec =
String
-> [(IndirectCommandsTokenTypeNV, String)]
-> String
-> (IndirectCommandsTokenTypeNV -> Int32)
-> (Int32 -> ShowS)
-> Int
-> IndirectCommandsTokenTypeNV
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixIndirectCommandsTokenTypeNV
[(IndirectCommandsTokenTypeNV, String)]
showTableIndirectCommandsTokenTypeNV
String
conNameIndirectCommandsTokenTypeNV
(\(IndirectCommandsTokenTypeNV Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read IndirectCommandsTokenTypeNV where
readPrec :: ReadPrec IndirectCommandsTokenTypeNV
readPrec =
String
-> [(IndirectCommandsTokenTypeNV, String)]
-> String
-> (Int32 -> IndirectCommandsTokenTypeNV)
-> ReadPrec IndirectCommandsTokenTypeNV
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixIndirectCommandsTokenTypeNV
[(IndirectCommandsTokenTypeNV, String)]
showTableIndirectCommandsTokenTypeNV
String
conNameIndirectCommandsTokenTypeNV
Int32 -> IndirectCommandsTokenTypeNV
IndirectCommandsTokenTypeNV
type NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION = 3
pattern NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION :: forall a . Integral a => a
pattern $bNV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION :: forall a. Integral a => a
$mNV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> (Void# -> r) -> (Void# -> r) -> r
NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION = 3
type NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NV_device_generated_commands"
pattern NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mNV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NV_device_generated_commands"