{-# language CPP #-} module Vulkan.Extensions.VK_NV_mesh_shader ( cmdDrawMeshTasksNV , cmdDrawMeshTasksIndirectNV , cmdDrawMeshTasksIndirectCountNV , PhysicalDeviceMeshShaderFeaturesNV(..) , PhysicalDeviceMeshShaderPropertiesNV(..) , DrawMeshTasksIndirectCommandNV(..) , NV_MESH_SHADER_SPEC_VERSION , pattern NV_MESH_SHADER_SPEC_VERSION , NV_MESH_SHADER_EXTENSION_NAME , pattern NV_MESH_SHADER_EXTENSION_NAME ) where import Vulkan.CStruct.Utils (FixedArray) import Control.Monad (unless) import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import GHC.IO (throwIO) import GHC.Ptr (nullFunPtr) import Foreign.Ptr (nullPtr) import Foreign.Ptr (plusPtr) import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek)) import Foreign.Storable (Storable(poke)) import qualified Foreign.Storable (Storable(..)) import GHC.Generics (Generic) import GHC.IO.Exception (IOErrorType(..)) import GHC.IO.Exception (IOException(..)) import Foreign.Ptr (FunPtr) import Foreign.Ptr (Ptr) import Data.Word (Word32) import Data.Kind (Type) import Vulkan.CStruct.Utils (advancePtrBytes) import Vulkan.Core10.FundamentalTypes (bool32ToBool) import Vulkan.Core10.FundamentalTypes (boolToBool32) import Vulkan.CStruct.Utils (lowerArrayPtr) import Vulkan.NamedType ((:::)) import Vulkan.Core10.FundamentalTypes (Bool32) import Vulkan.Core10.Handles (Buffer) import Vulkan.Core10.Handles (Buffer(..)) import Vulkan.Core10.Handles (CommandBuffer) import Vulkan.Core10.Handles (CommandBuffer(..)) import Vulkan.Core10.Handles (CommandBuffer_T) import Vulkan.Dynamic (DeviceCmds(pVkCmdDrawMeshTasksIndirectCountNV)) import Vulkan.Dynamic (DeviceCmds(pVkCmdDrawMeshTasksIndirectNV)) import Vulkan.Dynamic (DeviceCmds(pVkCmdDrawMeshTasksNV)) import Vulkan.Core10.FundamentalTypes (DeviceSize) import Vulkan.CStruct (FromCStruct) import Vulkan.CStruct (FromCStruct(..)) import Vulkan.Core10.Enums.StructureType (StructureType) import Vulkan.CStruct (ToCStruct) import Vulkan.CStruct (ToCStruct(..)) import Vulkan.Zero (Zero(..)) import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV)) import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV)) foreign import ccall #if !defined(SAFE_FOREIGN_CALLS) unsafe #endif "dynamic" mkVkCmdDrawMeshTasksNV :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> IO () -- | vkCmdDrawMeshTasksNV - Draw mesh task work items -- -- = Description -- -- When the command is executed, a global workgroup consisting of -- @taskCount@ local workgroups is assembled. -- -- == Valid Usage -- -- - If a 'Vulkan.Core10.Handles.Sampler' created with @magFilter@ or -- @minFilter@ equal to 'Vulkan.Core10.Enums.Filter.FILTER_LINEAR' and -- @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' is -- used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of -- this command, then the image view’s -- -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- -- - If a 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s -- -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT' -- -- - If a 'Vulkan.Core10.Handles.ImageView' is sampled with -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as a result -- of this command, then the image view’s -- -- /must/ contain -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT' -- -- - Any 'Vulkan.Core10.Handles.ImageView' being sampled with -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as a result -- of this command /must/ have a -- 'Vulkan.Core10.Enums.ImageViewType.ImageViewType' and format that -- supports cubic filtering, as specified by -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@ -- returned by -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Vulkan.Core10.Handles.ImageView' being sampled with -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' with a -- reduction mode of either -- 'Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN' -- or -- 'Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX' -- as a result of this command /must/ have a -- 'Vulkan.Core10.Enums.ImageViewType.ImageViewType' and format that -- supports cubic filtering together with minmax filtering, as -- specified by -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@ -- returned by -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Vulkan.Core10.Handles.Image' created with a -- 'Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV' -- sampled as a result of this command /must/ only be sampled using a -- 'Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode' of -- 'Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE' -- -- - For each set /n/ that is statically used by the -- 'Vulkan.Core10.Handles.Pipeline' bound to the pipeline bind point -- used by this command, a descriptor set /must/ have been bound to /n/ -- at the same pipeline bind point, with a -- 'Vulkan.Core10.Handles.PipelineLayout' that is compatible for set -- /n/, with the 'Vulkan.Core10.Handles.PipelineLayout' used to create -- the current 'Vulkan.Core10.Handles.Pipeline', as described in -- -- -- - For each push constant that is statically used by the -- 'Vulkan.Core10.Handles.Pipeline' bound to the pipeline bind point -- used by this command, a push constant value /must/ have been set for -- the same pipeline bind point, with a -- 'Vulkan.Core10.Handles.PipelineLayout' that is compatible for push -- constants, with the 'Vulkan.Core10.Handles.PipelineLayout' used to -- create the current 'Vulkan.Core10.Handles.Pipeline', as described in -- -- -- - Descriptors in each bound descriptor set, specified via -- 'Vulkan.Core10.CommandBufferBuilding.cmdBindDescriptorSets', /must/ -- be valid if they are statically used by the -- 'Vulkan.Core10.Handles.Pipeline' bound to the pipeline bind point -- used by this command -- -- - A valid pipeline /must/ be bound to the pipeline bind point used by -- this command -- -- - If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline -- bind point used by this command requires any dynamic state, that -- state /must/ have been set for @commandBuffer@, and done so after -- any previously bound pipeline with the corresponding state not -- specified as dynamic -- -- - There /must/ not have been any calls to dynamic state setting -- commands for any state not specified as dynamic in the -- 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline bind -- point used by this command, since that pipeline was bound -- -- - If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline -- bind point used by this command accesses a -- 'Vulkan.Core10.Handles.Sampler' object that uses unnormalized -- coordinates, that sampler /must/ not be used to sample from any -- 'Vulkan.Core10.Handles.Image' with a -- 'Vulkan.Core10.Handles.ImageView' of the type -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D', -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE', -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY', -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY' or -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY', in -- any shader stage -- -- - If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline -- bind point used by this command accesses a -- 'Vulkan.Core10.Handles.Sampler' object that uses unnormalized -- coordinates, that sampler /must/ not be used with any of the SPIR-V -- @OpImageSample*@ or @OpImageSparseSample*@ instructions with -- @ImplicitLod@, @Dref@ or @Proj@ in their name, in any shader stage -- -- - If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline -- bind point used by this command accesses a -- 'Vulkan.Core10.Handles.Sampler' object that uses unnormalized -- coordinates, that sampler /must/ not be used with any of the SPIR-V -- @OpImageSample*@ or @OpImageSparseSample*@ instructions that -- includes a LOD bias or any offset values, in any shader stage -- -- - If the -- -- feature is not enabled, and if the 'Vulkan.Core10.Handles.Pipeline' -- object bound to the pipeline bind point used by this command -- accesses a uniform buffer, it /must/ not access values outside of -- the range of the buffer as specified in the descriptor set bound to -- the same pipeline bind point -- -- - If the -- -- feature is not enabled, and if the 'Vulkan.Core10.Handles.Pipeline' -- object bound to the pipeline bind point used by this command -- accesses a storage buffer, it /must/ not access values outside of -- the range of the buffer as specified in the descriptor set bound to -- the same pipeline bind point -- -- - If @commandBuffer@ is an unprotected command buffer, any resource -- accessed by the 'Vulkan.Core10.Handles.Pipeline' object bound to the -- pipeline bind point used by this command /must/ not be a protected -- resource -- -- - If a 'Vulkan.Core10.Handles.ImageView' is accessed using -- @OpImageWrite@ as a result of this command, then the @Type@ of the -- @Texel@ operand of that instruction /must/ have at least as many -- components as the image view’s format. -- -- - If a 'Vulkan.Core10.Handles.BufferView' is accessed using -- @OpImageWrite@ as a result of this command, then the @Type@ of the -- @Texel@ operand of that instruction /must/ have at least as many -- components as the image view’s format. -- -- - If a 'Vulkan.Core10.Handles.ImageView' with a -- 'Vulkan.Core10.Enums.Format.Format' that has a 64-bit channel width -- is accessed as a result of this command, the @SampledType@ of the -- @OpTypeImage@ operand of that instruction /must/ have a @Width@ of -- 64. -- -- - If a 'Vulkan.Core10.Handles.ImageView' with a -- 'Vulkan.Core10.Enums.Format.Format' that has a channel width less -- than 64-bit is accessed as a result of this command, the -- @SampledType@ of the @OpTypeImage@ operand of that instruction -- /must/ have a @Width@ of 32. -- -- - If a 'Vulkan.Core10.Handles.BufferView' with a -- 'Vulkan.Core10.Enums.Format.Format' that has a 64-bit channel width -- is accessed as a result of this command, the @SampledType@ of the -- @OpTypeImage@ operand of that instruction /must/ have a @Width@ of -- 64. -- -- - If a 'Vulkan.Core10.Handles.BufferView' with a -- 'Vulkan.Core10.Enums.Format.Format' that has a channel width less -- than 64-bit is accessed as a result of this command, the -- @SampledType@ of the @OpTypeImage@ operand of that instruction -- /must/ have a @Width@ of 32. -- -- - If the -- -- feature is not enabled, 'Vulkan.Core10.Handles.Image' objects -- created with the -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT' -- flag /must/ not be accessed by atomic instructions through an -- @OpTypeImage@ with a @SampledType@ with a @Width@ of 64 by this -- command. -- -- - If the -- -- feature is not enabled, 'Vulkan.Core10.Handles.Buffer' objects -- created with the -- 'Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_RESIDENCY_BIT' -- flag /must/ not be accessed by atomic instructions through an -- @OpTypeImage@ with a @SampledType@ with a @Width@ of 64 by this -- command. -- -- - The current render pass /must/ be -- -- with the @renderPass@ member of the -- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' structure -- specified when creating the 'Vulkan.Core10.Handles.Pipeline' bound -- to -- 'Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS' -- -- - The subpass index of the current render pass /must/ be equal to the -- @subpass@ member of the -- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' structure -- specified when creating the 'Vulkan.Core10.Handles.Pipeline' bound -- to -- 'Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS' -- -- - Every input attachment used by the current subpass /must/ be bound -- to the pipeline via a descriptor set -- -- - Image subresources used as attachments in the current render pass -- /must/ not be accessed in any way other than as an attachment by -- this command -- -- - If the draw is recorded in a render pass instance with multiview -- enabled, the maximum instance index /must/ be less than or equal to -- 'Vulkan.Core11.Promoted_From_VK_KHR_multiview.PhysicalDeviceMultiviewProperties'::@maxMultiviewInstanceIndex@ -- -- - If the bound graphics pipeline was created with -- 'Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@ -- set to 'Vulkan.Core10.FundamentalTypes.TRUE' and the current subpass -- has a depth\/stencil attachment, then that attachment /must/ have -- been created with the -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT' -- bit set -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, but not the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT' -- dynamic state enabled, then -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @viewportCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ match the -- 'Vulkan.Core10.Pipeline.PipelineViewportStateCreateInfo'::@scissorCount@ -- of the pipeline -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT' -- dynamic state enabled, but not the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, then -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetScissorWithCountEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @scissorCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetScissorWithCountEXT' -- /must/ match the -- 'Vulkan.Core10.Pipeline.PipelineViewportStateCreateInfo'::@viewportCount@ -- of the pipeline -- -- - If the bound graphics pipeline state was created with both the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT' -- and -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic states enabled then both -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- and -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetScissorWithCountEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @viewportCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ match the @scissorCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetScissorWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, but not the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_W_SCALING_NV' -- dynamic state enabled, then the bound graphics pipeline /must/ have -- been created with -- 'Vulkan.Extensions.VK_NV_clip_space_w_scaling.PipelineViewportWScalingStateCreateInfoNV'::@viewportCount@ -- greater or equal to the @viewportCount@ parameter in the last call -- to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- and -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_W_SCALING_NV' -- dynamic states enabled then the @viewportCount@ parameter in the -- last call to -- 'Vulkan.Extensions.VK_NV_clip_space_w_scaling.cmdSetViewportWScalingNV' -- /must/ be greater than or equal to the @viewportCount@ parameter in -- the last call to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, but not the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV' -- dynamic state enabled, then the bound graphics pipeline /must/ have -- been created with -- 'Vulkan.Extensions.VK_NV_shading_rate_image.PipelineViewportShadingRateImageStateCreateInfoNV'::@viewportCount@ -- greater or equal to the @viewportCount@ parameter in the last call -- to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- and -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV' -- dynamic states enabled then the @viewportCount@ parameter in the -- last call to -- 'Vulkan.Extensions.VK_NV_shading_rate_image.cmdSetViewportShadingRatePaletteNV' -- /must/ be greater than or equal to the @viewportCount@ parameter in -- the last call to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled and an instance of -- 'Vulkan.Extensions.VK_NV_viewport_swizzle.PipelineViewportSwizzleStateCreateInfoNV' -- chained from @VkPipelineVieportCreateInfo@, then the bound graphics -- pipeline /must/ have been created with -- 'Vulkan.Extensions.VK_NV_viewport_swizzle.PipelineViewportSwizzleStateCreateInfoNV'::@viewportCount@ -- greater or equal to the @viewportCount@ parameter in the last call -- to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled and an instance of -- 'Vulkan.Extensions.VK_NV_scissor_exclusive.PipelineViewportExclusiveScissorStateCreateInfoNV' -- chained from @VkPipelineVieportCreateInfo@, then the bound graphics -- pipeline /must/ have been created with -- 'Vulkan.Extensions.VK_NV_scissor_exclusive.PipelineViewportExclusiveScissorStateCreateInfoNV'::@exclusiveScissorCount@ -- greater or equal to the @viewportCount@ parameter in the last call -- to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT' -- dynamic state enabled then -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetPrimitiveTopologyEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @primitiveTopology@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetPrimitiveTopologyEXT' -- /must/ be of the same -- -- as the pipeline -- 'Vulkan.Core10.Pipeline.PipelineInputAssemblyStateCreateInfo'::@topology@ -- state -- -- - If the -- -- limit is not supported, the bound graphics pipeline was created with -- the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, and any of the shader stages of the bound -- graphics pipeline write to the @PrimitiveShadingRateKHR@ built-in, -- then -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @viewportCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ be @1@ -- -- - @taskCount@ /must/ be less than or equal to -- 'PhysicalDeviceMeshShaderPropertiesNV'::@maxDrawMeshTasksCount@ -- -- == Valid Usage (Implicit) -- -- - @commandBuffer@ /must/ be a valid -- 'Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @commandBuffer@ /must/ be in the -- -- -- - The 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was -- allocated from /must/ support graphics operations -- -- - This command /must/ only be called inside of a render pass instance -- -- == Host Synchronization -- -- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Vulkan.Core10.Handles.CommandPool' that -- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties -- -- \' -- -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -- | | | | | -- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+ -- | Primary | Inside | Graphics | Graphics | -- | Secondary | | | | -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -- -- = See Also -- -- 'Vulkan.Core10.Handles.CommandBuffer' cmdDrawMeshTasksNV :: forall io . (MonadIO io) => -- | @commandBuffer@ is the command buffer into which the command will be -- recorded. CommandBuffer -> -- | @taskCount@ is the number of local workgroups to dispatch in the X -- dimension. Y and Z dimension are implicitly set to one. ("taskCount" ::: Word32) -> -- | @firstTask@ is the X component of the first workgroup ID. ("firstTask" ::: Word32) -> io () cmdDrawMeshTasksNV commandBuffer taskCount firstTask = liftIO $ do let vkCmdDrawMeshTasksNVPtr = pVkCmdDrawMeshTasksNV (deviceCmds (commandBuffer :: CommandBuffer)) unless (vkCmdDrawMeshTasksNVPtr /= nullFunPtr) $ throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkCmdDrawMeshTasksNV is null" Nothing Nothing let vkCmdDrawMeshTasksNV' = mkVkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNVPtr vkCmdDrawMeshTasksNV' (commandBufferHandle (commandBuffer)) (taskCount) (firstTask) pure $ () foreign import ccall #if !defined(SAFE_FOREIGN_CALLS) unsafe #endif "dynamic" mkVkCmdDrawMeshTasksIndirectNV :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Word32 -> Word32 -> IO () -- | vkCmdDrawMeshTasksIndirectNV - Issue an indirect mesh tasks draw into a -- command buffer -- -- = Description -- -- 'cmdDrawMeshTasksIndirectNV' behaves similarly to 'cmdDrawMeshTasksNV' -- except that the parameters are read by the device from a buffer during -- execution. @drawCount@ draws are executed by the command, with -- parameters taken from @buffer@ starting at @offset@ and increasing by -- @stride@ bytes for each successive draw. The parameters of each draw are -- encoded in an array of 'DrawMeshTasksIndirectCommandNV' structures. If -- @drawCount@ is less than or equal to one, @stride@ is ignored. -- -- == Valid Usage -- -- - If a 'Vulkan.Core10.Handles.Sampler' created with @magFilter@ or -- @minFilter@ equal to 'Vulkan.Core10.Enums.Filter.FILTER_LINEAR' and -- @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' is -- used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of -- this command, then the image view’s -- -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- -- - If a 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s -- -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT' -- -- - If a 'Vulkan.Core10.Handles.ImageView' is sampled with -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as a result -- of this command, then the image view’s -- -- /must/ contain -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT' -- -- - Any 'Vulkan.Core10.Handles.ImageView' being sampled with -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as a result -- of this command /must/ have a -- 'Vulkan.Core10.Enums.ImageViewType.ImageViewType' and format that -- supports cubic filtering, as specified by -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@ -- returned by -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Vulkan.Core10.Handles.ImageView' being sampled with -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' with a -- reduction mode of either -- 'Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN' -- or -- 'Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX' -- as a result of this command /must/ have a -- 'Vulkan.Core10.Enums.ImageViewType.ImageViewType' and format that -- supports cubic filtering together with minmax filtering, as -- specified by -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@ -- returned by -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Vulkan.Core10.Handles.Image' created with a -- 'Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV' -- sampled as a result of this command /must/ only be sampled using a -- 'Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode' of -- 'Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE' -- -- - For each set /n/ that is statically used by the -- 'Vulkan.Core10.Handles.Pipeline' bound to the pipeline bind point -- used by this command, a descriptor set /must/ have been bound to /n/ -- at the same pipeline bind point, with a -- 'Vulkan.Core10.Handles.PipelineLayout' that is compatible for set -- /n/, with the 'Vulkan.Core10.Handles.PipelineLayout' used to create -- the current 'Vulkan.Core10.Handles.Pipeline', as described in -- -- -- - For each push constant that is statically used by the -- 'Vulkan.Core10.Handles.Pipeline' bound to the pipeline bind point -- used by this command, a push constant value /must/ have been set for -- the same pipeline bind point, with a -- 'Vulkan.Core10.Handles.PipelineLayout' that is compatible for push -- constants, with the 'Vulkan.Core10.Handles.PipelineLayout' used to -- create the current 'Vulkan.Core10.Handles.Pipeline', as described in -- -- -- - Descriptors in each bound descriptor set, specified via -- 'Vulkan.Core10.CommandBufferBuilding.cmdBindDescriptorSets', /must/ -- be valid if they are statically used by the -- 'Vulkan.Core10.Handles.Pipeline' bound to the pipeline bind point -- used by this command -- -- - A valid pipeline /must/ be bound to the pipeline bind point used by -- this command -- -- - If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline -- bind point used by this command requires any dynamic state, that -- state /must/ have been set for @commandBuffer@, and done so after -- any previously bound pipeline with the corresponding state not -- specified as dynamic -- -- - There /must/ not have been any calls to dynamic state setting -- commands for any state not specified as dynamic in the -- 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline bind -- point used by this command, since that pipeline was bound -- -- - If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline -- bind point used by this command accesses a -- 'Vulkan.Core10.Handles.Sampler' object that uses unnormalized -- coordinates, that sampler /must/ not be used to sample from any -- 'Vulkan.Core10.Handles.Image' with a -- 'Vulkan.Core10.Handles.ImageView' of the type -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D', -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE', -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY', -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY' or -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY', in -- any shader stage -- -- - If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline -- bind point used by this command accesses a -- 'Vulkan.Core10.Handles.Sampler' object that uses unnormalized -- coordinates, that sampler /must/ not be used with any of the SPIR-V -- @OpImageSample*@ or @OpImageSparseSample*@ instructions with -- @ImplicitLod@, @Dref@ or @Proj@ in their name, in any shader stage -- -- - If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline -- bind point used by this command accesses a -- 'Vulkan.Core10.Handles.Sampler' object that uses unnormalized -- coordinates, that sampler /must/ not be used with any of the SPIR-V -- @OpImageSample*@ or @OpImageSparseSample*@ instructions that -- includes a LOD bias or any offset values, in any shader stage -- -- - If the -- -- feature is not enabled, and if the 'Vulkan.Core10.Handles.Pipeline' -- object bound to the pipeline bind point used by this command -- accesses a uniform buffer, it /must/ not access values outside of -- the range of the buffer as specified in the descriptor set bound to -- the same pipeline bind point -- -- - If the -- -- feature is not enabled, and if the 'Vulkan.Core10.Handles.Pipeline' -- object bound to the pipeline bind point used by this command -- accesses a storage buffer, it /must/ not access values outside of -- the range of the buffer as specified in the descriptor set bound to -- the same pipeline bind point -- -- - If @commandBuffer@ is an unprotected command buffer, any resource -- accessed by the 'Vulkan.Core10.Handles.Pipeline' object bound to the -- pipeline bind point used by this command /must/ not be a protected -- resource -- -- - If a 'Vulkan.Core10.Handles.ImageView' is accessed using -- @OpImageWrite@ as a result of this command, then the @Type@ of the -- @Texel@ operand of that instruction /must/ have at least as many -- components as the image view’s format. -- -- - If a 'Vulkan.Core10.Handles.BufferView' is accessed using -- @OpImageWrite@ as a result of this command, then the @Type@ of the -- @Texel@ operand of that instruction /must/ have at least as many -- components as the image view’s format. -- -- - If a 'Vulkan.Core10.Handles.ImageView' with a -- 'Vulkan.Core10.Enums.Format.Format' that has a 64-bit channel width -- is accessed as a result of this command, the @SampledType@ of the -- @OpTypeImage@ operand of that instruction /must/ have a @Width@ of -- 64. -- -- - If a 'Vulkan.Core10.Handles.ImageView' with a -- 'Vulkan.Core10.Enums.Format.Format' that has a channel width less -- than 64-bit is accessed as a result of this command, the -- @SampledType@ of the @OpTypeImage@ operand of that instruction -- /must/ have a @Width@ of 32. -- -- - If a 'Vulkan.Core10.Handles.BufferView' with a -- 'Vulkan.Core10.Enums.Format.Format' that has a 64-bit channel width -- is accessed as a result of this command, the @SampledType@ of the -- @OpTypeImage@ operand of that instruction /must/ have a @Width@ of -- 64. -- -- - If a 'Vulkan.Core10.Handles.BufferView' with a -- 'Vulkan.Core10.Enums.Format.Format' that has a channel width less -- than 64-bit is accessed as a result of this command, the -- @SampledType@ of the @OpTypeImage@ operand of that instruction -- /must/ have a @Width@ of 32. -- -- - If the -- -- feature is not enabled, 'Vulkan.Core10.Handles.Image' objects -- created with the -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT' -- flag /must/ not be accessed by atomic instructions through an -- @OpTypeImage@ with a @SampledType@ with a @Width@ of 64 by this -- command. -- -- - If the -- -- feature is not enabled, 'Vulkan.Core10.Handles.Buffer' objects -- created with the -- 'Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_RESIDENCY_BIT' -- flag /must/ not be accessed by atomic instructions through an -- @OpTypeImage@ with a @SampledType@ with a @Width@ of 64 by this -- command. -- -- - The current render pass /must/ be -- -- with the @renderPass@ member of the -- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' structure -- specified when creating the 'Vulkan.Core10.Handles.Pipeline' bound -- to -- 'Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS' -- -- - The subpass index of the current render pass /must/ be equal to the -- @subpass@ member of the -- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' structure -- specified when creating the 'Vulkan.Core10.Handles.Pipeline' bound -- to -- 'Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS' -- -- - Every input attachment used by the current subpass /must/ be bound -- to the pipeline via a descriptor set -- -- - Image subresources used as attachments in the current render pass -- /must/ not be accessed in any way other than as an attachment by -- this command -- -- - If the draw is recorded in a render pass instance with multiview -- enabled, the maximum instance index /must/ be less than or equal to -- 'Vulkan.Core11.Promoted_From_VK_KHR_multiview.PhysicalDeviceMultiviewProperties'::@maxMultiviewInstanceIndex@ -- -- - If the bound graphics pipeline was created with -- 'Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@ -- set to 'Vulkan.Core10.FundamentalTypes.TRUE' and the current subpass -- has a depth\/stencil attachment, then that attachment /must/ have -- been created with the -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT' -- bit set -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, but not the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT' -- dynamic state enabled, then -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @viewportCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ match the -- 'Vulkan.Core10.Pipeline.PipelineViewportStateCreateInfo'::@scissorCount@ -- of the pipeline -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT' -- dynamic state enabled, but not the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, then -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetScissorWithCountEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @scissorCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetScissorWithCountEXT' -- /must/ match the -- 'Vulkan.Core10.Pipeline.PipelineViewportStateCreateInfo'::@viewportCount@ -- of the pipeline -- -- - If the bound graphics pipeline state was created with both the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT' -- and -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic states enabled then both -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- and -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetScissorWithCountEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @viewportCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ match the @scissorCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetScissorWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, but not the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_W_SCALING_NV' -- dynamic state enabled, then the bound graphics pipeline /must/ have -- been created with -- 'Vulkan.Extensions.VK_NV_clip_space_w_scaling.PipelineViewportWScalingStateCreateInfoNV'::@viewportCount@ -- greater or equal to the @viewportCount@ parameter in the last call -- to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- and -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_W_SCALING_NV' -- dynamic states enabled then the @viewportCount@ parameter in the -- last call to -- 'Vulkan.Extensions.VK_NV_clip_space_w_scaling.cmdSetViewportWScalingNV' -- /must/ be greater than or equal to the @viewportCount@ parameter in -- the last call to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, but not the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV' -- dynamic state enabled, then the bound graphics pipeline /must/ have -- been created with -- 'Vulkan.Extensions.VK_NV_shading_rate_image.PipelineViewportShadingRateImageStateCreateInfoNV'::@viewportCount@ -- greater or equal to the @viewportCount@ parameter in the last call -- to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- and -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV' -- dynamic states enabled then the @viewportCount@ parameter in the -- last call to -- 'Vulkan.Extensions.VK_NV_shading_rate_image.cmdSetViewportShadingRatePaletteNV' -- /must/ be greater than or equal to the @viewportCount@ parameter in -- the last call to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled and an instance of -- 'Vulkan.Extensions.VK_NV_viewport_swizzle.PipelineViewportSwizzleStateCreateInfoNV' -- chained from @VkPipelineVieportCreateInfo@, then the bound graphics -- pipeline /must/ have been created with -- 'Vulkan.Extensions.VK_NV_viewport_swizzle.PipelineViewportSwizzleStateCreateInfoNV'::@viewportCount@ -- greater or equal to the @viewportCount@ parameter in the last call -- to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled and an instance of -- 'Vulkan.Extensions.VK_NV_scissor_exclusive.PipelineViewportExclusiveScissorStateCreateInfoNV' -- chained from @VkPipelineVieportCreateInfo@, then the bound graphics -- pipeline /must/ have been created with -- 'Vulkan.Extensions.VK_NV_scissor_exclusive.PipelineViewportExclusiveScissorStateCreateInfoNV'::@exclusiveScissorCount@ -- greater or equal to the @viewportCount@ parameter in the last call -- to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT' -- dynamic state enabled then -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetPrimitiveTopologyEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @primitiveTopology@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetPrimitiveTopologyEXT' -- /must/ be of the same -- -- as the pipeline -- 'Vulkan.Core10.Pipeline.PipelineInputAssemblyStateCreateInfo'::@topology@ -- state -- -- - If the -- -- limit is not supported, the bound graphics pipeline was created with -- the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, and any of the shader stages of the bound -- graphics pipeline write to the @PrimitiveShadingRateKHR@ built-in, -- then -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @viewportCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ be @1@ -- -- - If @buffer@ is non-sparse then it /must/ be bound completely and -- contiguously to a single 'Vulkan.Core10.Handles.DeviceMemory' object -- -- - @buffer@ /must/ have been created with the -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT' -- bit set -- -- - @offset@ /must/ be a multiple of @4@ -- -- - @commandBuffer@ /must/ not be a protected command buffer -- -- - If the -- -- feature is not enabled, @drawCount@ /must/ be @0@ or @1@ -- -- - @drawCount@ /must/ be less than or equal to -- 'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxDrawIndirectCount@ -- -- - If @drawCount@ is greater than @1@, @stride@ /must/ be a multiple of -- @4@ and /must/ be greater than or equal to -- @sizeof@('DrawMeshTasksIndirectCommandNV') -- -- - If @drawCount@ is equal to @1@, (@offset@ + -- @sizeof@('DrawMeshTasksIndirectCommandNV')) /must/ be less than or -- equal to the size of @buffer@ -- -- - If @drawCount@ is greater than @1@, (@stride@ × (@drawCount@ - 1) + -- @offset@ + @sizeof@('DrawMeshTasksIndirectCommandNV')) /must/ be -- less than or equal to the size of @buffer@ -- -- == Valid Usage (Implicit) -- -- - @commandBuffer@ /must/ be a valid -- 'Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @buffer@ /must/ be a valid 'Vulkan.Core10.Handles.Buffer' handle -- -- - @commandBuffer@ /must/ be in the -- -- -- - The 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was -- allocated from /must/ support graphics operations -- -- - This command /must/ only be called inside of a render pass instance -- -- - Both of @buffer@, and @commandBuffer@ /must/ have been created, -- allocated, or retrieved from the same 'Vulkan.Core10.Handles.Device' -- -- == Host Synchronization -- -- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Vulkan.Core10.Handles.CommandPool' that -- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties -- -- \' -- -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -- | | | | | -- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+ -- | Primary | Inside | Graphics | Graphics | -- | Secondary | | | | -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -- -- = See Also -- -- 'Vulkan.Core10.Handles.Buffer', 'Vulkan.Core10.Handles.CommandBuffer', -- 'Vulkan.Core10.FundamentalTypes.DeviceSize' cmdDrawMeshTasksIndirectNV :: forall io . (MonadIO io) => -- | @commandBuffer@ is the command buffer into which the command is -- recorded. CommandBuffer -> -- | @buffer@ is the buffer containing draw parameters. Buffer -> -- | @offset@ is the byte offset into @buffer@ where parameters begin. ("offset" ::: DeviceSize) -> -- | @drawCount@ is the number of draws to execute, and /can/ be zero. ("drawCount" ::: Word32) -> -- | @stride@ is the byte stride between successive sets of draw parameters. ("stride" ::: Word32) -> io () cmdDrawMeshTasksIndirectNV commandBuffer buffer offset drawCount stride = liftIO $ do let vkCmdDrawMeshTasksIndirectNVPtr = pVkCmdDrawMeshTasksIndirectNV (deviceCmds (commandBuffer :: CommandBuffer)) unless (vkCmdDrawMeshTasksIndirectNVPtr /= nullFunPtr) $ throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkCmdDrawMeshTasksIndirectNV is null" Nothing Nothing let vkCmdDrawMeshTasksIndirectNV' = mkVkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNVPtr vkCmdDrawMeshTasksIndirectNV' (commandBufferHandle (commandBuffer)) (buffer) (offset) (drawCount) (stride) pure $ () foreign import ccall #if !defined(SAFE_FOREIGN_CALLS) unsafe #endif "dynamic" mkVkCmdDrawMeshTasksIndirectCountNV :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Buffer -> DeviceSize -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Buffer -> DeviceSize -> Word32 -> Word32 -> IO () -- | vkCmdDrawMeshTasksIndirectCountNV - Perform an indirect mesh tasks draw -- with the draw count sourced from a buffer -- -- = Description -- -- 'cmdDrawMeshTasksIndirectCountNV' behaves similarly to -- 'cmdDrawMeshTasksIndirectNV' except that the draw count is read by the -- device from a buffer during execution. The command will read an unsigned -- 32-bit integer from @countBuffer@ located at @countBufferOffset@ and use -- this as the draw count. -- -- == Valid Usage -- -- - If a 'Vulkan.Core10.Handles.Sampler' created with @magFilter@ or -- @minFilter@ equal to 'Vulkan.Core10.Enums.Filter.FILTER_LINEAR' and -- @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' is -- used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of -- this command, then the image view’s -- -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- -- - If a 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s -- -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT' -- -- - If a 'Vulkan.Core10.Handles.ImageView' is sampled with -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as a result -- of this command, then the image view’s -- -- /must/ contain -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT' -- -- - Any 'Vulkan.Core10.Handles.ImageView' being sampled with -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as a result -- of this command /must/ have a -- 'Vulkan.Core10.Enums.ImageViewType.ImageViewType' and format that -- supports cubic filtering, as specified by -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@ -- returned by -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Vulkan.Core10.Handles.ImageView' being sampled with -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' with a -- reduction mode of either -- 'Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN' -- or -- 'Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX' -- as a result of this command /must/ have a -- 'Vulkan.Core10.Enums.ImageViewType.ImageViewType' and format that -- supports cubic filtering together with minmax filtering, as -- specified by -- 'Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@ -- returned by -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Vulkan.Core10.Handles.Image' created with a -- 'Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV' -- sampled as a result of this command /must/ only be sampled using a -- 'Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode' of -- 'Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE' -- -- - For each set /n/ that is statically used by the -- 'Vulkan.Core10.Handles.Pipeline' bound to the pipeline bind point -- used by this command, a descriptor set /must/ have been bound to /n/ -- at the same pipeline bind point, with a -- 'Vulkan.Core10.Handles.PipelineLayout' that is compatible for set -- /n/, with the 'Vulkan.Core10.Handles.PipelineLayout' used to create -- the current 'Vulkan.Core10.Handles.Pipeline', as described in -- -- -- - For each push constant that is statically used by the -- 'Vulkan.Core10.Handles.Pipeline' bound to the pipeline bind point -- used by this command, a push constant value /must/ have been set for -- the same pipeline bind point, with a -- 'Vulkan.Core10.Handles.PipelineLayout' that is compatible for push -- constants, with the 'Vulkan.Core10.Handles.PipelineLayout' used to -- create the current 'Vulkan.Core10.Handles.Pipeline', as described in -- -- -- - Descriptors in each bound descriptor set, specified via -- 'Vulkan.Core10.CommandBufferBuilding.cmdBindDescriptorSets', /must/ -- be valid if they are statically used by the -- 'Vulkan.Core10.Handles.Pipeline' bound to the pipeline bind point -- used by this command -- -- - A valid pipeline /must/ be bound to the pipeline bind point used by -- this command -- -- - If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline -- bind point used by this command requires any dynamic state, that -- state /must/ have been set for @commandBuffer@, and done so after -- any previously bound pipeline with the corresponding state not -- specified as dynamic -- -- - There /must/ not have been any calls to dynamic state setting -- commands for any state not specified as dynamic in the -- 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline bind -- point used by this command, since that pipeline was bound -- -- - If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline -- bind point used by this command accesses a -- 'Vulkan.Core10.Handles.Sampler' object that uses unnormalized -- coordinates, that sampler /must/ not be used to sample from any -- 'Vulkan.Core10.Handles.Image' with a -- 'Vulkan.Core10.Handles.ImageView' of the type -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D', -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE', -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY', -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY' or -- 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY', in -- any shader stage -- -- - If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline -- bind point used by this command accesses a -- 'Vulkan.Core10.Handles.Sampler' object that uses unnormalized -- coordinates, that sampler /must/ not be used with any of the SPIR-V -- @OpImageSample*@ or @OpImageSparseSample*@ instructions with -- @ImplicitLod@, @Dref@ or @Proj@ in their name, in any shader stage -- -- - If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline -- bind point used by this command accesses a -- 'Vulkan.Core10.Handles.Sampler' object that uses unnormalized -- coordinates, that sampler /must/ not be used with any of the SPIR-V -- @OpImageSample*@ or @OpImageSparseSample*@ instructions that -- includes a LOD bias or any offset values, in any shader stage -- -- - If the -- -- feature is not enabled, and if the 'Vulkan.Core10.Handles.Pipeline' -- object bound to the pipeline bind point used by this command -- accesses a uniform buffer, it /must/ not access values outside of -- the range of the buffer as specified in the descriptor set bound to -- the same pipeline bind point -- -- - If the -- -- feature is not enabled, and if the 'Vulkan.Core10.Handles.Pipeline' -- object bound to the pipeline bind point used by this command -- accesses a storage buffer, it /must/ not access values outside of -- the range of the buffer as specified in the descriptor set bound to -- the same pipeline bind point -- -- - If @commandBuffer@ is an unprotected command buffer, any resource -- accessed by the 'Vulkan.Core10.Handles.Pipeline' object bound to the -- pipeline bind point used by this command /must/ not be a protected -- resource -- -- - If a 'Vulkan.Core10.Handles.ImageView' is accessed using -- @OpImageWrite@ as a result of this command, then the @Type@ of the -- @Texel@ operand of that instruction /must/ have at least as many -- components as the image view’s format. -- -- - If a 'Vulkan.Core10.Handles.BufferView' is accessed using -- @OpImageWrite@ as a result of this command, then the @Type@ of the -- @Texel@ operand of that instruction /must/ have at least as many -- components as the image view’s format. -- -- - If a 'Vulkan.Core10.Handles.ImageView' with a -- 'Vulkan.Core10.Enums.Format.Format' that has a 64-bit channel width -- is accessed as a result of this command, the @SampledType@ of the -- @OpTypeImage@ operand of that instruction /must/ have a @Width@ of -- 64. -- -- - If a 'Vulkan.Core10.Handles.ImageView' with a -- 'Vulkan.Core10.Enums.Format.Format' that has a channel width less -- than 64-bit is accessed as a result of this command, the -- @SampledType@ of the @OpTypeImage@ operand of that instruction -- /must/ have a @Width@ of 32. -- -- - If a 'Vulkan.Core10.Handles.BufferView' with a -- 'Vulkan.Core10.Enums.Format.Format' that has a 64-bit channel width -- is accessed as a result of this command, the @SampledType@ of the -- @OpTypeImage@ operand of that instruction /must/ have a @Width@ of -- 64. -- -- - If a 'Vulkan.Core10.Handles.BufferView' with a -- 'Vulkan.Core10.Enums.Format.Format' that has a channel width less -- than 64-bit is accessed as a result of this command, the -- @SampledType@ of the @OpTypeImage@ operand of that instruction -- /must/ have a @Width@ of 32. -- -- - If the -- -- feature is not enabled, 'Vulkan.Core10.Handles.Image' objects -- created with the -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT' -- flag /must/ not be accessed by atomic instructions through an -- @OpTypeImage@ with a @SampledType@ with a @Width@ of 64 by this -- command. -- -- - If the -- -- feature is not enabled, 'Vulkan.Core10.Handles.Buffer' objects -- created with the -- 'Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_RESIDENCY_BIT' -- flag /must/ not be accessed by atomic instructions through an -- @OpTypeImage@ with a @SampledType@ with a @Width@ of 64 by this -- command. -- -- - The current render pass /must/ be -- -- with the @renderPass@ member of the -- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' structure -- specified when creating the 'Vulkan.Core10.Handles.Pipeline' bound -- to -- 'Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS' -- -- - The subpass index of the current render pass /must/ be equal to the -- @subpass@ member of the -- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' structure -- specified when creating the 'Vulkan.Core10.Handles.Pipeline' bound -- to -- 'Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS' -- -- - Every input attachment used by the current subpass /must/ be bound -- to the pipeline via a descriptor set -- -- - Image subresources used as attachments in the current render pass -- /must/ not be accessed in any way other than as an attachment by -- this command -- -- - If the draw is recorded in a render pass instance with multiview -- enabled, the maximum instance index /must/ be less than or equal to -- 'Vulkan.Core11.Promoted_From_VK_KHR_multiview.PhysicalDeviceMultiviewProperties'::@maxMultiviewInstanceIndex@ -- -- - If the bound graphics pipeline was created with -- 'Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@ -- set to 'Vulkan.Core10.FundamentalTypes.TRUE' and the current subpass -- has a depth\/stencil attachment, then that attachment /must/ have -- been created with the -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT' -- bit set -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, but not the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT' -- dynamic state enabled, then -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @viewportCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ match the -- 'Vulkan.Core10.Pipeline.PipelineViewportStateCreateInfo'::@scissorCount@ -- of the pipeline -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT' -- dynamic state enabled, but not the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, then -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetScissorWithCountEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @scissorCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetScissorWithCountEXT' -- /must/ match the -- 'Vulkan.Core10.Pipeline.PipelineViewportStateCreateInfo'::@viewportCount@ -- of the pipeline -- -- - If the bound graphics pipeline state was created with both the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT' -- and -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic states enabled then both -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- and -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetScissorWithCountEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @viewportCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ match the @scissorCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetScissorWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, but not the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_W_SCALING_NV' -- dynamic state enabled, then the bound graphics pipeline /must/ have -- been created with -- 'Vulkan.Extensions.VK_NV_clip_space_w_scaling.PipelineViewportWScalingStateCreateInfoNV'::@viewportCount@ -- greater or equal to the @viewportCount@ parameter in the last call -- to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- and -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_W_SCALING_NV' -- dynamic states enabled then the @viewportCount@ parameter in the -- last call to -- 'Vulkan.Extensions.VK_NV_clip_space_w_scaling.cmdSetViewportWScalingNV' -- /must/ be greater than or equal to the @viewportCount@ parameter in -- the last call to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, but not the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV' -- dynamic state enabled, then the bound graphics pipeline /must/ have -- been created with -- 'Vulkan.Extensions.VK_NV_shading_rate_image.PipelineViewportShadingRateImageStateCreateInfoNV'::@viewportCount@ -- greater or equal to the @viewportCount@ parameter in the last call -- to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- and -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV' -- dynamic states enabled then the @viewportCount@ parameter in the -- last call to -- 'Vulkan.Extensions.VK_NV_shading_rate_image.cmdSetViewportShadingRatePaletteNV' -- /must/ be greater than or equal to the @viewportCount@ parameter in -- the last call to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled and an instance of -- 'Vulkan.Extensions.VK_NV_viewport_swizzle.PipelineViewportSwizzleStateCreateInfoNV' -- chained from @VkPipelineVieportCreateInfo@, then the bound graphics -- pipeline /must/ have been created with -- 'Vulkan.Extensions.VK_NV_viewport_swizzle.PipelineViewportSwizzleStateCreateInfoNV'::@viewportCount@ -- greater or equal to the @viewportCount@ parameter in the last call -- to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled and an instance of -- 'Vulkan.Extensions.VK_NV_scissor_exclusive.PipelineViewportExclusiveScissorStateCreateInfoNV' -- chained from @VkPipelineVieportCreateInfo@, then the bound graphics -- pipeline /must/ have been created with -- 'Vulkan.Extensions.VK_NV_scissor_exclusive.PipelineViewportExclusiveScissorStateCreateInfoNV'::@exclusiveScissorCount@ -- greater or equal to the @viewportCount@ parameter in the last call -- to -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- -- - If the bound graphics pipeline state was created with the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT' -- dynamic state enabled then -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetPrimitiveTopologyEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @primitiveTopology@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetPrimitiveTopologyEXT' -- /must/ be of the same -- -- as the pipeline -- 'Vulkan.Core10.Pipeline.PipelineInputAssemblyStateCreateInfo'::@topology@ -- state -- -- - If the -- -- limit is not supported, the bound graphics pipeline was created with -- the -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT' -- dynamic state enabled, and any of the shader stages of the bound -- graphics pipeline write to the @PrimitiveShadingRateKHR@ built-in, -- then -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ have been called in the current command buffer prior to this -- draw command, and the @viewportCount@ parameter of -- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT' -- /must/ be @1@ -- -- - If @buffer@ is non-sparse then it /must/ be bound completely and -- contiguously to a single 'Vulkan.Core10.Handles.DeviceMemory' object -- -- - @buffer@ /must/ have been created with the -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT' -- bit set -- -- - @offset@ /must/ be a multiple of @4@ -- -- - @commandBuffer@ /must/ not be a protected command buffer -- -- - If @countBuffer@ is non-sparse then it /must/ be bound completely -- and contiguously to a single 'Vulkan.Core10.Handles.DeviceMemory' -- object -- -- - @countBuffer@ /must/ have been created with the -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT' -- bit set -- -- - @countBufferOffset@ /must/ be a multiple of @4@ -- -- - The count stored in @countBuffer@ /must/ be less than or equal to -- 'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxDrawIndirectCount@ -- -- - (@countBufferOffset@ + @sizeof@(uint32_t)) /must/ be less than or -- equal to the size of @countBuffer@ -- -- - If -- -- is not enabled this function /must/ not be used -- -- - @stride@ /must/ be a multiple of @4@ and /must/ be greater than or -- equal to @sizeof@('DrawMeshTasksIndirectCommandNV') -- -- - If @maxDrawCount@ is greater than or equal to @1@, (@stride@ × -- (@maxDrawCount@ - 1) + @offset@ + -- @sizeof@('DrawMeshTasksIndirectCommandNV')) /must/ be less than or -- equal to the size of @buffer@ -- -- - If the count stored in @countBuffer@ is equal to @1@, (@offset@ + -- @sizeof@('DrawMeshTasksIndirectCommandNV')) /must/ be less than or -- equal to the size of @buffer@ -- -- - If the count stored in @countBuffer@ is greater than @1@, (@stride@ -- × (@drawCount@ - 1) + @offset@ + -- @sizeof@('DrawMeshTasksIndirectCommandNV')) /must/ be less than or -- equal to the size of @buffer@ -- -- == Valid Usage (Implicit) -- -- - @commandBuffer@ /must/ be a valid -- 'Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @buffer@ /must/ be a valid 'Vulkan.Core10.Handles.Buffer' handle -- -- - @countBuffer@ /must/ be a valid 'Vulkan.Core10.Handles.Buffer' -- handle -- -- - @commandBuffer@ /must/ be in the -- -- -- - The 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was -- allocated from /must/ support graphics operations -- -- - This command /must/ only be called inside of a render pass instance -- -- - Each of @buffer@, @commandBuffer@, and @countBuffer@ /must/ have -- been created, allocated, or retrieved from the same -- 'Vulkan.Core10.Handles.Device' -- -- == Host Synchronization -- -- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Vulkan.Core10.Handles.CommandPool' that -- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties -- -- \' -- -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -- | | | | | -- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+ -- | Primary | Inside | Graphics | Graphics | -- | Secondary | | | | -- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -- -- = See Also -- -- 'Vulkan.Core10.Handles.Buffer', 'Vulkan.Core10.Handles.CommandBuffer', -- 'Vulkan.Core10.FundamentalTypes.DeviceSize' cmdDrawMeshTasksIndirectCountNV :: forall io . (MonadIO io) => -- | @commandBuffer@ is the command buffer into which the command is -- recorded. CommandBuffer -> -- | @buffer@ is the buffer containing draw parameters. Buffer -> -- | @offset@ is the byte offset into @buffer@ where parameters begin. ("offset" ::: DeviceSize) -> -- | @countBuffer@ is the buffer containing the draw count. ("countBuffer" ::: Buffer) -> -- | @countBufferOffset@ is the byte offset into @countBuffer@ where the draw -- count begins. ("countBufferOffset" ::: DeviceSize) -> -- | @maxDrawCount@ specifies the maximum number of draws that will be -- executed. The actual number of executed draw calls is the minimum of the -- count specified in @countBuffer@ and @maxDrawCount@. ("maxDrawCount" ::: Word32) -> -- | @stride@ is the byte stride between successive sets of draw parameters. ("stride" ::: Word32) -> io () cmdDrawMeshTasksIndirectCountNV commandBuffer buffer offset countBuffer countBufferOffset maxDrawCount stride = liftIO $ do let vkCmdDrawMeshTasksIndirectCountNVPtr = pVkCmdDrawMeshTasksIndirectCountNV (deviceCmds (commandBuffer :: CommandBuffer)) unless (vkCmdDrawMeshTasksIndirectCountNVPtr /= nullFunPtr) $ throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkCmdDrawMeshTasksIndirectCountNV is null" Nothing Nothing let vkCmdDrawMeshTasksIndirectCountNV' = mkVkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNVPtr vkCmdDrawMeshTasksIndirectCountNV' (commandBufferHandle (commandBuffer)) (buffer) (offset) (countBuffer) (countBufferOffset) (maxDrawCount) (stride) pure $ () -- | VkPhysicalDeviceMeshShaderFeaturesNV - Structure describing mesh shading -- features that can be supported by an implementation -- -- = Description -- -- If the 'PhysicalDeviceMeshShaderFeaturesNV' structure is included in the -- @pNext@ chain of -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2', -- it is filled with a value indicating whether the feature is supported. -- 'PhysicalDeviceMeshShaderFeaturesNV' /can/ also be included in @pNext@ -- chain of 'Vulkan.Core10.Device.DeviceCreateInfo' to enable the features. -- -- == Valid Usage (Implicit) -- -- = See Also -- -- 'Vulkan.Core10.FundamentalTypes.Bool32', -- 'Vulkan.Core10.Enums.StructureType.StructureType' data PhysicalDeviceMeshShaderFeaturesNV = PhysicalDeviceMeshShaderFeaturesNV { -- | @taskShader@ indicates whether the task shader stage is supported. taskShader :: Bool , -- | @meshShader@ indicates whether the mesh shader stage is supported. meshShader :: Bool } deriving (Typeable, Eq) #if defined(GENERIC_INSTANCES) deriving instance Generic (PhysicalDeviceMeshShaderFeaturesNV) #endif deriving instance Show PhysicalDeviceMeshShaderFeaturesNV instance ToCStruct PhysicalDeviceMeshShaderFeaturesNV where withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p) pokeCStruct p PhysicalDeviceMeshShaderFeaturesNV{..} f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr Bool32)) (boolToBool32 (taskShader)) poke ((p `plusPtr` 20 :: Ptr Bool32)) (boolToBool32 (meshShader)) f cStructSize = 24 cStructAlignment = 8 pokeZeroCStruct p f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr Bool32)) (boolToBool32 (zero)) poke ((p `plusPtr` 20 :: Ptr Bool32)) (boolToBool32 (zero)) f instance FromCStruct PhysicalDeviceMeshShaderFeaturesNV where peekCStruct p = do taskShader <- peek @Bool32 ((p `plusPtr` 16 :: Ptr Bool32)) meshShader <- peek @Bool32 ((p `plusPtr` 20 :: Ptr Bool32)) pure $ PhysicalDeviceMeshShaderFeaturesNV (bool32ToBool taskShader) (bool32ToBool meshShader) instance Storable PhysicalDeviceMeshShaderFeaturesNV where sizeOf ~_ = 24 alignment ~_ = 8 peek = peekCStruct poke ptr poked = pokeCStruct ptr poked (pure ()) instance Zero PhysicalDeviceMeshShaderFeaturesNV where zero = PhysicalDeviceMeshShaderFeaturesNV zero zero -- | VkPhysicalDeviceMeshShaderPropertiesNV - Structure describing mesh -- shading properties -- -- = Members -- -- The members of the 'PhysicalDeviceMeshShaderPropertiesNV' structure -- describe the following implementation-dependent limits: -- -- = Description -- -- If the 'PhysicalDeviceMeshShaderPropertiesNV' structure is included in -- the @pNext@ chain of -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2', -- it is filled with the implementation-dependent limits. -- -- == Valid Usage (Implicit) -- -- = See Also -- -- 'Vulkan.Core10.Enums.StructureType.StructureType' data PhysicalDeviceMeshShaderPropertiesNV = PhysicalDeviceMeshShaderPropertiesNV { -- | @maxDrawMeshTasksCount@ is the maximum number of local workgroups that -- /can/ be launched by a single draw mesh tasks command. See -- . maxDrawMeshTasksCount :: Word32 , -- | @maxTaskWorkGroupInvocations@ is the maximum total number of task shader -- invocations in a single local workgroup. The product of the X, Y, and Z -- sizes, as specified by the @LocalSize@ execution mode in shader modules -- or by the object decorated by the @WorkgroupSize@ decoration, /must/ be -- less than or equal to this limit. maxTaskWorkGroupInvocations :: Word32 , -- | @maxTaskWorkGroupSize@[3] is the maximum size of a local task workgroup. -- These three values represent the maximum local workgroup size in the X, -- Y, and Z dimensions, respectively. The @x@, @y@, and @z@ sizes, as -- specified by the @LocalSize@ execution mode or by the object decorated -- by the @WorkgroupSize@ decoration in shader modules, /must/ be less than -- or equal to the corresponding limit. maxTaskWorkGroupSize :: (Word32, Word32, Word32) , -- | @maxTaskTotalMemorySize@ is the maximum number of bytes that the task -- shader can use in total for shared and output memory combined. maxTaskTotalMemorySize :: Word32 , -- | @maxTaskOutputCount@ is the maximum number of output tasks a single task -- shader workgroup can emit. maxTaskOutputCount :: Word32 , -- | @maxMeshWorkGroupInvocations@ is the maximum total number of mesh shader -- invocations in a single local workgroup. The product of the X, Y, and Z -- sizes, as specified by the @LocalSize@ execution mode in shader modules -- or by the object decorated by the @WorkgroupSize@ decoration, /must/ be -- less than or equal to this limit. maxMeshWorkGroupInvocations :: Word32 , -- | @maxMeshWorkGroupSize@[3] is the maximum size of a local mesh workgroup. -- These three values represent the maximum local workgroup size in the X, -- Y, and Z dimensions, respectively. The @x@, @y@, and @z@ sizes, as -- specified by the @LocalSize@ execution mode or by the object decorated -- by the @WorkgroupSize@ decoration in shader modules, /must/ be less than -- or equal to the corresponding limit. maxMeshWorkGroupSize :: (Word32, Word32, Word32) , -- | @maxMeshTotalMemorySize@ is the maximum number of bytes that the mesh -- shader can use in total for shared and output memory combined. maxMeshTotalMemorySize :: Word32 , -- | @maxMeshOutputVertices@ is the maximum number of vertices a mesh shader -- output can store. maxMeshOutputVertices :: Word32 , -- | @maxMeshOutputPrimitives@ is the maximum number of primitives a mesh -- shader output can store. maxMeshOutputPrimitives :: Word32 , -- | @maxMeshMultiviewViewCount@ is the maximum number of multi-view views a -- mesh shader can use. maxMeshMultiviewViewCount :: Word32 , -- | @meshOutputPerVertexGranularity@ is the granularity with which mesh -- vertex outputs are allocated. The value can be used to compute the -- memory size used by the mesh shader, which must be less than or equal to -- @maxMeshTotalMemorySize@. meshOutputPerVertexGranularity :: Word32 , -- | @meshOutputPerPrimitiveGranularity@ is the granularity with which mesh -- outputs qualified as per-primitive are allocated. The value can be used -- to compute the memory size used by the mesh shader, which must be less -- than or equal to @maxMeshTotalMemorySize@. meshOutputPerPrimitiveGranularity :: Word32 } deriving (Typeable, Eq) #if defined(GENERIC_INSTANCES) deriving instance Generic (PhysicalDeviceMeshShaderPropertiesNV) #endif deriving instance Show PhysicalDeviceMeshShaderPropertiesNV instance ToCStruct PhysicalDeviceMeshShaderPropertiesNV where withCStruct x f = allocaBytesAligned 88 8 $ \p -> pokeCStruct p x (f p) pokeCStruct p PhysicalDeviceMeshShaderPropertiesNV{..} f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr Word32)) (maxDrawMeshTasksCount) poke ((p `plusPtr` 20 :: Ptr Word32)) (maxTaskWorkGroupInvocations) let pMaxTaskWorkGroupSize' = lowerArrayPtr ((p `plusPtr` 24 :: Ptr (FixedArray 3 Word32))) case (maxTaskWorkGroupSize) of (e0, e1, e2) -> do poke (pMaxTaskWorkGroupSize' :: Ptr Word32) (e0) poke (pMaxTaskWorkGroupSize' `plusPtr` 4 :: Ptr Word32) (e1) poke (pMaxTaskWorkGroupSize' `plusPtr` 8 :: Ptr Word32) (e2) poke ((p `plusPtr` 36 :: Ptr Word32)) (maxTaskTotalMemorySize) poke ((p `plusPtr` 40 :: Ptr Word32)) (maxTaskOutputCount) poke ((p `plusPtr` 44 :: Ptr Word32)) (maxMeshWorkGroupInvocations) let pMaxMeshWorkGroupSize' = lowerArrayPtr ((p `plusPtr` 48 :: Ptr (FixedArray 3 Word32))) case (maxMeshWorkGroupSize) of (e0, e1, e2) -> do poke (pMaxMeshWorkGroupSize' :: Ptr Word32) (e0) poke (pMaxMeshWorkGroupSize' `plusPtr` 4 :: Ptr Word32) (e1) poke (pMaxMeshWorkGroupSize' `plusPtr` 8 :: Ptr Word32) (e2) poke ((p `plusPtr` 60 :: Ptr Word32)) (maxMeshTotalMemorySize) poke ((p `plusPtr` 64 :: Ptr Word32)) (maxMeshOutputVertices) poke ((p `plusPtr` 68 :: Ptr Word32)) (maxMeshOutputPrimitives) poke ((p `plusPtr` 72 :: Ptr Word32)) (maxMeshMultiviewViewCount) poke ((p `plusPtr` 76 :: Ptr Word32)) (meshOutputPerVertexGranularity) poke ((p `plusPtr` 80 :: Ptr Word32)) (meshOutputPerPrimitiveGranularity) f cStructSize = 88 cStructAlignment = 8 pokeZeroCStruct p f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr Word32)) (zero) poke ((p `plusPtr` 20 :: Ptr Word32)) (zero) let pMaxTaskWorkGroupSize' = lowerArrayPtr ((p `plusPtr` 24 :: Ptr (FixedArray 3 Word32))) case ((zero, zero, zero)) of (e0, e1, e2) -> do poke (pMaxTaskWorkGroupSize' :: Ptr Word32) (e0) poke (pMaxTaskWorkGroupSize' `plusPtr` 4 :: Ptr Word32) (e1) poke (pMaxTaskWorkGroupSize' `plusPtr` 8 :: Ptr Word32) (e2) poke ((p `plusPtr` 36 :: Ptr Word32)) (zero) poke ((p `plusPtr` 40 :: Ptr Word32)) (zero) poke ((p `plusPtr` 44 :: Ptr Word32)) (zero) let pMaxMeshWorkGroupSize' = lowerArrayPtr ((p `plusPtr` 48 :: Ptr (FixedArray 3 Word32))) case ((zero, zero, zero)) of (e0, e1, e2) -> do poke (pMaxMeshWorkGroupSize' :: Ptr Word32) (e0) poke (pMaxMeshWorkGroupSize' `plusPtr` 4 :: Ptr Word32) (e1) poke (pMaxMeshWorkGroupSize' `plusPtr` 8 :: Ptr Word32) (e2) poke ((p `plusPtr` 60 :: Ptr Word32)) (zero) poke ((p `plusPtr` 64 :: Ptr Word32)) (zero) poke ((p `plusPtr` 68 :: Ptr Word32)) (zero) poke ((p `plusPtr` 72 :: Ptr Word32)) (zero) poke ((p `plusPtr` 76 :: Ptr Word32)) (zero) poke ((p `plusPtr` 80 :: Ptr Word32)) (zero) f instance FromCStruct PhysicalDeviceMeshShaderPropertiesNV where peekCStruct p = do maxDrawMeshTasksCount <- peek @Word32 ((p `plusPtr` 16 :: Ptr Word32)) maxTaskWorkGroupInvocations <- peek @Word32 ((p `plusPtr` 20 :: Ptr Word32)) let pmaxTaskWorkGroupSize = lowerArrayPtr @Word32 ((p `plusPtr` 24 :: Ptr (FixedArray 3 Word32))) maxTaskWorkGroupSize0 <- peek @Word32 ((pmaxTaskWorkGroupSize `advancePtrBytes` 0 :: Ptr Word32)) maxTaskWorkGroupSize1 <- peek @Word32 ((pmaxTaskWorkGroupSize `advancePtrBytes` 4 :: Ptr Word32)) maxTaskWorkGroupSize2 <- peek @Word32 ((pmaxTaskWorkGroupSize `advancePtrBytes` 8 :: Ptr Word32)) maxTaskTotalMemorySize <- peek @Word32 ((p `plusPtr` 36 :: Ptr Word32)) maxTaskOutputCount <- peek @Word32 ((p `plusPtr` 40 :: Ptr Word32)) maxMeshWorkGroupInvocations <- peek @Word32 ((p `plusPtr` 44 :: Ptr Word32)) let pmaxMeshWorkGroupSize = lowerArrayPtr @Word32 ((p `plusPtr` 48 :: Ptr (FixedArray 3 Word32))) maxMeshWorkGroupSize0 <- peek @Word32 ((pmaxMeshWorkGroupSize `advancePtrBytes` 0 :: Ptr Word32)) maxMeshWorkGroupSize1 <- peek @Word32 ((pmaxMeshWorkGroupSize `advancePtrBytes` 4 :: Ptr Word32)) maxMeshWorkGroupSize2 <- peek @Word32 ((pmaxMeshWorkGroupSize `advancePtrBytes` 8 :: Ptr Word32)) maxMeshTotalMemorySize <- peek @Word32 ((p `plusPtr` 60 :: Ptr Word32)) maxMeshOutputVertices <- peek @Word32 ((p `plusPtr` 64 :: Ptr Word32)) maxMeshOutputPrimitives <- peek @Word32 ((p `plusPtr` 68 :: Ptr Word32)) maxMeshMultiviewViewCount <- peek @Word32 ((p `plusPtr` 72 :: Ptr Word32)) meshOutputPerVertexGranularity <- peek @Word32 ((p `plusPtr` 76 :: Ptr Word32)) meshOutputPerPrimitiveGranularity <- peek @Word32 ((p `plusPtr` 80 :: Ptr Word32)) pure $ PhysicalDeviceMeshShaderPropertiesNV maxDrawMeshTasksCount maxTaskWorkGroupInvocations ((maxTaskWorkGroupSize0, maxTaskWorkGroupSize1, maxTaskWorkGroupSize2)) maxTaskTotalMemorySize maxTaskOutputCount maxMeshWorkGroupInvocations ((maxMeshWorkGroupSize0, maxMeshWorkGroupSize1, maxMeshWorkGroupSize2)) maxMeshTotalMemorySize maxMeshOutputVertices maxMeshOutputPrimitives maxMeshMultiviewViewCount meshOutputPerVertexGranularity meshOutputPerPrimitiveGranularity instance Storable PhysicalDeviceMeshShaderPropertiesNV where sizeOf ~_ = 88 alignment ~_ = 8 peek = peekCStruct poke ptr poked = pokeCStruct ptr poked (pure ()) instance Zero PhysicalDeviceMeshShaderPropertiesNV where zero = PhysicalDeviceMeshShaderPropertiesNV zero zero (zero, zero, zero) zero zero zero (zero, zero, zero) zero zero zero zero zero zero -- | VkDrawMeshTasksIndirectCommandNV - Structure specifying a mesh tasks -- draw indirect command -- -- = Description -- -- The members of 'DrawMeshTasksIndirectCommandNV' have the same meaning as -- the similarly named parameters of 'cmdDrawMeshTasksNV'. -- -- == Valid Usage -- -- = See Also -- -- 'cmdDrawMeshTasksIndirectNV' data DrawMeshTasksIndirectCommandNV = DrawMeshTasksIndirectCommandNV { -- | @taskCount@ is the number of local workgroups to dispatch in the X -- dimension. Y and Z dimension are implicitly set to one. -- -- @taskCount@ /must/ be less than or equal to -- 'PhysicalDeviceMeshShaderPropertiesNV'::@maxDrawMeshTasksCount@ taskCount :: Word32 , -- | @firstTask@ is the X component of the first workgroup ID. firstTask :: Word32 } deriving (Typeable, Eq) #if defined(GENERIC_INSTANCES) deriving instance Generic (DrawMeshTasksIndirectCommandNV) #endif deriving instance Show DrawMeshTasksIndirectCommandNV instance ToCStruct DrawMeshTasksIndirectCommandNV where withCStruct x f = allocaBytesAligned 8 4 $ \p -> pokeCStruct p x (f p) pokeCStruct p DrawMeshTasksIndirectCommandNV{..} f = do poke ((p `plusPtr` 0 :: Ptr Word32)) (taskCount) poke ((p `plusPtr` 4 :: Ptr Word32)) (firstTask) f cStructSize = 8 cStructAlignment = 4 pokeZeroCStruct p f = do poke ((p `plusPtr` 0 :: Ptr Word32)) (zero) poke ((p `plusPtr` 4 :: Ptr Word32)) (zero) f instance FromCStruct DrawMeshTasksIndirectCommandNV where peekCStruct p = do taskCount <- peek @Word32 ((p `plusPtr` 0 :: Ptr Word32)) firstTask <- peek @Word32 ((p `plusPtr` 4 :: Ptr Word32)) pure $ DrawMeshTasksIndirectCommandNV taskCount firstTask instance Storable DrawMeshTasksIndirectCommandNV where sizeOf ~_ = 8 alignment ~_ = 4 peek = peekCStruct poke ptr poked = pokeCStruct ptr poked (pure ()) instance Zero DrawMeshTasksIndirectCommandNV where zero = DrawMeshTasksIndirectCommandNV zero zero type NV_MESH_SHADER_SPEC_VERSION = 1 -- No documentation found for TopLevel "VK_NV_MESH_SHADER_SPEC_VERSION" pattern NV_MESH_SHADER_SPEC_VERSION :: forall a . Integral a => a pattern NV_MESH_SHADER_SPEC_VERSION = 1 type NV_MESH_SHADER_EXTENSION_NAME = "VK_NV_mesh_shader" -- No documentation found for TopLevel "VK_NV_MESH_SHADER_EXTENSION_NAME" pattern NV_MESH_SHADER_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a pattern NV_MESH_SHADER_EXTENSION_NAME = "VK_NV_mesh_shader"