{-# language CPP #-}
module Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands ( cmdProcessCommandsNVX
, cmdReserveSpaceForCommandsNVX
, createIndirectCommandsLayoutNVX
, withIndirectCommandsLayoutNVX
, destroyIndirectCommandsLayoutNVX
, createObjectTableNVX
, withObjectTableNVX
, destroyObjectTableNVX
, registerObjectsNVX
, withRegisteredObjectsNVX
, unregisterObjectsNVX
, getPhysicalDeviceGeneratedCommandsPropertiesNVX
, DeviceGeneratedCommandsFeaturesNVX(..)
, DeviceGeneratedCommandsLimitsNVX(..)
, IndirectCommandsTokenNVX(..)
, IndirectCommandsLayoutTokenNVX(..)
, IndirectCommandsLayoutCreateInfoNVX(..)
, CmdProcessCommandsInfoNVX(..)
, CmdReserveSpaceForCommandsInfoNVX(..)
, ObjectTableCreateInfoNVX(..)
, ObjectTableEntryNVX(..)
, ObjectTablePipelineEntryNVX(..)
, ObjectTableDescriptorSetEntryNVX(..)
, ObjectTableVertexBufferEntryNVX(..)
, ObjectTableIndexBufferEntryNVX(..)
, ObjectTablePushConstantEntryNVX(..)
, IndirectCommandsLayoutUsageFlagBitsNVX( INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX
, INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX
, INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX
, INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX
, ..
)
, IndirectCommandsLayoutUsageFlagsNVX
, ObjectEntryUsageFlagBitsNVX( OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX
, OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX
, ..
)
, ObjectEntryUsageFlagsNVX
, IndirectCommandsTokenTypeNVX( INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX
, INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX
, INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX
, INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX
, INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX
, INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX
, INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX
, INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX
, ..
)
, ObjectEntryTypeNVX( OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX
, OBJECT_ENTRY_TYPE_PIPELINE_NVX
, OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX
, OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX
, OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX
, ..
)
, NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION
, pattern NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION
, NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME
, pattern NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME
, ObjectTableNVX(..)
, IndirectCommandsLayoutNVX(..)
) where
import Control.Exception.Base (bracket)
import Control.Exception.Base (bracket_)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
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 Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
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.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 Data.Word (Word32)
import Text.Read.Lex (Lexeme(Ident))
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Graphics.Vulkan.CStruct.Utils (advancePtrBytes)
import Graphics.Vulkan.Core10.BaseType (bool32ToBool)
import Graphics.Vulkan.Core10.BaseType (boolToBool32)
import Graphics.Vulkan.NamedType ((:::))
import Graphics.Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Graphics.Vulkan.Core10.BaseType (Bool32)
import Graphics.Vulkan.Core10.Handles (Buffer)
import Graphics.Vulkan.Core10.Handles (CommandBuffer)
import Graphics.Vulkan.Core10.Handles (CommandBuffer(..))
import Graphics.Vulkan.Core10.Handles (CommandBuffer_T)
import Graphics.Vulkan.Core10.Handles (DescriptorSet)
import Graphics.Vulkan.Core10.Handles (Device)
import Graphics.Vulkan.Core10.Handles (Device(..))
import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdProcessCommandsNVX))
import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdReserveSpaceForCommandsNVX))
import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCreateIndirectCommandsLayoutNVX))
import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCreateObjectTableNVX))
import Graphics.Vulkan.Dynamic (DeviceCmds(pVkDestroyIndirectCommandsLayoutNVX))
import Graphics.Vulkan.Dynamic (DeviceCmds(pVkDestroyObjectTableNVX))
import Graphics.Vulkan.Dynamic (DeviceCmds(pVkRegisterObjectsNVX))
import Graphics.Vulkan.Dynamic (DeviceCmds(pVkUnregisterObjectsNVX))
import Graphics.Vulkan.Core10.BaseType (DeviceSize)
import Graphics.Vulkan.Core10.Handles (Device_T)
import Graphics.Vulkan.Core10.BaseType (Flags)
import Graphics.Vulkan.CStruct (FromCStruct)
import Graphics.Vulkan.CStruct (FromCStruct(..))
import Graphics.Vulkan.Core10.Enums.IndexType (IndexType)
import Graphics.Vulkan.Extensions.Handles (IndirectCommandsLayoutNVX)
import Graphics.Vulkan.Extensions.Handles (IndirectCommandsLayoutNVX(..))
import Graphics.Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceGeneratedCommandsPropertiesNVX))
import Graphics.Vulkan.Extensions.Handles (ObjectTableNVX)
import Graphics.Vulkan.Extensions.Handles (ObjectTableNVX(..))
import Graphics.Vulkan.Core10.Handles (PhysicalDevice)
import Graphics.Vulkan.Core10.Handles (PhysicalDevice(..))
import Graphics.Vulkan.Core10.Handles (PhysicalDevice_T)
import Graphics.Vulkan.Core10.Handles (Pipeline)
import Graphics.Vulkan.Core10.Enums.PipelineBindPoint (PipelineBindPoint)
import Graphics.Vulkan.Core10.Handles (PipelineLayout)
import Graphics.Vulkan.Core10.Enums.Result (Result)
import Graphics.Vulkan.Core10.Enums.Result (Result(..))
import Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType)
import Graphics.Vulkan.CStruct (ToCStruct)
import Graphics.Vulkan.CStruct (ToCStruct(..))
import Graphics.Vulkan.Exception (VulkanException(..))
import Graphics.Vulkan.Zero (Zero)
import Graphics.Vulkan.Zero (Zero(..))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX))
import Graphics.Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Graphics.Vulkan.Extensions.Handles (IndirectCommandsLayoutNVX(..))
import Graphics.Vulkan.Extensions.Handles (ObjectTableNVX(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdProcessCommandsNVX
:: FunPtr (Ptr CommandBuffer_T -> Ptr CmdProcessCommandsInfoNVX -> IO ()) -> Ptr CommandBuffer_T -> Ptr CmdProcessCommandsInfoNVX -> IO ()
cmdProcessCommandsNVX :: forall io . MonadIO io => CommandBuffer -> CmdProcessCommandsInfoNVX -> io ()
cmdProcessCommandsNVX commandBuffer processCommandsInfo = liftIO . evalContT $ do
let vkCmdProcessCommandsNVX' = mkVkCmdProcessCommandsNVX (pVkCmdProcessCommandsNVX (deviceCmds (commandBuffer :: CommandBuffer)))
pProcessCommandsInfo <- ContT $ withCStruct (processCommandsInfo)
lift $ vkCmdProcessCommandsNVX' (commandBufferHandle (commandBuffer)) pProcessCommandsInfo
pure $ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdReserveSpaceForCommandsNVX
:: FunPtr (Ptr CommandBuffer_T -> Ptr CmdReserveSpaceForCommandsInfoNVX -> IO ()) -> Ptr CommandBuffer_T -> Ptr CmdReserveSpaceForCommandsInfoNVX -> IO ()
cmdReserveSpaceForCommandsNVX :: forall io . MonadIO io => CommandBuffer -> ("reserveSpaceInfo" ::: CmdReserveSpaceForCommandsInfoNVX) -> io ()
cmdReserveSpaceForCommandsNVX commandBuffer reserveSpaceInfo = liftIO . evalContT $ do
let vkCmdReserveSpaceForCommandsNVX' = mkVkCmdReserveSpaceForCommandsNVX (pVkCmdReserveSpaceForCommandsNVX (deviceCmds (commandBuffer :: CommandBuffer)))
pReserveSpaceInfo <- ContT $ withCStruct (reserveSpaceInfo)
lift $ vkCmdReserveSpaceForCommandsNVX' (commandBufferHandle (commandBuffer)) pReserveSpaceInfo
pure $ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCreateIndirectCommandsLayoutNVX
:: FunPtr (Ptr Device_T -> Ptr IndirectCommandsLayoutCreateInfoNVX -> Ptr AllocationCallbacks -> Ptr IndirectCommandsLayoutNVX -> IO Result) -> Ptr Device_T -> Ptr IndirectCommandsLayoutCreateInfoNVX -> Ptr AllocationCallbacks -> Ptr IndirectCommandsLayoutNVX -> IO Result
createIndirectCommandsLayoutNVX :: forall io . MonadIO io => Device -> IndirectCommandsLayoutCreateInfoNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> io (IndirectCommandsLayoutNVX)
createIndirectCommandsLayoutNVX device createInfo allocator = liftIO . evalContT $ do
let vkCreateIndirectCommandsLayoutNVX' = mkVkCreateIndirectCommandsLayoutNVX (pVkCreateIndirectCommandsLayoutNVX (deviceCmds (device :: Device)))
pCreateInfo <- ContT $ withCStruct (createInfo)
pAllocator <- case (allocator) of
Nothing -> pure nullPtr
Just j -> ContT $ withCStruct (j)
pPIndirectCommandsLayout <- ContT $ bracket (callocBytes @IndirectCommandsLayoutNVX 8) free
r <- lift $ vkCreateIndirectCommandsLayoutNVX' (deviceHandle (device)) pCreateInfo pAllocator (pPIndirectCommandsLayout)
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
pIndirectCommandsLayout <- lift $ peek @IndirectCommandsLayoutNVX pPIndirectCommandsLayout
pure $ (pIndirectCommandsLayout)
withIndirectCommandsLayoutNVX :: forall r . Device -> IndirectCommandsLayoutCreateInfoNVX -> Maybe AllocationCallbacks -> ((IndirectCommandsLayoutNVX) -> IO r) -> IO r
withIndirectCommandsLayoutNVX device pCreateInfo pAllocator =
bracket
(createIndirectCommandsLayoutNVX device pCreateInfo pAllocator)
(\(o0) -> destroyIndirectCommandsLayoutNVX device o0 pAllocator)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkDestroyIndirectCommandsLayoutNVX
:: FunPtr (Ptr Device_T -> IndirectCommandsLayoutNVX -> Ptr AllocationCallbacks -> IO ()) -> Ptr Device_T -> IndirectCommandsLayoutNVX -> Ptr AllocationCallbacks -> IO ()
destroyIndirectCommandsLayoutNVX :: forall io . MonadIO io => Device -> IndirectCommandsLayoutNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
destroyIndirectCommandsLayoutNVX device indirectCommandsLayout allocator = liftIO . evalContT $ do
let vkDestroyIndirectCommandsLayoutNVX' = mkVkDestroyIndirectCommandsLayoutNVX (pVkDestroyIndirectCommandsLayoutNVX (deviceCmds (device :: Device)))
pAllocator <- case (allocator) of
Nothing -> pure nullPtr
Just j -> ContT $ withCStruct (j)
lift $ vkDestroyIndirectCommandsLayoutNVX' (deviceHandle (device)) (indirectCommandsLayout) pAllocator
pure $ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCreateObjectTableNVX
:: FunPtr (Ptr Device_T -> Ptr ObjectTableCreateInfoNVX -> Ptr AllocationCallbacks -> Ptr ObjectTableNVX -> IO Result) -> Ptr Device_T -> Ptr ObjectTableCreateInfoNVX -> Ptr AllocationCallbacks -> Ptr ObjectTableNVX -> IO Result
createObjectTableNVX :: forall io . MonadIO io => Device -> ObjectTableCreateInfoNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> io (ObjectTableNVX)
createObjectTableNVX device createInfo allocator = liftIO . evalContT $ do
let vkCreateObjectTableNVX' = mkVkCreateObjectTableNVX (pVkCreateObjectTableNVX (deviceCmds (device :: Device)))
pCreateInfo <- ContT $ withCStruct (createInfo)
pAllocator <- case (allocator) of
Nothing -> pure nullPtr
Just j -> ContT $ withCStruct (j)
pPObjectTable <- ContT $ bracket (callocBytes @ObjectTableNVX 8) free
r <- lift $ vkCreateObjectTableNVX' (deviceHandle (device)) pCreateInfo pAllocator (pPObjectTable)
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
pObjectTable <- lift $ peek @ObjectTableNVX pPObjectTable
pure $ (pObjectTable)
withObjectTableNVX :: forall r . Device -> ObjectTableCreateInfoNVX -> Maybe AllocationCallbacks -> ((ObjectTableNVX) -> IO r) -> IO r
withObjectTableNVX device pCreateInfo pAllocator =
bracket
(createObjectTableNVX device pCreateInfo pAllocator)
(\(o0) -> destroyObjectTableNVX device o0 pAllocator)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkDestroyObjectTableNVX
:: FunPtr (Ptr Device_T -> ObjectTableNVX -> Ptr AllocationCallbacks -> IO ()) -> Ptr Device_T -> ObjectTableNVX -> Ptr AllocationCallbacks -> IO ()
destroyObjectTableNVX :: forall io . MonadIO io => Device -> ObjectTableNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
destroyObjectTableNVX device objectTable allocator = liftIO . evalContT $ do
let vkDestroyObjectTableNVX' = mkVkDestroyObjectTableNVX (pVkDestroyObjectTableNVX (deviceCmds (device :: Device)))
pAllocator <- case (allocator) of
Nothing -> pure nullPtr
Just j -> ContT $ withCStruct (j)
lift $ vkDestroyObjectTableNVX' (deviceHandle (device)) (objectTable) pAllocator
pure $ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkRegisterObjectsNVX
:: FunPtr (Ptr Device_T -> ObjectTableNVX -> Word32 -> Ptr (Ptr ObjectTableEntryNVX) -> Ptr Word32 -> IO Result) -> Ptr Device_T -> ObjectTableNVX -> Word32 -> Ptr (Ptr ObjectTableEntryNVX) -> Ptr Word32 -> IO Result
registerObjectsNVX :: forall io . MonadIO io => Device -> ObjectTableNVX -> ("objectTableEntries" ::: Vector ObjectTableEntryNVX) -> ("objectIndices" ::: Vector Word32) -> io ()
registerObjectsNVX device objectTable objectTableEntries objectIndices = liftIO . evalContT $ do
let vkRegisterObjectsNVX' = mkVkRegisterObjectsNVX (pVkRegisterObjectsNVX (deviceCmds (device :: Device)))
let ppObjectTableEntriesLength = Data.Vector.length $ (objectTableEntries)
let pObjectIndicesLength = Data.Vector.length $ (objectIndices)
lift $ unless (pObjectIndicesLength == ppObjectTableEntriesLength) $
throwIO $ IOError Nothing InvalidArgument "" "pObjectIndices and ppObjectTableEntries must have the same length" Nothing Nothing
pPpObjectTableEntries <- ContT $ allocaBytesAligned @(Ptr ObjectTableEntryNVX) ((Data.Vector.length (objectTableEntries)) * 8) 8
Data.Vector.imapM_ (\i e -> do
ppObjectTableEntries <- ContT $ withCStruct (e)
lift $ poke (pPpObjectTableEntries `plusPtr` (8 * (i)) :: Ptr (Ptr ObjectTableEntryNVX)) ppObjectTableEntries) (objectTableEntries)
pPObjectIndices <- ContT $ allocaBytesAligned @Word32 ((Data.Vector.length (objectIndices)) * 4) 4
lift $ Data.Vector.imapM_ (\i e -> poke (pPObjectIndices `plusPtr` (4 * (i)) :: Ptr Word32) (e)) (objectIndices)
r <- lift $ vkRegisterObjectsNVX' (deviceHandle (device)) (objectTable) ((fromIntegral ppObjectTableEntriesLength :: Word32)) (pPpObjectTableEntries) (pPObjectIndices)
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
withRegisteredObjectsNVX :: forall r . Device -> ObjectTableNVX -> Vector ObjectTableEntryNVX -> Vector Word32 -> Vector ObjectEntryTypeNVX -> IO r -> IO r
withRegisteredObjectsNVX device objectTable ppObjectTableEntries pObjectIndices pObjectEntryTypes =
bracket_
(registerObjectsNVX device objectTable ppObjectTableEntries pObjectIndices)
(unregisterObjectsNVX device objectTable pObjectEntryTypes pObjectIndices)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkUnregisterObjectsNVX
:: FunPtr (Ptr Device_T -> ObjectTableNVX -> Word32 -> Ptr ObjectEntryTypeNVX -> Ptr Word32 -> IO Result) -> Ptr Device_T -> ObjectTableNVX -> Word32 -> Ptr ObjectEntryTypeNVX -> Ptr Word32 -> IO Result
unregisterObjectsNVX :: forall io . MonadIO io => Device -> ObjectTableNVX -> ("objectEntryTypes" ::: Vector ObjectEntryTypeNVX) -> ("objectIndices" ::: Vector Word32) -> io ()
unregisterObjectsNVX device objectTable objectEntryTypes objectIndices = liftIO . evalContT $ do
let vkUnregisterObjectsNVX' = mkVkUnregisterObjectsNVX (pVkUnregisterObjectsNVX (deviceCmds (device :: Device)))
let pObjectEntryTypesLength = Data.Vector.length $ (objectEntryTypes)
let pObjectIndicesLength = Data.Vector.length $ (objectIndices)
lift $ unless (pObjectIndicesLength == pObjectEntryTypesLength) $
throwIO $ IOError Nothing InvalidArgument "" "pObjectIndices and pObjectEntryTypes must have the same length" Nothing Nothing
pPObjectEntryTypes <- ContT $ allocaBytesAligned @ObjectEntryTypeNVX ((Data.Vector.length (objectEntryTypes)) * 4) 4
lift $ Data.Vector.imapM_ (\i e -> poke (pPObjectEntryTypes `plusPtr` (4 * (i)) :: Ptr ObjectEntryTypeNVX) (e)) (objectEntryTypes)
pPObjectIndices <- ContT $ allocaBytesAligned @Word32 ((Data.Vector.length (objectIndices)) * 4) 4
lift $ Data.Vector.imapM_ (\i e -> poke (pPObjectIndices `plusPtr` (4 * (i)) :: Ptr Word32) (e)) (objectIndices)
r <- lift $ vkUnregisterObjectsNVX' (deviceHandle (device)) (objectTable) ((fromIntegral pObjectEntryTypesLength :: Word32)) (pPObjectEntryTypes) (pPObjectIndices)
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceGeneratedCommandsPropertiesNVX
:: FunPtr (Ptr PhysicalDevice_T -> Ptr DeviceGeneratedCommandsFeaturesNVX -> Ptr DeviceGeneratedCommandsLimitsNVX -> IO ()) -> Ptr PhysicalDevice_T -> Ptr DeviceGeneratedCommandsFeaturesNVX -> Ptr DeviceGeneratedCommandsLimitsNVX -> IO ()
getPhysicalDeviceGeneratedCommandsPropertiesNVX :: forall io . MonadIO io => PhysicalDevice -> io (DeviceGeneratedCommandsFeaturesNVX, DeviceGeneratedCommandsLimitsNVX)
getPhysicalDeviceGeneratedCommandsPropertiesNVX physicalDevice = liftIO . evalContT $ do
let vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX' = mkVkGetPhysicalDeviceGeneratedCommandsPropertiesNVX (pVkGetPhysicalDeviceGeneratedCommandsPropertiesNVX (instanceCmds (physicalDevice :: PhysicalDevice)))
pPFeatures <- ContT (withZeroCStruct @DeviceGeneratedCommandsFeaturesNVX)
pPLimits <- ContT (withZeroCStruct @DeviceGeneratedCommandsLimitsNVX)
lift $ vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX' (physicalDeviceHandle (physicalDevice)) (pPFeatures) (pPLimits)
pFeatures <- lift $ peekCStruct @DeviceGeneratedCommandsFeaturesNVX pPFeatures
pLimits <- lift $ peekCStruct @DeviceGeneratedCommandsLimitsNVX pPLimits
pure $ (pFeatures, pLimits)
data DeviceGeneratedCommandsFeaturesNVX = DeviceGeneratedCommandsFeaturesNVX
{
computeBindingPointSupport :: Bool }
deriving (Typeable)
deriving instance Show DeviceGeneratedCommandsFeaturesNVX
instance ToCStruct DeviceGeneratedCommandsFeaturesNVX where
withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p DeviceGeneratedCommandsFeaturesNVX{..} f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr Bool32)) (boolToBool32 (computeBindingPointSupport))
f
cStructSize = 24
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr Bool32)) (boolToBool32 (zero))
f
instance FromCStruct DeviceGeneratedCommandsFeaturesNVX where
peekCStruct p = do
computeBindingPointSupport <- peek @Bool32 ((p `plusPtr` 16 :: Ptr Bool32))
pure $ DeviceGeneratedCommandsFeaturesNVX
(bool32ToBool computeBindingPointSupport)
instance Storable DeviceGeneratedCommandsFeaturesNVX where
sizeOf ~_ = 24
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero DeviceGeneratedCommandsFeaturesNVX where
zero = DeviceGeneratedCommandsFeaturesNVX
zero
data DeviceGeneratedCommandsLimitsNVX = DeviceGeneratedCommandsLimitsNVX
{
maxIndirectCommandsLayoutTokenCount :: Word32
,
maxObjectEntryCounts :: Word32
,
minSequenceCountBufferOffsetAlignment :: Word32
,
minSequenceIndexBufferOffsetAlignment :: Word32
,
minCommandsTokenBufferOffsetAlignment :: Word32
}
deriving (Typeable)
deriving instance Show DeviceGeneratedCommandsLimitsNVX
instance ToCStruct DeviceGeneratedCommandsLimitsNVX where
withCStruct x f = allocaBytesAligned 40 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p DeviceGeneratedCommandsLimitsNVX{..} f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr Word32)) (maxIndirectCommandsLayoutTokenCount)
poke ((p `plusPtr` 20 :: Ptr Word32)) (maxObjectEntryCounts)
poke ((p `plusPtr` 24 :: Ptr Word32)) (minSequenceCountBufferOffsetAlignment)
poke ((p `plusPtr` 28 :: Ptr Word32)) (minSequenceIndexBufferOffsetAlignment)
poke ((p `plusPtr` 32 :: Ptr Word32)) (minCommandsTokenBufferOffsetAlignment)
f
cStructSize = 40
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr Word32)) (zero)
poke ((p `plusPtr` 20 :: Ptr Word32)) (zero)
poke ((p `plusPtr` 24 :: Ptr Word32)) (zero)
poke ((p `plusPtr` 28 :: Ptr Word32)) (zero)
poke ((p `plusPtr` 32 :: Ptr Word32)) (zero)
f
instance FromCStruct DeviceGeneratedCommandsLimitsNVX where
peekCStruct p = do
maxIndirectCommandsLayoutTokenCount <- peek @Word32 ((p `plusPtr` 16 :: Ptr Word32))
maxObjectEntryCounts <- peek @Word32 ((p `plusPtr` 20 :: Ptr Word32))
minSequenceCountBufferOffsetAlignment <- peek @Word32 ((p `plusPtr` 24 :: Ptr Word32))
minSequenceIndexBufferOffsetAlignment <- peek @Word32 ((p `plusPtr` 28 :: Ptr Word32))
minCommandsTokenBufferOffsetAlignment <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32))
pure $ DeviceGeneratedCommandsLimitsNVX
maxIndirectCommandsLayoutTokenCount maxObjectEntryCounts minSequenceCountBufferOffsetAlignment minSequenceIndexBufferOffsetAlignment minCommandsTokenBufferOffsetAlignment
instance Storable DeviceGeneratedCommandsLimitsNVX where
sizeOf ~_ = 40
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero DeviceGeneratedCommandsLimitsNVX where
zero = DeviceGeneratedCommandsLimitsNVX
zero
zero
zero
zero
zero
data IndirectCommandsTokenNVX = IndirectCommandsTokenNVX
{
tokenType :: IndirectCommandsTokenTypeNVX
,
buffer :: Buffer
,
offset :: DeviceSize
}
deriving (Typeable)
deriving instance Show IndirectCommandsTokenNVX
instance ToCStruct IndirectCommandsTokenNVX where
withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p IndirectCommandsTokenNVX{..} f = do
poke ((p `plusPtr` 0 :: Ptr IndirectCommandsTokenTypeNVX)) (tokenType)
poke ((p `plusPtr` 8 :: Ptr Buffer)) (buffer)
poke ((p `plusPtr` 16 :: Ptr DeviceSize)) (offset)
f
cStructSize = 24
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr IndirectCommandsTokenTypeNVX)) (zero)
poke ((p `plusPtr` 8 :: Ptr Buffer)) (zero)
poke ((p `plusPtr` 16 :: Ptr DeviceSize)) (zero)
f
instance FromCStruct IndirectCommandsTokenNVX where
peekCStruct p = do
tokenType <- peek @IndirectCommandsTokenTypeNVX ((p `plusPtr` 0 :: Ptr IndirectCommandsTokenTypeNVX))
buffer <- peek @Buffer ((p `plusPtr` 8 :: Ptr Buffer))
offset <- peek @DeviceSize ((p `plusPtr` 16 :: Ptr DeviceSize))
pure $ IndirectCommandsTokenNVX
tokenType buffer offset
instance Storable IndirectCommandsTokenNVX where
sizeOf ~_ = 24
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero IndirectCommandsTokenNVX where
zero = IndirectCommandsTokenNVX
zero
zero
zero
data IndirectCommandsLayoutTokenNVX = IndirectCommandsLayoutTokenNVX
{
tokenType :: IndirectCommandsTokenTypeNVX
,
bindingUnit :: Word32
,
dynamicCount :: Word32
,
divisor :: Word32
}
deriving (Typeable)
deriving instance Show IndirectCommandsLayoutTokenNVX
instance ToCStruct IndirectCommandsLayoutTokenNVX where
withCStruct x f = allocaBytesAligned 16 4 $ \p -> pokeCStruct p x (f p)
pokeCStruct p IndirectCommandsLayoutTokenNVX{..} f = do
poke ((p `plusPtr` 0 :: Ptr IndirectCommandsTokenTypeNVX)) (tokenType)
poke ((p `plusPtr` 4 :: Ptr Word32)) (bindingUnit)
poke ((p `plusPtr` 8 :: Ptr Word32)) (dynamicCount)
poke ((p `plusPtr` 12 :: Ptr Word32)) (divisor)
f
cStructSize = 16
cStructAlignment = 4
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr IndirectCommandsTokenTypeNVX)) (zero)
poke ((p `plusPtr` 4 :: Ptr Word32)) (zero)
poke ((p `plusPtr` 8 :: Ptr Word32)) (zero)
poke ((p `plusPtr` 12 :: Ptr Word32)) (zero)
f
instance FromCStruct IndirectCommandsLayoutTokenNVX where
peekCStruct p = do
tokenType <- peek @IndirectCommandsTokenTypeNVX ((p `plusPtr` 0 :: Ptr IndirectCommandsTokenTypeNVX))
bindingUnit <- peek @Word32 ((p `plusPtr` 4 :: Ptr Word32))
dynamicCount <- peek @Word32 ((p `plusPtr` 8 :: Ptr Word32))
divisor <- peek @Word32 ((p `plusPtr` 12 :: Ptr Word32))
pure $ IndirectCommandsLayoutTokenNVX
tokenType bindingUnit dynamicCount divisor
instance Storable IndirectCommandsLayoutTokenNVX where
sizeOf ~_ = 16
alignment ~_ = 4
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero IndirectCommandsLayoutTokenNVX where
zero = IndirectCommandsLayoutTokenNVX
zero
zero
zero
zero
data IndirectCommandsLayoutCreateInfoNVX = IndirectCommandsLayoutCreateInfoNVX
{
pipelineBindPoint :: PipelineBindPoint
,
flags :: IndirectCommandsLayoutUsageFlagsNVX
,
tokens :: Vector IndirectCommandsLayoutTokenNVX
}
deriving (Typeable)
deriving instance Show IndirectCommandsLayoutCreateInfoNVX
instance ToCStruct IndirectCommandsLayoutCreateInfoNVX where
withCStruct x f = allocaBytesAligned 40 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p IndirectCommandsLayoutCreateInfoNVX{..} f = evalContT $ do
lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX)
lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
lift $ poke ((p `plusPtr` 16 :: Ptr PipelineBindPoint)) (pipelineBindPoint)
lift $ poke ((p `plusPtr` 20 :: Ptr IndirectCommandsLayoutUsageFlagsNVX)) (flags)
lift $ poke ((p `plusPtr` 24 :: Ptr Word32)) ((fromIntegral (Data.Vector.length $ (tokens)) :: Word32))
pPTokens' <- ContT $ allocaBytesAligned @IndirectCommandsLayoutTokenNVX ((Data.Vector.length (tokens)) * 16) 4
Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPTokens' `plusPtr` (16 * (i)) :: Ptr IndirectCommandsLayoutTokenNVX) (e) . ($ ())) (tokens)
lift $ poke ((p `plusPtr` 32 :: Ptr (Ptr IndirectCommandsLayoutTokenNVX))) (pPTokens')
lift $ f
cStructSize = 40
cStructAlignment = 8
pokeZeroCStruct p f = evalContT $ do
lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX)
lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
lift $ poke ((p `plusPtr` 16 :: Ptr PipelineBindPoint)) (zero)
lift $ poke ((p `plusPtr` 20 :: Ptr IndirectCommandsLayoutUsageFlagsNVX)) (zero)
pPTokens' <- ContT $ allocaBytesAligned @IndirectCommandsLayoutTokenNVX ((Data.Vector.length (mempty)) * 16) 4
Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPTokens' `plusPtr` (16 * (i)) :: Ptr IndirectCommandsLayoutTokenNVX) (e) . ($ ())) (mempty)
lift $ poke ((p `plusPtr` 32 :: Ptr (Ptr IndirectCommandsLayoutTokenNVX))) (pPTokens')
lift $ f
instance FromCStruct IndirectCommandsLayoutCreateInfoNVX where
peekCStruct p = do
pipelineBindPoint <- peek @PipelineBindPoint ((p `plusPtr` 16 :: Ptr PipelineBindPoint))
flags <- peek @IndirectCommandsLayoutUsageFlagsNVX ((p `plusPtr` 20 :: Ptr IndirectCommandsLayoutUsageFlagsNVX))
tokenCount <- peek @Word32 ((p `plusPtr` 24 :: Ptr Word32))
pTokens <- peek @(Ptr IndirectCommandsLayoutTokenNVX) ((p `plusPtr` 32 :: Ptr (Ptr IndirectCommandsLayoutTokenNVX)))
pTokens' <- generateM (fromIntegral tokenCount) (\i -> peekCStruct @IndirectCommandsLayoutTokenNVX ((pTokens `advancePtrBytes` (16 * (i)) :: Ptr IndirectCommandsLayoutTokenNVX)))
pure $ IndirectCommandsLayoutCreateInfoNVX
pipelineBindPoint flags pTokens'
instance Zero IndirectCommandsLayoutCreateInfoNVX where
zero = IndirectCommandsLayoutCreateInfoNVX
zero
zero
mempty
data CmdProcessCommandsInfoNVX = CmdProcessCommandsInfoNVX
{
objectTable :: ObjectTableNVX
,
indirectCommandsLayout :: IndirectCommandsLayoutNVX
,
indirectCommandsTokens :: Vector IndirectCommandsTokenNVX
,
maxSequencesCount :: Word32
,
targetCommandBuffer :: Ptr CommandBuffer_T
,
sequencesCountBuffer :: Buffer
,
sequencesCountOffset :: DeviceSize
,
sequencesIndexBuffer :: Buffer
,
sequencesIndexOffset :: DeviceSize
}
deriving (Typeable)
deriving instance Show CmdProcessCommandsInfoNVX
instance ToCStruct CmdProcessCommandsInfoNVX where
withCStruct x f = allocaBytesAligned 96 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p CmdProcessCommandsInfoNVX{..} f = evalContT $ do
lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX)
lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
lift $ poke ((p `plusPtr` 16 :: Ptr ObjectTableNVX)) (objectTable)
lift $ poke ((p `plusPtr` 24 :: Ptr IndirectCommandsLayoutNVX)) (indirectCommandsLayout)
lift $ poke ((p `plusPtr` 32 :: Ptr Word32)) ((fromIntegral (Data.Vector.length $ (indirectCommandsTokens)) :: Word32))
pPIndirectCommandsTokens' <- ContT $ allocaBytesAligned @IndirectCommandsTokenNVX ((Data.Vector.length (indirectCommandsTokens)) * 24) 8
Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPIndirectCommandsTokens' `plusPtr` (24 * (i)) :: Ptr IndirectCommandsTokenNVX) (e) . ($ ())) (indirectCommandsTokens)
lift $ poke ((p `plusPtr` 40 :: Ptr (Ptr IndirectCommandsTokenNVX))) (pPIndirectCommandsTokens')
lift $ poke ((p `plusPtr` 48 :: Ptr Word32)) (maxSequencesCount)
lift $ poke ((p `plusPtr` 56 :: Ptr (Ptr CommandBuffer_T))) (targetCommandBuffer)
lift $ poke ((p `plusPtr` 64 :: Ptr Buffer)) (sequencesCountBuffer)
lift $ poke ((p `plusPtr` 72 :: Ptr DeviceSize)) (sequencesCountOffset)
lift $ poke ((p `plusPtr` 80 :: Ptr Buffer)) (sequencesIndexBuffer)
lift $ poke ((p `plusPtr` 88 :: Ptr DeviceSize)) (sequencesIndexOffset)
lift $ f
cStructSize = 96
cStructAlignment = 8
pokeZeroCStruct p f = evalContT $ do
lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX)
lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
lift $ poke ((p `plusPtr` 16 :: Ptr ObjectTableNVX)) (zero)
lift $ poke ((p `plusPtr` 24 :: Ptr IndirectCommandsLayoutNVX)) (zero)
pPIndirectCommandsTokens' <- ContT $ allocaBytesAligned @IndirectCommandsTokenNVX ((Data.Vector.length (mempty)) * 24) 8
Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPIndirectCommandsTokens' `plusPtr` (24 * (i)) :: Ptr IndirectCommandsTokenNVX) (e) . ($ ())) (mempty)
lift $ poke ((p `plusPtr` 40 :: Ptr (Ptr IndirectCommandsTokenNVX))) (pPIndirectCommandsTokens')
lift $ poke ((p `plusPtr` 48 :: Ptr Word32)) (zero)
lift $ f
instance FromCStruct CmdProcessCommandsInfoNVX where
peekCStruct p = do
objectTable <- peek @ObjectTableNVX ((p `plusPtr` 16 :: Ptr ObjectTableNVX))
indirectCommandsLayout <- peek @IndirectCommandsLayoutNVX ((p `plusPtr` 24 :: Ptr IndirectCommandsLayoutNVX))
indirectCommandsTokenCount <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32))
pIndirectCommandsTokens <- peek @(Ptr IndirectCommandsTokenNVX) ((p `plusPtr` 40 :: Ptr (Ptr IndirectCommandsTokenNVX)))
pIndirectCommandsTokens' <- generateM (fromIntegral indirectCommandsTokenCount) (\i -> peekCStruct @IndirectCommandsTokenNVX ((pIndirectCommandsTokens `advancePtrBytes` (24 * (i)) :: Ptr IndirectCommandsTokenNVX)))
maxSequencesCount <- peek @Word32 ((p `plusPtr` 48 :: Ptr Word32))
targetCommandBuffer <- peek @(Ptr CommandBuffer_T) ((p `plusPtr` 56 :: Ptr (Ptr CommandBuffer_T)))
sequencesCountBuffer <- peek @Buffer ((p `plusPtr` 64 :: Ptr Buffer))
sequencesCountOffset <- peek @DeviceSize ((p `plusPtr` 72 :: Ptr DeviceSize))
sequencesIndexBuffer <- peek @Buffer ((p `plusPtr` 80 :: Ptr Buffer))
sequencesIndexOffset <- peek @DeviceSize ((p `plusPtr` 88 :: Ptr DeviceSize))
pure $ CmdProcessCommandsInfoNVX
objectTable indirectCommandsLayout pIndirectCommandsTokens' maxSequencesCount targetCommandBuffer sequencesCountBuffer sequencesCountOffset sequencesIndexBuffer sequencesIndexOffset
instance Zero CmdProcessCommandsInfoNVX where
zero = CmdProcessCommandsInfoNVX
zero
zero
mempty
zero
zero
zero
zero
zero
zero
data CmdReserveSpaceForCommandsInfoNVX = CmdReserveSpaceForCommandsInfoNVX
{
objectTable :: ObjectTableNVX
,
indirectCommandsLayout :: IndirectCommandsLayoutNVX
,
maxSequencesCount :: Word32
}
deriving (Typeable)
deriving instance Show CmdReserveSpaceForCommandsInfoNVX
instance ToCStruct CmdReserveSpaceForCommandsInfoNVX where
withCStruct x f = allocaBytesAligned 40 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p CmdReserveSpaceForCommandsInfoNVX{..} f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr ObjectTableNVX)) (objectTable)
poke ((p `plusPtr` 24 :: Ptr IndirectCommandsLayoutNVX)) (indirectCommandsLayout)
poke ((p `plusPtr` 32 :: Ptr Word32)) (maxSequencesCount)
f
cStructSize = 40
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr ObjectTableNVX)) (zero)
poke ((p `plusPtr` 24 :: Ptr IndirectCommandsLayoutNVX)) (zero)
poke ((p `plusPtr` 32 :: Ptr Word32)) (zero)
f
instance FromCStruct CmdReserveSpaceForCommandsInfoNVX where
peekCStruct p = do
objectTable <- peek @ObjectTableNVX ((p `plusPtr` 16 :: Ptr ObjectTableNVX))
indirectCommandsLayout <- peek @IndirectCommandsLayoutNVX ((p `plusPtr` 24 :: Ptr IndirectCommandsLayoutNVX))
maxSequencesCount <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32))
pure $ CmdReserveSpaceForCommandsInfoNVX
objectTable indirectCommandsLayout maxSequencesCount
instance Storable CmdReserveSpaceForCommandsInfoNVX where
sizeOf ~_ = 40
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero CmdReserveSpaceForCommandsInfoNVX where
zero = CmdReserveSpaceForCommandsInfoNVX
zero
zero
zero
data ObjectTableCreateInfoNVX = ObjectTableCreateInfoNVX
{
objectEntryTypes :: Vector ObjectEntryTypeNVX
,
objectEntryCounts :: Vector Word32
,
objectEntryUsageFlags :: Vector ObjectEntryUsageFlagsNVX
,
maxUniformBuffersPerDescriptor :: Word32
,
maxStorageBuffersPerDescriptor :: Word32
,
maxStorageImagesPerDescriptor :: Word32
,
maxSampledImagesPerDescriptor :: Word32
,
maxPipelineLayouts :: Word32
}
deriving (Typeable)
deriving instance Show ObjectTableCreateInfoNVX
instance ToCStruct ObjectTableCreateInfoNVX where
withCStruct x f = allocaBytesAligned 72 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p ObjectTableCreateInfoNVX{..} f = evalContT $ do
lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX)
lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
let pObjectEntryTypesLength = Data.Vector.length $ (objectEntryTypes)
let pObjectEntryCountsLength = Data.Vector.length $ (objectEntryCounts)
lift $ unless (pObjectEntryCountsLength == pObjectEntryTypesLength) $
throwIO $ IOError Nothing InvalidArgument "" "pObjectEntryCounts and pObjectEntryTypes must have the same length" Nothing Nothing
let pObjectEntryUsageFlagsLength = Data.Vector.length $ (objectEntryUsageFlags)
lift $ unless (pObjectEntryUsageFlagsLength == pObjectEntryTypesLength) $
throwIO $ IOError Nothing InvalidArgument "" "pObjectEntryUsageFlags and pObjectEntryTypes must have the same length" Nothing Nothing
lift $ poke ((p `plusPtr` 16 :: Ptr Word32)) ((fromIntegral pObjectEntryTypesLength :: Word32))
pPObjectEntryTypes' <- ContT $ allocaBytesAligned @ObjectEntryTypeNVX ((Data.Vector.length (objectEntryTypes)) * 4) 4
lift $ Data.Vector.imapM_ (\i e -> poke (pPObjectEntryTypes' `plusPtr` (4 * (i)) :: Ptr ObjectEntryTypeNVX) (e)) (objectEntryTypes)
lift $ poke ((p `plusPtr` 24 :: Ptr (Ptr ObjectEntryTypeNVX))) (pPObjectEntryTypes')
pPObjectEntryCounts' <- ContT $ allocaBytesAligned @Word32 ((Data.Vector.length (objectEntryCounts)) * 4) 4
lift $ Data.Vector.imapM_ (\i e -> poke (pPObjectEntryCounts' `plusPtr` (4 * (i)) :: Ptr Word32) (e)) (objectEntryCounts)
lift $ poke ((p `plusPtr` 32 :: Ptr (Ptr Word32))) (pPObjectEntryCounts')
pPObjectEntryUsageFlags' <- ContT $ allocaBytesAligned @ObjectEntryUsageFlagsNVX ((Data.Vector.length (objectEntryUsageFlags)) * 4) 4
lift $ Data.Vector.imapM_ (\i e -> poke (pPObjectEntryUsageFlags' `plusPtr` (4 * (i)) :: Ptr ObjectEntryUsageFlagsNVX) (e)) (objectEntryUsageFlags)
lift $ poke ((p `plusPtr` 40 :: Ptr (Ptr ObjectEntryUsageFlagsNVX))) (pPObjectEntryUsageFlags')
lift $ poke ((p `plusPtr` 48 :: Ptr Word32)) (maxUniformBuffersPerDescriptor)
lift $ poke ((p `plusPtr` 52 :: Ptr Word32)) (maxStorageBuffersPerDescriptor)
lift $ poke ((p `plusPtr` 56 :: Ptr Word32)) (maxStorageImagesPerDescriptor)
lift $ poke ((p `plusPtr` 60 :: Ptr Word32)) (maxSampledImagesPerDescriptor)
lift $ poke ((p `plusPtr` 64 :: Ptr Word32)) (maxPipelineLayouts)
lift $ f
cStructSize = 72
cStructAlignment = 8
pokeZeroCStruct p f = evalContT $ do
lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX)
lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
pPObjectEntryTypes' <- ContT $ allocaBytesAligned @ObjectEntryTypeNVX ((Data.Vector.length (mempty)) * 4) 4
lift $ Data.Vector.imapM_ (\i e -> poke (pPObjectEntryTypes' `plusPtr` (4 * (i)) :: Ptr ObjectEntryTypeNVX) (e)) (mempty)
lift $ poke ((p `plusPtr` 24 :: Ptr (Ptr ObjectEntryTypeNVX))) (pPObjectEntryTypes')
pPObjectEntryCounts' <- ContT $ allocaBytesAligned @Word32 ((Data.Vector.length (mempty)) * 4) 4
lift $ Data.Vector.imapM_ (\i e -> poke (pPObjectEntryCounts' `plusPtr` (4 * (i)) :: Ptr Word32) (e)) (mempty)
lift $ poke ((p `plusPtr` 32 :: Ptr (Ptr Word32))) (pPObjectEntryCounts')
pPObjectEntryUsageFlags' <- ContT $ allocaBytesAligned @ObjectEntryUsageFlagsNVX ((Data.Vector.length (mempty)) * 4) 4
lift $ Data.Vector.imapM_ (\i e -> poke (pPObjectEntryUsageFlags' `plusPtr` (4 * (i)) :: Ptr ObjectEntryUsageFlagsNVX) (e)) (mempty)
lift $ poke ((p `plusPtr` 40 :: Ptr (Ptr ObjectEntryUsageFlagsNVX))) (pPObjectEntryUsageFlags')
lift $ poke ((p `plusPtr` 48 :: Ptr Word32)) (zero)
lift $ poke ((p `plusPtr` 52 :: Ptr Word32)) (zero)
lift $ poke ((p `plusPtr` 56 :: Ptr Word32)) (zero)
lift $ poke ((p `plusPtr` 60 :: Ptr Word32)) (zero)
lift $ poke ((p `plusPtr` 64 :: Ptr Word32)) (zero)
lift $ f
instance FromCStruct ObjectTableCreateInfoNVX where
peekCStruct p = do
objectCount <- peek @Word32 ((p `plusPtr` 16 :: Ptr Word32))
pObjectEntryTypes <- peek @(Ptr ObjectEntryTypeNVX) ((p `plusPtr` 24 :: Ptr (Ptr ObjectEntryTypeNVX)))
pObjectEntryTypes' <- generateM (fromIntegral objectCount) (\i -> peek @ObjectEntryTypeNVX ((pObjectEntryTypes `advancePtrBytes` (4 * (i)) :: Ptr ObjectEntryTypeNVX)))
pObjectEntryCounts <- peek @(Ptr Word32) ((p `plusPtr` 32 :: Ptr (Ptr Word32)))
pObjectEntryCounts' <- generateM (fromIntegral objectCount) (\i -> peek @Word32 ((pObjectEntryCounts `advancePtrBytes` (4 * (i)) :: Ptr Word32)))
pObjectEntryUsageFlags <- peek @(Ptr ObjectEntryUsageFlagsNVX) ((p `plusPtr` 40 :: Ptr (Ptr ObjectEntryUsageFlagsNVX)))
pObjectEntryUsageFlags' <- generateM (fromIntegral objectCount) (\i -> peek @ObjectEntryUsageFlagsNVX ((pObjectEntryUsageFlags `advancePtrBytes` (4 * (i)) :: Ptr ObjectEntryUsageFlagsNVX)))
maxUniformBuffersPerDescriptor <- peek @Word32 ((p `plusPtr` 48 :: Ptr Word32))
maxStorageBuffersPerDescriptor <- peek @Word32 ((p `plusPtr` 52 :: Ptr Word32))
maxStorageImagesPerDescriptor <- peek @Word32 ((p `plusPtr` 56 :: Ptr Word32))
maxSampledImagesPerDescriptor <- peek @Word32 ((p `plusPtr` 60 :: Ptr Word32))
maxPipelineLayouts <- peek @Word32 ((p `plusPtr` 64 :: Ptr Word32))
pure $ ObjectTableCreateInfoNVX
pObjectEntryTypes' pObjectEntryCounts' pObjectEntryUsageFlags' maxUniformBuffersPerDescriptor maxStorageBuffersPerDescriptor maxStorageImagesPerDescriptor maxSampledImagesPerDescriptor maxPipelineLayouts
instance Zero ObjectTableCreateInfoNVX where
zero = ObjectTableCreateInfoNVX
mempty
mempty
mempty
zero
zero
zero
zero
zero
data ObjectTableEntryNVX = ObjectTableEntryNVX
{
type' :: ObjectEntryTypeNVX
,
flags :: ObjectEntryUsageFlagsNVX
}
deriving (Typeable)
deriving instance Show ObjectTableEntryNVX
instance ToCStruct ObjectTableEntryNVX where
withCStruct x f = allocaBytesAligned 8 4 $ \p -> pokeCStruct p x (f p)
pokeCStruct p ObjectTableEntryNVX{..} f = do
poke ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX)) (type')
poke ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX)) (flags)
f
cStructSize = 8
cStructAlignment = 4
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX)) (zero)
poke ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX)) (zero)
f
instance FromCStruct ObjectTableEntryNVX where
peekCStruct p = do
type' <- peek @ObjectEntryTypeNVX ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX))
flags <- peek @ObjectEntryUsageFlagsNVX ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX))
pure $ ObjectTableEntryNVX
type' flags
instance Storable ObjectTableEntryNVX where
sizeOf ~_ = 8
alignment ~_ = 4
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero ObjectTableEntryNVX where
zero = ObjectTableEntryNVX
zero
zero
data ObjectTablePipelineEntryNVX = ObjectTablePipelineEntryNVX
{
type' :: ObjectEntryTypeNVX
,
flags :: ObjectEntryUsageFlagsNVX
,
pipeline :: Pipeline
}
deriving (Typeable)
deriving instance Show ObjectTablePipelineEntryNVX
instance ToCStruct ObjectTablePipelineEntryNVX where
withCStruct x f = allocaBytesAligned 16 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p ObjectTablePipelineEntryNVX{..} f = do
poke ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX)) (type')
poke ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX)) (flags)
poke ((p `plusPtr` 8 :: Ptr Pipeline)) (pipeline)
f
cStructSize = 16
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX)) (zero)
poke ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX)) (zero)
poke ((p `plusPtr` 8 :: Ptr Pipeline)) (zero)
f
instance FromCStruct ObjectTablePipelineEntryNVX where
peekCStruct p = do
type' <- peek @ObjectEntryTypeNVX ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX))
flags <- peek @ObjectEntryUsageFlagsNVX ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX))
pipeline <- peek @Pipeline ((p `plusPtr` 8 :: Ptr Pipeline))
pure $ ObjectTablePipelineEntryNVX
type' flags pipeline
instance Storable ObjectTablePipelineEntryNVX where
sizeOf ~_ = 16
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero ObjectTablePipelineEntryNVX where
zero = ObjectTablePipelineEntryNVX
zero
zero
zero
data ObjectTableDescriptorSetEntryNVX = ObjectTableDescriptorSetEntryNVX
{
type' :: ObjectEntryTypeNVX
,
flags :: ObjectEntryUsageFlagsNVX
,
pipelineLayout :: PipelineLayout
,
descriptorSet :: DescriptorSet
}
deriving (Typeable)
deriving instance Show ObjectTableDescriptorSetEntryNVX
instance ToCStruct ObjectTableDescriptorSetEntryNVX where
withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p ObjectTableDescriptorSetEntryNVX{..} f = do
poke ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX)) (type')
poke ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX)) (flags)
poke ((p `plusPtr` 8 :: Ptr PipelineLayout)) (pipelineLayout)
poke ((p `plusPtr` 16 :: Ptr DescriptorSet)) (descriptorSet)
f
cStructSize = 24
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX)) (zero)
poke ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX)) (zero)
poke ((p `plusPtr` 8 :: Ptr PipelineLayout)) (zero)
poke ((p `plusPtr` 16 :: Ptr DescriptorSet)) (zero)
f
instance FromCStruct ObjectTableDescriptorSetEntryNVX where
peekCStruct p = do
type' <- peek @ObjectEntryTypeNVX ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX))
flags <- peek @ObjectEntryUsageFlagsNVX ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX))
pipelineLayout <- peek @PipelineLayout ((p `plusPtr` 8 :: Ptr PipelineLayout))
descriptorSet <- peek @DescriptorSet ((p `plusPtr` 16 :: Ptr DescriptorSet))
pure $ ObjectTableDescriptorSetEntryNVX
type' flags pipelineLayout descriptorSet
instance Storable ObjectTableDescriptorSetEntryNVX where
sizeOf ~_ = 24
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero ObjectTableDescriptorSetEntryNVX where
zero = ObjectTableDescriptorSetEntryNVX
zero
zero
zero
zero
data ObjectTableVertexBufferEntryNVX = ObjectTableVertexBufferEntryNVX
{
type' :: ObjectEntryTypeNVX
,
flags :: ObjectEntryUsageFlagsNVX
,
buffer :: Buffer
}
deriving (Typeable)
deriving instance Show ObjectTableVertexBufferEntryNVX
instance ToCStruct ObjectTableVertexBufferEntryNVX where
withCStruct x f = allocaBytesAligned 16 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p ObjectTableVertexBufferEntryNVX{..} f = do
poke ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX)) (type')
poke ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX)) (flags)
poke ((p `plusPtr` 8 :: Ptr Buffer)) (buffer)
f
cStructSize = 16
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX)) (zero)
poke ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX)) (zero)
poke ((p `plusPtr` 8 :: Ptr Buffer)) (zero)
f
instance FromCStruct ObjectTableVertexBufferEntryNVX where
peekCStruct p = do
type' <- peek @ObjectEntryTypeNVX ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX))
flags <- peek @ObjectEntryUsageFlagsNVX ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX))
buffer <- peek @Buffer ((p `plusPtr` 8 :: Ptr Buffer))
pure $ ObjectTableVertexBufferEntryNVX
type' flags buffer
instance Storable ObjectTableVertexBufferEntryNVX where
sizeOf ~_ = 16
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero ObjectTableVertexBufferEntryNVX where
zero = ObjectTableVertexBufferEntryNVX
zero
zero
zero
data ObjectTableIndexBufferEntryNVX = ObjectTableIndexBufferEntryNVX
{
type' :: ObjectEntryTypeNVX
,
flags :: ObjectEntryUsageFlagsNVX
,
buffer :: Buffer
,
indexType :: IndexType
}
deriving (Typeable)
deriving instance Show ObjectTableIndexBufferEntryNVX
instance ToCStruct ObjectTableIndexBufferEntryNVX where
withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p ObjectTableIndexBufferEntryNVX{..} f = do
poke ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX)) (type')
poke ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX)) (flags)
poke ((p `plusPtr` 8 :: Ptr Buffer)) (buffer)
poke ((p `plusPtr` 16 :: Ptr IndexType)) (indexType)
f
cStructSize = 24
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX)) (zero)
poke ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX)) (zero)
poke ((p `plusPtr` 8 :: Ptr Buffer)) (zero)
poke ((p `plusPtr` 16 :: Ptr IndexType)) (zero)
f
instance FromCStruct ObjectTableIndexBufferEntryNVX where
peekCStruct p = do
type' <- peek @ObjectEntryTypeNVX ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX))
flags <- peek @ObjectEntryUsageFlagsNVX ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX))
buffer <- peek @Buffer ((p `plusPtr` 8 :: Ptr Buffer))
indexType <- peek @IndexType ((p `plusPtr` 16 :: Ptr IndexType))
pure $ ObjectTableIndexBufferEntryNVX
type' flags buffer indexType
instance Storable ObjectTableIndexBufferEntryNVX where
sizeOf ~_ = 24
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero ObjectTableIndexBufferEntryNVX where
zero = ObjectTableIndexBufferEntryNVX
zero
zero
zero
zero
data ObjectTablePushConstantEntryNVX = ObjectTablePushConstantEntryNVX
{
type' :: ObjectEntryTypeNVX
,
flags :: ObjectEntryUsageFlagsNVX
,
pipelineLayout :: PipelineLayout
,
stageFlags :: ShaderStageFlags
}
deriving (Typeable)
deriving instance Show ObjectTablePushConstantEntryNVX
instance ToCStruct ObjectTablePushConstantEntryNVX where
withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p ObjectTablePushConstantEntryNVX{..} f = do
poke ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX)) (type')
poke ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX)) (flags)
poke ((p `plusPtr` 8 :: Ptr PipelineLayout)) (pipelineLayout)
poke ((p `plusPtr` 16 :: Ptr ShaderStageFlags)) (stageFlags)
f
cStructSize = 24
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX)) (zero)
poke ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX)) (zero)
poke ((p `plusPtr` 8 :: Ptr PipelineLayout)) (zero)
poke ((p `plusPtr` 16 :: Ptr ShaderStageFlags)) (zero)
f
instance FromCStruct ObjectTablePushConstantEntryNVX where
peekCStruct p = do
type' <- peek @ObjectEntryTypeNVX ((p `plusPtr` 0 :: Ptr ObjectEntryTypeNVX))
flags <- peek @ObjectEntryUsageFlagsNVX ((p `plusPtr` 4 :: Ptr ObjectEntryUsageFlagsNVX))
pipelineLayout <- peek @PipelineLayout ((p `plusPtr` 8 :: Ptr PipelineLayout))
stageFlags <- peek @ShaderStageFlags ((p `plusPtr` 16 :: Ptr ShaderStageFlags))
pure $ ObjectTablePushConstantEntryNVX
type' flags pipelineLayout stageFlags
instance Storable ObjectTablePushConstantEntryNVX where
sizeOf ~_ = 24
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero ObjectTablePushConstantEntryNVX where
zero = ObjectTablePushConstantEntryNVX
zero
zero
zero
zero
newtype IndirectCommandsLayoutUsageFlagBitsNVX = IndirectCommandsLayoutUsageFlagBitsNVX Flags
deriving newtype (Eq, Ord, Storable, Zero, Bits)
pattern INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = IndirectCommandsLayoutUsageFlagBitsNVX 0x00000001
pattern INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = IndirectCommandsLayoutUsageFlagBitsNVX 0x00000002
pattern INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = IndirectCommandsLayoutUsageFlagBitsNVX 0x00000004
pattern INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = IndirectCommandsLayoutUsageFlagBitsNVX 0x00000008
type IndirectCommandsLayoutUsageFlagsNVX = IndirectCommandsLayoutUsageFlagBitsNVX
instance Show IndirectCommandsLayoutUsageFlagBitsNVX where
showsPrec p = \case
INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX -> showString "INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX"
INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX -> showString "INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX"
INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX -> showString "INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX"
INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX -> showString "INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX"
IndirectCommandsLayoutUsageFlagBitsNVX x -> showParen (p >= 11) (showString "IndirectCommandsLayoutUsageFlagBitsNVX 0x" . showHex x)
instance Read IndirectCommandsLayoutUsageFlagBitsNVX where
readPrec = parens (choose [("INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX", pure INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX)
, ("INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX", pure INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX)
, ("INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX", pure INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX)
, ("INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX", pure INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX)]
+++
prec 10 (do
expectP (Ident "IndirectCommandsLayoutUsageFlagBitsNVX")
v <- step readPrec
pure (IndirectCommandsLayoutUsageFlagBitsNVX v)))
newtype ObjectEntryUsageFlagBitsNVX = ObjectEntryUsageFlagBitsNVX Flags
deriving newtype (Eq, Ord, Storable, Zero, Bits)
pattern OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = ObjectEntryUsageFlagBitsNVX 0x00000001
pattern OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = ObjectEntryUsageFlagBitsNVX 0x00000002
type ObjectEntryUsageFlagsNVX = ObjectEntryUsageFlagBitsNVX
instance Show ObjectEntryUsageFlagBitsNVX where
showsPrec p = \case
OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX -> showString "OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX"
OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX -> showString "OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX"
ObjectEntryUsageFlagBitsNVX x -> showParen (p >= 11) (showString "ObjectEntryUsageFlagBitsNVX 0x" . showHex x)
instance Read ObjectEntryUsageFlagBitsNVX where
readPrec = parens (choose [("OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX", pure OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX)
, ("OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX", pure OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX)]
+++
prec 10 (do
expectP (Ident "ObjectEntryUsageFlagBitsNVX")
v <- step readPrec
pure (ObjectEntryUsageFlagBitsNVX v)))
newtype IndirectCommandsTokenTypeNVX = IndirectCommandsTokenTypeNVX Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX = IndirectCommandsTokenTypeNVX 0
pattern INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX = IndirectCommandsTokenTypeNVX 1
pattern INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX = IndirectCommandsTokenTypeNVX 2
pattern INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX = IndirectCommandsTokenTypeNVX 3
pattern INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX = IndirectCommandsTokenTypeNVX 4
pattern INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX = IndirectCommandsTokenTypeNVX 5
pattern INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX = IndirectCommandsTokenTypeNVX 6
pattern INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX = IndirectCommandsTokenTypeNVX 7
{-# complete INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX,
INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX,
INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX,
INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX,
INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX,
INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX,
INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX,
INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX :: IndirectCommandsTokenTypeNVX #-}
instance Show IndirectCommandsTokenTypeNVX where
showsPrec p = \case
INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX -> showString "INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX"
INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX -> showString "INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX"
INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX -> showString "INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX"
INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX -> showString "INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX"
INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX -> showString "INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX"
INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX -> showString "INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX"
INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX -> showString "INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX"
INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX -> showString "INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX"
IndirectCommandsTokenTypeNVX x -> showParen (p >= 11) (showString "IndirectCommandsTokenTypeNVX " . showsPrec 11 x)
instance Read IndirectCommandsTokenTypeNVX where
readPrec = parens (choose [("INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX", pure INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX)
, ("INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX", pure INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX)
, ("INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX", pure INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX)
, ("INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX", pure INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX)
, ("INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX", pure INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX)
, ("INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX", pure INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX)
, ("INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX", pure INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX)
, ("INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX", pure INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX)]
+++
prec 10 (do
expectP (Ident "IndirectCommandsTokenTypeNVX")
v <- step readPrec
pure (IndirectCommandsTokenTypeNVX v)))
newtype ObjectEntryTypeNVX = ObjectEntryTypeNVX Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX = ObjectEntryTypeNVX 0
pattern OBJECT_ENTRY_TYPE_PIPELINE_NVX = ObjectEntryTypeNVX 1
pattern OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX = ObjectEntryTypeNVX 2
pattern OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX = ObjectEntryTypeNVX 3
pattern OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX = ObjectEntryTypeNVX 4
{-# complete OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX,
OBJECT_ENTRY_TYPE_PIPELINE_NVX,
OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX,
OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX,
OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX :: ObjectEntryTypeNVX #-}
instance Show ObjectEntryTypeNVX where
showsPrec p = \case
OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX -> showString "OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX"
OBJECT_ENTRY_TYPE_PIPELINE_NVX -> showString "OBJECT_ENTRY_TYPE_PIPELINE_NVX"
OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX -> showString "OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX"
OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX -> showString "OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX"
OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX -> showString "OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX"
ObjectEntryTypeNVX x -> showParen (p >= 11) (showString "ObjectEntryTypeNVX " . showsPrec 11 x)
instance Read ObjectEntryTypeNVX where
readPrec = parens (choose [("OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX", pure OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX)
, ("OBJECT_ENTRY_TYPE_PIPELINE_NVX", pure OBJECT_ENTRY_TYPE_PIPELINE_NVX)
, ("OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX", pure OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX)
, ("OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX", pure OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX)
, ("OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX", pure OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX)]
+++
prec 10 (do
expectP (Ident "ObjectEntryTypeNVX")
v <- step readPrec
pure (ObjectEntryTypeNVX v)))
type NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION = 3
pattern NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION :: forall a . Integral a => a
pattern NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION = 3
type NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NVX_device_generated_commands"
pattern NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NVX_device_generated_commands"