vulkan 3.0.0.0 → 3.1.0.0
raw patch · 149 files changed
+14653/−15808 lines, 149 filesdep +file-embeddep +template-haskelldep +temporaryPVP ok
version bump matches the API change (PVP)
Dependencies added: file-embed, template-haskell, temporary, typed-process
API changes (from Hackage documentation)
+ Graphics.Vulkan.CStruct.Extends: infixr 6 ::&
+ Graphics.Vulkan.CStruct.Extends: infixr 7 :&
+ Graphics.Vulkan.CStruct.Extends: pattern (:&) :: e -> Chain es -> Chain (e : es)
+ Graphics.Vulkan.CStruct.Extends: pattern (::&) :: Extensible a => a es -> Chain es -> a es
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdWithQuery :: forall r. CommandBuffer -> QueryPool -> Word32 -> QueryControlFlags -> IO r -> IO r
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdWithRenderPass :: forall a r. PokeChain a => CommandBuffer -> RenderPassBeginInfo a -> SubpassContents -> IO r -> IO r
+ Graphics.Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2: cmdWithRenderPass2 :: forall a r. PokeChain a => CommandBuffer -> RenderPassBeginInfo a -> SubpassBeginInfo -> SubpassEndInfo -> IO r -> IO r
+ Graphics.Vulkan.Extensions.VK_EXT_conditional_rendering: cmdWithConditionalRenderingEXT :: forall r. CommandBuffer -> ConditionalRenderingBeginInfoEXT -> IO r -> IO r
+ Graphics.Vulkan.Extensions.VK_EXT_debug_utils: cmdWithDebugUtilsLabelEXT :: forall r. CommandBuffer -> DebugUtilsLabelEXT -> IO r -> IO r
+ Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdWithQueryIndexedEXT :: forall r. CommandBuffer -> QueryPool -> Word32 -> QueryControlFlags -> Word32 -> IO r -> IO r
+ Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdWithTransformFeedbackEXT :: forall r. CommandBuffer -> Word32 -> Vector Buffer -> Either Word32 (Vector DeviceSize) -> IO r -> IO r
- Graphics.Vulkan.Core10.Buffer: createBuffer :: PokeChain a => Device -> BufferCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Buffer
+ Graphics.Vulkan.Core10.Buffer: createBuffer :: forall a io. (PokeChain a, MonadIO io) => Device -> BufferCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Buffer
- Graphics.Vulkan.Core10.Buffer: destroyBuffer :: Device -> Buffer -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.Buffer: destroyBuffer :: forall io. MonadIO io => Device -> Buffer -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.Buffer: withBuffer :: PokeChain a => Device -> BufferCreateInfo a -> Maybe AllocationCallbacks -> (Buffer -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Buffer: withBuffer :: forall a r. PokeChain a => Device -> BufferCreateInfo a -> Maybe AllocationCallbacks -> (Buffer -> IO r) -> IO r
- Graphics.Vulkan.Core10.BufferView: createBufferView :: Device -> BufferViewCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO BufferView
+ Graphics.Vulkan.Core10.BufferView: createBufferView :: forall io. MonadIO io => Device -> BufferViewCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io BufferView
- Graphics.Vulkan.Core10.BufferView: destroyBufferView :: Device -> BufferView -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.BufferView: destroyBufferView :: forall io. MonadIO io => Device -> BufferView -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.BufferView: withBufferView :: Device -> BufferViewCreateInfo -> Maybe AllocationCallbacks -> (BufferView -> IO r) -> IO r
+ Graphics.Vulkan.Core10.BufferView: withBufferView :: forall r. Device -> BufferViewCreateInfo -> Maybe AllocationCallbacks -> (BufferView -> IO r) -> IO r
- Graphics.Vulkan.Core10.CommandBuffer: allocateCommandBuffers :: Device -> CommandBufferAllocateInfo -> IO ("commandBuffers" ::: Vector CommandBuffer)
+ Graphics.Vulkan.Core10.CommandBuffer: allocateCommandBuffers :: forall io. MonadIO io => Device -> CommandBufferAllocateInfo -> io ("commandBuffers" ::: Vector CommandBuffer)
- Graphics.Vulkan.Core10.CommandBuffer: beginCommandBuffer :: PokeChain a => CommandBuffer -> CommandBufferBeginInfo a -> IO ()
+ Graphics.Vulkan.Core10.CommandBuffer: beginCommandBuffer :: forall a io. (PokeChain a, MonadIO io) => CommandBuffer -> CommandBufferBeginInfo a -> io ()
- Graphics.Vulkan.Core10.CommandBuffer: endCommandBuffer :: CommandBuffer -> IO ()
+ Graphics.Vulkan.Core10.CommandBuffer: endCommandBuffer :: forall io. MonadIO io => CommandBuffer -> io ()
- Graphics.Vulkan.Core10.CommandBuffer: freeCommandBuffers :: Device -> CommandPool -> ("commandBuffers" ::: Vector CommandBuffer) -> IO ()
+ Graphics.Vulkan.Core10.CommandBuffer: freeCommandBuffers :: forall io. MonadIO io => Device -> CommandPool -> ("commandBuffers" ::: Vector CommandBuffer) -> io ()
- Graphics.Vulkan.Core10.CommandBuffer: resetCommandBuffer :: CommandBuffer -> CommandBufferResetFlags -> IO ()
+ Graphics.Vulkan.Core10.CommandBuffer: resetCommandBuffer :: forall io. MonadIO io => CommandBuffer -> CommandBufferResetFlags -> io ()
- Graphics.Vulkan.Core10.CommandBuffer: useCommandBuffer :: PokeChain a => CommandBuffer -> CommandBufferBeginInfo a -> IO r -> IO r
+ Graphics.Vulkan.Core10.CommandBuffer: useCommandBuffer :: forall a r. PokeChain a => CommandBuffer -> CommandBufferBeginInfo a -> IO r -> IO r
- Graphics.Vulkan.Core10.CommandBuffer: withCommandBuffers :: Device -> CommandBufferAllocateInfo -> (Vector CommandBuffer -> IO r) -> IO r
+ Graphics.Vulkan.Core10.CommandBuffer: withCommandBuffers :: forall r. Device -> CommandBufferAllocateInfo -> (Vector CommandBuffer -> IO r) -> IO r
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBeginQuery :: CommandBuffer -> QueryPool -> ("query" ::: Word32) -> QueryControlFlags -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBeginQuery :: forall io. MonadIO io => CommandBuffer -> QueryPool -> ("query" ::: Word32) -> QueryControlFlags -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBeginRenderPass :: PokeChain a => CommandBuffer -> RenderPassBeginInfo a -> SubpassContents -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBeginRenderPass :: forall a io. (PokeChain a, MonadIO io) => CommandBuffer -> RenderPassBeginInfo a -> SubpassContents -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBindDescriptorSets :: CommandBuffer -> PipelineBindPoint -> PipelineLayout -> ("firstSet" ::: Word32) -> ("descriptorSets" ::: Vector DescriptorSet) -> ("dynamicOffsets" ::: Vector Word32) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBindDescriptorSets :: forall io. MonadIO io => CommandBuffer -> PipelineBindPoint -> PipelineLayout -> ("firstSet" ::: Word32) -> ("descriptorSets" ::: Vector DescriptorSet) -> ("dynamicOffsets" ::: Vector Word32) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBindIndexBuffer :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> IndexType -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBindIndexBuffer :: forall io. MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> IndexType -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBindPipeline :: CommandBuffer -> PipelineBindPoint -> Pipeline -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBindPipeline :: forall io. MonadIO io => CommandBuffer -> PipelineBindPoint -> Pipeline -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBindVertexBuffers :: CommandBuffer -> ("firstBinding" ::: Word32) -> ("buffers" ::: Vector Buffer) -> ("offsets" ::: Vector DeviceSize) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBindVertexBuffers :: forall io. MonadIO io => CommandBuffer -> ("firstBinding" ::: Word32) -> ("buffers" ::: Vector Buffer) -> ("offsets" ::: Vector DeviceSize) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBlitImage :: CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector ImageBlit) -> Filter -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdBlitImage :: forall io. MonadIO io => CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector ImageBlit) -> Filter -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdClearAttachments :: CommandBuffer -> ("attachments" ::: Vector ClearAttachment) -> ("rects" ::: Vector ClearRect) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdClearAttachments :: forall io. MonadIO io => CommandBuffer -> ("attachments" ::: Vector ClearAttachment) -> ("rects" ::: Vector ClearRect) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdClearColorImage :: CommandBuffer -> Image -> ImageLayout -> ClearColorValue -> ("ranges" ::: Vector ImageSubresourceRange) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdClearColorImage :: forall io. MonadIO io => CommandBuffer -> Image -> ImageLayout -> ClearColorValue -> ("ranges" ::: Vector ImageSubresourceRange) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdClearDepthStencilImage :: CommandBuffer -> Image -> ImageLayout -> ClearDepthStencilValue -> ("ranges" ::: Vector ImageSubresourceRange) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdClearDepthStencilImage :: forall io. MonadIO io => CommandBuffer -> Image -> ImageLayout -> ClearDepthStencilValue -> ("ranges" ::: Vector ImageSubresourceRange) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdCopyBuffer :: CommandBuffer -> ("srcBuffer" ::: Buffer) -> ("dstBuffer" ::: Buffer) -> ("regions" ::: Vector BufferCopy) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdCopyBuffer :: forall io. MonadIO io => CommandBuffer -> ("srcBuffer" ::: Buffer) -> ("dstBuffer" ::: Buffer) -> ("regions" ::: Vector BufferCopy) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdCopyBufferToImage :: CommandBuffer -> ("srcBuffer" ::: Buffer) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector BufferImageCopy) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdCopyBufferToImage :: forall io. MonadIO io => CommandBuffer -> ("srcBuffer" ::: Buffer) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector BufferImageCopy) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdCopyImage :: CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector ImageCopy) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdCopyImage :: forall io. MonadIO io => CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector ImageCopy) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdCopyImageToBuffer :: CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstBuffer" ::: Buffer) -> ("regions" ::: Vector BufferImageCopy) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdCopyImageToBuffer :: forall io. MonadIO io => CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstBuffer" ::: Buffer) -> ("regions" ::: Vector BufferImageCopy) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdCopyQueryPoolResults :: CommandBuffer -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> ("stride" ::: DeviceSize) -> QueryResultFlags -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdCopyQueryPoolResults :: forall io. MonadIO io => CommandBuffer -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> ("stride" ::: DeviceSize) -> QueryResultFlags -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdDispatch :: CommandBuffer -> ("groupCountX" ::: Word32) -> ("groupCountY" ::: Word32) -> ("groupCountZ" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdDispatch :: forall io. MonadIO io => CommandBuffer -> ("groupCountX" ::: Word32) -> ("groupCountY" ::: Word32) -> ("groupCountZ" ::: Word32) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdDispatchIndirect :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdDispatchIndirect :: forall io. MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdDraw :: CommandBuffer -> ("vertexCount" ::: Word32) -> ("instanceCount" ::: Word32) -> ("firstVertex" ::: Word32) -> ("firstInstance" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdDraw :: forall io. MonadIO io => CommandBuffer -> ("vertexCount" ::: Word32) -> ("instanceCount" ::: Word32) -> ("firstVertex" ::: Word32) -> ("firstInstance" ::: Word32) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdDrawIndexed :: CommandBuffer -> ("indexCount" ::: Word32) -> ("instanceCount" ::: Word32) -> ("firstIndex" ::: Word32) -> ("vertexOffset" ::: Int32) -> ("firstInstance" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdDrawIndexed :: forall io. MonadIO io => CommandBuffer -> ("indexCount" ::: Word32) -> ("instanceCount" ::: Word32) -> ("firstIndex" ::: Word32) -> ("vertexOffset" ::: Int32) -> ("firstInstance" ::: Word32) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdDrawIndexedIndirect :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdDrawIndexedIndirect :: forall io. MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdDrawIndirect :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdDrawIndirect :: forall io. MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdEndQuery :: CommandBuffer -> QueryPool -> ("query" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdEndQuery :: forall io. MonadIO io => CommandBuffer -> QueryPool -> ("query" ::: Word32) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdEndRenderPass :: CommandBuffer -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdEndRenderPass :: forall io. MonadIO io => CommandBuffer -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdExecuteCommands :: CommandBuffer -> ("commandBuffers" ::: Vector CommandBuffer) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdExecuteCommands :: forall io. MonadIO io => CommandBuffer -> ("commandBuffers" ::: Vector CommandBuffer) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdFillBuffer :: CommandBuffer -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> DeviceSize -> ("data" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdFillBuffer :: forall io. MonadIO io => CommandBuffer -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> DeviceSize -> ("data" ::: Word32) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdNextSubpass :: CommandBuffer -> SubpassContents -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdNextSubpass :: forall io. MonadIO io => CommandBuffer -> SubpassContents -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdPipelineBarrier :: PokeChain a => CommandBuffer -> ("srcStageMask" ::: PipelineStageFlags) -> ("dstStageMask" ::: PipelineStageFlags) -> DependencyFlags -> ("memoryBarriers" ::: Vector MemoryBarrier) -> ("bufferMemoryBarriers" ::: Vector BufferMemoryBarrier) -> ("imageMemoryBarriers" ::: Vector (ImageMemoryBarrier a)) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdPipelineBarrier :: forall a io. (PokeChain a, MonadIO io) => CommandBuffer -> ("srcStageMask" ::: PipelineStageFlags) -> ("dstStageMask" ::: PipelineStageFlags) -> DependencyFlags -> ("memoryBarriers" ::: Vector MemoryBarrier) -> ("bufferMemoryBarriers" ::: Vector BufferMemoryBarrier) -> ("imageMemoryBarriers" ::: Vector (ImageMemoryBarrier a)) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdPushConstants :: CommandBuffer -> PipelineLayout -> ShaderStageFlags -> ("offset" ::: Word32) -> ("size" ::: Word32) -> ("values" ::: Ptr ()) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdPushConstants :: forall io. MonadIO io => CommandBuffer -> PipelineLayout -> ShaderStageFlags -> ("offset" ::: Word32) -> ("size" ::: Word32) -> ("values" ::: Ptr ()) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdResetEvent :: CommandBuffer -> Event -> ("stageMask" ::: PipelineStageFlags) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdResetEvent :: forall io. MonadIO io => CommandBuffer -> Event -> ("stageMask" ::: PipelineStageFlags) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdResetQueryPool :: CommandBuffer -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdResetQueryPool :: forall io. MonadIO io => CommandBuffer -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdResolveImage :: CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector ImageResolve) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdResolveImage :: forall io. MonadIO io => CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector ImageResolve) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetBlendConstants :: CommandBuffer -> ("blendConstants" ::: (Float, Float, Float, Float)) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetBlendConstants :: forall io. MonadIO io => CommandBuffer -> ("blendConstants" ::: (Float, Float, Float, Float)) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetDepthBias :: CommandBuffer -> ("depthBiasConstantFactor" ::: Float) -> ("depthBiasClamp" ::: Float) -> ("depthBiasSlopeFactor" ::: Float) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetDepthBias :: forall io. MonadIO io => CommandBuffer -> ("depthBiasConstantFactor" ::: Float) -> ("depthBiasClamp" ::: Float) -> ("depthBiasSlopeFactor" ::: Float) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetDepthBounds :: CommandBuffer -> ("minDepthBounds" ::: Float) -> ("maxDepthBounds" ::: Float) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetDepthBounds :: forall io. MonadIO io => CommandBuffer -> ("minDepthBounds" ::: Float) -> ("maxDepthBounds" ::: Float) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetEvent :: CommandBuffer -> Event -> ("stageMask" ::: PipelineStageFlags) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetEvent :: forall io. MonadIO io => CommandBuffer -> Event -> ("stageMask" ::: PipelineStageFlags) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetLineWidth :: CommandBuffer -> ("lineWidth" ::: Float) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetLineWidth :: forall io. MonadIO io => CommandBuffer -> ("lineWidth" ::: Float) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetScissor :: CommandBuffer -> ("firstScissor" ::: Word32) -> ("scissors" ::: Vector Rect2D) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetScissor :: forall io. MonadIO io => CommandBuffer -> ("firstScissor" ::: Word32) -> ("scissors" ::: Vector Rect2D) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetStencilCompareMask :: CommandBuffer -> ("faceMask" ::: StencilFaceFlags) -> ("compareMask" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetStencilCompareMask :: forall io. MonadIO io => CommandBuffer -> ("faceMask" ::: StencilFaceFlags) -> ("compareMask" ::: Word32) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetStencilReference :: CommandBuffer -> ("faceMask" ::: StencilFaceFlags) -> ("reference" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetStencilReference :: forall io. MonadIO io => CommandBuffer -> ("faceMask" ::: StencilFaceFlags) -> ("reference" ::: Word32) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetStencilWriteMask :: CommandBuffer -> ("faceMask" ::: StencilFaceFlags) -> ("writeMask" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetStencilWriteMask :: forall io. MonadIO io => CommandBuffer -> ("faceMask" ::: StencilFaceFlags) -> ("writeMask" ::: Word32) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetViewport :: CommandBuffer -> ("firstViewport" ::: Word32) -> ("viewports" ::: Vector Viewport) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdSetViewport :: forall io. MonadIO io => CommandBuffer -> ("firstViewport" ::: Word32) -> ("viewports" ::: Vector Viewport) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdUpdateBuffer :: CommandBuffer -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> ("dataSize" ::: DeviceSize) -> ("data" ::: Ptr ()) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdUpdateBuffer :: forall io. MonadIO io => CommandBuffer -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> ("dataSize" ::: DeviceSize) -> ("data" ::: Ptr ()) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdWaitEvents :: PokeChain a => CommandBuffer -> ("events" ::: Vector Event) -> ("srcStageMask" ::: PipelineStageFlags) -> ("dstStageMask" ::: PipelineStageFlags) -> ("memoryBarriers" ::: Vector MemoryBarrier) -> ("bufferMemoryBarriers" ::: Vector BufferMemoryBarrier) -> ("imageMemoryBarriers" ::: Vector (ImageMemoryBarrier a)) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdWaitEvents :: forall a io. (PokeChain a, MonadIO io) => CommandBuffer -> ("events" ::: Vector Event) -> ("srcStageMask" ::: PipelineStageFlags) -> ("dstStageMask" ::: PipelineStageFlags) -> ("memoryBarriers" ::: Vector MemoryBarrier) -> ("bufferMemoryBarriers" ::: Vector BufferMemoryBarrier) -> ("imageMemoryBarriers" ::: Vector (ImageMemoryBarrier a)) -> io ()
- Graphics.Vulkan.Core10.CommandBufferBuilding: cmdWriteTimestamp :: CommandBuffer -> PipelineStageFlagBits -> QueryPool -> ("query" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core10.CommandBufferBuilding: cmdWriteTimestamp :: forall io. MonadIO io => CommandBuffer -> PipelineStageFlagBits -> QueryPool -> ("query" ::: Word32) -> io ()
- Graphics.Vulkan.Core10.CommandPool: createCommandPool :: Device -> CommandPoolCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO CommandPool
+ Graphics.Vulkan.Core10.CommandPool: createCommandPool :: forall io. MonadIO io => Device -> CommandPoolCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io CommandPool
- Graphics.Vulkan.Core10.CommandPool: destroyCommandPool :: Device -> CommandPool -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.CommandPool: destroyCommandPool :: forall io. MonadIO io => Device -> CommandPool -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.CommandPool: resetCommandPool :: Device -> CommandPool -> CommandPoolResetFlags -> IO ()
+ Graphics.Vulkan.Core10.CommandPool: resetCommandPool :: forall io. MonadIO io => Device -> CommandPool -> CommandPoolResetFlags -> io ()
- Graphics.Vulkan.Core10.CommandPool: withCommandPool :: Device -> CommandPoolCreateInfo -> Maybe AllocationCallbacks -> (CommandPool -> IO r) -> IO r
+ Graphics.Vulkan.Core10.CommandPool: withCommandPool :: forall r. Device -> CommandPoolCreateInfo -> Maybe AllocationCallbacks -> (CommandPool -> IO r) -> IO r
- Graphics.Vulkan.Core10.DescriptorSet: allocateDescriptorSets :: PokeChain a => Device -> DescriptorSetAllocateInfo a -> IO ("descriptorSets" ::: Vector DescriptorSet)
+ Graphics.Vulkan.Core10.DescriptorSet: allocateDescriptorSets :: forall a io. (PokeChain a, MonadIO io) => Device -> DescriptorSetAllocateInfo a -> io ("descriptorSets" ::: Vector DescriptorSet)
- Graphics.Vulkan.Core10.DescriptorSet: createDescriptorPool :: PokeChain a => Device -> DescriptorPoolCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO DescriptorPool
+ Graphics.Vulkan.Core10.DescriptorSet: createDescriptorPool :: forall a io. (PokeChain a, MonadIO io) => Device -> DescriptorPoolCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io DescriptorPool
- Graphics.Vulkan.Core10.DescriptorSet: createDescriptorSetLayout :: PokeChain a => Device -> DescriptorSetLayoutCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO DescriptorSetLayout
+ Graphics.Vulkan.Core10.DescriptorSet: createDescriptorSetLayout :: forall a io. (PokeChain a, MonadIO io) => Device -> DescriptorSetLayoutCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io DescriptorSetLayout
- Graphics.Vulkan.Core10.DescriptorSet: destroyDescriptorPool :: Device -> DescriptorPool -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.DescriptorSet: destroyDescriptorPool :: forall io. MonadIO io => Device -> DescriptorPool -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.DescriptorSet: destroyDescriptorSetLayout :: Device -> DescriptorSetLayout -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.DescriptorSet: destroyDescriptorSetLayout :: forall io. MonadIO io => Device -> DescriptorSetLayout -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.DescriptorSet: freeDescriptorSets :: Device -> DescriptorPool -> ("descriptorSets" ::: Vector DescriptorSet) -> IO ()
+ Graphics.Vulkan.Core10.DescriptorSet: freeDescriptorSets :: forall io. MonadIO io => Device -> DescriptorPool -> ("descriptorSets" ::: Vector DescriptorSet) -> io ()
- Graphics.Vulkan.Core10.DescriptorSet: resetDescriptorPool :: Device -> DescriptorPool -> DescriptorPoolResetFlags -> IO ()
+ Graphics.Vulkan.Core10.DescriptorSet: resetDescriptorPool :: forall io. MonadIO io => Device -> DescriptorPool -> DescriptorPoolResetFlags -> io ()
- Graphics.Vulkan.Core10.DescriptorSet: updateDescriptorSets :: PokeChain a => Device -> ("descriptorWrites" ::: Vector (WriteDescriptorSet a)) -> ("descriptorCopies" ::: Vector CopyDescriptorSet) -> IO ()
+ Graphics.Vulkan.Core10.DescriptorSet: updateDescriptorSets :: forall a io. (PokeChain a, MonadIO io) => Device -> ("descriptorWrites" ::: Vector (WriteDescriptorSet a)) -> ("descriptorCopies" ::: Vector CopyDescriptorSet) -> io ()
- Graphics.Vulkan.Core10.DescriptorSet: withDescriptorPool :: PokeChain a => Device -> DescriptorPoolCreateInfo a -> Maybe AllocationCallbacks -> (DescriptorPool -> IO r) -> IO r
+ Graphics.Vulkan.Core10.DescriptorSet: withDescriptorPool :: forall a r. PokeChain a => Device -> DescriptorPoolCreateInfo a -> Maybe AllocationCallbacks -> (DescriptorPool -> IO r) -> IO r
- Graphics.Vulkan.Core10.DescriptorSet: withDescriptorSetLayout :: PokeChain a => Device -> DescriptorSetLayoutCreateInfo a -> Maybe AllocationCallbacks -> (DescriptorSetLayout -> IO r) -> IO r
+ Graphics.Vulkan.Core10.DescriptorSet: withDescriptorSetLayout :: forall a r. PokeChain a => Device -> DescriptorSetLayoutCreateInfo a -> Maybe AllocationCallbacks -> (DescriptorSetLayout -> IO r) -> IO r
- Graphics.Vulkan.Core10.DescriptorSet: withDescriptorSets :: PokeChain a => Device -> DescriptorSetAllocateInfo a -> (Vector DescriptorSet -> IO r) -> IO r
+ Graphics.Vulkan.Core10.DescriptorSet: withDescriptorSets :: forall a r. PokeChain a => Device -> DescriptorSetAllocateInfo a -> DescriptorPool -> (Vector DescriptorSet -> IO r) -> IO r
- Graphics.Vulkan.Core10.Device: createDevice :: PokeChain a => PhysicalDevice -> DeviceCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Device
+ Graphics.Vulkan.Core10.Device: createDevice :: forall a io. (PokeChain a, MonadIO io) => PhysicalDevice -> DeviceCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Device
- Graphics.Vulkan.Core10.Device: destroyDevice :: Device -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.Device: destroyDevice :: forall io. MonadIO io => Device -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.Device: withDevice :: PokeChain a => PhysicalDevice -> DeviceCreateInfo a -> Maybe AllocationCallbacks -> (Device -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Device: withDevice :: forall a r. PokeChain a => PhysicalDevice -> DeviceCreateInfo a -> Maybe AllocationCallbacks -> (Device -> IO r) -> IO r
- Graphics.Vulkan.Core10.DeviceInitialization: createInstance :: PokeChain a => InstanceCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Instance
+ Graphics.Vulkan.Core10.DeviceInitialization: createInstance :: forall a io. (PokeChain a, MonadIO io) => InstanceCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Instance
- Graphics.Vulkan.Core10.DeviceInitialization: destroyInstance :: Instance -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.DeviceInitialization: destroyInstance :: forall io. MonadIO io => Instance -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.DeviceInitialization: enumeratePhysicalDevices :: Instance -> IO (Result, "physicalDevices" ::: Vector PhysicalDevice)
+ Graphics.Vulkan.Core10.DeviceInitialization: enumeratePhysicalDevices :: forall io. MonadIO io => Instance -> io (Result, "physicalDevices" ::: Vector PhysicalDevice)
- Graphics.Vulkan.Core10.DeviceInitialization: getDeviceProcAddr :: Device -> ("name" ::: ByteString) -> IO PFN_vkVoidFunction
+ Graphics.Vulkan.Core10.DeviceInitialization: getDeviceProcAddr :: forall io. MonadIO io => Device -> ("name" ::: ByteString) -> io PFN_vkVoidFunction
- Graphics.Vulkan.Core10.DeviceInitialization: getInstanceProcAddr :: Instance -> ("name" ::: ByteString) -> IO PFN_vkVoidFunction
+ Graphics.Vulkan.Core10.DeviceInitialization: getInstanceProcAddr :: forall io. MonadIO io => Instance -> ("name" ::: ByteString) -> io PFN_vkVoidFunction
- Graphics.Vulkan.Core10.DeviceInitialization: getPhysicalDeviceFeatures :: PhysicalDevice -> IO PhysicalDeviceFeatures
+ Graphics.Vulkan.Core10.DeviceInitialization: getPhysicalDeviceFeatures :: forall io. MonadIO io => PhysicalDevice -> io PhysicalDeviceFeatures
- Graphics.Vulkan.Core10.DeviceInitialization: getPhysicalDeviceFormatProperties :: PhysicalDevice -> Format -> IO FormatProperties
+ Graphics.Vulkan.Core10.DeviceInitialization: getPhysicalDeviceFormatProperties :: forall io. MonadIO io => PhysicalDevice -> Format -> io FormatProperties
- Graphics.Vulkan.Core10.DeviceInitialization: getPhysicalDeviceImageFormatProperties :: PhysicalDevice -> Format -> ImageType -> ImageTiling -> ImageUsageFlags -> ImageCreateFlags -> IO ImageFormatProperties
+ Graphics.Vulkan.Core10.DeviceInitialization: getPhysicalDeviceImageFormatProperties :: forall io. MonadIO io => PhysicalDevice -> Format -> ImageType -> ImageTiling -> ImageUsageFlags -> ImageCreateFlags -> io ImageFormatProperties
- Graphics.Vulkan.Core10.DeviceInitialization: getPhysicalDeviceMemoryProperties :: PhysicalDevice -> IO PhysicalDeviceMemoryProperties
+ Graphics.Vulkan.Core10.DeviceInitialization: getPhysicalDeviceMemoryProperties :: forall io. MonadIO io => PhysicalDevice -> io PhysicalDeviceMemoryProperties
- Graphics.Vulkan.Core10.DeviceInitialization: getPhysicalDeviceProperties :: PhysicalDevice -> IO PhysicalDeviceProperties
+ Graphics.Vulkan.Core10.DeviceInitialization: getPhysicalDeviceProperties :: forall io. MonadIO io => PhysicalDevice -> io PhysicalDeviceProperties
- Graphics.Vulkan.Core10.DeviceInitialization: getPhysicalDeviceQueueFamilyProperties :: PhysicalDevice -> IO ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
+ Graphics.Vulkan.Core10.DeviceInitialization: getPhysicalDeviceQueueFamilyProperties :: forall io. MonadIO io => PhysicalDevice -> io ("queueFamilyProperties" ::: Vector QueueFamilyProperties)
- Graphics.Vulkan.Core10.DeviceInitialization: withInstance :: PokeChain a => InstanceCreateInfo a -> Maybe AllocationCallbacks -> (Instance -> IO r) -> IO r
+ Graphics.Vulkan.Core10.DeviceInitialization: withInstance :: forall a r. PokeChain a => InstanceCreateInfo a -> Maybe AllocationCallbacks -> (Instance -> IO r) -> IO r
- Graphics.Vulkan.Core10.Event: createEvent :: Device -> EventCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Event
+ Graphics.Vulkan.Core10.Event: createEvent :: forall io. MonadIO io => Device -> EventCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io Event
- Graphics.Vulkan.Core10.Event: destroyEvent :: Device -> Event -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.Event: destroyEvent :: forall io. MonadIO io => Device -> Event -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.Event: getEventStatus :: Device -> Event -> IO Result
+ Graphics.Vulkan.Core10.Event: getEventStatus :: forall io. MonadIO io => Device -> Event -> io Result
- Graphics.Vulkan.Core10.Event: resetEvent :: Device -> Event -> IO ()
+ Graphics.Vulkan.Core10.Event: resetEvent :: forall io. MonadIO io => Device -> Event -> io ()
- Graphics.Vulkan.Core10.Event: setEvent :: Device -> Event -> IO ()
+ Graphics.Vulkan.Core10.Event: setEvent :: forall io. MonadIO io => Device -> Event -> io ()
- Graphics.Vulkan.Core10.Event: withEvent :: Device -> EventCreateInfo -> Maybe AllocationCallbacks -> (Event -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Event: withEvent :: forall r. Device -> EventCreateInfo -> Maybe AllocationCallbacks -> (Event -> IO r) -> IO r
- Graphics.Vulkan.Core10.ExtensionDiscovery: enumerateDeviceExtensionProperties :: PhysicalDevice -> ("layerName" ::: Maybe ByteString) -> IO (Result, "properties" ::: Vector ExtensionProperties)
+ Graphics.Vulkan.Core10.ExtensionDiscovery: enumerateDeviceExtensionProperties :: forall io. MonadIO io => PhysicalDevice -> ("layerName" ::: Maybe ByteString) -> io (Result, "properties" ::: Vector ExtensionProperties)
- Graphics.Vulkan.Core10.ExtensionDiscovery: enumerateInstanceExtensionProperties :: ("layerName" ::: Maybe ByteString) -> IO (Result, "properties" ::: Vector ExtensionProperties)
+ Graphics.Vulkan.Core10.ExtensionDiscovery: enumerateInstanceExtensionProperties :: forall io. MonadIO io => ("layerName" ::: Maybe ByteString) -> io (Result, "properties" ::: Vector ExtensionProperties)
- Graphics.Vulkan.Core10.Fence: createFence :: PokeChain a => Device -> FenceCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Fence
+ Graphics.Vulkan.Core10.Fence: createFence :: forall a io. (PokeChain a, MonadIO io) => Device -> FenceCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Fence
- Graphics.Vulkan.Core10.Fence: destroyFence :: Device -> Fence -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.Fence: destroyFence :: forall io. MonadIO io => Device -> Fence -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.Fence: getFenceStatus :: Device -> Fence -> IO Result
+ Graphics.Vulkan.Core10.Fence: getFenceStatus :: forall io. MonadIO io => Device -> Fence -> io Result
- Graphics.Vulkan.Core10.Fence: resetFences :: Device -> ("fences" ::: Vector Fence) -> IO ()
+ Graphics.Vulkan.Core10.Fence: resetFences :: forall io. MonadIO io => Device -> ("fences" ::: Vector Fence) -> io ()
- Graphics.Vulkan.Core10.Fence: waitForFences :: Device -> ("fences" ::: Vector Fence) -> ("waitAll" ::: Bool) -> ("timeout" ::: Word64) -> IO Result
+ Graphics.Vulkan.Core10.Fence: waitForFences :: forall io. MonadIO io => Device -> ("fences" ::: Vector Fence) -> ("waitAll" ::: Bool) -> ("timeout" ::: Word64) -> io Result
- Graphics.Vulkan.Core10.Fence: withFence :: PokeChain a => Device -> FenceCreateInfo a -> Maybe AllocationCallbacks -> (Fence -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Fence: withFence :: forall a r. PokeChain a => Device -> FenceCreateInfo a -> Maybe AllocationCallbacks -> (Fence -> IO r) -> IO r
- Graphics.Vulkan.Core10.Image: createImage :: PokeChain a => Device -> ImageCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Image
+ Graphics.Vulkan.Core10.Image: createImage :: forall a io. (PokeChain a, MonadIO io) => Device -> ImageCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Image
- Graphics.Vulkan.Core10.Image: destroyImage :: Device -> Image -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.Image: destroyImage :: forall io. MonadIO io => Device -> Image -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.Image: getImageSubresourceLayout :: Device -> Image -> ImageSubresource -> IO SubresourceLayout
+ Graphics.Vulkan.Core10.Image: getImageSubresourceLayout :: forall io. MonadIO io => Device -> Image -> ImageSubresource -> io SubresourceLayout
- Graphics.Vulkan.Core10.Image: withImage :: PokeChain a => Device -> ImageCreateInfo a -> Maybe AllocationCallbacks -> (Image -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Image: withImage :: forall a r. PokeChain a => Device -> ImageCreateInfo a -> Maybe AllocationCallbacks -> (Image -> IO r) -> IO r
- Graphics.Vulkan.Core10.ImageView: createImageView :: PokeChain a => Device -> ImageViewCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ImageView
+ Graphics.Vulkan.Core10.ImageView: createImageView :: forall a io. (PokeChain a, MonadIO io) => Device -> ImageViewCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io ImageView
- Graphics.Vulkan.Core10.ImageView: destroyImageView :: Device -> ImageView -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.ImageView: destroyImageView :: forall io. MonadIO io => Device -> ImageView -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.ImageView: withImageView :: PokeChain a => Device -> ImageViewCreateInfo a -> Maybe AllocationCallbacks -> (ImageView -> IO r) -> IO r
+ Graphics.Vulkan.Core10.ImageView: withImageView :: forall a r. PokeChain a => Device -> ImageViewCreateInfo a -> Maybe AllocationCallbacks -> (ImageView -> IO r) -> IO r
- Graphics.Vulkan.Core10.LayerDiscovery: enumerateDeviceLayerProperties :: PhysicalDevice -> IO (Result, "properties" ::: Vector LayerProperties)
+ Graphics.Vulkan.Core10.LayerDiscovery: enumerateDeviceLayerProperties :: forall io. MonadIO io => PhysicalDevice -> io (Result, "properties" ::: Vector LayerProperties)
- Graphics.Vulkan.Core10.LayerDiscovery: enumerateInstanceLayerProperties :: IO (Result, "properties" ::: Vector LayerProperties)
+ Graphics.Vulkan.Core10.LayerDiscovery: enumerateInstanceLayerProperties :: forall io. MonadIO io => io (Result, "properties" ::: Vector LayerProperties)
- Graphics.Vulkan.Core10.Memory: allocateMemory :: PokeChain a => Device -> MemoryAllocateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO DeviceMemory
+ Graphics.Vulkan.Core10.Memory: allocateMemory :: forall a io. (PokeChain a, MonadIO io) => Device -> MemoryAllocateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io DeviceMemory
- Graphics.Vulkan.Core10.Memory: flushMappedMemoryRanges :: Device -> ("memoryRanges" ::: Vector MappedMemoryRange) -> IO ()
+ Graphics.Vulkan.Core10.Memory: flushMappedMemoryRanges :: forall io. MonadIO io => Device -> ("memoryRanges" ::: Vector MappedMemoryRange) -> io ()
- Graphics.Vulkan.Core10.Memory: freeMemory :: Device -> DeviceMemory -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.Memory: freeMemory :: forall io. MonadIO io => Device -> DeviceMemory -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.Memory: getDeviceMemoryCommitment :: Device -> DeviceMemory -> IO ("committedMemoryInBytes" ::: DeviceSize)
+ Graphics.Vulkan.Core10.Memory: getDeviceMemoryCommitment :: forall io. MonadIO io => Device -> DeviceMemory -> io ("committedMemoryInBytes" ::: DeviceSize)
- Graphics.Vulkan.Core10.Memory: invalidateMappedMemoryRanges :: Device -> ("memoryRanges" ::: Vector MappedMemoryRange) -> IO ()
+ Graphics.Vulkan.Core10.Memory: invalidateMappedMemoryRanges :: forall io. MonadIO io => Device -> ("memoryRanges" ::: Vector MappedMemoryRange) -> io ()
- Graphics.Vulkan.Core10.Memory: mapMemory :: Device -> DeviceMemory -> ("offset" ::: DeviceSize) -> DeviceSize -> MemoryMapFlags -> IO ("data" ::: Ptr ())
+ Graphics.Vulkan.Core10.Memory: mapMemory :: forall io. MonadIO io => Device -> DeviceMemory -> ("offset" ::: DeviceSize) -> DeviceSize -> MemoryMapFlags -> io ("data" ::: Ptr ())
- Graphics.Vulkan.Core10.Memory: unmapMemory :: Device -> DeviceMemory -> IO ()
+ Graphics.Vulkan.Core10.Memory: unmapMemory :: forall io. MonadIO io => Device -> DeviceMemory -> io ()
- Graphics.Vulkan.Core10.Memory: withMappedMemory :: Device -> DeviceMemory -> DeviceSize -> DeviceSize -> MemoryMapFlags -> (Ptr () -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Memory: withMappedMemory :: forall r. Device -> DeviceMemory -> DeviceSize -> DeviceSize -> MemoryMapFlags -> (Ptr () -> IO r) -> IO r
- Graphics.Vulkan.Core10.Memory: withMemory :: PokeChain a => Device -> MemoryAllocateInfo a -> Maybe AllocationCallbacks -> (DeviceMemory -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Memory: withMemory :: forall a r. PokeChain a => Device -> MemoryAllocateInfo a -> Maybe AllocationCallbacks -> (DeviceMemory -> IO r) -> IO r
- Graphics.Vulkan.Core10.MemoryManagement: bindBufferMemory :: Device -> Buffer -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> IO ()
+ Graphics.Vulkan.Core10.MemoryManagement: bindBufferMemory :: forall io. MonadIO io => Device -> Buffer -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> io ()
- Graphics.Vulkan.Core10.MemoryManagement: bindImageMemory :: Device -> Image -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> IO ()
+ Graphics.Vulkan.Core10.MemoryManagement: bindImageMemory :: forall io. MonadIO io => Device -> Image -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> io ()
- Graphics.Vulkan.Core10.MemoryManagement: getBufferMemoryRequirements :: Device -> Buffer -> IO MemoryRequirements
+ Graphics.Vulkan.Core10.MemoryManagement: getBufferMemoryRequirements :: forall io. MonadIO io => Device -> Buffer -> io MemoryRequirements
- Graphics.Vulkan.Core10.MemoryManagement: getImageMemoryRequirements :: Device -> Image -> IO MemoryRequirements
+ Graphics.Vulkan.Core10.MemoryManagement: getImageMemoryRequirements :: forall io. MonadIO io => Device -> Image -> io MemoryRequirements
- Graphics.Vulkan.Core10.Pass: createFramebuffer :: PokeChain a => Device -> FramebufferCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Framebuffer
+ Graphics.Vulkan.Core10.Pass: createFramebuffer :: forall a io. (PokeChain a, MonadIO io) => Device -> FramebufferCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Framebuffer
- Graphics.Vulkan.Core10.Pass: createRenderPass :: PokeChain a => Device -> RenderPassCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO RenderPass
+ Graphics.Vulkan.Core10.Pass: createRenderPass :: forall a io. (PokeChain a, MonadIO io) => Device -> RenderPassCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io RenderPass
- Graphics.Vulkan.Core10.Pass: destroyFramebuffer :: Device -> Framebuffer -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.Pass: destroyFramebuffer :: forall io. MonadIO io => Device -> Framebuffer -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.Pass: destroyRenderPass :: Device -> RenderPass -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.Pass: destroyRenderPass :: forall io. MonadIO io => Device -> RenderPass -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.Pass: getRenderAreaGranularity :: Device -> RenderPass -> IO ("granularity" ::: Extent2D)
+ Graphics.Vulkan.Core10.Pass: getRenderAreaGranularity :: forall io. MonadIO io => Device -> RenderPass -> io ("granularity" ::: Extent2D)
- Graphics.Vulkan.Core10.Pass: withFramebuffer :: PokeChain a => Device -> FramebufferCreateInfo a -> Maybe AllocationCallbacks -> (Framebuffer -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Pass: withFramebuffer :: forall a r. PokeChain a => Device -> FramebufferCreateInfo a -> Maybe AllocationCallbacks -> (Framebuffer -> IO r) -> IO r
- Graphics.Vulkan.Core10.Pass: withRenderPass :: PokeChain a => Device -> RenderPassCreateInfo a -> Maybe AllocationCallbacks -> (RenderPass -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Pass: withRenderPass :: forall a r. PokeChain a => Device -> RenderPassCreateInfo a -> Maybe AllocationCallbacks -> (RenderPass -> IO r) -> IO r
- Graphics.Vulkan.Core10.Pipeline: createComputePipelines :: PokeChain a => Device -> PipelineCache -> ("createInfos" ::: Vector (ComputePipelineCreateInfo a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ("pipelines" ::: Vector Pipeline)
+ Graphics.Vulkan.Core10.Pipeline: createComputePipelines :: forall a io. (PokeChain a, MonadIO io) => Device -> PipelineCache -> ("createInfos" ::: Vector (ComputePipelineCreateInfo a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io ("pipelines" ::: Vector Pipeline)
- Graphics.Vulkan.Core10.Pipeline: createGraphicsPipelines :: PokeChain a => Device -> PipelineCache -> ("createInfos" ::: Vector (GraphicsPipelineCreateInfo a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ("pipelines" ::: Vector Pipeline)
+ Graphics.Vulkan.Core10.Pipeline: createGraphicsPipelines :: forall a io. (PokeChain a, MonadIO io) => Device -> PipelineCache -> ("createInfos" ::: Vector (GraphicsPipelineCreateInfo a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io ("pipelines" ::: Vector Pipeline)
- Graphics.Vulkan.Core10.Pipeline: destroyPipeline :: Device -> Pipeline -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.Pipeline: destroyPipeline :: forall io. MonadIO io => Device -> Pipeline -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.Pipeline: withComputePipelines :: PokeChain a => Device -> PipelineCache -> Vector (ComputePipelineCreateInfo a) -> Maybe AllocationCallbacks -> (Vector Pipeline -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Pipeline: withComputePipelines :: forall a r. PokeChain a => Device -> PipelineCache -> Vector (ComputePipelineCreateInfo a) -> Maybe AllocationCallbacks -> (Vector Pipeline -> IO r) -> IO r
- Graphics.Vulkan.Core10.Pipeline: withGraphicsPipelines :: PokeChain a => Device -> PipelineCache -> Vector (GraphicsPipelineCreateInfo a) -> Maybe AllocationCallbacks -> (Vector Pipeline -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Pipeline: withGraphicsPipelines :: forall a r. PokeChain a => Device -> PipelineCache -> Vector (GraphicsPipelineCreateInfo a) -> Maybe AllocationCallbacks -> (Vector Pipeline -> IO r) -> IO r
- Graphics.Vulkan.Core10.PipelineCache: createPipelineCache :: Device -> PipelineCacheCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO PipelineCache
+ Graphics.Vulkan.Core10.PipelineCache: createPipelineCache :: forall io. MonadIO io => Device -> PipelineCacheCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io PipelineCache
- Graphics.Vulkan.Core10.PipelineCache: destroyPipelineCache :: Device -> PipelineCache -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.PipelineCache: destroyPipelineCache :: forall io. MonadIO io => Device -> PipelineCache -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.PipelineCache: getPipelineCacheData :: Device -> PipelineCache -> IO (Result, "data" ::: ByteString)
+ Graphics.Vulkan.Core10.PipelineCache: getPipelineCacheData :: forall io. MonadIO io => Device -> PipelineCache -> io (Result, "data" ::: ByteString)
- Graphics.Vulkan.Core10.PipelineCache: mergePipelineCaches :: Device -> ("dstCache" ::: PipelineCache) -> ("srcCaches" ::: Vector PipelineCache) -> IO ()
+ Graphics.Vulkan.Core10.PipelineCache: mergePipelineCaches :: forall io. MonadIO io => Device -> ("dstCache" ::: PipelineCache) -> ("srcCaches" ::: Vector PipelineCache) -> io ()
- Graphics.Vulkan.Core10.PipelineCache: withPipelineCache :: Device -> PipelineCacheCreateInfo -> Maybe AllocationCallbacks -> (PipelineCache -> IO r) -> IO r
+ Graphics.Vulkan.Core10.PipelineCache: withPipelineCache :: forall r. Device -> PipelineCacheCreateInfo -> Maybe AllocationCallbacks -> (PipelineCache -> IO r) -> IO r
- Graphics.Vulkan.Core10.PipelineLayout: createPipelineLayout :: Device -> PipelineLayoutCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO PipelineLayout
+ Graphics.Vulkan.Core10.PipelineLayout: createPipelineLayout :: forall io. MonadIO io => Device -> PipelineLayoutCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io PipelineLayout
- Graphics.Vulkan.Core10.PipelineLayout: destroyPipelineLayout :: Device -> PipelineLayout -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.PipelineLayout: destroyPipelineLayout :: forall io. MonadIO io => Device -> PipelineLayout -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.PipelineLayout: withPipelineLayout :: Device -> PipelineLayoutCreateInfo -> Maybe AllocationCallbacks -> (PipelineLayout -> IO r) -> IO r
+ Graphics.Vulkan.Core10.PipelineLayout: withPipelineLayout :: forall r. Device -> PipelineLayoutCreateInfo -> Maybe AllocationCallbacks -> (PipelineLayout -> IO r) -> IO r
- Graphics.Vulkan.Core10.Query: createQueryPool :: PokeChain a => Device -> QueryPoolCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO QueryPool
+ Graphics.Vulkan.Core10.Query: createQueryPool :: forall a io. (PokeChain a, MonadIO io) => Device -> QueryPoolCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io QueryPool
- Graphics.Vulkan.Core10.Query: destroyQueryPool :: Device -> QueryPool -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.Query: destroyQueryPool :: forall io. MonadIO io => Device -> QueryPool -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.Query: getQueryPoolResults :: Device -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> ("stride" ::: DeviceSize) -> QueryResultFlags -> IO Result
+ Graphics.Vulkan.Core10.Query: getQueryPoolResults :: forall io. MonadIO io => Device -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> ("stride" ::: DeviceSize) -> QueryResultFlags -> io Result
- Graphics.Vulkan.Core10.Query: withQueryPool :: PokeChain a => Device -> QueryPoolCreateInfo a -> Maybe AllocationCallbacks -> (QueryPool -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Query: withQueryPool :: forall a r. PokeChain a => Device -> QueryPoolCreateInfo a -> Maybe AllocationCallbacks -> (QueryPool -> IO r) -> IO r
- Graphics.Vulkan.Core10.Queue: deviceWaitIdle :: Device -> IO ()
+ Graphics.Vulkan.Core10.Queue: deviceWaitIdle :: forall io. MonadIO io => Device -> io ()
- Graphics.Vulkan.Core10.Queue: getDeviceQueue :: Device -> ("queueFamilyIndex" ::: Word32) -> ("queueIndex" ::: Word32) -> IO Queue
+ Graphics.Vulkan.Core10.Queue: getDeviceQueue :: forall io. MonadIO io => Device -> ("queueFamilyIndex" ::: Word32) -> ("queueIndex" ::: Word32) -> io Queue
- Graphics.Vulkan.Core10.Queue: queueSubmit :: PokeChain a => Queue -> ("submits" ::: Vector (SubmitInfo a)) -> Fence -> IO ()
+ Graphics.Vulkan.Core10.Queue: queueSubmit :: forall a io. (PokeChain a, MonadIO io) => Queue -> ("submits" ::: Vector (SubmitInfo a)) -> Fence -> io ()
- Graphics.Vulkan.Core10.Queue: queueWaitIdle :: Queue -> IO ()
+ Graphics.Vulkan.Core10.Queue: queueWaitIdle :: forall io. MonadIO io => Queue -> io ()
- Graphics.Vulkan.Core10.QueueSemaphore: createSemaphore :: PokeChain a => Device -> SemaphoreCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Semaphore
+ Graphics.Vulkan.Core10.QueueSemaphore: createSemaphore :: forall a io. (PokeChain a, MonadIO io) => Device -> SemaphoreCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Semaphore
- Graphics.Vulkan.Core10.QueueSemaphore: destroySemaphore :: Device -> Semaphore -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.QueueSemaphore: destroySemaphore :: forall io. MonadIO io => Device -> Semaphore -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.QueueSemaphore: withSemaphore :: PokeChain a => Device -> SemaphoreCreateInfo a -> Maybe AllocationCallbacks -> (Semaphore -> IO r) -> IO r
+ Graphics.Vulkan.Core10.QueueSemaphore: withSemaphore :: forall a r. PokeChain a => Device -> SemaphoreCreateInfo a -> Maybe AllocationCallbacks -> (Semaphore -> IO r) -> IO r
- Graphics.Vulkan.Core10.Sampler: createSampler :: PokeChain a => Device -> SamplerCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Sampler
+ Graphics.Vulkan.Core10.Sampler: createSampler :: forall a io. (PokeChain a, MonadIO io) => Device -> SamplerCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Sampler
- Graphics.Vulkan.Core10.Sampler: destroySampler :: Device -> Sampler -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.Sampler: destroySampler :: forall io. MonadIO io => Device -> Sampler -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.Sampler: withSampler :: PokeChain a => Device -> SamplerCreateInfo a -> Maybe AllocationCallbacks -> (Sampler -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Sampler: withSampler :: forall a r. PokeChain a => Device -> SamplerCreateInfo a -> Maybe AllocationCallbacks -> (Sampler -> IO r) -> IO r
- Graphics.Vulkan.Core10.Shader: createShaderModule :: PokeChain a => Device -> ShaderModuleCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ShaderModule
+ Graphics.Vulkan.Core10.Shader: createShaderModule :: forall a io. (PokeChain a, MonadIO io) => Device -> ShaderModuleCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io ShaderModule
- Graphics.Vulkan.Core10.Shader: destroyShaderModule :: Device -> ShaderModule -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core10.Shader: destroyShaderModule :: forall io. MonadIO io => Device -> ShaderModule -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core10.Shader: withShaderModule :: PokeChain a => Device -> ShaderModuleCreateInfo a -> Maybe AllocationCallbacks -> (ShaderModule -> IO r) -> IO r
+ Graphics.Vulkan.Core10.Shader: withShaderModule :: forall a r. PokeChain a => Device -> ShaderModuleCreateInfo a -> Maybe AllocationCallbacks -> (ShaderModule -> IO r) -> IO r
- Graphics.Vulkan.Core10.SparseResourceMemoryManagement: getImageSparseMemoryRequirements :: Device -> Image -> IO ("sparseMemoryRequirements" ::: Vector SparseImageMemoryRequirements)
+ Graphics.Vulkan.Core10.SparseResourceMemoryManagement: getImageSparseMemoryRequirements :: forall io. MonadIO io => Device -> Image -> io ("sparseMemoryRequirements" ::: Vector SparseImageMemoryRequirements)
- Graphics.Vulkan.Core10.SparseResourceMemoryManagement: getPhysicalDeviceSparseImageFormatProperties :: PhysicalDevice -> Format -> ImageType -> ("samples" ::: SampleCountFlagBits) -> ImageUsageFlags -> ImageTiling -> IO ("properties" ::: Vector SparseImageFormatProperties)
+ Graphics.Vulkan.Core10.SparseResourceMemoryManagement: getPhysicalDeviceSparseImageFormatProperties :: forall io. MonadIO io => PhysicalDevice -> Format -> ImageType -> ("samples" ::: SampleCountFlagBits) -> ImageUsageFlags -> ImageTiling -> io ("properties" ::: Vector SparseImageFormatProperties)
- Graphics.Vulkan.Core10.SparseResourceMemoryManagement: queueBindSparse :: PokeChain a => Queue -> ("bindInfo" ::: Vector (BindSparseInfo a)) -> Fence -> IO ()
+ Graphics.Vulkan.Core10.SparseResourceMemoryManagement: queueBindSparse :: forall a io. (PokeChain a, MonadIO io) => Queue -> ("bindInfo" ::: Vector (BindSparseInfo a)) -> Fence -> io ()
- Graphics.Vulkan.Core11.DeviceInitialization: enumerateInstanceVersion :: IO ("apiVersion" ::: Word32)
+ Graphics.Vulkan.Core11.DeviceInitialization: enumerateInstanceVersion :: forall io. MonadIO io => io ("apiVersion" ::: Word32)
- Graphics.Vulkan.Core11.Originally_Based_On_VK_KHR_protected_memory: getDeviceQueue2 :: Device -> DeviceQueueInfo2 -> IO Queue
+ Graphics.Vulkan.Core11.Originally_Based_On_VK_KHR_protected_memory: getDeviceQueue2 :: forall io. MonadIO io => Device -> DeviceQueueInfo2 -> io Queue
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_bind_memory2: bindBufferMemory2 :: PokeChain a => Device -> ("bindInfos" ::: Vector (BindBufferMemoryInfo a)) -> IO ()
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_bind_memory2: bindBufferMemory2 :: forall a io. (PokeChain a, MonadIO io) => Device -> ("bindInfos" ::: Vector (BindBufferMemoryInfo a)) -> io ()
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_bind_memory2: bindImageMemory2 :: PokeChain a => Device -> ("bindInfos" ::: Vector (BindImageMemoryInfo a)) -> IO ()
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_bind_memory2: bindImageMemory2 :: forall a io. (PokeChain a, MonadIO io) => Device -> ("bindInfos" ::: Vector (BindImageMemoryInfo a)) -> io ()
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_descriptor_update_template: createDescriptorUpdateTemplate :: Device -> DescriptorUpdateTemplateCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO DescriptorUpdateTemplate
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_descriptor_update_template: createDescriptorUpdateTemplate :: forall io. MonadIO io => Device -> DescriptorUpdateTemplateCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io DescriptorUpdateTemplate
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_descriptor_update_template: destroyDescriptorUpdateTemplate :: Device -> DescriptorUpdateTemplate -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_descriptor_update_template: destroyDescriptorUpdateTemplate :: forall io. MonadIO io => Device -> DescriptorUpdateTemplate -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_descriptor_update_template: updateDescriptorSetWithTemplate :: Device -> DescriptorSet -> DescriptorUpdateTemplate -> ("data" ::: Ptr ()) -> IO ()
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_descriptor_update_template: updateDescriptorSetWithTemplate :: forall io. MonadIO io => Device -> DescriptorSet -> DescriptorUpdateTemplate -> ("data" ::: Ptr ()) -> io ()
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_descriptor_update_template: withDescriptorUpdateTemplate :: Device -> DescriptorUpdateTemplateCreateInfo -> Maybe AllocationCallbacks -> (DescriptorUpdateTemplate -> IO r) -> IO r
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_descriptor_update_template: withDescriptorUpdateTemplate :: forall r. Device -> DescriptorUpdateTemplateCreateInfo -> Maybe AllocationCallbacks -> (DescriptorUpdateTemplate -> IO r) -> IO r
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group: cmdDispatchBase :: CommandBuffer -> ("baseGroupX" ::: Word32) -> ("baseGroupY" ::: Word32) -> ("baseGroupZ" ::: Word32) -> ("groupCountX" ::: Word32) -> ("groupCountY" ::: Word32) -> ("groupCountZ" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group: cmdDispatchBase :: forall io. MonadIO io => CommandBuffer -> ("baseGroupX" ::: Word32) -> ("baseGroupY" ::: Word32) -> ("baseGroupZ" ::: Word32) -> ("groupCountX" ::: Word32) -> ("groupCountY" ::: Word32) -> ("groupCountZ" ::: Word32) -> io ()
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group: cmdSetDeviceMask :: CommandBuffer -> ("deviceMask" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group: cmdSetDeviceMask :: forall io. MonadIO io => CommandBuffer -> ("deviceMask" ::: Word32) -> io ()
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group: getDeviceGroupPeerMemoryFeatures :: Device -> ("heapIndex" ::: Word32) -> ("localDeviceIndex" ::: Word32) -> ("remoteDeviceIndex" ::: Word32) -> IO ("peerMemoryFeatures" ::: PeerMemoryFeatureFlags)
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group: getDeviceGroupPeerMemoryFeatures :: forall io. MonadIO io => Device -> ("heapIndex" ::: Word32) -> ("localDeviceIndex" ::: Word32) -> ("remoteDeviceIndex" ::: Word32) -> io ("peerMemoryFeatures" ::: PeerMemoryFeatureFlags)
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group_creation: enumeratePhysicalDeviceGroups :: Instance -> IO (Result, "physicalDeviceGroupProperties" ::: Vector PhysicalDeviceGroupProperties)
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group_creation: enumeratePhysicalDeviceGroups :: forall io. MonadIO io => Instance -> io (Result, "physicalDeviceGroupProperties" ::: Vector PhysicalDeviceGroupProperties)
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_fence_capabilities: getPhysicalDeviceExternalFenceProperties :: PhysicalDevice -> PhysicalDeviceExternalFenceInfo -> IO ExternalFenceProperties
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_fence_capabilities: getPhysicalDeviceExternalFenceProperties :: forall io. MonadIO io => PhysicalDevice -> PhysicalDeviceExternalFenceInfo -> io ExternalFenceProperties
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities: getPhysicalDeviceExternalBufferProperties :: PhysicalDevice -> PhysicalDeviceExternalBufferInfo -> IO ExternalBufferProperties
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities: getPhysicalDeviceExternalBufferProperties :: forall io. MonadIO io => PhysicalDevice -> PhysicalDeviceExternalBufferInfo -> io ExternalBufferProperties
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_semaphore_capabilities: getPhysicalDeviceExternalSemaphoreProperties :: PokeChain a => PhysicalDevice -> PhysicalDeviceExternalSemaphoreInfo a -> IO ExternalSemaphoreProperties
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_semaphore_capabilities: getPhysicalDeviceExternalSemaphoreProperties :: forall a io. (PokeChain a, MonadIO io) => PhysicalDevice -> PhysicalDeviceExternalSemaphoreInfo a -> io ExternalSemaphoreProperties
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2: getBufferMemoryRequirements2 :: (PokeChain a, PeekChain a) => Device -> BufferMemoryRequirementsInfo2 -> IO (MemoryRequirements2 a)
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2: getBufferMemoryRequirements2 :: forall a io. (PokeChain a, PeekChain a, MonadIO io) => Device -> BufferMemoryRequirementsInfo2 -> io (MemoryRequirements2 a)
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2: getImageMemoryRequirements2 :: (PokeChain a, PokeChain b, PeekChain b) => Device -> ImageMemoryRequirementsInfo2 a -> IO (MemoryRequirements2 b)
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2: getImageMemoryRequirements2 :: forall a b io. (PokeChain a, PokeChain b, PeekChain b, MonadIO io) => Device -> ImageMemoryRequirementsInfo2 a -> io (MemoryRequirements2 b)
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2: getImageSparseMemoryRequirements2 :: Device -> ImageSparseMemoryRequirementsInfo2 -> IO ("sparseMemoryRequirements" ::: Vector SparseImageMemoryRequirements2)
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2: getImageSparseMemoryRequirements2 :: forall io. MonadIO io => Device -> ImageSparseMemoryRequirementsInfo2 -> io ("sparseMemoryRequirements" ::: Vector SparseImageMemoryRequirements2)
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceFeatures2 :: (PokeChain a, PeekChain a) => PhysicalDevice -> IO (PhysicalDeviceFeatures2 a)
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceFeatures2 :: forall a io. (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> io (PhysicalDeviceFeatures2 a)
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceFormatProperties2 :: (PokeChain a, PeekChain a) => PhysicalDevice -> Format -> IO (FormatProperties2 a)
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceFormatProperties2 :: forall a io. (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> Format -> io (FormatProperties2 a)
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceImageFormatProperties2 :: (PokeChain a, PokeChain b, PeekChain b) => PhysicalDevice -> PhysicalDeviceImageFormatInfo2 a -> IO (ImageFormatProperties2 b)
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceImageFormatProperties2 :: forall a b io. (PokeChain a, PokeChain b, PeekChain b, MonadIO io) => PhysicalDevice -> PhysicalDeviceImageFormatInfo2 a -> io (ImageFormatProperties2 b)
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceMemoryProperties2 :: (PokeChain a, PeekChain a) => PhysicalDevice -> IO (PhysicalDeviceMemoryProperties2 a)
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceMemoryProperties2 :: forall a io. (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> io (PhysicalDeviceMemoryProperties2 a)
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceProperties2 :: (PokeChain a, PeekChain a) => PhysicalDevice -> IO (PhysicalDeviceProperties2 a)
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceProperties2 :: forall a io. (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> io (PhysicalDeviceProperties2 a)
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceQueueFamilyProperties2 :: (PokeChain a, PeekChain a) => PhysicalDevice -> IO ("queueFamilyProperties" ::: Vector (QueueFamilyProperties2 a))
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceQueueFamilyProperties2 :: forall a io. (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> io ("queueFamilyProperties" ::: Vector (QueueFamilyProperties2 a))
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceSparseImageFormatProperties2 :: PhysicalDevice -> PhysicalDeviceSparseImageFormatInfo2 -> IO ("properties" ::: Vector SparseImageFormatProperties2)
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2: getPhysicalDeviceSparseImageFormatProperties2 :: forall io. MonadIO io => PhysicalDevice -> PhysicalDeviceSparseImageFormatInfo2 -> io ("properties" ::: Vector SparseImageFormatProperties2)
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_maintenance1: trimCommandPool :: Device -> CommandPool -> CommandPoolTrimFlags -> IO ()
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_maintenance1: trimCommandPool :: forall io. MonadIO io => Device -> CommandPool -> CommandPoolTrimFlags -> io ()
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_maintenance3: getDescriptorSetLayoutSupport :: (PokeChain a, PokeChain b, PeekChain b) => Device -> DescriptorSetLayoutCreateInfo a -> IO (DescriptorSetLayoutSupport b)
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_maintenance3: getDescriptorSetLayoutSupport :: forall a b io. (PokeChain a, PokeChain b, PeekChain b, MonadIO io) => Device -> DescriptorSetLayoutCreateInfo a -> io (DescriptorSetLayoutSupport b)
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion: createSamplerYcbcrConversion :: PokeChain a => Device -> SamplerYcbcrConversionCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SamplerYcbcrConversion
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion: createSamplerYcbcrConversion :: forall a io. (PokeChain a, MonadIO io) => Device -> SamplerYcbcrConversionCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io SamplerYcbcrConversion
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion: destroySamplerYcbcrConversion :: Device -> SamplerYcbcrConversion -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion: destroySamplerYcbcrConversion :: forall io. MonadIO io => Device -> SamplerYcbcrConversion -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion: withSamplerYcbcrConversion :: PokeChain a => Device -> SamplerYcbcrConversionCreateInfo a -> Maybe AllocationCallbacks -> (SamplerYcbcrConversion -> IO r) -> IO r
+ Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion: withSamplerYcbcrConversion :: forall a r. PokeChain a => Device -> SamplerYcbcrConversionCreateInfo a -> Maybe AllocationCallbacks -> (SamplerYcbcrConversion -> IO r) -> IO r
- Graphics.Vulkan.Core12.Promoted_From_VK_EXT_host_query_reset: resetQueryPool :: Device -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core12.Promoted_From_VK_EXT_host_query_reset: resetQueryPool :: forall io. MonadIO io => Device -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> io ()
- Graphics.Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address: getBufferDeviceAddress :: Device -> BufferDeviceAddressInfo -> IO DeviceAddress
+ Graphics.Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address: getBufferDeviceAddress :: forall io. MonadIO io => Device -> BufferDeviceAddressInfo -> io DeviceAddress
- Graphics.Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address: getBufferOpaqueCaptureAddress :: Device -> BufferDeviceAddressInfo -> IO Word64
+ Graphics.Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address: getBufferOpaqueCaptureAddress :: forall io. MonadIO io => Device -> BufferDeviceAddressInfo -> io Word64
- Graphics.Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address: getDeviceMemoryOpaqueCaptureAddress :: Device -> DeviceMemoryOpaqueCaptureAddressInfo -> IO Word64
+ Graphics.Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address: getDeviceMemoryOpaqueCaptureAddress :: forall io. MonadIO io => Device -> DeviceMemoryOpaqueCaptureAddressInfo -> io Word64
- Graphics.Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2: cmdBeginRenderPass2 :: PokeChain a => CommandBuffer -> RenderPassBeginInfo a -> SubpassBeginInfo -> IO ()
+ Graphics.Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2: cmdBeginRenderPass2 :: forall a io. (PokeChain a, MonadIO io) => CommandBuffer -> RenderPassBeginInfo a -> SubpassBeginInfo -> io ()
- Graphics.Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2: cmdEndRenderPass2 :: CommandBuffer -> SubpassEndInfo -> IO ()
+ Graphics.Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2: cmdEndRenderPass2 :: forall io. MonadIO io => CommandBuffer -> SubpassEndInfo -> io ()
- Graphics.Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2: cmdNextSubpass2 :: CommandBuffer -> SubpassBeginInfo -> SubpassEndInfo -> IO ()
+ Graphics.Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2: cmdNextSubpass2 :: forall io. MonadIO io => CommandBuffer -> SubpassBeginInfo -> SubpassEndInfo -> io ()
- Graphics.Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2: createRenderPass2 :: PokeChain a => Device -> RenderPassCreateInfo2 a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO RenderPass
+ Graphics.Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2: createRenderPass2 :: forall a io. (PokeChain a, MonadIO io) => Device -> RenderPassCreateInfo2 a -> ("allocator" ::: Maybe AllocationCallbacks) -> io RenderPass
- Graphics.Vulkan.Core12.Promoted_From_VK_KHR_draw_indirect_count: cmdDrawIndexedIndirectCount :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core12.Promoted_From_VK_KHR_draw_indirect_count: cmdDrawIndexedIndirectCount :: forall io. MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()
- Graphics.Vulkan.Core12.Promoted_From_VK_KHR_draw_indirect_count: cmdDrawIndirectCount :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()
+ Graphics.Vulkan.Core12.Promoted_From_VK_KHR_draw_indirect_count: cmdDrawIndirectCount :: forall io. MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()
- Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore: getSemaphoreCounterValue :: Device -> Semaphore -> IO ("value" ::: Word64)
+ Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore: getSemaphoreCounterValue :: forall io. MonadIO io => Device -> Semaphore -> io ("value" ::: Word64)
- Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore: signalSemaphore :: Device -> SemaphoreSignalInfo -> IO ()
+ Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore: signalSemaphore :: forall io. MonadIO io => Device -> SemaphoreSignalInfo -> io ()
- Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore: waitSemaphores :: Device -> SemaphoreWaitInfo -> ("timeout" ::: Word64) -> IO Result
+ Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore: waitSemaphores :: forall io. MonadIO io => Device -> SemaphoreWaitInfo -> ("timeout" ::: Word64) -> io Result
- Graphics.Vulkan.Extensions.VK_AMD_buffer_marker: cmdWriteBufferMarkerAMD :: CommandBuffer -> PipelineStageFlagBits -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> ("marker" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_AMD_buffer_marker: cmdWriteBufferMarkerAMD :: forall io. MonadIO io => CommandBuffer -> PipelineStageFlagBits -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> ("marker" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_AMD_display_native_hdr: setLocalDimmingAMD :: Device -> SwapchainKHR -> ("localDimmingEnable" ::: Bool) -> IO ()
+ Graphics.Vulkan.Extensions.VK_AMD_display_native_hdr: setLocalDimmingAMD :: forall io. MonadIO io => Device -> SwapchainKHR -> ("localDimmingEnable" ::: Bool) -> io ()
- Graphics.Vulkan.Extensions.VK_AMD_draw_indirect_count: cmdDrawIndexedIndirectCountAMD :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_AMD_draw_indirect_count: cmdDrawIndexedIndirectCountAMD :: MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_AMD_draw_indirect_count: cmdDrawIndirectCountAMD :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_AMD_draw_indirect_count: cmdDrawIndirectCountAMD :: MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_AMD_shader_info: getShaderInfoAMD :: Device -> Pipeline -> ShaderStageFlagBits -> ShaderInfoTypeAMD -> IO (Result, "info" ::: ByteString)
+ Graphics.Vulkan.Extensions.VK_AMD_shader_info: getShaderInfoAMD :: forall io. MonadIO io => Device -> Pipeline -> ShaderStageFlagBits -> ShaderInfoTypeAMD -> io (Result, "info" ::: ByteString)
- Graphics.Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer: getAndroidHardwareBufferPropertiesANDROID :: (PokeChain a, PeekChain a) => Device -> Ptr AHardwareBuffer -> IO (AndroidHardwareBufferPropertiesANDROID a)
+ Graphics.Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer: getAndroidHardwareBufferPropertiesANDROID :: forall a io. (PokeChain a, PeekChain a, MonadIO io) => Device -> Ptr AHardwareBuffer -> io (AndroidHardwareBufferPropertiesANDROID a)
- Graphics.Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer: getMemoryAndroidHardwareBufferANDROID :: Device -> MemoryGetAndroidHardwareBufferInfoANDROID -> IO (Ptr AHardwareBuffer)
+ Graphics.Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer: getMemoryAndroidHardwareBufferANDROID :: forall io. MonadIO io => Device -> MemoryGetAndroidHardwareBufferInfoANDROID -> io (Ptr AHardwareBuffer)
- Graphics.Vulkan.Extensions.VK_EXT_acquire_xlib_display: acquireXlibDisplayEXT :: PhysicalDevice -> ("dpy" ::: Ptr Display) -> DisplayKHR -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_acquire_xlib_display: acquireXlibDisplayEXT :: forall io. MonadIO io => PhysicalDevice -> ("dpy" ::: Ptr Display) -> DisplayKHR -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_acquire_xlib_display: getRandROutputDisplayEXT :: PhysicalDevice -> ("dpy" ::: Ptr Display) -> RROutput -> IO DisplayKHR
+ Graphics.Vulkan.Extensions.VK_EXT_acquire_xlib_display: getRandROutputDisplayEXT :: forall io. MonadIO io => PhysicalDevice -> ("dpy" ::: Ptr Display) -> RROutput -> io DisplayKHR
- Graphics.Vulkan.Extensions.VK_EXT_buffer_device_address: getBufferDeviceAddressEXT :: Device -> BufferDeviceAddressInfo -> IO DeviceAddress
+ Graphics.Vulkan.Extensions.VK_EXT_buffer_device_address: getBufferDeviceAddressEXT :: MonadIO io => Device -> BufferDeviceAddressInfo -> io DeviceAddress
- Graphics.Vulkan.Extensions.VK_EXT_calibrated_timestamps: getCalibratedTimestampsEXT :: Device -> ("timestampInfos" ::: Vector CalibratedTimestampInfoEXT) -> IO ("timestamps" ::: Vector Word64, "maxDeviation" ::: Word64)
+ Graphics.Vulkan.Extensions.VK_EXT_calibrated_timestamps: getCalibratedTimestampsEXT :: forall io. MonadIO io => Device -> ("timestampInfos" ::: Vector CalibratedTimestampInfoEXT) -> io ("timestamps" ::: Vector Word64, "maxDeviation" ::: Word64)
- Graphics.Vulkan.Extensions.VK_EXT_calibrated_timestamps: getPhysicalDeviceCalibrateableTimeDomainsEXT :: PhysicalDevice -> IO (Result, "timeDomains" ::: Vector TimeDomainEXT)
+ Graphics.Vulkan.Extensions.VK_EXT_calibrated_timestamps: getPhysicalDeviceCalibrateableTimeDomainsEXT :: forall io. MonadIO io => PhysicalDevice -> io (Result, "timeDomains" ::: Vector TimeDomainEXT)
- Graphics.Vulkan.Extensions.VK_EXT_conditional_rendering: cmdBeginConditionalRenderingEXT :: CommandBuffer -> ConditionalRenderingBeginInfoEXT -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_conditional_rendering: cmdBeginConditionalRenderingEXT :: forall io. MonadIO io => CommandBuffer -> ConditionalRenderingBeginInfoEXT -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_conditional_rendering: cmdEndConditionalRenderingEXT :: CommandBuffer -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_conditional_rendering: cmdEndConditionalRenderingEXT :: forall io. MonadIO io => CommandBuffer -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_marker: cmdDebugMarkerBeginEXT :: CommandBuffer -> DebugMarkerMarkerInfoEXT -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_marker: cmdDebugMarkerBeginEXT :: forall io. MonadIO io => CommandBuffer -> DebugMarkerMarkerInfoEXT -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_marker: cmdDebugMarkerEndEXT :: CommandBuffer -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_marker: cmdDebugMarkerEndEXT :: forall io. MonadIO io => CommandBuffer -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_marker: cmdDebugMarkerInsertEXT :: CommandBuffer -> DebugMarkerMarkerInfoEXT -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_marker: cmdDebugMarkerInsertEXT :: forall io. MonadIO io => CommandBuffer -> DebugMarkerMarkerInfoEXT -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_marker: debugMarkerSetObjectNameEXT :: Device -> DebugMarkerObjectNameInfoEXT -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_marker: debugMarkerSetObjectNameEXT :: forall io. MonadIO io => Device -> DebugMarkerObjectNameInfoEXT -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_marker: debugMarkerSetObjectTagEXT :: Device -> DebugMarkerObjectTagInfoEXT -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_marker: debugMarkerSetObjectTagEXT :: forall io. MonadIO io => Device -> DebugMarkerObjectTagInfoEXT -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_report: createDebugReportCallbackEXT :: Instance -> DebugReportCallbackCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO DebugReportCallbackEXT
+ Graphics.Vulkan.Extensions.VK_EXT_debug_report: createDebugReportCallbackEXT :: forall io. MonadIO io => Instance -> DebugReportCallbackCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io DebugReportCallbackEXT
- Graphics.Vulkan.Extensions.VK_EXT_debug_report: debugReportMessageEXT :: Instance -> DebugReportFlagsEXT -> DebugReportObjectTypeEXT -> ("object" ::: Word64) -> ("location" ::: Word64) -> ("messageCode" ::: Int32) -> ("layerPrefix" ::: ByteString) -> ("message" ::: ByteString) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_report: debugReportMessageEXT :: forall io. MonadIO io => Instance -> DebugReportFlagsEXT -> DebugReportObjectTypeEXT -> ("object" ::: Word64) -> ("location" ::: Word64) -> ("messageCode" ::: Int32) -> ("layerPrefix" ::: ByteString) -> ("message" ::: ByteString) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_report: destroyDebugReportCallbackEXT :: Instance -> DebugReportCallbackEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_report: destroyDebugReportCallbackEXT :: forall io. MonadIO io => Instance -> DebugReportCallbackEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_report: withDebugReportCallbackEXT :: Instance -> DebugReportCallbackCreateInfoEXT -> Maybe AllocationCallbacks -> (DebugReportCallbackEXT -> IO r) -> IO r
+ Graphics.Vulkan.Extensions.VK_EXT_debug_report: withDebugReportCallbackEXT :: forall r. Instance -> DebugReportCallbackCreateInfoEXT -> Maybe AllocationCallbacks -> (DebugReportCallbackEXT -> IO r) -> IO r
- Graphics.Vulkan.Extensions.VK_EXT_debug_utils: cmdBeginDebugUtilsLabelEXT :: CommandBuffer -> ("labelInfo" ::: DebugUtilsLabelEXT) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_utils: cmdBeginDebugUtilsLabelEXT :: forall io. MonadIO io => CommandBuffer -> ("labelInfo" ::: DebugUtilsLabelEXT) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_utils: cmdEndDebugUtilsLabelEXT :: CommandBuffer -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_utils: cmdEndDebugUtilsLabelEXT :: forall io. MonadIO io => CommandBuffer -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_utils: cmdInsertDebugUtilsLabelEXT :: CommandBuffer -> ("labelInfo" ::: DebugUtilsLabelEXT) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_utils: cmdInsertDebugUtilsLabelEXT :: forall io. MonadIO io => CommandBuffer -> ("labelInfo" ::: DebugUtilsLabelEXT) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_utils: createDebugUtilsMessengerEXT :: Instance -> DebugUtilsMessengerCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO DebugUtilsMessengerEXT
+ Graphics.Vulkan.Extensions.VK_EXT_debug_utils: createDebugUtilsMessengerEXT :: forall io. MonadIO io => Instance -> DebugUtilsMessengerCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io DebugUtilsMessengerEXT
- Graphics.Vulkan.Extensions.VK_EXT_debug_utils: destroyDebugUtilsMessengerEXT :: Instance -> DebugUtilsMessengerEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_utils: destroyDebugUtilsMessengerEXT :: forall io. MonadIO io => Instance -> DebugUtilsMessengerEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_utils: queueBeginDebugUtilsLabelEXT :: Queue -> ("labelInfo" ::: DebugUtilsLabelEXT) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_utils: queueBeginDebugUtilsLabelEXT :: forall io. MonadIO io => Queue -> ("labelInfo" ::: DebugUtilsLabelEXT) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_utils: queueEndDebugUtilsLabelEXT :: Queue -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_utils: queueEndDebugUtilsLabelEXT :: forall io. MonadIO io => Queue -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_utils: queueInsertDebugUtilsLabelEXT :: Queue -> ("labelInfo" ::: DebugUtilsLabelEXT) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_utils: queueInsertDebugUtilsLabelEXT :: forall io. MonadIO io => Queue -> ("labelInfo" ::: DebugUtilsLabelEXT) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_utils: setDebugUtilsObjectNameEXT :: Device -> DebugUtilsObjectNameInfoEXT -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_utils: setDebugUtilsObjectNameEXT :: forall io. MonadIO io => Device -> DebugUtilsObjectNameInfoEXT -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_utils: setDebugUtilsObjectTagEXT :: Device -> DebugUtilsObjectTagInfoEXT -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_utils: setDebugUtilsObjectTagEXT :: forall io. MonadIO io => Device -> DebugUtilsObjectTagInfoEXT -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_utils: submitDebugUtilsMessageEXT :: Instance -> DebugUtilsMessageSeverityFlagBitsEXT -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> DebugUtilsMessengerCallbackDataEXT -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_debug_utils: submitDebugUtilsMessageEXT :: forall io. MonadIO io => Instance -> DebugUtilsMessageSeverityFlagBitsEXT -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> DebugUtilsMessengerCallbackDataEXT -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_debug_utils: withDebugUtilsMessengerEXT :: Instance -> DebugUtilsMessengerCreateInfoEXT -> Maybe AllocationCallbacks -> (DebugUtilsMessengerEXT -> IO r) -> IO r
+ Graphics.Vulkan.Extensions.VK_EXT_debug_utils: withDebugUtilsMessengerEXT :: forall r. Instance -> DebugUtilsMessengerCreateInfoEXT -> Maybe AllocationCallbacks -> (DebugUtilsMessengerEXT -> IO r) -> IO r
- Graphics.Vulkan.Extensions.VK_EXT_direct_mode_display: releaseDisplayEXT :: PhysicalDevice -> DisplayKHR -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_direct_mode_display: releaseDisplayEXT :: forall io. MonadIO io => PhysicalDevice -> DisplayKHR -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_discard_rectangles: cmdSetDiscardRectangleEXT :: CommandBuffer -> ("firstDiscardRectangle" ::: Word32) -> ("discardRectangles" ::: Vector Rect2D) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_discard_rectangles: cmdSetDiscardRectangleEXT :: forall io. MonadIO io => CommandBuffer -> ("firstDiscardRectangle" ::: Word32) -> ("discardRectangles" ::: Vector Rect2D) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_display_control: displayPowerControlEXT :: Device -> DisplayKHR -> DisplayPowerInfoEXT -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_display_control: displayPowerControlEXT :: forall io. MonadIO io => Device -> DisplayKHR -> DisplayPowerInfoEXT -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_display_control: getSwapchainCounterEXT :: Device -> SwapchainKHR -> SurfaceCounterFlagBitsEXT -> IO ("counterValue" ::: Word64)
+ Graphics.Vulkan.Extensions.VK_EXT_display_control: getSwapchainCounterEXT :: forall io. MonadIO io => Device -> SwapchainKHR -> SurfaceCounterFlagBitsEXT -> io ("counterValue" ::: Word64)
- Graphics.Vulkan.Extensions.VK_EXT_display_control: registerDeviceEventEXT :: Device -> DeviceEventInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Fence
+ Graphics.Vulkan.Extensions.VK_EXT_display_control: registerDeviceEventEXT :: forall io. MonadIO io => Device -> DeviceEventInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io Fence
- Graphics.Vulkan.Extensions.VK_EXT_display_control: registerDisplayEventEXT :: Device -> DisplayKHR -> DisplayEventInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Fence
+ Graphics.Vulkan.Extensions.VK_EXT_display_control: registerDisplayEventEXT :: forall io. MonadIO io => Device -> DisplayKHR -> DisplayEventInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io Fence
- Graphics.Vulkan.Extensions.VK_EXT_display_surface_counter: getPhysicalDeviceSurfaceCapabilities2EXT :: PhysicalDevice -> SurfaceKHR -> IO SurfaceCapabilities2EXT
+ Graphics.Vulkan.Extensions.VK_EXT_display_surface_counter: getPhysicalDeviceSurfaceCapabilities2EXT :: forall io. MonadIO io => PhysicalDevice -> SurfaceKHR -> io SurfaceCapabilities2EXT
- Graphics.Vulkan.Extensions.VK_EXT_external_memory_host: getMemoryHostPointerPropertiesEXT :: Device -> ExternalMemoryHandleTypeFlagBits -> ("hostPointer" ::: Ptr ()) -> IO MemoryHostPointerPropertiesEXT
+ Graphics.Vulkan.Extensions.VK_EXT_external_memory_host: getMemoryHostPointerPropertiesEXT :: forall io. MonadIO io => Device -> ExternalMemoryHandleTypeFlagBits -> ("hostPointer" ::: Ptr ()) -> io MemoryHostPointerPropertiesEXT
- Graphics.Vulkan.Extensions.VK_EXT_full_screen_exclusive: acquireFullScreenExclusiveModeEXT :: Device -> SwapchainKHR -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_full_screen_exclusive: acquireFullScreenExclusiveModeEXT :: forall io. MonadIO io => Device -> SwapchainKHR -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_full_screen_exclusive: getDeviceGroupSurfacePresentModes2EXT :: PokeChain a => Device -> PhysicalDeviceSurfaceInfo2KHR a -> IO ("modes" ::: DeviceGroupPresentModeFlagsKHR)
+ Graphics.Vulkan.Extensions.VK_EXT_full_screen_exclusive: getDeviceGroupSurfacePresentModes2EXT :: forall a io. (PokeChain a, MonadIO io) => Device -> PhysicalDeviceSurfaceInfo2KHR a -> io ("modes" ::: DeviceGroupPresentModeFlagsKHR)
- Graphics.Vulkan.Extensions.VK_EXT_full_screen_exclusive: getPhysicalDeviceSurfacePresentModes2EXT :: PokeChain a => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> IO (Result, "presentModes" ::: Vector PresentModeKHR)
+ Graphics.Vulkan.Extensions.VK_EXT_full_screen_exclusive: getPhysicalDeviceSurfacePresentModes2EXT :: forall a io. (PokeChain a, MonadIO io) => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> io (Result, "presentModes" ::: Vector PresentModeKHR)
- Graphics.Vulkan.Extensions.VK_EXT_full_screen_exclusive: releaseFullScreenExclusiveModeEXT :: Device -> SwapchainKHR -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_full_screen_exclusive: releaseFullScreenExclusiveModeEXT :: forall io. MonadIO io => Device -> SwapchainKHR -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_hdr_metadata: setHdrMetadataEXT :: Device -> ("swapchains" ::: Vector SwapchainKHR) -> ("metadata" ::: Vector HdrMetadataEXT) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_hdr_metadata: setHdrMetadataEXT :: forall io. MonadIO io => Device -> ("swapchains" ::: Vector SwapchainKHR) -> ("metadata" ::: Vector HdrMetadataEXT) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_headless_surface: createHeadlessSurfaceEXT :: Instance -> HeadlessSurfaceCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SurfaceKHR
+ Graphics.Vulkan.Extensions.VK_EXT_headless_surface: createHeadlessSurfaceEXT :: forall io. MonadIO io => Instance -> HeadlessSurfaceCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- Graphics.Vulkan.Extensions.VK_EXT_host_query_reset: resetQueryPoolEXT :: Device -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_host_query_reset: resetQueryPoolEXT :: MonadIO io => Device -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_image_drm_format_modifier: getImageDrmFormatModifierPropertiesEXT :: Device -> Image -> IO ImageDrmFormatModifierPropertiesEXT
+ Graphics.Vulkan.Extensions.VK_EXT_image_drm_format_modifier: getImageDrmFormatModifierPropertiesEXT :: forall io. MonadIO io => Device -> Image -> io ImageDrmFormatModifierPropertiesEXT
- Graphics.Vulkan.Extensions.VK_EXT_line_rasterization: cmdSetLineStippleEXT :: CommandBuffer -> ("lineStippleFactor" ::: Word32) -> ("lineStipplePattern" ::: Word16) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_line_rasterization: cmdSetLineStippleEXT :: forall io. MonadIO io => CommandBuffer -> ("lineStippleFactor" ::: Word32) -> ("lineStipplePattern" ::: Word16) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_metal_surface: createMetalSurfaceEXT :: Instance -> MetalSurfaceCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SurfaceKHR
+ Graphics.Vulkan.Extensions.VK_EXT_metal_surface: createMetalSurfaceEXT :: forall io. MonadIO io => Instance -> MetalSurfaceCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- Graphics.Vulkan.Extensions.VK_EXT_sample_locations: cmdSetSampleLocationsEXT :: CommandBuffer -> SampleLocationsInfoEXT -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_sample_locations: cmdSetSampleLocationsEXT :: forall io. MonadIO io => CommandBuffer -> SampleLocationsInfoEXT -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_sample_locations: getPhysicalDeviceMultisamplePropertiesEXT :: PhysicalDevice -> ("samples" ::: SampleCountFlagBits) -> IO MultisamplePropertiesEXT
+ Graphics.Vulkan.Extensions.VK_EXT_sample_locations: getPhysicalDeviceMultisamplePropertiesEXT :: forall io. MonadIO io => PhysicalDevice -> ("samples" ::: SampleCountFlagBits) -> io MultisamplePropertiesEXT
- Graphics.Vulkan.Extensions.VK_EXT_tooling_info: getPhysicalDeviceToolPropertiesEXT :: PhysicalDevice -> IO (Result, "toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
+ Graphics.Vulkan.Extensions.VK_EXT_tooling_info: getPhysicalDeviceToolPropertiesEXT :: forall io. MonadIO io => PhysicalDevice -> io (Result, "toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT)
- Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdBeginQueryIndexedEXT :: CommandBuffer -> QueryPool -> ("query" ::: Word32) -> QueryControlFlags -> ("index" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdBeginQueryIndexedEXT :: forall io. MonadIO io => CommandBuffer -> QueryPool -> ("query" ::: Word32) -> QueryControlFlags -> ("index" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdBeginTransformFeedbackEXT :: CommandBuffer -> ("firstCounterBuffer" ::: Word32) -> ("counterBuffers" ::: Vector Buffer) -> ("counterBufferOffsets" ::: Either Word32 (Vector DeviceSize)) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdBeginTransformFeedbackEXT :: forall io. MonadIO io => CommandBuffer -> ("firstCounterBuffer" ::: Word32) -> ("counterBuffers" ::: Vector Buffer) -> ("counterBufferOffsets" ::: Either Word32 (Vector DeviceSize)) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdBindTransformFeedbackBuffersEXT :: CommandBuffer -> ("firstBinding" ::: Word32) -> ("buffers" ::: Vector Buffer) -> ("offsets" ::: Vector DeviceSize) -> ("sizes" ::: Either Word32 (Vector DeviceSize)) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdBindTransformFeedbackBuffersEXT :: forall io. MonadIO io => CommandBuffer -> ("firstBinding" ::: Word32) -> ("buffers" ::: Vector Buffer) -> ("offsets" ::: Vector DeviceSize) -> ("sizes" ::: Either Word32 (Vector DeviceSize)) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdDrawIndirectByteCountEXT :: CommandBuffer -> ("instanceCount" ::: Word32) -> ("firstInstance" ::: Word32) -> ("counterBuffer" ::: Buffer) -> ("counterBufferOffset" ::: DeviceSize) -> ("counterOffset" ::: Word32) -> ("vertexStride" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdDrawIndirectByteCountEXT :: forall io. MonadIO io => CommandBuffer -> ("instanceCount" ::: Word32) -> ("firstInstance" ::: Word32) -> ("counterBuffer" ::: Buffer) -> ("counterBufferOffset" ::: DeviceSize) -> ("counterOffset" ::: Word32) -> ("vertexStride" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdEndQueryIndexedEXT :: CommandBuffer -> QueryPool -> ("query" ::: Word32) -> ("index" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdEndQueryIndexedEXT :: forall io. MonadIO io => CommandBuffer -> QueryPool -> ("query" ::: Word32) -> ("index" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdEndTransformFeedbackEXT :: CommandBuffer -> ("firstCounterBuffer" ::: Word32) -> ("counterBuffers" ::: Vector Buffer) -> ("counterBufferOffsets" ::: Either Word32 (Vector DeviceSize)) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_transform_feedback: cmdEndTransformFeedbackEXT :: forall io. MonadIO io => CommandBuffer -> ("firstCounterBuffer" ::: Word32) -> ("counterBuffers" ::: Vector Buffer) -> ("counterBufferOffsets" ::: Either Word32 (Vector DeviceSize)) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_validation_cache: createValidationCacheEXT :: Device -> ValidationCacheCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ValidationCacheEXT
+ Graphics.Vulkan.Extensions.VK_EXT_validation_cache: createValidationCacheEXT :: forall io. MonadIO io => Device -> ValidationCacheCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io ValidationCacheEXT
- Graphics.Vulkan.Extensions.VK_EXT_validation_cache: destroyValidationCacheEXT :: Device -> ValidationCacheEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_validation_cache: destroyValidationCacheEXT :: forall io. MonadIO io => Device -> ValidationCacheEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_validation_cache: getValidationCacheDataEXT :: Device -> ValidationCacheEXT -> IO (Result, "data" ::: ByteString)
+ Graphics.Vulkan.Extensions.VK_EXT_validation_cache: getValidationCacheDataEXT :: forall io. MonadIO io => Device -> ValidationCacheEXT -> io (Result, "data" ::: ByteString)
- Graphics.Vulkan.Extensions.VK_EXT_validation_cache: mergeValidationCachesEXT :: Device -> ("dstCache" ::: ValidationCacheEXT) -> ("srcCaches" ::: Vector ValidationCacheEXT) -> IO ()
+ Graphics.Vulkan.Extensions.VK_EXT_validation_cache: mergeValidationCachesEXT :: forall io. MonadIO io => Device -> ("dstCache" ::: ValidationCacheEXT) -> ("srcCaches" ::: Vector ValidationCacheEXT) -> io ()
- Graphics.Vulkan.Extensions.VK_EXT_validation_cache: withValidationCacheEXT :: Device -> ValidationCacheCreateInfoEXT -> Maybe AllocationCallbacks -> (ValidationCacheEXT -> IO r) -> IO r
+ Graphics.Vulkan.Extensions.VK_EXT_validation_cache: withValidationCacheEXT :: forall r. Device -> ValidationCacheCreateInfoEXT -> Maybe AllocationCallbacks -> (ValidationCacheEXT -> IO r) -> IO r
- Graphics.Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface: createImagePipeSurfaceFUCHSIA :: Instance -> ImagePipeSurfaceCreateInfoFUCHSIA -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SurfaceKHR
+ Graphics.Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface: createImagePipeSurfaceFUCHSIA :: forall io. MonadIO io => Instance -> ImagePipeSurfaceCreateInfoFUCHSIA -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- Graphics.Vulkan.Extensions.VK_GGP_stream_descriptor_surface: createStreamDescriptorSurfaceGGP :: Instance -> StreamDescriptorSurfaceCreateInfoGGP -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SurfaceKHR
+ Graphics.Vulkan.Extensions.VK_GGP_stream_descriptor_surface: createStreamDescriptorSurfaceGGP :: forall io. MonadIO io => Instance -> StreamDescriptorSurfaceCreateInfoGGP -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- Graphics.Vulkan.Extensions.VK_GOOGLE_display_timing: getPastPresentationTimingGOOGLE :: Device -> SwapchainKHR -> IO (Result, "presentationTimings" ::: Vector PastPresentationTimingGOOGLE)
+ Graphics.Vulkan.Extensions.VK_GOOGLE_display_timing: getPastPresentationTimingGOOGLE :: forall io. MonadIO io => Device -> SwapchainKHR -> io (Result, "presentationTimings" ::: Vector PastPresentationTimingGOOGLE)
- Graphics.Vulkan.Extensions.VK_GOOGLE_display_timing: getRefreshCycleDurationGOOGLE :: Device -> SwapchainKHR -> IO ("displayTimingProperties" ::: RefreshCycleDurationGOOGLE)
+ Graphics.Vulkan.Extensions.VK_GOOGLE_display_timing: getRefreshCycleDurationGOOGLE :: forall io. MonadIO io => Device -> SwapchainKHR -> io ("displayTimingProperties" ::: RefreshCycleDurationGOOGLE)
- Graphics.Vulkan.Extensions.VK_INTEL_performance_query: acquirePerformanceConfigurationINTEL :: Device -> PerformanceConfigurationAcquireInfoINTEL -> IO PerformanceConfigurationINTEL
+ Graphics.Vulkan.Extensions.VK_INTEL_performance_query: acquirePerformanceConfigurationINTEL :: forall io. MonadIO io => Device -> PerformanceConfigurationAcquireInfoINTEL -> io PerformanceConfigurationINTEL
- Graphics.Vulkan.Extensions.VK_INTEL_performance_query: cmdSetPerformanceMarkerINTEL :: CommandBuffer -> PerformanceMarkerInfoINTEL -> IO ()
+ Graphics.Vulkan.Extensions.VK_INTEL_performance_query: cmdSetPerformanceMarkerINTEL :: forall io. MonadIO io => CommandBuffer -> PerformanceMarkerInfoINTEL -> io ()
- Graphics.Vulkan.Extensions.VK_INTEL_performance_query: cmdSetPerformanceOverrideINTEL :: CommandBuffer -> PerformanceOverrideInfoINTEL -> IO ()
+ Graphics.Vulkan.Extensions.VK_INTEL_performance_query: cmdSetPerformanceOverrideINTEL :: forall io. MonadIO io => CommandBuffer -> PerformanceOverrideInfoINTEL -> io ()
- Graphics.Vulkan.Extensions.VK_INTEL_performance_query: cmdSetPerformanceStreamMarkerINTEL :: CommandBuffer -> PerformanceStreamMarkerInfoINTEL -> IO ()
+ Graphics.Vulkan.Extensions.VK_INTEL_performance_query: cmdSetPerformanceStreamMarkerINTEL :: forall io. MonadIO io => CommandBuffer -> PerformanceStreamMarkerInfoINTEL -> io ()
- Graphics.Vulkan.Extensions.VK_INTEL_performance_query: getPerformanceParameterINTEL :: Device -> PerformanceParameterTypeINTEL -> IO PerformanceValueINTEL
+ Graphics.Vulkan.Extensions.VK_INTEL_performance_query: getPerformanceParameterINTEL :: forall io. MonadIO io => Device -> PerformanceParameterTypeINTEL -> io PerformanceValueINTEL
- Graphics.Vulkan.Extensions.VK_INTEL_performance_query: initializePerformanceApiINTEL :: Device -> ("initializeInfo" ::: InitializePerformanceApiInfoINTEL) -> IO ()
+ Graphics.Vulkan.Extensions.VK_INTEL_performance_query: initializePerformanceApiINTEL :: forall io. MonadIO io => Device -> ("initializeInfo" ::: InitializePerformanceApiInfoINTEL) -> io ()
- Graphics.Vulkan.Extensions.VK_INTEL_performance_query: queueSetPerformanceConfigurationINTEL :: Queue -> PerformanceConfigurationINTEL -> IO ()
+ Graphics.Vulkan.Extensions.VK_INTEL_performance_query: queueSetPerformanceConfigurationINTEL :: forall io. MonadIO io => Queue -> PerformanceConfigurationINTEL -> io ()
- Graphics.Vulkan.Extensions.VK_INTEL_performance_query: releasePerformanceConfigurationINTEL :: Device -> PerformanceConfigurationINTEL -> IO ()
+ Graphics.Vulkan.Extensions.VK_INTEL_performance_query: releasePerformanceConfigurationINTEL :: forall io. MonadIO io => Device -> PerformanceConfigurationINTEL -> io ()
- Graphics.Vulkan.Extensions.VK_INTEL_performance_query: uninitializePerformanceApiINTEL :: Device -> IO ()
+ Graphics.Vulkan.Extensions.VK_INTEL_performance_query: uninitializePerformanceApiINTEL :: forall io. MonadIO io => Device -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_android_surface: createAndroidSurfaceKHR :: Instance -> AndroidSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SurfaceKHR
+ Graphics.Vulkan.Extensions.VK_KHR_android_surface: createAndroidSurfaceKHR :: forall io. MonadIO io => Instance -> AndroidSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- Graphics.Vulkan.Extensions.VK_KHR_bind_memory2: bindBufferMemory2KHR :: PokeChain a => Device -> ("bindInfos" ::: Vector (BindBufferMemoryInfo a)) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_bind_memory2: bindBufferMemory2KHR :: (PokeChain a, MonadIO io) => Device -> ("bindInfos" ::: Vector (BindBufferMemoryInfo a)) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_bind_memory2: bindImageMemory2KHR :: PokeChain a => Device -> ("bindInfos" ::: Vector (BindImageMemoryInfo a)) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_bind_memory2: bindImageMemory2KHR :: (PokeChain a, MonadIO io) => Device -> ("bindInfos" ::: Vector (BindImageMemoryInfo a)) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_buffer_device_address: getBufferDeviceAddressKHR :: Device -> BufferDeviceAddressInfo -> IO DeviceAddress
+ Graphics.Vulkan.Extensions.VK_KHR_buffer_device_address: getBufferDeviceAddressKHR :: MonadIO io => Device -> BufferDeviceAddressInfo -> io DeviceAddress
- Graphics.Vulkan.Extensions.VK_KHR_buffer_device_address: getBufferOpaqueCaptureAddressKHR :: Device -> BufferDeviceAddressInfo -> IO Word64
+ Graphics.Vulkan.Extensions.VK_KHR_buffer_device_address: getBufferOpaqueCaptureAddressKHR :: MonadIO io => Device -> BufferDeviceAddressInfo -> io Word64
- Graphics.Vulkan.Extensions.VK_KHR_buffer_device_address: getDeviceMemoryOpaqueCaptureAddressKHR :: Device -> DeviceMemoryOpaqueCaptureAddressInfo -> IO Word64
+ Graphics.Vulkan.Extensions.VK_KHR_buffer_device_address: getDeviceMemoryOpaqueCaptureAddressKHR :: MonadIO io => Device -> DeviceMemoryOpaqueCaptureAddressInfo -> io Word64
- Graphics.Vulkan.Extensions.VK_KHR_create_renderpass2: cmdBeginRenderPass2KHR :: PokeChain a => CommandBuffer -> RenderPassBeginInfo a -> SubpassBeginInfo -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_create_renderpass2: cmdBeginRenderPass2KHR :: (PokeChain a, MonadIO io) => CommandBuffer -> RenderPassBeginInfo a -> SubpassBeginInfo -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_create_renderpass2: cmdEndRenderPass2KHR :: CommandBuffer -> SubpassEndInfo -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_create_renderpass2: cmdEndRenderPass2KHR :: MonadIO io => CommandBuffer -> SubpassEndInfo -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_create_renderpass2: cmdNextSubpass2KHR :: CommandBuffer -> SubpassBeginInfo -> SubpassEndInfo -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_create_renderpass2: cmdNextSubpass2KHR :: MonadIO io => CommandBuffer -> SubpassBeginInfo -> SubpassEndInfo -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_create_renderpass2: createRenderPass2KHR :: PokeChain a => Device -> RenderPassCreateInfo2 a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO RenderPass
+ Graphics.Vulkan.Extensions.VK_KHR_create_renderpass2: createRenderPass2KHR :: (PokeChain a, MonadIO io) => Device -> RenderPassCreateInfo2 a -> ("allocator" ::: Maybe AllocationCallbacks) -> io RenderPass
- Graphics.Vulkan.Extensions.VK_KHR_descriptor_update_template: cmdPushDescriptorSetWithTemplateKHR :: CommandBuffer -> DescriptorUpdateTemplate -> PipelineLayout -> ("set" ::: Word32) -> ("data" ::: Ptr ()) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_descriptor_update_template: cmdPushDescriptorSetWithTemplateKHR :: forall io. MonadIO io => CommandBuffer -> DescriptorUpdateTemplate -> PipelineLayout -> ("set" ::: Word32) -> ("data" ::: Ptr ()) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_descriptor_update_template: createDescriptorUpdateTemplateKHR :: Device -> DescriptorUpdateTemplateCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO DescriptorUpdateTemplate
+ Graphics.Vulkan.Extensions.VK_KHR_descriptor_update_template: createDescriptorUpdateTemplateKHR :: MonadIO io => Device -> DescriptorUpdateTemplateCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io DescriptorUpdateTemplate
- Graphics.Vulkan.Extensions.VK_KHR_descriptor_update_template: destroyDescriptorUpdateTemplateKHR :: Device -> DescriptorUpdateTemplate -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_descriptor_update_template: destroyDescriptorUpdateTemplateKHR :: MonadIO io => Device -> DescriptorUpdateTemplate -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_descriptor_update_template: updateDescriptorSetWithTemplateKHR :: Device -> DescriptorSet -> DescriptorUpdateTemplate -> ("data" ::: Ptr ()) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_descriptor_update_template: updateDescriptorSetWithTemplateKHR :: MonadIO io => Device -> DescriptorSet -> DescriptorUpdateTemplate -> ("data" ::: Ptr ()) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_device_group: acquireNextImage2KHR :: Device -> ("acquireInfo" ::: AcquireNextImageInfoKHR) -> IO (Result, "imageIndex" ::: Word32)
+ Graphics.Vulkan.Extensions.VK_KHR_device_group: acquireNextImage2KHR :: forall io. MonadIO io => Device -> ("acquireInfo" ::: AcquireNextImageInfoKHR) -> io (Result, "imageIndex" ::: Word32)
- Graphics.Vulkan.Extensions.VK_KHR_device_group: cmdDispatchBaseKHR :: CommandBuffer -> ("baseGroupX" ::: Word32) -> ("baseGroupY" ::: Word32) -> ("baseGroupZ" ::: Word32) -> ("groupCountX" ::: Word32) -> ("groupCountY" ::: Word32) -> ("groupCountZ" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_device_group: cmdDispatchBaseKHR :: MonadIO io => CommandBuffer -> ("baseGroupX" ::: Word32) -> ("baseGroupY" ::: Word32) -> ("baseGroupZ" ::: Word32) -> ("groupCountX" ::: Word32) -> ("groupCountY" ::: Word32) -> ("groupCountZ" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_device_group: cmdSetDeviceMaskKHR :: CommandBuffer -> ("deviceMask" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_device_group: cmdSetDeviceMaskKHR :: MonadIO io => CommandBuffer -> ("deviceMask" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_device_group: getDeviceGroupPeerMemoryFeaturesKHR :: Device -> ("heapIndex" ::: Word32) -> ("localDeviceIndex" ::: Word32) -> ("remoteDeviceIndex" ::: Word32) -> IO ("peerMemoryFeatures" ::: PeerMemoryFeatureFlags)
+ Graphics.Vulkan.Extensions.VK_KHR_device_group: getDeviceGroupPeerMemoryFeaturesKHR :: MonadIO io => Device -> ("heapIndex" ::: Word32) -> ("localDeviceIndex" ::: Word32) -> ("remoteDeviceIndex" ::: Word32) -> io ("peerMemoryFeatures" ::: PeerMemoryFeatureFlags)
- Graphics.Vulkan.Extensions.VK_KHR_device_group: getDeviceGroupPresentCapabilitiesKHR :: Device -> IO DeviceGroupPresentCapabilitiesKHR
+ Graphics.Vulkan.Extensions.VK_KHR_device_group: getDeviceGroupPresentCapabilitiesKHR :: forall io. MonadIO io => Device -> io DeviceGroupPresentCapabilitiesKHR
- Graphics.Vulkan.Extensions.VK_KHR_device_group: getDeviceGroupSurfacePresentModesKHR :: Device -> SurfaceKHR -> IO ("modes" ::: DeviceGroupPresentModeFlagsKHR)
+ Graphics.Vulkan.Extensions.VK_KHR_device_group: getDeviceGroupSurfacePresentModesKHR :: forall io. MonadIO io => Device -> SurfaceKHR -> io ("modes" ::: DeviceGroupPresentModeFlagsKHR)
- Graphics.Vulkan.Extensions.VK_KHR_device_group: getPhysicalDevicePresentRectanglesKHR :: PhysicalDevice -> SurfaceKHR -> IO (Result, "rects" ::: Vector Rect2D)
+ Graphics.Vulkan.Extensions.VK_KHR_device_group: getPhysicalDevicePresentRectanglesKHR :: forall io. MonadIO io => PhysicalDevice -> SurfaceKHR -> io (Result, "rects" ::: Vector Rect2D)
- Graphics.Vulkan.Extensions.VK_KHR_device_group_creation: enumeratePhysicalDeviceGroupsKHR :: Instance -> IO (Result, "physicalDeviceGroupProperties" ::: Vector PhysicalDeviceGroupProperties)
+ Graphics.Vulkan.Extensions.VK_KHR_device_group_creation: enumeratePhysicalDeviceGroupsKHR :: MonadIO io => Instance -> io (Result, "physicalDeviceGroupProperties" ::: Vector PhysicalDeviceGroupProperties)
- Graphics.Vulkan.Extensions.VK_KHR_display: createDisplayModeKHR :: PhysicalDevice -> DisplayKHR -> DisplayModeCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO DisplayModeKHR
+ Graphics.Vulkan.Extensions.VK_KHR_display: createDisplayModeKHR :: forall io. MonadIO io => PhysicalDevice -> DisplayKHR -> DisplayModeCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io DisplayModeKHR
- Graphics.Vulkan.Extensions.VK_KHR_display: createDisplayPlaneSurfaceKHR :: Instance -> DisplaySurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SurfaceKHR
+ Graphics.Vulkan.Extensions.VK_KHR_display: createDisplayPlaneSurfaceKHR :: forall io. MonadIO io => Instance -> DisplaySurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- Graphics.Vulkan.Extensions.VK_KHR_display: getDisplayModePropertiesKHR :: PhysicalDevice -> DisplayKHR -> IO (Result, "properties" ::: Vector DisplayModePropertiesKHR)
+ Graphics.Vulkan.Extensions.VK_KHR_display: getDisplayModePropertiesKHR :: forall io. MonadIO io => PhysicalDevice -> DisplayKHR -> io (Result, "properties" ::: Vector DisplayModePropertiesKHR)
- Graphics.Vulkan.Extensions.VK_KHR_display: getDisplayPlaneCapabilitiesKHR :: PhysicalDevice -> DisplayModeKHR -> ("planeIndex" ::: Word32) -> IO DisplayPlaneCapabilitiesKHR
+ Graphics.Vulkan.Extensions.VK_KHR_display: getDisplayPlaneCapabilitiesKHR :: forall io. MonadIO io => PhysicalDevice -> DisplayModeKHR -> ("planeIndex" ::: Word32) -> io DisplayPlaneCapabilitiesKHR
- Graphics.Vulkan.Extensions.VK_KHR_display: getDisplayPlaneSupportedDisplaysKHR :: PhysicalDevice -> ("planeIndex" ::: Word32) -> IO (Result, "displays" ::: Vector DisplayKHR)
+ Graphics.Vulkan.Extensions.VK_KHR_display: getDisplayPlaneSupportedDisplaysKHR :: forall io. MonadIO io => PhysicalDevice -> ("planeIndex" ::: Word32) -> io (Result, "displays" ::: Vector DisplayKHR)
- Graphics.Vulkan.Extensions.VK_KHR_display: getPhysicalDeviceDisplayPlanePropertiesKHR :: PhysicalDevice -> IO (Result, "properties" ::: Vector DisplayPlanePropertiesKHR)
+ Graphics.Vulkan.Extensions.VK_KHR_display: getPhysicalDeviceDisplayPlanePropertiesKHR :: forall io. MonadIO io => PhysicalDevice -> io (Result, "properties" ::: Vector DisplayPlanePropertiesKHR)
- Graphics.Vulkan.Extensions.VK_KHR_display: getPhysicalDeviceDisplayPropertiesKHR :: PhysicalDevice -> IO (Result, "properties" ::: Vector DisplayPropertiesKHR)
+ Graphics.Vulkan.Extensions.VK_KHR_display: getPhysicalDeviceDisplayPropertiesKHR :: forall io. MonadIO io => PhysicalDevice -> io (Result, "properties" ::: Vector DisplayPropertiesKHR)
- Graphics.Vulkan.Extensions.VK_KHR_display_swapchain: createSharedSwapchainsKHR :: PokeChain a => Device -> ("createInfos" ::: Vector (SwapchainCreateInfoKHR a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ("swapchains" ::: Vector SwapchainKHR)
+ Graphics.Vulkan.Extensions.VK_KHR_display_swapchain: createSharedSwapchainsKHR :: forall a io. (PokeChain a, MonadIO io) => Device -> ("createInfos" ::: Vector (SwapchainCreateInfoKHR a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io ("swapchains" ::: Vector SwapchainKHR)
- Graphics.Vulkan.Extensions.VK_KHR_draw_indirect_count: cmdDrawIndexedIndirectCountKHR :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_draw_indirect_count: cmdDrawIndexedIndirectCountKHR :: MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_draw_indirect_count: cmdDrawIndirectCountKHR :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_draw_indirect_count: cmdDrawIndirectCountKHR :: MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_external_fence_capabilities: getPhysicalDeviceExternalFencePropertiesKHR :: PhysicalDevice -> PhysicalDeviceExternalFenceInfo -> IO ExternalFenceProperties
+ Graphics.Vulkan.Extensions.VK_KHR_external_fence_capabilities: getPhysicalDeviceExternalFencePropertiesKHR :: MonadIO io => PhysicalDevice -> PhysicalDeviceExternalFenceInfo -> io ExternalFenceProperties
- Graphics.Vulkan.Extensions.VK_KHR_external_fence_fd: getFenceFdKHR :: Device -> FenceGetFdInfoKHR -> IO ("fd" ::: Int32)
+ Graphics.Vulkan.Extensions.VK_KHR_external_fence_fd: getFenceFdKHR :: forall io. MonadIO io => Device -> FenceGetFdInfoKHR -> io ("fd" ::: Int32)
- Graphics.Vulkan.Extensions.VK_KHR_external_fence_fd: importFenceFdKHR :: Device -> ImportFenceFdInfoKHR -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_external_fence_fd: importFenceFdKHR :: forall io. MonadIO io => Device -> ImportFenceFdInfoKHR -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_external_fence_win32: getFenceWin32HandleKHR :: Device -> FenceGetWin32HandleInfoKHR -> IO HANDLE
+ Graphics.Vulkan.Extensions.VK_KHR_external_fence_win32: getFenceWin32HandleKHR :: forall io. MonadIO io => Device -> FenceGetWin32HandleInfoKHR -> io HANDLE
- Graphics.Vulkan.Extensions.VK_KHR_external_fence_win32: importFenceWin32HandleKHR :: Device -> ImportFenceWin32HandleInfoKHR -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_external_fence_win32: importFenceWin32HandleKHR :: forall io. MonadIO io => Device -> ImportFenceWin32HandleInfoKHR -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_external_memory_capabilities: getPhysicalDeviceExternalBufferPropertiesKHR :: PhysicalDevice -> PhysicalDeviceExternalBufferInfo -> IO ExternalBufferProperties
+ Graphics.Vulkan.Extensions.VK_KHR_external_memory_capabilities: getPhysicalDeviceExternalBufferPropertiesKHR :: MonadIO io => PhysicalDevice -> PhysicalDeviceExternalBufferInfo -> io ExternalBufferProperties
- Graphics.Vulkan.Extensions.VK_KHR_external_memory_fd: getMemoryFdKHR :: Device -> MemoryGetFdInfoKHR -> IO ("fd" ::: Int32)
+ Graphics.Vulkan.Extensions.VK_KHR_external_memory_fd: getMemoryFdKHR :: forall io. MonadIO io => Device -> MemoryGetFdInfoKHR -> io ("fd" ::: Int32)
- Graphics.Vulkan.Extensions.VK_KHR_external_memory_fd: getMemoryFdPropertiesKHR :: Device -> ExternalMemoryHandleTypeFlagBits -> ("fd" ::: Int32) -> IO MemoryFdPropertiesKHR
+ Graphics.Vulkan.Extensions.VK_KHR_external_memory_fd: getMemoryFdPropertiesKHR :: forall io. MonadIO io => Device -> ExternalMemoryHandleTypeFlagBits -> ("fd" ::: Int32) -> io MemoryFdPropertiesKHR
- Graphics.Vulkan.Extensions.VK_KHR_external_memory_win32: getMemoryWin32HandleKHR :: Device -> MemoryGetWin32HandleInfoKHR -> IO HANDLE
+ Graphics.Vulkan.Extensions.VK_KHR_external_memory_win32: getMemoryWin32HandleKHR :: forall io. MonadIO io => Device -> MemoryGetWin32HandleInfoKHR -> io HANDLE
- Graphics.Vulkan.Extensions.VK_KHR_external_memory_win32: getMemoryWin32HandlePropertiesKHR :: Device -> ExternalMemoryHandleTypeFlagBits -> HANDLE -> IO MemoryWin32HandlePropertiesKHR
+ Graphics.Vulkan.Extensions.VK_KHR_external_memory_win32: getMemoryWin32HandlePropertiesKHR :: forall io. MonadIO io => Device -> ExternalMemoryHandleTypeFlagBits -> HANDLE -> io MemoryWin32HandlePropertiesKHR
- Graphics.Vulkan.Extensions.VK_KHR_external_semaphore_capabilities: getPhysicalDeviceExternalSemaphorePropertiesKHR :: PokeChain a => PhysicalDevice -> PhysicalDeviceExternalSemaphoreInfo a -> IO ExternalSemaphoreProperties
+ Graphics.Vulkan.Extensions.VK_KHR_external_semaphore_capabilities: getPhysicalDeviceExternalSemaphorePropertiesKHR :: (PokeChain a, MonadIO io) => PhysicalDevice -> PhysicalDeviceExternalSemaphoreInfo a -> io ExternalSemaphoreProperties
- Graphics.Vulkan.Extensions.VK_KHR_external_semaphore_fd: getSemaphoreFdKHR :: Device -> SemaphoreGetFdInfoKHR -> IO ("fd" ::: Int32)
+ Graphics.Vulkan.Extensions.VK_KHR_external_semaphore_fd: getSemaphoreFdKHR :: forall io. MonadIO io => Device -> SemaphoreGetFdInfoKHR -> io ("fd" ::: Int32)
- Graphics.Vulkan.Extensions.VK_KHR_external_semaphore_fd: importSemaphoreFdKHR :: Device -> ImportSemaphoreFdInfoKHR -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_external_semaphore_fd: importSemaphoreFdKHR :: forall io. MonadIO io => Device -> ImportSemaphoreFdInfoKHR -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_external_semaphore_win32: getSemaphoreWin32HandleKHR :: Device -> SemaphoreGetWin32HandleInfoKHR -> IO HANDLE
+ Graphics.Vulkan.Extensions.VK_KHR_external_semaphore_win32: getSemaphoreWin32HandleKHR :: forall io. MonadIO io => Device -> SemaphoreGetWin32HandleInfoKHR -> io HANDLE
- Graphics.Vulkan.Extensions.VK_KHR_external_semaphore_win32: importSemaphoreWin32HandleKHR :: Device -> ImportSemaphoreWin32HandleInfoKHR -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_external_semaphore_win32: importSemaphoreWin32HandleKHR :: forall io. MonadIO io => Device -> ImportSemaphoreWin32HandleInfoKHR -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_get_display_properties2: getDisplayModeProperties2KHR :: PhysicalDevice -> DisplayKHR -> IO (Result, "properties" ::: Vector DisplayModeProperties2KHR)
+ Graphics.Vulkan.Extensions.VK_KHR_get_display_properties2: getDisplayModeProperties2KHR :: forall io. MonadIO io => PhysicalDevice -> DisplayKHR -> io (Result, "properties" ::: Vector DisplayModeProperties2KHR)
- Graphics.Vulkan.Extensions.VK_KHR_get_display_properties2: getDisplayPlaneCapabilities2KHR :: PhysicalDevice -> DisplayPlaneInfo2KHR -> IO DisplayPlaneCapabilities2KHR
+ Graphics.Vulkan.Extensions.VK_KHR_get_display_properties2: getDisplayPlaneCapabilities2KHR :: forall io. MonadIO io => PhysicalDevice -> DisplayPlaneInfo2KHR -> io DisplayPlaneCapabilities2KHR
- Graphics.Vulkan.Extensions.VK_KHR_get_display_properties2: getPhysicalDeviceDisplayPlaneProperties2KHR :: PhysicalDevice -> IO (Result, "properties" ::: Vector DisplayPlaneProperties2KHR)
+ Graphics.Vulkan.Extensions.VK_KHR_get_display_properties2: getPhysicalDeviceDisplayPlaneProperties2KHR :: forall io. MonadIO io => PhysicalDevice -> io (Result, "properties" ::: Vector DisplayPlaneProperties2KHR)
- Graphics.Vulkan.Extensions.VK_KHR_get_display_properties2: getPhysicalDeviceDisplayProperties2KHR :: PhysicalDevice -> IO (Result, "properties" ::: Vector DisplayProperties2KHR)
+ Graphics.Vulkan.Extensions.VK_KHR_get_display_properties2: getPhysicalDeviceDisplayProperties2KHR :: forall io. MonadIO io => PhysicalDevice -> io (Result, "properties" ::: Vector DisplayProperties2KHR)
- Graphics.Vulkan.Extensions.VK_KHR_get_memory_requirements2: getBufferMemoryRequirements2KHR :: (PokeChain a, PeekChain a) => Device -> BufferMemoryRequirementsInfo2 -> IO (MemoryRequirements2 a)
+ Graphics.Vulkan.Extensions.VK_KHR_get_memory_requirements2: getBufferMemoryRequirements2KHR :: (PokeChain a, PeekChain a, MonadIO io) => Device -> BufferMemoryRequirementsInfo2 -> io (MemoryRequirements2 a)
- Graphics.Vulkan.Extensions.VK_KHR_get_memory_requirements2: getImageMemoryRequirements2KHR :: (PokeChain a, PokeChain b, PeekChain b) => Device -> ImageMemoryRequirementsInfo2 a -> IO (MemoryRequirements2 b)
+ Graphics.Vulkan.Extensions.VK_KHR_get_memory_requirements2: getImageMemoryRequirements2KHR :: (PokeChain a, PokeChain b, PeekChain b, MonadIO io) => Device -> ImageMemoryRequirementsInfo2 a -> io (MemoryRequirements2 b)
- Graphics.Vulkan.Extensions.VK_KHR_get_memory_requirements2: getImageSparseMemoryRequirements2KHR :: Device -> ImageSparseMemoryRequirementsInfo2 -> IO ("sparseMemoryRequirements" ::: Vector SparseImageMemoryRequirements2)
+ Graphics.Vulkan.Extensions.VK_KHR_get_memory_requirements2: getImageSparseMemoryRequirements2KHR :: MonadIO io => Device -> ImageSparseMemoryRequirementsInfo2 -> io ("sparseMemoryRequirements" ::: Vector SparseImageMemoryRequirements2)
- Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceFeatures2KHR :: (PokeChain a, PeekChain a) => PhysicalDevice -> IO (PhysicalDeviceFeatures2 a)
+ Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceFeatures2KHR :: (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> io (PhysicalDeviceFeatures2 a)
- Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceFormatProperties2KHR :: (PokeChain a, PeekChain a) => PhysicalDevice -> Format -> IO (FormatProperties2 a)
+ Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceFormatProperties2KHR :: (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> Format -> io (FormatProperties2 a)
- Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceImageFormatProperties2KHR :: (PokeChain a, PokeChain b, PeekChain b) => PhysicalDevice -> PhysicalDeviceImageFormatInfo2 a -> IO (ImageFormatProperties2 b)
+ Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceImageFormatProperties2KHR :: (PokeChain a, PokeChain b, PeekChain b, MonadIO io) => PhysicalDevice -> PhysicalDeviceImageFormatInfo2 a -> io (ImageFormatProperties2 b)
- Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceMemoryProperties2KHR :: (PokeChain a, PeekChain a) => PhysicalDevice -> IO (PhysicalDeviceMemoryProperties2 a)
+ Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceMemoryProperties2KHR :: (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> io (PhysicalDeviceMemoryProperties2 a)
- Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceProperties2KHR :: (PokeChain a, PeekChain a) => PhysicalDevice -> IO (PhysicalDeviceProperties2 a)
+ Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceProperties2KHR :: (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> io (PhysicalDeviceProperties2 a)
- Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceQueueFamilyProperties2KHR :: (PokeChain a, PeekChain a) => PhysicalDevice -> IO ("queueFamilyProperties" ::: Vector (QueueFamilyProperties2 a))
+ Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceQueueFamilyProperties2KHR :: (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> io ("queueFamilyProperties" ::: Vector (QueueFamilyProperties2 a))
- Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceSparseImageFormatProperties2KHR :: PhysicalDevice -> PhysicalDeviceSparseImageFormatInfo2 -> IO ("properties" ::: Vector SparseImageFormatProperties2)
+ Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2: getPhysicalDeviceSparseImageFormatProperties2KHR :: MonadIO io => PhysicalDevice -> PhysicalDeviceSparseImageFormatInfo2 -> io ("properties" ::: Vector SparseImageFormatProperties2)
- Graphics.Vulkan.Extensions.VK_KHR_get_surface_capabilities2: getPhysicalDeviceSurfaceCapabilities2KHR :: (PokeChain a, PokeChain b, PeekChain b) => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> IO (SurfaceCapabilities2KHR b)
+ Graphics.Vulkan.Extensions.VK_KHR_get_surface_capabilities2: getPhysicalDeviceSurfaceCapabilities2KHR :: forall a b io. (PokeChain a, PokeChain b, PeekChain b, MonadIO io) => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> io (SurfaceCapabilities2KHR b)
- Graphics.Vulkan.Extensions.VK_KHR_get_surface_capabilities2: getPhysicalDeviceSurfaceFormats2KHR :: PokeChain a => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> IO (Result, "surfaceFormats" ::: Vector SurfaceFormat2KHR)
+ Graphics.Vulkan.Extensions.VK_KHR_get_surface_capabilities2: getPhysicalDeviceSurfaceFormats2KHR :: forall a io. (PokeChain a, MonadIO io) => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> io (Result, "surfaceFormats" ::: Vector SurfaceFormat2KHR)
- Graphics.Vulkan.Extensions.VK_KHR_maintenance1: trimCommandPoolKHR :: Device -> CommandPool -> CommandPoolTrimFlags -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_maintenance1: trimCommandPoolKHR :: MonadIO io => Device -> CommandPool -> CommandPoolTrimFlags -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_maintenance3: getDescriptorSetLayoutSupportKHR :: (PokeChain a, PokeChain b, PeekChain b) => Device -> DescriptorSetLayoutCreateInfo a -> IO (DescriptorSetLayoutSupport b)
+ Graphics.Vulkan.Extensions.VK_KHR_maintenance3: getDescriptorSetLayoutSupportKHR :: (PokeChain a, PokeChain b, PeekChain b, MonadIO io) => Device -> DescriptorSetLayoutCreateInfo a -> io (DescriptorSetLayoutSupport b)
- Graphics.Vulkan.Extensions.VK_KHR_performance_query: acquireProfilingLockKHR :: Device -> AcquireProfilingLockInfoKHR -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_performance_query: acquireProfilingLockKHR :: forall io. MonadIO io => Device -> AcquireProfilingLockInfoKHR -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_performance_query: enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR :: PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> IO (Result, "counters" ::: Vector PerformanceCounterKHR, "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
+ Graphics.Vulkan.Extensions.VK_KHR_performance_query: enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR :: forall io. MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> io (Result, "counters" ::: Vector PerformanceCounterKHR, "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
- Graphics.Vulkan.Extensions.VK_KHR_performance_query: getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR :: PhysicalDevice -> ("performanceQueryCreateInfo" ::: QueryPoolPerformanceCreateInfoKHR) -> IO ("numPasses" ::: Word32)
+ Graphics.Vulkan.Extensions.VK_KHR_performance_query: getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR :: forall io. MonadIO io => PhysicalDevice -> ("performanceQueryCreateInfo" ::: QueryPoolPerformanceCreateInfoKHR) -> io ("numPasses" ::: Word32)
- Graphics.Vulkan.Extensions.VK_KHR_performance_query: releaseProfilingLockKHR :: Device -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_performance_query: releaseProfilingLockKHR :: forall io. MonadIO io => Device -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_pipeline_executable_properties: getPipelineExecutableInternalRepresentationsKHR :: Device -> PipelineExecutableInfoKHR -> IO (Result, "internalRepresentations" ::: Vector PipelineExecutableInternalRepresentationKHR)
+ Graphics.Vulkan.Extensions.VK_KHR_pipeline_executable_properties: getPipelineExecutableInternalRepresentationsKHR :: forall io. MonadIO io => Device -> PipelineExecutableInfoKHR -> io (Result, "internalRepresentations" ::: Vector PipelineExecutableInternalRepresentationKHR)
- Graphics.Vulkan.Extensions.VK_KHR_pipeline_executable_properties: getPipelineExecutablePropertiesKHR :: Device -> PipelineInfoKHR -> IO (Result, "properties" ::: Vector PipelineExecutablePropertiesKHR)
+ Graphics.Vulkan.Extensions.VK_KHR_pipeline_executable_properties: getPipelineExecutablePropertiesKHR :: forall io. MonadIO io => Device -> PipelineInfoKHR -> io (Result, "properties" ::: Vector PipelineExecutablePropertiesKHR)
- Graphics.Vulkan.Extensions.VK_KHR_pipeline_executable_properties: getPipelineExecutableStatisticsKHR :: Device -> PipelineExecutableInfoKHR -> IO (Result, "statistics" ::: Vector PipelineExecutableStatisticKHR)
+ Graphics.Vulkan.Extensions.VK_KHR_pipeline_executable_properties: getPipelineExecutableStatisticsKHR :: forall io. MonadIO io => Device -> PipelineExecutableInfoKHR -> io (Result, "statistics" ::: Vector PipelineExecutableStatisticKHR)
- Graphics.Vulkan.Extensions.VK_KHR_push_descriptor: cmdPushDescriptorSetKHR :: PokeChain a => CommandBuffer -> PipelineBindPoint -> PipelineLayout -> ("set" ::: Word32) -> ("descriptorWrites" ::: Vector (WriteDescriptorSet a)) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_push_descriptor: cmdPushDescriptorSetKHR :: forall a io. (PokeChain a, MonadIO io) => CommandBuffer -> PipelineBindPoint -> PipelineLayout -> ("set" ::: Word32) -> ("descriptorWrites" ::: Vector (WriteDescriptorSet a)) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_push_descriptor: cmdPushDescriptorSetWithTemplateKHR :: CommandBuffer -> DescriptorUpdateTemplate -> PipelineLayout -> ("set" ::: Word32) -> ("data" ::: Ptr ()) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_push_descriptor: cmdPushDescriptorSetWithTemplateKHR :: forall io. MonadIO io => CommandBuffer -> DescriptorUpdateTemplate -> PipelineLayout -> ("set" ::: Word32) -> ("data" ::: Ptr ()) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_sampler_ycbcr_conversion: createSamplerYcbcrConversionKHR :: PokeChain a => Device -> SamplerYcbcrConversionCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SamplerYcbcrConversion
+ Graphics.Vulkan.Extensions.VK_KHR_sampler_ycbcr_conversion: createSamplerYcbcrConversionKHR :: (PokeChain a, MonadIO io) => Device -> SamplerYcbcrConversionCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io SamplerYcbcrConversion
- Graphics.Vulkan.Extensions.VK_KHR_sampler_ycbcr_conversion: destroySamplerYcbcrConversionKHR :: Device -> SamplerYcbcrConversion -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_sampler_ycbcr_conversion: destroySamplerYcbcrConversionKHR :: MonadIO io => Device -> SamplerYcbcrConversion -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_shared_presentable_image: getSwapchainStatusKHR :: Device -> SwapchainKHR -> IO Result
+ Graphics.Vulkan.Extensions.VK_KHR_shared_presentable_image: getSwapchainStatusKHR :: forall io. MonadIO io => Device -> SwapchainKHR -> io Result
- Graphics.Vulkan.Extensions.VK_KHR_surface: destroySurfaceKHR :: Instance -> SurfaceKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_surface: destroySurfaceKHR :: forall io. MonadIO io => Instance -> SurfaceKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_surface: getPhysicalDeviceSurfaceCapabilitiesKHR :: PhysicalDevice -> SurfaceKHR -> IO SurfaceCapabilitiesKHR
+ Graphics.Vulkan.Extensions.VK_KHR_surface: getPhysicalDeviceSurfaceCapabilitiesKHR :: forall io. MonadIO io => PhysicalDevice -> SurfaceKHR -> io SurfaceCapabilitiesKHR
- Graphics.Vulkan.Extensions.VK_KHR_surface: getPhysicalDeviceSurfaceFormatsKHR :: PhysicalDevice -> SurfaceKHR -> IO (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
+ Graphics.Vulkan.Extensions.VK_KHR_surface: getPhysicalDeviceSurfaceFormatsKHR :: forall io. MonadIO io => PhysicalDevice -> SurfaceKHR -> io (Result, "surfaceFormats" ::: Vector SurfaceFormatKHR)
- Graphics.Vulkan.Extensions.VK_KHR_surface: getPhysicalDeviceSurfacePresentModesKHR :: PhysicalDevice -> SurfaceKHR -> IO (Result, "presentModes" ::: Vector PresentModeKHR)
+ Graphics.Vulkan.Extensions.VK_KHR_surface: getPhysicalDeviceSurfacePresentModesKHR :: forall io. MonadIO io => PhysicalDevice -> SurfaceKHR -> io (Result, "presentModes" ::: Vector PresentModeKHR)
- Graphics.Vulkan.Extensions.VK_KHR_surface: getPhysicalDeviceSurfaceSupportKHR :: PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> SurfaceKHR -> IO ("supported" ::: Bool)
+ Graphics.Vulkan.Extensions.VK_KHR_surface: getPhysicalDeviceSurfaceSupportKHR :: forall io. MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> SurfaceKHR -> io ("supported" ::: Bool)
- Graphics.Vulkan.Extensions.VK_KHR_swapchain: acquireNextImage2KHR :: Device -> ("acquireInfo" ::: AcquireNextImageInfoKHR) -> IO (Result, "imageIndex" ::: Word32)
+ Graphics.Vulkan.Extensions.VK_KHR_swapchain: acquireNextImage2KHR :: forall io. MonadIO io => Device -> ("acquireInfo" ::: AcquireNextImageInfoKHR) -> io (Result, "imageIndex" ::: Word32)
- Graphics.Vulkan.Extensions.VK_KHR_swapchain: acquireNextImageKHR :: Device -> SwapchainKHR -> ("timeout" ::: Word64) -> Semaphore -> Fence -> IO (Result, "imageIndex" ::: Word32)
+ Graphics.Vulkan.Extensions.VK_KHR_swapchain: acquireNextImageKHR :: forall io. MonadIO io => Device -> SwapchainKHR -> ("timeout" ::: Word64) -> Semaphore -> Fence -> io (Result, "imageIndex" ::: Word32)
- Graphics.Vulkan.Extensions.VK_KHR_swapchain: createSwapchainKHR :: PokeChain a => Device -> SwapchainCreateInfoKHR a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SwapchainKHR
+ Graphics.Vulkan.Extensions.VK_KHR_swapchain: createSwapchainKHR :: forall a io. (PokeChain a, MonadIO io) => Device -> SwapchainCreateInfoKHR a -> ("allocator" ::: Maybe AllocationCallbacks) -> io SwapchainKHR
- Graphics.Vulkan.Extensions.VK_KHR_swapchain: destroySwapchainKHR :: Device -> SwapchainKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_swapchain: destroySwapchainKHR :: forall io. MonadIO io => Device -> SwapchainKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_swapchain: getDeviceGroupPresentCapabilitiesKHR :: Device -> IO DeviceGroupPresentCapabilitiesKHR
+ Graphics.Vulkan.Extensions.VK_KHR_swapchain: getDeviceGroupPresentCapabilitiesKHR :: forall io. MonadIO io => Device -> io DeviceGroupPresentCapabilitiesKHR
- Graphics.Vulkan.Extensions.VK_KHR_swapchain: getDeviceGroupSurfacePresentModesKHR :: Device -> SurfaceKHR -> IO ("modes" ::: DeviceGroupPresentModeFlagsKHR)
+ Graphics.Vulkan.Extensions.VK_KHR_swapchain: getDeviceGroupSurfacePresentModesKHR :: forall io. MonadIO io => Device -> SurfaceKHR -> io ("modes" ::: DeviceGroupPresentModeFlagsKHR)
- Graphics.Vulkan.Extensions.VK_KHR_swapchain: getPhysicalDevicePresentRectanglesKHR :: PhysicalDevice -> SurfaceKHR -> IO (Result, "rects" ::: Vector Rect2D)
+ Graphics.Vulkan.Extensions.VK_KHR_swapchain: getPhysicalDevicePresentRectanglesKHR :: forall io. MonadIO io => PhysicalDevice -> SurfaceKHR -> io (Result, "rects" ::: Vector Rect2D)
- Graphics.Vulkan.Extensions.VK_KHR_swapchain: getSwapchainImagesKHR :: Device -> SwapchainKHR -> IO (Result, "swapchainImages" ::: Vector Image)
+ Graphics.Vulkan.Extensions.VK_KHR_swapchain: getSwapchainImagesKHR :: forall io. MonadIO io => Device -> SwapchainKHR -> io (Result, "swapchainImages" ::: Vector Image)
- Graphics.Vulkan.Extensions.VK_KHR_swapchain: queuePresentKHR :: PokeChain a => Queue -> PresentInfoKHR a -> IO Result
+ Graphics.Vulkan.Extensions.VK_KHR_swapchain: queuePresentKHR :: forall a io. (PokeChain a, MonadIO io) => Queue -> PresentInfoKHR a -> io Result
- Graphics.Vulkan.Extensions.VK_KHR_swapchain: withSwapchainKHR :: PokeChain a => Device -> SwapchainCreateInfoKHR a -> Maybe AllocationCallbacks -> (SwapchainKHR -> IO r) -> IO r
+ Graphics.Vulkan.Extensions.VK_KHR_swapchain: withSwapchainKHR :: forall a r. PokeChain a => Device -> SwapchainCreateInfoKHR a -> Maybe AllocationCallbacks -> (SwapchainKHR -> IO r) -> IO r
- Graphics.Vulkan.Extensions.VK_KHR_timeline_semaphore: getSemaphoreCounterValueKHR :: Device -> Semaphore -> IO ("value" ::: Word64)
+ Graphics.Vulkan.Extensions.VK_KHR_timeline_semaphore: getSemaphoreCounterValueKHR :: MonadIO io => Device -> Semaphore -> io ("value" ::: Word64)
- Graphics.Vulkan.Extensions.VK_KHR_timeline_semaphore: signalSemaphoreKHR :: Device -> SemaphoreSignalInfo -> IO ()
+ Graphics.Vulkan.Extensions.VK_KHR_timeline_semaphore: signalSemaphoreKHR :: MonadIO io => Device -> SemaphoreSignalInfo -> io ()
- Graphics.Vulkan.Extensions.VK_KHR_timeline_semaphore: waitSemaphoresKHR :: Device -> SemaphoreWaitInfo -> ("timeout" ::: Word64) -> IO Result
+ Graphics.Vulkan.Extensions.VK_KHR_timeline_semaphore: waitSemaphoresKHR :: MonadIO io => Device -> SemaphoreWaitInfo -> ("timeout" ::: Word64) -> io Result
- Graphics.Vulkan.Extensions.VK_KHR_wayland_surface: createWaylandSurfaceKHR :: Instance -> WaylandSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SurfaceKHR
+ Graphics.Vulkan.Extensions.VK_KHR_wayland_surface: createWaylandSurfaceKHR :: forall io. MonadIO io => Instance -> WaylandSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- Graphics.Vulkan.Extensions.VK_KHR_wayland_surface: getPhysicalDeviceWaylandPresentationSupportKHR :: PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> Ptr Wl_display -> IO Bool
+ Graphics.Vulkan.Extensions.VK_KHR_wayland_surface: getPhysicalDeviceWaylandPresentationSupportKHR :: forall io. MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> Ptr Wl_display -> io Bool
- Graphics.Vulkan.Extensions.VK_KHR_win32_surface: createWin32SurfaceKHR :: Instance -> Win32SurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SurfaceKHR
+ Graphics.Vulkan.Extensions.VK_KHR_win32_surface: createWin32SurfaceKHR :: forall io. MonadIO io => Instance -> Win32SurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- Graphics.Vulkan.Extensions.VK_KHR_win32_surface: getPhysicalDeviceWin32PresentationSupportKHR :: PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> IO Bool
+ Graphics.Vulkan.Extensions.VK_KHR_win32_surface: getPhysicalDeviceWin32PresentationSupportKHR :: forall io. MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> io Bool
- Graphics.Vulkan.Extensions.VK_KHR_xcb_surface: createXcbSurfaceKHR :: Instance -> XcbSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SurfaceKHR
+ Graphics.Vulkan.Extensions.VK_KHR_xcb_surface: createXcbSurfaceKHR :: forall io. MonadIO io => Instance -> XcbSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- Graphics.Vulkan.Extensions.VK_KHR_xcb_surface: getPhysicalDeviceXcbPresentationSupportKHR :: PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> Ptr Xcb_connection_t -> ("visual_id" ::: Xcb_visualid_t) -> IO Bool
+ Graphics.Vulkan.Extensions.VK_KHR_xcb_surface: getPhysicalDeviceXcbPresentationSupportKHR :: forall io. MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> Ptr Xcb_connection_t -> ("visual_id" ::: Xcb_visualid_t) -> io Bool
- Graphics.Vulkan.Extensions.VK_KHR_xlib_surface: createXlibSurfaceKHR :: Instance -> XlibSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SurfaceKHR
+ Graphics.Vulkan.Extensions.VK_KHR_xlib_surface: createXlibSurfaceKHR :: forall io. MonadIO io => Instance -> XlibSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- Graphics.Vulkan.Extensions.VK_KHR_xlib_surface: getPhysicalDeviceXlibPresentationSupportKHR :: PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> ("dpy" ::: Ptr Display) -> VisualID -> IO Bool
+ Graphics.Vulkan.Extensions.VK_KHR_xlib_surface: getPhysicalDeviceXlibPresentationSupportKHR :: forall io. MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> ("dpy" ::: Ptr Display) -> VisualID -> io Bool
- Graphics.Vulkan.Extensions.VK_MVK_ios_surface: createIOSSurfaceMVK :: Instance -> IOSSurfaceCreateInfoMVK -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SurfaceKHR
+ Graphics.Vulkan.Extensions.VK_MVK_ios_surface: createIOSSurfaceMVK :: forall io. MonadIO io => Instance -> IOSSurfaceCreateInfoMVK -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- Graphics.Vulkan.Extensions.VK_MVK_macos_surface: createMacOSSurfaceMVK :: Instance -> MacOSSurfaceCreateInfoMVK -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SurfaceKHR
+ Graphics.Vulkan.Extensions.VK_MVK_macos_surface: createMacOSSurfaceMVK :: forall io. MonadIO io => Instance -> MacOSSurfaceCreateInfoMVK -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- Graphics.Vulkan.Extensions.VK_NN_vi_surface: createViSurfaceNN :: Instance -> ViSurfaceCreateInfoNN -> ("allocator" ::: Maybe AllocationCallbacks) -> IO SurfaceKHR
+ Graphics.Vulkan.Extensions.VK_NN_vi_surface: createViSurfaceNN :: forall io. MonadIO io => Instance -> ViSurfaceCreateInfoNN -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: cmdProcessCommandsNVX :: CommandBuffer -> CmdProcessCommandsInfoNVX -> IO ()
+ Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: cmdProcessCommandsNVX :: forall io. MonadIO io => CommandBuffer -> CmdProcessCommandsInfoNVX -> io ()
- Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: cmdReserveSpaceForCommandsNVX :: CommandBuffer -> ("reserveSpaceInfo" ::: CmdReserveSpaceForCommandsInfoNVX) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: cmdReserveSpaceForCommandsNVX :: forall io. MonadIO io => CommandBuffer -> ("reserveSpaceInfo" ::: CmdReserveSpaceForCommandsInfoNVX) -> io ()
- Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: createIndirectCommandsLayoutNVX :: Device -> IndirectCommandsLayoutCreateInfoNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> IO IndirectCommandsLayoutNVX
+ Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: createIndirectCommandsLayoutNVX :: forall io. MonadIO io => Device -> IndirectCommandsLayoutCreateInfoNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> io IndirectCommandsLayoutNVX
- Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: createObjectTableNVX :: Device -> ObjectTableCreateInfoNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ObjectTableNVX
+ Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: createObjectTableNVX :: forall io. MonadIO io => Device -> ObjectTableCreateInfoNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> io ObjectTableNVX
- Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: destroyIndirectCommandsLayoutNVX :: Device -> IndirectCommandsLayoutNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: destroyIndirectCommandsLayoutNVX :: forall io. MonadIO io => Device -> IndirectCommandsLayoutNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: destroyObjectTableNVX :: Device -> ObjectTableNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: destroyObjectTableNVX :: forall io. MonadIO io => Device -> ObjectTableNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: getPhysicalDeviceGeneratedCommandsPropertiesNVX :: PhysicalDevice -> IO (DeviceGeneratedCommandsFeaturesNVX, DeviceGeneratedCommandsLimitsNVX)
+ Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: getPhysicalDeviceGeneratedCommandsPropertiesNVX :: forall io. MonadIO io => PhysicalDevice -> io (DeviceGeneratedCommandsFeaturesNVX, DeviceGeneratedCommandsLimitsNVX)
- Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: registerObjectsNVX :: Device -> ObjectTableNVX -> ("objectTableEntries" ::: Vector ObjectTableEntryNVX) -> ("objectIndices" ::: Vector Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: registerObjectsNVX :: forall io. MonadIO io => Device -> ObjectTableNVX -> ("objectTableEntries" ::: Vector ObjectTableEntryNVX) -> ("objectIndices" ::: Vector Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: unregisterObjectsNVX :: Device -> ObjectTableNVX -> ("objectEntryTypes" ::: Vector ObjectEntryTypeNVX) -> ("objectIndices" ::: Vector Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: unregisterObjectsNVX :: forall io. MonadIO io => Device -> ObjectTableNVX -> ("objectEntryTypes" ::: Vector ObjectEntryTypeNVX) -> ("objectIndices" ::: Vector Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: withIndirectCommandsLayoutNVX :: Device -> IndirectCommandsLayoutCreateInfoNVX -> Maybe AllocationCallbacks -> (IndirectCommandsLayoutNVX -> IO r) -> IO r
+ Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: withIndirectCommandsLayoutNVX :: forall r. Device -> IndirectCommandsLayoutCreateInfoNVX -> Maybe AllocationCallbacks -> (IndirectCommandsLayoutNVX -> IO r) -> IO r
- Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: withObjectTableNVX :: Device -> ObjectTableCreateInfoNVX -> Maybe AllocationCallbacks -> (ObjectTableNVX -> IO r) -> IO r
+ Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: withObjectTableNVX :: forall r. Device -> ObjectTableCreateInfoNVX -> Maybe AllocationCallbacks -> (ObjectTableNVX -> IO r) -> IO r
- Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: withRegisteredObjectsNVX :: Device -> ObjectTableNVX -> Vector ObjectTableEntryNVX -> Vector Word32 -> Vector ObjectEntryTypeNVX -> IO r -> IO r
+ Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands: withRegisteredObjectsNVX :: forall r. Device -> ObjectTableNVX -> Vector ObjectTableEntryNVX -> Vector Word32 -> Vector ObjectEntryTypeNVX -> IO r -> IO r
- Graphics.Vulkan.Extensions.VK_NVX_image_view_handle: getImageViewHandleNVX :: Device -> ImageViewHandleInfoNVX -> IO Word32
+ Graphics.Vulkan.Extensions.VK_NVX_image_view_handle: getImageViewHandleNVX :: forall io. MonadIO io => Device -> ImageViewHandleInfoNVX -> io Word32
- Graphics.Vulkan.Extensions.VK_NV_clip_space_w_scaling: cmdSetViewportWScalingNV :: CommandBuffer -> ("firstViewport" ::: Word32) -> ("viewportWScalings" ::: Vector ViewportWScalingNV) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_clip_space_w_scaling: cmdSetViewportWScalingNV :: forall io. MonadIO io => CommandBuffer -> ("firstViewport" ::: Word32) -> ("viewportWScalings" ::: Vector ViewportWScalingNV) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_cooperative_matrix: getPhysicalDeviceCooperativeMatrixPropertiesNV :: PhysicalDevice -> IO (Result, "properties" ::: Vector CooperativeMatrixPropertiesNV)
+ Graphics.Vulkan.Extensions.VK_NV_cooperative_matrix: getPhysicalDeviceCooperativeMatrixPropertiesNV :: forall io. MonadIO io => PhysicalDevice -> io (Result, "properties" ::: Vector CooperativeMatrixPropertiesNV)
- Graphics.Vulkan.Extensions.VK_NV_coverage_reduction_mode: getPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV :: PhysicalDevice -> IO (Result, "combinations" ::: Vector FramebufferMixedSamplesCombinationNV)
+ Graphics.Vulkan.Extensions.VK_NV_coverage_reduction_mode: getPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV :: forall io. MonadIO io => PhysicalDevice -> io (Result, "combinations" ::: Vector FramebufferMixedSamplesCombinationNV)
- Graphics.Vulkan.Extensions.VK_NV_device_diagnostic_checkpoints: cmdSetCheckpointNV :: CommandBuffer -> ("checkpointMarker" ::: Ptr ()) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_device_diagnostic_checkpoints: cmdSetCheckpointNV :: forall io. MonadIO io => CommandBuffer -> ("checkpointMarker" ::: Ptr ()) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_device_diagnostic_checkpoints: getQueueCheckpointDataNV :: Queue -> IO ("checkpointData" ::: Vector CheckpointDataNV)
+ Graphics.Vulkan.Extensions.VK_NV_device_diagnostic_checkpoints: getQueueCheckpointDataNV :: forall io. MonadIO io => Queue -> io ("checkpointData" ::: Vector CheckpointDataNV)
- Graphics.Vulkan.Extensions.VK_NV_external_memory_capabilities: getPhysicalDeviceExternalImageFormatPropertiesNV :: PhysicalDevice -> Format -> ImageType -> ImageTiling -> ImageUsageFlags -> ImageCreateFlags -> ("externalHandleType" ::: ExternalMemoryHandleTypeFlagsNV) -> IO ExternalImageFormatPropertiesNV
+ Graphics.Vulkan.Extensions.VK_NV_external_memory_capabilities: getPhysicalDeviceExternalImageFormatPropertiesNV :: forall io. MonadIO io => PhysicalDevice -> Format -> ImageType -> ImageTiling -> ImageUsageFlags -> ImageCreateFlags -> ("externalHandleType" ::: ExternalMemoryHandleTypeFlagsNV) -> io ExternalImageFormatPropertiesNV
- Graphics.Vulkan.Extensions.VK_NV_external_memory_win32: getMemoryWin32HandleNV :: Device -> DeviceMemory -> ExternalMemoryHandleTypeFlagsNV -> IO HANDLE
+ Graphics.Vulkan.Extensions.VK_NV_external_memory_win32: getMemoryWin32HandleNV :: forall io. MonadIO io => Device -> DeviceMemory -> ExternalMemoryHandleTypeFlagsNV -> io HANDLE
- Graphics.Vulkan.Extensions.VK_NV_mesh_shader: cmdDrawMeshTasksIndirectCountNV :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_mesh_shader: cmdDrawMeshTasksIndirectCountNV :: forall io. MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_mesh_shader: cmdDrawMeshTasksIndirectNV :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_mesh_shader: cmdDrawMeshTasksIndirectNV :: forall io. MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_mesh_shader: cmdDrawMeshTasksNV :: CommandBuffer -> ("taskCount" ::: Word32) -> ("firstTask" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_mesh_shader: cmdDrawMeshTasksNV :: forall io. MonadIO io => CommandBuffer -> ("taskCount" ::: Word32) -> ("firstTask" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_ray_tracing: bindAccelerationStructureMemoryNV :: Device -> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_ray_tracing: bindAccelerationStructureMemoryNV :: forall io. MonadIO io => Device -> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_ray_tracing: cmdBuildAccelerationStructureNV :: CommandBuffer -> AccelerationStructureInfoNV -> ("instanceData" ::: Buffer) -> ("instanceOffset" ::: DeviceSize) -> ("update" ::: Bool) -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> ("scratch" ::: Buffer) -> ("scratchOffset" ::: DeviceSize) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_ray_tracing: cmdBuildAccelerationStructureNV :: forall io. MonadIO io => CommandBuffer -> AccelerationStructureInfoNV -> ("instanceData" ::: Buffer) -> ("instanceOffset" ::: DeviceSize) -> ("update" ::: Bool) -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> ("scratch" ::: Buffer) -> ("scratchOffset" ::: DeviceSize) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_ray_tracing: cmdCopyAccelerationStructureNV :: CommandBuffer -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> CopyAccelerationStructureModeNV -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_ray_tracing: cmdCopyAccelerationStructureNV :: forall io. MonadIO io => CommandBuffer -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> CopyAccelerationStructureModeNV -> io ()
- Graphics.Vulkan.Extensions.VK_NV_ray_tracing: cmdTraceRaysNV :: CommandBuffer -> ("raygenShaderBindingTableBuffer" ::: Buffer) -> ("raygenShaderBindingOffset" ::: DeviceSize) -> ("missShaderBindingTableBuffer" ::: Buffer) -> ("missShaderBindingOffset" ::: DeviceSize) -> ("missShaderBindingStride" ::: DeviceSize) -> ("hitShaderBindingTableBuffer" ::: Buffer) -> ("hitShaderBindingOffset" ::: DeviceSize) -> ("hitShaderBindingStride" ::: DeviceSize) -> ("callableShaderBindingTableBuffer" ::: Buffer) -> ("callableShaderBindingOffset" ::: DeviceSize) -> ("callableShaderBindingStride" ::: DeviceSize) -> ("width" ::: Word32) -> ("height" ::: Word32) -> ("depth" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_ray_tracing: cmdTraceRaysNV :: forall io. MonadIO io => CommandBuffer -> ("raygenShaderBindingTableBuffer" ::: Buffer) -> ("raygenShaderBindingOffset" ::: DeviceSize) -> ("missShaderBindingTableBuffer" ::: Buffer) -> ("missShaderBindingOffset" ::: DeviceSize) -> ("missShaderBindingStride" ::: DeviceSize) -> ("hitShaderBindingTableBuffer" ::: Buffer) -> ("hitShaderBindingOffset" ::: DeviceSize) -> ("hitShaderBindingStride" ::: DeviceSize) -> ("callableShaderBindingTableBuffer" ::: Buffer) -> ("callableShaderBindingOffset" ::: DeviceSize) -> ("callableShaderBindingStride" ::: DeviceSize) -> ("width" ::: Word32) -> ("height" ::: Word32) -> ("depth" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_ray_tracing: cmdWriteAccelerationStructuresPropertiesNV :: CommandBuffer -> ("accelerationStructures" ::: Vector AccelerationStructureNV) -> QueryType -> QueryPool -> ("firstQuery" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_ray_tracing: cmdWriteAccelerationStructuresPropertiesNV :: forall io. MonadIO io => CommandBuffer -> ("accelerationStructures" ::: Vector AccelerationStructureNV) -> QueryType -> QueryPool -> ("firstQuery" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_ray_tracing: compileDeferredNV :: Device -> Pipeline -> ("shader" ::: Word32) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_ray_tracing: compileDeferredNV :: forall io. MonadIO io => Device -> Pipeline -> ("shader" ::: Word32) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_ray_tracing: createAccelerationStructureNV :: Device -> AccelerationStructureCreateInfoNV -> ("allocator" ::: Maybe AllocationCallbacks) -> IO AccelerationStructureNV
+ Graphics.Vulkan.Extensions.VK_NV_ray_tracing: createAccelerationStructureNV :: forall io. MonadIO io => Device -> AccelerationStructureCreateInfoNV -> ("allocator" ::: Maybe AllocationCallbacks) -> io AccelerationStructureNV
- Graphics.Vulkan.Extensions.VK_NV_ray_tracing: createRayTracingPipelinesNV :: PokeChain a => Device -> PipelineCache -> ("createInfos" ::: Vector (RayTracingPipelineCreateInfoNV a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ("pipelines" ::: Vector Pipeline)
+ Graphics.Vulkan.Extensions.VK_NV_ray_tracing: createRayTracingPipelinesNV :: forall a io. (PokeChain a, MonadIO io) => Device -> PipelineCache -> ("createInfos" ::: Vector (RayTracingPipelineCreateInfoNV a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io ("pipelines" ::: Vector Pipeline)
- Graphics.Vulkan.Extensions.VK_NV_ray_tracing: destroyAccelerationStructureNV :: Device -> AccelerationStructureNV -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_ray_tracing: destroyAccelerationStructureNV :: forall io. MonadIO io => Device -> AccelerationStructureNV -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_ray_tracing: getAccelerationStructureHandleNV :: Device -> AccelerationStructureNV -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_ray_tracing: getAccelerationStructureHandleNV :: forall io. MonadIO io => Device -> AccelerationStructureNV -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_ray_tracing: getAccelerationStructureMemoryRequirementsNV :: (PokeChain a, PeekChain a) => Device -> AccelerationStructureMemoryRequirementsInfoNV -> IO (MemoryRequirements2KHR a)
+ Graphics.Vulkan.Extensions.VK_NV_ray_tracing: getAccelerationStructureMemoryRequirementsNV :: forall a io. (PokeChain a, PeekChain a, MonadIO io) => Device -> AccelerationStructureMemoryRequirementsInfoNV -> io (MemoryRequirements2KHR a)
- Graphics.Vulkan.Extensions.VK_NV_ray_tracing: getRayTracingShaderGroupHandlesNV :: Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_ray_tracing: getRayTracingShaderGroupHandlesNV :: forall io. MonadIO io => Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_ray_tracing: withAccelerationStructureNV :: Device -> AccelerationStructureCreateInfoNV -> Maybe AllocationCallbacks -> (AccelerationStructureNV -> IO r) -> IO r
+ Graphics.Vulkan.Extensions.VK_NV_ray_tracing: withAccelerationStructureNV :: forall r. Device -> AccelerationStructureCreateInfoNV -> Maybe AllocationCallbacks -> (AccelerationStructureNV -> IO r) -> IO r
- Graphics.Vulkan.Extensions.VK_NV_scissor_exclusive: cmdSetExclusiveScissorNV :: CommandBuffer -> ("firstExclusiveScissor" ::: Word32) -> ("exclusiveScissors" ::: Vector Rect2D) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_scissor_exclusive: cmdSetExclusiveScissorNV :: forall io. MonadIO io => CommandBuffer -> ("firstExclusiveScissor" ::: Word32) -> ("exclusiveScissors" ::: Vector Rect2D) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_shading_rate_image: cmdBindShadingRateImageNV :: CommandBuffer -> ImageView -> ImageLayout -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_shading_rate_image: cmdBindShadingRateImageNV :: forall io. MonadIO io => CommandBuffer -> ImageView -> ImageLayout -> io ()
- Graphics.Vulkan.Extensions.VK_NV_shading_rate_image: cmdSetCoarseSampleOrderNV :: CommandBuffer -> CoarseSampleOrderTypeNV -> ("customSampleOrders" ::: Vector CoarseSampleOrderCustomNV) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_shading_rate_image: cmdSetCoarseSampleOrderNV :: forall io. MonadIO io => CommandBuffer -> CoarseSampleOrderTypeNV -> ("customSampleOrders" ::: Vector CoarseSampleOrderCustomNV) -> io ()
- Graphics.Vulkan.Extensions.VK_NV_shading_rate_image: cmdSetViewportShadingRatePaletteNV :: CommandBuffer -> ("firstViewport" ::: Word32) -> ("shadingRatePalettes" ::: Vector ShadingRatePaletteNV) -> IO ()
+ Graphics.Vulkan.Extensions.VK_NV_shading_rate_image: cmdSetViewportShadingRatePaletteNV :: forall io. MonadIO io => CommandBuffer -> ("firstViewport" ::: Word32) -> ("shadingRatePalettes" ::: Vector ShadingRatePaletteNV) -> io ()
Files
- changelog.md +8/−0
- default.nix +23/−6
- examples/sdl-triangle/Main.hs +71/−48
- examples/sdl-triangle/ShaderQQ.hs +87/−0
- examples/sdl-triangle/shader.frag +0/−10
- examples/sdl-triangle/shader.vert +0/−21
- readme.md +15/−1
- src/Graphics/Vulkan/CStruct/Extends.hs +30/−0
- src/Graphics/Vulkan/Core10/Buffer.hs +53/−64
- src/Graphics/Vulkan/Core10/BufferView.hs +64/−79
- src/Graphics/Vulkan/Core10/CommandBuffer.hs +99/−124
- src/Graphics/Vulkan/Core10/CommandBufferBuilding.hs +9483/−9779
- src/Graphics/Vulkan/Core10/CommandPool.hs +51/−64
- src/Graphics/Vulkan/Core10/DescriptorSet.hs +228/−277
- src/Graphics/Vulkan/Core10/Device.hs +27/−31
- src/Graphics/Vulkan/Core10/DeviceInitialization.hs +165/−201
- src/Graphics/Vulkan/Core10/Enums/BufferUsageFlagBits.hs +4/−6
- src/Graphics/Vulkan/Core10/Enums/CommandBufferResetFlagBits.hs +1/−2
- src/Graphics/Vulkan/Core10/Enums/DescriptorType.hs +6/−8
- src/Graphics/Vulkan/Core10/Enums/FormatFeatureFlagBits.hs +9/−12
- src/Graphics/Vulkan/Core10/Enums/ImageCreateFlagBits.hs +1/−1
- src/Graphics/Vulkan/Core10/Enums/SamplerCreateFlagBits.hs +1/−2
- src/Graphics/Vulkan/Core10/Event.hs +70/−84
- src/Graphics/Vulkan/Core10/ExtensionDiscovery.hs +9/−8
- src/Graphics/Vulkan/Core10/Fence.hs +48/−58
- src/Graphics/Vulkan/Core10/Image.hs +177/−230
- src/Graphics/Vulkan/Core10/ImageView.hs +175/−225
- src/Graphics/Vulkan/Core10/LayerDiscovery.hs +7/−5
- src/Graphics/Vulkan/Core10/Memory.hs +77/−92
- src/Graphics/Vulkan/Core10/MemoryManagement.hs +76/−96
- src/Graphics/Vulkan/Core10/OtherTypes.hs +64/−95
- src/Graphics/Vulkan/Core10/Pass.hs +197/−258
- src/Graphics/Vulkan/Core10/Pipeline.hs +145/−170
- src/Graphics/Vulkan/Core10/PipelineCache.hs +49/−54
- src/Graphics/Vulkan/Core10/PipelineLayout.hs +57/−86
- src/Graphics/Vulkan/Core10/Query.hs +72/−89
- src/Graphics/Vulkan/Core10/Queue.hs +55/−77
- src/Graphics/Vulkan/Core10/QueueSemaphore.hs +31/−36
- src/Graphics/Vulkan/Core10/Sampler.hs +44/−50
- src/Graphics/Vulkan/Core10/Shader.hs +30/−33
- src/Graphics/Vulkan/Core10/SharedTypes.hs +4/−5
- src/Graphics/Vulkan/Core10/SparseResourceMemoryManagement.hs +74/−93
- src/Graphics/Vulkan/Core11/DeviceInitialization.hs +4/−2
- src/Graphics/Vulkan/Core11/Originally_Based_On_VK_KHR_protected_memory.hs +13/−16
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_bind_memory2.hs +71/−91
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_dedicated_allocation.hs +52/−75
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_descriptor_update_template.hs +68/−82
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_device_group.hs +35/−44
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_device_groupAndVK_KHR_bind_memory2.hs +4/−5
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_device_group_creation.hs +10/−10
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_external_fence_capabilities.hs +6/−4
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_external_memory_capabilities.hs +15/−16
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_external_semaphore_capabilities.hs +6/−4
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_get_memory_requirements2.hs +28/−32
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_get_physical_device_properties2.hs +55/−62
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_maintenance1.hs +14/−16
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_maintenance2.hs +1/−2
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_maintenance3.hs +6/−4
- src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_sampler_ycbcr_conversion.hs +39/−43
- src/Graphics/Vulkan/Core12.hs +7/−11
- src/Graphics/Vulkan/Core12/Promoted_From_VK_EXT_descriptor_indexing.hs +2/−4
- src/Graphics/Vulkan/Core12/Promoted_From_VK_EXT_host_query_reset.hs +18/−19
- src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_buffer_device_address.hs +27/−33
- src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_create_renderpass2.hs +140/−185
- src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_draw_indirect_count.hs +64/−88
- src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_driver_properties.hs +1/−1
- src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_image_format_list.hs +5/−6
- src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_imageless_framebuffer.hs +4/−5
- src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_timeline_semaphore.hs +23/−31
- src/Graphics/Vulkan/Extensions/VK_AMD_buffer_marker.hs +15/−15
- src/Graphics/Vulkan/Extensions/VK_AMD_display_native_hdr.hs +9/−8
- src/Graphics/Vulkan/Extensions/VK_AMD_shader_info.hs +12/−12
- src/Graphics/Vulkan/Extensions/VK_ANDROID_external_memory_android_hardware_buffer.hs +31/−38
- src/Graphics/Vulkan/Extensions/VK_EXT_acquire_xlib_display.hs +17/−22
- src/Graphics/Vulkan/Extensions/VK_EXT_astc_decode_mode.hs +2/−4
- src/Graphics/Vulkan/Extensions/VK_EXT_buffer_device_address.hs +7/−10
- src/Graphics/Vulkan/Extensions/VK_EXT_calibrated_timestamps.hs +12/−13
- src/Graphics/Vulkan/Extensions/VK_EXT_conditional_rendering.hs +50/−46
- src/Graphics/Vulkan/Extensions/VK_EXT_conservative_rasterization.hs +1/−1
- src/Graphics/Vulkan/Extensions/VK_EXT_debug_marker.hs +48/−52
- src/Graphics/Vulkan/Extensions/VK_EXT_debug_report.hs +46/−53
- src/Graphics/Vulkan/Extensions/VK_EXT_debug_utils.hs +98/−104
- src/Graphics/Vulkan/Extensions/VK_EXT_depth_clip_enable.hs +1/−1
- src/Graphics/Vulkan/Extensions/VK_EXT_direct_mode_display.hs +6/−6
- src/Graphics/Vulkan/Extensions/VK_EXT_discard_rectangles.hs +13/−13
- src/Graphics/Vulkan/Extensions/VK_EXT_display_control.hs +34/−40
- src/Graphics/Vulkan/Extensions/VK_EXT_display_surface_counter.hs +10/−9
- src/Graphics/Vulkan/Extensions/VK_EXT_external_memory_host.hs +8/−6
- src/Graphics/Vulkan/Extensions/VK_EXT_filter_cubic.hs +3/−4
- src/Graphics/Vulkan/Extensions/VK_EXT_fragment_density_map.hs +2/−3
- src/Graphics/Vulkan/Extensions/VK_EXT_full_screen_exclusive.hs +21/−23
- src/Graphics/Vulkan/Extensions/VK_EXT_hdr_metadata.hs +10/−9
- src/Graphics/Vulkan/Extensions/VK_EXT_headless_surface.hs +7/−6
- src/Graphics/Vulkan/Extensions/VK_EXT_image_drm_format_modifier.hs +33/−36
- src/Graphics/Vulkan/Extensions/VK_EXT_line_rasterization.hs +12/−12
- src/Graphics/Vulkan/Extensions/VK_EXT_metal_surface.hs +7/−6
- src/Graphics/Vulkan/Extensions/VK_EXT_pipeline_creation_feedback.hs +9/−13
- src/Graphics/Vulkan/Extensions/VK_EXT_sample_locations.hs +18/−19
- src/Graphics/Vulkan/Extensions/VK_EXT_texel_buffer_alignment.hs +3/−3
- src/Graphics/Vulkan/Extensions/VK_EXT_tooling_info.hs +14/−13
- src/Graphics/Vulkan/Extensions/VK_EXT_transform_feedback.hs +160/−188
- src/Graphics/Vulkan/Extensions/VK_EXT_validation_cache.hs +36/−35
- src/Graphics/Vulkan/Extensions/VK_FUCHSIA_imagepipe_surface.hs +8/−8
- src/Graphics/Vulkan/Extensions/VK_GGP_stream_descriptor_surface.hs +7/−6
- src/Graphics/Vulkan/Extensions/VK_GOOGLE_display_timing.hs +16/−16
- src/Graphics/Vulkan/Extensions/VK_INTEL_performance_query.hs +50/−56
- src/Graphics/Vulkan/Extensions/VK_KHR_android_surface.hs +9/−8
- src/Graphics/Vulkan/Extensions/VK_KHR_display.hs +71/−93
- src/Graphics/Vulkan/Extensions/VK_KHR_display_swapchain.hs +7/−6
- src/Graphics/Vulkan/Extensions/VK_KHR_external_fence_fd.hs +24/−28
- src/Graphics/Vulkan/Extensions/VK_KHR_external_fence_win32.hs +24/−28
- src/Graphics/Vulkan/Extensions/VK_KHR_external_memory_fd.hs +13/−14
- src/Graphics/Vulkan/Extensions/VK_KHR_external_memory_win32.hs +10/−9
- src/Graphics/Vulkan/Extensions/VK_KHR_external_semaphore_fd.hs +32/−38
- src/Graphics/Vulkan/Extensions/VK_KHR_external_semaphore_win32.hs +27/−33
- src/Graphics/Vulkan/Extensions/VK_KHR_get_display_properties2.hs +22/−26
- src/Graphics/Vulkan/Extensions/VK_KHR_get_surface_capabilities2.hs +14/−14
- src/Graphics/Vulkan/Extensions/VK_KHR_performance_query.hs +27/−32
- src/Graphics/Vulkan/Extensions/VK_KHR_pipeline_executable_properties.hs +35/−43
- src/Graphics/Vulkan/Extensions/VK_KHR_push_descriptor.hs +47/−62
- src/Graphics/Vulkan/Extensions/VK_KHR_shared_presentable_image.hs +9/−8
- src/Graphics/Vulkan/Extensions/VK_KHR_surface.hs +47/−55
- src/Graphics/Vulkan/Extensions/VK_KHR_swapchain.hs +124/−157
- src/Graphics/Vulkan/Extensions/VK_KHR_wayland_surface.hs +14/−17
- src/Graphics/Vulkan/Extensions/VK_KHR_win32_surface.hs +10/−10
- src/Graphics/Vulkan/Extensions/VK_KHR_xcb_surface.hs +14/−18
- src/Graphics/Vulkan/Extensions/VK_KHR_xlib_surface.hs +11/−11
- src/Graphics/Vulkan/Extensions/VK_MVK_ios_surface.hs +7/−6
- src/Graphics/Vulkan/Extensions/VK_MVK_macos_surface.hs +7/−6
- src/Graphics/Vulkan/Extensions/VK_NN_vi_surface.hs +8/−8
- src/Graphics/Vulkan/Extensions/VK_NVX_device_generated_commands.hs +125/−144
- src/Graphics/Vulkan/Extensions/VK_NVX_image_view_handle.hs +22/−27
- src/Graphics/Vulkan/Extensions/VK_NV_clip_space_w_scaling.hs +12/−12
- src/Graphics/Vulkan/Extensions/VK_NV_cooperative_matrix.hs +6/−5
- src/Graphics/Vulkan/Extensions/VK_NV_corner_sampled_image.hs +1/−2
- src/Graphics/Vulkan/Extensions/VK_NV_coverage_reduction_mode.hs +20/−18
- src/Graphics/Vulkan/Extensions/VK_NV_dedicated_allocation.hs +29/−41
- src/Graphics/Vulkan/Extensions/VK_NV_device_diagnostic_checkpoints.hs +17/−19
- src/Graphics/Vulkan/Extensions/VK_NV_external_memory_capabilities.hs +15/−17
- src/Graphics/Vulkan/Extensions/VK_NV_external_memory_win32.hs +6/−6
- src/Graphics/Vulkan/Extensions/VK_NV_fragment_coverage_to_color.hs +3/−3
- src/Graphics/Vulkan/Extensions/VK_NV_framebuffer_mixed_samples.hs +2/−2
- src/Graphics/Vulkan/Extensions/VK_NV_mesh_shader.hs +85/−110
- src/Graphics/Vulkan/Extensions/VK_NV_ray_tracing.hs +152/−182
- src/Graphics/Vulkan/Extensions/VK_NV_scissor_exclusive.hs +12/−12
- src/Graphics/Vulkan/Extensions/VK_NV_shading_rate_image.hs +54/−64
- src/Graphics/Vulkan/Extensions/VK_NV_viewport_swizzle.hs +1/−1
- src/Graphics/Vulkan/Extensions/VK_QCOM_render_pass_transform.hs +1/−1
- vulkan.cabal +36/−32
changelog.md view
@@ -1,5 +1,13 @@ # Change Log +## WIP++## [3.1.0.0] - 2020-03-10+ - Commands are now in MonadIO+ - Improved documentation+ - More `bracket` functions for `cmd`s+ - Add `:&` and `::&` pattern synonyms for extensible struct construction+ ## [3.0.0.0] - 2020-02-29 - Rewrite, bindings are now much more idiomatic Haskell - Add `sdl-triangle` and `info` examples
default.nix view
@@ -11,7 +11,8 @@ targets = { vulkan = ./.;- # generate-new = ./generate-new;+ VulkanMemoryAllocator = ./VulkanMemoryAllocator;+ generate-new = ./generate-new; }; # Any overrides we require to the specified haskell package set@@ -60,6 +61,11 @@ compact = doJailbreak super.compact; pandoc = appendPatch super.pandoc ./generate-new/patches/pandoc-haddock-tables.patch;+ language-c = appendPatches super.language-c [+ ./generate-new/patches/language-c-custom-state.patch+ ./generate-new/patches/language-c-align.patch+ ./generate-new/patches/language-c-show-type.patch+ ]; } // pkgs.lib.optionalAttrs hoogle { ghc = super.ghc // { withPackages = super.ghc.withHoogle; }; ghcWithPackages = p:@@ -70,14 +76,25 @@ buildSet = pkgs.lib.foldl (ps: p: ps // { ${p.pname} = p; }) { } packages; packages = map (t: haskellPackages.${t}) (builtins.attrNames targets);- tools = with pkgs; [ pkgconfig asciidoctor python3 vulkan-headers glslang ];+ tools = with pkgs; [ pkgconfig asciidoctor python3 doxygen glslang ]; # Generate a haskell derivation using the cabal2nix tool on `package.yaml` makeDrv = name: src:- haskellPackages.callCabal2nixWithOptions "" src "--flag=build-examples" ({ }- // pkgs.lib.optionalAttrs (name == "vulkan") {- vulkan = pkgs.vulkan-loader;- });+ let+ drv =+ haskellPackages.callCabal2nixWithOptions "" src "--flag=build-examples"+ ({ } // pkgs.lib.optionalAttrs (name == "vulkan") {+ vulkan = pkgs.vulkan-loader;+ } // pkgs.lib.optionalAttrs+ (name == "VulkanMemoryAllocator" && forShell) {+ # For the shell we don't want to have the compile the local dependency+ # for VMA+ vulkan = null;+ });+ in if name == "vulkan" then+ pkgs.haskell.lib.addExtraLibrary drv pkgs.vulkan-headers+ else+ drv; addHoogleDatabase = drv: if hoogle then
examples/sdl-triangle/Main.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedLists #-}+{-# LANGUAGE QuasiQuotes #-} {-# OPTIONS_GHC -Wno-name-shadowing #-} module Main where@@ -19,6 +20,7 @@ import System.Exit import Data.String ( IsString ) import Data.Text hiding ( maximum )+import Data.Text.Encoding import Control.Monad.Managed import qualified Data.Vector as V import Graphics.Vulkan.Core10@@ -32,13 +34,7 @@ import qualified SDL import qualified SDL.Video.Vulkan as SDL import Control.Arrow ( (&&&) )---- pattern (::&) :: Extensible a => a es -> Chain es -> a es--- pattern a ::& es <- (id &&& getNext -> (a, es))--- where a ::& es = setNext a es---- pattern (:&) :: e -> Chain es -> Chain (e:es)--- pattern e :& es = (e, es)+import ShaderQQ main :: IO () main = runManaged $ do@@ -67,7 +63,7 @@ imageAvailableSemaphore renderFinishedSemaphore commandBuffers- liftIO $ deviceWaitIdle vwDevice+ deviceWaitIdle vwDevice mainLoop :: IO () -> IO () mainLoop draw = whileM $ do@@ -138,7 +134,7 @@ , commandBufferCount = fromIntegral $ V.length framebuffers } buffers <- managed $ withCommandBuffers dev commandBufferAllocateInfo- _ <- liftIO $ for (V.zip framebuffers buffers) $ \(framebuffer, buffer) ->+ _ <- liftIO . for (V.zip framebuffers buffers) $ \(framebuffer, buffer) -> useCommandBuffer buffer zero { flags = COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT }@@ -162,10 +158,43 @@ createShaders :: Device -> Managed (V.Vector (SomeStruct PipelineShaderStageCreateInfo)) createShaders dev = do- frag <- liftIO $ BS.readFile "examples/sdl-triangle/frag.spv"- vert <- liftIO $ BS.readFile "examples/sdl-triangle/vert.spv"- fragModule <- managed $ withShaderModule dev zero { code = frag } Nothing- vertModule <- managed $ withShaderModule dev zero { code = vert } Nothing+ let fragCode = [frag|+ #version 450+ #extension GL_ARB_separate_shader_objects : enable++ layout(location = 0) in vec3 fragColor;++ layout(location = 0) out vec4 outColor;++ void main() {+ outColor = vec4(fragColor, 1.0);+ }+ |]+ vertCode = [vert|+ #version 450+ #extension GL_ARB_separate_shader_objects : enable++ layout(location = 0) out vec3 fragColor;++ vec2 positions[3] = vec2[](+ vec2(0.0, -0.5),+ vec2(0.5, 0.5),+ vec2(-0.5, 0.5)+ );++ vec3 colors[3] = vec3[](+ vec3(1.0, 1.0, 0.0),+ vec3(0.0, 1.0, 1.0),+ vec3(1.0, 0.0, 1.0)+ );++ void main() {+ gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);+ fragColor = colors[gl_VertexIndex];+ }+ |]+ fragModule <- managed $ withShaderModule dev zero { code = fragCode } Nothing+ vertModule <- managed $ withShaderModule dev zero { code = vertCode } Nothing let vertShaderStageCreateInfo = zero { stage = SHADER_STAGE_VERTEX_BIT , module' = vertModule , name = "main"@@ -318,18 +347,12 @@ withVulkanWindow :: Text -> Int -> Int -> Managed VulkanWindow withVulkanWindow appName width height = do- -- sayShow =<< SDL.vkLoadLibrary- -- (Just- -- "/nix/store/5q53qn1wbg3bpipjwniz565wc7asx9p-swiftshader-2020-03-31/lib/libvulkan.so.1"- -- )- -- sayShow "hello"- -- sayShow =<< Raw.vkLoadLibrary (Ptr "/dev/nul"#) window <- managed $ withWindow appName width height- instanceCreateInfo <- liftIO $ windowInstanceCreateInfo window+ instanceCreateInfo <- windowInstanceCreateInfo window inst <- managed $ withInstance instanceCreateInfo Nothing _ <- managed $ withDebugUtilsMessengerEXT inst debugUtilsMessengerCreateInfo Nothing- liftIO $ submitDebugUtilsMessageEXT+ submitDebugUtilsMessageEXT inst DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT@@ -337,7 +360,7 @@ surface <- managed $ withSDLWindowSurface inst window (dev, graphicsQueue, graphicsQueueFamilyIndex, presentQueue, swapchainFormat, swapchainExtent, swapchain) <- createGraphicalDevice inst surface- (_, images) <- liftIO $ getSwapchainImagesKHR dev swapchain+ (_, images) <- getSwapchainImagesKHR dev swapchain let imageViewCreateInfo i = zero { image = i , viewType = IMAGE_VIEW_TYPE_2D@@ -368,7 +391,7 @@ presentQueue appName :: IsString a => a-appName = "vulkan triangle example"+appName = "Haskell Vulkan triangle example" windowWidth, windowHeight :: Int windowWidth = 1920@@ -376,10 +399,12 @@ -- | InstanceCreateInfo for an SDL window windowInstanceCreateInfo- :: SDL.Window -> IO (InstanceCreateInfo '[DebugUtilsMessengerCreateInfoEXT])+ :: MonadIO m+ => SDL.Window+ -> m (InstanceCreateInfo '[DebugUtilsMessengerCreateInfoEXT]) windowInstanceCreateInfo window = do- windowExtensions <- traverse BS.packCString- =<< SDL.vkGetInstanceExtensions window+ windowExtensions <-+ liftIO $ traverse BS.packCString =<< SDL.vkGetInstanceExtensions window let requiredLayers = ["VK_LAYER_LUNARG_standard_validation"] requiredExtensions = V.fromList $ EXT_DEBUG_UTILS_EXTENSION_NAME : windowExtensions@@ -400,11 +425,13 @@ createGraphicalDevice inst surface = do let requiredDeviceExtensions = [KHR_SWAPCHAIN_EXTENSION_NAME] (physicalDevice, graphicsQueueFamilyIndex, presentQueueFamilyIndex, surfaceFormat, presentMode, surfaceCaps) <-- liftIO $ pickGraphicalPhysicalDevice+ pickGraphicalPhysicalDevice inst surface requiredDeviceExtensions (SurfaceFormatKHR FORMAT_B8G8R8_UNORM COLOR_SPACE_SRGB_NONLINEAR_KHR)+ props <- getPhysicalDeviceProperties physicalDevice+ sayErr $ "Using device: " <> decodeUtf8 (deviceName props) let deviceCreateInfo :: DeviceCreateInfo '[] deviceCreateInfo = zero@@ -418,12 +445,12 @@ , enabledExtensionNames = requiredDeviceExtensions } dev <- managed $ withDevice physicalDevice deviceCreateInfo Nothing- graphicsQueue <- liftIO $ getDeviceQueue2+ graphicsQueue <- getDeviceQueue2 dev zero { queueFamilyIndex = graphicsQueueFamilyIndex , flags = DEVICE_QUEUE_CREATE_PROTECTED_BIT }- presentQueue <- liftIO $ getDeviceQueue2+ presentQueue <- getDeviceQueue2 dev zero { queueFamilyIndex = presentQueueFamilyIndex , flags = DEVICE_QUEUE_CREATE_PROTECTED_BIT@@ -476,11 +503,12 @@ -- | Find the device which has the most memory and a graphics queue family index pickGraphicalPhysicalDevice- :: Instance+ :: MonadIO m+ => Instance -> SurfaceKHR -> V.Vector BS.ByteString -> SurfaceFormatKHR- -> IO+ -> m ( PhysicalDevice , Word32 , Word32@@ -494,11 +522,11 @@ graphicsDevs <- fmap (V.mapMaybe id) . for devs $ \dev -> runMaybeT $ do graphicsQueue <- MaybeT $ headMay <$> getGraphicsQueueIndices dev presentQueue <- MaybeT $ headMay <$> getPresentQueueIndices dev- guard =<< liftIO (deviceHasSwapChain dev)+ guard =<< deviceHasSwapChain dev bestFormat <- getFormat dev presentMode <- getPresentMode dev- surfaceCaps <- liftIO $ getPhysicalDeviceSurfaceCapabilitiesKHR dev surface- score <- liftIO $ deviceScore dev+ surfaceCaps <- getPhysicalDeviceSurfaceCapabilitiesKHR dev surface+ score <- deviceScore dev pure ( score , (dev, graphicsQueue, presentQueue, bestFormat, presentMode, surfaceCaps)@@ -506,7 +534,7 @@ if V.null graphicsDevs then do sayErr "No suitable devices found"- exitFailure+ liftIO exitFailure else pure . snd . V.maximumBy (comparing fst) $ graphicsDevs where@@ -514,22 +542,18 @@ [] -> Nothing xs -> Just (V.unsafeHead xs) - deviceScore :: PhysicalDevice -> IO Word64+ deviceScore :: MonadIO m => PhysicalDevice -> m Word64 deviceScore dev = do- -- may be useful later...- -- print =<< getPhysicalDeviceProperties2 @'[PhysicalDevicePushDescriptorPropertiesKHR] dev- print =<< getPhysicalDeviceProperties2 @'[] dev- print =<< getPhysicalDeviceFeatures dev heaps <- memoryHeaps <$> getPhysicalDeviceMemoryProperties dev let totalSize = sum $ (size :: MemoryHeap -> DeviceSize) <$> heaps pure totalSize - deviceHasSwapChain :: PhysicalDevice -> IO Bool+ deviceHasSwapChain :: MonadIO m => PhysicalDevice -> m Bool deviceHasSwapChain dev = do (_, extensions) <- enumerateDeviceExtensionProperties dev Nothing pure $ V.any ((KHR_SWAPCHAIN_EXTENSION_NAME ==) . extensionName) extensions - getGraphicsQueueIndices :: PhysicalDevice -> IO (V.Vector Word32)+ getGraphicsQueueIndices :: MonadIO m => PhysicalDevice -> m (V.Vector Word32) getGraphicsQueueIndices dev = do queueFamilyProperties <- getPhysicalDeviceQueueFamilyProperties dev let isGraphicsQueue q =@@ -539,7 +563,7 @@ (V.indexed queueFamilyProperties) pure graphicsQueueIndices - getPresentQueueIndices :: PhysicalDevice -> IO (V.Vector Word32)+ getPresentQueueIndices :: MonadIO m => PhysicalDevice -> m (V.Vector Word32) getPresentQueueIndices dev = do -- TODO: implement getNum... numQueues <- V.length <$> getPhysicalDeviceQueueFamilyProperties2 @'[] dev@@ -548,9 +572,9 @@ (\i -> (True ==) <$> getPhysicalDeviceSurfaceSupportKHR dev i surface) queueIndices - getFormat :: PhysicalDevice -> MaybeT IO SurfaceFormatKHR+ getFormat :: MonadIO m => PhysicalDevice -> m SurfaceFormatKHR getFormat dev = do- (_, formats) <- liftIO $ getPhysicalDeviceSurfaceFormatsKHR dev surface+ (_, formats) <- getPhysicalDeviceSurfaceFormatsKHR dev surface pure $ case formats of [] -> desiredFormat [SurfaceFormatKHR FORMAT_UNDEFINED _] -> desiredFormat@@ -566,10 +590,9 @@ -> desiredFormat _ -> V.head formats - getPresentMode :: PhysicalDevice -> MaybeT IO PresentModeKHR+ getPresentMode :: MonadIO m => PhysicalDevice -> MaybeT m PresentModeKHR getPresentMode dev = do- (_, presentModes) <- liftIO- $ getPhysicalDeviceSurfacePresentModesKHR dev surface+ (_, presentModes) <- getPhysicalDeviceSurfacePresentModesKHR dev surface let desiredPresentModes = [ PRESENT_MODE_MAILBOX_KHR , PRESENT_MODE_FIFO_KHR
+ examples/sdl-triangle/ShaderQQ.hs view
@@ -0,0 +1,87 @@+module ShaderQQ+ ( comp+ , frag+ , geom+ , tesc+ , tese+ , vert+ , compileShader+ ) where++import Data.ByteString ( ByteString )+import qualified Data.ByteString as BS+import Data.FileEmbed+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import Language.Haskell.TH.Quote+import System.IO+import System.IO.Temp+import System.Process.Typed+import Data.List.Extra+import Data.Char++comp = shaderQQ "comp"+frag = shaderQQ "frag"+geom = shaderQQ "geom"+tesc = shaderQQ "tesc"+tese = shaderQQ "tese"+vert = shaderQQ "vert"++shaderQQ :: String -> QuasiQuoter+shaderQQ stage = QuasiQuoter+ { quoteExp = \code -> do+ loc <- location+ bs <- runIO $ compileShader (Just loc) stage code+ bsToExp bs+ , quotePat = bad "pattern"+ , quoteType = bad "type"+ , quoteDec = bad "declaration"+ }+ where+ bad :: String -> a+ bad s = error $ "Can't use " <> stage <> " quote in a " <> s <> " context"++-- | Compile a glsl shader to spir-v using glslangValidator+compileShader+ :: Maybe Loc+ -- ^ Source location+ -> String+ -- ^ stage+ -> String+ -- ^ glsl code+ -> IO ByteString+ -- ^ Spir-V bytecode+compileShader loc stage code = withSystemTempDirectory "th-shader" $ \dir -> do+ let codeWithLineDirective = maybe code (`insertLineDirective` code) loc+ let shader = dir <> "/shader." <> stage+ spirv = dir <> "/shader.spv"+ writeFile shader codeWithLineDirective+ let -- TODO: writing to stdout here breaks HIE+ p =+ setStderr inherit+ . setStdout (useHandleOpen stderr)+ . setStdin closed+ $ proc "glslangValidator" ["-S", stage, "-V", shader, "-o", spirv]+ runProcess_ p+ -- 'runIO' suggests flushing as GHC may not+ hFlush stderr+ BS.readFile spirv++-- If possible, insert a #line directive after the #version directive (as well+-- as the extension which allows filenames in line directives.+insertLineDirective :: Loc -> String -> String+insertLineDirective Loc {..} code =+ let isVersionDirective = ("#version" `isPrefixOf`) . dropWhile isSpace+ codeLines = lines code+ (beforeVersion, afterVersion) = break isVersionDirective codeLines+ lineDirective =+ [ "#extension GL_GOOGLE_cpp_style_line_directive : enable"+ , "#line "+ <> show (fst loc_start + length beforeVersion + 1)+ <> " \""+ <> loc_filename+ <> "\""+ ]+ in case afterVersion of+ [] -> code+ v : xs -> unlines $ beforeVersion <> [v] <> lineDirective <> xs
− examples/sdl-triangle/shader.frag
@@ -1,10 +0,0 @@-#version 450-#extension GL_ARB_separate_shader_objects : enable--layout(location = 0) in vec3 fragColor;--layout(location = 0) out vec4 outColor;--void main() {- outColor = vec4(fragColor, 1.0);-}
− examples/sdl-triangle/shader.vert
@@ -1,21 +0,0 @@-#version 450-#extension GL_ARB_separate_shader_objects : enable--layout(location = 0) out vec3 fragColor;--vec2 positions[3] = vec2[](- vec2(0.0, -0.5),- vec2(0.5, 0.5),- vec2(-0.5, 0.5)-);--vec3 colors[3] = vec3[](- vec3(1.0, 1.0, 0.0),- vec3(0.0, 1.0, 1.0),- vec3(1.0, 0.0, 1.0)-);--void main() {- gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);- fragColor = colors[gl_VertexIndex];-}
readme.md view
@@ -26,7 +26,8 @@ - Documentation is included more or less verbatim from the Vulkan C API documentation. The parameters it references might not map one-to-one with what's in these bindings. It should be obvious in most cases what it's trying- to say.+ to say. If part of the documentation is misleading or unclear with respect to+ these Haskell bindings please open an issue and we can special case a fix. - Parameters are named with the `:::` operator where it would be useful; this operator simply ignores the string on the left.@@ -74,6 +75,11 @@ "COMPARE_OP_LESS" ``` +- Make sure that all the functions you're going to use are not `nullPtr` in+ `InstanceCmds` or `DeviceCmds` before calling them, this package doesn't+ perform any checks. The `*Cmds` records can be found inside any dispatchable+ handle.+ ### Minor things - To prevent a name clash between the constructors of@@ -177,6 +183,14 @@ For instructions on how to regenerate the bindings see [the readme in ./generate-new](./generate-new/readme.md).++### Stack++To build with examples:++```bash+ns -p stack ghc vulkan-loader vulkan-headers pkg-config SDL2 --run 'stack --system-ghc build --flag vulkan:build-examples'+``` ## Examples
src/Graphics/Vulkan/CStruct/Extends.hs view
@@ -12,6 +12,8 @@ , pokeSomeCStruct , forgetExtensions , Extensible(..)+ , pattern (::&)+ , pattern (:&) ) where import Data.Maybe (fromMaybe)@@ -1271,6 +1273,34 @@ type family Chain (xs :: [a]) = (r :: a) | r -> xs where Chain '[] = () Chain (x:xs) = (x, Chain xs)++-- | A pattern synonym to separate the head of a struct chain from the+-- tail, use in conjunction with ':&' to extract several members.+--+-- @+-- Head{..} ::& () <- returningNoTail a b c+-- -- Equivalent to+-- Head{..} <- returningNoTail @'[] a b c+-- @+--+-- @+-- Head{..} ::& Foo{..} :& Bar{..} :& () <- returningWithTail a b c+-- @+--+-- @+-- myFun (Head{..} :&& Foo{..} :& ())+-- @+pattern (::&) :: Extensible a => a es -> Chain es -> a es+pattern a ::& es <- (\a -> (a, getNext a) -> (a, es))+ where a ::& es = setNext a es+infixr 6 ::&++-- | View the head and tail of a 'Chain', see '::&'+--+-- Equivalent to @(,)@+pattern (:&) :: e -> Chain es -> Chain (e:es)+pattern e :& es = (e, es)+infixr 7 :& type family Extendss (p :: [Type] -> Type) (xs :: [Type]) :: Constraint where Extendss p '[] = ()
src/Graphics/Vulkan/Core10/Buffer.hs view
@@ -6,6 +6,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -20,6 +21,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable(peek))@@ -77,8 +79,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the buffer object.+-- - @device@ is the logical device that creates the buffer object. -- -- - @pCreateInfo@ is a pointer to a 'BufferCreateInfo' structure -- containing parameters affecting creation of the buffer.@@ -92,8 +93,7 @@ -- -- == Valid Usage ----- - If the 'Graphics.Vulkan.Core10.BaseType.Flags' member of--- @pCreateInfo@ includes+-- - If the @flags@ member of @pCreateInfo@ includes -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_BINDING_BIT', -- creating this 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ not -- cause the total required sparse memory for all currently valid@@ -102,8 +102,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'BufferCreateInfo' structure@@ -135,8 +135,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Buffer', 'BufferCreateInfo', -- 'Graphics.Vulkan.Core10.Handles.Device'-createBuffer :: PokeChain a => Device -> BufferCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (Buffer)-createBuffer device createInfo allocator = evalContT $ do+createBuffer :: forall a io . (PokeChain a, MonadIO io) => Device -> BufferCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Buffer)+createBuffer device createInfo allocator = liftIO . evalContT $ do let vkCreateBuffer' = mkVkCreateBuffer (pVkCreateBuffer (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -151,11 +151,11 @@ -- | A safe wrapper for 'createBuffer' and 'destroyBuffer' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withBuffer :: PokeChain a => Device -> BufferCreateInfo a -> Maybe AllocationCallbacks -> (Buffer -> IO r) -> IO r-withBuffer device bufferCreateInfo allocationCallbacks =+withBuffer :: forall a r . PokeChain a => Device -> BufferCreateInfo a -> Maybe AllocationCallbacks -> ((Buffer) -> IO r) -> IO r+withBuffer device pCreateInfo pAllocator = bracket- (createBuffer device bufferCreateInfo allocationCallbacks)- (\o -> destroyBuffer device o allocationCallbacks)+ (createBuffer device pCreateInfo pAllocator)+ (\(o0) -> destroyBuffer device o0 pAllocator) foreign import ccall@@ -169,10 +169,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the buffer.+-- - @device@ is the logical device that destroys the buffer. ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' is the buffer to destroy.+-- - @buffer@ is the buffer to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -180,51 +179,47 @@ -- -- == Valid Usage ----- - All submitted commands that refer to--- 'Graphics.Vulkan.Core10.Handles.Buffer', either directly or via a--- 'Graphics.Vulkan.Core10.Handles.BufferView', /must/ have completed--- execution+-- - All submitted commands that refer to @buffer@, either directly or+-- via a 'Graphics.Vulkan.Core10.Handles.BufferView', /must/ have+-- completed execution -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Buffer' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @buffer@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Buffer' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @buffer@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - If @buffer@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @buffer@ /must/+-- be a valid 'Graphics.Vulkan.Core10.Handles.Buffer' handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is a valid handle, it--- /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @buffer@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be--- externally synchronized+-- - Host access to @buffer@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'Graphics.Vulkan.Core10.Handles.Device'-destroyBuffer :: Device -> Buffer -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyBuffer device buffer allocator = evalContT $ do+destroyBuffer :: forall io . MonadIO io => Device -> Buffer -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyBuffer device buffer allocator = liftIO . evalContT $ do let vkDestroyBuffer' = mkVkDestroyBuffer (pVkDestroyBuffer (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -240,44 +235,40 @@ -- -- - @size@ /must/ be greater than @0@ ----- - If 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is+-- - If @sharingMode@ is -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- @pQueueFamilyIndices@ /must/ be a valid pointer to an array of -- @queueFamilyIndexCount@ @uint32_t@ values ----- - If 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is+-- - If @sharingMode@ is -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- @queueFamilyIndexCount@ /must/ be greater than @1@ ----- - If 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is+-- - If @sharingMode@ is -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- each element of @pQueueFamilyIndices@ /must/ be unique and /must/ be -- less than @pQueueFamilyPropertyCount@ returned by either -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceQueueFamilyProperties' -- or -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceQueueFamilyProperties2'--- for the 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' that was--- used to create 'Graphics.Vulkan.Core10.Handles.Device'+-- for the @physicalDevice@ that was used to create @device@ -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-sparseBinding sparse bindings>--- feature is not enabled, 'Graphics.Vulkan.Core10.BaseType.Flags'--- /must/ not contain+-- feature is not enabled, @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_BINDING_BIT' -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-sparseResidencyBuffer sparse buffer residency>--- feature is not enabled, 'Graphics.Vulkan.Core10.BaseType.Flags'--- /must/ not contain+-- feature is not enabled, @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_RESIDENCY_BIT' -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-sparseResidencyAliased sparse aliased residency>--- feature is not enabled, 'Graphics.Vulkan.Core10.BaseType.Flags'--- /must/ not contain+-- feature is not enabled, @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_ALIASED_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_RESIDENCY_BIT' -- or -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_ALIASED_BIT',@@ -295,8 +286,8 @@ -- handle types specified in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExternalMemoryBufferCreateInfo'::@handleTypes@ ----- - If the protected memory feature is not enabled,--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- - If the protected memory feature is not enabled, @flags@ /must/ not+-- contain -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_PROTECTED_BIT' -- -- - If any of the bits@@ -311,24 +302,24 @@ -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationBufferCreateInfoNV' -- structure, and the @dedicatedAllocation@ member of the chained--- structure is 'Graphics.Vulkan.Core10.BaseType.TRUE', then--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not include+-- structure is 'Graphics.Vulkan.Core10.BaseType.TRUE', then @flags@+-- /must/ not include -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_BINDING_BIT', -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_RESIDENCY_BIT', -- or -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_ALIASED_BIT' -- -- - If--- 'Graphics.Vulkan.Extensions.VK_EXT_buffer_device_address.BufferDeviceAddressCreateInfoEXT'::'Graphics.Vulkan.Core10.BaseType.DeviceAddress'--- is not zero, 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ include+-- 'Graphics.Vulkan.Extensions.VK_EXT_buffer_device_address.BufferDeviceAddressCreateInfoEXT'::@deviceAddress@+-- is not zero, @flags@ /must/ include -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT' -- -- - If -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address.BufferOpaqueCaptureAddressCreateInfo'::@opaqueCaptureAddress@--- is not zero, 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ include+-- is not zero, @flags@ /must/ include -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT', -- the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-bufferDeviceAddressCaptureReplay bufferDeviceAddressCaptureReplay>@@ -353,8 +344,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BufferCreateFlagBits' -- values --@@ -364,8 +354,8 @@ -- -- - @usage@ /must/ not be @0@ ----- - 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' /must/ be a--- valid 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' value+-- - @sharingMode@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' value -- -- = See Also --@@ -378,7 +368,7 @@ data BufferCreateInfo (es :: [Type]) = BufferCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BufferCreateFlagBits' -- specifying additional parameters of the buffer. flags :: BufferCreateFlags@@ -388,14 +378,13 @@ -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BufferUsageFlagBits' -- specifying allowed usages of the buffer. usage :: BufferUsageFlags- , -- | 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is a+ , -- | @sharingMode@ is a -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' value specifying -- the sharing mode of the buffer when it will be accessed by multiple -- queue families. sharingMode :: SharingMode , -- | @pQueueFamilyIndices@ is a list of queue families that will access this- -- buffer (ignored if- -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is not+ -- buffer (ignored if @sharingMode@ is not -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT'). queueFamilyIndices :: Vector Word32 }
src/Graphics/Vulkan/Core10/BufferView.hs view
@@ -6,6 +6,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -15,6 +16,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -59,8 +61,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the buffer view.+-- - @device@ is the logical device that creates the buffer view. -- -- - @pCreateInfo@ is a pointer to a 'BufferViewCreateInfo' structure -- containing parameters to be used to create the buffer.@@ -75,8 +76,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'BufferViewCreateInfo' structure@@ -106,8 +107,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.BufferView', 'BufferViewCreateInfo', -- 'Graphics.Vulkan.Core10.Handles.Device'-createBufferView :: Device -> BufferViewCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (BufferView)-createBufferView device createInfo allocator = evalContT $ do+createBufferView :: forall io . MonadIO io => Device -> BufferViewCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io (BufferView)+createBufferView device createInfo allocator = liftIO . evalContT $ do let vkCreateBufferView' = mkVkCreateBufferView (pVkCreateBufferView (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -123,11 +124,11 @@ -- 'bracket' -- -- The allocated value must not be returned from the provided computation-withBufferView :: Device -> BufferViewCreateInfo -> Maybe AllocationCallbacks -> (BufferView -> IO r) -> IO r-withBufferView device bufferViewCreateInfo allocationCallbacks =+withBufferView :: forall r . Device -> BufferViewCreateInfo -> Maybe AllocationCallbacks -> ((BufferView) -> IO r) -> IO r+withBufferView device pCreateInfo pAllocator = bracket- (createBufferView device bufferViewCreateInfo allocationCallbacks)- (\o -> destroyBufferView device o allocationCallbacks)+ (createBufferView device pCreateInfo pAllocator)+ (\(o0) -> destroyBufferView device o0 pAllocator) foreign import ccall@@ -141,11 +142,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the buffer view.+-- - @device@ is the logical device that destroys the buffer view. ----- - 'Graphics.Vulkan.Core10.Handles.BufferView' is the buffer view to--- destroy.+-- - @bufferView@ is the buffer view to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -153,50 +152,46 @@ -- -- == Valid Usage ----- - All submitted commands that refer to--- 'Graphics.Vulkan.Core10.Handles.BufferView' /must/ have completed--- execution+-- - All submitted commands that refer to @bufferView@ /must/ have+-- completed execution -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.BufferView' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @bufferView@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.BufferView' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @bufferView@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.BufferView' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.BufferView' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.BufferView' handle+-- - If @bufferView@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @bufferView@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.BufferView' handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.BufferView' is a valid handle, it--- /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @bufferView@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.BufferView' /must/ be--- externally synchronized+-- - Host access to @bufferView@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.BufferView', -- 'Graphics.Vulkan.Core10.Handles.Device'-destroyBufferView :: Device -> BufferView -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyBufferView device bufferView allocator = evalContT $ do+destroyBufferView :: forall io . MonadIO io => Device -> BufferView -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyBufferView device bufferView allocator = liftIO . evalContT $ do let vkDestroyBufferView' = mkVkDestroyBufferView (pVkDestroyBufferView (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -210,8 +205,7 @@ -- -- == Valid Usage ----- - @offset@ /must/ be less than the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'+-- - @offset@ /must/ be less than the size of @buffer@ -- -- - If @range@ is not equal to -- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', @range@ /must/ be@@ -219,14 +213,12 @@ -- -- - If @range@ is not equal to -- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', @range@ /must/ be--- an integer multiple of the texel block size of--- 'Graphics.Vulkan.Core10.Enums.Format.Format'+-- an integer multiple of the texel block size of @format@ -- -- - If @range@ is not equal to -- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', @range@ divided by--- the texel block size of--- 'Graphics.Vulkan.Core10.Enums.Format.Format', multiplied by the--- number of texels per texel block for that format (as defined in the+-- the texel block size of @format@, multiplied by the number of texels+-- per texel block for that format (as defined in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatibility Compatible Formats> -- table), /must/ be less than or equal to -- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxTexelBufferElements@@@ -234,38 +226,36 @@ -- - If @range@ is not equal to -- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', the sum of -- @offset@ and @range@ /must/ be less than or equal to the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'+-- @buffer@ ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ have been created--- with a @usage@ value containing at least one of+-- - @buffer@ /must/ have been created with a @usage@ value containing at+-- least one of -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT' -- or -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT' ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' was created with @usage@--- containing+-- - If @buffer@ was created with @usage@ containing -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT',--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be supported for--- uniform texel buffers, as specified by the+-- @format@ /must/ be supported for uniform texel buffers, as specified+-- by the -- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT' -- flag in -- 'Graphics.Vulkan.Core10.DeviceInitialization.FormatProperties'::@bufferFeatures@ -- returned by -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceFormatProperties' ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' was created with @usage@--- containing+-- - If @buffer@ was created with @usage@ containing -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT',--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be supported for--- storage texel buffers, as specified by the+-- @format@ /must/ be supported for storage texel buffers, as specified+-- by the -- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT' -- flag in -- 'Graphics.Vulkan.Core10.DeviceInitialization.FormatProperties'::@bufferFeatures@ -- returned by -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceFormatProperties' ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is non-sparse then it--- /must/ be bound completely and contiguously to a single+-- - If @buffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object -- -- - If the@@ -275,33 +265,31 @@ -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-texelBufferAlignment texelBufferAlignment>--- feature is enabled and if 'Graphics.Vulkan.Core10.Handles.Buffer'--- was created with @usage@ containing+-- feature is enabled and if @buffer@ was created with @usage@+-- containing -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT', -- @offset@ /must/ be a multiple of the lesser of -- 'Graphics.Vulkan.Extensions.VK_EXT_texel_buffer_alignment.PhysicalDeviceTexelBufferAlignmentPropertiesEXT'::@storageTexelBufferOffsetAlignmentBytes@ -- or, if -- 'Graphics.Vulkan.Extensions.VK_EXT_texel_buffer_alignment.PhysicalDeviceTexelBufferAlignmentPropertiesEXT'::@storageTexelBufferOffsetSingleTexelAlignment@ -- is 'Graphics.Vulkan.Core10.BaseType.TRUE', the size of a texel of--- the requested 'Graphics.Vulkan.Core10.Enums.Format.Format'. If the--- size of a texel is a multiple of three bytes, then the size of a--- single component of 'Graphics.Vulkan.Core10.Enums.Format.Format' is--- used instead+-- the requested @format@. If the size of a texel is a multiple of+-- three bytes, then the size of a single component of @format@ is used+-- instead -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-texelBufferAlignment texelBufferAlignment>--- feature is enabled and if 'Graphics.Vulkan.Core10.Handles.Buffer'--- was created with @usage@ containing+-- feature is enabled and if @buffer@ was created with @usage@+-- containing -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT', -- @offset@ /must/ be a multiple of the lesser of -- 'Graphics.Vulkan.Extensions.VK_EXT_texel_buffer_alignment.PhysicalDeviceTexelBufferAlignmentPropertiesEXT'::@uniformTexelBufferOffsetAlignmentBytes@ -- or, if -- 'Graphics.Vulkan.Extensions.VK_EXT_texel_buffer_alignment.PhysicalDeviceTexelBufferAlignmentPropertiesEXT'::@uniformTexelBufferOffsetSingleTexelAlignment@ -- is 'Graphics.Vulkan.Core10.BaseType.TRUE', the size of a texel of--- the requested 'Graphics.Vulkan.Core10.Enums.Format.Format'. If the--- size of a texel is a multiple of three bytes, then the size of a--- single component of 'Graphics.Vulkan.Core10.Enums.Format.Format' is--- used instead+-- the requested @format@. If the size of a texel is a multiple of+-- three bytes, then the size of a single component of @format@ is used+-- instead -- -- == Valid Usage (Implicit) --@@ -310,12 +298,12 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be a valid+-- - @format@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value -- -- = See Also@@ -327,15 +315,13 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createBufferView' data BufferViewCreateInfo = BufferViewCreateInfo- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ { -- | @flags@ is reserved for future use. flags :: BufferViewCreateFlags- , -- | 'Graphics.Vulkan.Core10.Handles.Buffer' is a- -- 'Graphics.Vulkan.Core10.Handles.Buffer' on which the view will be- -- created.+ , -- | @buffer@ is a 'Graphics.Vulkan.Core10.Handles.Buffer' on which the view+ -- will be created. buffer :: Buffer- , -- | 'Graphics.Vulkan.Core10.Enums.Format.Format' is a- -- 'Graphics.Vulkan.Core10.Enums.Format.Format' describing the format of- -- the data elements in the buffer.+ , -- | @format@ is a 'Graphics.Vulkan.Core10.Enums.Format.Format' describing+ -- the format of the data elements in the buffer. format :: Format , -- | @offset@ is an offset in bytes from the base address of the buffer. -- Accesses to the buffer view from shaders use addressing that is relative@@ -347,8 +333,7 @@ -- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE' is used and the -- remaining size of the buffer is not a multiple of the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#texel-block-size texel block size>- -- of 'Graphics.Vulkan.Core10.Enums.Format.Format', the nearest smaller- -- multiple is used.+ -- of @format@, the nearest smaller multiple is used. range :: DeviceSize } deriving (Typeable)
src/Graphics/Vulkan/Core10/CommandBuffer.hs view
@@ -13,6 +13,7 @@ import Control.Exception.Base (bracket) import Control.Exception.Base (bracket_)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -28,6 +29,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -55,9 +57,8 @@ import {-# SOURCE #-} Graphics.Vulkan.Extensions.VK_EXT_conditional_rendering (CommandBufferInheritanceConditionalRenderingInfoEXT) import {-# SOURCE #-} Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform (CommandBufferInheritanceRenderPassTransformInfoQCOM) import Graphics.Vulkan.Core10.Enums.CommandBufferLevel (CommandBufferLevel)-import Graphics.Vulkan.Core10.Enums.CommandBufferResetFlagBits (CommandBufferResetFlags)-import Graphics.Vulkan.Core10.Enums.CommandBufferResetFlagBits (CommandBufferResetFlags) import Graphics.Vulkan.Core10.Enums.CommandBufferResetFlagBits (CommandBufferResetFlagBits(..))+import Graphics.Vulkan.Core10.Enums.CommandBufferResetFlagBits (CommandBufferResetFlags) import Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits (CommandBufferUsageFlags) import Graphics.Vulkan.Core10.Handles (CommandBuffer_T) import Graphics.Vulkan.Core10.Handles (CommandPool)@@ -107,8 +108,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the command pool.+-- - @device@ is the logical device that owns the command pool. -- -- - @pAllocateInfo@ is a pointer to a 'CommandBufferAllocateInfo' -- structure describing parameters of the allocation.@@ -133,8 +133,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pAllocateInfo@ /must/ be a valid pointer to a valid -- 'CommandBufferAllocateInfo' structure@@ -167,8 +167,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'CommandBufferAllocateInfo', 'Graphics.Vulkan.Core10.Handles.Device'-allocateCommandBuffers :: Device -> CommandBufferAllocateInfo -> IO (("commandBuffers" ::: Vector CommandBuffer))-allocateCommandBuffers device allocateInfo = evalContT $ do+allocateCommandBuffers :: forall io . MonadIO io => Device -> CommandBufferAllocateInfo -> io (("commandBuffers" ::: Vector CommandBuffer))+allocateCommandBuffers device allocateInfo = liftIO . evalContT $ do let cmds = deviceCmds (device :: Device) let vkAllocateCommandBuffers' = mkVkAllocateCommandBuffers (pVkAllocateCommandBuffers cmds) pAllocateInfo <- ContT $ withCStruct (allocateInfo)@@ -184,11 +184,11 @@ -- using 'bracket' -- -- The allocated value must not be returned from the provided computation-withCommandBuffers :: Device -> CommandBufferAllocateInfo -> (Vector CommandBuffer -> IO r) -> IO r-withCommandBuffers device commandBufferAllocateInfo =+withCommandBuffers :: forall r . Device -> CommandBufferAllocateInfo -> ((Vector CommandBuffer) -> IO r) -> IO r+withCommandBuffers device pAllocateInfo = bracket- (allocateCommandBuffers device commandBufferAllocateInfo)- (\o -> freeCommandBuffers device (commandPool (commandBufferAllocateInfo :: CommandBufferAllocateInfo)) o)+ (allocateCommandBuffers device pAllocateInfo)+ (\(o0) -> freeCommandBuffers device (commandPool (pAllocateInfo :: CommandBufferAllocateInfo)) o0) foreign import ccall@@ -202,11 +202,10 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the command pool.+-- - @device@ is the logical device that owns the command pool. ----- - 'Graphics.Vulkan.Core10.Handles.CommandPool' is the command pool--- from which the command buffers were allocated.+-- - @commandPool@ is the command pool from which the command buffers+-- were allocated. -- -- - @commandBufferCount@ is the length of the @pCommandBuffers@ array. --@@ -232,26 +231,23 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/ be a valid+-- - @commandPool@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandPool' handle -- -- - @commandBufferCount@ /must/ be greater than @0@ ----- - 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/ have been--- created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - @commandPool@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- - Each element of @pCommandBuffers@ that is a valid handle /must/ have--- been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.CommandPool'+-- been created, allocated, or retrieved from @commandPool@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/--- be externally synchronized+-- - Host access to @commandPool@ /must/ be externally synchronized -- -- - Host access to each member of @pCommandBuffers@ /must/ be externally -- synchronized@@ -261,8 +257,8 @@ -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.Handles.CommandPool', -- 'Graphics.Vulkan.Core10.Handles.Device'-freeCommandBuffers :: Device -> CommandPool -> ("commandBuffers" ::: Vector CommandBuffer) -> IO ()-freeCommandBuffers device commandPool commandBuffers = evalContT $ do+freeCommandBuffers :: forall io . MonadIO io => Device -> CommandPool -> ("commandBuffers" ::: Vector CommandBuffer) -> io ()+freeCommandBuffers device commandPool commandBuffers = liftIO . evalContT $ do let vkFreeCommandBuffers' = mkVkFreeCommandBuffers (pVkFreeCommandBuffers (deviceCmds (device :: Device))) pPCommandBuffers <- ContT $ allocaBytesAligned @(Ptr CommandBuffer_T) ((Data.Vector.length (commandBuffers)) * 8) 8 lift $ Data.Vector.imapM_ (\i e -> poke (pPCommandBuffers `plusPtr` (8 * (i)) :: Ptr (Ptr CommandBuffer_T)) (commandBufferHandle (e))) (commandBuffers)@@ -281,8 +277,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the handle of the--- command buffer which is to be put in the recording state.+-- - @commandBuffer@ is the handle of the command buffer which is to be+-- put in the recording state. -- -- - @pBeginInfo@ points to a 'CommandBufferBeginInfo' structure defining -- additional information about how the command buffer begins@@ -290,31 +286,29 @@ -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be in the+-- - @commandBuffer@ /must/ not be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording or pending state> ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- a 'Graphics.Vulkan.Core10.Handles.CommandPool' which did not have--- the+-- - If @commandBuffer@ was allocated from a+-- 'Graphics.Vulkan.Core10.Handles.CommandPool' which did not have the -- 'Graphics.Vulkan.Core10.Enums.CommandPoolCreateFlagBits.COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT'--- flag set, 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be--- in the+-- flag set, @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle initial state> ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a secondary--- command buffer, the @pInheritanceInfo@ member of @pBeginInfo@ /must/--- be a valid 'CommandBufferInheritanceInfo' structure+-- - If @commandBuffer@ is a secondary command buffer, the+-- @pInheritanceInfo@ member of @pBeginInfo@ /must/ be a valid+-- 'CommandBufferInheritanceInfo' structure ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a secondary--- command buffer and either the @occlusionQueryEnable@ member of the--- @pInheritanceInfo@ member of @pBeginInfo@ is--- 'Graphics.Vulkan.Core10.BaseType.FALSE', or the precise occlusion--- queries feature is not enabled, the @queryFlags@ member of the--- @pInheritanceInfo@ member @pBeginInfo@ /must/ not contain+-- - If @commandBuffer@ is a secondary command buffer and either the+-- @occlusionQueryEnable@ member of the @pInheritanceInfo@ member of+-- @pBeginInfo@ is 'Graphics.Vulkan.Core10.BaseType.FALSE', or the+-- precise occlusion queries feature is not enabled, the @queryFlags@+-- member of the @pInheritanceInfo@ member @pBeginInfo@ /must/ not+-- contain -- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QUERY_CONTROL_PRECISE_BIT' ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a primary--- command buffer, then @pBeginInfo->flags@ /must/ not set both the+-- - If @commandBuffer@ is a primary command buffer, then+-- @pBeginInfo->flags@ /must/ not set both the -- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT' -- and the -- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT'@@ -322,7 +316,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pBeginInfo@ /must/ be a valid pointer to a valid@@ -330,12 +324,10 @@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Return Codes --@@ -352,8 +344,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'CommandBufferBeginInfo'-beginCommandBuffer :: PokeChain a => CommandBuffer -> CommandBufferBeginInfo a -> IO ()-beginCommandBuffer commandBuffer beginInfo = evalContT $ do+beginCommandBuffer :: forall a io . (PokeChain a, MonadIO io) => CommandBuffer -> CommandBufferBeginInfo a -> io ()+beginCommandBuffer commandBuffer beginInfo = liftIO . evalContT $ do let vkBeginCommandBuffer' = mkVkBeginCommandBuffer (pVkBeginCommandBuffer (deviceCmds (commandBuffer :: CommandBuffer))) pBeginInfo <- ContT $ withCStruct (beginInfo) r <- lift $ vkBeginCommandBuffer' (commandBufferHandle (commandBuffer)) pBeginInfo@@ -361,13 +353,11 @@ -- | A safe wrapper for 'beginCommandBuffer' and 'endCommandBuffer' using -- 'bracket_'------ The allocated value must not be returned from the provided computation-useCommandBuffer :: PokeChain a => CommandBuffer -> CommandBufferBeginInfo a -> IO r -> IO r-useCommandBuffer commandBuffer commandBufferBeginInfo =+useCommandBuffer :: forall a r . PokeChain a => CommandBuffer -> CommandBufferBeginInfo a -> IO r -> IO r+useCommandBuffer commandBuffer pBeginInfo = bracket_- (beginCommandBuffer commandBuffer commandBufferBeginInfo)- ( endCommandBuffer commandBuffer)+ (beginCommandBuffer commandBuffer pBeginInfo)+ (endCommandBuffer commandBuffer) foreign import ccall@@ -381,8 +371,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- to complete recording.+-- - @commandBuffer@ is the command buffer to complete recording. -- -- = Description --@@ -396,48 +385,45 @@ -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>. ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a primary--- command buffer, there /must/ not be an active render pass instance+-- - If @commandBuffer@ is a primary command buffer, there /must/ not be+-- an active render pass instance -- -- - All queries made -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>--- during the recording of--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ have been made+-- during the recording of @commandBuffer@ /must/ have been made -- inactive -- -- - Conditional rendering must not be -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#active-conditional-rendering active> ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a secondary--- command buffer, there /must/ not be an outstanding+-- - If @commandBuffer@ is a secondary command buffer, there /must/ not+-- be an outstanding -- 'Graphics.Vulkan.Extensions.VK_EXT_debug_utils.cmdBeginDebugUtilsLabelEXT'--- command recorded to 'Graphics.Vulkan.Core10.Handles.CommandBuffer'--- that has not previously been ended by a call to+-- command recorded to @commandBuffer@ that has not previously been+-- ended by a call to -- 'Graphics.Vulkan.Extensions.VK_EXT_debug_utils.cmdEndDebugUtilsLabelEXT'. ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a secondary--- command buffer, there /must/ not be an outstanding+-- - If @commandBuffer@ is a secondary command buffer, there /must/ not+-- be an outstanding -- 'Graphics.Vulkan.Extensions.VK_EXT_debug_marker.cmdDebugMarkerBeginEXT'--- command recorded to 'Graphics.Vulkan.Core10.Handles.CommandBuffer'--- that has not previously been ended by a call to+-- command recorded to @commandBuffer@ that has not previously been+-- ended by a call to -- 'Graphics.Vulkan.Extensions.VK_EXT_debug_marker.cmdDebugMarkerEndEXT'. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Return Codes --@@ -454,8 +440,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-endCommandBuffer :: CommandBuffer -> IO ()-endCommandBuffer commandBuffer = do+endCommandBuffer :: forall io . MonadIO io => CommandBuffer -> io ()+endCommandBuffer commandBuffer = liftIO $ do let vkEndCommandBuffer' = mkVkEndCommandBuffer (pVkEndCommandBuffer (deviceCmds (commandBuffer :: CommandBuffer))) r <- vkEndCommandBuffer' (commandBufferHandle (commandBuffer)) when (r < SUCCESS) (throwIO (VulkanException r))@@ -472,13 +458,13 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- to reset. The command buffer /can/ be in any state other than+-- - @commandBuffer@ is the command buffer to reset. The command buffer+-- /can/ be in any state other than -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle pending>, -- and is moved into the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle initial state>. ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+-- - @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.CommandBufferResetFlagBits.CommandBufferResetFlagBits' -- controlling the reset operation. --@@ -486,33 +472,30 @@ -- -- Any primary command buffer that is in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording or executable state>--- and has 'Graphics.Vulkan.Core10.Handles.CommandBuffer' recorded into it,--- becomes+-- and has @commandBuffer@ recorded into it, becomes -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle invalid>. -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be in the+-- - @commandBuffer@ /must/ not be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle pending state> ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ have been--- allocated from a pool that was created with the+-- - @commandBuffer@ /must/ have been allocated from a pool that was+-- created with the -- 'Graphics.Vulkan.Core10.Enums.CommandPoolCreateFlagBits.COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT' -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.CommandBufferResetFlagBits.CommandBufferResetFlagBits' -- values -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- == Return Codes --@@ -530,8 +513,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.Enums.CommandBufferResetFlagBits.CommandBufferResetFlags'-resetCommandBuffer :: CommandBuffer -> CommandBufferResetFlags -> IO ()-resetCommandBuffer commandBuffer flags = do+resetCommandBuffer :: forall io . MonadIO io => CommandBuffer -> CommandBufferResetFlags -> io ()+resetCommandBuffer commandBuffer flags = liftIO $ do let vkResetCommandBuffer' = mkVkResetCommandBuffer (pVkResetCommandBuffer (deviceCmds (commandBuffer :: CommandBuffer))) r <- vkResetCommandBuffer' (commandBufferHandle (commandBuffer)) (flags) when (r < SUCCESS) (throwIO (VulkanException r))@@ -549,7 +532,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'allocateCommandBuffers' data CommandBufferAllocateInfo = CommandBufferAllocateInfo- { -- | 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/ be a valid+ { -- | @commandPool@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandPool' handle commandPool :: CommandPool , -- | @level@ /must/ be a valid@@ -648,9 +631,8 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - Both of 'Graphics.Vulkan.Core10.Handles.Framebuffer', and--- 'Graphics.Vulkan.Core10.Handles.RenderPass' that are valid handles--- of non-ignored parameters /must/ have been created, allocated, or+-- - Both of @framebuffer@, and @renderPass@ that are valid handles of+-- non-ignored parameters /must/ have been created, allocated, or -- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device' -- -- = See Also@@ -664,21 +646,20 @@ data CommandBufferInheritanceInfo (es :: [Type]) = CommandBufferInheritanceInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.Handles.RenderPass' is a- -- 'Graphics.Vulkan.Core10.Handles.RenderPass' object defining which render- -- passes the 'Graphics.Vulkan.Core10.Handles.CommandBuffer' will be+ , -- | @renderPass@ is a 'Graphics.Vulkan.Core10.Handles.RenderPass' object+ -- defining which render passes the+ -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' will be -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible> -- with and /can/ be executed within. If the -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' will not be executed- -- within a render pass instance,- -- 'Graphics.Vulkan.Core10.Handles.RenderPass' is ignored.+ -- within a render pass instance, @renderPass@ is ignored. renderPass :: RenderPass , -- | @subpass@ is the index of the subpass within the render pass instance -- that the 'Graphics.Vulkan.Core10.Handles.CommandBuffer' will be executed -- within. If the 'Graphics.Vulkan.Core10.Handles.CommandBuffer' will not -- be executed within a render pass instance, @subpass@ is ignored. subpass :: Word32- , -- | 'Graphics.Vulkan.Core10.Handles.Framebuffer' optionally refers to the+ , -- | @framebuffer@ optionally refers to the -- 'Graphics.Vulkan.Core10.Handles.Framebuffer' object that the -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' will be rendering to if -- it is executed within a render pass instance. It /can/ be@@ -785,26 +766,22 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT',--- the 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pInheritanceInfo@ /must/ be a valid+-- the @renderPass@ member of @pInheritanceInfo@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.RenderPass' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT', -- the @subpass@ member of @pInheritanceInfo@ /must/ be a valid subpass--- index within the 'Graphics.Vulkan.Core10.Handles.RenderPass' member--- of @pInheritanceInfo@+-- index within the @renderPass@ member of @pInheritanceInfo@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT',--- the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member of--- @pInheritanceInfo@ /must/ be either+-- the @framebuffer@ member of @pInheritanceInfo@ /must/ be either -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', or a valid -- 'Graphics.Vulkan.Core10.Handles.Framebuffer' that is compatible with--- the 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pInheritanceInfo@+-- the @renderPass@ member of @pInheritanceInfo@ -- -- == Valid Usage (Implicit) --@@ -817,8 +794,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.CommandBufferUsageFlagBits' -- values --@@ -831,14 +807,13 @@ data CommandBufferBeginInfo (es :: [Type]) = CommandBufferBeginInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.CommandBufferUsageFlagBits' -- specifying usage behavior for the command buffer. flags :: CommandBufferUsageFlags , -- | @pInheritanceInfo@ is a pointer to a 'CommandBufferInheritanceInfo'- -- structure, used if 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a- -- secondary command buffer. If this is a primary command buffer, then this- -- value is ignored.+ -- structure, used if @commandBuffer@ is a secondary command buffer. If+ -- this is a primary command buffer, then this value is ignored. inheritanceInfo :: Maybe (SomeStruct CommandBufferInheritanceInfo) } deriving (Typeable)
src/Graphics/Vulkan/Core10/CommandBufferBuilding.hs view
@@ -34,9785 +34,9489 @@ , cmdWaitEvents , cmdPipelineBarrier , cmdBeginQuery- , cmdEndQuery- , cmdResetQueryPool- , cmdWriteTimestamp- , cmdCopyQueryPoolResults- , cmdPushConstants- , cmdBeginRenderPass- , cmdNextSubpass- , cmdEndRenderPass- , cmdExecuteCommands- , Viewport(..)- , Rect2D(..)- , ClearRect(..)- , BufferCopy(..)- , ImageCopy(..)- , ImageBlit(..)- , BufferImageCopy(..)- , ImageResolve(..)- , RenderPassBeginInfo(..)- , ClearAttachment(..)- ) where--import Control.Monad (unless)-import Data.Typeable (eqT)-import Foreign.Marshal.Alloc (allocaBytesAligned)-import GHC.IO (throwIO)-import GHC.Ptr (castPtr)-import Foreign.Ptr (plusPtr)-import Control.Monad.Trans.Class (lift)-import Control.Monad.Trans.Cont (evalContT)-import qualified Data.Vector (imapM_)-import qualified Data.Vector (length)-import Data.Type.Equality ((:~:)(Refl))-import Data.Typeable (Typeable)-import Foreign.C.Types (CFloat)-import Foreign.C.Types (CFloat(..))-import Foreign.C.Types (CFloat(CFloat))-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 Data.Word (Word32)-import Data.Kind (Type)-import Control.Monad.Trans.Cont (ContT(..))-import Data.Vector (Vector)-import qualified Data.Vector.Storable.Sized (Vector)-import Graphics.Vulkan.CStruct.Utils (advancePtrBytes)-import Graphics.Vulkan.CStruct.Utils (lowerArrayPtr)-import Graphics.Vulkan.NamedType ((:::))-import Graphics.Vulkan.Core10.Handles (Buffer)-import Graphics.Vulkan.Core10.Handles (Buffer(..))-import Graphics.Vulkan.Core10.OtherTypes (BufferMemoryBarrier)-import Graphics.Vulkan.CStruct.Extends (Chain)-import Graphics.Vulkan.Core10.SharedTypes (ClearColorValue)-import Graphics.Vulkan.Core10.SharedTypes (ClearDepthStencilValue)-import Graphics.Vulkan.Core10.SharedTypes (ClearValue)-import Graphics.Vulkan.Core10.Handles (CommandBuffer)-import Graphics.Vulkan.Core10.Handles (CommandBuffer(..))-import Graphics.Vulkan.Core10.Handles (CommandBuffer_T)-import Graphics.Vulkan.Core10.Enums.DependencyFlagBits (DependencyFlags)-import Graphics.Vulkan.Core10.Enums.DependencyFlagBits (DependencyFlags)-import Graphics.Vulkan.Core10.Enums.DependencyFlagBits (DependencyFlagBits(..))-import Graphics.Vulkan.Core10.Handles (DescriptorSet)-import Graphics.Vulkan.Core10.Handles (DescriptorSet(..))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBeginQuery))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBeginRenderPass))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBindDescriptorSets))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBindIndexBuffer))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBindPipeline))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBindVertexBuffers))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBlitImage))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdClearAttachments))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdClearColorImage))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdClearDepthStencilImage))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdCopyBuffer))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdCopyBufferToImage))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdCopyImage))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdCopyImageToBuffer))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdCopyQueryPoolResults))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdDispatch))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdDispatchIndirect))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdDraw))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdDrawIndexed))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdDrawIndexedIndirect))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdDrawIndirect))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdEndQuery))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdEndRenderPass))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdExecuteCommands))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdFillBuffer))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdNextSubpass))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdPipelineBarrier))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdPushConstants))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdResetEvent))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdResetQueryPool))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdResolveImage))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetBlendConstants))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetDepthBias))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetDepthBounds))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetEvent))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetLineWidth))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetScissor))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetStencilCompareMask))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetStencilReference))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetStencilWriteMask))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetViewport))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdUpdateBuffer))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdWaitEvents))-import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdWriteTimestamp))-import {-# SOURCE #-} Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group (DeviceGroupRenderPassBeginInfo)-import Graphics.Vulkan.Core10.BaseType (DeviceSize)-import Graphics.Vulkan.Core10.Handles (Event)-import Graphics.Vulkan.Core10.Handles (Event(..))-import Graphics.Vulkan.CStruct.Extends (Extends)-import Graphics.Vulkan.CStruct.Extends (Extensible(..))-import Graphics.Vulkan.Core10.SharedTypes (Extent2D)-import Graphics.Vulkan.Core10.SharedTypes (Extent3D)-import Graphics.Vulkan.Core10.Enums.Filter (Filter)-import Graphics.Vulkan.Core10.Enums.Filter (Filter(..))-import Graphics.Vulkan.Core10.Handles (Framebuffer)-import Graphics.Vulkan.CStruct (FromCStruct)-import Graphics.Vulkan.CStruct (FromCStruct(..))-import Graphics.Vulkan.Core10.Handles (Image)-import Graphics.Vulkan.Core10.Handles (Image(..))-import Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits (ImageAspectFlags)-import Graphics.Vulkan.Core10.Enums.ImageLayout (ImageLayout)-import Graphics.Vulkan.Core10.Enums.ImageLayout (ImageLayout(..))-import Graphics.Vulkan.Core10.OtherTypes (ImageMemoryBarrier)-import Graphics.Vulkan.Core10.SharedTypes (ImageSubresourceLayers)-import Graphics.Vulkan.Core10.SharedTypes (ImageSubresourceRange)-import Graphics.Vulkan.Core10.Enums.IndexType (IndexType)-import Graphics.Vulkan.Core10.Enums.IndexType (IndexType(..))-import Graphics.Vulkan.Core10.OtherTypes (MemoryBarrier)-import Graphics.Vulkan.Core10.SharedTypes (Offset2D)-import Graphics.Vulkan.Core10.SharedTypes (Offset3D)-import Graphics.Vulkan.Core10.Handles (Pipeline)-import Graphics.Vulkan.Core10.Handles (Pipeline(..))-import Graphics.Vulkan.Core10.Enums.PipelineBindPoint (PipelineBindPoint)-import Graphics.Vulkan.Core10.Enums.PipelineBindPoint (PipelineBindPoint(..))-import Graphics.Vulkan.Core10.Handles (PipelineLayout)-import Graphics.Vulkan.Core10.Handles (PipelineLayout(..))-import Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlagBits)-import Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlagBits(..))-import Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlags)-import Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlags)-import Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlagBits(..))-import Graphics.Vulkan.CStruct.Extends (PokeChain)-import Graphics.Vulkan.CStruct.Extends (PokeChain(..))-import Graphics.Vulkan.Core10.Enums.QueryControlFlagBits (QueryControlFlags)-import Graphics.Vulkan.Core10.Enums.QueryControlFlagBits (QueryControlFlags)-import Graphics.Vulkan.Core10.Enums.QueryControlFlagBits (QueryControlFlagBits(..))-import Graphics.Vulkan.Core10.Handles (QueryPool)-import Graphics.Vulkan.Core10.Handles (QueryPool(..))-import Graphics.Vulkan.Core10.Enums.QueryResultFlagBits (QueryResultFlags)-import Graphics.Vulkan.Core10.Enums.QueryResultFlagBits (QueryResultFlags)-import Graphics.Vulkan.Core10.Enums.QueryResultFlagBits (QueryResultFlagBits(..))-import Graphics.Vulkan.Core10.Handles (RenderPass)-import {-# SOURCE #-} Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer (RenderPassAttachmentBeginInfo)-import {-# SOURCE #-} Graphics.Vulkan.Extensions.VK_EXT_sample_locations (RenderPassSampleLocationsBeginInfoEXT)-import {-# SOURCE #-} Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform (RenderPassTransformBeginInfoQCOM)-import Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)-import Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)-import Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlagBits(..))-import Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits (StencilFaceFlags)-import Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits (StencilFaceFlags)-import Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits (StencilFaceFlagBits(..))-import Graphics.Vulkan.Core10.Enums.StructureType (StructureType)-import Graphics.Vulkan.Core10.Enums.SubpassContents (SubpassContents)-import Graphics.Vulkan.Core10.Enums.SubpassContents (SubpassContents(..))-import Graphics.Vulkan.CStruct (ToCStruct)-import Graphics.Vulkan.CStruct (ToCStruct(..))-import Graphics.Vulkan.Zero (Zero(..))-import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO))-foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdBindPipeline- :: FunPtr (Ptr CommandBuffer_T -> PipelineBindPoint -> Pipeline -> IO ()) -> Ptr CommandBuffer_T -> PipelineBindPoint -> Pipeline -> IO ()---- | vkCmdBindPipeline - Bind a pipeline object to a command buffer------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- that the pipeline will be bound to.------ - 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- is a--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- value specifying whether to bind to the compute or graphics bind--- point. Binding one does not disturb the other.------ - 'Graphics.Vulkan.Core10.Handles.Pipeline' is the pipeline to be--- bound.------ = Description------ Once bound, a pipeline binding affects subsequent graphics or compute--- commands in the command buffer until a different pipeline is bound to--- the bind point. The pipeline bound to--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_COMPUTE'--- controls the behavior of 'cmdDispatch' and 'cmdDispatchIndirect'. The--- pipeline bound to--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS'--- controls the behavior of all--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#drawing drawing commands>.--- The pipeline bound to--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_RAY_TRACING_NV'--- controls the behavior of--- 'Graphics.Vulkan.Extensions.VK_NV_ray_tracing.cmdTraceRaysNV'. No other--- commands are affected by the pipeline state.------ == Valid Usage------ - If--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- is--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_COMPUTE',--- the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support compute operations------ - If--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- is--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS',--- the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - If--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- is--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_COMPUTE',--- 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ be a compute--- pipeline------ - If--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- is--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS',--- 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ be a graphics--- pipeline------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-variableMultisampleRate variable multisample rate>--- feature is not supported, 'Graphics.Vulkan.Core10.Handles.Pipeline'--- is a graphics pipeline, the current subpass has no attachments, and--- this is not the first call to this function with a graphics pipeline--- after transitioning to the current subpass, then the sample count--- specified by this pipeline /must/ match that set in the previous--- pipeline------ - If--- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PhysicalDeviceSampleLocationsPropertiesEXT'::@variableSampleLocations@--- is 'Graphics.Vulkan.Core10.BaseType.FALSE', and--- 'Graphics.Vulkan.Core10.Handles.Pipeline' is a graphics pipeline--- created with a--- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'--- structure having its @sampleLocationsEnable@ member set to--- 'Graphics.Vulkan.Core10.BaseType.TRUE' but without--- 'Graphics.Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT'--- enabled then the current render pass instance /must/ have been begun--- by specifying a--- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.RenderPassSampleLocationsBeginInfoEXT'--- structure whose @pPostSubpassSampleLocations@ member contains an--- element with a @subpassIndex@ matching the current subpass index and--- the @sampleLocationsInfo@ member of that element /must/ match the--- @sampleLocationsInfo@ specified in--- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'--- when the pipeline was created------ - This command /must/ not be recorded when transform feedback is--- active------ - If--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- is--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_RAY_TRACING_NV',--- the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support compute operations------ - If--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- is--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_RAY_TRACING_NV',--- the 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ be a ray--- tracing pipeline------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- value------ - 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Pipeline' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ have been created,--- allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.Pipeline',--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'-cmdBindPipeline :: CommandBuffer -> PipelineBindPoint -> Pipeline -> IO ()-cmdBindPipeline commandBuffer pipelineBindPoint pipeline = do- let vkCmdBindPipeline' = mkVkCmdBindPipeline (pVkCmdBindPipeline (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdBindPipeline' (commandBufferHandle (commandBuffer)) (pipelineBindPoint) (pipeline)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdSetViewport- :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Viewport -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Viewport -> IO ()---- | vkCmdSetViewport - Set the viewport on a command buffer------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @firstViewport@ is the index of the first viewport whose parameters--- are updated by the command.------ - @viewportCount@ is the number of viewports whose parameters are--- updated by the command.------ - @pViewports@ is a pointer to an array of 'Viewport' structures--- specifying viewport parameters.------ = Description------ The viewport parameters taken from element i of @pViewports@ replace the--- current state for the viewport index @firstViewport@ + i, for i in [0,--- @viewportCount@).------ == Valid Usage------ - @firstViewport@ /must/ be less than--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewports@------ - The sum of @firstViewport@ and @viewportCount@ /must/ be between @1@--- and--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewports@,--- inclusive------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-multiViewport multiple viewports>--- feature is not enabled, @firstViewport@ /must/ be @0@------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-multiViewport multiple viewports>--- feature is not enabled, @viewportCount@ /must/ be @1@------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @pViewports@ /must/ be a valid pointer to an array of--- @viewportCount@ valid 'Viewport' structures------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - @viewportCount@ /must/ be greater than @0@------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'Viewport'-cmdSetViewport :: CommandBuffer -> ("firstViewport" ::: Word32) -> ("viewports" ::: Vector Viewport) -> IO ()-cmdSetViewport commandBuffer firstViewport viewports = evalContT $ do- let vkCmdSetViewport' = mkVkCmdSetViewport (pVkCmdSetViewport (deviceCmds (commandBuffer :: CommandBuffer)))- pPViewports <- ContT $ allocaBytesAligned @Viewport ((Data.Vector.length (viewports)) * 24) 4- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPViewports `plusPtr` (24 * (i)) :: Ptr Viewport) (e) . ($ ())) (viewports)- lift $ vkCmdSetViewport' (commandBufferHandle (commandBuffer)) (firstViewport) ((fromIntegral (Data.Vector.length $ (viewports)) :: Word32)) (pPViewports)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdSetScissor- :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Rect2D -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Rect2D -> IO ()---- | vkCmdSetScissor - Set the dynamic scissor rectangles on a command buffer------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @firstScissor@ is the index of the first scissor whose state is--- updated by the command.------ - @scissorCount@ is the number of scissors whose rectangles are--- updated by the command.------ - @pScissors@ is a pointer to an array of 'Rect2D' structures defining--- scissor rectangles.------ = Description------ The scissor rectangles taken from element i of @pScissors@ replace the--- current state for the scissor index @firstScissor@ + i, for i in [0,--- @scissorCount@).------ Each scissor rectangle is described by a 'Rect2D' structure, with the--- @offset.x@ and @offset.y@ values determining the upper left corner of--- the scissor rectangle, and the @extent.width@ and @extent.height@ values--- determining the size in pixels.------ If a render pass transform is enabled, the (@offset.x@ and @offset.y@)--- and (@extent.width@ and @extent.height@) values are transformed as--- described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vertexpostproc-renderpass-transform render pass transform>--- before participating in the scissor test.------ == Valid Usage------ - @firstScissor@ /must/ be less than--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewports@------ - The sum of @firstScissor@ and @scissorCount@ /must/ be between @1@--- and--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewports@,--- inclusive------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-multiViewport multiple viewports>--- feature is not enabled, @firstScissor@ /must/ be @0@------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-multiViewport multiple viewports>--- feature is not enabled, @scissorCount@ /must/ be @1@------ - The @x@ and @y@ members of @offset@ member of any element of--- @pScissors@ /must/ be greater than or equal to @0@------ - Evaluation of (@offset.x@ + @extent.width@) /must/ not cause a--- signed integer addition overflow for any element of @pScissors@------ - Evaluation of (@offset.y@ + @extent.height@) /must/ not cause a--- signed integer addition overflow for any element of @pScissors@------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @pScissors@ /must/ be a valid pointer to an array of @scissorCount@--- 'Rect2D' structures------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - @scissorCount@ /must/ be greater than @0@------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'Rect2D'-cmdSetScissor :: CommandBuffer -> ("firstScissor" ::: Word32) -> ("scissors" ::: Vector Rect2D) -> IO ()-cmdSetScissor commandBuffer firstScissor scissors = evalContT $ do- let vkCmdSetScissor' = mkVkCmdSetScissor (pVkCmdSetScissor (deviceCmds (commandBuffer :: CommandBuffer)))- pPScissors <- ContT $ allocaBytesAligned @Rect2D ((Data.Vector.length (scissors)) * 16) 4- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPScissors `plusPtr` (16 * (i)) :: Ptr Rect2D) (e) . ($ ())) (scissors)- lift $ vkCmdSetScissor' (commandBufferHandle (commandBuffer)) (firstScissor) ((fromIntegral (Data.Vector.length $ (scissors)) :: Word32)) (pPScissors)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdSetLineWidth- :: FunPtr (Ptr CommandBuffer_T -> CFloat -> IO ()) -> Ptr CommandBuffer_T -> CFloat -> IO ()---- | vkCmdSetLineWidth - Set the dynamic line width state------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @lineWidth@ is the width of rasterized line segments.------ == Valid Usage------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-wideLines wide lines>--- feature is not enabled, @lineWidth@ /must/ be @1.0@------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdSetLineWidth :: CommandBuffer -> ("lineWidth" ::: Float) -> IO ()-cmdSetLineWidth commandBuffer lineWidth = do- let vkCmdSetLineWidth' = mkVkCmdSetLineWidth (pVkCmdSetLineWidth (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdSetLineWidth' (commandBufferHandle (commandBuffer)) (CFloat (lineWidth))- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdSetDepthBias- :: FunPtr (Ptr CommandBuffer_T -> CFloat -> CFloat -> CFloat -> IO ()) -> Ptr CommandBuffer_T -> CFloat -> CFloat -> CFloat -> IO ()---- | vkCmdSetDepthBias - Set the depth bias dynamic state------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @depthBiasConstantFactor@ is a scalar factor controlling the--- constant depth value added to each fragment.------ - @depthBiasClamp@ is the maximum (or minimum) depth bias of a--- fragment.------ - @depthBiasSlopeFactor@ is a scalar factor applied to a fragment’s--- slope in depth bias calculations.------ = Description------ If @depthBiasEnable@ is 'Graphics.Vulkan.Core10.BaseType.FALSE', no--- depth bias is applied and the fragment’s depth values are unchanged.------ @depthBiasSlopeFactor@ scales the maximum depth slope of the polygon,--- and @depthBiasConstantFactor@ scales an implementation-dependent--- constant that relates to the usable resolution of the depth buffer. The--- resulting values are summed to produce the depth bias value which is--- then clamped to a minimum or maximum value specified by--- @depthBiasClamp@. @depthBiasSlopeFactor@, @depthBiasConstantFactor@, and--- @depthBiasClamp@ /can/ each be positive, negative, or zero.------ The maximum depth slope m of a triangle is------ \[m = \sqrt{ \left({{\partial z_f} \over {\partial x_f}}\right)^2--- + \left({{\partial z_f} \over {\partial y_f}}\right)^2}\]------ where (xf, yf, zf) is a point on the triangle. m /may/ be approximated--- as------ \[m = \max\left( \left| { {\partial z_f} \over {\partial x_f} } \right|,--- \left| { {\partial z_f} \over {\partial y_f} } \right|--- \right).\]------ The minimum resolvable difference r is an implementation-dependent--- parameter that depends on the depth buffer representation. It is the--- smallest difference in framebuffer coordinate z values that is--- guaranteed to remain distinct throughout polygon rasterization and in--- the depth buffer. All pairs of fragments generated by the rasterization--- of two polygons with otherwise identical vertices, but @z@f values that--- differ by r, will have distinct depth values.------ For fixed-point depth buffer representations, r is constant throughout--- the range of the entire depth buffer. For floating-point depth buffers,--- there is no single minimum resolvable difference. In this case, the--- minimum resolvable difference for a given polygon is dependent on the--- maximum exponent, e, in the range of z values spanned by the primitive.--- If n is the number of bits in the floating-point mantissa, the minimum--- resolvable difference, r, for the given primitive is defined as------ - r = 2e-n------ If a triangle is rasterized using the--- 'Graphics.Vulkan.Core10.Enums.PolygonMode.POLYGON_MODE_FILL_RECTANGLE_NV'--- polygon mode, then this minimum resolvable difference /may/ not be--- resolvable for samples outside of the triangle, where the depth is--- extrapolated.------ If no depth buffer is present, r is undefined.------ The bias value o for a polygon is------ \[\begin{aligned}--- o &= \mathrm{dbclamp}( m \times \mathtt{depthBiasSlopeFactor} + r \times \mathtt{depthBiasConstantFactor} ) \\--- \text{where} &\quad \mathrm{dbclamp}(x) =--- \begin{cases}--- x & \mathtt{depthBiasClamp} = 0 \ \text{or}\ \texttt{NaN} \\--- \min(x, \mathtt{depthBiasClamp}) & \mathtt{depthBiasClamp} > 0 \\--- \max(x, \mathtt{depthBiasClamp}) & \mathtt{depthBiasClamp} < 0 \\--- \end{cases}--- \end{aligned}\]------ m is computed as described above. If the depth buffer uses a fixed-point--- representation, m is a function of depth values in the range [0,1], and--- o is applied to depth values in the same range.------ For fixed-point depth buffers, fragment depth values are always limited--- to the range [0,1] by clamping after depth bias addition is performed.--- Unless the--- @https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/html\/vkspec.html#VK_EXT_depth_range_unrestricted@--- extension is enabled, fragment depth values are clamped even when the--- depth buffer uses a floating-point representation.------ == Valid Usage------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-depthBiasClamp depth bias clamping>--- feature is not enabled, @depthBiasClamp@ /must/ be @0.0@------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdSetDepthBias :: CommandBuffer -> ("depthBiasConstantFactor" ::: Float) -> ("depthBiasClamp" ::: Float) -> ("depthBiasSlopeFactor" ::: Float) -> IO ()-cmdSetDepthBias commandBuffer depthBiasConstantFactor depthBiasClamp depthBiasSlopeFactor = do- let vkCmdSetDepthBias' = mkVkCmdSetDepthBias (pVkCmdSetDepthBias (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdSetDepthBias' (commandBufferHandle (commandBuffer)) (CFloat (depthBiasConstantFactor)) (CFloat (depthBiasClamp)) (CFloat (depthBiasSlopeFactor))- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdSetBlendConstants- :: FunPtr (Ptr CommandBuffer_T -> Ptr (Data.Vector.Storable.Sized.Vector 4 CFloat) -> IO ()) -> Ptr CommandBuffer_T -> Ptr (Data.Vector.Storable.Sized.Vector 4 CFloat) -> IO ()---- | vkCmdSetBlendConstants - Set the values of blend constants------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @blendConstants@ is a pointer to an array of four values specifying--- the R, G, B, and A components of the blend constant color used in--- blending, depending on the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#framebuffer-blendfactors blend factor>.------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdSetBlendConstants :: CommandBuffer -> ("blendConstants" ::: (Float, Float, Float, Float)) -> IO ()-cmdSetBlendConstants commandBuffer blendConstants = evalContT $ do- let vkCmdSetBlendConstants' = mkVkCmdSetBlendConstants (pVkCmdSetBlendConstants (deviceCmds (commandBuffer :: CommandBuffer)))- pBlendConstants <- ContT $ allocaBytesAligned @(Data.Vector.Storable.Sized.Vector 4 CFloat) 16 4- let pBlendConstants' = lowerArrayPtr pBlendConstants- lift $ case (blendConstants) of- (e0, e1, e2, e3) -> do- poke (pBlendConstants' :: Ptr CFloat) (CFloat (e0))- poke (pBlendConstants' `plusPtr` 4 :: Ptr CFloat) (CFloat (e1))- poke (pBlendConstants' `plusPtr` 8 :: Ptr CFloat) (CFloat (e2))- poke (pBlendConstants' `plusPtr` 12 :: Ptr CFloat) (CFloat (e3))- lift $ vkCmdSetBlendConstants' (commandBufferHandle (commandBuffer)) (pBlendConstants)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdSetDepthBounds- :: FunPtr (Ptr CommandBuffer_T -> CFloat -> CFloat -> IO ()) -> Ptr CommandBuffer_T -> CFloat -> CFloat -> IO ()---- | vkCmdSetDepthBounds - Set the depth bounds test values for a command--- buffer------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @minDepthBounds@ is the lower bound of the range of depth values--- used in the depth bounds test.------ - @maxDepthBounds@ is the upper bound of the range.------ == Valid Usage------ - Unless the--- @https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/html\/vkspec.html#VK_EXT_depth_range_unrestricted@--- extension is enabled @minDepthBounds@ /must/ be between @0.0@ and--- @1.0@, inclusive------ - Unless the--- @https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/html\/vkspec.html#VK_EXT_depth_range_unrestricted@--- extension is enabled @maxDepthBounds@ /must/ be between @0.0@ and--- @1.0@, inclusive------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdSetDepthBounds :: CommandBuffer -> ("minDepthBounds" ::: Float) -> ("maxDepthBounds" ::: Float) -> IO ()-cmdSetDepthBounds commandBuffer minDepthBounds maxDepthBounds = do- let vkCmdSetDepthBounds' = mkVkCmdSetDepthBounds (pVkCmdSetDepthBounds (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdSetDepthBounds' (commandBufferHandle (commandBuffer)) (CFloat (minDepthBounds)) (CFloat (maxDepthBounds))- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdSetStencilCompareMask- :: FunPtr (Ptr CommandBuffer_T -> StencilFaceFlags -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> StencilFaceFlags -> Word32 -> IO ()---- | vkCmdSetStencilCompareMask - Set the stencil compare mask dynamic state------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @faceMask@ is a bitmask of--- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlagBits'--- specifying the set of stencil state for which to update the compare--- mask.------ - @compareMask@ is the new value to use as the stencil compare mask.------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @faceMask@ /must/ be a valid combination of--- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlagBits'--- values------ - @faceMask@ /must/ not be @0@------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlags'-cmdSetStencilCompareMask :: CommandBuffer -> ("faceMask" ::: StencilFaceFlags) -> ("compareMask" ::: Word32) -> IO ()-cmdSetStencilCompareMask commandBuffer faceMask compareMask = do- let vkCmdSetStencilCompareMask' = mkVkCmdSetStencilCompareMask (pVkCmdSetStencilCompareMask (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdSetStencilCompareMask' (commandBufferHandle (commandBuffer)) (faceMask) (compareMask)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdSetStencilWriteMask- :: FunPtr (Ptr CommandBuffer_T -> StencilFaceFlags -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> StencilFaceFlags -> Word32 -> IO ()---- | vkCmdSetStencilWriteMask - Set the stencil write mask dynamic state------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @faceMask@ is a bitmask of--- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlagBits'--- specifying the set of stencil state for which to update the write--- mask, as described above for 'cmdSetStencilCompareMask'.------ - @writeMask@ is the new value to use as the stencil write mask.------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @faceMask@ /must/ be a valid combination of--- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlagBits'--- values------ - @faceMask@ /must/ not be @0@------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlags'-cmdSetStencilWriteMask :: CommandBuffer -> ("faceMask" ::: StencilFaceFlags) -> ("writeMask" ::: Word32) -> IO ()-cmdSetStencilWriteMask commandBuffer faceMask writeMask = do- let vkCmdSetStencilWriteMask' = mkVkCmdSetStencilWriteMask (pVkCmdSetStencilWriteMask (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdSetStencilWriteMask' (commandBufferHandle (commandBuffer)) (faceMask) (writeMask)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdSetStencilReference- :: FunPtr (Ptr CommandBuffer_T -> StencilFaceFlags -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> StencilFaceFlags -> Word32 -> IO ()---- | vkCmdSetStencilReference - Set the stencil reference dynamic state------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @faceMask@ is a bitmask of--- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlagBits'--- specifying the set of stencil state for which to update the--- reference value, as described above for 'cmdSetStencilCompareMask'.------ - @reference@ is the new value to use as the stencil reference value.------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @faceMask@ /must/ be a valid combination of--- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlagBits'--- values------ - @faceMask@ /must/ not be @0@------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlags'-cmdSetStencilReference :: CommandBuffer -> ("faceMask" ::: StencilFaceFlags) -> ("reference" ::: Word32) -> IO ()-cmdSetStencilReference commandBuffer faceMask reference = do- let vkCmdSetStencilReference' = mkVkCmdSetStencilReference (pVkCmdSetStencilReference (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdSetStencilReference' (commandBufferHandle (commandBuffer)) (faceMask) (reference)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdBindDescriptorSets- :: FunPtr (Ptr CommandBuffer_T -> PipelineBindPoint -> PipelineLayout -> Word32 -> Word32 -> Ptr DescriptorSet -> Word32 -> Ptr Word32 -> IO ()) -> Ptr CommandBuffer_T -> PipelineBindPoint -> PipelineLayout -> Word32 -> Word32 -> Ptr DescriptorSet -> Word32 -> Ptr Word32 -> IO ()---- | vkCmdBindDescriptorSets - Binds descriptor sets to a command buffer------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- that the descriptor sets will be bound to.------ - 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- is a--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- indicating whether the descriptors will be used by graphics--- pipelines or compute pipelines. There is a separate set of bind--- points for each of graphics and compute, so binding one does not--- disturb the other.------ - @layout@ is a 'Graphics.Vulkan.Core10.Handles.PipelineLayout' object--- used to program the bindings.------ - @firstSet@ is the set number of the first descriptor set to be--- bound.------ - @descriptorSetCount@ is the number of elements in the--- @pDescriptorSets@ array.------ - @pDescriptorSets@ is a pointer to an array of handles to--- 'Graphics.Vulkan.Core10.Handles.DescriptorSet' objects describing--- the descriptor sets to write to.------ - @dynamicOffsetCount@ is the number of dynamic offsets in the--- @pDynamicOffsets@ array.------ - @pDynamicOffsets@ is a pointer to an array of @uint32_t@ values--- specifying dynamic offsets.------ = Description------ 'cmdBindDescriptorSets' causes the sets numbered [@firstSet@..--- @firstSet@+@descriptorSetCount@-1] to use the bindings stored in--- @pDescriptorSets@[0..descriptorSetCount-1] for subsequent rendering--- commands (either compute or graphics, according to the--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'). Any--- bindings that were previously applied via these sets are no longer--- valid.------ Once bound, a descriptor set affects rendering of subsequent graphics or--- compute commands in the command buffer until a different set is bound to--- the same set number, or else until the set is disturbed as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility Pipeline Layout Compatibility>.------ A compatible descriptor set /must/ be bound for all set numbers that any--- shaders in a pipeline access, at the time that a draw or dispatch--- command is recorded to execute using that pipeline. However, if none of--- the shaders in a pipeline statically use any bindings with a particular--- set number, then no descriptor set need be bound for that set number,--- even if the pipeline layout includes a non-trivial descriptor set layout--- for that set number.------ If any of the sets being bound include dynamic uniform or storage--- buffers, then @pDynamicOffsets@ includes one element for each array--- element in each dynamic descriptor type binding in each set. Values are--- taken from @pDynamicOffsets@ in an order such that all entries for set N--- come before set N+1; within a set, entries are ordered by the binding--- numbers in the descriptor set layouts; and within a binding array,--- elements are in order. @dynamicOffsetCount@ /must/ equal the total--- number of dynamic descriptors in the sets being bound.------ The effective offset used for dynamic uniform and storage buffer--- bindings is the sum of the relative offset taken from @pDynamicOffsets@,--- and the base address of the buffer plus base offset in the descriptor--- set. The range of the dynamic uniform and storage buffer bindings is the--- buffer range as specified in the descriptor set.------ Each of the @pDescriptorSets@ /must/ be compatible with the pipeline--- layout specified by @layout@. The layout used to program the bindings--- /must/ also be compatible with the pipeline used in subsequent graphics--- or compute commands, as defined in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility Pipeline Layout Compatibility>--- section.------ The descriptor set contents bound by a call to 'cmdBindDescriptorSets'--- /may/ be consumed at the following times:------ - For descriptor bindings created with the--- 'Graphics.Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT'--- bit set, the contents /may/ be consumed when the command buffer is--- submitted to a queue, or during shader execution of the resulting--- draws and dispatches, or any time in between. Otherwise,------ - during host execution of the command, or during shader execution of--- the resulting draws and dispatches, or any time in between.------ Thus, the contents of a descriptor set binding /must/ not be altered--- (overwritten by an update command, or freed) between the first point in--- time that it /may/ be consumed, and when the command completes executing--- on the queue.------ The contents of @pDynamicOffsets@ are consumed immediately during--- execution of 'cmdBindDescriptorSets'. Once all pending uses have--- completed, it is legal to update and reuse a descriptor set.------ == Valid Usage------ - Each element of @pDescriptorSets@ /must/ have been allocated with a--- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' that matches--- (is the same as, or identically defined as) the--- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' at set /n/ in--- @layout@, where /n/ is the sum of @firstSet@ and the index into--- @pDescriptorSets@------ - @dynamicOffsetCount@ /must/ be equal to the total number of dynamic--- descriptors in @pDescriptorSets@------ - The sum of @firstSet@ and @descriptorSetCount@ /must/ be less than--- or equal to--- 'Graphics.Vulkan.Core10.PipelineLayout.PipelineLayoutCreateInfo'::@setLayoutCount@--- provided when @layout@ was created------ - 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- /must/ be supported by the--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'’s parent--- 'Graphics.Vulkan.Core10.Handles.CommandPool'’s queue family------ - Each element of @pDynamicOffsets@ which corresponds to a descriptor--- binding with type--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC'--- /must/ be a multiple of--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@minUniformBufferOffsetAlignment@------ - Each element of @pDynamicOffsets@ which corresponds to a descriptor--- binding with type--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'--- /must/ be a multiple of--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@minStorageBufferOffsetAlignment@------ - For each dynamic uniform or storage buffer binding in--- @pDescriptorSets@, the sum of the effective offset, as defined--- above, and the range of the binding /must/ be less than or equal to--- the size of the buffer------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- value------ - @layout@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' handle------ - @pDescriptorSets@ /must/ be a valid pointer to an array of--- @descriptorSetCount@ valid--- 'Graphics.Vulkan.Core10.Handles.DescriptorSet' handles------ - If @dynamicOffsetCount@ is not @0@, @pDynamicOffsets@ /must/ be a--- valid pointer to an array of @dynamicOffsetCount@ @uint32_t@ values------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations------ - @descriptorSetCount@ /must/ be greater than @0@------ - Each of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', @layout@,--- and the elements of @pDescriptorSets@ /must/ have been created,--- allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.DescriptorSet',--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint',--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout'-cmdBindDescriptorSets :: CommandBuffer -> PipelineBindPoint -> PipelineLayout -> ("firstSet" ::: Word32) -> ("descriptorSets" ::: Vector DescriptorSet) -> ("dynamicOffsets" ::: Vector Word32) -> IO ()-cmdBindDescriptorSets commandBuffer pipelineBindPoint layout firstSet descriptorSets dynamicOffsets = evalContT $ do- let vkCmdBindDescriptorSets' = mkVkCmdBindDescriptorSets (pVkCmdBindDescriptorSets (deviceCmds (commandBuffer :: CommandBuffer)))- pPDescriptorSets <- ContT $ allocaBytesAligned @DescriptorSet ((Data.Vector.length (descriptorSets)) * 8) 8- lift $ Data.Vector.imapM_ (\i e -> poke (pPDescriptorSets `plusPtr` (8 * (i)) :: Ptr DescriptorSet) (e)) (descriptorSets)- pPDynamicOffsets <- ContT $ allocaBytesAligned @Word32 ((Data.Vector.length (dynamicOffsets)) * 4) 4- lift $ Data.Vector.imapM_ (\i e -> poke (pPDynamicOffsets `plusPtr` (4 * (i)) :: Ptr Word32) (e)) (dynamicOffsets)- lift $ vkCmdBindDescriptorSets' (commandBufferHandle (commandBuffer)) (pipelineBindPoint) (layout) (firstSet) ((fromIntegral (Data.Vector.length $ (descriptorSets)) :: Word32)) (pPDescriptorSets) ((fromIntegral (Data.Vector.length $ (dynamicOffsets)) :: Word32)) (pPDynamicOffsets)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdBindIndexBuffer- :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> IndexType -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> IndexType -> IO ()---- | vkCmdBindIndexBuffer - Bind an index buffer to a command buffer------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.------ - 'Graphics.Vulkan.Core10.Handles.Buffer' is the buffer being bound.------ - @offset@ is the starting offset in bytes within--- 'Graphics.Vulkan.Core10.Handles.Buffer' used in index buffer address--- calculations.------ - 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' is a--- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' value specifying--- whether indices are treated as 16 bits or 32 bits.------ == Valid Usage------ - @offset@ /must/ be less than the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'------ - The sum of @offset@ and the address of the range of--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object that is backing--- 'Graphics.Vulkan.Core10.Handles.Buffer', /must/ be a multiple of the--- type indicated by 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType'------ - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ have been created--- with the--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDEX_BUFFER_BIT'--- flag------ - If 'Graphics.Vulkan.Core10.Handles.Buffer' is non-sparse then it--- /must/ be bound completely and contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' /must/ not be--- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_NONE_NV'.------ - If 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' is--- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT8_EXT', the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-indexTypeUint8 indexTypeUint8>--- feature /must/ be enabled------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle------ - 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' value------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - Both of 'Graphics.Vulkan.Core10.Handles.Buffer', and--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ have been--- created, allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.Buffer',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.BaseType.DeviceSize',--- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType'-cmdBindIndexBuffer :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> IndexType -> IO ()-cmdBindIndexBuffer commandBuffer buffer offset indexType = do- let vkCmdBindIndexBuffer' = mkVkCmdBindIndexBuffer (pVkCmdBindIndexBuffer (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdBindIndexBuffer' (commandBufferHandle (commandBuffer)) (buffer) (offset) (indexType)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdBindVertexBuffers- :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Buffer -> Ptr DeviceSize -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Buffer -> Ptr DeviceSize -> IO ()---- | vkCmdBindVertexBuffers - Bind vertex buffers to a command buffer------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.------ - @firstBinding@ is the index of the first vertex input binding whose--- state is updated by the command.------ - @bindingCount@ is the number of vertex input bindings whose state is--- updated by the command.------ - @pBuffers@ is a pointer to an array of buffer handles.------ - @pOffsets@ is a pointer to an array of buffer offsets.------ = Description------ The values taken from elements i of @pBuffers@ and @pOffsets@ replace--- the current state for the vertex input binding @firstBinding@ + i, for i--- in [0, @bindingCount@). The vertex input binding is updated to start at--- the offset indicated by @pOffsets@[i] from the start of the buffer--- @pBuffers@[i]. All vertex input attributes that use each of these--- bindings will use these updated addresses in their address calculations--- for subsequent draw commands.------ == Valid Usage------ - @firstBinding@ /must/ be less than--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxVertexInputBindings@------ - The sum of @firstBinding@ and @bindingCount@ /must/ be less than or--- equal to--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxVertexInputBindings@------ - All elements of @pOffsets@ /must/ be less than the size of the--- corresponding element in @pBuffers@------ - All elements of @pBuffers@ /must/ have been created with the--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_VERTEX_BUFFER_BIT'--- flag------ - Each element of @pBuffers@ that is non-sparse /must/ be bound--- completely and contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @pBuffers@ /must/ be a valid pointer to an array of @bindingCount@--- valid 'Graphics.Vulkan.Core10.Handles.Buffer' handles------ - @pOffsets@ /must/ be a valid pointer to an array of @bindingCount@--- 'Graphics.Vulkan.Core10.BaseType.DeviceSize' values------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - @bindingCount@ /must/ be greater than @0@------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and the--- elements of @pBuffers@ /must/ have been created, allocated, or--- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.Buffer',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdBindVertexBuffers :: CommandBuffer -> ("firstBinding" ::: Word32) -> ("buffers" ::: Vector Buffer) -> ("offsets" ::: Vector DeviceSize) -> IO ()-cmdBindVertexBuffers commandBuffer firstBinding buffers offsets = evalContT $ do- let vkCmdBindVertexBuffers' = mkVkCmdBindVertexBuffers (pVkCmdBindVertexBuffers (deviceCmds (commandBuffer :: CommandBuffer)))- let pBuffersLength = Data.Vector.length $ (buffers)- let pOffsetsLength = Data.Vector.length $ (offsets)- lift $ unless (pOffsetsLength == pBuffersLength) $- throwIO $ IOError Nothing InvalidArgument "" "pOffsets and pBuffers must have the same length" Nothing Nothing- pPBuffers <- ContT $ allocaBytesAligned @Buffer ((Data.Vector.length (buffers)) * 8) 8- lift $ Data.Vector.imapM_ (\i e -> poke (pPBuffers `plusPtr` (8 * (i)) :: Ptr Buffer) (e)) (buffers)- pPOffsets <- ContT $ allocaBytesAligned @DeviceSize ((Data.Vector.length (offsets)) * 8) 8- lift $ Data.Vector.imapM_ (\i e -> poke (pPOffsets `plusPtr` (8 * (i)) :: Ptr DeviceSize) (e)) (offsets)- lift $ vkCmdBindVertexBuffers' (commandBufferHandle (commandBuffer)) (firstBinding) ((fromIntegral pBuffersLength :: Word32)) (pPBuffers) (pPOffsets)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdDraw- :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> Word32 -> Word32 -> IO ()---- | vkCmdDraw - Draw primitives------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.------ - @vertexCount@ is the number of vertices to draw.------ - @instanceCount@ is the number of instances to draw.------ - @firstVertex@ is the index of the first vertex to draw.------ - @firstInstance@ is the instance ID of the first instance to draw.------ = Description------ When the command is executed, primitives are assembled using the current--- primitive topology and @vertexCount@ consecutive vertex indices with the--- first @vertexIndex@ value equal to @firstVertex@. The primitives are--- drawn @instanceCount@ times with @instanceIndex@ starting with--- @firstInstance@ and increasing sequentially for each instance. The--- assembled primitives execute the bound graphics pipeline.------ == Valid Usage------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with--- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' as a result of--- this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is accessed using--- atomic operations as a result of this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as--- a result of this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'------ - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as--- a result of this command /must/ have a--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and--- format that supports cubic filtering, as specified by--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@--- returned by--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'------ - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT'--- with a reduction mode of either--- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN'--- or--- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX'--- as a result of this command /must/ have a--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and--- format that supports cubic filtering together with minmax filtering,--- as specified by--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@--- returned by--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'------ - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'--- sampled as a result of this command /must/ only be sampled using a--- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'--- of--- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.------ - For each set /n/ that is statically used by the--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible--- for set /n/, with the--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the--- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>------ - For each push constant that is statically used by the--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible--- for push constants, with the--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the--- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>------ - Descriptors in each bound descriptor set, specified via--- 'cmdBindDescriptorSets', /must/ be valid if they are statically used--- by the 'Graphics.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 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.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--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command, since that pipeline was--- bound------ - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.Vulkan.Core10.Handles.Sampler' object that uses--- unnormalized coordinates, that sampler /must/ not be used to sample--- from any 'Graphics.Vulkan.Core10.Handles.Image' with a--- 'Graphics.Vulkan.Core10.Handles.ImageView' of the type--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY'--- or--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY',--- in any shader stage------ - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.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--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>--- feature is not enabled, and if the--- 'Graphics.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--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>--- feature is not enabled, and if the--- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource------ - The current render pass /must/ be--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>--- with the 'Graphics.Vulkan.Core10.Handles.RenderPass' member of the--- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'--- structure specified when creating the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'--- structure specified when creating the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to--- 'Graphics.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--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_multiview.PhysicalDeviceMultiviewProperties'::@maxMultiviewInstanceIndex@.------ - If the bound graphics pipeline was created with--- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@--- set to 'Graphics.Vulkan.Core10.BaseType.TRUE' and the current--- subpass has a depth\/stencil attachment, then that attachment /must/--- have been created with the--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT'--- bit set------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, any resource written to by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be an--- unprotected resource------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, pipeline stages other than the framebuffer-space and--- compute stages in the 'Graphics.Vulkan.Core10.Handles.Pipeline'--- object bound to the pipeline bind point /must/ not write to any--- resource------ - All vertex input bindings accessed via vertex input variables--- declared in the vertex shader entry point’s interface /must/ have--- valid buffers bound------ - For a given vertex buffer binding, any attribute data fetched /must/--- be entirely contained within the corresponding vertex buffer--- binding, as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fxvertex-input ???>------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.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 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Inside | Graphics | Graphics |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdDraw :: CommandBuffer -> ("vertexCount" ::: Word32) -> ("instanceCount" ::: Word32) -> ("firstVertex" ::: Word32) -> ("firstInstance" ::: Word32) -> IO ()-cmdDraw commandBuffer vertexCount instanceCount firstVertex firstInstance = do- let vkCmdDraw' = mkVkCmdDraw (pVkCmdDraw (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdDraw' (commandBufferHandle (commandBuffer)) (vertexCount) (instanceCount) (firstVertex) (firstInstance)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdDrawIndexed- :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> IO ()---- | vkCmdDrawIndexed - Issue an indexed draw into a command buffer------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.------ - @indexCount@ is the number of vertices to draw.------ - @instanceCount@ is the number of instances to draw.------ - @firstIndex@ is the base index within the index buffer.------ - @vertexOffset@ is the value added to the vertex index before--- indexing into the vertex buffer.------ - @firstInstance@ is the instance ID of the first instance to draw.------ = Description------ When the command is executed, primitives are assembled using the current--- primitive topology and @indexCount@ vertices whose indices are retrieved--- from the index buffer. The index buffer is treated as an array of--- tightly packed unsigned integers of size defined by the--- 'cmdBindIndexBuffer'::'Graphics.Vulkan.Core10.Enums.IndexType.IndexType'--- parameter with which the buffer was bound.------ The first vertex index is at an offset of @firstIndex@ * @indexSize@ +--- @offset@ within the bound index buffer, where @offset@ is the offset--- specified by 'cmdBindIndexBuffer' and @indexSize@ is the byte size of--- the type specified by--- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType'. Subsequent index--- values are retrieved from consecutive locations in the index buffer.--- Indices are first compared to the primitive restart value, then zero--- extended to 32 bits (if the--- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' is--- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT8_EXT' or--- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT16') and have--- @vertexOffset@ added to them, before being supplied as the @vertexIndex@--- value.------ The primitives are drawn @instanceCount@ times with @instanceIndex@--- starting with @firstInstance@ and increasing sequentially for each--- instance. The assembled primitives execute the bound graphics pipeline.------ == Valid Usage------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with--- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' as a result of--- this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is accessed using--- atomic operations as a result of this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as--- a result of this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'------ - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as--- a result of this command /must/ have a--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and--- format that supports cubic filtering, as specified by--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@--- returned by--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'------ - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT'--- with a reduction mode of either--- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN'--- or--- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX'--- as a result of this command /must/ have a--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and--- format that supports cubic filtering together with minmax filtering,--- as specified by--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@--- returned by--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'------ - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'--- sampled as a result of this command /must/ only be sampled using a--- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'--- of--- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.------ - For each set /n/ that is statically used by the--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible--- for set /n/, with the--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the--- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>------ - For each push constant that is statically used by the--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible--- for push constants, with the--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the--- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>------ - Descriptors in each bound descriptor set, specified via--- 'cmdBindDescriptorSets', /must/ be valid if they are statically used--- by the 'Graphics.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 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.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--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command, since that pipeline was--- bound------ - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.Vulkan.Core10.Handles.Sampler' object that uses--- unnormalized coordinates, that sampler /must/ not be used to sample--- from any 'Graphics.Vulkan.Core10.Handles.Image' with a--- 'Graphics.Vulkan.Core10.Handles.ImageView' of the type--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY'--- or--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY',--- in any shader stage------ - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.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--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>--- feature is not enabled, and if the--- 'Graphics.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--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>--- feature is not enabled, and if the--- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource------ - The current render pass /must/ be--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>--- with the 'Graphics.Vulkan.Core10.Handles.RenderPass' member of the--- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'--- structure specified when creating the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'--- structure specified when creating the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to--- 'Graphics.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--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_multiview.PhysicalDeviceMultiviewProperties'::@maxMultiviewInstanceIndex@.------ - If the bound graphics pipeline was created with--- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@--- set to 'Graphics.Vulkan.Core10.BaseType.TRUE' and the current--- subpass has a depth\/stencil attachment, then that attachment /must/--- have been created with the--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT'--- bit set------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, any resource written to by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be an--- unprotected resource------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, pipeline stages other than the framebuffer-space and--- compute stages in the 'Graphics.Vulkan.Core10.Handles.Pipeline'--- object bound to the pipeline bind point /must/ not write to any--- resource------ - All vertex input bindings accessed via vertex input variables--- declared in the vertex shader entry point’s interface /must/ have--- valid buffers bound------ - For a given vertex buffer binding, any attribute data fetched /must/--- be entirely contained within the corresponding vertex buffer--- binding, as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fxvertex-input ???>------ - (@indexSize@ * (@firstIndex@ + @indexCount@) + @offset@) /must/ be--- less than or equal to the size of the bound index buffer, with--- @indexSize@ being based on the type specified by--- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType', where the index--- buffer, 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType', and--- @offset@ are specified via 'cmdBindIndexBuffer'------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.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 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Inside | Graphics | Graphics |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdDrawIndexed :: CommandBuffer -> ("indexCount" ::: Word32) -> ("instanceCount" ::: Word32) -> ("firstIndex" ::: Word32) -> ("vertexOffset" ::: Int32) -> ("firstInstance" ::: Word32) -> IO ()-cmdDrawIndexed commandBuffer indexCount instanceCount firstIndex vertexOffset firstInstance = do- let vkCmdDrawIndexed' = mkVkCmdDrawIndexed (pVkCmdDrawIndexed (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdDrawIndexed' (commandBufferHandle (commandBuffer)) (indexCount) (instanceCount) (firstIndex) (vertexOffset) (firstInstance)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdDrawIndirect- :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Word32 -> Word32 -> IO ()---- | vkCmdDrawIndirect - Issue an indirect draw into a command buffer------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.------ - 'Graphics.Vulkan.Core10.Handles.Buffer' is the buffer containing--- draw parameters.------ - @offset@ is the byte offset into--- 'Graphics.Vulkan.Core10.Handles.Buffer' where parameters begin.------ - @drawCount@ is the number of draws to execute, and /can/ be zero.------ - @stride@ is the byte stride between successive sets of draw--- parameters.------ = Description------ 'cmdDrawIndirect' behaves similarly to 'cmdDraw' 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 'Graphics.Vulkan.Core10.Handles.Buffer' starting at @offset@ and--- increasing by @stride@ bytes for each successive draw. The parameters of--- each draw are encoded in an array of--- 'Graphics.Vulkan.Core10.OtherTypes.DrawIndirectCommand' structures. If--- @drawCount@ is less than or equal to one, @stride@ is ignored.------ == Valid Usage------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with--- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' as a result of--- this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is accessed using--- atomic operations as a result of this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as--- a result of this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'------ - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as--- a result of this command /must/ have a--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and--- format that supports cubic filtering, as specified by--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@--- returned by--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'------ - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT'--- with a reduction mode of either--- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN'--- or--- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX'--- as a result of this command /must/ have a--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and--- format that supports cubic filtering together with minmax filtering,--- as specified by--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@--- returned by--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'------ - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'--- sampled as a result of this command /must/ only be sampled using a--- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'--- of--- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.------ - For each set /n/ that is statically used by the--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible--- for set /n/, with the--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the--- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>------ - For each push constant that is statically used by the--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible--- for push constants, with the--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the--- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>------ - Descriptors in each bound descriptor set, specified via--- 'cmdBindDescriptorSets', /must/ be valid if they are statically used--- by the 'Graphics.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 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.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--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command, since that pipeline was--- bound------ - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.Vulkan.Core10.Handles.Sampler' object that uses--- unnormalized coordinates, that sampler /must/ not be used to sample--- from any 'Graphics.Vulkan.Core10.Handles.Image' with a--- 'Graphics.Vulkan.Core10.Handles.ImageView' of the type--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY'--- or--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY',--- in any shader stage------ - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.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--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>--- feature is not enabled, and if the--- 'Graphics.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--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>--- feature is not enabled, and if the--- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource------ - The current render pass /must/ be--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>--- with the 'Graphics.Vulkan.Core10.Handles.RenderPass' member of the--- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'--- structure specified when creating the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'--- structure specified when creating the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to--- 'Graphics.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--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_multiview.PhysicalDeviceMultiviewProperties'::@maxMultiviewInstanceIndex@.------ - If the bound graphics pipeline was created with--- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@--- set to 'Graphics.Vulkan.Core10.BaseType.TRUE' and the current--- subpass has a depth\/stencil attachment, then that attachment /must/--- have been created with the--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT'--- bit set------ - All vertex input bindings accessed via vertex input variables--- declared in the vertex shader entry point’s interface /must/ have--- valid buffers bound------ - For a given vertex buffer binding, any attribute data fetched /must/--- be entirely contained within the corresponding vertex buffer--- binding, as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fxvertex-input ???>------ - If 'Graphics.Vulkan.Core10.Handles.Buffer' is non-sparse then it--- /must/ be bound completely and contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ have been created--- with the--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT'--- bit set------ - @offset@ /must/ be a multiple of @4@------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be a--- protected command buffer------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-multiDrawIndirect multi-draw indirect>--- feature is not enabled, @drawCount@ /must/ be @0@ or @1@------ - @drawCount@ /must/ be less than or equal to--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxDrawIndirectCount@------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-drawIndirectFirstInstance drawIndirectFirstInstance>--- feature is not enabled, all the @firstInstance@ members of the--- 'Graphics.Vulkan.Core10.OtherTypes.DrawIndirectCommand' structures--- accessed by this command /must/ be @0@------ - If @drawCount@ is greater than @1@, @stride@ /must/ be a multiple of--- @4@ and /must/ be greater than or equal to--- @sizeof@('Graphics.Vulkan.Core10.OtherTypes.DrawIndirectCommand')------ - If @drawCount@ is equal to @1@, (@offset@ +--- @sizeof@('Graphics.Vulkan.Core10.OtherTypes.DrawIndirectCommand'))--- /must/ be less than or equal to the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'------ - If @drawCount@ is greater than @1@, (@stride@ × (@drawCount@ - 1) +--- @offset@ +--- @sizeof@('Graphics.Vulkan.Core10.OtherTypes.DrawIndirectCommand'))--- /must/ be less than or equal to the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - This command /must/ only be called inside of a render pass instance------ - Both of 'Graphics.Vulkan.Core10.Handles.Buffer', and--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ have been--- created, allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Inside | Graphics | Graphics |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.Buffer',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdDrawIndirect :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()-cmdDrawIndirect commandBuffer buffer offset drawCount stride = do- let vkCmdDrawIndirect' = mkVkCmdDrawIndirect (pVkCmdDrawIndirect (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdDrawIndirect' (commandBufferHandle (commandBuffer)) (buffer) (offset) (drawCount) (stride)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdDrawIndexedIndirect- :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Word32 -> Word32 -> IO ()---- | vkCmdDrawIndexedIndirect - Perform an indexed indirect draw------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.------ - 'Graphics.Vulkan.Core10.Handles.Buffer' is the buffer containing--- draw parameters.------ - @offset@ is the byte offset into--- 'Graphics.Vulkan.Core10.Handles.Buffer' where parameters begin.------ - @drawCount@ is the number of draws to execute, and /can/ be zero.------ - @stride@ is the byte stride between successive sets of draw--- parameters.------ = Description------ 'cmdDrawIndexedIndirect' behaves similarly to 'cmdDrawIndexed' 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 'Graphics.Vulkan.Core10.Handles.Buffer' starting--- at @offset@ and increasing by @stride@ bytes for each successive draw.--- The parameters of each draw are encoded in an array of--- 'Graphics.Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand'--- structures. If @drawCount@ is less than or equal to one, @stride@ is--- ignored.------ == Valid Usage------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with--- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' as a result of--- this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is accessed using--- atomic operations as a result of this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as--- a result of this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'------ - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as--- a result of this command /must/ have a--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and--- format that supports cubic filtering, as specified by--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@--- returned by--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'------ - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT'--- with a reduction mode of either--- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN'--- or--- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX'--- as a result of this command /must/ have a--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and--- format that supports cubic filtering together with minmax filtering,--- as specified by--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@--- returned by--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'------ - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'--- sampled as a result of this command /must/ only be sampled using a--- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'--- of--- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.------ - For each set /n/ that is statically used by the--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible--- for set /n/, with the--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the--- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>------ - For each push constant that is statically used by the--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible--- for push constants, with the--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the--- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>------ - Descriptors in each bound descriptor set, specified via--- 'cmdBindDescriptorSets', /must/ be valid if they are statically used--- by the 'Graphics.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 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.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--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command, since that pipeline was--- bound------ - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.Vulkan.Core10.Handles.Sampler' object that uses--- unnormalized coordinates, that sampler /must/ not be used to sample--- from any 'Graphics.Vulkan.Core10.Handles.Image' with a--- 'Graphics.Vulkan.Core10.Handles.ImageView' of the type--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY'--- or--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY',--- in any shader stage------ - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.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--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>--- feature is not enabled, and if the--- 'Graphics.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--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>--- feature is not enabled, and if the--- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource------ - The current render pass /must/ be--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>--- with the 'Graphics.Vulkan.Core10.Handles.RenderPass' member of the--- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'--- structure specified when creating the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'--- structure specified when creating the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to--- 'Graphics.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--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_multiview.PhysicalDeviceMultiviewProperties'::@maxMultiviewInstanceIndex@.------ - If the bound graphics pipeline was created with--- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@--- set to 'Graphics.Vulkan.Core10.BaseType.TRUE' and the current--- subpass has a depth\/stencil attachment, then that attachment /must/--- have been created with the--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT'--- bit set------ - All vertex input bindings accessed via vertex input variables--- declared in the vertex shader entry point’s interface /must/ have--- valid buffers bound------ - For a given vertex buffer binding, any attribute data fetched /must/--- be entirely contained within the corresponding vertex buffer--- binding, as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fxvertex-input ???>------ - If 'Graphics.Vulkan.Core10.Handles.Buffer' is non-sparse then it--- /must/ be bound completely and contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ have been created--- with the--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT'--- bit set------ - @offset@ /must/ be a multiple of @4@------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be a--- protected command buffer------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-multiDrawIndirect multi-draw indirect>--- feature is not enabled, @drawCount@ /must/ be @0@ or @1@------ - @drawCount@ /must/ be less than or equal to--- 'Graphics.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@('Graphics.Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand')------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-drawIndirectFirstInstance drawIndirectFirstInstance>--- feature is not enabled, all the @firstInstance@ members of the--- 'Graphics.Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand'--- structures accessed by this command /must/ be @0@------ - If @drawCount@ is equal to @1@, (@offset@ +--- @sizeof@('Graphics.Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand'))--- /must/ be less than or equal to the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'------ - If @drawCount@ is greater than @1@, (@stride@ × (@drawCount@ - 1) +--- @offset@ +--- @sizeof@('Graphics.Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand'))--- /must/ be less than or equal to the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'------ - If--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-drawIndirectCount drawIndirectCount>--- is not enabled this function /must/ not be used------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - This command /must/ only be called inside of a render pass instance------ - Both of 'Graphics.Vulkan.Core10.Handles.Buffer', and--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ have been--- created, allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Inside | Graphics | Graphics |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.Buffer',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdDrawIndexedIndirect :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()-cmdDrawIndexedIndirect commandBuffer buffer offset drawCount stride = do- let vkCmdDrawIndexedIndirect' = mkVkCmdDrawIndexedIndirect (pVkCmdDrawIndexedIndirect (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdDrawIndexedIndirect' (commandBufferHandle (commandBuffer)) (buffer) (offset) (drawCount) (stride)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdDispatch- :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> Word32 -> IO ()---- | vkCmdDispatch - Dispatch compute work items------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @groupCountX@ is the number of local workgroups to dispatch in the X--- dimension.------ - @groupCountY@ is the number of local workgroups to dispatch in the Y--- dimension.------ - @groupCountZ@ is the number of local workgroups to dispatch in the Z--- dimension.------ = Description------ When the command is executed, a global workgroup consisting of--- @groupCountX@ × @groupCountY@ × @groupCountZ@ local workgroups is--- assembled.------ == Valid Usage------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with--- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' as a result of--- this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is accessed using--- atomic operations as a result of this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as--- a result of this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'------ - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as--- a result of this command /must/ have a--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and--- format that supports cubic filtering, as specified by--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@--- returned by--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'------ - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT'--- with a reduction mode of either--- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN'--- or--- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX'--- as a result of this command /must/ have a--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and--- format that supports cubic filtering together with minmax filtering,--- as specified by--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@--- returned by--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'------ - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'--- sampled as a result of this command /must/ only be sampled using a--- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'--- of--- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.------ - For each set /n/ that is statically used by the--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible--- for set /n/, with the--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the--- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>------ - For each push constant that is statically used by the--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible--- for push constants, with the--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the--- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>------ - Descriptors in each bound descriptor set, specified via--- 'cmdBindDescriptorSets', /must/ be valid if they are statically used--- by the 'Graphics.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 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.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--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command, since that pipeline was--- bound------ - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.Vulkan.Core10.Handles.Sampler' object that uses--- unnormalized coordinates, that sampler /must/ not be used to sample--- from any 'Graphics.Vulkan.Core10.Handles.Image' with a--- 'Graphics.Vulkan.Core10.Handles.ImageView' of the type--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY'--- or--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY',--- in any shader stage------ - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.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--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>--- feature is not enabled, and if the--- 'Graphics.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--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>--- feature is not enabled, and if the--- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, any resource written to by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be an--- unprotected resource------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, pipeline stages other than the framebuffer-space and--- compute stages in the 'Graphics.Vulkan.Core10.Handles.Pipeline'--- object bound to the pipeline bind point /must/ not write to any--- resource------ - @groupCountX@ /must/ be less than or equal to--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxComputeWorkGroupCount@[0]------ - @groupCountY@ /must/ be less than or equal to--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxComputeWorkGroupCount@[1]------ - @groupCountZ@ /must/ be less than or equal to--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxComputeWorkGroupCount@[2]------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support compute operations------ - This command /must/ only be called outside of a render pass instance------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Compute | Compute |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdDispatch :: CommandBuffer -> ("groupCountX" ::: Word32) -> ("groupCountY" ::: Word32) -> ("groupCountZ" ::: Word32) -> IO ()-cmdDispatch commandBuffer groupCountX groupCountY groupCountZ = do- let vkCmdDispatch' = mkVkCmdDispatch (pVkCmdDispatch (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdDispatch' (commandBufferHandle (commandBuffer)) (groupCountX) (groupCountY) (groupCountZ)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdDispatchIndirect- :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> IO ()---- | vkCmdDispatchIndirect - Dispatch compute work items using indirect--- parameters------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - 'Graphics.Vulkan.Core10.Handles.Buffer' is the buffer containing--- dispatch parameters.------ - @offset@ is the byte offset into--- 'Graphics.Vulkan.Core10.Handles.Buffer' where parameters begin.------ = Description------ 'cmdDispatchIndirect' behaves similarly to 'cmdDispatch' except that the--- parameters are read by the device from a buffer during execution. The--- parameters of the dispatch are encoded in a--- 'Graphics.Vulkan.Core10.OtherTypes.DispatchIndirectCommand' structure--- taken from 'Graphics.Vulkan.Core10.Handles.Buffer' starting at @offset@.------ == Valid Usage------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with--- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' as a result of--- this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is accessed using--- atomic operations as a result of this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'------ - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as--- a result of this command, then the image view’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>--- /must/ contain--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'------ - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as--- a result of this command /must/ have a--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and--- format that supports cubic filtering, as specified by--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@--- returned by--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'------ - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT'--- with a reduction mode of either--- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN'--- or--- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX'--- as a result of this command /must/ have a--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and--- format that supports cubic filtering together with minmax filtering,--- as specified by--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@--- returned by--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'------ - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'--- sampled as a result of this command /must/ only be sampled using a--- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'--- of--- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.------ - For each set /n/ that is statically used by the--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible--- for set /n/, with the--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the--- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>------ - For each push constant that is statically used by the--- 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible--- for push constants, with the--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the--- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>------ - Descriptors in each bound descriptor set, specified via--- 'cmdBindDescriptorSets', /must/ be valid if they are statically used--- by the 'Graphics.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 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.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--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command, since that pipeline was--- bound------ - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.Vulkan.Core10.Handles.Sampler' object that uses--- unnormalized coordinates, that sampler /must/ not be used to sample--- from any 'Graphics.Vulkan.Core10.Handles.Image' with a--- 'Graphics.Vulkan.Core10.Handles.ImageView' of the type--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY',--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY'--- or--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY',--- in any shader stage------ - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command accesses a--- 'Graphics.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--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>--- feature is not enabled, and if the--- 'Graphics.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--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>--- feature is not enabled, and if the--- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource------ - If 'Graphics.Vulkan.Core10.Handles.Buffer' is non-sparse then it--- /must/ be bound completely and contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ have been created--- with the--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT'--- bit set------ - @offset@ /must/ be a multiple of @4@------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be a--- protected command buffer------ - The sum of @offset@ and the size of--- 'Graphics.Vulkan.Core10.OtherTypes.DispatchIndirectCommand' /must/--- be less than or equal to the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support compute operations------ - This command /must/ only be called outside of a render pass instance------ - Both of 'Graphics.Vulkan.Core10.Handles.Buffer', and--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ have been--- created, allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Compute | Compute |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.Buffer',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdDispatchIndirect :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> IO ()-cmdDispatchIndirect commandBuffer buffer offset = do- let vkCmdDispatchIndirect' = mkVkCmdDispatchIndirect (pVkCmdDispatchIndirect (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdDispatchIndirect' (commandBufferHandle (commandBuffer)) (buffer) (offset)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdCopyBuffer- :: FunPtr (Ptr CommandBuffer_T -> Buffer -> Buffer -> Word32 -> Ptr BufferCopy -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> Buffer -> Word32 -> Ptr BufferCopy -> IO ()---- | vkCmdCopyBuffer - Copy data between buffer regions------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @srcBuffer@ is the source buffer.------ - @dstBuffer@ is the destination buffer.------ - @regionCount@ is the number of regions to copy.------ - @pRegions@ is a pointer to an array of 'BufferCopy' structures--- specifying the regions to copy.------ = Description------ Each region in @pRegions@ is copied from the source buffer to the same--- region of the destination buffer. @srcBuffer@ and @dstBuffer@ /can/ be--- the same buffer or alias the same memory, but the resulting values are--- undefined if the copy regions overlap in memory.------ == Valid Usage------ - The @srcOffset@ member of each element of @pRegions@ /must/ be less--- than the size of @srcBuffer@------ - The @dstOffset@ member of each element of @pRegions@ /must/ be less--- than the size of @dstBuffer@------ - The @size@ member of each element of @pRegions@ /must/ be less than--- or equal to the size of @srcBuffer@ minus @srcOffset@------ - The @size@ member of each element of @pRegions@ /must/ be less than--- or equal to the size of @dstBuffer@ minus @dstOffset@------ - The union of the source regions, and the union of the destination--- regions, specified by the elements of @pRegions@, /must/ not overlap--- in memory------ - @srcBuffer@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_SRC_BIT'--- usage flag------ - If @srcBuffer@ is non-sparse then it /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - @dstBuffer@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'--- usage flag------ - If @dstBuffer@ is non-sparse then it /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @srcBuffer@ /must/ not be a protected buffer------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @dstBuffer@ /must/ not be a protected buffer------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, then @dstBuffer@ /must/ not be an unprotected buffer------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @srcBuffer@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle------ - @dstBuffer@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle------ - @pRegions@ /must/ be a valid pointer to an array of @regionCount@--- valid 'BufferCopy' structures------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support transfer, graphics, or compute operations------ - This command /must/ only be called outside of a render pass instance------ - @regionCount@ /must/ be greater than @0@------ - Each of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', @dstBuffer@,--- and @srcBuffer@ /must/ have been created, allocated, or retrieved--- from the same 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Transfer | Transfer |--- | Secondary | | Graphics | |--- | | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.Buffer', 'BufferCopy',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdCopyBuffer :: CommandBuffer -> ("srcBuffer" ::: Buffer) -> ("dstBuffer" ::: Buffer) -> ("regions" ::: Vector BufferCopy) -> IO ()-cmdCopyBuffer commandBuffer srcBuffer dstBuffer regions = evalContT $ do- let vkCmdCopyBuffer' = mkVkCmdCopyBuffer (pVkCmdCopyBuffer (deviceCmds (commandBuffer :: CommandBuffer)))- pPRegions <- ContT $ allocaBytesAligned @BufferCopy ((Data.Vector.length (regions)) * 24) 8- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRegions `plusPtr` (24 * (i)) :: Ptr BufferCopy) (e) . ($ ())) (regions)- lift $ vkCmdCopyBuffer' (commandBufferHandle (commandBuffer)) (srcBuffer) (dstBuffer) ((fromIntegral (Data.Vector.length $ (regions)) :: Word32)) (pPRegions)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdCopyImage- :: FunPtr (Ptr CommandBuffer_T -> Image -> ImageLayout -> Image -> ImageLayout -> Word32 -> Ptr ImageCopy -> IO ()) -> Ptr CommandBuffer_T -> Image -> ImageLayout -> Image -> ImageLayout -> Word32 -> Ptr ImageCopy -> IO ()---- | vkCmdCopyImage - Copy data between images------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @srcImage@ is the source image.------ - @srcImageLayout@ is the current layout of the source image--- subresource.------ - @dstImage@ is the destination image.------ - @dstImageLayout@ is the current layout of the destination image--- subresource.------ - @regionCount@ is the number of regions to copy.------ - @pRegions@ is a pointer to an array of 'ImageCopy' structures--- specifying the regions to copy.------ = Description------ Each region in @pRegions@ is copied from the source image to the same--- region of the destination image. @srcImage@ and @dstImage@ /can/ be the--- same image or alias the same memory.------ The formats of @srcImage@ and @dstImage@ /must/ be compatible. Formats--- are compatible if they share the same class, as shown in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatibility Compatible Formats>--- table. Depth\/stencil formats /must/ match exactly.------ If the format of @srcImage@ or @dstImage@ is a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>,--- regions of each plane to be copied /must/ be specified separately using--- the @srcSubresource@ and @dstSubresource@ members of the 'ImageCopy'--- structure. In this case, the @aspectMask@ of the @srcSubresource@ or--- @dstSubresource@ that refers to the multi-planar image /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',--- or--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'.--- For the purposes of 'cmdCopyImage', each plane of a multi-planar image--- is treated as having the format listed in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatible-planes>--- for the plane identified by the @aspectMask@ of the corresponding--- subresource. This applies both to--- 'Graphics.Vulkan.Core10.Enums.Format.Format' and to coordinates used in--- the copy, which correspond to texels in the /plane/ rather than how--- these texels map to coordinates in the image as a whole.------ Note------ For example, the--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT'--- plane of a--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_G8_B8R8_2PLANE_420_UNORM'--- image is compatible with an image of format--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_R8G8_UNORM' and (less--- usefully) with the--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT'--- plane of an image of format--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16',--- as each texel is 2 bytes in size.------ 'cmdCopyImage' allows copying between /size-compatible/ compressed and--- uncompressed internal formats. Formats are size-compatible if the texel--- block size of the uncompressed format is equal to the texel block size--- of the compressed format. Such a copy does not perform on-the-fly--- compression or decompression. When copying from an uncompressed format--- to a compressed format, each texel of uncompressed data of the source--- image is copied as a raw value to the corresponding compressed texel--- block of the destination image. When copying from a compressed format to--- an uncompressed format, each compressed texel block of the source image--- is copied as a raw value to the corresponding texel of uncompressed data--- in the destination image. Thus, for example, it is legal to copy between--- a 128-bit uncompressed format and a compressed format which has a--- 128-bit sized compressed texel block representing 4×4 texels (using 8--- bits per texel), or between a 64-bit uncompressed format and a--- compressed format which has a 64-bit sized compressed texel block--- representing 4×4 texels (using 4 bits per texel).------ When copying between compressed and uncompressed formats the @extent@--- members represent the texel dimensions of the source image and not the--- destination. When copying from a compressed image to an uncompressed--- image the image texel dimensions written to the uncompressed image will--- be source extent divided by the compressed texel block dimensions. When--- copying from an uncompressed image to a compressed image the image texel--- dimensions written to the compressed image will be the source extent--- multiplied by the compressed texel block dimensions. In both cases the--- number of bytes read and the number of bytes written will be identical.------ Copying to or from block-compressed images is typically done in--- multiples of the compressed texel block size. For this reason the--- @extent@ /must/ be a multiple of the compressed texel block dimension.--- There is one exception to this rule which is /required/ to handle--- compressed images created with dimensions that are not a multiple of the--- compressed texel block dimensions: if the @srcImage@ is compressed,--- then:------ - If @extent.width@ is not a multiple of the compressed texel block--- width, then (@extent.width@ + @srcOffset.x@) /must/ equal the image--- subresource width.------ - If @extent.height@ is not a multiple of the compressed texel block--- height, then (@extent.height@ + @srcOffset.y@) /must/ equal the--- image subresource height.------ - If @extent.depth@ is not a multiple of the compressed texel block--- depth, then (@extent.depth@ + @srcOffset.z@) /must/ equal the image--- subresource depth.------ Similarly, if the @dstImage@ is compressed, then:------ - If @extent.width@ is not a multiple of the compressed texel block--- width, then (@extent.width@ + @dstOffset.x@) /must/ equal the image--- subresource width.------ - If @extent.height@ is not a multiple of the compressed texel block--- height, then (@extent.height@ + @dstOffset.y@) /must/ equal the--- image subresource height.------ - If @extent.depth@ is not a multiple of the compressed texel block--- depth, then (@extent.depth@ + @dstOffset.z@) /must/ equal the image--- subresource depth.------ This allows the last compressed texel block of the image in each--- non-multiple dimension to be included as a source or destination of the--- copy.------ “@_422@” image formats that are not--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar>--- are treated as having a 2×1 compressed texel block for the purposes of--- these rules.------ 'cmdCopyImage' /can/ be used to copy image data between multisample--- images, but both images /must/ have the same number of samples.------ == Valid Usage------ - The source region specified by each element of @pRegions@ /must/ be--- a region that is contained within @srcImage@ if the @srcImage@’s--- 'Graphics.Vulkan.Core10.Enums.Format.Format' is not a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,--- and /must/ be a region that is contained within the plane being--- copied if the @srcImage@’s--- 'Graphics.Vulkan.Core10.Enums.Format.Format' is a multi-planar--- format------ - The destination region specified by each element of @pRegions@--- /must/ be a region that is contained within @dstImage@ if the--- @dstImage@’s 'Graphics.Vulkan.Core10.Enums.Format.Format' is not a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,--- and /must/ be a region that is contained within the plane being--- copied to if the @dstImage@’s--- 'Graphics.Vulkan.Core10.Enums.Format.Format' is a multi-planar--- format------ - The union of all source regions, and the union of all destination--- regions, specified by the elements of @pRegions@, /must/ not overlap--- in memory------ - The--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>--- of @srcImage@ /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_TRANSFER_SRC_BIT'.------ - @srcImage@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_SRC_BIT'--- usage flag------ - If @srcImage@ is non-sparse then the image or /disjoint/ plane to be--- copied /must/ be bound completely and contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - @srcImageLayout@ /must/ specify the layout of the image subresources--- of @srcImage@ specified in @pRegions@ at the time this command is--- executed on a 'Graphics.Vulkan.Core10.Handles.Device'------ - @srcImageLayout@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL', or--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR'------ - The--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>--- of @dstImage@ /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_TRANSFER_DST_BIT'.------ - @dstImage@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'--- usage flag------ - If @dstImage@ is non-sparse then the image or /disjoint/ plane that--- is the destination of the copy /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - @dstImageLayout@ /must/ specify the layout of the image subresources--- of @dstImage@ specified in @pRegions@ at the time this command is--- executed on a 'Graphics.Vulkan.Core10.Handles.Device'------ - @dstImageLayout@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL', or--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR'------ - If the 'Graphics.Vulkan.Core10.Enums.Format.Format' of each of--- @srcImage@ and @dstImage@ is not a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,--- the 'Graphics.Vulkan.Core10.Enums.Format.Format' of each of--- @srcImage@ and @dstImage@ /must/ be compatible, as defined--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#copies-images-format-compatibility above>------ - In a copy to or from a plane of a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image>,--- the 'Graphics.Vulkan.Core10.Enums.Format.Format' of the image and--- plane /must/ be compatible according to--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatible-planes the description of compatible planes>--- for the plane being copied------ - When a copy is performed to or from an image with a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,--- the @aspectMask@ of the @srcSubresource@ and\/or @dstSubresource@--- that refers to the multi-planar image /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',--- or--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'--- (with--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'--- valid only for a 'Graphics.Vulkan.Core10.Enums.Format.Format' with--- three planes)------ - The sample count of @srcImage@ and @dstImage@ /must/ match------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @srcImage@ /must/ not be a protected image------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @dstImage@ /must/ not be a protected image------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, then @dstImage@ /must/ not be an unprotected image------ - The @srcSubresource.mipLevel@ member of each element of @pRegions@--- /must/ be less than the @mipLevels@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was--- created------ - The @dstSubresource.mipLevel@ member of each element of @pRegions@--- /must/ be less than the @mipLevels@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was--- created------ - The @srcSubresource.baseArrayLayer@ + @srcSubresource.layerCount@ of--- each element of @pRegions@ /must/ be less than or equal to the--- @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was--- created------ - The @dstSubresource.baseArrayLayer@ + @dstSubresource.layerCount@ of--- each element of @pRegions@ /must/ be less than or equal to the--- @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was--- created------ - The @srcOffset@ and @extent@ members of each element of @pRegions@--- /must/ respect the image transfer granularity requirements of--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'’s command pool’s--- queue family, as described in--- 'Graphics.Vulkan.Core10.DeviceInitialization.QueueFamilyProperties'------ - The @dstOffset@ and @extent@ members of each element of @pRegions@--- /must/ respect the image transfer granularity requirements of--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'’s command pool’s--- queue family, as described in--- 'Graphics.Vulkan.Core10.DeviceInitialization.QueueFamilyProperties'------ - @dstImage@ and @srcImage@ /must/ not have been created with--- 'Graphics.Vulkan.Core10.BaseType.Flags' containing--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @srcImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'--- handle------ - @srcImageLayout@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value------ - @dstImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'--- handle------ - @dstImageLayout@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value------ - @pRegions@ /must/ be a valid pointer to an array of @regionCount@--- valid 'ImageCopy' structures------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support transfer, graphics, or compute operations------ - This command /must/ only be called outside of a render pass instance------ - @regionCount@ /must/ be greater than @0@------ - Each of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', @dstImage@,--- and @srcImage@ /must/ have been created, allocated, or retrieved--- from the same 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Transfer | Transfer |--- | Secondary | | Graphics | |--- | | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.Image', 'ImageCopy',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout'-cmdCopyImage :: CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector ImageCopy) -> IO ()-cmdCopyImage commandBuffer srcImage srcImageLayout dstImage dstImageLayout regions = evalContT $ do- let vkCmdCopyImage' = mkVkCmdCopyImage (pVkCmdCopyImage (deviceCmds (commandBuffer :: CommandBuffer)))- pPRegions <- ContT $ allocaBytesAligned @ImageCopy ((Data.Vector.length (regions)) * 68) 4- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRegions `plusPtr` (68 * (i)) :: Ptr ImageCopy) (e) . ($ ())) (regions)- lift $ vkCmdCopyImage' (commandBufferHandle (commandBuffer)) (srcImage) (srcImageLayout) (dstImage) (dstImageLayout) ((fromIntegral (Data.Vector.length $ (regions)) :: Word32)) (pPRegions)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdBlitImage- :: FunPtr (Ptr CommandBuffer_T -> Image -> ImageLayout -> Image -> ImageLayout -> Word32 -> Ptr ImageBlit -> Filter -> IO ()) -> Ptr CommandBuffer_T -> Image -> ImageLayout -> Image -> ImageLayout -> Word32 -> Ptr ImageBlit -> Filter -> IO ()---- | vkCmdBlitImage - Copy regions of an image, potentially performing format--- conversion,------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @srcImage@ is the source image.------ - @srcImageLayout@ is the layout of the source image subresources for--- the blit.------ - @dstImage@ is the destination image.------ - @dstImageLayout@ is the layout of the destination image subresources--- for the blit.------ - @regionCount@ is the number of regions to blit.------ - @pRegions@ is a pointer to an array of 'ImageBlit' structures--- specifying the regions to blit.------ - 'Graphics.Vulkan.Core10.Enums.Filter.Filter' is a--- 'Graphics.Vulkan.Core10.Enums.Filter.Filter' specifying the filter--- to apply if the blits require scaling.------ = Description------ 'cmdBlitImage' /must/ not be used for multisampled source or destination--- images. Use 'cmdResolveImage' for this purpose.------ As the sizes of the source and destination extents /can/ differ in any--- dimension, texels in the source extent are scaled and filtered to the--- destination extent. Scaling occurs via the following operations:------ - For each destination texel, the integer coordinate of that texel is--- converted to an unnormalized texture coordinate, using the effective--- inverse of the equations described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#textures-unnormalized-to-integer unnormalized to integer conversion>:------ - ubase = i + ½------ - vbase = j + ½------ - wbase = k + ½------ - These base coordinates are then offset by the first destination--- offset:------ - uoffset = ubase - xdst0------ - voffset = vbase - ydst0------ - woffset = wbase - zdst0------ - aoffset = a - @baseArrayCount@dst------ - The scale is determined from the source and destination regions, and--- applied to the offset coordinates:------ - scale_u = (xsrc1 - xsrc0) \/ (xdst1 - xdst0)------ - scale_v = (ysrc1 - ysrc0) \/ (ydst1 - ydst0)------ - scale_w = (zsrc1 - zsrc0) \/ (zdst1 - zdst0)------ - uscaled = uoffset * scaleu------ - vscaled = voffset * scalev------ - wscaled = woffset * scalew------ - Finally the source offset is added to the scaled coordinates, to--- determine the final unnormalized coordinates used to sample from--- @srcImage@:------ - u = uscaled + xsrc0------ - v = vscaled + ysrc0------ - w = wscaled + zsrc0------ - q = @mipLevel@------ - a = aoffset + @baseArrayCount@src------ These coordinates are used to sample from the source image, as described--- in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#textures Image Operations chapter>,--- with the filter mode equal to that of--- 'Graphics.Vulkan.Core10.Enums.Filter.Filter', a mipmap mode of--- 'Graphics.Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_NEAREST'--- and an address mode of--- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.--- Implementations /must/ clamp at the edge of the source image, and /may/--- additionally clamp to the edge of the source region.------ Note------ Due to allowable rounding errors in the generation of the source texture--- coordinates, it is not always possible to guarantee exactly which source--- texels will be sampled for a given blit. As rounding errors are--- implementation dependent, the exact results of a blitting operation are--- also implementation dependent.------ Blits are done layer by layer starting with the @baseArrayLayer@ member--- of @srcSubresource@ for the source and @dstSubresource@ for the--- destination. @layerCount@ layers are blitted to the destination image.------ 3D textures are blitted slice by slice. Slices in the source region--- bounded by @srcOffsets@[0].z and @srcOffsets@[1].z are copied to slices--- in the destination region bounded by @dstOffsets@[0].z and--- @dstOffsets@[1].z. For each destination slice, a source __z__ coordinate--- is linearly interpolated between @srcOffsets@[0].z and--- @srcOffsets@[1].z. If the 'Graphics.Vulkan.Core10.Enums.Filter.Filter'--- parameter is 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' then--- the value sampled from the source image is taken by doing linear--- filtering using the interpolated __z__ coordinate. If--- 'Graphics.Vulkan.Core10.Enums.Filter.Filter' parameter is--- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_NEAREST' then the value--- sampled from the source image is taken from the single nearest slice,--- with an implementation-dependent arithmetic rounding mode.------ The following filtering and conversion rules apply:------ - Integer formats /can/ only be converted to other integer formats--- with the same signedness.------ - No format conversion is supported between depth\/stencil images. The--- formats /must/ match.------ - Format conversions on unorm, snorm, unscaled and packed float--- formats of the copied aspect of the image are performed by first--- converting the pixels to float values.------ - For sRGB source formats, nonlinear RGB values are converted to--- linear representation prior to filtering.------ - After filtering, the float values are first clamped and then cast to--- the destination image format. In case of sRGB destination format,--- linear RGB values are converted to nonlinear representation before--- writing the pixel to the image.------ Signed and unsigned integers are converted by first clamping to the--- representable range of the destination format, then casting the value.------ == Valid Usage------ - The source region specified by each element of @pRegions@ /must/ be--- a region that is contained within @srcImage@------ - The destination region specified by each element of @pRegions@--- /must/ be a region that is contained within @dstImage@------ - The union of all destination regions, specified by the elements of--- @pRegions@, /must/ not overlap in memory with any texel that /may/--- be sampled during the blit operation------ - The--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>--- of @srcImage@ /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_BLIT_SRC_BIT'.------ - @srcImage@ /must/ not use a format listed in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion>------ - @srcImage@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_SRC_BIT'--- usage flag------ - If @srcImage@ is non-sparse then it /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - @srcImageLayout@ /must/ specify the layout of the image subresources--- of @srcImage@ specified in @pRegions@ at the time this command is--- executed on a 'Graphics.Vulkan.Core10.Handles.Device'------ - @srcImageLayout@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL'--- or 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL'------ - The--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>--- of @dstImage@ /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_BLIT_DST_BIT'.------ - @dstImage@ /must/ not use a format listed in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion>------ - @dstImage@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'--- usage flag------ - If @dstImage@ is non-sparse then it /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - @dstImageLayout@ /must/ specify the layout of the image subresources--- of @dstImage@ specified in @pRegions@ at the time this command is--- executed on a 'Graphics.Vulkan.Core10.Handles.Device'------ - @dstImageLayout@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'--- or 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL'------ - The sample count of @srcImage@ and @dstImage@ /must/ both be equal--- to--- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'------ - If either of @srcImage@ or @dstImage@ was created with a signed--- integer 'Graphics.Vulkan.Core10.Enums.Format.Format', the other--- /must/ also have been created with a signed integer--- 'Graphics.Vulkan.Core10.Enums.Format.Format'------ - If either of @srcImage@ or @dstImage@ was created with an unsigned--- integer 'Graphics.Vulkan.Core10.Enums.Format.Format', the other--- /must/ also have been created with an unsigned integer--- 'Graphics.Vulkan.Core10.Enums.Format.Format'------ - If either of @srcImage@ or @dstImage@ was created with a--- depth\/stencil format, the other /must/ have exactly the same format------ - If @srcImage@ was created with a depth\/stencil format,--- 'Graphics.Vulkan.Core10.Enums.Filter.Filter' /must/ be--- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_NEAREST'------ - @srcImage@ /must/ have been created with a @samples@ value of--- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'------ - @dstImage@ /must/ have been created with a @samples@ value of--- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'------ - If 'Graphics.Vulkan.Core10.Enums.Filter.Filter' is--- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR', then the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>--- of @srcImage@ /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'.------ - If 'Graphics.Vulkan.Core10.Enums.Filter.Filter' is--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT',--- then the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>--- of @srcImage@ /must/ contain--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'.------ - If 'Graphics.Vulkan.Core10.Enums.Filter.Filter' is--- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT',--- @srcImage@ /must/ have a--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' of--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D'------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @srcImage@ /must/ not be a protected image------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @dstImage@ /must/ not be a protected image------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, then @dstImage@ /must/ not be an unprotected image------ - The @srcSubresource.mipLevel@ member of each element of @pRegions@--- /must/ be less than the @mipLevels@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was--- created------ - The @dstSubresource.mipLevel@ member of each element of @pRegions@--- /must/ be less than the @mipLevels@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was--- created------ - The @srcSubresource.baseArrayLayer@ + @srcSubresource.layerCount@ of--- each element of @pRegions@ /must/ be less than or equal to the--- @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was--- created------ - The @dstSubresource.baseArrayLayer@ + @dstSubresource.layerCount@ of--- each element of @pRegions@ /must/ be less than or equal to the--- @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was--- created------ - @dstImage@ and @srcImage@ /must/ not have been created with--- 'Graphics.Vulkan.Core10.BaseType.Flags' containing--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @srcImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'--- handle------ - @srcImageLayout@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value------ - @dstImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'--- handle------ - @dstImageLayout@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value------ - @pRegions@ /must/ be a valid pointer to an array of @regionCount@--- valid 'ImageBlit' structures------ - 'Graphics.Vulkan.Core10.Enums.Filter.Filter' /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.Filter.Filter' value------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - This command /must/ only be called outside of a render pass instance------ - @regionCount@ /must/ be greater than @0@------ - Each of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', @dstImage@,--- and @srcImage@ /must/ have been created, allocated, or retrieved--- from the same 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Graphics | Transfer |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Enums.Filter.Filter',--- 'Graphics.Vulkan.Core10.Handles.Image', 'ImageBlit',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout'-cmdBlitImage :: CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector ImageBlit) -> Filter -> IO ()-cmdBlitImage commandBuffer srcImage srcImageLayout dstImage dstImageLayout regions filter' = evalContT $ do- let vkCmdBlitImage' = mkVkCmdBlitImage (pVkCmdBlitImage (deviceCmds (commandBuffer :: CommandBuffer)))- pPRegions <- ContT $ allocaBytesAligned @ImageBlit ((Data.Vector.length (regions)) * 80) 4- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRegions `plusPtr` (80 * (i)) :: Ptr ImageBlit) (e) . ($ ())) (regions)- lift $ vkCmdBlitImage' (commandBufferHandle (commandBuffer)) (srcImage) (srcImageLayout) (dstImage) (dstImageLayout) ((fromIntegral (Data.Vector.length $ (regions)) :: Word32)) (pPRegions) (filter')- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdCopyBufferToImage- :: FunPtr (Ptr CommandBuffer_T -> Buffer -> Image -> ImageLayout -> Word32 -> Ptr BufferImageCopy -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> Image -> ImageLayout -> Word32 -> Ptr BufferImageCopy -> IO ()---- | vkCmdCopyBufferToImage - Copy data from a buffer into an image------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @srcBuffer@ is the source buffer.------ - @dstImage@ is the destination image.------ - @dstImageLayout@ is the layout of the destination image subresources--- for the copy.------ - @regionCount@ is the number of regions to copy.------ - @pRegions@ is a pointer to an array of 'BufferImageCopy' structures--- specifying the regions to copy.------ = Description------ Each region in @pRegions@ is copied from the specified region of the--- source buffer to the specified region of the destination image.------ If the format of @dstImage@ is a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>),--- regions of each plane to be a target of a copy /must/ be specified--- separately using the @pRegions@ member of the 'BufferImageCopy'--- structure. In this case, the @aspectMask@ of--- 'Graphics.Vulkan.Core10.Image.ImageSubresource' /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',--- or--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'.--- For the purposes of 'cmdCopyBufferToImage', each plane of a multi-planar--- image is treated as having the format listed in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatible-planes>--- for the plane identified by the @aspectMask@ of the corresponding--- subresource. This applies both to--- 'Graphics.Vulkan.Core10.Enums.Format.Format' and to coordinates used in--- the copy, which correspond to texels in the /plane/ rather than how--- these texels map to coordinates in the image as a whole.------ == Valid Usage------ - @srcBuffer@ /must/ be large enough to contain all buffer locations--- that are accessed according to--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#copies-buffers-images-addressing Buffer and Image Addressing>,--- for each element of @pRegions@------ - The image region specified by each element of @pRegions@ /must/ be a--- region that is contained within @dstImage@ if the @dstImage@’s--- 'Graphics.Vulkan.Core10.Enums.Format.Format' is not a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,--- and /must/ be a region that is contained within the plane being--- copied to if the @dstImage@’s--- 'Graphics.Vulkan.Core10.Enums.Format.Format' is a multi-planar--- format------ - The union of all source regions, and the union of all destination--- regions, specified by the elements of @pRegions@, /must/ not overlap--- in memory------ - @srcBuffer@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_SRC_BIT'--- usage flag------ - The--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>--- of @dstImage@ /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_TRANSFER_DST_BIT'.------ - If @srcBuffer@ is non-sparse then it /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - @dstImage@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'--- usage flag------ - If @dstImage@ is non-sparse then it /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - @dstImage@ /must/ have a sample count equal to--- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'------ - @dstImageLayout@ /must/ specify the layout of the image subresources--- of @dstImage@ specified in @pRegions@ at the time this command is--- executed on a 'Graphics.Vulkan.Core10.Handles.Device'------ - @dstImageLayout@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL', or--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR'------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @srcBuffer@ /must/ not be a protected buffer------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @dstImage@ /must/ not be a protected image------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, then @dstImage@ /must/ not be an unprotected image------ - The @imageSubresource.mipLevel@ member of each element of @pRegions@--- /must/ be less than the @mipLevels@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was--- created------ - The @imageSubresource.baseArrayLayer@ +--- @imageSubresource.layerCount@ of each element of @pRegions@ /must/--- be less than or equal to the @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was--- created------ - The @imageOffset@ and @imageExtent@ members of each element of--- @pRegions@ /must/ respect the image transfer granularity--- requirements of 'Graphics.Vulkan.Core10.Handles.CommandBuffer'’s--- command pool’s queue family, as described in--- 'Graphics.Vulkan.Core10.DeviceInitialization.QueueFamilyProperties'------ - @dstImage@ /must/ not have been created with--- 'Graphics.Vulkan.Core10.BaseType.Flags' containing--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @srcBuffer@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle------ - @dstImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'--- handle------ - @dstImageLayout@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value------ - @pRegions@ /must/ be a valid pointer to an array of @regionCount@--- valid 'BufferImageCopy' structures------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support transfer, graphics, or compute operations------ - This command /must/ only be called outside of a render pass instance------ - @regionCount@ /must/ be greater than @0@------ - Each of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', @dstImage@,--- and @srcBuffer@ /must/ have been created, allocated, or retrieved--- from the same 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Transfer | Transfer |--- | Secondary | | Graphics | |--- | | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.Buffer', 'BufferImageCopy',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.Image',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout'-cmdCopyBufferToImage :: CommandBuffer -> ("srcBuffer" ::: Buffer) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector BufferImageCopy) -> IO ()-cmdCopyBufferToImage commandBuffer srcBuffer dstImage dstImageLayout regions = evalContT $ do- let vkCmdCopyBufferToImage' = mkVkCmdCopyBufferToImage (pVkCmdCopyBufferToImage (deviceCmds (commandBuffer :: CommandBuffer)))- pPRegions <- ContT $ allocaBytesAligned @BufferImageCopy ((Data.Vector.length (regions)) * 56) 8- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRegions `plusPtr` (56 * (i)) :: Ptr BufferImageCopy) (e) . ($ ())) (regions)- lift $ vkCmdCopyBufferToImage' (commandBufferHandle (commandBuffer)) (srcBuffer) (dstImage) (dstImageLayout) ((fromIntegral (Data.Vector.length $ (regions)) :: Word32)) (pPRegions)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdCopyImageToBuffer- :: FunPtr (Ptr CommandBuffer_T -> Image -> ImageLayout -> Buffer -> Word32 -> Ptr BufferImageCopy -> IO ()) -> Ptr CommandBuffer_T -> Image -> ImageLayout -> Buffer -> Word32 -> Ptr BufferImageCopy -> IO ()---- | vkCmdCopyImageToBuffer - Copy image data into a buffer------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @srcImage@ is the source image.------ - @srcImageLayout@ is the layout of the source image subresources for--- the copy.------ - @dstBuffer@ is the destination buffer.------ - @regionCount@ is the number of regions to copy.------ - @pRegions@ is a pointer to an array of 'BufferImageCopy' structures--- specifying the regions to copy.------ = Description------ Each region in @pRegions@ is copied from the specified region of the--- source image to the specified region of the destination buffer.------ If the 'Graphics.Vulkan.Core10.Enums.Format.Format' of @srcImage@ is a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>,--- regions of each plane to be a source of a copy /must/ be specified--- separately using the @pRegions@ member of the 'BufferImageCopy'--- structure. In this case, the @aspectMask@ of--- 'Graphics.Vulkan.Core10.Image.ImageSubresource' /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',--- or--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'.--- For the purposes of 'cmdCopyBufferToImage', each plane of a multi-planar--- image is treated as having the format listed in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatible-planes>--- for the plane identified by the @aspectMask@ of the corresponding--- subresource. This applies both to--- 'Graphics.Vulkan.Core10.Enums.Format.Format' and to coordinates used in--- the copy, which correspond to texels in the /plane/ rather than how--- these texels map to coordinates in the image as a whole.------ == Valid Usage------ - The image region specified by each element of @pRegions@ /must/ be a--- region that is contained within @srcImage@ if the @srcImage@’s--- 'Graphics.Vulkan.Core10.Enums.Format.Format' is not a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,--- and /must/ be a region that is contained within the plane being--- copied if the @srcImage@’s--- 'Graphics.Vulkan.Core10.Enums.Format.Format' is a multi-planar--- format------ - @dstBuffer@ /must/ be large enough to contain all buffer locations--- that are accessed according to--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#copies-buffers-images-addressing Buffer and Image Addressing>,--- for each element of @pRegions@------ - The union of all source regions, and the union of all destination--- regions, specified by the elements of @pRegions@, /must/ not overlap--- in memory------ - The--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>--- of @srcImage@ /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_TRANSFER_SRC_BIT'.------ - @srcImage@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_SRC_BIT'--- usage flag------ - If @srcImage@ is non-sparse then it /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - @srcImage@ /must/ have a sample count equal to--- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'------ - @srcImageLayout@ /must/ specify the layout of the image subresources--- of @srcImage@ specified in @pRegions@ at the time this command is--- executed on a 'Graphics.Vulkan.Core10.Handles.Device'------ - @srcImageLayout@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL'--- or 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL'------ - @dstBuffer@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'--- usage flag------ - If @dstBuffer@ is non-sparse then it /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @srcImage@ /must/ not be a protected image------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @dstBuffer@ /must/ not be a protected buffer------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, then @dstBuffer@ /must/ not be an unprotected buffer------ - The @imageSubresource.mipLevel@ member of each element of @pRegions@--- /must/ be less than the @mipLevels@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was--- created------ - The @imageSubresource.baseArrayLayer@ +--- @imageSubresource.layerCount@ of each element of @pRegions@ /must/--- be less than or equal to the @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was--- created------ - The @imageOffset@ and @imageExtent@ members of each element of--- @pRegions@ /must/ respect the image transfer granularity--- requirements of 'Graphics.Vulkan.Core10.Handles.CommandBuffer'’s--- command pool’s queue family, as described in--- 'Graphics.Vulkan.Core10.DeviceInitialization.QueueFamilyProperties'------ - @srcImage@ /must/ not have been created with--- 'Graphics.Vulkan.Core10.BaseType.Flags' containing--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @srcImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'--- handle------ - @srcImageLayout@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value------ - @dstBuffer@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle------ - @pRegions@ /must/ be a valid pointer to an array of @regionCount@--- valid 'BufferImageCopy' structures------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support transfer, graphics, or compute operations------ - This command /must/ only be called outside of a render pass instance------ - @regionCount@ /must/ be greater than @0@------ - Each of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', @dstBuffer@,--- and @srcImage@ /must/ have been created, allocated, or retrieved--- from the same 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Transfer | Transfer |--- | Secondary | | Graphics | |--- | | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.Buffer', 'BufferImageCopy',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.Image',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout'-cmdCopyImageToBuffer :: CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstBuffer" ::: Buffer) -> ("regions" ::: Vector BufferImageCopy) -> IO ()-cmdCopyImageToBuffer commandBuffer srcImage srcImageLayout dstBuffer regions = evalContT $ do- let vkCmdCopyImageToBuffer' = mkVkCmdCopyImageToBuffer (pVkCmdCopyImageToBuffer (deviceCmds (commandBuffer :: CommandBuffer)))- pPRegions <- ContT $ allocaBytesAligned @BufferImageCopy ((Data.Vector.length (regions)) * 56) 8- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRegions `plusPtr` (56 * (i)) :: Ptr BufferImageCopy) (e) . ($ ())) (regions)- lift $ vkCmdCopyImageToBuffer' (commandBufferHandle (commandBuffer)) (srcImage) (srcImageLayout) (dstBuffer) ((fromIntegral (Data.Vector.length $ (regions)) :: Word32)) (pPRegions)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdUpdateBuffer- :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> DeviceSize -> Ptr () -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> DeviceSize -> Ptr () -> IO ()---- | vkCmdUpdateBuffer - Update a buffer’s contents from host memory------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @dstBuffer@ is a handle to the buffer to be updated.------ - @dstOffset@ is the byte offset into the buffer to start updating,--- and /must/ be a multiple of 4.------ - @dataSize@ is the number of bytes to update, and /must/ be a--- multiple of 4.------ - @pData@ is a pointer to the source data for the buffer update, and--- /must/ be at least @dataSize@ bytes in size.------ = Description------ @dataSize@ /must/ be less than or equal to 65536 bytes. For larger--- updates, applications /can/ use buffer to buffer--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#copies-buffers copies>.------ Note------ Buffer updates performed with 'cmdUpdateBuffer' first copy the data into--- command buffer memory when the command is recorded (which requires--- additional storage and may incur an additional allocation), and then--- copy the data from the command buffer into @dstBuffer@ when the command--- is executed on a device.------ The additional cost of this functionality compared to--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#copies-buffers buffer to buffer copies>--- means it is only recommended for very small amounts of data, and is why--- it is limited to only 65536 bytes.------ Applications /can/ work around this by issuing multiple--- 'cmdUpdateBuffer' commands to different ranges of the same buffer, but--- it is strongly recommended that they /should/ not.------ The source data is copied from the user pointer to the command buffer--- when the command is called.------ 'cmdUpdateBuffer' is only allowed outside of a render pass. This command--- is treated as “transfer” operation, for the purposes of synchronization--- barriers. The--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'--- /must/ be specified in @usage@ of--- 'Graphics.Vulkan.Core10.Buffer.BufferCreateInfo' in order for the buffer--- to be compatible with 'cmdUpdateBuffer'.------ == Valid Usage------ - @dstOffset@ /must/ be less than the size of @dstBuffer@------ - @dataSize@ /must/ be less than or equal to the size of @dstBuffer@--- minus @dstOffset@------ - @dstBuffer@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'--- usage flag------ - If @dstBuffer@ is non-sparse then it /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - @dstOffset@ /must/ be a multiple of @4@------ - @dataSize@ /must/ be less than or equal to @65536@------ - @dataSize@ /must/ be a multiple of @4@------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @dstBuffer@ /must/ not be a protected buffer------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, then @dstBuffer@ /must/ not be an unprotected buffer------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @dstBuffer@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle------ - @pData@ /must/ be a valid pointer to an array of @dataSize@ bytes------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support transfer, graphics, or compute operations------ - This command /must/ only be called outside of a render pass instance------ - @dataSize@ /must/ be greater than @0@------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- @dstBuffer@ /must/ have been created, allocated, or retrieved from--- the same 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Transfer | Transfer |--- | Secondary | | Graphics | |--- | | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.Buffer',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdUpdateBuffer :: CommandBuffer -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> ("dataSize" ::: DeviceSize) -> ("data" ::: Ptr ()) -> IO ()-cmdUpdateBuffer commandBuffer dstBuffer dstOffset dataSize data' = do- let vkCmdUpdateBuffer' = mkVkCmdUpdateBuffer (pVkCmdUpdateBuffer (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdUpdateBuffer' (commandBufferHandle (commandBuffer)) (dstBuffer) (dstOffset) (dataSize) (data')- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdFillBuffer- :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> DeviceSize -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> DeviceSize -> Word32 -> IO ()---- | vkCmdFillBuffer - Fill a region of a buffer with a fixed value------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @dstBuffer@ is the buffer to be filled.------ - @dstOffset@ is the byte offset into the buffer at which to start--- filling, and /must/ be a multiple of 4.------ - @size@ is the number of bytes to fill, and /must/ be either a--- multiple of 4, or 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE'--- to fill the range from @offset@ to the end of the buffer. If--- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE' is used and the--- remaining size of the buffer is not a multiple of 4, then the--- nearest smaller multiple is used.------ - @data@ is the 4-byte word written repeatedly to the buffer to fill--- @size@ bytes of data. The data word is written to memory according--- to the host endianness.------ = Description------ 'cmdFillBuffer' is treated as “transfer” operation for the purposes of--- synchronization barriers. The--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'--- /must/ be specified in @usage@ of--- 'Graphics.Vulkan.Core10.Buffer.BufferCreateInfo' in order for the buffer--- to be compatible with 'cmdFillBuffer'.------ == Valid Usage------ - @dstOffset@ /must/ be less than the size of @dstBuffer@------ - @dstOffset@ /must/ be a multiple of @4@------ - If @size@ is not equal to--- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', @size@ /must/ be--- greater than @0@------ - If @size@ is not equal to--- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', @size@ /must/ be--- less than or equal to the size of @dstBuffer@ minus @dstOffset@------ - If @size@ is not equal to--- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', @size@ /must/ be a--- multiple of @4@------ - @dstBuffer@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'--- usage flag------ - If @dstBuffer@ is non-sparse then it /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @dstBuffer@ /must/ not be a protected buffer------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, then @dstBuffer@ /must/ not be an unprotected buffer------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @dstBuffer@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support transfer, graphics or compute operations------ - This command /must/ only be called outside of a render pass instance------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- @dstBuffer@ /must/ have been created, allocated, or retrieved from--- the same 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Transfer | Transfer |--- | Secondary | | Graphics | |--- | | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.Buffer',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdFillBuffer :: CommandBuffer -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> DeviceSize -> ("data" ::: Word32) -> IO ()-cmdFillBuffer commandBuffer dstBuffer dstOffset size data' = do- let vkCmdFillBuffer' = mkVkCmdFillBuffer (pVkCmdFillBuffer (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdFillBuffer' (commandBufferHandle (commandBuffer)) (dstBuffer) (dstOffset) (size) (data')- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdClearColorImage- :: FunPtr (Ptr CommandBuffer_T -> Image -> ImageLayout -> Ptr ClearColorValue -> Word32 -> Ptr ImageSubresourceRange -> IO ()) -> Ptr CommandBuffer_T -> Image -> ImageLayout -> Ptr ClearColorValue -> Word32 -> Ptr ImageSubresourceRange -> IO ()---- | vkCmdClearColorImage - Clear regions of a color image------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - 'Graphics.Vulkan.Core10.Handles.Image' is the image to be cleared.------ - 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' specifies the--- current layout of the image subresource ranges to be cleared, and--- /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL' or--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'.------ - @pColor@ is a pointer to a--- 'Graphics.Vulkan.Core10.SharedTypes.ClearColorValue' structure--- containing the values that the image subresource ranges will be--- cleared to (see--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#clears-values>--- below).------ - @rangeCount@ is the number of image subresource range structures in--- @pRanges@.------ - @pRanges@ is a pointer to an array of--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'--- structures describing a range of mipmap levels, array layers, and--- aspects to be cleared, as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-views Image Views>.------ = Description------ Each specified range in @pRanges@ is cleared to the value specified by--- @pColor@.------ == Valid Usage------ - The--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>--- of 'Graphics.Vulkan.Core10.Handles.Image' /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_TRANSFER_DST_BIT'.------ - 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'--- usage flag------ - 'Graphics.Vulkan.Core10.Handles.Image' /must/ not use a format--- listed in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion>------ - If 'Graphics.Vulkan.Core10.Handles.Image' is non-sparse then it--- /must/ be bound completely and contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' /must/--- specify the layout of the image subresource ranges of--- 'Graphics.Vulkan.Core10.Handles.Image' specified in @pRanges@ at the--- time this command is executed on a--- 'Graphics.Vulkan.Core10.Handles.Device'------ - 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL', or--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR'------ - The--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@aspectMask@--- members of the elements of the @pRanges@ array /must/ each only--- include--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT'------ - The--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@baseMipLevel@--- members of the elements of the @pRanges@ array /must/ each be less--- than the @mipLevels@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created------ - For each 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'--- element of @pRanges@, if the @levelCount@ member is not--- 'Graphics.Vulkan.Core10.APIConstants.REMAINING_MIP_LEVELS', then--- @baseMipLevel@ + @levelCount@ /must/ be less than the @mipLevels@--- specified in 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created------ - The--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@baseArrayLayer@--- members of the elements of the @pRanges@ array /must/ each be less--- than the @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created------ - For each 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'--- element of @pRanges@, if the @layerCount@ member is not--- 'Graphics.Vulkan.Core10.APIConstants.REMAINING_ARRAY_LAYERS', then--- @baseArrayLayer@ + @layerCount@ /must/ be less than the--- @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created------ - 'Graphics.Vulkan.Core10.Handles.Image' /must/ not have a compressed--- or depth\/stencil format------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then 'Graphics.Vulkan.Core10.Handles.Image' /must/--- not be a protected image------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, then 'Graphics.Vulkan.Core10.Handles.Image' /must/--- not be an unprotected image------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle------ - 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' /must/ be a--- valid 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value------ - @pColor@ /must/ be a valid pointer to a valid--- 'Graphics.Vulkan.Core10.SharedTypes.ClearColorValue' union------ - @pRanges@ /must/ be a valid pointer to an array of @rangeCount@--- valid 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'--- structures------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations------ - This command /must/ only be called outside of a render pass instance------ - @rangeCount@ /must/ be greater than @0@------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created,--- allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Graphics | Transfer |--- | Secondary | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.SharedTypes.ClearColorValue',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.Image',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout',--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'-cmdClearColorImage :: CommandBuffer -> Image -> ImageLayout -> ClearColorValue -> ("ranges" ::: Vector ImageSubresourceRange) -> IO ()-cmdClearColorImage commandBuffer image imageLayout color ranges = evalContT $ do- let vkCmdClearColorImage' = mkVkCmdClearColorImage (pVkCmdClearColorImage (deviceCmds (commandBuffer :: CommandBuffer)))- pColor <- ContT $ withCStruct (color)- pPRanges <- ContT $ allocaBytesAligned @ImageSubresourceRange ((Data.Vector.length (ranges)) * 20) 4- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRanges `plusPtr` (20 * (i)) :: Ptr ImageSubresourceRange) (e) . ($ ())) (ranges)- lift $ vkCmdClearColorImage' (commandBufferHandle (commandBuffer)) (image) (imageLayout) pColor ((fromIntegral (Data.Vector.length $ (ranges)) :: Word32)) (pPRanges)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdClearDepthStencilImage- :: FunPtr (Ptr CommandBuffer_T -> Image -> ImageLayout -> Ptr ClearDepthStencilValue -> Word32 -> Ptr ImageSubresourceRange -> IO ()) -> Ptr CommandBuffer_T -> Image -> ImageLayout -> Ptr ClearDepthStencilValue -> Word32 -> Ptr ImageSubresourceRange -> IO ()---- | vkCmdClearDepthStencilImage - Fill regions of a combined depth\/stencil--- image------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - 'Graphics.Vulkan.Core10.Handles.Image' is the image to be cleared.------ - 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' specifies the--- current layout of the image subresource ranges to be cleared, and--- /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL' or--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'.------ - @pDepthStencil@ is a pointer to a--- 'Graphics.Vulkan.Core10.SharedTypes.ClearDepthStencilValue'--- structure containing the values that the depth and stencil image--- subresource ranges will be cleared to (see--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#clears-values>--- below).------ - @rangeCount@ is the number of image subresource range structures in--- @pRanges@.------ - @pRanges@ is a pointer to an array of--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'--- structures describing a range of mipmap levels, array layers, and--- aspects to be cleared, as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-views Image Views>.------ == Valid Usage------ - The--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>--- of 'Graphics.Vulkan.Core10.Handles.Image' /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_TRANSFER_DST_BIT'.------ - If any element of @pRanges.aspect@ includes--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT',--- and 'Graphics.Vulkan.Core10.Handles.Image' was created with--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageStencilUsageCreateInfo separate stencil usage>,--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'--- /must/ have been included in the--- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage.ImageStencilUsageCreateInfo'::@stencilUsage@--- used to create 'Graphics.Vulkan.Core10.Handles.Image'------ - If any element of @pRanges.aspect@ includes--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT',--- and 'Graphics.Vulkan.Core10.Handles.Image' was not created with--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageStencilUsageCreateInfo separate stencil usage>,--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'--- /must/ have been included in the--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@usage@ used to--- create 'Graphics.Vulkan.Core10.Handles.Image'------ - If any element of @pRanges.aspect@ includes--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_DEPTH_BIT',--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'--- /must/ have been included in the--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@usage@ used to--- create 'Graphics.Vulkan.Core10.Handles.Image'------ - If 'Graphics.Vulkan.Core10.Handles.Image' is non-sparse then it--- /must/ be bound completely and contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' /must/--- specify the layout of the image subresource ranges of--- 'Graphics.Vulkan.Core10.Handles.Image' specified in @pRanges@ at the--- time this command is executed on a--- 'Graphics.Vulkan.Core10.Handles.Device'------ - 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' /must/ be--- either of--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'--- or 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL'------ - The--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@aspectMask@--- member of each element of the @pRanges@ array /must/ not include--- bits other than--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_DEPTH_BIT'--- or--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT'------ - If the 'Graphics.Vulkan.Core10.Handles.Image'’s format does not have--- a stencil component, then the--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@aspectMask@--- member of each element of the @pRanges@ array /must/ not include the--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT'--- bit------ - If the 'Graphics.Vulkan.Core10.Handles.Image'’s format does not have--- a depth component, then the--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@aspectMask@--- member of each element of the @pRanges@ array /must/ not include the--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_DEPTH_BIT'--- bit------ - The--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@baseMipLevel@--- members of the elements of the @pRanges@ array /must/ each be less--- than the @mipLevels@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created------ - For each 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'--- element of @pRanges@, if the @levelCount@ member is not--- 'Graphics.Vulkan.Core10.APIConstants.REMAINING_MIP_LEVELS', then--- @baseMipLevel@ + @levelCount@ /must/ be less than the @mipLevels@--- specified in 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created------ - The--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@baseArrayLayer@--- members of the elements of the @pRanges@ array /must/ each be less--- than the @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created------ - For each 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'--- element of @pRanges@, if the @layerCount@ member is not--- 'Graphics.Vulkan.Core10.APIConstants.REMAINING_ARRAY_LAYERS', then--- @baseArrayLayer@ + @layerCount@ /must/ be less than the--- @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created------ - 'Graphics.Vulkan.Core10.Handles.Image' /must/ have a depth\/stencil--- format------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then 'Graphics.Vulkan.Core10.Handles.Image' /must/--- not be a protected image------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, then 'Graphics.Vulkan.Core10.Handles.Image' /must/--- not be an unprotected image------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle------ - 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' /must/ be a--- valid 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value------ - @pDepthStencil@ /must/ be a valid pointer to a valid--- 'Graphics.Vulkan.Core10.SharedTypes.ClearDepthStencilValue'--- structure------ - @pRanges@ /must/ be a valid pointer to an array of @rangeCount@--- valid 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'--- structures------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - This command /must/ only be called outside of a render pass instance------ - @rangeCount@ /must/ be greater than @0@------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created,--- allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Graphics | Transfer |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.SharedTypes.ClearDepthStencilValue',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.Image',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout',--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'-cmdClearDepthStencilImage :: CommandBuffer -> Image -> ImageLayout -> ClearDepthStencilValue -> ("ranges" ::: Vector ImageSubresourceRange) -> IO ()-cmdClearDepthStencilImage commandBuffer image imageLayout depthStencil ranges = evalContT $ do- let vkCmdClearDepthStencilImage' = mkVkCmdClearDepthStencilImage (pVkCmdClearDepthStencilImage (deviceCmds (commandBuffer :: CommandBuffer)))- pDepthStencil <- ContT $ withCStruct (depthStencil)- pPRanges <- ContT $ allocaBytesAligned @ImageSubresourceRange ((Data.Vector.length (ranges)) * 20) 4- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRanges `plusPtr` (20 * (i)) :: Ptr ImageSubresourceRange) (e) . ($ ())) (ranges)- lift $ vkCmdClearDepthStencilImage' (commandBufferHandle (commandBuffer)) (image) (imageLayout) pDepthStencil ((fromIntegral (Data.Vector.length $ (ranges)) :: Word32)) (pPRanges)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdClearAttachments- :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr ClearAttachment -> Word32 -> Ptr ClearRect -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr ClearAttachment -> Word32 -> Ptr ClearRect -> IO ()---- | vkCmdClearAttachments - Clear regions within bound framebuffer--- attachments------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @attachmentCount@ is the number of entries in the @pAttachments@--- array.------ - @pAttachments@ is a pointer to an array of 'ClearAttachment'--- structures defining the attachments to clear and the clear values to--- use. If any attachment to be cleared in the current subpass is--- 'Graphics.Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', then the--- clear has no effect on that attachment.------ - @rectCount@ is the number of entries in the @pRects@ array.------ - @pRects@ is a pointer to an array of 'ClearRect' structures defining--- regions within each selected attachment to clear.------ = Description------ 'cmdClearAttachments' /can/ clear multiple regions of each attachment--- used in the current subpass of a render pass instance. This command--- /must/ be called only inside a render pass instance, and implicitly--- selects the images to clear based on the current framebuffer attachments--- and the command parameters.------ If the render pass has a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-fragmentdensitymapattachment fragment density map attachment>,--- clears follow the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fragmentdensitymapops operations of fragment density maps>--- as if each clear region was a primitive which generates fragments. The--- clear color is applied to all pixels inside each fragment’s area--- regardless if the pixels lie outside of the clear region. Clears /may/--- have a different set of supported fragment areas than draws.------ Unlike other--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#clears clear commands>,--- 'cmdClearAttachments' executes as a drawing command, rather than a--- transfer command, with writes performed by it executing in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#primrast-order rasterization order>.--- Clears to color attachments are executed as color attachment writes, by--- the--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT'--- stage. Clears to depth\/stencil attachments are executed as--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fragops-depth depth writes>--- and--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fragops-stencil writes>--- by the--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT'--- and--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT'--- stages.------ == Valid Usage------ - If the @aspectMask@ member of any element of @pAttachments@ contains--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT',--- then the @colorAttachment@ member of that element /must/ either--- refer to a color attachment which is--- 'Graphics.Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', or /must/--- be a valid color attachment.------ - If the @aspectMask@ member of any element of @pAttachments@ contains--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_DEPTH_BIT',--- then the current subpass\' depth\/stencil attachment /must/ either--- be 'Graphics.Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', or--- /must/ have a depth component------ - If the @aspectMask@ member of any element of @pAttachments@ contains--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT',--- then the current subpass\' depth\/stencil attachment /must/ either--- be 'Graphics.Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', or--- /must/ have a stencil component------ - The @rect@ member of each element of @pRects@ /must/ have an--- @extent.width@ greater than @0@------ - The @rect@ member of each element of @pRects@ /must/ have an--- @extent.height@ greater than @0@------ - The rectangular region specified by each element of @pRects@ /must/--- be contained within the render area of the current render pass--- instance------ - The layers specified by each element of @pRects@ /must/ be contained--- within every attachment that @pAttachments@ refers to------ - The @layerCount@ member of each element of @pRects@ /must/ not be--- @0@------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then each attachment to be cleared /must/ not be a--- protected image.------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, then each attachment to be cleared /must/ not be an--- unprotected image.------ - If the render pass instance this is recorded in uses multiview, then--- @baseArrayLayer@ /must/ be zero and @layerCount@ /must/ be one.------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @pAttachments@ /must/ be a valid pointer to an array of--- @attachmentCount@ valid 'ClearAttachment' structures------ - @pRects@ /must/ be a valid pointer to an array of @rectCount@--- 'ClearRect' structures------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - This command /must/ only be called inside of a render pass instance------ - @attachmentCount@ /must/ be greater than @0@------ - @rectCount@ /must/ be greater than @0@------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Inside | Graphics | Graphics |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'ClearAttachment', 'ClearRect',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdClearAttachments :: CommandBuffer -> ("attachments" ::: Vector ClearAttachment) -> ("rects" ::: Vector ClearRect) -> IO ()-cmdClearAttachments commandBuffer attachments rects = evalContT $ do- let vkCmdClearAttachments' = mkVkCmdClearAttachments (pVkCmdClearAttachments (deviceCmds (commandBuffer :: CommandBuffer)))- pPAttachments <- ContT $ allocaBytesAligned @ClearAttachment ((Data.Vector.length (attachments)) * 24) 4- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPAttachments `plusPtr` (24 * (i)) :: Ptr ClearAttachment) (e) . ($ ())) (attachments)- pPRects <- ContT $ allocaBytesAligned @ClearRect ((Data.Vector.length (rects)) * 24) 4- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRects `plusPtr` (24 * (i)) :: Ptr ClearRect) (e) . ($ ())) (rects)- lift $ vkCmdClearAttachments' (commandBufferHandle (commandBuffer)) ((fromIntegral (Data.Vector.length $ (attachments)) :: Word32)) (pPAttachments) ((fromIntegral (Data.Vector.length $ (rects)) :: Word32)) (pPRects)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdResolveImage- :: FunPtr (Ptr CommandBuffer_T -> Image -> ImageLayout -> Image -> ImageLayout -> Word32 -> Ptr ImageResolve -> IO ()) -> Ptr CommandBuffer_T -> Image -> ImageLayout -> Image -> ImageLayout -> Word32 -> Ptr ImageResolve -> IO ()---- | vkCmdResolveImage - Resolve regions of an image------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @srcImage@ is the source image.------ - @srcImageLayout@ is the layout of the source image subresources for--- the resolve.------ - @dstImage@ is the destination image.------ - @dstImageLayout@ is the layout of the destination image subresources--- for the resolve.------ - @regionCount@ is the number of regions to resolve.------ - @pRegions@ is a pointer to an array of 'ImageResolve' structures--- specifying the regions to resolve.------ = Description------ During the resolve the samples corresponding to each pixel location in--- the source are converted to a single sample before being written to the--- destination. If the source formats are floating-point or normalized--- types, the sample values for each pixel are resolved in an--- implementation-dependent manner. If the source formats are integer--- types, a single sample’s value is selected for each pixel.------ @srcOffset@ and @dstOffset@ select the initial @x@, @y@, and @z@ offsets--- in texels of the sub-regions of the source and destination image data.--- @extent@ is the size in texels of the source image to resolve in--- @width@, @height@ and @depth@.------ Resolves are done layer by layer starting with @baseArrayLayer@ member--- of @srcSubresource@ for the source and @dstSubresource@ for the--- destination. @layerCount@ layers are resolved to the destination image.------ == Valid Usage------ - The source region specified by each element of @pRegions@ /must/ be--- a region that is contained within @srcImage@------ - The destination region specified by each element of @pRegions@--- /must/ be a region that is contained within @dstImage@------ - The union of all source regions, and the union of all destination--- regions, specified by the elements of @pRegions@, /must/ not overlap--- in memory------ - If @srcImage@ is non-sparse then it /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - @srcImage@ /must/ have a sample count equal to any valid sample--- count value other than--- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'------ - If @dstImage@ is non-sparse then it /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - @dstImage@ /must/ have a sample count equal to--- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'------ - @srcImageLayout@ /must/ specify the layout of the image subresources--- of @srcImage@ specified in @pRegions@ at the time this command is--- executed on a 'Graphics.Vulkan.Core10.Handles.Device'------ - @srcImageLayout@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL'--- or 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL'------ - @dstImageLayout@ /must/ specify the layout of the image subresources--- of @dstImage@ specified in @pRegions@ at the time this command is--- executed on a 'Graphics.Vulkan.Core10.Handles.Device'------ - @dstImageLayout@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'--- or 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL'------ - The--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>--- of @dstImage@ /must/ contain--- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_COLOR_ATTACHMENT_BIT'.------ - @srcImage@ and @dstImage@ /must/ have been created with the same--- image format------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @srcImage@ /must/ not be a protected image------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then @dstImage@ /must/ not be a protected image------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, then @dstImage@ /must/ not be an unprotected image------ - The @srcSubresource.mipLevel@ member of each element of @pRegions@--- /must/ be less than the @mipLevels@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was--- created------ - The @dstSubresource.mipLevel@ member of each element of @pRegions@--- /must/ be less than the @mipLevels@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was--- created------ - The @srcSubresource.baseArrayLayer@ + @srcSubresource.layerCount@ of--- each element of @pRegions@ /must/ be less than or equal to the--- @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was--- created------ - The @dstSubresource.baseArrayLayer@ + @dstSubresource.layerCount@ of--- each element of @pRegions@ /must/ be less than or equal to the--- @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was--- created------ - @dstImage@ and @srcImage@ /must/ not have been created with--- 'Graphics.Vulkan.Core10.BaseType.Flags' containing--- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @srcImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'--- handle------ - @srcImageLayout@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value------ - @dstImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'--- handle------ - @dstImageLayout@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value------ - @pRegions@ /must/ be a valid pointer to an array of @regionCount@--- valid 'ImageResolve' structures------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - This command /must/ only be called outside of a render pass instance------ - @regionCount@ /must/ be greater than @0@------ - Each of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', @dstImage@,--- and @srcImage@ /must/ have been created, allocated, or retrieved--- from the same 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Graphics | Transfer |--- | Secondary | | | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.Image',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout', 'ImageResolve'-cmdResolveImage :: CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector ImageResolve) -> IO ()-cmdResolveImage commandBuffer srcImage srcImageLayout dstImage dstImageLayout regions = evalContT $ do- let vkCmdResolveImage' = mkVkCmdResolveImage (pVkCmdResolveImage (deviceCmds (commandBuffer :: CommandBuffer)))- pPRegions <- ContT $ allocaBytesAligned @ImageResolve ((Data.Vector.length (regions)) * 68) 4- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRegions `plusPtr` (68 * (i)) :: Ptr ImageResolve) (e) . ($ ())) (regions)- lift $ vkCmdResolveImage' (commandBufferHandle (commandBuffer)) (srcImage) (srcImageLayout) (dstImage) (dstImageLayout) ((fromIntegral (Data.Vector.length $ (regions)) :: Word32)) (pPRegions)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdSetEvent- :: FunPtr (Ptr CommandBuffer_T -> Event -> PipelineStageFlags -> IO ()) -> Ptr CommandBuffer_T -> Event -> PipelineStageFlags -> IO ()---- | vkCmdSetEvent - Set an event object to signaled state------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.------ - 'Graphics.Vulkan.Core10.Handles.Event' is the event that will be--- signaled.------ - @stageMask@ specifies the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages source stage mask>--- used to determine when the 'Graphics.Vulkan.Core10.Handles.Event' is--- signaled.------ = Description------ When 'cmdSetEvent' is submitted to a queue, it defines an execution--- dependency on commands that were submitted before it, and defines an--- event signal operation which sets the event to the signaled state.------ The first--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>--- includes all commands that occur earlier in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>.--- The synchronization scope is limited to operations on the pipeline--- stages determined by the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks source stage mask>--- specified by @stageMask@.------ The second--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>--- includes only the event signal operation.------ If 'Graphics.Vulkan.Core10.Handles.Event' is already in the signaled--- state when 'cmdSetEvent' is executed on the device, then 'cmdSetEvent'--- has no effect, no event signal operation occurs, and no execution--- dependency is generated.------ == Valid Usage------ - @stageMask@ /must/ not include--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_HOST_BIT'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-geometryShader geometry shaders>--- feature is not enabled, @stageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_GEOMETRY_SHADER_BIT'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-tessellationShader tessellation shaders>--- feature is not enabled, @stageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT'--- or--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT'------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer'’s current device mask--- /must/ include exactly one physical device.------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-meshShader mesh shaders>--- feature is not enabled, @stageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_MESH_SHADER_BIT_NV'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-taskShader task shaders>--- feature is not enabled, @stageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TASK_SHADER_BIT_NV'------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.Event' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Event' handle------ - @stageMask@ /must/ be a valid combination of--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'--- values------ - @stageMask@ /must/ not be @0@------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations------ - This command /must/ only be called outside of a render pass instance------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- 'Graphics.Vulkan.Core10.Handles.Event' /must/ have been created,--- allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Graphics | |--- | Secondary | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.Event',--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlags'-cmdSetEvent :: CommandBuffer -> Event -> ("stageMask" ::: PipelineStageFlags) -> IO ()-cmdSetEvent commandBuffer event stageMask = do- let vkCmdSetEvent' = mkVkCmdSetEvent (pVkCmdSetEvent (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdSetEvent' (commandBufferHandle (commandBuffer)) (event) (stageMask)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdResetEvent- :: FunPtr (Ptr CommandBuffer_T -> Event -> PipelineStageFlags -> IO ()) -> Ptr CommandBuffer_T -> Event -> PipelineStageFlags -> IO ()---- | vkCmdResetEvent - Reset an event object to non-signaled state------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.------ - 'Graphics.Vulkan.Core10.Handles.Event' is the event that will be--- unsignaled.------ - @stageMask@ is a bitmask of--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'--- specifying the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages source stage mask>--- used to determine when the 'Graphics.Vulkan.Core10.Handles.Event' is--- unsignaled.------ = Description------ When 'cmdResetEvent' is submitted to a queue, it defines an execution--- dependency on commands that were submitted before it, and defines an--- event unsignal operation which resets the event to the unsignaled state.------ The first--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>--- includes all commands that occur earlier in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>.--- The synchronization scope is limited to operations on the pipeline--- stages determined by the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks source stage mask>--- specified by @stageMask@.------ The second--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>--- includes only the event unsignal operation.------ If 'Graphics.Vulkan.Core10.Handles.Event' is already in the unsignaled--- state when 'cmdResetEvent' is executed on the device, then--- 'cmdResetEvent' has no effect, no event unsignal operation occurs, and--- no execution dependency is generated.------ == Valid Usage------ - @stageMask@ /must/ not include--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_HOST_BIT'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-geometryShader geometry shaders>--- feature is not enabled, @stageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_GEOMETRY_SHADER_BIT'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-tessellationShader tessellation shaders>--- feature is not enabled, @stageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT'--- or--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT'------ - When this command executes, 'Graphics.Vulkan.Core10.Handles.Event'--- /must/ not be waited on by a 'cmdWaitEvents' command that is--- currently executing------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer'’s current device mask--- /must/ include exactly one physical device.------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-meshShader mesh shaders>--- feature is not enabled, @stageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_MESH_SHADER_BIT_NV'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-taskShader task shaders>--- feature is not enabled, @stageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TASK_SHADER_BIT_NV'------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.Event' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Event' handle------ - @stageMask@ /must/ be a valid combination of--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'--- values------ - @stageMask@ /must/ not be @0@------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations------ - This command /must/ only be called outside of a render pass instance------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- 'Graphics.Vulkan.Core10.Handles.Event' /must/ have been created,--- allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Graphics | |--- | Secondary | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.Event',--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlags'-cmdResetEvent :: CommandBuffer -> Event -> ("stageMask" ::: PipelineStageFlags) -> IO ()-cmdResetEvent commandBuffer event stageMask = do- let vkCmdResetEvent' = mkVkCmdResetEvent (pVkCmdResetEvent (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdResetEvent' (commandBufferHandle (commandBuffer)) (event) (stageMask)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdWaitEvents- :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr Event -> PipelineStageFlags -> PipelineStageFlags -> Word32 -> Ptr MemoryBarrier -> Word32 -> Ptr BufferMemoryBarrier -> Word32 -> Ptr (ImageMemoryBarrier a) -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr Event -> PipelineStageFlags -> PipelineStageFlags -> Word32 -> Ptr MemoryBarrier -> Word32 -> Ptr BufferMemoryBarrier -> Word32 -> Ptr (ImageMemoryBarrier a) -> IO ()---- | vkCmdWaitEvents - Wait for one or more events and insert a set of memory------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.------ - @eventCount@ is the length of the @pEvents@ array.------ - @pEvents@ is a pointer to an array of event object handles to wait--- on.------ - @srcStageMask@ is a bitmask of--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'--- specifying the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages source stage mask>.------ - @dstStageMask@ is a bitmask of--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'--- specifying the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages destination stage mask>.------ - @memoryBarrierCount@ is the length of the @pMemoryBarriers@ array.------ - @pMemoryBarriers@ is a pointer to an array of--- 'Graphics.Vulkan.Core10.OtherTypes.MemoryBarrier' structures.------ - @bufferMemoryBarrierCount@ is the length of the--- @pBufferMemoryBarriers@ array.------ - @pBufferMemoryBarriers@ is a pointer to an array of--- 'Graphics.Vulkan.Core10.OtherTypes.BufferMemoryBarrier' structures.------ - @imageMemoryBarrierCount@ is the length of the--- @pImageMemoryBarriers@ array.------ - @pImageMemoryBarriers@ is a pointer to an array of--- 'Graphics.Vulkan.Core10.OtherTypes.ImageMemoryBarrier' structures.------ = Description------ When 'cmdWaitEvents' is submitted to a queue, it defines a memory--- dependency between prior event signal operations on the same queue or--- the host, and subsequent commands. 'cmdWaitEvents' /must/ not be used to--- wait on event signal operations occurring on other queues.------ The first synchronization scope only includes event signal operations--- that operate on members of @pEvents@, and the operations that--- happened-before the event signal operations. Event signal operations--- performed by 'cmdSetEvent' that occur earlier in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>--- are included in the first synchronization scope, if the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-order logically latest>--- pipeline stage in their @stageMask@ parameter is--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-order logically earlier>--- than or equal to the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-order logically latest>--- pipeline stage in @srcStageMask@. Event signal operations performed by--- 'Graphics.Vulkan.Core10.Event.setEvent' are only included in the first--- synchronization scope if--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_HOST_BIT'--- is included in @srcStageMask@.------ The second--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>--- includes all commands that occur later in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>.--- The second synchronization scope is limited to operations on the--- pipeline stages determined by the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks destination stage mask>--- specified by @dstStageMask@.------ The first--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-access-scopes access scope>--- is limited to access in the pipeline stages determined by the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks source stage mask>--- specified by @srcStageMask@. Within that, the first access scope only--- includes the first access scopes defined by elements of the--- @pMemoryBarriers@, @pBufferMemoryBarriers@ and @pImageMemoryBarriers@--- arrays, which each define a set of--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-memory-barriers memory barriers>.--- If no memory barriers are specified, then the first access scope--- includes no accesses.------ The second--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-access-scopes access scope>--- is limited to access in the pipeline stages determined by the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks destination stage mask>--- specified by @dstStageMask@. Within that, the second access scope only--- includes the second access scopes defined by elements of the--- @pMemoryBarriers@, @pBufferMemoryBarriers@ and @pImageMemoryBarriers@--- arrays, which each define a set of--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-memory-barriers memory barriers>.--- If no memory barriers are specified, then the second access scope--- includes no accesses.------ Note------ 'cmdWaitEvents' is used with 'cmdSetEvent' to define a memory dependency--- between two sets of action commands, roughly in the same way as pipeline--- barriers, but split into two commands such that work between the two--- /may/ execute unhindered.------ Unlike 'cmdPipelineBarrier', a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-queue-transfers queue family ownership transfer>--- /cannot/ be performed using 'cmdWaitEvents'.------ Note------ Applications /should/ be careful to avoid race conditions when using--- events. There is no direct ordering guarantee between a 'cmdResetEvent'--- command and a 'cmdWaitEvents' command submitted after it, so some other--- execution dependency /must/ be included between these commands (e.g. a--- semaphore).------ == Valid Usage------ - @srcStageMask@ /must/ be the bitwise OR of the @stageMask@ parameter--- used in previous calls to 'cmdSetEvent' with any of the members of--- @pEvents@ and--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_HOST_BIT'--- if any of the members of @pEvents@ was set using--- 'Graphics.Vulkan.Core10.Event.setEvent'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-geometryShader geometry shaders>--- feature is not enabled, @srcStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_GEOMETRY_SHADER_BIT'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-geometryShader geometry shaders>--- feature is not enabled, @dstStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_GEOMETRY_SHADER_BIT'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-tessellationShader tessellation shaders>--- feature is not enabled, @srcStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT'--- or--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-tessellationShader tessellation shaders>--- feature is not enabled, @dstStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT'--- or--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT'------ - If @pEvents@ includes one or more events that will be signaled by--- 'Graphics.Vulkan.Core10.Event.setEvent' after--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' has been submitted to--- a queue, then 'cmdWaitEvents' /must/ not be called inside a render--- pass instance------ - Any pipeline stage included in @srcStageMask@ or @dstStageMask@--- /must/ be supported by the capabilities of the queue family--- specified by the @queueFamilyIndex@ member of the--- 'Graphics.Vulkan.Core10.CommandPool.CommandPoolCreateInfo' structure--- that was used to create the--- 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from,--- as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-supported table of supported pipeline stages>.------ - Each element of @pMemoryBarriers@, @pBufferMemoryBarriers@ or--- @pImageMemoryBarriers@ /must/ not have any access flag included in--- its @srcAccessMask@ member if that bit is not supported by any of--- the pipeline stages in @srcStageMask@, as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>.------ - Each element of @pMemoryBarriers@, @pBufferMemoryBarriers@ or--- @pImageMemoryBarriers@ /must/ not have any access flag included in--- its @dstAccessMask@ member if that bit is not supported by any of--- the pipeline stages in @dstStageMask@, as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>.------ - The @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ members of any--- element of @pBufferMemoryBarriers@ or @pImageMemoryBarriers@ /must/--- be equal.------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer'’s current device mask--- /must/ include exactly one physical device.------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-meshShader mesh shaders>--- feature is not enabled, @srcStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_MESH_SHADER_BIT_NV'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-taskShader task shaders>--- feature is not enabled, @srcStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TASK_SHADER_BIT_NV'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-meshShader mesh shaders>--- feature is not enabled, @dstStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_MESH_SHADER_BIT_NV'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-taskShader task shaders>--- feature is not enabled, @dstStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TASK_SHADER_BIT_NV'------ - The @srcAccessMask@ member of each element of @pMemoryBarriers@--- /must/ only include access flags that are supported by one or more--- of the pipeline stages in @srcStageMask@, as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>------ - The @dstAccessMask@ member of each element of @pMemoryBarriers@--- /must/ only include access flags that are supported by one or more--- of the pipeline stages in @dstStageMask@, as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>------ - The @srcAccessMask@ member of each element of--- @pBufferMemoryBarriers@ /must/ only include access flags that are--- supported by one or more of the pipeline stages in @srcStageMask@,--- as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>------ - The @dstAccessMask@ member of each element of--- @pBufferMemoryBarriers@ /must/ only include access flags that are--- supported by one or more of the pipeline stages in @dstStageMask@,--- as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>------ - The @srcAccessMask@ member of each element of @pImageMemoryBarriers@--- /must/ only include access flags that are supported by one or more--- of the pipeline stages in @srcStageMask@, as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>------ - The @dstAccessMask@ member of any element of @pImageMemoryBarriers@--- /must/ only include access flags that are supported by one or more--- of the pipeline stages in @dstStageMask@, as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @pEvents@ /must/ be a valid pointer to an array of @eventCount@--- valid 'Graphics.Vulkan.Core10.Handles.Event' handles------ - @srcStageMask@ /must/ be a valid combination of--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'--- values------ - @srcStageMask@ /must/ not be @0@------ - @dstStageMask@ /must/ be a valid combination of--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'--- values------ - @dstStageMask@ /must/ not be @0@------ - If @memoryBarrierCount@ is not @0@, @pMemoryBarriers@ /must/ be a--- valid pointer to an array of @memoryBarrierCount@ valid--- 'Graphics.Vulkan.Core10.OtherTypes.MemoryBarrier' structures------ - If @bufferMemoryBarrierCount@ is not @0@, @pBufferMemoryBarriers@--- /must/ be a valid pointer to an array of @bufferMemoryBarrierCount@--- valid 'Graphics.Vulkan.Core10.OtherTypes.BufferMemoryBarrier'--- structures------ - If @imageMemoryBarrierCount@ is not @0@, @pImageMemoryBarriers@--- /must/ be a valid pointer to an array of @imageMemoryBarrierCount@--- valid 'Graphics.Vulkan.Core10.OtherTypes.ImageMemoryBarrier'--- structures------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations------ - @eventCount@ /must/ be greater than @0@------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and the--- elements of @pEvents@ /must/ have been created, allocated, or--- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.OtherTypes.BufferMemoryBarrier',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.Event',--- 'Graphics.Vulkan.Core10.OtherTypes.ImageMemoryBarrier',--- 'Graphics.Vulkan.Core10.OtherTypes.MemoryBarrier',--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlags'-cmdWaitEvents :: PokeChain a => CommandBuffer -> ("events" ::: Vector Event) -> ("srcStageMask" ::: PipelineStageFlags) -> ("dstStageMask" ::: PipelineStageFlags) -> ("memoryBarriers" ::: Vector MemoryBarrier) -> ("bufferMemoryBarriers" ::: Vector BufferMemoryBarrier) -> ("imageMemoryBarriers" ::: Vector (ImageMemoryBarrier a)) -> IO ()-cmdWaitEvents commandBuffer events srcStageMask dstStageMask memoryBarriers bufferMemoryBarriers imageMemoryBarriers = evalContT $ do- let vkCmdWaitEvents' = mkVkCmdWaitEvents (pVkCmdWaitEvents (deviceCmds (commandBuffer :: CommandBuffer)))- pPEvents <- ContT $ allocaBytesAligned @Event ((Data.Vector.length (events)) * 8) 8- lift $ Data.Vector.imapM_ (\i e -> poke (pPEvents `plusPtr` (8 * (i)) :: Ptr Event) (e)) (events)- pPMemoryBarriers <- ContT $ allocaBytesAligned @MemoryBarrier ((Data.Vector.length (memoryBarriers)) * 24) 8- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPMemoryBarriers `plusPtr` (24 * (i)) :: Ptr MemoryBarrier) (e) . ($ ())) (memoryBarriers)- pPBufferMemoryBarriers <- ContT $ allocaBytesAligned @BufferMemoryBarrier ((Data.Vector.length (bufferMemoryBarriers)) * 56) 8- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPBufferMemoryBarriers `plusPtr` (56 * (i)) :: Ptr BufferMemoryBarrier) (e) . ($ ())) (bufferMemoryBarriers)- pPImageMemoryBarriers <- ContT $ allocaBytesAligned @(ImageMemoryBarrier _) ((Data.Vector.length (imageMemoryBarriers)) * 72) 8- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPImageMemoryBarriers `plusPtr` (72 * (i)) :: Ptr (ImageMemoryBarrier _)) (e) . ($ ())) (imageMemoryBarriers)- lift $ vkCmdWaitEvents' (commandBufferHandle (commandBuffer)) ((fromIntegral (Data.Vector.length $ (events)) :: Word32)) (pPEvents) (srcStageMask) (dstStageMask) ((fromIntegral (Data.Vector.length $ (memoryBarriers)) :: Word32)) (pPMemoryBarriers) ((fromIntegral (Data.Vector.length $ (bufferMemoryBarriers)) :: Word32)) (pPBufferMemoryBarriers) ((fromIntegral (Data.Vector.length $ (imageMemoryBarriers)) :: Word32)) (pPImageMemoryBarriers)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdPipelineBarrier- :: FunPtr (Ptr CommandBuffer_T -> PipelineStageFlags -> PipelineStageFlags -> DependencyFlags -> Word32 -> Ptr MemoryBarrier -> Word32 -> Ptr BufferMemoryBarrier -> Word32 -> Ptr (ImageMemoryBarrier a) -> IO ()) -> Ptr CommandBuffer_T -> PipelineStageFlags -> PipelineStageFlags -> DependencyFlags -> Word32 -> Ptr MemoryBarrier -> Word32 -> Ptr BufferMemoryBarrier -> Word32 -> Ptr (ImageMemoryBarrier a) -> IO ()---- | vkCmdPipelineBarrier - Insert a memory dependency------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.------ - @srcStageMask@ is a bitmask of--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'--- specifying the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks source stage mask>.------ - @dstStageMask@ is a bitmask of--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'--- specifying the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks destination stage mask>.------ - 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags' is--- a bitmask of--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlagBits'--- specifying how execution and memory dependencies are formed.------ - @memoryBarrierCount@ is the length of the @pMemoryBarriers@ array.------ - @pMemoryBarriers@ is a pointer to an array of--- 'Graphics.Vulkan.Core10.OtherTypes.MemoryBarrier' structures.------ - @bufferMemoryBarrierCount@ is the length of the--- @pBufferMemoryBarriers@ array.------ - @pBufferMemoryBarriers@ is a pointer to an array of--- 'Graphics.Vulkan.Core10.OtherTypes.BufferMemoryBarrier' structures.------ - @imageMemoryBarrierCount@ is the length of the--- @pImageMemoryBarriers@ array.------ - @pImageMemoryBarriers@ is a pointer to an array of--- 'Graphics.Vulkan.Core10.OtherTypes.ImageMemoryBarrier' structures.------ = Description------ When 'cmdPipelineBarrier' is submitted to a queue, it defines a memory--- dependency between commands that were submitted before it, and those--- submitted after it.------ If 'cmdPipelineBarrier' was recorded outside a render pass instance, the--- first--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>--- includes all commands that occur earlier in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>.--- If 'cmdPipelineBarrier' was recorded inside a render pass instance, the--- first synchronization scope includes only commands that occur earlier in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>--- within the same subpass. In either case, the first synchronization scope--- is limited to operations on the pipeline stages determined by the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks source stage mask>--- specified by @srcStageMask@.------ If 'cmdPipelineBarrier' was recorded outside a render pass instance, the--- second--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>--- includes all commands that occur later in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>.--- If 'cmdPipelineBarrier' was recorded inside a render pass instance, the--- second synchronization scope includes only commands that occur later in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>--- within the same subpass. In either case, the second synchronization--- scope is limited to operations on the pipeline stages determined by the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks destination stage mask>--- specified by @dstStageMask@.------ The first--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-access-scopes access scope>--- is limited to access in the pipeline stages determined by the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks source stage mask>--- specified by @srcStageMask@. Within that, the first access scope only--- includes the first access scopes defined by elements of the--- @pMemoryBarriers@, @pBufferMemoryBarriers@ and @pImageMemoryBarriers@--- arrays, which each define a set of--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-memory-barriers memory barriers>.--- If no memory barriers are specified, then the first access scope--- includes no accesses.------ The second--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-access-scopes access scope>--- is limited to access in the pipeline stages determined by the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks destination stage mask>--- specified by @dstStageMask@. Within that, the second access scope only--- includes the second access scopes defined by elements of the--- @pMemoryBarriers@, @pBufferMemoryBarriers@ and @pImageMemoryBarriers@--- arrays, which each define a set of--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-memory-barriers memory barriers>.--- If no memory barriers are specified, then the second access scope--- includes no accesses.------ If 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- includes--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_BY_REGION_BIT',--- then any dependency between--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-framebuffer-regions framebuffer-space>--- pipeline stages is--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-framebuffer-regions framebuffer-local>--- - otherwise it is--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-framebuffer-regions framebuffer-global>.------ == Valid Usage------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-geometryShader geometry shaders>--- feature is not enabled, @srcStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_GEOMETRY_SHADER_BIT'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-geometryShader geometry shaders>--- feature is not enabled, @dstStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_GEOMETRY_SHADER_BIT'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-tessellationShader tessellation shaders>--- feature is not enabled, @srcStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT'--- or--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-tessellationShader tessellation shaders>--- feature is not enabled, @dstStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT'--- or--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT'------ - If 'cmdPipelineBarrier' is called within a render pass instance, the--- render pass /must/ have been created with at least one--- 'Graphics.Vulkan.Core10.Pass.SubpassDependency' instance in--- 'Graphics.Vulkan.Core10.Pass.RenderPassCreateInfo'::@pDependencies@--- that expresses a dependency from the current subpass to itself, and--- for which @srcStageMask@ contains a subset of the bit values in--- 'Graphics.Vulkan.Core10.Pass.SubpassDependency'::@srcStageMask@,--- @dstStageMask@ contains a subset of the bit values in--- 'Graphics.Vulkan.Core10.Pass.SubpassDependency'::@dstStageMask@,--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags' is--- equal to--- 'Graphics.Vulkan.Core10.Pass.SubpassDependency'::'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags',--- @srcAccessMask@ member of each element of @pMemoryBarriers@ and--- @pImageMemoryBarriers@ contains a subset of the bit values in--- 'Graphics.Vulkan.Core10.Pass.SubpassDependency'::@srcAccessMask@,--- and @dstAccessMask@ member of each element of @pMemoryBarriers@ and--- @pImageMemoryBarriers@ contains a subset of the bit values in--- 'Graphics.Vulkan.Core10.Pass.SubpassDependency'::@dstAccessMask@------ - If 'cmdPipelineBarrier' is called within a render pass instance,--- @bufferMemoryBarrierCount@ /must/ be @0@------ - If 'cmdPipelineBarrier' is called within a render pass instance, the--- 'Graphics.Vulkan.Core10.Handles.Image' member of any element of--- @pImageMemoryBarriers@ /must/ be equal to one of the elements of--- @pAttachments@ that the current--- 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with, that--- is also referred to by one of the elements of the--- @pColorAttachments@, @pResolveAttachments@ or--- @pDepthStencilAttachment@ members of the--- 'Graphics.Vulkan.Core10.Pass.SubpassDescription' instance or by the--- @pDepthStencilResolveAttachment@ member of the--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_depth_stencil_resolve.SubpassDescriptionDepthStencilResolve'--- structure that the current subpass was created with------ - If 'cmdPipelineBarrier' is called within a render pass instance, the--- @oldLayout@ and @newLayout@ members of any element of--- @pImageMemoryBarriers@ /must/ be equal to the @layout@ member of an--- element of the @pColorAttachments@, @pResolveAttachments@ or--- @pDepthStencilAttachment@ members of the--- 'Graphics.Vulkan.Core10.Pass.SubpassDescription' instance or by the--- @pDepthStencilResolveAttachment@ member of the--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_depth_stencil_resolve.SubpassDescriptionDepthStencilResolve'--- structure that the current subpass was created with, that refers to--- the same 'Graphics.Vulkan.Core10.Handles.Image'------ - If 'cmdPipelineBarrier' is called within a render pass instance, the--- @oldLayout@ and @newLayout@ members of an element of--- @pImageMemoryBarriers@ /must/ be equal------ - If 'cmdPipelineBarrier' is called within a render pass instance, the--- @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ members of any--- element of @pImageMemoryBarriers@ /must/ be--- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED'------ - Any pipeline stage included in @srcStageMask@ or @dstStageMask@--- /must/ be supported by the capabilities of the queue family--- specified by the @queueFamilyIndex@ member of the--- 'Graphics.Vulkan.Core10.CommandPool.CommandPoolCreateInfo' structure--- that was used to create the--- 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from,--- as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-supported table of supported pipeline stages>------ - If 'cmdPipelineBarrier' is called outside of a render pass instance,--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- /must/ not include--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_VIEW_LOCAL_BIT'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-meshShader mesh shaders>--- feature is not enabled, @srcStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_MESH_SHADER_BIT_NV'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-taskShader task shaders>--- feature is not enabled, @srcStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TASK_SHADER_BIT_NV'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-meshShader mesh shaders>--- feature is not enabled, @dstStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_MESH_SHADER_BIT_NV'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-taskShader task shaders>--- feature is not enabled, @dstStageMask@ /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TASK_SHADER_BIT_NV'------ - The @srcAccessMask@ member of each element of @pMemoryBarriers@--- /must/ only include access flags that are supported by one or more--- of the pipeline stages in @srcStageMask@, as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>------ - The @dstAccessMask@ member of each element of @pMemoryBarriers@--- /must/ only include access flags that are supported by one or more--- of the pipeline stages in @dstStageMask@, as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>------ - For any element of @pBufferMemoryBarriers@, if its--- @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ members are equal,--- or if its @srcQueueFamilyIndex@ is the queue family index that was--- used to create the command pool that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from,--- then its @srcAccessMask@ member /must/ only contain access flags--- that are supported by one or more of the pipeline stages in--- @srcStageMask@, as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>------ - For any element of @pBufferMemoryBarriers@, if its--- @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ members are equal,--- or if its @dstQueueFamilyIndex@ is the queue family index that was--- used to create the command pool that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from,--- then its @dstAccessMask@ member /must/ only contain access flags--- that are supported by one or more of the pipeline stages in--- @dstStageMask@, as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>------ - For any element of @pImageMemoryBarriers@, if its--- @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ members are equal,--- or if its @srcQueueFamilyIndex@ is the queue family index that was--- used to create the command pool that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from,--- then its @srcAccessMask@ member /must/ only contain access flags--- that are supported by one or more of the pipeline stages in--- @srcStageMask@, as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>------ - For any element of @pImageMemoryBarriers@, if its--- @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ members are equal,--- or if its @dstQueueFamilyIndex@ is the queue family index that was--- used to create the command pool that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from,--- then its @dstAccessMask@ member /must/ only contain access flags--- that are supported by one or more of the pipeline stages in--- @dstStageMask@, as specified in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @srcStageMask@ /must/ be a valid combination of--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'--- values------ - @srcStageMask@ /must/ not be @0@------ - @dstStageMask@ /must/ be a valid combination of--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'--- values------ - @dstStageMask@ /must/ not be @0@------ - 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- /must/ be a valid combination of--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlagBits'--- values------ - If @memoryBarrierCount@ is not @0@, @pMemoryBarriers@ /must/ be a--- valid pointer to an array of @memoryBarrierCount@ valid--- 'Graphics.Vulkan.Core10.OtherTypes.MemoryBarrier' structures------ - If @bufferMemoryBarrierCount@ is not @0@, @pBufferMemoryBarriers@--- /must/ be a valid pointer to an array of @bufferMemoryBarrierCount@--- valid 'Graphics.Vulkan.Core10.OtherTypes.BufferMemoryBarrier'--- structures------ - If @imageMemoryBarrierCount@ is not @0@, @pImageMemoryBarriers@--- /must/ be a valid pointer to an array of @imageMemoryBarrierCount@--- valid 'Graphics.Vulkan.Core10.OtherTypes.ImageMemoryBarrier'--- structures------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support transfer, graphics, or compute operations------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Transfer | |--- | Secondary | | Graphics | |--- | | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.OtherTypes.BufferMemoryBarrier',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags',--- 'Graphics.Vulkan.Core10.OtherTypes.ImageMemoryBarrier',--- 'Graphics.Vulkan.Core10.OtherTypes.MemoryBarrier',--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlags'-cmdPipelineBarrier :: PokeChain a => CommandBuffer -> ("srcStageMask" ::: PipelineStageFlags) -> ("dstStageMask" ::: PipelineStageFlags) -> DependencyFlags -> ("memoryBarriers" ::: Vector MemoryBarrier) -> ("bufferMemoryBarriers" ::: Vector BufferMemoryBarrier) -> ("imageMemoryBarriers" ::: Vector (ImageMemoryBarrier a)) -> IO ()-cmdPipelineBarrier commandBuffer srcStageMask dstStageMask dependencyFlags memoryBarriers bufferMemoryBarriers imageMemoryBarriers = evalContT $ do- let vkCmdPipelineBarrier' = mkVkCmdPipelineBarrier (pVkCmdPipelineBarrier (deviceCmds (commandBuffer :: CommandBuffer)))- pPMemoryBarriers <- ContT $ allocaBytesAligned @MemoryBarrier ((Data.Vector.length (memoryBarriers)) * 24) 8- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPMemoryBarriers `plusPtr` (24 * (i)) :: Ptr MemoryBarrier) (e) . ($ ())) (memoryBarriers)- pPBufferMemoryBarriers <- ContT $ allocaBytesAligned @BufferMemoryBarrier ((Data.Vector.length (bufferMemoryBarriers)) * 56) 8- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPBufferMemoryBarriers `plusPtr` (56 * (i)) :: Ptr BufferMemoryBarrier) (e) . ($ ())) (bufferMemoryBarriers)- pPImageMemoryBarriers <- ContT $ allocaBytesAligned @(ImageMemoryBarrier _) ((Data.Vector.length (imageMemoryBarriers)) * 72) 8- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPImageMemoryBarriers `plusPtr` (72 * (i)) :: Ptr (ImageMemoryBarrier _)) (e) . ($ ())) (imageMemoryBarriers)- lift $ vkCmdPipelineBarrier' (commandBufferHandle (commandBuffer)) (srcStageMask) (dstStageMask) (dependencyFlags) ((fromIntegral (Data.Vector.length $ (memoryBarriers)) :: Word32)) (pPMemoryBarriers) ((fromIntegral (Data.Vector.length $ (bufferMemoryBarriers)) :: Word32)) (pPBufferMemoryBarriers) ((fromIntegral (Data.Vector.length $ (imageMemoryBarriers)) :: Word32)) (pPImageMemoryBarriers)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdBeginQuery- :: FunPtr (Ptr CommandBuffer_T -> QueryPool -> Word32 -> QueryControlFlags -> IO ()) -> Ptr CommandBuffer_T -> QueryPool -> Word32 -> QueryControlFlags -> IO ()---- | vkCmdBeginQuery - Begin a query------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which this command will be recorded.------ - 'Graphics.Vulkan.Core10.Handles.QueryPool' is the query pool that--- will manage the results of the query.------ - @query@ is the query index within the query pool that will contain--- the results.------ - 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of--- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QueryControlFlagBits'--- specifying constraints on the types of queries that /can/ be--- performed.------ = Description------ If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of the pool is--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION' and--- 'Graphics.Vulkan.Core10.BaseType.Flags' contains--- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QUERY_CONTROL_PRECISE_BIT',--- an implementation /must/ return a result that matches the actual number--- of samples passed. This is described in more detail in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-occlusion Occlusion Queries>.------ Calling 'cmdBeginQuery' is equivalent to calling--- 'Graphics.Vulkan.Extensions.VK_EXT_transform_feedback.cmdBeginQueryIndexedEXT'--- with the @index@ parameter set to zero.------ After beginning a query, that query is considered /active/ within the--- command buffer it was called in until that same query is ended. Queries--- active in a primary command buffer when secondary command buffers are--- executed are considered active for those secondary command buffers.------ == Valid Usage------ - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been created--- with a 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' that--- differs from that of any queries that are--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>--- within 'Graphics.Vulkan.Core10.Handles.CommandBuffer'------ - All queries used by the command /must/ be unavailable------ - The 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ not be--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TIMESTAMP'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-occlusionQueryPrecise precise occlusion queries>--- feature is not enabled, or the--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to create--- 'Graphics.Vulkan.Core10.Handles.QueryPool' was not--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QUERY_CONTROL_PRECISE_BIT'------ - @query@ /must/ be less than the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'------ - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION', the--- 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PIPELINE_STATISTICS'--- and any of the @pipelineStatistics@ indicate graphics operations,--- the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PIPELINE_STATISTICS'--- and any of the @pipelineStatistics@ indicate compute operations, the--- 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support compute operations------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be a--- protected command buffer------ - If called within a render pass instance, the sum of @query@ and the--- number of bits set in the current subpass’s view mask /must/ be less--- than or equal to the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'------ - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT'--- the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT'--- then--- 'Graphics.Vulkan.Extensions.VK_EXT_transform_feedback.PhysicalDeviceTransformFeedbackPropertiesEXT'::@transformFeedbackQueries@--- /must/ be supported------ - If 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',--- the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#profiling-lock profiling lock>--- /must/ have been held before--- 'Graphics.Vulkan.Core10.CommandBuffer.beginCommandBuffer' was called--- on 'Graphics.Vulkan.Core10.Handles.CommandBuffer'------ - If 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'--- and one of the counters used to create--- 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR',--- the query begin /must/ be the first recorded command in--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'------ - If 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'--- and one of the counters used to create--- 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR',--- the begin command /must/ not be recorded within a render pass--- instance------ - If 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'--- and another query pool with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType'--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'--- has been used within 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- its parent primary command buffer or secondary command buffer--- recorded within the same parent primary command buffer as--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-features-performanceCounterMultipleQueryPools performanceCounterMultipleQueryPools>--- feature /must/ be enabled------ - If 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',--- this command /must/ not be recorded in a command buffer that, either--- directly or through secondary command buffers, also contains a--- 'cmdResetQueryPool' command affecting the same query.------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle------ - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of--- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QueryControlFlagBits'--- values------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been created,--- allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QueryControlFlags',--- 'Graphics.Vulkan.Core10.Handles.QueryPool'-cmdBeginQuery :: CommandBuffer -> QueryPool -> ("query" ::: Word32) -> QueryControlFlags -> IO ()-cmdBeginQuery commandBuffer queryPool query flags = do- let vkCmdBeginQuery' = mkVkCmdBeginQuery (pVkCmdBeginQuery (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdBeginQuery' (commandBufferHandle (commandBuffer)) (queryPool) (query) (flags)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdEndQuery- :: FunPtr (Ptr CommandBuffer_T -> QueryPool -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> QueryPool -> Word32 -> IO ()---- | vkCmdEndQuery - Ends a query------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which this command will be recorded.------ - 'Graphics.Vulkan.Core10.Handles.QueryPool' is the query pool that is--- managing the results of the query.------ - @query@ is the query index within the query pool where the result is--- stored.------ = Description------ Calling 'cmdEndQuery' is equivalent to calling--- 'Graphics.Vulkan.Extensions.VK_EXT_transform_feedback.cmdEndQueryIndexedEXT'--- with the @index@ parameter set to zero.------ As queries operate asynchronously, ending a query does not immediately--- set the query’s status to available. A query is considered /finished/--- when the final results of the query are ready to be retrieved by--- 'Graphics.Vulkan.Core10.Query.getQueryPoolResults' and--- 'cmdCopyQueryPoolResults', and this is when the query’s status is set to--- available.------ Once a query is ended the query /must/ finish in finite time, unless the--- state of the query is changed using other commands, e.g. by issuing a--- reset of the query.------ == Valid Usage------ - All queries used by the command /must/ be--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>------ - @query@ /must/ be less than the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be a--- protected command buffer------ - If 'cmdEndQuery' is called within a render pass instance, the sum of--- @query@ and the number of bits set in the current subpass’s view--- mask /must/ be less than or equal to the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'------ - If 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'--- and one or more of the counters used to create--- 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR',--- the 'cmdEndQuery' /must/ be the last recorded command in--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'------ - If 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'--- and one or more of the counters used to create--- 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR',--- the 'cmdEndQuery' /must/ not be recorded within a render pass--- instance------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been created,--- allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.QueryPool'-cmdEndQuery :: CommandBuffer -> QueryPool -> ("query" ::: Word32) -> IO ()-cmdEndQuery commandBuffer queryPool query = do- let vkCmdEndQuery' = mkVkCmdEndQuery (pVkCmdEndQuery (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdEndQuery' (commandBufferHandle (commandBuffer)) (queryPool) (query)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdResetQueryPool- :: FunPtr (Ptr CommandBuffer_T -> QueryPool -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> QueryPool -> Word32 -> Word32 -> IO ()---- | vkCmdResetQueryPool - Reset queries in a query pool------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which this command will be recorded.------ - 'Graphics.Vulkan.Core10.Handles.QueryPool' is the handle of the--- query pool managing the queries being reset.------ - @firstQuery@ is the initial query index to reset.------ - @queryCount@ is the number of queries to reset.------ = Description------ When executed on a queue, this command sets the status of query indices--- [@firstQuery@, @firstQuery@ + @queryCount@ - 1] to unavailable.------ If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to create--- 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',--- this command sets the status of query indices [@firstQuery@,--- @firstQuery@ + @queryCount@ - 1] to unavailable for each pass of--- 'Graphics.Vulkan.Core10.Handles.QueryPool', as indicated by a call to--- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR'.------ Note------ Because 'cmdResetQueryPool' resets all the passes of the indicated--- queries, applications must not record a 'cmdResetQueryPool' command for--- a 'Graphics.Vulkan.Core10.Handles.QueryPool' created with--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'--- in a command buffer that needs to be submitted multiple times as--- indicated by a call to--- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR'.--- Otherwise applications will never be able to complete the recorded--- queries.------ == Valid Usage------ - @firstQuery@ /must/ be less than the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'------ - The sum of @firstQuery@ and @queryCount@ /must/ be less than or--- equal to the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'------ - All queries used by the command /must/ not be active------ - If 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',--- this command /must/ not be recorded in a command buffer that, either--- directly or through secondary command buffers, also contains begin--- commands for a query from the set of queries [@firstQuery@,--- @firstQuery@ + @queryCount@ - 1]------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations------ - This command /must/ only be called outside of a render pass instance------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been created,--- allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Graphics | |--- | Secondary | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.QueryPool'-cmdResetQueryPool :: CommandBuffer -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> IO ()-cmdResetQueryPool commandBuffer queryPool firstQuery queryCount = do- let vkCmdResetQueryPool' = mkVkCmdResetQueryPool (pVkCmdResetQueryPool (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdResetQueryPool' (commandBufferHandle (commandBuffer)) (queryPool) (firstQuery) (queryCount)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdWriteTimestamp- :: FunPtr (Ptr CommandBuffer_T -> PipelineStageFlagBits -> QueryPool -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> PipelineStageFlagBits -> QueryPool -> Word32 -> IO ()---- | vkCmdWriteTimestamp - Write a device timestamp into a query object------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.------ - @pipelineStage@ is one of the--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits',--- specifying a stage of the pipeline.------ - 'Graphics.Vulkan.Core10.Handles.QueryPool' is the query pool that--- will manage the timestamp.------ - @query@ is the query within the query pool that will contain the--- timestamp.------ = Description------ 'cmdWriteTimestamp' latches the value of the timer when all previous--- commands have completed executing as far as the specified pipeline--- stage, and writes the timestamp value to memory. When the timestamp--- value is written, the availability status of the query is set to--- available.------ Note------ If an implementation is unable to detect completion and latch the timer--- at any specific stage of the pipeline, it /may/ instead do so at any--- logically later stage.------ 'cmdCopyQueryPoolResults' /can/ then be called to copy the timestamp--- value from the query pool into buffer memory, with ordering and--- synchronization behavior equivalent to how other queries operate.--- Timestamp values /can/ also be retrieved from the query pool using--- 'Graphics.Vulkan.Core10.Query.getQueryPoolResults'. As with other--- queries, the query /must/ be reset using 'cmdResetQueryPool' or--- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_host_query_reset.resetQueryPool'--- before requesting the timestamp value be written to it.------ While 'cmdWriteTimestamp' /can/ be called inside or outside of a render--- pass instance, 'cmdCopyQueryPoolResults' /must/ only be called outside--- of a render pass instance.------ Timestamps /may/ only be meaningfully compared if they are written by--- commands submitted to the same queue.------ Note------ An example of such a comparison is determining the execution time of a--- sequence of commands.------ If 'cmdWriteTimestamp' is called while executing a render pass instance--- that has multiview enabled, the timestamp uses N consecutive query--- indices in the query pool (starting at @query@) where N is the number of--- bits set in the view mask of the subpass the command is executed in. The--- resulting query values are determined by an implementation-dependent--- choice of one of the following behaviors:------ - The first query is a timestamp value and (if more than one bit is--- set in the view mask) zero is written to the remaining queries. If--- two timestamps are written in the same subpass, the sum of the--- execution time of all views between those commands is the difference--- between the first query written by each command.------ - All N queries are timestamp values. If two timestamps are written in--- the same subpass, the sum of the execution time of all views between--- those commands is the sum of the difference between corresponding--- queries written by each command. The difference between--- corresponding queries /may/ be the execution time of a single view.------ In either case, the application /can/ sum the differences between all N--- queries to determine the total execution time.------ == Valid Usage------ - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been created--- with a 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TIMESTAMP'------ - The query identified by 'Graphics.Vulkan.Core10.Handles.QueryPool'--- and @query@ /must/ be /unavailable/------ - The command pool’s queue family /must/ support a non-zero--- @timestampValidBits@------ - All queries used by the command /must/ be unavailable------ - If 'cmdWriteTimestamp' is called within a render pass instance, the--- sum of @query@ and the number of bits set in the current subpass’s--- view mask /must/ be less than or equal to the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @pipelineStage@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'--- value------ - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support transfer, graphics, or compute operations------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been created,--- allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Transfer | Transfer |--- | Secondary | | Graphics | |--- | | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits',--- 'Graphics.Vulkan.Core10.Handles.QueryPool'-cmdWriteTimestamp :: CommandBuffer -> PipelineStageFlagBits -> QueryPool -> ("query" ::: Word32) -> IO ()-cmdWriteTimestamp commandBuffer pipelineStage queryPool query = do- let vkCmdWriteTimestamp' = mkVkCmdWriteTimestamp (pVkCmdWriteTimestamp (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdWriteTimestamp' (commandBufferHandle (commandBuffer)) (pipelineStage) (queryPool) (query)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdCopyQueryPoolResults- :: FunPtr (Ptr CommandBuffer_T -> QueryPool -> Word32 -> Word32 -> Buffer -> DeviceSize -> DeviceSize -> QueryResultFlags -> IO ()) -> Ptr CommandBuffer_T -> QueryPool -> Word32 -> Word32 -> Buffer -> DeviceSize -> DeviceSize -> QueryResultFlags -> IO ()---- | vkCmdCopyQueryPoolResults - Copy the results of queries in a query pool--- to a buffer object------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which this command will be recorded.------ - 'Graphics.Vulkan.Core10.Handles.QueryPool' is the query pool--- managing the queries containing the desired results.------ - @firstQuery@ is the initial query index.------ - @queryCount@ is the number of queries. @firstQuery@ and @queryCount@--- together define a range of queries.------ - @dstBuffer@ is a 'Graphics.Vulkan.Core10.Handles.Buffer' object that--- will receive the results of the copy command.------ - @dstOffset@ is an offset into @dstBuffer@.------ - @stride@ is the stride in bytes between results for individual--- queries within @dstBuffer@. The required size of the backing memory--- for @dstBuffer@ is determined as described above for--- 'Graphics.Vulkan.Core10.Query.getQueryPoolResults'.------ - 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QueryResultFlagBits'--- specifying how and when results are returned.------ = Description------ 'cmdCopyQueryPoolResults' is guaranteed to see the effect of previous--- uses of 'cmdResetQueryPool' in the same queue, without any additional--- synchronization. Thus, the results will always reflect the most recent--- use of the query.------ 'Graphics.Vulkan.Core10.BaseType.Flags' has the same possible values--- described above for the 'Graphics.Vulkan.Core10.BaseType.Flags'--- parameter of 'Graphics.Vulkan.Core10.Query.getQueryPoolResults', but the--- different style of execution causes some subtle behavioral differences.--- Because 'cmdCopyQueryPoolResults' executes in order with respect to--- other query commands, there is less ambiguity about which use of a query--- is being requested.------ Results for all requested occlusion queries, pipeline statistics--- queries, transform feedback queries, and timestamp queries are written--- as 64-bit unsigned integer values if--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_64_BIT'--- is set or 32-bit unsigned integer values otherwise. Performance queries--- store results in a tightly packed array whose type is determined by the--- @unit@ member of the corresponding--- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PerformanceCounterKHR'.------ If neither of--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WAIT_BIT'--- and--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WITH_AVAILABILITY_BIT'--- are set, results are only written out for queries in the available--- state.------ If--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WAIT_BIT'--- is set, the implementation will wait for each query’s status to be in--- the available state before retrieving the numerical results for that--- query. This is guaranteed to reflect the most recent use of the query on--- the same queue, assuming that the query is not being simultaneously used--- by other queues. If the query does not become available in a finite--- amount of time (e.g. due to not issuing a query since the last reset), a--- 'Graphics.Vulkan.Core10.Enums.Result.ERROR_DEVICE_LOST' error /may/--- occur.------ Similarly, if--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WITH_AVAILABILITY_BIT'--- is set and--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WAIT_BIT'--- is not set, the availability is guaranteed to reflect the most recent--- use of the query on the same queue, assuming that the query is not being--- simultaneously used by other queues. As with--- 'Graphics.Vulkan.Core10.Query.getQueryPoolResults', implementations--- /must/ guarantee that if they return a non-zero availability value, then--- the numerical results are valid.------ If--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_PARTIAL_BIT'--- is set,--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WAIT_BIT'--- is not set, and the query’s status is unavailable, an intermediate--- result value between zero and the final result value is written for that--- query.------ 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_PARTIAL_BIT'--- /must/ not be used if the pool’s--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' is--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TIMESTAMP'.------ 'cmdCopyQueryPoolResults' is considered to be a transfer operation, and--- its writes to buffer memory /must/ be synchronized using--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TRANSFER_BIT'--- and--- 'Graphics.Vulkan.Core10.Enums.AccessFlagBits.ACCESS_TRANSFER_WRITE_BIT'--- before using the results.------ == Valid Usage------ - @dstOffset@ /must/ be less than the size of @dstBuffer@------ - @firstQuery@ /must/ be less than the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'------ - The sum of @firstQuery@ and @queryCount@ /must/ be less than or--- equal to the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'------ - If--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_64_BIT'--- is not set in 'Graphics.Vulkan.Core10.BaseType.Flags' then--- @dstOffset@ and @stride@ /must/ be multiples of @4@------ - If--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_64_BIT'--- is set in 'Graphics.Vulkan.Core10.BaseType.Flags' then @dstOffset@--- and @stride@ /must/ be multiples of @8@------ - @dstBuffer@ /must/ have enough storage, from @dstOffset@, to contain--- the result of each query, as described--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-memorylayout here>------ - @dstBuffer@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'--- usage flag------ - If @dstBuffer@ is non-sparse then it /must/ be bound completely and--- contiguously to a single--- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object------ - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TIMESTAMP',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_PARTIAL_BIT'------ - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',--- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PhysicalDevicePerformanceQueryPropertiesKHR'::@allowCommandBufferQueryCopies@--- /must/ be 'Graphics.Vulkan.Core10.BaseType.TRUE'------ - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WITH_AVAILABILITY_BIT',--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_PARTIAL_BIT'--- or--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_64_BIT'------ - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',--- the 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been--- submitted once for each pass as retrieved via a call to--- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR'------ - 'cmdCopyQueryPoolResults' /must/ not be called if the--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to create--- 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_INTEL'------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle------ - @dstBuffer@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle------ - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QueryResultFlagBits'--- values------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations------ - This command /must/ only be called outside of a render pass instance------ - Each of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', @dstBuffer@,--- and 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been--- created, allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Graphics | Transfer |--- | Secondary | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.Buffer',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.BaseType.DeviceSize',--- 'Graphics.Vulkan.Core10.Handles.QueryPool',--- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QueryResultFlags'-cmdCopyQueryPoolResults :: CommandBuffer -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> ("stride" ::: DeviceSize) -> QueryResultFlags -> IO ()-cmdCopyQueryPoolResults commandBuffer queryPool firstQuery queryCount dstBuffer dstOffset stride flags = do- let vkCmdCopyQueryPoolResults' = mkVkCmdCopyQueryPoolResults (pVkCmdCopyQueryPoolResults (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdCopyQueryPoolResults' (commandBufferHandle (commandBuffer)) (queryPool) (firstQuery) (queryCount) (dstBuffer) (dstOffset) (stride) (flags)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdPushConstants- :: FunPtr (Ptr CommandBuffer_T -> PipelineLayout -> ShaderStageFlags -> Word32 -> Word32 -> Ptr () -> IO ()) -> Ptr CommandBuffer_T -> PipelineLayout -> ShaderStageFlags -> Word32 -> Word32 -> Ptr () -> IO ()---- | vkCmdPushConstants - Update the values of push constants------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- in which the push constant update will be recorded.------ - @layout@ is the pipeline layout used to program the push constant--- updates.------ - @stageFlags@ is a bitmask of--- 'Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits.ShaderStageFlagBits'--- specifying the shader stages that will use the push constants in the--- updated range.------ - @offset@ is the start offset of the push constant range to update,--- in units of bytes.------ - @size@ is the size of the push constant range to update, in units of--- bytes.------ - @pValues@ is a pointer to an array of @size@ bytes containing the--- new push constant values.------ = Description------ Note------ As @stageFlags@ needs to include all flags the relevant push constant--- ranges were created with, any flags that are not supported by the queue--- family that the 'Graphics.Vulkan.Core10.Handles.CommandPool' used to--- allocate 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was created on--- are ignored.------ == Valid Usage------ - For each byte in the range specified by @offset@ and @size@ and for--- each shader stage in @stageFlags@, there /must/ be a push constant--- range in @layout@ that includes that byte and that stage------ - For each byte in the range specified by @offset@ and @size@ and for--- each push constant range that overlaps that byte, @stageFlags@--- /must/ include all stages in that push constant range’s--- 'Graphics.Vulkan.Core10.PipelineLayout.PushConstantRange'::@stageFlags@------ - @offset@ /must/ be a multiple of @4@------ - @size@ /must/ be a multiple of @4@------ - @offset@ /must/ be less than--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxPushConstantsSize@------ - @size@ /must/ be less than or equal to--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxPushConstantsSize@--- minus @offset@------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @layout@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' handle------ - @stageFlags@ /must/ be a valid combination of--- 'Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits.ShaderStageFlagBits'--- values------ - @stageFlags@ /must/ not be @0@------ - @pValues@ /must/ be a valid pointer to an array of @size@ bytes------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations------ - @size@ /must/ be greater than @0@------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and @layout@--- /must/ have been created, allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Graphics | |--- | Secondary | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout',--- 'Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits.ShaderStageFlags'-cmdPushConstants :: CommandBuffer -> PipelineLayout -> ShaderStageFlags -> ("offset" ::: Word32) -> ("size" ::: Word32) -> ("values" ::: Ptr ()) -> IO ()-cmdPushConstants commandBuffer layout stageFlags offset size values = do- let vkCmdPushConstants' = mkVkCmdPushConstants (pVkCmdPushConstants (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdPushConstants' (commandBufferHandle (commandBuffer)) (layout) (stageFlags) (offset) (size) (values)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdBeginRenderPass- :: FunPtr (Ptr CommandBuffer_T -> Ptr (RenderPassBeginInfo a) -> SubpassContents -> IO ()) -> Ptr CommandBuffer_T -> Ptr (RenderPassBeginInfo a) -> SubpassContents -> IO ()---- | vkCmdBeginRenderPass - Begin a new render pass------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- in which to record the command.------ - @pRenderPassBegin@ is a pointer to a 'RenderPassBeginInfo' structure--- specifying the render pass to begin an instance of, and the--- framebuffer the instance uses.------ - @contents@ is a--- 'Graphics.Vulkan.Core10.Enums.SubpassContents.SubpassContents' value--- specifying how the commands in the first subpass will be provided.------ = Description------ After beginning a render pass instance, the command buffer is ready to--- record the commands for the first subpass of that render pass.------ == Valid Usage------ - If any of the @initialLayout@ or @finalLayout@ member of the--- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures or--- the @layout@ member of the--- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures--- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL'--- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_COLOR_ATTACHMENT_BIT'------ - If any of the @initialLayout@ or @finalLayout@ member of the--- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures or--- the @layout@ member of the--- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures--- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL',--- or--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL'--- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT'------ - If any of the @initialLayout@ or @finalLayout@ member of the--- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures or--- the @layout@ member of the--- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures--- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL',--- or--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL',--- or--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL'--- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT'------ - If any of the @stencilInitialLayout@ or @stencilFinalLayout@ member--- of the--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_separate_depth_stencil_layouts.AttachmentDescriptionStencilLayout'--- structures or the @stencilLayout@ member of the--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_separate_depth_stencil_layouts.AttachmentReferenceStencilLayout'--- structures specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL',--- or--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL'--- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT'------ - If any of the @initialLayout@ or @finalLayout@ member of the--- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures or--- the @layout@ member of the--- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures--- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL'--- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT'--- or--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_INPUT_ATTACHMENT_BIT'------ - If any of the @initialLayout@ or @finalLayout@ member of the--- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures or--- the @layout@ member of the--- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures--- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL'--- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_SRC_BIT'------ - If any of the @initialLayout@ or @finalLayout@ member of the--- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures or--- the @layout@ member of the--- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures--- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'--- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including--- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'------ - If any of the @initialLayout@ members of the--- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures--- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is not--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_UNDEFINED',--- then each such @initialLayout@ /must/ be equal to the current layout--- of the corresponding attachment image subresource of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@------ - The @srcStageMask@ and @dstStageMask@ members of any element of the--- @pDependencies@ member of--- 'Graphics.Vulkan.Core10.Pass.RenderPassCreateInfo' used to create--- 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ be supported by--- the capabilities of the queue family identified by the--- @queueFamilyIndex@ member of the--- 'Graphics.Vulkan.Core10.CommandPool.CommandPoolCreateInfo' used to--- create the command pool which--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from------ - For any attachment in 'Graphics.Vulkan.Core10.Handles.Framebuffer'--- that is used by 'Graphics.Vulkan.Core10.Handles.RenderPass' and is--- bound to memory locations that are also bound to another attachment--- used by 'Graphics.Vulkan.Core10.Handles.RenderPass', and if at least--- one of those uses causes either attachment to be written to, both--- attachments /must/ have had the--- 'Graphics.Vulkan.Core10.Enums.AttachmentDescriptionFlagBits.ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT'--- set------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @pRenderPassBegin@ /must/ be a valid pointer to a valid--- 'RenderPassBeginInfo' structure------ - @contents@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.SubpassContents.SubpassContents' value------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - This command /must/ only be called outside of a render pass instance------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a primary--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Outside | Graphics | Graphics |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'RenderPassBeginInfo',--- 'Graphics.Vulkan.Core10.Enums.SubpassContents.SubpassContents'-cmdBeginRenderPass :: PokeChain a => CommandBuffer -> RenderPassBeginInfo a -> SubpassContents -> IO ()-cmdBeginRenderPass commandBuffer renderPassBegin contents = evalContT $ do- let vkCmdBeginRenderPass' = mkVkCmdBeginRenderPass (pVkCmdBeginRenderPass (deviceCmds (commandBuffer :: CommandBuffer)))- pRenderPassBegin <- ContT $ withCStruct (renderPassBegin)- lift $ vkCmdBeginRenderPass' (commandBufferHandle (commandBuffer)) pRenderPassBegin (contents)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdNextSubpass- :: FunPtr (Ptr CommandBuffer_T -> SubpassContents -> IO ()) -> Ptr CommandBuffer_T -> SubpassContents -> IO ()---- | vkCmdNextSubpass - Transition to the next subpass of a render pass------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- in which to record the command.------ - @contents@ specifies how the commands in the next subpass will be--- provided, in the same fashion as the corresponding parameter of--- 'cmdBeginRenderPass'.------ = Description------ The subpass index for a render pass begins at zero when--- 'cmdBeginRenderPass' is recorded, and increments each time--- 'cmdNextSubpass' is recorded.------ Moving to the next subpass automatically performs any multisample--- resolve operations in the subpass being ended. End-of-subpass--- multisample resolves are treated as color attachment writes for the--- purposes of synchronization. This applies to resolve operations for both--- color and depth\/stencil attachments. That is, they are considered to--- execute in the--- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT'--- pipeline stage and their writes are synchronized with--- 'Graphics.Vulkan.Core10.Enums.AccessFlagBits.ACCESS_COLOR_ATTACHMENT_WRITE_BIT'.--- Synchronization between rendering within a subpass and any resolve--- operations at the end of the subpass occurs automatically, without need--- for explicit dependencies or pipeline barriers. However, if the resolve--- attachment is also used in a different subpass, an explicit dependency--- is needed.------ After transitioning to the next subpass, the application /can/ record--- the commands for that subpass.------ == Valid Usage------ - The current subpass index /must/ be less than the number of--- subpasses in the render pass minus one------ - This command /must/ not be recorded when transform feedback is--- active------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @contents@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Enums.SubpassContents.SubpassContents' value------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - This command /must/ only be called inside of a render pass instance------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a primary--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Inside | Graphics | Graphics |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Enums.SubpassContents.SubpassContents'-cmdNextSubpass :: CommandBuffer -> SubpassContents -> IO ()-cmdNextSubpass commandBuffer contents = do- let vkCmdNextSubpass' = mkVkCmdNextSubpass (pVkCmdNextSubpass (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdNextSubpass' (commandBufferHandle (commandBuffer)) (contents)- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdEndRenderPass- :: FunPtr (Ptr CommandBuffer_T -> IO ()) -> Ptr CommandBuffer_T -> IO ()---- | vkCmdEndRenderPass - End the current render pass------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- in which to end the current render pass instance.------ = Description------ Ending a render pass instance performs any multisample resolve--- operations on the final subpass.------ == Valid Usage------ - The current subpass index /must/ be equal to the number of subpasses--- in the render pass minus one------ - This command /must/ not be recorded when transform feedback is--- active------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations------ - This command /must/ only be called inside of a render pass instance------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a primary--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Inside | Graphics | Graphics |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdEndRenderPass :: CommandBuffer -> IO ()-cmdEndRenderPass commandBuffer = do- let vkCmdEndRenderPass' = mkVkCmdEndRenderPass (pVkCmdEndRenderPass (deviceCmds (commandBuffer :: CommandBuffer)))- vkCmdEndRenderPass' (commandBufferHandle (commandBuffer))- pure $ ()---foreign import ccall-#if !defined(SAFE_FOREIGN_CALLS)- unsafe-#endif- "dynamic" mkVkCmdExecuteCommands- :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr (Ptr CommandBuffer_T) -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr (Ptr CommandBuffer_T) -> IO ()---- | vkCmdExecuteCommands - Execute a secondary command buffer from a primary--- command buffer------ = Parameters------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a handle to a--- primary command buffer that the secondary command buffers are--- executed in.------ - @commandBufferCount@ is the length of the @pCommandBuffers@ array.------ - @pCommandBuffers@ is a pointer to an array of @commandBufferCount@--- secondary command buffer handles, which are recorded to execute in--- the primary command buffer in the order they are listed in the--- array.------ = Description------ If any element of @pCommandBuffers@ was not recorded with the--- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT'--- flag, and it was recorded into any other primary command buffer which is--- currently in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle executable or recording state>,--- that primary command buffer becomes--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle invalid>.------ == Valid Usage------ - Each element of @pCommandBuffers@ /must/ have been allocated with a--- @level@ of--- 'Graphics.Vulkan.Core10.Enums.CommandBufferLevel.COMMAND_BUFFER_LEVEL_SECONDARY'------ - Each element of @pCommandBuffers@ /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle pending or executable state>------ - If any element of @pCommandBuffers@ was not recorded with the--- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT'--- flag, it /must/ not be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle pending state>------ - If any element of @pCommandBuffers@ was not recorded with the--- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT'--- flag, it /must/ not have already been recorded to--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'------ - If any element of @pCommandBuffers@ was not recorded with the--- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT'--- flag, it /must/ not appear more than once in @pCommandBuffers@------ - Each element of @pCommandBuffers@ /must/ have been allocated from a--- 'Graphics.Vulkan.Core10.Handles.CommandPool' that was created for--- the same queue family as the--- 'Graphics.Vulkan.Core10.Handles.CommandPool' from which--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated------ - If 'cmdExecuteCommands' is being called within a render pass--- instance, that render pass instance /must/ have been begun with the--- @contents@ parameter of 'cmdBeginRenderPass' set to--- 'Graphics.Vulkan.Core10.Enums.SubpassContents.SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS'------ - If 'cmdExecuteCommands' is being called within a render pass--- instance, each element of @pCommandBuffers@ /must/ have been--- recorded with the--- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT'------ - If 'cmdExecuteCommands' is being called within a render pass--- instance, each element of @pCommandBuffers@ /must/ have been--- recorded with--- 'Graphics.Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo'::@subpass@--- set to the index of the subpass which the given command buffer will--- be executed in------ - If 'cmdExecuteCommands' is being called within a render pass--- instance, the render passes specified in the--- @pBeginInfo->pInheritanceInfo->renderPass@ members of the--- 'Graphics.Vulkan.Core10.CommandBuffer.beginCommandBuffer' commands--- used to begin recording each element of @pCommandBuffers@ /must/ be--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>--- with the current render pass------ - If 'cmdExecuteCommands' is being called within a render pass--- instance, and any element of @pCommandBuffers@ was recorded with--- 'Graphics.Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo'::'Graphics.Vulkan.Core10.Handles.Framebuffer'--- not equal to 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', that--- 'Graphics.Vulkan.Core10.Handles.Framebuffer' /must/ match the--- 'Graphics.Vulkan.Core10.Handles.Framebuffer' used in the current--- render pass instance------ - If 'cmdExecuteCommands' is being called within a render pass--- instance that included--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'--- in the @pNext@ chain of 'RenderPassBeginInfo', then each element of--- @pCommandBuffers@ /must/ have been recorded with--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.CommandBufferInheritanceRenderPassTransformInfoQCOM'--- in the @pNext@ chain of VkCommandBufferBeginInfo------ - If 'cmdExecuteCommands' is being called within a render pass--- instance that included--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'--- in the @pNext@ chain of 'RenderPassBeginInfo', then each element of--- @pCommandBuffers@ /must/ have been recorded with--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.CommandBufferInheritanceRenderPassTransformInfoQCOM'::@transform@--- identical to--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'::@transform@------ - If 'cmdExecuteCommands' is being called within a render pass--- instance that included--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'--- in the @pNext@ chain of 'RenderPassBeginInfo', then each element of--- @pCommandBuffers@ /must/ have been recorded with--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.CommandBufferInheritanceRenderPassTransformInfoQCOM'::@renderArea@--- identical to 'RenderPassBeginInfo'::@renderArea@------ - If 'cmdExecuteCommands' is not being called within a render pass--- instance, each element of @pCommandBuffers@ /must/ not have been--- recorded with the--- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT'------ - If the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-inheritedQueries inherited queries>--- feature is not enabled,--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not have any--- queries--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' has a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION' query--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>,--- then each element of @pCommandBuffers@ /must/ have been recorded--- with--- 'Graphics.Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo'::@occlusionQueryEnable@--- set to 'Graphics.Vulkan.Core10.BaseType.TRUE'------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' has a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION' query--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>,--- then each element of @pCommandBuffers@ /must/ have been recorded--- with--- 'Graphics.Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo'::@queryFlags@--- having all bits set that are set for the query------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' has a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PIPELINE_STATISTICS'--- query--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>,--- then each element of @pCommandBuffers@ /must/ have been recorded--- with--- 'Graphics.Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo'::@pipelineStatistics@--- having all bits set that are set in the--- 'Graphics.Vulkan.Core10.Handles.QueryPool' the query uses------ - Each element of @pCommandBuffers@ /must/ not begin any query types--- that are--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>--- in 'Graphics.Vulkan.Core10.Handles.CommandBuffer'------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, then each element of @pCommandBuffers@ /must/ be a--- protected command buffer------ - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, then each element of @pCommandBuffers@ /must/ be an--- unprotected command buffer------ - This command /must/ not be recorded when transform feedback is--- active------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle------ - @pCommandBuffers@ /must/ be a valid pointer to an array of--- @commandBufferCount@ valid--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handles------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>------ - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support transfer, graphics, or compute operations------ - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a primary--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'------ - @commandBufferCount@ /must/ be greater than @0@------ - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and the--- elements of @pCommandBuffers@ /must/ have been created, allocated,--- or retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device'------ == Host Synchronization------ - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized------ - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized------ == Command Properties------ \'------ +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |--- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+--- | Primary | Both | Transfer | |--- | | | Graphics | |--- | | | Compute | |--- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+------ = See Also------ 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdExecuteCommands :: CommandBuffer -> ("commandBuffers" ::: Vector CommandBuffer) -> IO ()-cmdExecuteCommands commandBuffer commandBuffers = evalContT $ do- let vkCmdExecuteCommands' = mkVkCmdExecuteCommands (pVkCmdExecuteCommands (deviceCmds (commandBuffer :: CommandBuffer)))- pPCommandBuffers <- ContT $ allocaBytesAligned @(Ptr CommandBuffer_T) ((Data.Vector.length (commandBuffers)) * 8) 8- lift $ Data.Vector.imapM_ (\i e -> poke (pPCommandBuffers `plusPtr` (8 * (i)) :: Ptr (Ptr CommandBuffer_T)) (commandBufferHandle (e))) (commandBuffers)- lift $ vkCmdExecuteCommands' (commandBufferHandle (commandBuffer)) ((fromIntegral (Data.Vector.length $ (commandBuffers)) :: Word32)) (pPCommandBuffers)- pure $ ()----- | VkViewport - Structure specifying a viewport------ = Description------ The framebuffer depth coordinate @z@f /may/ be represented using either--- a fixed-point or floating-point representation. However, a--- floating-point representation /must/ be used if the depth\/stencil--- attachment has a floating-point depth component. If an m-bit fixed-point--- representation is used, we assume that it represents each value--- \(\frac{k}{2^m - 1}\), where k ∈ { 0, 1, …, 2m-1 }, as k (e.g. 1.0 is--- represented in binary as a string of all ones).------ The viewport parameters shown in the above equations are found from--- these values as------ - ox = @x@ + @width@ \/ 2------ - oy = @y@ + @height@ \/ 2------ - oz = @minDepth@------ - px = @width@------ - py = @height@------ - pz = @maxDepth@ - @minDepth@.------ If a render pass transform is enabled, the values (px,py) and (ox, oy)--- defining the viewport are transformed as described in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vertexpostproc-renderpass-transform render pass transform>--- before participating in the viewport transform.------ The application /can/ specify a negative term for @height@, which has--- the effect of negating the y coordinate in clip space before performing--- the transform. When using a negative @height@, the application /should/--- also adjust the @y@ value to point to the lower left corner of the--- viewport instead of the upper left corner. Using the negative @height@--- allows the application to avoid having to negate the y component of the--- @Position@ output from the last vertex processing stage in shaders that--- also target other graphics APIs.------ The width and height of the--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#limits-maxViewportDimensions implementation-dependent maximum viewport dimensions>--- /must/ be greater than or equal to the width and height of the largest--- image which /can/ be created and attached to a framebuffer.------ The floating-point viewport bounds are represented with an--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#limits-viewportSubPixelBits implementation-dependent precision>.------ == Valid Usage------ - @width@ /must/ be greater than @0.0@------ - @width@ /must/ be less than or equal to--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewportDimensions@[0]------ - The absolute value of @height@ /must/ be less than or equal to--- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewportDimensions@[1]------ - @x@ /must/ be greater than or equal to @viewportBoundsRange@[0]------ - (@x@ + @width@) /must/ be less than or equal to--- @viewportBoundsRange@[1]------ - @y@ /must/ be greater than or equal to @viewportBoundsRange@[0]------ - @y@ /must/ be less than or equal to @viewportBoundsRange@[1]------ - (@y@ + @height@) /must/ be greater than or equal to--- @viewportBoundsRange@[0]------ - (@y@ + @height@) /must/ be less than or equal to--- @viewportBoundsRange@[1]------ - Unless--- @https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/html\/vkspec.html#VK_EXT_depth_range_unrestricted@--- extension is enabled @minDepth@ /must/ be between @0.0@ and @1.0@,--- inclusive------ - Unless--- @https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/html\/vkspec.html#VK_EXT_depth_range_unrestricted@--- extension is enabled @maxDepth@ /must/ be between @0.0@ and @1.0@,--- inclusive------ = See Also------ 'Graphics.Vulkan.Core10.Pipeline.PipelineViewportStateCreateInfo',--- 'cmdSetViewport'-data Viewport = Viewport- { -- | @x@ and @y@ are the viewport’s upper left corner (x,y).- x :: Float- , -- No documentation found for Nested "VkViewport" "y"- y :: Float- , -- | @width@ and @height@ are the viewport’s width and height, respectively.- width :: Float- , -- No documentation found for Nested "VkViewport" "height"- height :: Float- , -- | @minDepth@ and @maxDepth@ are the depth range for the viewport. It is- -- valid for @minDepth@ to be greater than or equal to @maxDepth@.- minDepth :: Float- , -- No documentation found for Nested "VkViewport" "maxDepth"- maxDepth :: Float- }- deriving (Typeable)-deriving instance Show Viewport--instance ToCStruct Viewport where- withCStruct x f = allocaBytesAligned 24 4 $ \p -> pokeCStruct p x (f p)- pokeCStruct p Viewport{..} f = do- poke ((p `plusPtr` 0 :: Ptr CFloat)) (CFloat (x))- poke ((p `plusPtr` 4 :: Ptr CFloat)) (CFloat (y))- poke ((p `plusPtr` 8 :: Ptr CFloat)) (CFloat (width))- poke ((p `plusPtr` 12 :: Ptr CFloat)) (CFloat (height))- poke ((p `plusPtr` 16 :: Ptr CFloat)) (CFloat (minDepth))- poke ((p `plusPtr` 20 :: Ptr CFloat)) (CFloat (maxDepth))- f- cStructSize = 24- cStructAlignment = 4- pokeZeroCStruct p f = do- poke ((p `plusPtr` 0 :: Ptr CFloat)) (CFloat (zero))- poke ((p `plusPtr` 4 :: Ptr CFloat)) (CFloat (zero))- poke ((p `plusPtr` 8 :: Ptr CFloat)) (CFloat (zero))- poke ((p `plusPtr` 12 :: Ptr CFloat)) (CFloat (zero))- poke ((p `plusPtr` 16 :: Ptr CFloat)) (CFloat (zero))- poke ((p `plusPtr` 20 :: Ptr CFloat)) (CFloat (zero))- f--instance FromCStruct Viewport where- peekCStruct p = do- x <- peek @CFloat ((p `plusPtr` 0 :: Ptr CFloat))- y <- peek @CFloat ((p `plusPtr` 4 :: Ptr CFloat))- width <- peek @CFloat ((p `plusPtr` 8 :: Ptr CFloat))- height <- peek @CFloat ((p `plusPtr` 12 :: Ptr CFloat))- minDepth <- peek @CFloat ((p `plusPtr` 16 :: Ptr CFloat))- maxDepth <- peek @CFloat ((p `plusPtr` 20 :: Ptr CFloat))- pure $ Viewport- ((\(CFloat a) -> a) x) ((\(CFloat a) -> a) y) ((\(CFloat a) -> a) width) ((\(CFloat a) -> a) height) ((\(CFloat a) -> a) minDepth) ((\(CFloat a) -> a) maxDepth)--instance Storable Viewport where- sizeOf ~_ = 24- alignment ~_ = 4- peek = peekCStruct- poke ptr poked = pokeCStruct ptr poked (pure ())--instance Zero Viewport where- zero = Viewport- zero- zero- zero- zero- zero- zero----- | VkRect2D - Structure specifying a two-dimensional subregion------ = See Also------ 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_groupAndVK_KHR_bind_memory2.BindImageMemoryDeviceGroupInfo',--- 'ClearRect',--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.CommandBufferInheritanceRenderPassTransformInfoQCOM',--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo',--- 'Graphics.Vulkan.Extensions.VK_KHR_display_swapchain.DisplayPresentInfoKHR',--- 'Graphics.Vulkan.Core10.SharedTypes.Extent2D',--- 'Graphics.Vulkan.Core10.SharedTypes.Offset2D',--- 'Graphics.Vulkan.Extensions.VK_EXT_discard_rectangles.PipelineDiscardRectangleStateCreateInfoEXT',--- 'Graphics.Vulkan.Extensions.VK_NV_scissor_exclusive.PipelineViewportExclusiveScissorStateCreateInfoNV',--- 'Graphics.Vulkan.Core10.Pipeline.PipelineViewportStateCreateInfo',--- 'RenderPassBeginInfo',--- 'Graphics.Vulkan.Extensions.VK_EXT_discard_rectangles.cmdSetDiscardRectangleEXT',--- 'Graphics.Vulkan.Extensions.VK_NV_scissor_exclusive.cmdSetExclusiveScissorNV',--- 'cmdSetScissor',--- 'Graphics.Vulkan.Extensions.VK_KHR_swapchain.getPhysicalDevicePresentRectanglesKHR'-data Rect2D = Rect2D- { -- | @offset@ is a 'Graphics.Vulkan.Core10.SharedTypes.Offset2D' specifying- -- the rectangle offset.- offset :: Offset2D- , -- | @extent@ is a 'Graphics.Vulkan.Core10.SharedTypes.Extent2D' specifying- -- the rectangle extent.- extent :: Extent2D- }- deriving (Typeable)-deriving instance Show Rect2D--instance ToCStruct Rect2D where- withCStruct x f = allocaBytesAligned 16 4 $ \p -> pokeCStruct p x (f p)- pokeCStruct p Rect2D{..} f = evalContT $ do- ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr Offset2D)) (offset) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 8 :: Ptr Extent2D)) (extent) . ($ ())- lift $ f- cStructSize = 16- cStructAlignment = 4- pokeZeroCStruct p f = evalContT $ do- ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr Offset2D)) (zero) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 8 :: Ptr Extent2D)) (zero) . ($ ())- lift $ f--instance FromCStruct Rect2D where- peekCStruct p = do- offset <- peekCStruct @Offset2D ((p `plusPtr` 0 :: Ptr Offset2D))- extent <- peekCStruct @Extent2D ((p `plusPtr` 8 :: Ptr Extent2D))- pure $ Rect2D- offset extent--instance Zero Rect2D where- zero = Rect2D- zero- zero----- | VkClearRect - Structure specifying a clear rectangle------ = Description------ The layers [@baseArrayLayer@, @baseArrayLayer@ + @layerCount@) counting--- from the base layer of the attachment image view are cleared.------ = See Also------ 'Rect2D', 'cmdClearAttachments'-data ClearRect = ClearRect- { -- | @rect@ is the two-dimensional region to be cleared.- rect :: Rect2D- , -- | @baseArrayLayer@ is the first layer to be cleared.- baseArrayLayer :: Word32- , -- | @layerCount@ is the number of layers to clear.- layerCount :: Word32- }- deriving (Typeable)-deriving instance Show ClearRect--instance ToCStruct ClearRect where- withCStruct x f = allocaBytesAligned 24 4 $ \p -> pokeCStruct p x (f p)- pokeCStruct p ClearRect{..} f = evalContT $ do- ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr Rect2D)) (rect) . ($ ())- lift $ poke ((p `plusPtr` 16 :: Ptr Word32)) (baseArrayLayer)- lift $ poke ((p `plusPtr` 20 :: Ptr Word32)) (layerCount)- lift $ f- cStructSize = 24- cStructAlignment = 4- pokeZeroCStruct p f = evalContT $ do- ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr Rect2D)) (zero) . ($ ())- lift $ poke ((p `plusPtr` 16 :: Ptr Word32)) (zero)- lift $ poke ((p `plusPtr` 20 :: Ptr Word32)) (zero)- lift $ f--instance FromCStruct ClearRect where- peekCStruct p = do- rect <- peekCStruct @Rect2D ((p `plusPtr` 0 :: Ptr Rect2D))- baseArrayLayer <- peek @Word32 ((p `plusPtr` 16 :: Ptr Word32))- layerCount <- peek @Word32 ((p `plusPtr` 20 :: Ptr Word32))- pure $ ClearRect- rect baseArrayLayer layerCount--instance Zero ClearRect where- zero = ClearRect- zero- zero- zero----- | VkBufferCopy - Structure specifying a buffer copy operation------ == Valid Usage------ - The @size@ /must/ be greater than @0@------ = See Also------ 'Graphics.Vulkan.Core10.BaseType.DeviceSize', 'cmdCopyBuffer'-data BufferCopy = BufferCopy- { -- | @srcOffset@ is the starting offset in bytes from the start of- -- @srcBuffer@.- srcOffset :: DeviceSize- , -- | @dstOffset@ is the starting offset in bytes from the start of- -- @dstBuffer@.- dstOffset :: DeviceSize- , -- | @size@ is the number of bytes to copy.- size :: DeviceSize- }- deriving (Typeable)-deriving instance Show BufferCopy--instance ToCStruct BufferCopy where- withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p)- pokeCStruct p BufferCopy{..} f = do- poke ((p `plusPtr` 0 :: Ptr DeviceSize)) (srcOffset)- poke ((p `plusPtr` 8 :: Ptr DeviceSize)) (dstOffset)- poke ((p `plusPtr` 16 :: Ptr DeviceSize)) (size)- f- cStructSize = 24- cStructAlignment = 8- pokeZeroCStruct p f = do- poke ((p `plusPtr` 0 :: Ptr DeviceSize)) (zero)- poke ((p `plusPtr` 8 :: Ptr DeviceSize)) (zero)- poke ((p `plusPtr` 16 :: Ptr DeviceSize)) (zero)- f--instance FromCStruct BufferCopy where- peekCStruct p = do- srcOffset <- peek @DeviceSize ((p `plusPtr` 0 :: Ptr DeviceSize))- dstOffset <- peek @DeviceSize ((p `plusPtr` 8 :: Ptr DeviceSize))- size <- peek @DeviceSize ((p `plusPtr` 16 :: Ptr DeviceSize))- pure $ BufferCopy- srcOffset dstOffset size--instance Storable BufferCopy where- sizeOf ~_ = 24- alignment ~_ = 8- peek = peekCStruct- poke ptr poked = pokeCStruct ptr poked (pure ())--instance Zero BufferCopy where- zero = BufferCopy- zero- zero- zero----- | VkImageCopy - Structure specifying an image copy operation------ = Description------ For 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' images,--- copies are performed slice by slice starting with the @z@ member of the--- @srcOffset@ or @dstOffset@, and copying @depth@ slices. For images with--- multiple layers, copies are performed layer by layer starting with the--- @baseArrayLayer@ member of the @srcSubresource@ or @dstSubresource@ and--- copying @layerCount@ layers. Image data /can/ be copied between images--- with different image types. If one image is--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' and the other--- image is 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' with--- multiple layers, then each slice is copied to or from a different layer.------ Copies involving a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>--- specify the region to be copied in terms of the /plane/ to be copied,--- not the coordinates of the multi-planar image. This means that copies--- accessing the R\/B planes of “@_422@” format images /must/ fit the--- copied region within half the @width@ of the parent image, and that--- copies accessing the R\/B planes of “@_420@” format images /must/ fit--- the copied region within half the @width@ and @height@ of the parent--- image.------ == Valid Usage------ - If neither the calling command’s @srcImage@ nor the calling--- command’s @dstImage@ has a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>--- then the @aspectMask@ member of @srcSubresource@ and--- @dstSubresource@ /must/ match------ - If the calling command’s @srcImage@ has a--- 'Graphics.Vulkan.Core10.Enums.Format.Format' with--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion two planes>--- then the @srcSubresource@ @aspectMask@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT'--- or--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT'------ - If the calling command’s @srcImage@ has a--- 'Graphics.Vulkan.Core10.Enums.Format.Format' with--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion three planes>--- then the @srcSubresource@ @aspectMask@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',--- or--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'------ - If the calling command’s @dstImage@ has a--- 'Graphics.Vulkan.Core10.Enums.Format.Format' with--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion two planes>--- then the @dstSubresource@ @aspectMask@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT'--- or--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT'------ - If the calling command’s @dstImage@ has a--- 'Graphics.Vulkan.Core10.Enums.Format.Format' with--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion three planes>--- then the @dstSubresource@ @aspectMask@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',--- or--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'------ - If the calling command’s @srcImage@ has a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>--- and the @dstImage@ does not have a multi-planar image format, the--- @dstSubresource@ @aspectMask@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT'------ - If the calling command’s @dstImage@ has a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>--- and the @srcImage@ does not have a multi-planar image format, the--- @srcSubresource@ @aspectMask@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT'------ - The number of slices of the @extent@ (for 3D) or layers of the--- @srcSubresource@ (for non-3D) /must/ match the number of slices of--- the @extent@ (for 3D) or layers of the @dstSubresource@ (for non-3D)------ - If either of the calling command’s @srcImage@ or @dstImage@--- parameters are of 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType'--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', the--- @baseArrayLayer@ and @layerCount@ members of the corresponding--- subresource /must/ be @0@ and @1@, respectively------ - The @aspectMask@ member of @srcSubresource@ /must/ specify aspects--- present in the calling command’s @srcImage@------ - The @aspectMask@ member of @dstSubresource@ /must/ specify aspects--- present in the calling command’s @dstImage@------ - @srcOffset.x@ and (@extent.width@ + @srcOffset.x@) /must/ both be--- greater than or equal to @0@ and less than or equal to the source--- image subresource width------ - @srcOffset.y@ and (@extent.height@ + @srcOffset.y@) /must/ both be--- greater than or equal to @0@ and less than or equal to the source--- image subresource height------ - If the calling command’s @srcImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then--- @srcOffset.y@ /must/ be @0@ and @extent.height@ /must/ be @1@.------ - @srcOffset.z@ and (@extent.depth@ + @srcOffset.z@) /must/ both be--- greater than or equal to @0@ and less than or equal to the source--- image subresource depth------ - If the calling command’s @srcImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then--- @srcOffset.z@ /must/ be @0@ and @extent.depth@ /must/ be @1@.------ - If the calling command’s @dstImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then--- @dstOffset.z@ /must/ be @0@ and @extent.depth@ /must/ be @1@.------ - If the calling command’s @srcImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then--- @srcOffset.z@ /must/ be @0@.------ - If the calling command’s @dstImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then--- @dstOffset.z@ /must/ be @0@.------ - If both @srcImage@ and @dstImage@ are of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' then--- @extent.depth@ /must/ be @1@.------ - If the calling command’s @srcImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', and the--- @dstImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', then--- @extent.depth@ /must/ equal to the @layerCount@ member of--- @srcSubresource@.------ - If the calling command’s @dstImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', and the--- @srcImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', then--- @extent.depth@ /must/ equal to the @layerCount@ member of--- @dstSubresource@.------ - @dstOffset.x@ and (@extent.width@ + @dstOffset.x@) /must/ both be--- greater than or equal to @0@ and less than or equal to the--- destination image subresource width------ - @dstOffset.y@ and (@extent.height@ + @dstOffset.y@) /must/ both be--- greater than or equal to @0@ and less than or equal to the--- destination image subresource height------ - If the calling command’s @dstImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then--- @dstOffset.y@ /must/ be @0@ and @extent.height@ /must/ be @1@.------ - @dstOffset.z@ and (@extent.depth@ + @dstOffset.z@) /must/ both be--- greater than or equal to @0@ and less than or equal to the--- destination image subresource depth------ - If the calling command’s @srcImage@ is a compressed image, or a--- /single-plane/, “@_422@” image format, all members of @srcOffset@--- /must/ be a multiple of the corresponding dimensions of the--- compressed texel block------ - If the calling command’s @srcImage@ is a compressed image, or a--- /single-plane/, “@_422@” image format, @extent.width@ /must/ be a--- multiple of the compressed texel block width or (@extent.width@ +--- @srcOffset.x@) /must/ equal the source image subresource width------ - If the calling command’s @srcImage@ is a compressed image, or a--- /single-plane/, “@_422@” image format, @extent.height@ /must/ be a--- multiple of the compressed texel block height or (@extent.height@ +--- @srcOffset.y@) /must/ equal the source image subresource height------ - If the calling command’s @srcImage@ is a compressed image, or a--- /single-plane/, “@_422@” image format, @extent.depth@ /must/ be a--- multiple of the compressed texel block depth or (@extent.depth@ +--- @srcOffset.z@) /must/ equal the source image subresource depth------ - If the calling command’s @dstImage@ is a compressed format image, or--- a /single-plane/, “@_422@” image format, all members of @dstOffset@--- /must/ be a multiple of the corresponding dimensions of the--- compressed texel block------ - If the calling command’s @dstImage@ is a compressed format image, or--- a /single-plane/, “@_422@” image format, @extent.width@ /must/ be a--- multiple of the compressed texel block width or (@extent.width@ +--- @dstOffset.x@) /must/ equal the destination image subresource width------ - If the calling command’s @dstImage@ is a compressed format image, or--- a /single-plane/, “@_422@” image format, @extent.height@ /must/ be a--- multiple of the compressed texel block height or (@extent.height@ +--- @dstOffset.y@) /must/ equal the destination image subresource height------ - If the calling command’s @dstImage@ is a compressed format image, or--- a /single-plane/, “@_422@” image format, @extent.depth@ /must/ be a--- multiple of the compressed texel block depth or (@extent.depth@ +--- @dstOffset.z@) /must/ equal the destination image subresource depth------ == Valid Usage (Implicit)------ - @srcSubresource@ /must/ be a valid--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'--- structure------ - @dstSubresource@ /must/ be a valid--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'--- structure------ = See Also------ 'Graphics.Vulkan.Core10.SharedTypes.Extent3D',--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers',--- 'Graphics.Vulkan.Core10.SharedTypes.Offset3D', 'cmdCopyImage'-data ImageCopy = ImageCopy- { -- | @srcSubresource@ and @dstSubresource@ are- -- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers' structures- -- specifying the image subresources of the images used for the source and- -- destination image data, respectively.- srcSubresource :: ImageSubresourceLayers- , -- | @srcOffset@ and @dstOffset@ select the initial @x@, @y@, and @z@ offsets- -- in texels of the sub-regions of the source and destination image data.- srcOffset :: Offset3D- , -- No documentation found for Nested "VkImageCopy" "dstSubresource"- dstSubresource :: ImageSubresourceLayers- , -- No documentation found for Nested "VkImageCopy" "dstOffset"- dstOffset :: Offset3D- , -- | @extent@ is the size in texels of the image to copy in @width@, @height@- -- and @depth@.- extent :: Extent3D- }- deriving (Typeable)-deriving instance Show ImageCopy--instance ToCStruct ImageCopy where- withCStruct x f = allocaBytesAligned 68 4 $ \p -> pokeCStruct p x (f p)- pokeCStruct p ImageCopy{..} f = evalContT $ do- ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers)) (srcSubresource) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr Offset3D)) (srcOffset) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 28 :: Ptr ImageSubresourceLayers)) (dstSubresource) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 44 :: Ptr Offset3D)) (dstOffset) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 56 :: Ptr Extent3D)) (extent) . ($ ())- lift $ f- cStructSize = 68- cStructAlignment = 4- pokeZeroCStruct p f = evalContT $ do- ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr Offset3D)) (zero) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 28 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 44 :: Ptr Offset3D)) (zero) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 56 :: Ptr Extent3D)) (zero) . ($ ())- lift $ f--instance FromCStruct ImageCopy where- peekCStruct p = do- srcSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers))- srcOffset <- peekCStruct @Offset3D ((p `plusPtr` 16 :: Ptr Offset3D))- dstSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 28 :: Ptr ImageSubresourceLayers))- dstOffset <- peekCStruct @Offset3D ((p `plusPtr` 44 :: Ptr Offset3D))- extent <- peekCStruct @Extent3D ((p `plusPtr` 56 :: Ptr Extent3D))- pure $ ImageCopy- srcSubresource srcOffset dstSubresource dstOffset extent--instance Zero ImageCopy where- zero = ImageCopy- zero- zero- zero- zero- zero----- | VkImageBlit - Structure specifying an image blit operation------ = Description------ For each element of the @pRegions@ array, a blit operation is performed--- the specified source and destination regions.------ == Valid Usage------ - The @aspectMask@ member of @srcSubresource@ and @dstSubresource@--- /must/ match------ - The @layerCount@ member of @srcSubresource@ and @dstSubresource@--- /must/ match------ - If either of the calling command’s @srcImage@ or @dstImage@--- parameters are of 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType'--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', the--- @baseArrayLayer@ and @layerCount@ members of both @srcSubresource@--- and @dstSubresource@ /must/ be @0@ and @1@, respectively------ - The @aspectMask@ member of @srcSubresource@ /must/ specify aspects--- present in the calling command’s @srcImage@------ - The @aspectMask@ member of @dstSubresource@ /must/ specify aspects--- present in the calling command’s @dstImage@------ - @srcOffset@[0].x and @srcOffset@[1].x /must/ both be greater than or--- equal to @0@ and less than or equal to the source image subresource--- width------ - @srcOffset@[0].y and @srcOffset@[1].y /must/ both be greater than or--- equal to @0@ and less than or equal to the source image subresource--- height------ - If the calling command’s @srcImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then--- @srcOffset@[0].y /must/ be @0@ and @srcOffset@[1].y /must/ be @1@.------ - @srcOffset@[0].z and @srcOffset@[1].z /must/ both be greater than or--- equal to @0@ and less than or equal to the source image subresource--- depth------ - If the calling command’s @srcImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' or--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then--- @srcOffset@[0].z /must/ be @0@ and @srcOffset@[1].z /must/ be @1@.------ - @dstOffset@[0].x and @dstOffset@[1].x /must/ both be greater than or--- equal to @0@ and less than or equal to the destination image--- subresource width------ - @dstOffset@[0].y and @dstOffset@[1].y /must/ both be greater than or--- equal to @0@ and less than or equal to the destination image--- subresource height------ - If the calling command’s @dstImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then--- @dstOffset@[0].y /must/ be @0@ and @dstOffset@[1].y /must/ be @1@.------ - @dstOffset@[0].z and @dstOffset@[1].z /must/ both be greater than or--- equal to @0@ and less than or equal to the destination image--- subresource depth------ - If the calling command’s @dstImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' or--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then--- @dstOffset@[0].z /must/ be @0@ and @dstOffset@[1].z /must/ be @1@.------ == Valid Usage (Implicit)------ - @srcSubresource@ /must/ be a valid--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'--- structure------ - @dstSubresource@ /must/ be a valid--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'--- structure------ = See Also------ 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers',--- 'Graphics.Vulkan.Core10.SharedTypes.Offset3D', 'cmdBlitImage'-data ImageBlit = ImageBlit- { -- | @srcSubresource@ is the subresource to blit from.- srcSubresource :: ImageSubresourceLayers- , -- | @srcOffsets@ is a pointer to an array of two- -- 'Graphics.Vulkan.Core10.SharedTypes.Offset3D' structures specifying the- -- bounds of the source region within @srcSubresource@.- srcOffsets :: (Offset3D, Offset3D)- , -- | @dstSubresource@ is the subresource to blit into.- dstSubresource :: ImageSubresourceLayers- , -- | @dstOffsets@ is a pointer to an array of two- -- 'Graphics.Vulkan.Core10.SharedTypes.Offset3D' structures specifying the- -- bounds of the destination region within @dstSubresource@.- dstOffsets :: (Offset3D, Offset3D)- }- deriving (Typeable)-deriving instance Show ImageBlit--instance ToCStruct ImageBlit where- withCStruct x f = allocaBytesAligned 80 4 $ \p -> pokeCStruct p x (f p)- pokeCStruct p ImageBlit{..} f = evalContT $ do- ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers)) (srcSubresource) . ($ ())- let pSrcOffsets' = lowerArrayPtr ((p `plusPtr` 16 :: Ptr (Data.Vector.Storable.Sized.Vector 2 Offset3D)))- case (srcOffsets) of- (e0, e1) -> do- ContT $ pokeCStruct (pSrcOffsets' :: Ptr Offset3D) (e0) . ($ ())- ContT $ pokeCStruct (pSrcOffsets' `plusPtr` 12 :: Ptr Offset3D) (e1) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 40 :: Ptr ImageSubresourceLayers)) (dstSubresource) . ($ ())- let pDstOffsets' = lowerArrayPtr ((p `plusPtr` 56 :: Ptr (Data.Vector.Storable.Sized.Vector 2 Offset3D)))- case (dstOffsets) of- (e0, e1) -> do- ContT $ pokeCStruct (pDstOffsets' :: Ptr Offset3D) (e0) . ($ ())- ContT $ pokeCStruct (pDstOffsets' `plusPtr` 12 :: Ptr Offset3D) (e1) . ($ ())- lift $ f- cStructSize = 80- cStructAlignment = 4- pokeZeroCStruct p f = evalContT $ do- ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())- let pSrcOffsets' = lowerArrayPtr ((p `plusPtr` 16 :: Ptr (Data.Vector.Storable.Sized.Vector 2 Offset3D)))- case ((zero, zero)) of- (e0, e1) -> do- ContT $ pokeCStruct (pSrcOffsets' :: Ptr Offset3D) (e0) . ($ ())- ContT $ pokeCStruct (pSrcOffsets' `plusPtr` 12 :: Ptr Offset3D) (e1) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 40 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())- let pDstOffsets' = lowerArrayPtr ((p `plusPtr` 56 :: Ptr (Data.Vector.Storable.Sized.Vector 2 Offset3D)))- case ((zero, zero)) of- (e0, e1) -> do- ContT $ pokeCStruct (pDstOffsets' :: Ptr Offset3D) (e0) . ($ ())- ContT $ pokeCStruct (pDstOffsets' `plusPtr` 12 :: Ptr Offset3D) (e1) . ($ ())- lift $ f--instance FromCStruct ImageBlit where- peekCStruct p = do- srcSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers))- let psrcOffsets = lowerArrayPtr @Offset3D ((p `plusPtr` 16 :: Ptr (Data.Vector.Storable.Sized.Vector 2 Offset3D)))- srcOffsets0 <- peekCStruct @Offset3D ((psrcOffsets `advancePtrBytes` 0 :: Ptr Offset3D))- srcOffsets1 <- peekCStruct @Offset3D ((psrcOffsets `advancePtrBytes` 12 :: Ptr Offset3D))- dstSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 40 :: Ptr ImageSubresourceLayers))- let pdstOffsets = lowerArrayPtr @Offset3D ((p `plusPtr` 56 :: Ptr (Data.Vector.Storable.Sized.Vector 2 Offset3D)))- dstOffsets0 <- peekCStruct @Offset3D ((pdstOffsets `advancePtrBytes` 0 :: Ptr Offset3D))- dstOffsets1 <- peekCStruct @Offset3D ((pdstOffsets `advancePtrBytes` 12 :: Ptr Offset3D))- pure $ ImageBlit- srcSubresource ((srcOffsets0, srcOffsets1)) dstSubresource ((dstOffsets0, dstOffsets1))--instance Zero ImageBlit where- zero = ImageBlit- zero- (zero, zero)- zero- (zero, zero)----- | VkBufferImageCopy - Structure specifying a buffer image copy operation------ = Description------ When copying to or from a depth or stencil aspect, the data in buffer--- memory uses a layout that is a (mostly) tightly packed representation of--- the depth or stencil data. Specifically:------ - data copied to or from the stencil aspect of any depth\/stencil--- format is tightly packed with one--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_S8_UINT' value per--- texel.------ - data copied to or from the depth aspect of a--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D16_UNORM' or--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D16_UNORM_S8_UINT'--- format is tightly packed with one--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D16_UNORM' value per--- texel.------ - data copied to or from the depth aspect of a--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D32_SFLOAT' or--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D32_SFLOAT_S8_UINT'--- format is tightly packed with one--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D32_SFLOAT' value per--- texel.------ - data copied to or from the depth aspect of a--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_X8_D24_UNORM_PACK32' or--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D24_UNORM_S8_UINT'--- format is packed with one 32-bit word per texel with the D24 value--- in the LSBs of the word, and undefined values in the eight MSBs.------ Note------ To copy both the depth and stencil aspects of a depth\/stencil format,--- two entries in @pRegions@ /can/ be used, where one specifies the depth--- aspect in 'Graphics.Vulkan.Core10.Image.ImageSubresource', and the other--- specifies the stencil aspect.------ Because depth or stencil aspect buffer to image copies /may/ require--- format conversions on some implementations, they are not supported on--- queues that do not support graphics.------ When copying to a depth aspect, and the--- @https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/html\/vkspec.html#VK_EXT_depth_range_unrestricted@--- extension is not enabled, the data in buffer memory /must/ be in the--- range [0,1], or the resulting values are undefined.------ Copies are done layer by layer starting with image layer--- @baseArrayLayer@ member of--- 'Graphics.Vulkan.Core10.Image.ImageSubresource'. @layerCount@ layers are--- copied from the source image or to the destination image.------ == Valid Usage------ - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'--- parameter’s format is not a depth\/stencil format or a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,--- then @bufferOffset@ /must/ be a multiple of the format’s texel block--- size.------ - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'--- parameter’s format is a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,--- then @bufferOffset@ /must/ be a multiple of the element size of the--- compatible format for the format and the @aspectMask@ of the--- 'Graphics.Vulkan.Core10.Image.ImageSubresource' as defined in--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatible-planes>------ - @bufferOffset@ /must/ be a multiple of @4@------ - @bufferRowLength@ /must/ be @0@, or greater than or equal to the--- @width@ member of @imageExtent@------ - @bufferImageHeight@ /must/ be @0@, or greater than or equal to the--- @height@ member of @imageExtent@------ - @imageOffset.x@ and (@imageExtent.width@ + @imageOffset.x@) /must/--- both be greater than or equal to @0@ and less than or equal to the--- image subresource width where this refers to the width of the--- /plane/ of the image involved in the copy in the case of a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>------ - @imageOffset.y@ and (imageExtent.height + @imageOffset.y@) /must/--- both be greater than or equal to @0@ and less than or equal to the--- image subresource height where this refers to the height of the--- /plane/ of the image involved in the copy in the case of a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>------ - If the calling command’s @srcImage@ ('cmdCopyImageToBuffer') or--- @dstImage@ ('cmdCopyBufferToImage') is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then--- @imageOffset.y@ /must/ be @0@ and @imageExtent.height@ /must/ be--- @1@.------ - @imageOffset.z@ and (imageExtent.depth + @imageOffset.z@) /must/--- both be greater than or equal to @0@ and less than or equal to the--- image subresource depth------ - If the calling command’s @srcImage@ ('cmdCopyImageToBuffer') or--- @dstImage@ ('cmdCopyBufferToImage') is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' or--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then--- @imageOffset.z@ /must/ be @0@ and @imageExtent.depth@ /must/ be @1@------ - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'--- parameter is a compressed image, or a /single-plane/, “@_422@” image--- format, @bufferRowLength@ /must/ be a multiple of the compressed--- texel block width------ - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'--- parameter is a compressed image, or a /single-plane/, “@_422@” image--- format, @bufferImageHeight@ /must/ be a multiple of the compressed--- texel block height------ - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'--- parameter is a compressed image, or a /single-plane/, “@_422@” image--- format, all members of @imageOffset@ /must/ be a multiple of the--- corresponding dimensions of the compressed texel block------ - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'--- parameter is a compressed image, or a /single-plane/, “@_422@” image--- format, @bufferOffset@ /must/ be a multiple of the compressed texel--- block size in bytes------ - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'--- parameter is a compressed image, or a /single-plane/, “@_422@” image--- format, @imageExtent.width@ /must/ be a multiple of the compressed--- texel block width or (@imageExtent.width@ + @imageOffset.x@) /must/--- equal the image subresource width------ - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'--- parameter is a compressed image, or a /single-plane/, “@_422@” image--- format, @imageExtent.height@ /must/ be a multiple of the compressed--- texel block height or (@imageExtent.height@ + @imageOffset.y@)--- /must/ equal the image subresource height------ - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'--- parameter is a compressed image, or a /single-plane/, “@_422@” image--- format, @imageExtent.depth@ /must/ be a multiple of the compressed--- texel block depth or (@imageExtent.depth@ + @imageOffset.z@) /must/--- equal the image subresource depth------ - The @aspectMask@ member of--- 'Graphics.Vulkan.Core10.Image.ImageSubresource' /must/ specify--- aspects present in the calling command’s--- 'Graphics.Vulkan.Core10.Handles.Image' parameter------ - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'--- parameter’s format is a--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,--- then the @aspectMask@ member of--- 'Graphics.Vulkan.Core10.Image.ImageSubresource' /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',--- or--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'--- (with--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'--- valid only for image formats with three planes)------ - The @aspectMask@ member of--- 'Graphics.Vulkan.Core10.Image.ImageSubresource' /must/ only have a--- single bit set------ - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'--- parameter is of 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType'--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', the--- @baseArrayLayer@ and @layerCount@ members of--- 'Graphics.Vulkan.Core10.Image.ImageSubresource' /must/ be @0@ and--- @1@, respectively------ == Valid Usage (Implicit)------ - 'Graphics.Vulkan.Core10.Image.ImageSubresource' /must/ be a valid--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'--- structure------ = See Also------ 'Graphics.Vulkan.Core10.BaseType.DeviceSize',--- 'Graphics.Vulkan.Core10.SharedTypes.Extent3D',--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers',--- 'Graphics.Vulkan.Core10.SharedTypes.Offset3D', 'cmdCopyBufferToImage',--- 'cmdCopyImageToBuffer'-data BufferImageCopy = BufferImageCopy- { -- | @bufferOffset@ is the offset in bytes from the start of the buffer- -- object where the image data is copied from or to.- bufferOffset :: DeviceSize- , -- | @bufferRowLength@ and @bufferImageHeight@ specify in texels a subregion- -- of a larger two- or three-dimensional image in buffer memory, and- -- control the addressing calculations. If either of these values is zero,- -- that aspect of the buffer memory is considered to be tightly packed- -- according to the @imageExtent@.- bufferRowLength :: Word32- , -- No documentation found for Nested "VkBufferImageCopy" "bufferImageHeight"- bufferImageHeight :: Word32- , -- | 'Graphics.Vulkan.Core10.Image.ImageSubresource' is a- -- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers' used to- -- specify the specific image subresources of the image used for the source- -- or destination image data.- imageSubresource :: ImageSubresourceLayers- , -- | @imageOffset@ selects the initial @x@, @y@, @z@ offsets in texels of the- -- sub-region of the source or destination image data.- imageOffset :: Offset3D- , -- | @imageExtent@ is the size in texels of the image to copy in @width@,- -- @height@ and @depth@.- imageExtent :: Extent3D- }- deriving (Typeable)-deriving instance Show BufferImageCopy--instance ToCStruct BufferImageCopy where- withCStruct x f = allocaBytesAligned 56 8 $ \p -> pokeCStruct p x (f p)- pokeCStruct p BufferImageCopy{..} f = evalContT $ do- lift $ poke ((p `plusPtr` 0 :: Ptr DeviceSize)) (bufferOffset)- lift $ poke ((p `plusPtr` 8 :: Ptr Word32)) (bufferRowLength)- lift $ poke ((p `plusPtr` 12 :: Ptr Word32)) (bufferImageHeight)- ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr ImageSubresourceLayers)) (imageSubresource) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 32 :: Ptr Offset3D)) (imageOffset) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 44 :: Ptr Extent3D)) (imageExtent) . ($ ())- lift $ f- cStructSize = 56- cStructAlignment = 8- pokeZeroCStruct p f = evalContT $ do- lift $ poke ((p `plusPtr` 0 :: Ptr DeviceSize)) (zero)- lift $ poke ((p `plusPtr` 8 :: Ptr Word32)) (zero)- lift $ poke ((p `plusPtr` 12 :: Ptr Word32)) (zero)- ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 32 :: Ptr Offset3D)) (zero) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 44 :: Ptr Extent3D)) (zero) . ($ ())- lift $ f--instance FromCStruct BufferImageCopy where- peekCStruct p = do- bufferOffset <- peek @DeviceSize ((p `plusPtr` 0 :: Ptr DeviceSize))- bufferRowLength <- peek @Word32 ((p `plusPtr` 8 :: Ptr Word32))- bufferImageHeight <- peek @Word32 ((p `plusPtr` 12 :: Ptr Word32))- imageSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 16 :: Ptr ImageSubresourceLayers))- imageOffset <- peekCStruct @Offset3D ((p `plusPtr` 32 :: Ptr Offset3D))- imageExtent <- peekCStruct @Extent3D ((p `plusPtr` 44 :: Ptr Extent3D))- pure $ BufferImageCopy- bufferOffset bufferRowLength bufferImageHeight imageSubresource imageOffset imageExtent--instance Zero BufferImageCopy where- zero = BufferImageCopy- zero- zero- zero- zero- zero- zero----- | VkImageResolve - Structure specifying an image resolve operation------ == Valid Usage------ - The @aspectMask@ member of @srcSubresource@ and @dstSubresource@--- /must/ only contain--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT'------ - The @layerCount@ member of @srcSubresource@ and @dstSubresource@--- /must/ match------ - If either of the calling command’s @srcImage@ or @dstImage@--- parameters are of 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType'--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', the--- @baseArrayLayer@ and @layerCount@ members of both @srcSubresource@--- and @dstSubresource@ /must/ be @0@ and @1@, respectively------ - @srcOffset.x@ and (@extent.width@ + @srcOffset.x@) /must/ both be--- greater than or equal to @0@ and less than or equal to the source--- image subresource width------ - @srcOffset.y@ and (@extent.height@ + @srcOffset.y@) /must/ both be--- greater than or equal to @0@ and less than or equal to the source--- image subresource height------ - If the calling command’s @srcImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then--- @srcOffset.y@ /must/ be @0@ and @extent.height@ /must/ be @1@.------ - @srcOffset.z@ and (@extent.depth@ + @srcOffset.z@) /must/ both be--- greater than or equal to @0@ and less than or equal to the source--- image subresource depth------ - If the calling command’s @srcImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' or--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then--- @srcOffset.z@ /must/ be @0@ and @extent.depth@ /must/ be @1@.------ - @dstOffset.x@ and (@extent.width@ + @dstOffset.x@) /must/ both be--- greater than or equal to @0@ and less than or equal to the--- destination image subresource width------ - @dstOffset.y@ and (@extent.height@ + @dstOffset.y@) /must/ both be--- greater than or equal to @0@ and less than or equal to the--- destination image subresource height------ - If the calling command’s @dstImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then--- @dstOffset.y@ /must/ be @0@ and @extent.height@ /must/ be @1@.------ - @dstOffset.z@ and (@extent.depth@ + @dstOffset.z@) /must/ both be--- greater than or equal to @0@ and less than or equal to the--- destination image subresource depth------ - If the calling command’s @dstImage@ is of type--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' or--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then--- @dstOffset.z@ /must/ be @0@ and @extent.depth@ /must/ be @1@.------ == Valid Usage (Implicit)------ - @srcSubresource@ /must/ be a valid--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'--- structure------ - @dstSubresource@ /must/ be a valid--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'--- structure------ = See Also------ 'Graphics.Vulkan.Core10.SharedTypes.Extent3D',--- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers',--- 'Graphics.Vulkan.Core10.SharedTypes.Offset3D', 'cmdResolveImage'-data ImageResolve = ImageResolve- { -- | @srcSubresource@ and @dstSubresource@ are- -- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers' structures- -- specifying the image subresources of the images used for the source and- -- destination image data, respectively. Resolve of depth\/stencil images- -- is not supported.- srcSubresource :: ImageSubresourceLayers- , -- | @srcOffset@ and @dstOffset@ select the initial @x@, @y@, and @z@ offsets- -- in texels of the sub-regions of the source and destination image data.- srcOffset :: Offset3D- , -- No documentation found for Nested "VkImageResolve" "dstSubresource"- dstSubresource :: ImageSubresourceLayers- , -- No documentation found for Nested "VkImageResolve" "dstOffset"- dstOffset :: Offset3D- , -- | @extent@ is the size in texels of the source image to resolve in- -- @width@, @height@ and @depth@.- extent :: Extent3D- }- deriving (Typeable)-deriving instance Show ImageResolve--instance ToCStruct ImageResolve where- withCStruct x f = allocaBytesAligned 68 4 $ \p -> pokeCStruct p x (f p)- pokeCStruct p ImageResolve{..} f = evalContT $ do- ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers)) (srcSubresource) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr Offset3D)) (srcOffset) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 28 :: Ptr ImageSubresourceLayers)) (dstSubresource) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 44 :: Ptr Offset3D)) (dstOffset) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 56 :: Ptr Extent3D)) (extent) . ($ ())- lift $ f- cStructSize = 68- cStructAlignment = 4- pokeZeroCStruct p f = evalContT $ do- ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr Offset3D)) (zero) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 28 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 44 :: Ptr Offset3D)) (zero) . ($ ())- ContT $ pokeCStruct ((p `plusPtr` 56 :: Ptr Extent3D)) (zero) . ($ ())- lift $ f--instance FromCStruct ImageResolve where- peekCStruct p = do- srcSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers))- srcOffset <- peekCStruct @Offset3D ((p `plusPtr` 16 :: Ptr Offset3D))- dstSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 28 :: Ptr ImageSubresourceLayers))- dstOffset <- peekCStruct @Offset3D ((p `plusPtr` 44 :: Ptr Offset3D))- extent <- peekCStruct @Extent3D ((p `plusPtr` 56 :: Ptr Extent3D))- pure $ ImageResolve- srcSubresource srcOffset dstSubresource dstOffset extent--instance Zero ImageResolve where- zero = ImageResolve- zero- zero- zero- zero- zero----- | VkRenderPassBeginInfo - Structure specifying render pass begin info------ = Description------ @renderArea@ is the render area that is affected by the render pass--- instance. The effects of attachment load, store and multisample resolve--- operations are restricted to the pixels whose x and y coordinates fall--- within the render area on all attachments. The render area extends to--- all layers of 'Graphics.Vulkan.Core10.Handles.Framebuffer'. The--- application /must/ ensure (using scissor if necessary) that all--- rendering is contained within the render area. The render area, after--- any transform specified by--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'::@transform@--- is applied, /must/ be contained within the framebuffer dimensions.------ If--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vertexpostproc-renderpass-transform render pass transform>--- is enabled, then @renderArea@ must equal the framebuffer pre-transformed--- dimensions. After @renderArea@ has been transformed by--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'::@transform@,--- the resulting render area /must/ be equal to the framebuffer dimensions.------ When multiview is enabled, the resolve operation at the end of a subpass--- applies to all views in the view mask.------ Note------ There /may/ be a performance cost for using a render area smaller than--- the framebuffer, unless it matches the render area granularity for the--- render pass.------ == Valid Usage------ - @clearValueCount@ /must/ be greater than the largest attachment--- index in 'Graphics.Vulkan.Core10.Handles.RenderPass' that specifies--- a @loadOp@ (or @stencilLoadOp@, if the attachment has a--- depth\/stencil format) of--- 'Graphics.Vulkan.Core10.Enums.AttachmentLoadOp.ATTACHMENT_LOAD_OP_CLEAR'------ - 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ be--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>--- with the 'Graphics.Vulkan.Core10.Handles.RenderPass' member of the--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo' structure--- specified when creating 'Graphics.Vulkan.Core10.Handles.Framebuffer'------ - If the @pNext@ chain does not contain--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo'--- or its @deviceRenderAreaCount@ member is equal to 0,--- @renderArea.offset.x@ /must/ be greater than or equal to 0------ - If the @pNext@ chain does not contain--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo'--- or its @deviceRenderAreaCount@ member is equal to 0,--- @renderArea.offset.y@ /must/ be greater than or equal to 0------ - If the @pNext@ chain does not contain--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo'--- or its @deviceRenderAreaCount@ member is equal to 0,--- @renderArea.offset.x@ + @renderArea.offset.width@ /must/ be less--- than or equal to--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@width@ the--- 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with------ - If the @pNext@ chain does not contain--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo'--- or its @deviceRenderAreaCount@ member is equal to 0,--- @renderArea.offset.y@ + @renderArea.offset.height@ /must/ be less--- than or equal to--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@height@ the--- 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with------ - If the @pNext@ chain contains--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo',--- the @offset.x@ member of each element of @pDeviceRenderAreas@ /must/--- be greater than or equal to 0------ - If the @pNext@ chain contains--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo',--- the @offset.y@ member of each element of @pDeviceRenderAreas@ /must/--- be greater than or equal to 0------ - If the @pNext@ chain contains--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo',--- @offset.x@ + @offset.width@ of each element of @pDeviceRenderAreas@--- /must/ be less than or equal to--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@width@ the--- 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with------ - If the @pNext@ chain contains--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo',--- @offset.y@ + @offset.height@ of each element of @pDeviceRenderAreas@--- /must/ be less than or equal to--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@height@ the--- 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with------ - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with a--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- value that did not include--- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',--- and the @pNext@ chain includes a--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'--- structure, its @attachmentCount@ /must/ be zero------ - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with a--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- value that included--- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',--- the @attachmentCount@ of a--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'--- structure included in the @pNext@ chain /must/ be equal to the value--- of--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@attachmentImageInfoCount@--- used to create 'Graphics.Vulkan.Core10.Handles.Framebuffer'------ - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with a--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- value that included--- 'Graphics.Vulkan.Extensions.VK_KHR_imageless_framebuffer.FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR',--- each element of the @pAttachments@ member of a--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'--- structure included in the @pNext@ chain /must/ have been created on--- the same 'Graphics.Vulkan.Core10.Handles.Device' as--- 'Graphics.Vulkan.Core10.Handles.Framebuffer' and--- 'Graphics.Vulkan.Core10.Handles.RenderPass'------ - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with a--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- value that included--- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',--- each element of the @pAttachments@ member of a--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'--- structure included in the @pNext@ chain /must/ be a--- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with--- a value of--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- equal to the 'Graphics.Vulkan.Core10.BaseType.Flags' member of the--- corresponding element of--- 'Graphics.Vulkan.Extensions.VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfoKHR'::@pAttachments@--- used to create 'Graphics.Vulkan.Core10.Handles.Framebuffer'------ - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with a--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- value that included--- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',--- each element of the @pAttachments@ member of a--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'--- structure included in the @pNext@ chain /must/ be a--- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with--- a value of 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@usage@--- equal to the @usage@ member of the corresponding element of--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@pAttachments@--- used to create 'Graphics.Vulkan.Core10.Handles.Framebuffer'------ - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with a--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- value that included--- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',--- each element of the @pAttachments@ member of a--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'--- structure included in the @pNext@ chain /must/ be a--- 'Graphics.Vulkan.Core10.Handles.ImageView' with a width equal to the--- @width@ member of the corresponding element of--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@pAttachments@--- used to create 'Graphics.Vulkan.Core10.Handles.Framebuffer'------ - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with a--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- value that included--- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',--- each element of the @pAttachments@ member of a--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'--- structure included in the @pNext@ chain /must/ be a--- 'Graphics.Vulkan.Core10.Handles.ImageView' with a height equal to--- the @height@ member of the corresponding element of--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@pAttachments@--- used to create 'Graphics.Vulkan.Core10.Handles.Framebuffer'------ - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with a--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- value that included--- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',--- each element of the @pAttachments@ member of a--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'--- structure included in the @pNext@ chain /must/ be a--- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with--- a value of--- 'Graphics.Vulkan.Core10.ImageView.ImageViewCreateInfo'::@subresourceRange.layerCount@--- equal to the @layerCount@ member of the corresponding element of--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@pAttachments@--- used to create 'Graphics.Vulkan.Core10.Handles.Framebuffer'------ - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with a--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- value that included--- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',--- each element of the @pAttachments@ member of a--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'--- structure included in the @pNext@ chain /must/ be a--- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with--- a value of--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'::@viewFormatCount@--- equal to the @viewFormatCount@ member of the corresponding element--- of--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@pAttachments@--- used to create 'Graphics.Vulkan.Core10.Handles.Framebuffer'------ - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with a--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- value that included--- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',--- each element of the @pAttachments@ member of a--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'--- structure included in the @pNext@ chain /must/ be a--- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with--- a set of elements in--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'::@pViewFormats@--- equal to the set of elements in the @pViewFormats@ member of the--- corresponding element of--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@pAttachments@--- used to create 'Graphics.Vulkan.Core10.Handles.Framebuffer'------ - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with a--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- value that included--- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',--- each element of the @pAttachments@ member of a--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'--- structure included in the @pNext@ chain /must/ be a--- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with--- a value of--- 'Graphics.Vulkan.Core10.ImageView.ImageViewCreateInfo'::'Graphics.Vulkan.Core10.Enums.Format.Format'--- equal to the corresponding value of--- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription'::'Graphics.Vulkan.Core10.Enums.Format.Format'--- in 'Graphics.Vulkan.Core10.Handles.RenderPass'------ - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' was created with a--- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- value that included--- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',--- each element of the @pAttachments@ member of a--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'--- structure included in the @pNext@ chain /must/ be a--- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with--- a value of 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@samples@--- equal to the corresponding value of--- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription'::@samples@ in--- 'Graphics.Vulkan.Core10.Handles.RenderPass'------ - If the @pNext@ chain includes--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM',--- @renderArea@::@offset@ /must/ equal (0,0).------ - If the @pNext@ chain includes--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM',--- @renderArea@::@extent@ transformed by--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'::@transform@--- /must/ equal the 'Graphics.Vulkan.Core10.Handles.Framebuffer'--- dimensions.------ == Valid Usage (Implicit)------ - @sType@ /must/ be--- 'Graphics.Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO'------ - Each @pNext@ member of any structure (including this one) in the--- @pNext@ chain /must/ be either @NULL@ or a pointer to a valid--- instance of--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo',--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo',--- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.RenderPassSampleLocationsBeginInfoEXT',--- or--- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'------ - The @sType@ value of each struct in the @pNext@ chain /must/ be--- unique------ - 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.RenderPass' handle------ - 'Graphics.Vulkan.Core10.Handles.Framebuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Framebuffer' handle------ - If @clearValueCount@ is not @0@, @pClearValues@ /must/ be a valid--- pointer to an array of @clearValueCount@--- 'Graphics.Vulkan.Core10.SharedTypes.ClearValue' unions------ - Both of 'Graphics.Vulkan.Core10.Handles.Framebuffer', and--- 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ have been--- created, allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'------ = See Also------ 'Graphics.Vulkan.Core10.SharedTypes.ClearValue',--- 'Graphics.Vulkan.Core10.Handles.Framebuffer', 'Rect2D',--- 'Graphics.Vulkan.Core10.Handles.RenderPass',--- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType',--- 'cmdBeginRenderPass',--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.cmdBeginRenderPass2',--- 'Graphics.Vulkan.Extensions.VK_KHR_create_renderpass2.cmdBeginRenderPass2KHR'-data RenderPassBeginInfo (es :: [Type]) = RenderPassBeginInfo- { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure.- next :: Chain es- , -- | 'Graphics.Vulkan.Core10.Handles.RenderPass' is the render pass to begin- -- an instance of.- renderPass :: RenderPass- , -- | 'Graphics.Vulkan.Core10.Handles.Framebuffer' is the framebuffer- -- containing the attachments that are used with the render pass.- framebuffer :: Framebuffer- , -- | @renderArea@ is the render area that is affected by the render pass- -- instance, and is described in more detail below.- renderArea :: Rect2D- , -- | @pClearValues@ is a pointer to an array of @clearValueCount@- -- 'Graphics.Vulkan.Core10.SharedTypes.ClearValue' structures that contains- -- clear values for each attachment, if the attachment uses a @loadOp@- -- value of- -- 'Graphics.Vulkan.Core10.Enums.AttachmentLoadOp.ATTACHMENT_LOAD_OP_CLEAR'- -- or if the attachment has a depth\/stencil format and uses a- -- @stencilLoadOp@ value of- -- 'Graphics.Vulkan.Core10.Enums.AttachmentLoadOp.ATTACHMENT_LOAD_OP_CLEAR'.- -- The array is indexed by attachment number. Only elements corresponding- -- to cleared attachments are used. Other elements of @pClearValues@ are- -- ignored.- clearValues :: Vector ClearValue- }- deriving (Typeable)-deriving instance Show (Chain es) => Show (RenderPassBeginInfo es)--instance Extensible RenderPassBeginInfo where- extensibleType = STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO- setNext x next = x{next = next}- getNext RenderPassBeginInfo{..} = next- extends :: forall e b proxy. Typeable e => proxy e -> (Extends RenderPassBeginInfo e => b) -> Maybe b- extends _ f- | Just Refl <- eqT @e @RenderPassTransformBeginInfoQCOM = Just f- | Just Refl <- eqT @e @RenderPassAttachmentBeginInfo = Just f- | Just Refl <- eqT @e @RenderPassSampleLocationsBeginInfoEXT = Just f- | Just Refl <- eqT @e @DeviceGroupRenderPassBeginInfo = Just f- | otherwise = Nothing--instance PokeChain es => ToCStruct (RenderPassBeginInfo es) where- withCStruct x f = allocaBytesAligned 64 8 $ \p -> pokeCStruct p x (f p)- pokeCStruct p RenderPassBeginInfo{..} f = evalContT $ do- lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO)- pNext'' <- fmap castPtr . ContT $ withChain (next)- lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext''- lift $ poke ((p `plusPtr` 16 :: Ptr RenderPass)) (renderPass)- lift $ poke ((p `plusPtr` 24 :: Ptr Framebuffer)) (framebuffer)- ContT $ pokeCStruct ((p `plusPtr` 32 :: Ptr Rect2D)) (renderArea) . ($ ())- lift $ poke ((p `plusPtr` 48 :: Ptr Word32)) ((fromIntegral (Data.Vector.length $ (clearValues)) :: Word32))- pPClearValues' <- ContT $ allocaBytesAligned @ClearValue ((Data.Vector.length (clearValues)) * 16) 4- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPClearValues' `plusPtr` (16 * (i)) :: Ptr ClearValue) (e) . ($ ())) (clearValues)- lift $ poke ((p `plusPtr` 56 :: Ptr (Ptr ClearValue))) (pPClearValues')- lift $ f- cStructSize = 64- cStructAlignment = 8- pokeZeroCStruct p f = evalContT $ do- lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO)- pNext' <- fmap castPtr . ContT $ withZeroChain @es- lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext'- lift $ poke ((p `plusPtr` 16 :: Ptr RenderPass)) (zero)- lift $ poke ((p `plusPtr` 24 :: Ptr Framebuffer)) (zero)- ContT $ pokeCStruct ((p `plusPtr` 32 :: Ptr Rect2D)) (zero) . ($ ())- pPClearValues' <- ContT $ allocaBytesAligned @ClearValue ((Data.Vector.length (mempty)) * 16) 4- Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPClearValues' `plusPtr` (16 * (i)) :: Ptr ClearValue) (e) . ($ ())) (mempty)- lift $ poke ((p `plusPtr` 56 :: Ptr (Ptr ClearValue))) (pPClearValues')- lift $ f--instance es ~ '[] => Zero (RenderPassBeginInfo es) where- zero = RenderPassBeginInfo- ()- zero- zero- zero- mempty----- | VkClearAttachment - Structure specifying a clear attachment------ = Description------ No memory barriers are needed between 'cmdClearAttachments' and--- preceding or subsequent draw or attachment clear commands in the same--- subpass.------ The 'cmdClearAttachments' command is not affected by the bound pipeline--- state.------ Attachments /can/ also be cleared at the beginning of a render pass--- instance by setting @loadOp@ (or @stencilLoadOp@) of--- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' to--- 'Graphics.Vulkan.Core10.Enums.AttachmentLoadOp.ATTACHMENT_LOAD_OP_CLEAR',--- as described for 'Graphics.Vulkan.Core10.Pass.createRenderPass'.------ == Valid Usage------ - If @aspectMask@ includes--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT',--- it /must/ not include--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_DEPTH_BIT'--- or--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT'------ - @aspectMask@ /must/ not include--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_METADATA_BIT'------ - @aspectMask@ /must/ not include--- @VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT@ for any index @i@.------ - 'Graphics.Vulkan.Core10.SharedTypes.ClearValue' /must/ be a valid--- 'Graphics.Vulkan.Core10.SharedTypes.ClearValue' union------ == Valid Usage (Implicit)------ - @aspectMask@ /must/ be a valid combination of--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.ImageAspectFlagBits'--- values------ - @aspectMask@ /must/ not be @0@------ = See Also------ 'Graphics.Vulkan.Core10.SharedTypes.ClearValue',--- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.ImageAspectFlags',--- 'cmdClearAttachments'-data ClearAttachment = ClearAttachment- { -- | @aspectMask@ is a mask selecting the color, depth and\/or stencil- -- aspects of the attachment to be cleared.- aspectMask :: ImageAspectFlags- , -- | @colorAttachment@ is only meaningful if- -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT'- -- is set in @aspectMask@, in which case it is an index to the- -- @pColorAttachments@ array in the- -- 'Graphics.Vulkan.Core10.Pass.SubpassDescription' structure of the- -- current subpass which selects the color attachment to clear.- colorAttachment :: Word32- , -- | 'Graphics.Vulkan.Core10.SharedTypes.ClearValue' is the color or- -- depth\/stencil value to clear the attachment to, as described in+ , cmdWithQuery+ , cmdEndQuery+ , cmdResetQueryPool+ , cmdWriteTimestamp+ , cmdCopyQueryPoolResults+ , cmdPushConstants+ , cmdBeginRenderPass+ , cmdWithRenderPass+ , cmdNextSubpass+ , cmdEndRenderPass+ , cmdExecuteCommands+ , Viewport(..)+ , Rect2D(..)+ , ClearRect(..)+ , BufferCopy(..)+ , ImageCopy(..)+ , ImageBlit(..)+ , BufferImageCopy(..)+ , ImageResolve(..)+ , RenderPassBeginInfo(..)+ , ClearAttachment(..)+ ) where++import Control.Exception.Base (bracket_)+import Control.Monad (unless)+import Control.Monad.IO.Class (liftIO)+import Data.Typeable (eqT)+import Foreign.Marshal.Alloc (allocaBytesAligned)+import GHC.IO (throwIO)+import GHC.Ptr (castPtr)+import Foreign.Ptr (plusPtr)+import Control.Monad.Trans.Class (lift)+import Control.Monad.Trans.Cont (evalContT)+import qualified Data.Vector (imapM_)+import qualified Data.Vector (length)+import Foreign.C.Types (CFloat(..))+import Control.Monad.IO.Class (MonadIO)+import Data.Type.Equality ((:~:)(Refl))+import Data.Typeable (Typeable)+import Foreign.C.Types (CFloat)+import Foreign.C.Types (CFloat(CFloat))+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 Data.Word (Word32)+import Data.Kind (Type)+import Control.Monad.Trans.Cont (ContT(..))+import Data.Vector (Vector)+import qualified Data.Vector.Storable.Sized (Vector)+import Graphics.Vulkan.CStruct.Utils (advancePtrBytes)+import Graphics.Vulkan.CStruct.Utils (lowerArrayPtr)+import Graphics.Vulkan.NamedType ((:::))+import Graphics.Vulkan.Core10.Handles (Buffer)+import Graphics.Vulkan.Core10.Handles (Buffer(..))+import Graphics.Vulkan.Core10.OtherTypes (BufferMemoryBarrier)+import Graphics.Vulkan.CStruct.Extends (Chain)+import Graphics.Vulkan.Core10.SharedTypes (ClearColorValue)+import Graphics.Vulkan.Core10.SharedTypes (ClearDepthStencilValue)+import Graphics.Vulkan.Core10.SharedTypes (ClearValue)+import Graphics.Vulkan.Core10.Handles (CommandBuffer)+import Graphics.Vulkan.Core10.Handles (CommandBuffer(..))+import Graphics.Vulkan.Core10.Handles (CommandBuffer_T)+import Graphics.Vulkan.Core10.Enums.DependencyFlagBits (DependencyFlagBits(..))+import Graphics.Vulkan.Core10.Enums.DependencyFlagBits (DependencyFlags)+import Graphics.Vulkan.Core10.Handles (DescriptorSet)+import Graphics.Vulkan.Core10.Handles (DescriptorSet(..))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBeginQuery))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBeginRenderPass))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBindDescriptorSets))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBindIndexBuffer))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBindPipeline))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBindVertexBuffers))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdBlitImage))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdClearAttachments))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdClearColorImage))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdClearDepthStencilImage))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdCopyBuffer))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdCopyBufferToImage))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdCopyImage))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdCopyImageToBuffer))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdCopyQueryPoolResults))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdDispatch))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdDispatchIndirect))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdDraw))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdDrawIndexed))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdDrawIndexedIndirect))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdDrawIndirect))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdEndQuery))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdEndRenderPass))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdExecuteCommands))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdFillBuffer))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdNextSubpass))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdPipelineBarrier))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdPushConstants))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdResetEvent))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdResetQueryPool))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdResolveImage))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetBlendConstants))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetDepthBias))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetDepthBounds))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetEvent))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetLineWidth))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetScissor))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetStencilCompareMask))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetStencilReference))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetStencilWriteMask))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdSetViewport))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdUpdateBuffer))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdWaitEvents))+import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCmdWriteTimestamp))+import {-# SOURCE #-} Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group (DeviceGroupRenderPassBeginInfo)+import Graphics.Vulkan.Core10.BaseType (DeviceSize)+import Graphics.Vulkan.Core10.Handles (Event)+import Graphics.Vulkan.Core10.Handles (Event(..))+import Graphics.Vulkan.CStruct.Extends (Extends)+import Graphics.Vulkan.CStruct.Extends (Extensible(..))+import Graphics.Vulkan.Core10.SharedTypes (Extent2D)+import Graphics.Vulkan.Core10.SharedTypes (Extent3D)+import Graphics.Vulkan.Core10.Enums.Filter (Filter)+import Graphics.Vulkan.Core10.Enums.Filter (Filter(..))+import Graphics.Vulkan.Core10.Handles (Framebuffer)+import Graphics.Vulkan.CStruct (FromCStruct)+import Graphics.Vulkan.CStruct (FromCStruct(..))+import Graphics.Vulkan.Core10.Handles (Image)+import Graphics.Vulkan.Core10.Handles (Image(..))+import Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits (ImageAspectFlags)+import Graphics.Vulkan.Core10.Enums.ImageLayout (ImageLayout)+import Graphics.Vulkan.Core10.Enums.ImageLayout (ImageLayout(..))+import Graphics.Vulkan.Core10.OtherTypes (ImageMemoryBarrier)+import Graphics.Vulkan.Core10.SharedTypes (ImageSubresourceLayers)+import Graphics.Vulkan.Core10.SharedTypes (ImageSubresourceRange)+import Graphics.Vulkan.Core10.Enums.IndexType (IndexType)+import Graphics.Vulkan.Core10.Enums.IndexType (IndexType(..))+import Graphics.Vulkan.Core10.OtherTypes (MemoryBarrier)+import Graphics.Vulkan.Core10.SharedTypes (Offset2D)+import Graphics.Vulkan.Core10.SharedTypes (Offset3D)+import Graphics.Vulkan.Core10.Handles (Pipeline)+import Graphics.Vulkan.Core10.Handles (Pipeline(..))+import Graphics.Vulkan.Core10.Enums.PipelineBindPoint (PipelineBindPoint)+import Graphics.Vulkan.Core10.Enums.PipelineBindPoint (PipelineBindPoint(..))+import Graphics.Vulkan.Core10.Handles (PipelineLayout)+import Graphics.Vulkan.Core10.Handles (PipelineLayout(..))+import Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlagBits)+import Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlagBits(..))+import Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlags)+import Graphics.Vulkan.CStruct.Extends (PokeChain)+import Graphics.Vulkan.CStruct.Extends (PokeChain(..))+import Graphics.Vulkan.Core10.Enums.QueryControlFlagBits (QueryControlFlagBits(..))+import Graphics.Vulkan.Core10.Enums.QueryControlFlagBits (QueryControlFlags)+import Graphics.Vulkan.Core10.Handles (QueryPool)+import Graphics.Vulkan.Core10.Handles (QueryPool(..))+import Graphics.Vulkan.Core10.Enums.QueryResultFlagBits (QueryResultFlagBits(..))+import Graphics.Vulkan.Core10.Enums.QueryResultFlagBits (QueryResultFlags)+import Graphics.Vulkan.Core10.Handles (RenderPass)+import {-# SOURCE #-} Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer (RenderPassAttachmentBeginInfo)+import {-# SOURCE #-} Graphics.Vulkan.Extensions.VK_EXT_sample_locations (RenderPassSampleLocationsBeginInfoEXT)+import {-# SOURCE #-} Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform (RenderPassTransformBeginInfoQCOM)+import Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlagBits(..))+import Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)+import Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits (StencilFaceFlagBits(..))+import Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits (StencilFaceFlags)+import Graphics.Vulkan.Core10.Enums.StructureType (StructureType)+import Graphics.Vulkan.Core10.Enums.SubpassContents (SubpassContents)+import Graphics.Vulkan.Core10.Enums.SubpassContents (SubpassContents(..))+import Graphics.Vulkan.CStruct (ToCStruct)+import Graphics.Vulkan.CStruct (ToCStruct(..))+import Graphics.Vulkan.Zero (Zero(..))+import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO))+foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdBindPipeline+ :: FunPtr (Ptr CommandBuffer_T -> PipelineBindPoint -> Pipeline -> IO ()) -> Ptr CommandBuffer_T -> PipelineBindPoint -> Pipeline -> IO ()++-- | vkCmdBindPipeline - Bind a pipeline object to a command buffer+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer that the pipeline will be+-- bound to.+--+-- - @pipelineBindPoint@ is a+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'+-- value specifying whether to bind to the compute or graphics bind+-- point. Binding one does not disturb the other.+--+-- - @pipeline@ is the pipeline to be bound.+--+-- = Description+--+-- Once bound, a pipeline binding affects subsequent graphics or compute+-- commands in the command buffer until a different pipeline is bound to+-- the bind point. The pipeline bound to+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_COMPUTE'+-- controls the behavior of 'cmdDispatch' and 'cmdDispatchIndirect'. The+-- pipeline bound to+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS'+-- controls the behavior of all+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#drawing drawing commands>.+-- The pipeline bound to+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_RAY_TRACING_NV'+-- controls the behavior of+-- 'Graphics.Vulkan.Extensions.VK_NV_ray_tracing.cmdTraceRaysNV'. No other+-- commands are affected by the pipeline state.+--+-- == Valid Usage+--+-- - If @pipelineBindPoint@ is+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_COMPUTE',+-- the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support compute operations+--+-- - If @pipelineBindPoint@ is+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS',+-- the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- - If @pipelineBindPoint@ is+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_COMPUTE',+-- @pipeline@ /must/ be a compute pipeline+--+-- - If @pipelineBindPoint@ is+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS',+-- @pipeline@ /must/ be a graphics pipeline+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-variableMultisampleRate variable multisample rate>+-- feature is not supported, @pipeline@ is a graphics pipeline, the+-- current subpass has no attachments, and this is not the first call+-- to this function with a graphics pipeline after transitioning to the+-- current subpass, then the sample count specified by this pipeline+-- /must/ match that set in the previous pipeline+--+-- - If+-- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PhysicalDeviceSampleLocationsPropertiesEXT'::@variableSampleLocations@+-- is 'Graphics.Vulkan.Core10.BaseType.FALSE', and @pipeline@ is a+-- graphics pipeline created with a+-- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'+-- structure having its @sampleLocationsEnable@ member set to+-- 'Graphics.Vulkan.Core10.BaseType.TRUE' but without+-- 'Graphics.Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT'+-- enabled then the current render pass instance /must/ have been begun+-- by specifying a+-- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.RenderPassSampleLocationsBeginInfoEXT'+-- structure whose @pPostSubpassSampleLocations@ member contains an+-- element with a @subpassIndex@ matching the current subpass index and+-- the @sampleLocationsInfo@ member of that element /must/ match the+-- @sampleLocationsInfo@ specified in+-- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'+-- when the pipeline was created+--+-- - This command /must/ not be recorded when transform feedback is+-- active+--+-- - If @pipelineBindPoint@ is+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_RAY_TRACING_NV',+-- the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support compute operations+--+-- - If @pipelineBindPoint@ is+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_RAY_TRACING_NV',+-- the @pipeline@ /must/ be a ray tracing pipeline+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @pipelineBindPoint@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'+-- value+--+-- - @pipeline@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations+--+-- - Both of @commandBuffer@, and @pipeline@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.Pipeline',+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'+cmdBindPipeline :: forall io . MonadIO io => CommandBuffer -> PipelineBindPoint -> Pipeline -> io ()+cmdBindPipeline commandBuffer pipelineBindPoint pipeline = liftIO $ do+ let vkCmdBindPipeline' = mkVkCmdBindPipeline (pVkCmdBindPipeline (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdBindPipeline' (commandBufferHandle (commandBuffer)) (pipelineBindPoint) (pipeline)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdSetViewport+ :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Viewport -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Viewport -> IO ()++-- | vkCmdSetViewport - Set the viewport on a command buffer+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @firstViewport@ is the index of the first viewport whose parameters+-- are updated by the command.+--+-- - @viewportCount@ is the number of viewports whose parameters are+-- updated by the command.+--+-- - @pViewports@ is a pointer to an array of 'Viewport' structures+-- specifying viewport parameters.+--+-- = Description+--+-- The viewport parameters taken from element i of @pViewports@ replace the+-- current state for the viewport index @firstViewport@ + i, for i in [0,+-- @viewportCount@).+--+-- == Valid Usage+--+-- - @firstViewport@ /must/ be less than+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewports@+--+-- - The sum of @firstViewport@ and @viewportCount@ /must/ be between @1@+-- and+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewports@,+-- inclusive+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-multiViewport multiple viewports>+-- feature is not enabled, @firstViewport@ /must/ be @0@+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-multiViewport multiple viewports>+-- feature is not enabled, @viewportCount@ /must/ be @1@+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @pViewports@ /must/ be a valid pointer to an array of+-- @viewportCount@ valid 'Viewport' structures+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- - @viewportCount@ /must/ be greater than @0@+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'Viewport'+cmdSetViewport :: forall io . MonadIO io => CommandBuffer -> ("firstViewport" ::: Word32) -> ("viewports" ::: Vector Viewport) -> io ()+cmdSetViewport commandBuffer firstViewport viewports = liftIO . evalContT $ do+ let vkCmdSetViewport' = mkVkCmdSetViewport (pVkCmdSetViewport (deviceCmds (commandBuffer :: CommandBuffer)))+ pPViewports <- ContT $ allocaBytesAligned @Viewport ((Data.Vector.length (viewports)) * 24) 4+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPViewports `plusPtr` (24 * (i)) :: Ptr Viewport) (e) . ($ ())) (viewports)+ lift $ vkCmdSetViewport' (commandBufferHandle (commandBuffer)) (firstViewport) ((fromIntegral (Data.Vector.length $ (viewports)) :: Word32)) (pPViewports)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdSetScissor+ :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Rect2D -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Rect2D -> IO ()++-- | vkCmdSetScissor - Set the dynamic scissor rectangles on a command buffer+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @firstScissor@ is the index of the first scissor whose state is+-- updated by the command.+--+-- - @scissorCount@ is the number of scissors whose rectangles are+-- updated by the command.+--+-- - @pScissors@ is a pointer to an array of 'Rect2D' structures defining+-- scissor rectangles.+--+-- = Description+--+-- The scissor rectangles taken from element i of @pScissors@ replace the+-- current state for the scissor index @firstScissor@ + i, for i in [0,+-- @scissorCount@).+--+-- Each scissor rectangle is described by a 'Rect2D' structure, with the+-- @offset.x@ and @offset.y@ values determining the upper left corner of+-- the scissor rectangle, and the @extent.width@ and @extent.height@ values+-- determining the size in pixels.+--+-- If a render pass transform is enabled, the (@offset.x@ and @offset.y@)+-- and (@extent.width@ and @extent.height@) values are transformed as+-- described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vertexpostproc-renderpass-transform render pass transform>+-- before participating in the scissor test.+--+-- == Valid Usage+--+-- - @firstScissor@ /must/ be less than+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewports@+--+-- - The sum of @firstScissor@ and @scissorCount@ /must/ be between @1@+-- and+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewports@,+-- inclusive+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-multiViewport multiple viewports>+-- feature is not enabled, @firstScissor@ /must/ be @0@+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-multiViewport multiple viewports>+-- feature is not enabled, @scissorCount@ /must/ be @1@+--+-- - The @x@ and @y@ members of @offset@ member of any element of+-- @pScissors@ /must/ be greater than or equal to @0@+--+-- - Evaluation of (@offset.x@ + @extent.width@) /must/ not cause a+-- signed integer addition overflow for any element of @pScissors@+--+-- - Evaluation of (@offset.y@ + @extent.height@) /must/ not cause a+-- signed integer addition overflow for any element of @pScissors@+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @pScissors@ /must/ be a valid pointer to an array of @scissorCount@+-- 'Rect2D' structures+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- - @scissorCount@ /must/ be greater than @0@+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'Rect2D'+cmdSetScissor :: forall io . MonadIO io => CommandBuffer -> ("firstScissor" ::: Word32) -> ("scissors" ::: Vector Rect2D) -> io ()+cmdSetScissor commandBuffer firstScissor scissors = liftIO . evalContT $ do+ let vkCmdSetScissor' = mkVkCmdSetScissor (pVkCmdSetScissor (deviceCmds (commandBuffer :: CommandBuffer)))+ pPScissors <- ContT $ allocaBytesAligned @Rect2D ((Data.Vector.length (scissors)) * 16) 4+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPScissors `plusPtr` (16 * (i)) :: Ptr Rect2D) (e) . ($ ())) (scissors)+ lift $ vkCmdSetScissor' (commandBufferHandle (commandBuffer)) (firstScissor) ((fromIntegral (Data.Vector.length $ (scissors)) :: Word32)) (pPScissors)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdSetLineWidth+ :: FunPtr (Ptr CommandBuffer_T -> CFloat -> IO ()) -> Ptr CommandBuffer_T -> CFloat -> IO ()++-- | vkCmdSetLineWidth - Set the dynamic line width state+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @lineWidth@ is the width of rasterized line segments.+--+-- == Valid Usage+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-wideLines wide lines>+-- feature is not enabled, @lineWidth@ /must/ be @1.0@+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+cmdSetLineWidth :: forall io . MonadIO io => CommandBuffer -> ("lineWidth" ::: Float) -> io ()+cmdSetLineWidth commandBuffer lineWidth = liftIO $ do+ let vkCmdSetLineWidth' = mkVkCmdSetLineWidth (pVkCmdSetLineWidth (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdSetLineWidth' (commandBufferHandle (commandBuffer)) (CFloat (lineWidth))+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdSetDepthBias+ :: FunPtr (Ptr CommandBuffer_T -> CFloat -> CFloat -> CFloat -> IO ()) -> Ptr CommandBuffer_T -> CFloat -> CFloat -> CFloat -> IO ()++-- | vkCmdSetDepthBias - Set the depth bias dynamic state+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @depthBiasConstantFactor@ is a scalar factor controlling the+-- constant depth value added to each fragment.+--+-- - @depthBiasClamp@ is the maximum (or minimum) depth bias of a+-- fragment.+--+-- - @depthBiasSlopeFactor@ is a scalar factor applied to a fragment’s+-- slope in depth bias calculations.+--+-- = Description+--+-- If @depthBiasEnable@ is 'Graphics.Vulkan.Core10.BaseType.FALSE', no+-- depth bias is applied and the fragment’s depth values are unchanged.+--+-- @depthBiasSlopeFactor@ scales the maximum depth slope of the polygon,+-- and @depthBiasConstantFactor@ scales an implementation-dependent+-- constant that relates to the usable resolution of the depth buffer. The+-- resulting values are summed to produce the depth bias value which is+-- then clamped to a minimum or maximum value specified by+-- @depthBiasClamp@. @depthBiasSlopeFactor@, @depthBiasConstantFactor@, and+-- @depthBiasClamp@ /can/ each be positive, negative, or zero.+--+-- The maximum depth slope m of a triangle is+--+-- \[m = \sqrt{ \left({{\partial z_f} \over {\partial x_f}}\right)^2+-- + \left({{\partial z_f} \over {\partial y_f}}\right)^2}\]+--+-- where (xf, yf, zf) is a point on the triangle. m /may/ be approximated+-- as+--+-- \[m = \max\left( \left| { {\partial z_f} \over {\partial x_f} } \right|,+-- \left| { {\partial z_f} \over {\partial y_f} } \right|+-- \right).\]+--+-- The minimum resolvable difference r is an implementation-dependent+-- parameter that depends on the depth buffer representation. It is the+-- smallest difference in framebuffer coordinate z values that is+-- guaranteed to remain distinct throughout polygon rasterization and in+-- the depth buffer. All pairs of fragments generated by the rasterization+-- of two polygons with otherwise identical vertices, but @z@f values that+-- differ by r, will have distinct depth values.+--+-- For fixed-point depth buffer representations, r is constant throughout+-- the range of the entire depth buffer. For floating-point depth buffers,+-- there is no single minimum resolvable difference. In this case, the+-- minimum resolvable difference for a given polygon is dependent on the+-- maximum exponent, e, in the range of z values spanned by the primitive.+-- If n is the number of bits in the floating-point mantissa, the minimum+-- resolvable difference, r, for the given primitive is defined as+--+-- - r = 2e-n+--+-- If a triangle is rasterized using the+-- 'Graphics.Vulkan.Core10.Enums.PolygonMode.POLYGON_MODE_FILL_RECTANGLE_NV'+-- polygon mode, then this minimum resolvable difference /may/ not be+-- resolvable for samples outside of the triangle, where the depth is+-- extrapolated.+--+-- If no depth buffer is present, r is undefined.+--+-- The bias value o for a polygon is+--+-- \[\begin{aligned}+-- o &= \mathrm{dbclamp}( m \times \mathtt{depthBiasSlopeFactor} + r \times \mathtt{depthBiasConstantFactor} ) \\+-- \text{where} &\quad \mathrm{dbclamp}(x) =+-- \begin{cases}+-- x & \mathtt{depthBiasClamp} = 0 \ \text{or}\ \texttt{NaN} \\+-- \min(x, \mathtt{depthBiasClamp}) & \mathtt{depthBiasClamp} > 0 \\+-- \max(x, \mathtt{depthBiasClamp}) & \mathtt{depthBiasClamp} < 0 \\+-- \end{cases}+-- \end{aligned}\]+--+-- m is computed as described above. If the depth buffer uses a fixed-point+-- representation, m is a function of depth values in the range [0,1], and+-- o is applied to depth values in the same range.+--+-- For fixed-point depth buffers, fragment depth values are always limited+-- to the range [0,1] by clamping after depth bias addition is performed.+-- Unless the+-- @https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/html\/vkspec.html#VK_EXT_depth_range_unrestricted@+-- extension is enabled, fragment depth values are clamped even when the+-- depth buffer uses a floating-point representation.+--+-- == Valid Usage+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-depthBiasClamp depth bias clamping>+-- feature is not enabled, @depthBiasClamp@ /must/ be @0.0@+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+cmdSetDepthBias :: forall io . MonadIO io => CommandBuffer -> ("depthBiasConstantFactor" ::: Float) -> ("depthBiasClamp" ::: Float) -> ("depthBiasSlopeFactor" ::: Float) -> io ()+cmdSetDepthBias commandBuffer depthBiasConstantFactor depthBiasClamp depthBiasSlopeFactor = liftIO $ do+ let vkCmdSetDepthBias' = mkVkCmdSetDepthBias (pVkCmdSetDepthBias (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdSetDepthBias' (commandBufferHandle (commandBuffer)) (CFloat (depthBiasConstantFactor)) (CFloat (depthBiasClamp)) (CFloat (depthBiasSlopeFactor))+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdSetBlendConstants+ :: FunPtr (Ptr CommandBuffer_T -> Ptr (Data.Vector.Storable.Sized.Vector 4 CFloat) -> IO ()) -> Ptr CommandBuffer_T -> Ptr (Data.Vector.Storable.Sized.Vector 4 CFloat) -> IO ()++-- | vkCmdSetBlendConstants - Set the values of blend constants+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @blendConstants@ is a pointer to an array of four values specifying+-- the R, G, B, and A components of the blend constant color used in+-- blending, depending on the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#framebuffer-blendfactors blend factor>.+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+cmdSetBlendConstants :: forall io . MonadIO io => CommandBuffer -> ("blendConstants" ::: (Float, Float, Float, Float)) -> io ()+cmdSetBlendConstants commandBuffer blendConstants = liftIO . evalContT $ do+ let vkCmdSetBlendConstants' = mkVkCmdSetBlendConstants (pVkCmdSetBlendConstants (deviceCmds (commandBuffer :: CommandBuffer)))+ pBlendConstants <- ContT $ allocaBytesAligned @(Data.Vector.Storable.Sized.Vector 4 CFloat) 16 4+ let pBlendConstants' = lowerArrayPtr pBlendConstants+ lift $ case (blendConstants) of+ (e0, e1, e2, e3) -> do+ poke (pBlendConstants' :: Ptr CFloat) (CFloat (e0))+ poke (pBlendConstants' `plusPtr` 4 :: Ptr CFloat) (CFloat (e1))+ poke (pBlendConstants' `plusPtr` 8 :: Ptr CFloat) (CFloat (e2))+ poke (pBlendConstants' `plusPtr` 12 :: Ptr CFloat) (CFloat (e3))+ lift $ vkCmdSetBlendConstants' (commandBufferHandle (commandBuffer)) (pBlendConstants)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdSetDepthBounds+ :: FunPtr (Ptr CommandBuffer_T -> CFloat -> CFloat -> IO ()) -> Ptr CommandBuffer_T -> CFloat -> CFloat -> IO ()++-- | vkCmdSetDepthBounds - Set the depth bounds test values for a command+-- buffer+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @minDepthBounds@ is the lower bound of the range of depth values+-- used in the depth bounds test.+--+-- - @maxDepthBounds@ is the upper bound of the range.+--+-- == Valid Usage+--+-- - Unless the+-- @https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/html\/vkspec.html#VK_EXT_depth_range_unrestricted@+-- extension is enabled @minDepthBounds@ /must/ be between @0.0@ and+-- @1.0@, inclusive+--+-- - Unless the+-- @https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/html\/vkspec.html#VK_EXT_depth_range_unrestricted@+-- extension is enabled @maxDepthBounds@ /must/ be between @0.0@ and+-- @1.0@, inclusive+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+cmdSetDepthBounds :: forall io . MonadIO io => CommandBuffer -> ("minDepthBounds" ::: Float) -> ("maxDepthBounds" ::: Float) -> io ()+cmdSetDepthBounds commandBuffer minDepthBounds maxDepthBounds = liftIO $ do+ let vkCmdSetDepthBounds' = mkVkCmdSetDepthBounds (pVkCmdSetDepthBounds (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdSetDepthBounds' (commandBufferHandle (commandBuffer)) (CFloat (minDepthBounds)) (CFloat (maxDepthBounds))+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdSetStencilCompareMask+ :: FunPtr (Ptr CommandBuffer_T -> StencilFaceFlags -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> StencilFaceFlags -> Word32 -> IO ()++-- | vkCmdSetStencilCompareMask - Set the stencil compare mask dynamic state+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @faceMask@ is a bitmask of+-- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlagBits'+-- specifying the set of stencil state for which to update the compare+-- mask.+--+-- - @compareMask@ is the new value to use as the stencil compare mask.+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @faceMask@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlagBits'+-- values+--+-- - @faceMask@ /must/ not be @0@+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlags'+cmdSetStencilCompareMask :: forall io . MonadIO io => CommandBuffer -> ("faceMask" ::: StencilFaceFlags) -> ("compareMask" ::: Word32) -> io ()+cmdSetStencilCompareMask commandBuffer faceMask compareMask = liftIO $ do+ let vkCmdSetStencilCompareMask' = mkVkCmdSetStencilCompareMask (pVkCmdSetStencilCompareMask (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdSetStencilCompareMask' (commandBufferHandle (commandBuffer)) (faceMask) (compareMask)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdSetStencilWriteMask+ :: FunPtr (Ptr CommandBuffer_T -> StencilFaceFlags -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> StencilFaceFlags -> Word32 -> IO ()++-- | vkCmdSetStencilWriteMask - Set the stencil write mask dynamic state+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @faceMask@ is a bitmask of+-- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlagBits'+-- specifying the set of stencil state for which to update the write+-- mask, as described above for 'cmdSetStencilCompareMask'.+--+-- - @writeMask@ is the new value to use as the stencil write mask.+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @faceMask@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlagBits'+-- values+--+-- - @faceMask@ /must/ not be @0@+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlags'+cmdSetStencilWriteMask :: forall io . MonadIO io => CommandBuffer -> ("faceMask" ::: StencilFaceFlags) -> ("writeMask" ::: Word32) -> io ()+cmdSetStencilWriteMask commandBuffer faceMask writeMask = liftIO $ do+ let vkCmdSetStencilWriteMask' = mkVkCmdSetStencilWriteMask (pVkCmdSetStencilWriteMask (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdSetStencilWriteMask' (commandBufferHandle (commandBuffer)) (faceMask) (writeMask)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdSetStencilReference+ :: FunPtr (Ptr CommandBuffer_T -> StencilFaceFlags -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> StencilFaceFlags -> Word32 -> IO ()++-- | vkCmdSetStencilReference - Set the stencil reference dynamic state+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @faceMask@ is a bitmask of+-- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlagBits'+-- specifying the set of stencil state for which to update the+-- reference value, as described above for 'cmdSetStencilCompareMask'.+--+-- - @reference@ is the new value to use as the stencil reference value.+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @faceMask@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlagBits'+-- values+--+-- - @faceMask@ /must/ not be @0@+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Enums.StencilFaceFlagBits.StencilFaceFlags'+cmdSetStencilReference :: forall io . MonadIO io => CommandBuffer -> ("faceMask" ::: StencilFaceFlags) -> ("reference" ::: Word32) -> io ()+cmdSetStencilReference commandBuffer faceMask reference = liftIO $ do+ let vkCmdSetStencilReference' = mkVkCmdSetStencilReference (pVkCmdSetStencilReference (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdSetStencilReference' (commandBufferHandle (commandBuffer)) (faceMask) (reference)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdBindDescriptorSets+ :: FunPtr (Ptr CommandBuffer_T -> PipelineBindPoint -> PipelineLayout -> Word32 -> Word32 -> Ptr DescriptorSet -> Word32 -> Ptr Word32 -> IO ()) -> Ptr CommandBuffer_T -> PipelineBindPoint -> PipelineLayout -> Word32 -> Word32 -> Ptr DescriptorSet -> Word32 -> Ptr Word32 -> IO ()++-- | vkCmdBindDescriptorSets - Binds descriptor sets to a command buffer+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer that the descriptor sets will+-- be bound to.+--+-- - @pipelineBindPoint@ is a+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'+-- indicating whether the descriptors will be used by graphics+-- pipelines or compute pipelines. There is a separate set of bind+-- points for each of graphics and compute, so binding one does not+-- disturb the other.+--+-- - @layout@ is a 'Graphics.Vulkan.Core10.Handles.PipelineLayout' object+-- used to program the bindings.+--+-- - @firstSet@ is the set number of the first descriptor set to be+-- bound.+--+-- - @descriptorSetCount@ is the number of elements in the+-- @pDescriptorSets@ array.+--+-- - @pDescriptorSets@ is a pointer to an array of handles to+-- 'Graphics.Vulkan.Core10.Handles.DescriptorSet' objects describing+-- the descriptor sets to write to.+--+-- - @dynamicOffsetCount@ is the number of dynamic offsets in the+-- @pDynamicOffsets@ array.+--+-- - @pDynamicOffsets@ is a pointer to an array of @uint32_t@ values+-- specifying dynamic offsets.+--+-- = Description+--+-- 'cmdBindDescriptorSets' causes the sets numbered [@firstSet@..+-- @firstSet@+@descriptorSetCount@-1] to use the bindings stored in+-- @pDescriptorSets@[0..descriptorSetCount-1] for subsequent rendering+-- commands (either compute or graphics, according to the+-- @pipelineBindPoint@). Any bindings that were previously applied via+-- these sets are no longer valid.+--+-- Once bound, a descriptor set affects rendering of subsequent graphics or+-- compute commands in the command buffer until a different set is bound to+-- the same set number, or else until the set is disturbed as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility Pipeline Layout Compatibility>.+--+-- A compatible descriptor set /must/ be bound for all set numbers that any+-- shaders in a pipeline access, at the time that a draw or dispatch+-- command is recorded to execute using that pipeline. However, if none of+-- the shaders in a pipeline statically use any bindings with a particular+-- set number, then no descriptor set need be bound for that set number,+-- even if the pipeline layout includes a non-trivial descriptor set layout+-- for that set number.+--+-- If any of the sets being bound include dynamic uniform or storage+-- buffers, then @pDynamicOffsets@ includes one element for each array+-- element in each dynamic descriptor type binding in each set. Values are+-- taken from @pDynamicOffsets@ in an order such that all entries for set N+-- come before set N+1; within a set, entries are ordered by the binding+-- numbers in the descriptor set layouts; and within a binding array,+-- elements are in order. @dynamicOffsetCount@ /must/ equal the total+-- number of dynamic descriptors in the sets being bound.+--+-- The effective offset used for dynamic uniform and storage buffer+-- bindings is the sum of the relative offset taken from @pDynamicOffsets@,+-- and the base address of the buffer plus base offset in the descriptor+-- set. The range of the dynamic uniform and storage buffer bindings is the+-- buffer range as specified in the descriptor set.+--+-- Each of the @pDescriptorSets@ /must/ be compatible with the pipeline+-- layout specified by @layout@. The layout used to program the bindings+-- /must/ also be compatible with the pipeline used in subsequent graphics+-- or compute commands, as defined in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility Pipeline Layout Compatibility>+-- section.+--+-- The descriptor set contents bound by a call to 'cmdBindDescriptorSets'+-- /may/ be consumed at the following times:+--+-- - For descriptor bindings created with the+-- 'Graphics.Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT'+-- bit set, the contents /may/ be consumed when the command buffer is+-- submitted to a queue, or during shader execution of the resulting+-- draws and dispatches, or any time in between. Otherwise,+--+-- - during host execution of the command, or during shader execution of+-- the resulting draws and dispatches, or any time in between.+--+-- Thus, the contents of a descriptor set binding /must/ not be altered+-- (overwritten by an update command, or freed) between the first point in+-- time that it /may/ be consumed, and when the command completes executing+-- on the queue.+--+-- The contents of @pDynamicOffsets@ are consumed immediately during+-- execution of 'cmdBindDescriptorSets'. Once all pending uses have+-- completed, it is legal to update and reuse a descriptor set.+--+-- == Valid Usage+--+-- - Each element of @pDescriptorSets@ /must/ have been allocated with a+-- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' that matches+-- (is the same as, or identically defined as) the+-- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' at set /n/ in+-- @layout@, where /n/ is the sum of @firstSet@ and the index into+-- @pDescriptorSets@+--+-- - @dynamicOffsetCount@ /must/ be equal to the total number of dynamic+-- descriptors in @pDescriptorSets@+--+-- - The sum of @firstSet@ and @descriptorSetCount@ /must/ be less than+-- or equal to+-- 'Graphics.Vulkan.Core10.PipelineLayout.PipelineLayoutCreateInfo'::@setLayoutCount@+-- provided when @layout@ was created+--+-- - @pipelineBindPoint@ /must/ be supported by the @commandBuffer@’s+-- parent 'Graphics.Vulkan.Core10.Handles.CommandPool'’s queue family+--+-- - Each element of @pDynamicOffsets@ which corresponds to a descriptor+-- binding with type+-- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC'+-- /must/ be a multiple of+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@minUniformBufferOffsetAlignment@+--+-- - Each element of @pDynamicOffsets@ which corresponds to a descriptor+-- binding with type+-- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'+-- /must/ be a multiple of+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@minStorageBufferOffsetAlignment@+--+-- - For each dynamic uniform or storage buffer binding in+-- @pDescriptorSets@, the sum of the effective offset, as defined+-- above, and the range of the binding /must/ be less than or equal to+-- the size of the buffer+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @pipelineBindPoint@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'+-- value+--+-- - @layout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' handle+--+-- - @pDescriptorSets@ /must/ be a valid pointer to an array of+-- @descriptorSetCount@ valid+-- 'Graphics.Vulkan.Core10.Handles.DescriptorSet' handles+--+-- - If @dynamicOffsetCount@ is not @0@, @pDynamicOffsets@ /must/ be a+-- valid pointer to an array of @dynamicOffsetCount@ @uint32_t@ values+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations+--+-- - @descriptorSetCount@ /must/ be greater than @0@+--+-- - Each of @commandBuffer@, @layout@, and the elements of+-- @pDescriptorSets@ /must/ have been created, allocated, or retrieved+-- from the same 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.DescriptorSet',+-- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint',+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout'+cmdBindDescriptorSets :: forall io . MonadIO io => CommandBuffer -> PipelineBindPoint -> PipelineLayout -> ("firstSet" ::: Word32) -> ("descriptorSets" ::: Vector DescriptorSet) -> ("dynamicOffsets" ::: Vector Word32) -> io ()+cmdBindDescriptorSets commandBuffer pipelineBindPoint layout firstSet descriptorSets dynamicOffsets = liftIO . evalContT $ do+ let vkCmdBindDescriptorSets' = mkVkCmdBindDescriptorSets (pVkCmdBindDescriptorSets (deviceCmds (commandBuffer :: CommandBuffer)))+ pPDescriptorSets <- ContT $ allocaBytesAligned @DescriptorSet ((Data.Vector.length (descriptorSets)) * 8) 8+ lift $ Data.Vector.imapM_ (\i e -> poke (pPDescriptorSets `plusPtr` (8 * (i)) :: Ptr DescriptorSet) (e)) (descriptorSets)+ pPDynamicOffsets <- ContT $ allocaBytesAligned @Word32 ((Data.Vector.length (dynamicOffsets)) * 4) 4+ lift $ Data.Vector.imapM_ (\i e -> poke (pPDynamicOffsets `plusPtr` (4 * (i)) :: Ptr Word32) (e)) (dynamicOffsets)+ lift $ vkCmdBindDescriptorSets' (commandBufferHandle (commandBuffer)) (pipelineBindPoint) (layout) (firstSet) ((fromIntegral (Data.Vector.length $ (descriptorSets)) :: Word32)) (pPDescriptorSets) ((fromIntegral (Data.Vector.length $ (dynamicOffsets)) :: Word32)) (pPDynamicOffsets)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdBindIndexBuffer+ :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> IndexType -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> IndexType -> IO ()++-- | vkCmdBindIndexBuffer - Bind an index buffer to a command buffer+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded.+--+-- - @buffer@ is the buffer being bound.+--+-- - @offset@ is the starting offset in bytes within @buffer@ used in+-- index buffer address calculations.+--+-- - @indexType@ is a 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType'+-- value specifying whether indices are treated as 16 bits or 32 bits.+--+-- == Valid Usage+--+-- - @offset@ /must/ be less than the size of @buffer@+--+-- - The sum of @offset@ and the address of the range of+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object that is backing+-- @buffer@, /must/ be a multiple of the type indicated by @indexType@+--+-- - @buffer@ /must/ have been created with the+-- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDEX_BUFFER_BIT'+-- flag+--+-- - If @buffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @indexType@ /must/ not be+-- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_NONE_NV'.+--+-- - If @indexType@ is+-- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT8_EXT', the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-indexTypeUint8 indexTypeUint8>+-- feature /must/ be enabled+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle+--+-- - @indexType@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' value+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- - Both of @buffer@, and @commandBuffer@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.Buffer',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.BaseType.DeviceSize',+-- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType'+cmdBindIndexBuffer :: forall io . MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> IndexType -> io ()+cmdBindIndexBuffer commandBuffer buffer offset indexType = liftIO $ do+ let vkCmdBindIndexBuffer' = mkVkCmdBindIndexBuffer (pVkCmdBindIndexBuffer (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdBindIndexBuffer' (commandBufferHandle (commandBuffer)) (buffer) (offset) (indexType)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdBindVertexBuffers+ :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Buffer -> Ptr DeviceSize -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> Ptr Buffer -> Ptr DeviceSize -> IO ()++-- | vkCmdBindVertexBuffers - Bind vertex buffers to a command buffer+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded.+--+-- - @firstBinding@ is the index of the first vertex input binding whose+-- state is updated by the command.+--+-- - @bindingCount@ is the number of vertex input bindings whose state is+-- updated by the command.+--+-- - @pBuffers@ is a pointer to an array of buffer handles.+--+-- - @pOffsets@ is a pointer to an array of buffer offsets.+--+-- = Description+--+-- The values taken from elements i of @pBuffers@ and @pOffsets@ replace+-- the current state for the vertex input binding @firstBinding@ + i, for i+-- in [0, @bindingCount@). The vertex input binding is updated to start at+-- the offset indicated by @pOffsets@[i] from the start of the buffer+-- @pBuffers@[i]. All vertex input attributes that use each of these+-- bindings will use these updated addresses in their address calculations+-- for subsequent draw commands.+--+-- == Valid Usage+--+-- - @firstBinding@ /must/ be less than+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxVertexInputBindings@+--+-- - The sum of @firstBinding@ and @bindingCount@ /must/ be less than or+-- equal to+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxVertexInputBindings@+--+-- - All elements of @pOffsets@ /must/ be less than the size of the+-- corresponding element in @pBuffers@+--+-- - All elements of @pBuffers@ /must/ have been created with the+-- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_VERTEX_BUFFER_BIT'+-- flag+--+-- - Each element of @pBuffers@ that is non-sparse /must/ be bound+-- completely and contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @pBuffers@ /must/ be a valid pointer to an array of @bindingCount@+-- valid 'Graphics.Vulkan.Core10.Handles.Buffer' handles+--+-- - @pOffsets@ /must/ be a valid pointer to an array of @bindingCount@+-- 'Graphics.Vulkan.Core10.BaseType.DeviceSize' values+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- - @bindingCount@ /must/ be greater than @0@+--+-- - Both of @commandBuffer@, and the elements of @pBuffers@ /must/ have+-- been created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.Buffer',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'+cmdBindVertexBuffers :: forall io . MonadIO io => CommandBuffer -> ("firstBinding" ::: Word32) -> ("buffers" ::: Vector Buffer) -> ("offsets" ::: Vector DeviceSize) -> io ()+cmdBindVertexBuffers commandBuffer firstBinding buffers offsets = liftIO . evalContT $ do+ let vkCmdBindVertexBuffers' = mkVkCmdBindVertexBuffers (pVkCmdBindVertexBuffers (deviceCmds (commandBuffer :: CommandBuffer)))+ let pBuffersLength = Data.Vector.length $ (buffers)+ let pOffsetsLength = Data.Vector.length $ (offsets)+ lift $ unless (pOffsetsLength == pBuffersLength) $+ throwIO $ IOError Nothing InvalidArgument "" "pOffsets and pBuffers must have the same length" Nothing Nothing+ pPBuffers <- ContT $ allocaBytesAligned @Buffer ((Data.Vector.length (buffers)) * 8) 8+ lift $ Data.Vector.imapM_ (\i e -> poke (pPBuffers `plusPtr` (8 * (i)) :: Ptr Buffer) (e)) (buffers)+ pPOffsets <- ContT $ allocaBytesAligned @DeviceSize ((Data.Vector.length (offsets)) * 8) 8+ lift $ Data.Vector.imapM_ (\i e -> poke (pPOffsets `plusPtr` (8 * (i)) :: Ptr DeviceSize) (e)) (offsets)+ lift $ vkCmdBindVertexBuffers' (commandBufferHandle (commandBuffer)) (firstBinding) ((fromIntegral pBuffersLength :: Word32)) (pPBuffers) (pPOffsets)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdDraw+ :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> Word32 -> Word32 -> IO ()++-- | vkCmdDraw - Draw primitives+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded.+--+-- - @vertexCount@ is the number of vertices to draw.+--+-- - @instanceCount@ is the number of instances to draw.+--+-- - @firstVertex@ is the index of the first vertex to draw.+--+-- - @firstInstance@ is the instance ID of the first instance to draw.+--+-- = Description+--+-- When the command is executed, primitives are assembled using the current+-- primitive topology and @vertexCount@ consecutive vertex indices with the+-- first @vertexIndex@ value equal to @firstVertex@. The primitives are+-- drawn @instanceCount@ times with @instanceIndex@ starting with+-- @firstInstance@ and increasing sequentially for each instance. The+-- assembled primitives execute the bound graphics pipeline.+--+-- == Valid Usage+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with+-- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' as a result of+-- this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is accessed using+-- atomic operations as a result of this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as+-- a result of this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as+-- a result of this command /must/ have a+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and+-- format that supports cubic filtering, as specified by+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@+-- returned by+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT'+-- with a reduction mode of either+-- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN'+-- or+-- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX'+-- as a result of this command /must/ have a+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and+-- format that supports cubic filtering together with minmax filtering,+-- as specified by+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@+-- returned by+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'+-- sampled as a result of this command /must/ only be sampled using a+-- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'+-- of+-- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.+--+-- - For each set /n/ that is statically used by the+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible+-- for set /n/, with the+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the+-- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>+--+-- - For each push constant that is statically used by the+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible+-- for push constants, with the+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the+-- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>+--+-- - Descriptors in each bound descriptor set, specified via+-- 'cmdBindDescriptorSets', /must/ be valid if they are statically used+-- by the 'Graphics.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 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command, since that pipeline was+-- bound+--+-- - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.Vulkan.Core10.Handles.Sampler' object that uses+-- unnormalized coordinates, that sampler /must/ not be used to sample+-- from any 'Graphics.Vulkan.Core10.Handles.Image' with a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' of the type+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY'+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY',+-- in any shader stage+--+-- - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>+-- feature is not enabled, and if the+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>+-- feature is not enabled, and if the+-- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource+--+-- - The current render pass /must/ be+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>+-- with the @renderPass@ member of the+-- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'+-- structure specified when creating the+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'+-- structure specified when creating the+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to+-- 'Graphics.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+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_multiview.PhysicalDeviceMultiviewProperties'::@maxMultiviewInstanceIndex@.+--+-- - If the bound graphics pipeline was created with+-- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@+-- set to 'Graphics.Vulkan.Core10.BaseType.TRUE' and the current+-- subpass has a depth\/stencil attachment, then that attachment /must/+-- have been created with the+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT'+-- bit set+--+-- - If @commandBuffer@ is a protected command buffer, any resource+-- written to by the 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- an unprotected resource+--+-- - If @commandBuffer@ is a protected command buffer, pipeline stages+-- other than the framebuffer-space and compute stages in the+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point /must/ not write to any resource+--+-- - All vertex input bindings accessed via vertex input variables+-- declared in the vertex shader entry point’s interface /must/ have+-- valid buffers bound+--+-- - For a given vertex buffer binding, any attribute data fetched /must/+-- be entirely contained within the corresponding vertex buffer+-- binding, as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fxvertex-input ???>+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.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 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Inside | Graphics | Graphics |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+cmdDraw :: forall io . MonadIO io => CommandBuffer -> ("vertexCount" ::: Word32) -> ("instanceCount" ::: Word32) -> ("firstVertex" ::: Word32) -> ("firstInstance" ::: Word32) -> io ()+cmdDraw commandBuffer vertexCount instanceCount firstVertex firstInstance = liftIO $ do+ let vkCmdDraw' = mkVkCmdDraw (pVkCmdDraw (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdDraw' (commandBufferHandle (commandBuffer)) (vertexCount) (instanceCount) (firstVertex) (firstInstance)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdDrawIndexed+ :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> IO ()++-- | vkCmdDrawIndexed - Issue an indexed draw into a command buffer+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded.+--+-- - @indexCount@ is the number of vertices to draw.+--+-- - @instanceCount@ is the number of instances to draw.+--+-- - @firstIndex@ is the base index within the index buffer.+--+-- - @vertexOffset@ is the value added to the vertex index before+-- indexing into the vertex buffer.+--+-- - @firstInstance@ is the instance ID of the first instance to draw.+--+-- = Description+--+-- When the command is executed, primitives are assembled using the current+-- primitive topology and @indexCount@ vertices whose indices are retrieved+-- from the index buffer. The index buffer is treated as an array of+-- tightly packed unsigned integers of size defined by the+-- 'cmdBindIndexBuffer'::@indexType@ parameter with which the buffer was+-- bound.+--+-- The first vertex index is at an offset of @firstIndex@ * @indexSize@ ++-- @offset@ within the bound index buffer, where @offset@ is the offset+-- specified by 'cmdBindIndexBuffer' and @indexSize@ is the byte size of+-- the type specified by @indexType@. Subsequent index values are retrieved+-- from consecutive locations in the index buffer. Indices are first+-- compared to the primitive restart value, then zero extended to 32 bits+-- (if the @indexType@ is+-- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT8_EXT' or+-- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT16') and have+-- @vertexOffset@ added to them, before being supplied as the @vertexIndex@+-- value.+--+-- The primitives are drawn @instanceCount@ times with @instanceIndex@+-- starting with @firstInstance@ and increasing sequentially for each+-- instance. The assembled primitives execute the bound graphics pipeline.+--+-- == Valid Usage+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with+-- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' as a result of+-- this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is accessed using+-- atomic operations as a result of this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as+-- a result of this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as+-- a result of this command /must/ have a+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and+-- format that supports cubic filtering, as specified by+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@+-- returned by+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT'+-- with a reduction mode of either+-- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN'+-- or+-- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX'+-- as a result of this command /must/ have a+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and+-- format that supports cubic filtering together with minmax filtering,+-- as specified by+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@+-- returned by+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'+-- sampled as a result of this command /must/ only be sampled using a+-- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'+-- of+-- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.+--+-- - For each set /n/ that is statically used by the+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible+-- for set /n/, with the+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the+-- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>+--+-- - For each push constant that is statically used by the+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible+-- for push constants, with the+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the+-- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>+--+-- - Descriptors in each bound descriptor set, specified via+-- 'cmdBindDescriptorSets', /must/ be valid if they are statically used+-- by the 'Graphics.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 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command, since that pipeline was+-- bound+--+-- - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.Vulkan.Core10.Handles.Sampler' object that uses+-- unnormalized coordinates, that sampler /must/ not be used to sample+-- from any 'Graphics.Vulkan.Core10.Handles.Image' with a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' of the type+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY'+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY',+-- in any shader stage+--+-- - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>+-- feature is not enabled, and if the+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>+-- feature is not enabled, and if the+-- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource+--+-- - The current render pass /must/ be+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>+-- with the @renderPass@ member of the+-- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'+-- structure specified when creating the+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'+-- structure specified when creating the+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to+-- 'Graphics.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+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_multiview.PhysicalDeviceMultiviewProperties'::@maxMultiviewInstanceIndex@.+--+-- - If the bound graphics pipeline was created with+-- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@+-- set to 'Graphics.Vulkan.Core10.BaseType.TRUE' and the current+-- subpass has a depth\/stencil attachment, then that attachment /must/+-- have been created with the+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT'+-- bit set+--+-- - If @commandBuffer@ is a protected command buffer, any resource+-- written to by the 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- an unprotected resource+--+-- - If @commandBuffer@ is a protected command buffer, pipeline stages+-- other than the framebuffer-space and compute stages in the+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point /must/ not write to any resource+--+-- - All vertex input bindings accessed via vertex input variables+-- declared in the vertex shader entry point’s interface /must/ have+-- valid buffers bound+--+-- - For a given vertex buffer binding, any attribute data fetched /must/+-- be entirely contained within the corresponding vertex buffer+-- binding, as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fxvertex-input ???>+--+-- - (@indexSize@ * (@firstIndex@ + @indexCount@) + @offset@) /must/ be+-- less than or equal to the size of the bound index buffer, with+-- @indexSize@ being based on the type specified by @indexType@, where+-- the index buffer, @indexType@, and @offset@ are specified via+-- 'cmdBindIndexBuffer'+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.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 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Inside | Graphics | Graphics |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+cmdDrawIndexed :: forall io . MonadIO io => CommandBuffer -> ("indexCount" ::: Word32) -> ("instanceCount" ::: Word32) -> ("firstIndex" ::: Word32) -> ("vertexOffset" ::: Int32) -> ("firstInstance" ::: Word32) -> io ()+cmdDrawIndexed commandBuffer indexCount instanceCount firstIndex vertexOffset firstInstance = liftIO $ do+ let vkCmdDrawIndexed' = mkVkCmdDrawIndexed (pVkCmdDrawIndexed (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdDrawIndexed' (commandBufferHandle (commandBuffer)) (indexCount) (instanceCount) (firstIndex) (vertexOffset) (firstInstance)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdDrawIndirect+ :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Word32 -> Word32 -> IO ()++-- | vkCmdDrawIndirect - Issue an indirect draw into a command buffer+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded.+--+-- - @buffer@ is the buffer containing draw parameters.+--+-- - @offset@ is the byte offset into @buffer@ where parameters begin.+--+-- - @drawCount@ is the number of draws to execute, and /can/ be zero.+--+-- - @stride@ is the byte stride between successive sets of draw+-- parameters.+--+-- = Description+--+-- 'cmdDrawIndirect' behaves similarly to 'cmdDraw' 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 'Graphics.Vulkan.Core10.OtherTypes.DrawIndirectCommand'+-- structures. If @drawCount@ is less than or equal to one, @stride@ is+-- ignored.+--+-- == Valid Usage+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with+-- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' as a result of+-- this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is accessed using+-- atomic operations as a result of this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as+-- a result of this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as+-- a result of this command /must/ have a+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and+-- format that supports cubic filtering, as specified by+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@+-- returned by+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT'+-- with a reduction mode of either+-- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN'+-- or+-- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX'+-- as a result of this command /must/ have a+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and+-- format that supports cubic filtering together with minmax filtering,+-- as specified by+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@+-- returned by+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'+-- sampled as a result of this command /must/ only be sampled using a+-- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'+-- of+-- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.+--+-- - For each set /n/ that is statically used by the+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible+-- for set /n/, with the+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the+-- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>+--+-- - For each push constant that is statically used by the+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible+-- for push constants, with the+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the+-- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>+--+-- - Descriptors in each bound descriptor set, specified via+-- 'cmdBindDescriptorSets', /must/ be valid if they are statically used+-- by the 'Graphics.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 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command, since that pipeline was+-- bound+--+-- - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.Vulkan.Core10.Handles.Sampler' object that uses+-- unnormalized coordinates, that sampler /must/ not be used to sample+-- from any 'Graphics.Vulkan.Core10.Handles.Image' with a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' of the type+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY'+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY',+-- in any shader stage+--+-- - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>+-- feature is not enabled, and if the+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>+-- feature is not enabled, and if the+-- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource+--+-- - The current render pass /must/ be+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>+-- with the @renderPass@ member of the+-- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'+-- structure specified when creating the+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'+-- structure specified when creating the+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to+-- 'Graphics.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+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_multiview.PhysicalDeviceMultiviewProperties'::@maxMultiviewInstanceIndex@.+--+-- - If the bound graphics pipeline was created with+-- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@+-- set to 'Graphics.Vulkan.Core10.BaseType.TRUE' and the current+-- subpass has a depth\/stencil attachment, then that attachment /must/+-- have been created with the+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT'+-- bit set+--+-- - All vertex input bindings accessed via vertex input variables+-- declared in the vertex shader entry point’s interface /must/ have+-- valid buffers bound+--+-- - For a given vertex buffer binding, any attribute data fetched /must/+-- be entirely contained within the corresponding vertex buffer+-- binding, as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fxvertex-input ???>+--+-- - If @buffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @buffer@ /must/ have been created with the+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-multiDrawIndirect multi-draw indirect>+-- feature is not enabled, @drawCount@ /must/ be @0@ or @1@+--+-- - @drawCount@ /must/ be less than or equal to+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxDrawIndirectCount@+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-drawIndirectFirstInstance drawIndirectFirstInstance>+-- feature is not enabled, all the @firstInstance@ members of the+-- 'Graphics.Vulkan.Core10.OtherTypes.DrawIndirectCommand' structures+-- accessed by this command /must/ be @0@+--+-- - If @drawCount@ is greater than @1@, @stride@ /must/ be a multiple of+-- @4@ and /must/ be greater than or equal to+-- @sizeof@('Graphics.Vulkan.Core10.OtherTypes.DrawIndirectCommand')+--+-- - If @drawCount@ is equal to @1@, (@offset@ ++-- @sizeof@('Graphics.Vulkan.Core10.OtherTypes.DrawIndirectCommand'))+-- /must/ be less than or equal to the size of @buffer@+--+-- - If @drawCount@ is greater than @1@, (@stride@ × (@drawCount@ - 1) ++-- @offset@ ++-- @sizeof@('Graphics.Vulkan.Core10.OtherTypes.DrawIndirectCommand'))+-- /must/ be less than or equal to the size of @buffer@+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Inside | Graphics | Graphics |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.Buffer',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'+cmdDrawIndirect :: forall io . MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()+cmdDrawIndirect commandBuffer buffer offset drawCount stride = liftIO $ do+ let vkCmdDrawIndirect' = mkVkCmdDrawIndirect (pVkCmdDrawIndirect (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdDrawIndirect' (commandBufferHandle (commandBuffer)) (buffer) (offset) (drawCount) (stride)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdDrawIndexedIndirect+ :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Word32 -> Word32 -> IO ()++-- | vkCmdDrawIndexedIndirect - Perform an indexed indirect draw+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded.+--+-- - @buffer@ is the buffer containing draw parameters.+--+-- - @offset@ is the byte offset into @buffer@ where parameters begin.+--+-- - @drawCount@ is the number of draws to execute, and /can/ be zero.+--+-- - @stride@ is the byte stride between successive sets of draw+-- parameters.+--+-- = Description+--+-- 'cmdDrawIndexedIndirect' behaves similarly to 'cmdDrawIndexed' 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+-- 'Graphics.Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand'+-- structures. If @drawCount@ is less than or equal to one, @stride@ is+-- ignored.+--+-- == Valid Usage+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with+-- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' as a result of+-- this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is accessed using+-- atomic operations as a result of this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as+-- a result of this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as+-- a result of this command /must/ have a+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and+-- format that supports cubic filtering, as specified by+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@+-- returned by+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT'+-- with a reduction mode of either+-- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN'+-- or+-- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX'+-- as a result of this command /must/ have a+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and+-- format that supports cubic filtering together with minmax filtering,+-- as specified by+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@+-- returned by+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'+-- sampled as a result of this command /must/ only be sampled using a+-- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'+-- of+-- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.+--+-- - For each set /n/ that is statically used by the+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible+-- for set /n/, with the+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the+-- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>+--+-- - For each push constant that is statically used by the+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible+-- for push constants, with the+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the+-- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>+--+-- - Descriptors in each bound descriptor set, specified via+-- 'cmdBindDescriptorSets', /must/ be valid if they are statically used+-- by the 'Graphics.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 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command, since that pipeline was+-- bound+--+-- - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.Vulkan.Core10.Handles.Sampler' object that uses+-- unnormalized coordinates, that sampler /must/ not be used to sample+-- from any 'Graphics.Vulkan.Core10.Handles.Image' with a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' of the type+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY'+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY',+-- in any shader stage+--+-- - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>+-- feature is not enabled, and if the+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>+-- feature is not enabled, and if the+-- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource+--+-- - The current render pass /must/ be+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>+-- with the @renderPass@ member of the+-- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'+-- structure specified when creating the+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'+-- structure specified when creating the+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to+-- 'Graphics.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+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_multiview.PhysicalDeviceMultiviewProperties'::@maxMultiviewInstanceIndex@.+--+-- - If the bound graphics pipeline was created with+-- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@+-- set to 'Graphics.Vulkan.Core10.BaseType.TRUE' and the current+-- subpass has a depth\/stencil attachment, then that attachment /must/+-- have been created with the+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT'+-- bit set+--+-- - All vertex input bindings accessed via vertex input variables+-- declared in the vertex shader entry point’s interface /must/ have+-- valid buffers bound+--+-- - For a given vertex buffer binding, any attribute data fetched /must/+-- be entirely contained within the corresponding vertex buffer+-- binding, as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fxvertex-input ???>+--+-- - If @buffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @buffer@ /must/ have been created with the+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-multiDrawIndirect multi-draw indirect>+-- feature is not enabled, @drawCount@ /must/ be @0@ or @1@+--+-- - @drawCount@ /must/ be less than or equal to+-- 'Graphics.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@('Graphics.Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand')+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-drawIndirectFirstInstance drawIndirectFirstInstance>+-- feature is not enabled, all the @firstInstance@ members of the+-- 'Graphics.Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand'+-- structures accessed by this command /must/ be @0@+--+-- - If @drawCount@ is equal to @1@, (@offset@ ++-- @sizeof@('Graphics.Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand'))+-- /must/ be less than or equal to the size of @buffer@+--+-- - If @drawCount@ is greater than @1@, (@stride@ × (@drawCount@ - 1) ++-- @offset@ ++-- @sizeof@('Graphics.Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand'))+-- /must/ be less than or equal to the size of @buffer@+--+-- - If+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-drawIndirectCount drawIndirectCount>+-- is not enabled this function /must/ not be used+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Inside | Graphics | Graphics |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.Buffer',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'+cmdDrawIndexedIndirect :: forall io . MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()+cmdDrawIndexedIndirect commandBuffer buffer offset drawCount stride = liftIO $ do+ let vkCmdDrawIndexedIndirect' = mkVkCmdDrawIndexedIndirect (pVkCmdDrawIndexedIndirect (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdDrawIndexedIndirect' (commandBufferHandle (commandBuffer)) (buffer) (offset) (drawCount) (stride)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdDispatch+ :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Word32 -> Word32 -> IO ()++-- | vkCmdDispatch - Dispatch compute work items+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @groupCountX@ is the number of local workgroups to dispatch in the X+-- dimension.+--+-- - @groupCountY@ is the number of local workgroups to dispatch in the Y+-- dimension.+--+-- - @groupCountZ@ is the number of local workgroups to dispatch in the Z+-- dimension.+--+-- = Description+--+-- When the command is executed, a global workgroup consisting of+-- @groupCountX@ × @groupCountY@ × @groupCountZ@ local workgroups is+-- assembled.+--+-- == Valid Usage+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with+-- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' as a result of+-- this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is accessed using+-- atomic operations as a result of this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as+-- a result of this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as+-- a result of this command /must/ have a+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and+-- format that supports cubic filtering, as specified by+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@+-- returned by+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT'+-- with a reduction mode of either+-- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN'+-- or+-- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX'+-- as a result of this command /must/ have a+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and+-- format that supports cubic filtering together with minmax filtering,+-- as specified by+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@+-- returned by+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'+-- sampled as a result of this command /must/ only be sampled using a+-- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'+-- of+-- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.+--+-- - For each set /n/ that is statically used by the+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible+-- for set /n/, with the+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the+-- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>+--+-- - For each push constant that is statically used by the+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible+-- for push constants, with the+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the+-- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>+--+-- - Descriptors in each bound descriptor set, specified via+-- 'cmdBindDescriptorSets', /must/ be valid if they are statically used+-- by the 'Graphics.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 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command, since that pipeline was+-- bound+--+-- - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.Vulkan.Core10.Handles.Sampler' object that uses+-- unnormalized coordinates, that sampler /must/ not be used to sample+-- from any 'Graphics.Vulkan.Core10.Handles.Image' with a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' of the type+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY'+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY',+-- in any shader stage+--+-- - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>+-- feature is not enabled, and if the+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>+-- feature is not enabled, and if the+-- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource+--+-- - If @commandBuffer@ is a protected command buffer, any resource+-- written to by the 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- an unprotected resource+--+-- - If @commandBuffer@ is a protected command buffer, pipeline stages+-- other than the framebuffer-space and compute stages in the+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point /must/ not write to any resource+--+-- - @groupCountX@ /must/ be less than or equal to+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxComputeWorkGroupCount@[0]+--+-- - @groupCountY@ /must/ be less than or equal to+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxComputeWorkGroupCount@[1]+--+-- - @groupCountZ@ /must/ be less than or equal to+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxComputeWorkGroupCount@[2]+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support compute operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Compute | Compute |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+cmdDispatch :: forall io . MonadIO io => CommandBuffer -> ("groupCountX" ::: Word32) -> ("groupCountY" ::: Word32) -> ("groupCountZ" ::: Word32) -> io ()+cmdDispatch commandBuffer groupCountX groupCountY groupCountZ = liftIO $ do+ let vkCmdDispatch' = mkVkCmdDispatch (pVkCmdDispatch (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdDispatch' (commandBufferHandle (commandBuffer)) (groupCountX) (groupCountY) (groupCountZ)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdDispatchIndirect+ :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> IO ()++-- | vkCmdDispatchIndirect - Dispatch compute work items using indirect+-- parameters+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @buffer@ is the buffer containing dispatch parameters.+--+-- - @offset@ is the byte offset into @buffer@ where parameters begin.+--+-- = Description+--+-- 'cmdDispatchIndirect' behaves similarly to 'cmdDispatch' except that the+-- parameters are read by the device from a buffer during execution. The+-- parameters of the dispatch are encoded in a+-- 'Graphics.Vulkan.Core10.OtherTypes.DispatchIndirectCommand' structure+-- taken from @buffer@ starting at @offset@.+--+-- == Valid Usage+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with+-- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' as a result of+-- this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is accessed using+-- atomic operations as a result of this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'+--+-- - If a 'Graphics.Vulkan.Core10.Handles.ImageView' is sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as+-- a result of this command, then the image view’s+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>+-- /must/ contain+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as+-- a result of this command /must/ have a+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and+-- format that supports cubic filtering, as specified by+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@+-- returned by+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.ImageView' being sampled with+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT'+-- with a reduction mode of either+-- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN'+-- or+-- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX'+-- as a result of this command /must/ have a+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' and+-- format that supports cubic filtering together with minmax filtering,+-- as specified by+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@+-- returned by+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'+--+-- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'+-- sampled as a result of this command /must/ only be sampled using a+-- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'+-- of+-- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.+--+-- - For each set /n/ that is statically used by the+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible+-- for set /n/, with the+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the+-- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>+--+-- - For each push constant that is statically used by the+-- 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that is compatible+-- for push constants, with the+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' used to create the+-- current 'Graphics.Vulkan.Core10.Handles.Pipeline', as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>+--+-- - Descriptors in each bound descriptor set, specified via+-- 'cmdBindDescriptorSets', /must/ be valid if they are statically used+-- by the 'Graphics.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 'Graphics.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+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command, since that pipeline was+-- bound+--+-- - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.Vulkan.Core10.Handles.Sampler' object that uses+-- unnormalized coordinates, that sampler /must/ not be used to sample+-- from any 'Graphics.Vulkan.Core10.Handles.Image' with a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' of the type+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY',+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY'+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY',+-- in any shader stage+--+-- - If the 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point used by this command accesses a+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>+-- feature is not enabled, and if the+-- 'Graphics.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+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>+-- feature is not enabled, and if the+-- 'Graphics.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 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource+--+-- - If @buffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @buffer@ /must/ have been created with the+-- 'Graphics.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+--+-- - The sum of @offset@ and the size of+-- 'Graphics.Vulkan.Core10.OtherTypes.DispatchIndirectCommand' /must/+-- be less than or equal to the size of @buffer@+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support compute operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - Both of @buffer@, and @commandBuffer@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Compute | Compute |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.Buffer',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'+cmdDispatchIndirect :: forall io . MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> io ()+cmdDispatchIndirect commandBuffer buffer offset = liftIO $ do+ let vkCmdDispatchIndirect' = mkVkCmdDispatchIndirect (pVkCmdDispatchIndirect (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdDispatchIndirect' (commandBufferHandle (commandBuffer)) (buffer) (offset)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdCopyBuffer+ :: FunPtr (Ptr CommandBuffer_T -> Buffer -> Buffer -> Word32 -> Ptr BufferCopy -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> Buffer -> Word32 -> Ptr BufferCopy -> IO ()++-- | vkCmdCopyBuffer - Copy data between buffer regions+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @srcBuffer@ is the source buffer.+--+-- - @dstBuffer@ is the destination buffer.+--+-- - @regionCount@ is the number of regions to copy.+--+-- - @pRegions@ is a pointer to an array of 'BufferCopy' structures+-- specifying the regions to copy.+--+-- = Description+--+-- Each region in @pRegions@ is copied from the source buffer to the same+-- region of the destination buffer. @srcBuffer@ and @dstBuffer@ /can/ be+-- the same buffer or alias the same memory, but the resulting values are+-- undefined if the copy regions overlap in memory.+--+-- == Valid Usage+--+-- - The @srcOffset@ member of each element of @pRegions@ /must/ be less+-- than the size of @srcBuffer@+--+-- - The @dstOffset@ member of each element of @pRegions@ /must/ be less+-- than the size of @dstBuffer@+--+-- - The @size@ member of each element of @pRegions@ /must/ be less than+-- or equal to the size of @srcBuffer@ minus @srcOffset@+--+-- - The @size@ member of each element of @pRegions@ /must/ be less than+-- or equal to the size of @dstBuffer@ minus @dstOffset@+--+-- - The union of the source regions, and the union of the destination+-- regions, specified by the elements of @pRegions@, /must/ not overlap+-- in memory+--+-- - @srcBuffer@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_SRC_BIT'+-- usage flag+--+-- - If @srcBuffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @dstBuffer@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'+-- usage flag+--+-- - If @dstBuffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - If @commandBuffer@ is an unprotected command buffer, then+-- @srcBuffer@ /must/ not be a protected buffer+--+-- - If @commandBuffer@ is an unprotected command buffer, then+-- @dstBuffer@ /must/ not be a protected buffer+--+-- - If @commandBuffer@ is a protected command buffer, then @dstBuffer@+-- /must/ not be an unprotected buffer+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @srcBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+--+-- - @dstBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+--+-- - @pRegions@ /must/ be a valid pointer to an array of @regionCount@+-- valid 'BufferCopy' structures+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support transfer,+-- graphics, or compute operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - @regionCount@ /must/ be greater than @0@+--+-- - Each of @commandBuffer@, @dstBuffer@, and @srcBuffer@ /must/ have+-- been created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Transfer | Transfer |+-- | Secondary | | Graphics | |+-- | | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.Buffer', 'BufferCopy',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+cmdCopyBuffer :: forall io . MonadIO io => CommandBuffer -> ("srcBuffer" ::: Buffer) -> ("dstBuffer" ::: Buffer) -> ("regions" ::: Vector BufferCopy) -> io ()+cmdCopyBuffer commandBuffer srcBuffer dstBuffer regions = liftIO . evalContT $ do+ let vkCmdCopyBuffer' = mkVkCmdCopyBuffer (pVkCmdCopyBuffer (deviceCmds (commandBuffer :: CommandBuffer)))+ pPRegions <- ContT $ allocaBytesAligned @BufferCopy ((Data.Vector.length (regions)) * 24) 8+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRegions `plusPtr` (24 * (i)) :: Ptr BufferCopy) (e) . ($ ())) (regions)+ lift $ vkCmdCopyBuffer' (commandBufferHandle (commandBuffer)) (srcBuffer) (dstBuffer) ((fromIntegral (Data.Vector.length $ (regions)) :: Word32)) (pPRegions)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdCopyImage+ :: FunPtr (Ptr CommandBuffer_T -> Image -> ImageLayout -> Image -> ImageLayout -> Word32 -> Ptr ImageCopy -> IO ()) -> Ptr CommandBuffer_T -> Image -> ImageLayout -> Image -> ImageLayout -> Word32 -> Ptr ImageCopy -> IO ()++-- | vkCmdCopyImage - Copy data between images+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @srcImage@ is the source image.+--+-- - @srcImageLayout@ is the current layout of the source image+-- subresource.+--+-- - @dstImage@ is the destination image.+--+-- - @dstImageLayout@ is the current layout of the destination image+-- subresource.+--+-- - @regionCount@ is the number of regions to copy.+--+-- - @pRegions@ is a pointer to an array of 'ImageCopy' structures+-- specifying the regions to copy.+--+-- = Description+--+-- Each region in @pRegions@ is copied from the source image to the same+-- region of the destination image. @srcImage@ and @dstImage@ /can/ be the+-- same image or alias the same memory.+--+-- The formats of @srcImage@ and @dstImage@ /must/ be compatible. Formats+-- are compatible if they share the same class, as shown in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatibility Compatible Formats>+-- table. Depth\/stencil formats /must/ match exactly.+--+-- If the format of @srcImage@ or @dstImage@ is a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>,+-- regions of each plane to be copied /must/ be specified separately using+-- the @srcSubresource@ and @dstSubresource@ members of the 'ImageCopy'+-- structure. In this case, the @aspectMask@ of the @srcSubresource@ or+-- @dstSubresource@ that refers to the multi-planar image /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'.+-- For the purposes of 'cmdCopyImage', each plane of a multi-planar image+-- is treated as having the format listed in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatible-planes>+-- for the plane identified by the @aspectMask@ of the corresponding+-- subresource. This applies both to+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' and to coordinates used in+-- the copy, which correspond to texels in the /plane/ rather than how+-- these texels map to coordinates in the image as a whole.+--+-- Note+--+-- For example, the+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT'+-- plane of a+-- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_G8_B8R8_2PLANE_420_UNORM'+-- image is compatible with an image of format+-- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_R8G8_UNORM' and (less+-- usefully) with the+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT'+-- plane of an image of format+-- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16',+-- as each texel is 2 bytes in size.+--+-- 'cmdCopyImage' allows copying between /size-compatible/ compressed and+-- uncompressed internal formats. Formats are size-compatible if the texel+-- block size of the uncompressed format is equal to the texel block size+-- of the compressed format. Such a copy does not perform on-the-fly+-- compression or decompression. When copying from an uncompressed format+-- to a compressed format, each texel of uncompressed data of the source+-- image is copied as a raw value to the corresponding compressed texel+-- block of the destination image. When copying from a compressed format to+-- an uncompressed format, each compressed texel block of the source image+-- is copied as a raw value to the corresponding texel of uncompressed data+-- in the destination image. Thus, for example, it is legal to copy between+-- a 128-bit uncompressed format and a compressed format which has a+-- 128-bit sized compressed texel block representing 4×4 texels (using 8+-- bits per texel), or between a 64-bit uncompressed format and a+-- compressed format which has a 64-bit sized compressed texel block+-- representing 4×4 texels (using 4 bits per texel).+--+-- When copying between compressed and uncompressed formats the @extent@+-- members represent the texel dimensions of the source image and not the+-- destination. When copying from a compressed image to an uncompressed+-- image the image texel dimensions written to the uncompressed image will+-- be source extent divided by the compressed texel block dimensions. When+-- copying from an uncompressed image to a compressed image the image texel+-- dimensions written to the compressed image will be the source extent+-- multiplied by the compressed texel block dimensions. In both cases the+-- number of bytes read and the number of bytes written will be identical.+--+-- Copying to or from block-compressed images is typically done in+-- multiples of the compressed texel block size. For this reason the+-- @extent@ /must/ be a multiple of the compressed texel block dimension.+-- There is one exception to this rule which is /required/ to handle+-- compressed images created with dimensions that are not a multiple of the+-- compressed texel block dimensions: if the @srcImage@ is compressed,+-- then:+--+-- - If @extent.width@ is not a multiple of the compressed texel block+-- width, then (@extent.width@ + @srcOffset.x@) /must/ equal the image+-- subresource width.+--+-- - If @extent.height@ is not a multiple of the compressed texel block+-- height, then (@extent.height@ + @srcOffset.y@) /must/ equal the+-- image subresource height.+--+-- - If @extent.depth@ is not a multiple of the compressed texel block+-- depth, then (@extent.depth@ + @srcOffset.z@) /must/ equal the image+-- subresource depth.+--+-- Similarly, if the @dstImage@ is compressed, then:+--+-- - If @extent.width@ is not a multiple of the compressed texel block+-- width, then (@extent.width@ + @dstOffset.x@) /must/ equal the image+-- subresource width.+--+-- - If @extent.height@ is not a multiple of the compressed texel block+-- height, then (@extent.height@ + @dstOffset.y@) /must/ equal the+-- image subresource height.+--+-- - If @extent.depth@ is not a multiple of the compressed texel block+-- depth, then (@extent.depth@ + @dstOffset.z@) /must/ equal the image+-- subresource depth.+--+-- This allows the last compressed texel block of the image in each+-- non-multiple dimension to be included as a source or destination of the+-- copy.+--+-- “@_422@” image formats that are not+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar>+-- are treated as having a 2×1 compressed texel block for the purposes of+-- these rules.+--+-- 'cmdCopyImage' /can/ be used to copy image data between multisample+-- images, but both images /must/ have the same number of samples.+--+-- == Valid Usage+--+-- - The source region specified by each element of @pRegions@ /must/ be+-- a region that is contained within @srcImage@ if the @srcImage@’s+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' is not a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,+-- and /must/ be a region that is contained within the plane being+-- copied if the @srcImage@’s+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' is a multi-planar+-- format+--+-- - The destination region specified by each element of @pRegions@+-- /must/ be a region that is contained within @dstImage@ if the+-- @dstImage@’s 'Graphics.Vulkan.Core10.Enums.Format.Format' is not a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,+-- and /must/ be a region that is contained within the plane being+-- copied to if the @dstImage@’s+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' is a multi-planar+-- format+--+-- - The union of all source regions, and the union of all destination+-- regions, specified by the elements of @pRegions@, /must/ not overlap+-- in memory+--+-- - The+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>+-- of @srcImage@ /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_TRANSFER_SRC_BIT'.+--+-- - @srcImage@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_SRC_BIT'+-- usage flag+--+-- - If @srcImage@ is non-sparse then the image or /disjoint/ plane to be+-- copied /must/ be bound completely and contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @srcImageLayout@ /must/ specify the layout of the image subresources+-- of @srcImage@ specified in @pRegions@ at the time this command is+-- executed on a 'Graphics.Vulkan.Core10.Handles.Device'+--+-- - @srcImageLayout@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL', or+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR'+--+-- - The+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>+-- of @dstImage@ /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_TRANSFER_DST_BIT'.+--+-- - @dstImage@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'+-- usage flag+--+-- - If @dstImage@ is non-sparse then the image or /disjoint/ plane that+-- is the destination of the copy /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @dstImageLayout@ /must/ specify the layout of the image subresources+-- of @dstImage@ specified in @pRegions@ at the time this command is+-- executed on a 'Graphics.Vulkan.Core10.Handles.Device'+--+-- - @dstImageLayout@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL', or+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR'+--+-- - If the 'Graphics.Vulkan.Core10.Enums.Format.Format' of each of+-- @srcImage@ and @dstImage@ is not a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,+-- the 'Graphics.Vulkan.Core10.Enums.Format.Format' of each of+-- @srcImage@ and @dstImage@ /must/ be compatible, as defined+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#copies-images-format-compatibility above>+--+-- - In a copy to or from a plane of a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image>,+-- the 'Graphics.Vulkan.Core10.Enums.Format.Format' of the image and+-- plane /must/ be compatible according to+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatible-planes the description of compatible planes>+-- for the plane being copied+--+-- - When a copy is performed to or from an image with a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,+-- the @aspectMask@ of the @srcSubresource@ and\/or @dstSubresource@+-- that refers to the multi-planar image /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'+-- (with+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'+-- valid only for a 'Graphics.Vulkan.Core10.Enums.Format.Format' with+-- three planes)+--+-- - The sample count of @srcImage@ and @dstImage@ /must/ match+--+-- - If @commandBuffer@ is an unprotected command buffer, then @srcImage@+-- /must/ not be a protected image+--+-- - If @commandBuffer@ is an unprotected command buffer, then @dstImage@+-- /must/ not be a protected image+--+-- - If @commandBuffer@ is a protected command buffer, then @dstImage@+-- /must/ not be an unprotected image+--+-- - The @srcSubresource.mipLevel@ member of each element of @pRegions@+-- /must/ be less than the @mipLevels@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was+-- created+--+-- - The @dstSubresource.mipLevel@ member of each element of @pRegions@+-- /must/ be less than the @mipLevels@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was+-- created+--+-- - The @srcSubresource.baseArrayLayer@ + @srcSubresource.layerCount@ of+-- each element of @pRegions@ /must/ be less than or equal to the+-- @arrayLayers@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was+-- created+--+-- - The @dstSubresource.baseArrayLayer@ + @dstSubresource.layerCount@ of+-- each element of @pRegions@ /must/ be less than or equal to the+-- @arrayLayers@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was+-- created+--+-- - The @srcOffset@ and @extent@ members of each element of @pRegions@+-- /must/ respect the image transfer granularity requirements of+-- @commandBuffer@’s command pool’s queue family, as described in+-- 'Graphics.Vulkan.Core10.DeviceInitialization.QueueFamilyProperties'+--+-- - The @dstOffset@ and @extent@ members of each element of @pRegions@+-- /must/ respect the image transfer granularity requirements of+-- @commandBuffer@’s command pool’s queue family, as described in+-- 'Graphics.Vulkan.Core10.DeviceInitialization.QueueFamilyProperties'+--+-- - @dstImage@ and @srcImage@ /must/ not have been created with @flags@+-- containing+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @srcImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle+--+-- - @srcImageLayout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value+--+-- - @dstImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle+--+-- - @dstImageLayout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value+--+-- - @pRegions@ /must/ be a valid pointer to an array of @regionCount@+-- valid 'ImageCopy' structures+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support transfer,+-- graphics, or compute operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - @regionCount@ /must/ be greater than @0@+--+-- - Each of @commandBuffer@, @dstImage@, and @srcImage@ /must/ have been+-- created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Transfer | Transfer |+-- | Secondary | | Graphics | |+-- | | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.Image', 'ImageCopy',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout'+cmdCopyImage :: forall io . MonadIO io => CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector ImageCopy) -> io ()+cmdCopyImage commandBuffer srcImage srcImageLayout dstImage dstImageLayout regions = liftIO . evalContT $ do+ let vkCmdCopyImage' = mkVkCmdCopyImage (pVkCmdCopyImage (deviceCmds (commandBuffer :: CommandBuffer)))+ pPRegions <- ContT $ allocaBytesAligned @ImageCopy ((Data.Vector.length (regions)) * 68) 4+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRegions `plusPtr` (68 * (i)) :: Ptr ImageCopy) (e) . ($ ())) (regions)+ lift $ vkCmdCopyImage' (commandBufferHandle (commandBuffer)) (srcImage) (srcImageLayout) (dstImage) (dstImageLayout) ((fromIntegral (Data.Vector.length $ (regions)) :: Word32)) (pPRegions)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdBlitImage+ :: FunPtr (Ptr CommandBuffer_T -> Image -> ImageLayout -> Image -> ImageLayout -> Word32 -> Ptr ImageBlit -> Filter -> IO ()) -> Ptr CommandBuffer_T -> Image -> ImageLayout -> Image -> ImageLayout -> Word32 -> Ptr ImageBlit -> Filter -> IO ()++-- | vkCmdBlitImage - Copy regions of an image, potentially performing format+-- conversion,+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @srcImage@ is the source image.+--+-- - @srcImageLayout@ is the layout of the source image subresources for+-- the blit.+--+-- - @dstImage@ is the destination image.+--+-- - @dstImageLayout@ is the layout of the destination image subresources+-- for the blit.+--+-- - @regionCount@ is the number of regions to blit.+--+-- - @pRegions@ is a pointer to an array of 'ImageBlit' structures+-- specifying the regions to blit.+--+-- - @filter@ is a 'Graphics.Vulkan.Core10.Enums.Filter.Filter'+-- specifying the filter to apply if the blits require scaling.+--+-- = Description+--+-- 'cmdBlitImage' /must/ not be used for multisampled source or destination+-- images. Use 'cmdResolveImage' for this purpose.+--+-- As the sizes of the source and destination extents /can/ differ in any+-- dimension, texels in the source extent are scaled and filtered to the+-- destination extent. Scaling occurs via the following operations:+--+-- - For each destination texel, the integer coordinate of that texel is+-- converted to an unnormalized texture coordinate, using the effective+-- inverse of the equations described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#textures-unnormalized-to-integer unnormalized to integer conversion>:+--+-- - ubase = i + ½+--+-- - vbase = j + ½+--+-- - wbase = k + ½+--+-- - These base coordinates are then offset by the first destination+-- offset:+--+-- - uoffset = ubase - xdst0+--+-- - voffset = vbase - ydst0+--+-- - woffset = wbase - zdst0+--+-- - aoffset = a - @baseArrayCount@dst+--+-- - The scale is determined from the source and destination regions, and+-- applied to the offset coordinates:+--+-- - scale_u = (xsrc1 - xsrc0) \/ (xdst1 - xdst0)+--+-- - scale_v = (ysrc1 - ysrc0) \/ (ydst1 - ydst0)+--+-- - scale_w = (zsrc1 - zsrc0) \/ (zdst1 - zdst0)+--+-- - uscaled = uoffset * scaleu+--+-- - vscaled = voffset * scalev+--+-- - wscaled = woffset * scalew+--+-- - Finally the source offset is added to the scaled coordinates, to+-- determine the final unnormalized coordinates used to sample from+-- @srcImage@:+--+-- - u = uscaled + xsrc0+--+-- - v = vscaled + ysrc0+--+-- - w = wscaled + zsrc0+--+-- - q = @mipLevel@+--+-- - a = aoffset + @baseArrayCount@src+--+-- These coordinates are used to sample from the source image, as described+-- in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#textures Image Operations chapter>,+-- with the filter mode equal to that of @filter@, a mipmap mode of+-- 'Graphics.Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_NEAREST'+-- and an address mode of+-- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'.+-- Implementations /must/ clamp at the edge of the source image, and /may/+-- additionally clamp to the edge of the source region.+--+-- Note+--+-- Due to allowable rounding errors in the generation of the source texture+-- coordinates, it is not always possible to guarantee exactly which source+-- texels will be sampled for a given blit. As rounding errors are+-- implementation dependent, the exact results of a blitting operation are+-- also implementation dependent.+--+-- Blits are done layer by layer starting with the @baseArrayLayer@ member+-- of @srcSubresource@ for the source and @dstSubresource@ for the+-- destination. @layerCount@ layers are blitted to the destination image.+--+-- 3D textures are blitted slice by slice. Slices in the source region+-- bounded by @srcOffsets@[0].z and @srcOffsets@[1].z are copied to slices+-- in the destination region bounded by @dstOffsets@[0].z and+-- @dstOffsets@[1].z. For each destination slice, a source __z__ coordinate+-- is linearly interpolated between @srcOffsets@[0].z and+-- @srcOffsets@[1].z. If the @filter@ parameter is+-- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR' then the value+-- sampled from the source image is taken by doing linear filtering using+-- the interpolated __z__ coordinate. If @filter@ parameter is+-- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_NEAREST' then the value+-- sampled from the source image is taken from the single nearest slice,+-- with an implementation-dependent arithmetic rounding mode.+--+-- The following filtering and conversion rules apply:+--+-- - Integer formats /can/ only be converted to other integer formats+-- with the same signedness.+--+-- - No format conversion is supported between depth\/stencil images. The+-- formats /must/ match.+--+-- - Format conversions on unorm, snorm, unscaled and packed float+-- formats of the copied aspect of the image are performed by first+-- converting the pixels to float values.+--+-- - For sRGB source formats, nonlinear RGB values are converted to+-- linear representation prior to filtering.+--+-- - After filtering, the float values are first clamped and then cast to+-- the destination image format. In case of sRGB destination format,+-- linear RGB values are converted to nonlinear representation before+-- writing the pixel to the image.+--+-- Signed and unsigned integers are converted by first clamping to the+-- representable range of the destination format, then casting the value.+--+-- == Valid Usage+--+-- - The source region specified by each element of @pRegions@ /must/ be+-- a region that is contained within @srcImage@+--+-- - The destination region specified by each element of @pRegions@+-- /must/ be a region that is contained within @dstImage@+--+-- - The union of all destination regions, specified by the elements of+-- @pRegions@, /must/ not overlap in memory with any texel that /may/+-- be sampled during the blit operation+--+-- - The+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>+-- of @srcImage@ /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_BLIT_SRC_BIT'.+--+-- - @srcImage@ /must/ not use a format listed in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion>+--+-- - @srcImage@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_SRC_BIT'+-- usage flag+--+-- - If @srcImage@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @srcImageLayout@ /must/ specify the layout of the image subresources+-- of @srcImage@ specified in @pRegions@ at the time this command is+-- executed on a 'Graphics.Vulkan.Core10.Handles.Device'+--+-- - @srcImageLayout@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL'+-- or 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL'+--+-- - The+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>+-- of @dstImage@ /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_BLIT_DST_BIT'.+--+-- - @dstImage@ /must/ not use a format listed in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion>+--+-- - @dstImage@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'+-- usage flag+--+-- - If @dstImage@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @dstImageLayout@ /must/ specify the layout of the image subresources+-- of @dstImage@ specified in @pRegions@ at the time this command is+-- executed on a 'Graphics.Vulkan.Core10.Handles.Device'+--+-- - @dstImageLayout@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'+-- or 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL'+--+-- - The sample count of @srcImage@ and @dstImage@ /must/ both be equal+-- to+-- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'+--+-- - If either of @srcImage@ or @dstImage@ was created with a signed+-- integer 'Graphics.Vulkan.Core10.Enums.Format.Format', the other+-- /must/ also have been created with a signed integer+-- 'Graphics.Vulkan.Core10.Enums.Format.Format'+--+-- - If either of @srcImage@ or @dstImage@ was created with an unsigned+-- integer 'Graphics.Vulkan.Core10.Enums.Format.Format', the other+-- /must/ also have been created with an unsigned integer+-- 'Graphics.Vulkan.Core10.Enums.Format.Format'+--+-- - If either of @srcImage@ or @dstImage@ was created with a+-- depth\/stencil format, the other /must/ have exactly the same format+--+-- - If @srcImage@ was created with a depth\/stencil format, @filter@+-- /must/ be 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_NEAREST'+--+-- - @srcImage@ /must/ have been created with a @samples@ value of+-- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'+--+-- - @dstImage@ /must/ have been created with a @samples@ value of+-- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'+--+-- - If @filter@ is 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR',+-- then the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>+-- of @srcImage@ /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'.+--+-- - If @filter@ is+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT',+-- then the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>+-- of @srcImage@ /must/ contain+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'.+--+-- - If @filter@ is+-- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT',+-- @srcImage@ /must/ have a+-- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' of+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D'+--+-- - If @commandBuffer@ is an unprotected command buffer, then @srcImage@+-- /must/ not be a protected image+--+-- - If @commandBuffer@ is an unprotected command buffer, then @dstImage@+-- /must/ not be a protected image+--+-- - If @commandBuffer@ is a protected command buffer, then @dstImage@+-- /must/ not be an unprotected image+--+-- - The @srcSubresource.mipLevel@ member of each element of @pRegions@+-- /must/ be less than the @mipLevels@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was+-- created+--+-- - The @dstSubresource.mipLevel@ member of each element of @pRegions@+-- /must/ be less than the @mipLevels@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was+-- created+--+-- - The @srcSubresource.baseArrayLayer@ + @srcSubresource.layerCount@ of+-- each element of @pRegions@ /must/ be less than or equal to the+-- @arrayLayers@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was+-- created+--+-- - The @dstSubresource.baseArrayLayer@ + @dstSubresource.layerCount@ of+-- each element of @pRegions@ /must/ be less than or equal to the+-- @arrayLayers@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was+-- created+--+-- - @dstImage@ and @srcImage@ /must/ not have been created with @flags@+-- containing+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @srcImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle+--+-- - @srcImageLayout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value+--+-- - @dstImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle+--+-- - @dstImageLayout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value+--+-- - @pRegions@ /must/ be a valid pointer to an array of @regionCount@+-- valid 'ImageBlit' structures+--+-- - @filter@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.Filter.Filter' value+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - @regionCount@ /must/ be greater than @0@+--+-- - Each of @commandBuffer@, @dstImage@, and @srcImage@ /must/ have been+-- created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Graphics | Transfer |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Enums.Filter.Filter',+-- 'Graphics.Vulkan.Core10.Handles.Image', 'ImageBlit',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout'+cmdBlitImage :: forall io . MonadIO io => CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector ImageBlit) -> Filter -> io ()+cmdBlitImage commandBuffer srcImage srcImageLayout dstImage dstImageLayout regions filter' = liftIO . evalContT $ do+ let vkCmdBlitImage' = mkVkCmdBlitImage (pVkCmdBlitImage (deviceCmds (commandBuffer :: CommandBuffer)))+ pPRegions <- ContT $ allocaBytesAligned @ImageBlit ((Data.Vector.length (regions)) * 80) 4+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRegions `plusPtr` (80 * (i)) :: Ptr ImageBlit) (e) . ($ ())) (regions)+ lift $ vkCmdBlitImage' (commandBufferHandle (commandBuffer)) (srcImage) (srcImageLayout) (dstImage) (dstImageLayout) ((fromIntegral (Data.Vector.length $ (regions)) :: Word32)) (pPRegions) (filter')+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdCopyBufferToImage+ :: FunPtr (Ptr CommandBuffer_T -> Buffer -> Image -> ImageLayout -> Word32 -> Ptr BufferImageCopy -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> Image -> ImageLayout -> Word32 -> Ptr BufferImageCopy -> IO ()++-- | vkCmdCopyBufferToImage - Copy data from a buffer into an image+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @srcBuffer@ is the source buffer.+--+-- - @dstImage@ is the destination image.+--+-- - @dstImageLayout@ is the layout of the destination image subresources+-- for the copy.+--+-- - @regionCount@ is the number of regions to copy.+--+-- - @pRegions@ is a pointer to an array of 'BufferImageCopy' structures+-- specifying the regions to copy.+--+-- = Description+--+-- Each region in @pRegions@ is copied from the specified region of the+-- source buffer to the specified region of the destination image.+--+-- If the format of @dstImage@ is a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>),+-- regions of each plane to be a target of a copy /must/ be specified+-- separately using the @pRegions@ member of the 'BufferImageCopy'+-- structure. In this case, the @aspectMask@ of @imageSubresource@ /must/+-- be+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'.+-- For the purposes of 'cmdCopyBufferToImage', each plane of a multi-planar+-- image is treated as having the format listed in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatible-planes>+-- for the plane identified by the @aspectMask@ of the corresponding+-- subresource. This applies both to+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' and to coordinates used in+-- the copy, which correspond to texels in the /plane/ rather than how+-- these texels map to coordinates in the image as a whole.+--+-- == Valid Usage+--+-- - @srcBuffer@ /must/ be large enough to contain all buffer locations+-- that are accessed according to+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#copies-buffers-images-addressing Buffer and Image Addressing>,+-- for each element of @pRegions@+--+-- - The image region specified by each element of @pRegions@ /must/ be a+-- region that is contained within @dstImage@ if the @dstImage@’s+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' is not a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,+-- and /must/ be a region that is contained within the plane being+-- copied to if the @dstImage@’s+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' is a multi-planar+-- format+--+-- - The union of all source regions, and the union of all destination+-- regions, specified by the elements of @pRegions@, /must/ not overlap+-- in memory+--+-- - @srcBuffer@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_SRC_BIT'+-- usage flag+--+-- - The+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>+-- of @dstImage@ /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_TRANSFER_DST_BIT'.+--+-- - If @srcBuffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @dstImage@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'+-- usage flag+--+-- - If @dstImage@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @dstImage@ /must/ have a sample count equal to+-- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'+--+-- - @dstImageLayout@ /must/ specify the layout of the image subresources+-- of @dstImage@ specified in @pRegions@ at the time this command is+-- executed on a 'Graphics.Vulkan.Core10.Handles.Device'+--+-- - @dstImageLayout@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL', or+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR'+--+-- - If @commandBuffer@ is an unprotected command buffer, then+-- @srcBuffer@ /must/ not be a protected buffer+--+-- - If @commandBuffer@ is an unprotected command buffer, then @dstImage@+-- /must/ not be a protected image+--+-- - If @commandBuffer@ is a protected command buffer, then @dstImage@+-- /must/ not be an unprotected image+--+-- - The @imageSubresource.mipLevel@ member of each element of @pRegions@+-- /must/ be less than the @mipLevels@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was+-- created+--+-- - The @imageSubresource.baseArrayLayer@ ++-- @imageSubresource.layerCount@ of each element of @pRegions@ /must/+-- be less than or equal to the @arrayLayers@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was+-- created+--+-- - The @imageOffset@ and @imageExtent@ members of each element of+-- @pRegions@ /must/ respect the image transfer granularity+-- requirements of @commandBuffer@’s command pool’s queue family, as+-- described in+-- 'Graphics.Vulkan.Core10.DeviceInitialization.QueueFamilyProperties'+--+-- - @dstImage@ /must/ not have been created with @flags@ containing+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @srcBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+--+-- - @dstImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle+--+-- - @dstImageLayout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value+--+-- - @pRegions@ /must/ be a valid pointer to an array of @regionCount@+-- valid 'BufferImageCopy' structures+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support transfer,+-- graphics, or compute operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - @regionCount@ /must/ be greater than @0@+--+-- - Each of @commandBuffer@, @dstImage@, and @srcBuffer@ /must/ have+-- been created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Transfer | Transfer |+-- | Secondary | | Graphics | |+-- | | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.Buffer', 'BufferImageCopy',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.Image',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout'+cmdCopyBufferToImage :: forall io . MonadIO io => CommandBuffer -> ("srcBuffer" ::: Buffer) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector BufferImageCopy) -> io ()+cmdCopyBufferToImage commandBuffer srcBuffer dstImage dstImageLayout regions = liftIO . evalContT $ do+ let vkCmdCopyBufferToImage' = mkVkCmdCopyBufferToImage (pVkCmdCopyBufferToImage (deviceCmds (commandBuffer :: CommandBuffer)))+ pPRegions <- ContT $ allocaBytesAligned @BufferImageCopy ((Data.Vector.length (regions)) * 56) 8+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRegions `plusPtr` (56 * (i)) :: Ptr BufferImageCopy) (e) . ($ ())) (regions)+ lift $ vkCmdCopyBufferToImage' (commandBufferHandle (commandBuffer)) (srcBuffer) (dstImage) (dstImageLayout) ((fromIntegral (Data.Vector.length $ (regions)) :: Word32)) (pPRegions)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdCopyImageToBuffer+ :: FunPtr (Ptr CommandBuffer_T -> Image -> ImageLayout -> Buffer -> Word32 -> Ptr BufferImageCopy -> IO ()) -> Ptr CommandBuffer_T -> Image -> ImageLayout -> Buffer -> Word32 -> Ptr BufferImageCopy -> IO ()++-- | vkCmdCopyImageToBuffer - Copy image data into a buffer+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @srcImage@ is the source image.+--+-- - @srcImageLayout@ is the layout of the source image subresources for+-- the copy.+--+-- - @dstBuffer@ is the destination buffer.+--+-- - @regionCount@ is the number of regions to copy.+--+-- - @pRegions@ is a pointer to an array of 'BufferImageCopy' structures+-- specifying the regions to copy.+--+-- = Description+--+-- Each region in @pRegions@ is copied from the specified region of the+-- source image to the specified region of the destination buffer.+--+-- If the 'Graphics.Vulkan.Core10.Enums.Format.Format' of @srcImage@ is a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>,+-- regions of each plane to be a source of a copy /must/ be specified+-- separately using the @pRegions@ member of the 'BufferImageCopy'+-- structure. In this case, the @aspectMask@ of @imageSubresource@ /must/+-- be+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'.+-- For the purposes of 'cmdCopyBufferToImage', each plane of a multi-planar+-- image is treated as having the format listed in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatible-planes>+-- for the plane identified by the @aspectMask@ of the corresponding+-- subresource. This applies both to+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' and to coordinates used in+-- the copy, which correspond to texels in the /plane/ rather than how+-- these texels map to coordinates in the image as a whole.+--+-- == Valid Usage+--+-- - The image region specified by each element of @pRegions@ /must/ be a+-- region that is contained within @srcImage@ if the @srcImage@’s+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' is not a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,+-- and /must/ be a region that is contained within the plane being+-- copied if the @srcImage@’s+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' is a multi-planar+-- format+--+-- - @dstBuffer@ /must/ be large enough to contain all buffer locations+-- that are accessed according to+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#copies-buffers-images-addressing Buffer and Image Addressing>,+-- for each element of @pRegions@+--+-- - The union of all source regions, and the union of all destination+-- regions, specified by the elements of @pRegions@, /must/ not overlap+-- in memory+--+-- - The+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>+-- of @srcImage@ /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_TRANSFER_SRC_BIT'.+--+-- - @srcImage@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_SRC_BIT'+-- usage flag+--+-- - If @srcImage@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @srcImage@ /must/ have a sample count equal to+-- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'+--+-- - @srcImageLayout@ /must/ specify the layout of the image subresources+-- of @srcImage@ specified in @pRegions@ at the time this command is+-- executed on a 'Graphics.Vulkan.Core10.Handles.Device'+--+-- - @srcImageLayout@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL'+-- or 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL'+--+-- - @dstBuffer@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'+-- usage flag+--+-- - If @dstBuffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - If @commandBuffer@ is an unprotected command buffer, then @srcImage@+-- /must/ not be a protected image+--+-- - If @commandBuffer@ is an unprotected command buffer, then+-- @dstBuffer@ /must/ not be a protected buffer+--+-- - If @commandBuffer@ is a protected command buffer, then @dstBuffer@+-- /must/ not be an unprotected buffer+--+-- - The @imageSubresource.mipLevel@ member of each element of @pRegions@+-- /must/ be less than the @mipLevels@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was+-- created+--+-- - The @imageSubresource.baseArrayLayer@ ++-- @imageSubresource.layerCount@ of each element of @pRegions@ /must/+-- be less than or equal to the @arrayLayers@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was+-- created+--+-- - The @imageOffset@ and @imageExtent@ members of each element of+-- @pRegions@ /must/ respect the image transfer granularity+-- requirements of @commandBuffer@’s command pool’s queue family, as+-- described in+-- 'Graphics.Vulkan.Core10.DeviceInitialization.QueueFamilyProperties'+--+-- - @srcImage@ /must/ not have been created with @flags@ containing+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @srcImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle+--+-- - @srcImageLayout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value+--+-- - @dstBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+--+-- - @pRegions@ /must/ be a valid pointer to an array of @regionCount@+-- valid 'BufferImageCopy' structures+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support transfer,+-- graphics, or compute operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - @regionCount@ /must/ be greater than @0@+--+-- - Each of @commandBuffer@, @dstBuffer@, and @srcImage@ /must/ have+-- been created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Transfer | Transfer |+-- | Secondary | | Graphics | |+-- | | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.Buffer', 'BufferImageCopy',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.Image',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout'+cmdCopyImageToBuffer :: forall io . MonadIO io => CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstBuffer" ::: Buffer) -> ("regions" ::: Vector BufferImageCopy) -> io ()+cmdCopyImageToBuffer commandBuffer srcImage srcImageLayout dstBuffer regions = liftIO . evalContT $ do+ let vkCmdCopyImageToBuffer' = mkVkCmdCopyImageToBuffer (pVkCmdCopyImageToBuffer (deviceCmds (commandBuffer :: CommandBuffer)))+ pPRegions <- ContT $ allocaBytesAligned @BufferImageCopy ((Data.Vector.length (regions)) * 56) 8+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRegions `plusPtr` (56 * (i)) :: Ptr BufferImageCopy) (e) . ($ ())) (regions)+ lift $ vkCmdCopyImageToBuffer' (commandBufferHandle (commandBuffer)) (srcImage) (srcImageLayout) (dstBuffer) ((fromIntegral (Data.Vector.length $ (regions)) :: Word32)) (pPRegions)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdUpdateBuffer+ :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> DeviceSize -> Ptr () -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> DeviceSize -> Ptr () -> IO ()++-- | vkCmdUpdateBuffer - Update a buffer’s contents from host memory+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @dstBuffer@ is a handle to the buffer to be updated.+--+-- - @dstOffset@ is the byte offset into the buffer to start updating,+-- and /must/ be a multiple of 4.+--+-- - @dataSize@ is the number of bytes to update, and /must/ be a+-- multiple of 4.+--+-- - @pData@ is a pointer to the source data for the buffer update, and+-- /must/ be at least @dataSize@ bytes in size.+--+-- = Description+--+-- @dataSize@ /must/ be less than or equal to 65536 bytes. For larger+-- updates, applications /can/ use buffer to buffer+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#copies-buffers copies>.+--+-- Note+--+-- Buffer updates performed with 'cmdUpdateBuffer' first copy the data into+-- command buffer memory when the command is recorded (which requires+-- additional storage and may incur an additional allocation), and then+-- copy the data from the command buffer into @dstBuffer@ when the command+-- is executed on a device.+--+-- The additional cost of this functionality compared to+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#copies-buffers buffer to buffer copies>+-- means it is only recommended for very small amounts of data, and is why+-- it is limited to only 65536 bytes.+--+-- Applications /can/ work around this by issuing multiple+-- 'cmdUpdateBuffer' commands to different ranges of the same buffer, but+-- it is strongly recommended that they /should/ not.+--+-- The source data is copied from the user pointer to the command buffer+-- when the command is called.+--+-- 'cmdUpdateBuffer' is only allowed outside of a render pass. This command+-- is treated as “transfer” operation, for the purposes of synchronization+-- barriers. The+-- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'+-- /must/ be specified in @usage@ of+-- 'Graphics.Vulkan.Core10.Buffer.BufferCreateInfo' in order for the buffer+-- to be compatible with 'cmdUpdateBuffer'.+--+-- == Valid Usage+--+-- - @dstOffset@ /must/ be less than the size of @dstBuffer@+--+-- - @dataSize@ /must/ be less than or equal to the size of @dstBuffer@+-- minus @dstOffset@+--+-- - @dstBuffer@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'+-- usage flag+--+-- - If @dstBuffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @dstOffset@ /must/ be a multiple of @4@+--+-- - @dataSize@ /must/ be less than or equal to @65536@+--+-- - @dataSize@ /must/ be a multiple of @4@+--+-- - If @commandBuffer@ is an unprotected command buffer, then+-- @dstBuffer@ /must/ not be a protected buffer+--+-- - If @commandBuffer@ is a protected command buffer, then @dstBuffer@+-- /must/ not be an unprotected buffer+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @dstBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+--+-- - @pData@ /must/ be a valid pointer to an array of @dataSize@ bytes+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support transfer,+-- graphics, or compute operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - @dataSize@ /must/ be greater than @0@+--+-- - Both of @commandBuffer@, and @dstBuffer@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Transfer | Transfer |+-- | Secondary | | Graphics | |+-- | | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.Buffer',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'+cmdUpdateBuffer :: forall io . MonadIO io => CommandBuffer -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> ("dataSize" ::: DeviceSize) -> ("data" ::: Ptr ()) -> io ()+cmdUpdateBuffer commandBuffer dstBuffer dstOffset dataSize data' = liftIO $ do+ let vkCmdUpdateBuffer' = mkVkCmdUpdateBuffer (pVkCmdUpdateBuffer (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdUpdateBuffer' (commandBufferHandle (commandBuffer)) (dstBuffer) (dstOffset) (dataSize) (data')+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdFillBuffer+ :: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> DeviceSize -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> DeviceSize -> Word32 -> IO ()++-- | vkCmdFillBuffer - Fill a region of a buffer with a fixed value+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @dstBuffer@ is the buffer to be filled.+--+-- - @dstOffset@ is the byte offset into the buffer at which to start+-- filling, and /must/ be a multiple of 4.+--+-- - @size@ is the number of bytes to fill, and /must/ be either a+-- multiple of 4, or 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE'+-- to fill the range from @offset@ to the end of the buffer. If+-- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE' is used and the+-- remaining size of the buffer is not a multiple of 4, then the+-- nearest smaller multiple is used.+--+-- - @data@ is the 4-byte word written repeatedly to the buffer to fill+-- @size@ bytes of data. The data word is written to memory according+-- to the host endianness.+--+-- = Description+--+-- 'cmdFillBuffer' is treated as “transfer” operation for the purposes of+-- synchronization barriers. The+-- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'+-- /must/ be specified in @usage@ of+-- 'Graphics.Vulkan.Core10.Buffer.BufferCreateInfo' in order for the buffer+-- to be compatible with 'cmdFillBuffer'.+--+-- == Valid Usage+--+-- - @dstOffset@ /must/ be less than the size of @dstBuffer@+--+-- - @dstOffset@ /must/ be a multiple of @4@+--+-- - If @size@ is not equal to+-- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', @size@ /must/ be+-- greater than @0@+--+-- - If @size@ is not equal to+-- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', @size@ /must/ be+-- less than or equal to the size of @dstBuffer@ minus @dstOffset@+--+-- - If @size@ is not equal to+-- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', @size@ /must/ be a+-- multiple of @4@+--+-- - @dstBuffer@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'+-- usage flag+--+-- - If @dstBuffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - If @commandBuffer@ is an unprotected command buffer, then+-- @dstBuffer@ /must/ not be a protected buffer+--+-- - If @commandBuffer@ is a protected command buffer, then @dstBuffer@+-- /must/ not be an unprotected buffer+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @dstBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support transfer, graphics+-- or compute operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - Both of @commandBuffer@, and @dstBuffer@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Transfer | Transfer |+-- | Secondary | | Graphics | |+-- | | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.Buffer',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'+cmdFillBuffer :: forall io . MonadIO io => CommandBuffer -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> DeviceSize -> ("data" ::: Word32) -> io ()+cmdFillBuffer commandBuffer dstBuffer dstOffset size data' = liftIO $ do+ let vkCmdFillBuffer' = mkVkCmdFillBuffer (pVkCmdFillBuffer (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdFillBuffer' (commandBufferHandle (commandBuffer)) (dstBuffer) (dstOffset) (size) (data')+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdClearColorImage+ :: FunPtr (Ptr CommandBuffer_T -> Image -> ImageLayout -> Ptr ClearColorValue -> Word32 -> Ptr ImageSubresourceRange -> IO ()) -> Ptr CommandBuffer_T -> Image -> ImageLayout -> Ptr ClearColorValue -> Word32 -> Ptr ImageSubresourceRange -> IO ()++-- | vkCmdClearColorImage - Clear regions of a color image+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @image@ is the image to be cleared.+--+-- - @imageLayout@ specifies the current layout of the image subresource+-- ranges to be cleared, and /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL' or+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'.+--+-- - @pColor@ is a pointer to a+-- 'Graphics.Vulkan.Core10.SharedTypes.ClearColorValue' structure+-- containing the values that the image subresource ranges will be+-- cleared to (see+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#clears-values>+-- below).+--+-- - @rangeCount@ is the number of image subresource range structures in+-- @pRanges@.+--+-- - @pRanges@ is a pointer to an array of+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'+-- structures describing a range of mipmap levels, array layers, and+-- aspects to be cleared, as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-views Image Views>.+--+-- = Description+--+-- Each specified range in @pRanges@ is cleared to the value specified by+-- @pColor@.+--+-- == Valid Usage+--+-- - The+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>+-- of @image@ /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_TRANSFER_DST_BIT'.+--+-- - @image@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'+-- usage flag+--+-- - @image@ /must/ not use a format listed in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion>+--+-- - If @image@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @imageLayout@ /must/ specify the layout of the image subresource+-- ranges of @image@ specified in @pRanges@ at the time this command is+-- executed on a 'Graphics.Vulkan.Core10.Handles.Device'+--+-- - @imageLayout@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL', or+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR'+--+-- - The+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@aspectMask@+-- members of the elements of the @pRanges@ array /must/ each only+-- include+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT'+--+-- - The+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@baseMipLevel@+-- members of the elements of the @pRanges@ array /must/ each be less+-- than the @mipLevels@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created+--+-- - For each 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'+-- element of @pRanges@, if the @levelCount@ member is not+-- 'Graphics.Vulkan.Core10.APIConstants.REMAINING_MIP_LEVELS', then+-- @baseMipLevel@ + @levelCount@ /must/ be less than the @mipLevels@+-- specified in 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when+-- @image@ was created+--+-- - The+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@baseArrayLayer@+-- members of the elements of the @pRanges@ array /must/ each be less+-- than the @arrayLayers@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created+--+-- - For each 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'+-- element of @pRanges@, if the @layerCount@ member is not+-- 'Graphics.Vulkan.Core10.APIConstants.REMAINING_ARRAY_LAYERS', then+-- @baseArrayLayer@ + @layerCount@ /must/ be less than the+-- @arrayLayers@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created+--+-- - @image@ /must/ not have a compressed or depth\/stencil format+--+-- - If @commandBuffer@ is an unprotected command buffer, then @image@+-- /must/ not be a protected image+--+-- - If @commandBuffer@ is a protected command buffer, then @image@+-- /must/ not be an unprotected image+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle+--+-- - @imageLayout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value+--+-- - @pColor@ /must/ be a valid pointer to a valid+-- 'Graphics.Vulkan.Core10.SharedTypes.ClearColorValue' union+--+-- - @pRanges@ /must/ be a valid pointer to an array of @rangeCount@+-- valid 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'+-- structures+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - @rangeCount@ /must/ be greater than @0@+--+-- - Both of @commandBuffer@, and @image@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Graphics | Transfer |+-- | Secondary | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.SharedTypes.ClearColorValue',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.Image',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout',+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'+cmdClearColorImage :: forall io . MonadIO io => CommandBuffer -> Image -> ImageLayout -> ClearColorValue -> ("ranges" ::: Vector ImageSubresourceRange) -> io ()+cmdClearColorImage commandBuffer image imageLayout color ranges = liftIO . evalContT $ do+ let vkCmdClearColorImage' = mkVkCmdClearColorImage (pVkCmdClearColorImage (deviceCmds (commandBuffer :: CommandBuffer)))+ pColor <- ContT $ withCStruct (color)+ pPRanges <- ContT $ allocaBytesAligned @ImageSubresourceRange ((Data.Vector.length (ranges)) * 20) 4+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRanges `plusPtr` (20 * (i)) :: Ptr ImageSubresourceRange) (e) . ($ ())) (ranges)+ lift $ vkCmdClearColorImage' (commandBufferHandle (commandBuffer)) (image) (imageLayout) pColor ((fromIntegral (Data.Vector.length $ (ranges)) :: Word32)) (pPRanges)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdClearDepthStencilImage+ :: FunPtr (Ptr CommandBuffer_T -> Image -> ImageLayout -> Ptr ClearDepthStencilValue -> Word32 -> Ptr ImageSubresourceRange -> IO ()) -> Ptr CommandBuffer_T -> Image -> ImageLayout -> Ptr ClearDepthStencilValue -> Word32 -> Ptr ImageSubresourceRange -> IO ()++-- | vkCmdClearDepthStencilImage - Fill regions of a combined depth\/stencil+-- image+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @image@ is the image to be cleared.+--+-- - @imageLayout@ specifies the current layout of the image subresource+-- ranges to be cleared, and /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL' or+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'.+--+-- - @pDepthStencil@ is a pointer to a+-- 'Graphics.Vulkan.Core10.SharedTypes.ClearDepthStencilValue'+-- structure containing the values that the depth and stencil image+-- subresource ranges will be cleared to (see+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#clears-values>+-- below).+--+-- - @rangeCount@ is the number of image subresource range structures in+-- @pRanges@.+--+-- - @pRanges@ is a pointer to an array of+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'+-- structures describing a range of mipmap levels, array layers, and+-- aspects to be cleared, as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-views Image Views>.+--+-- == Valid Usage+--+-- - The+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>+-- of @image@ /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_TRANSFER_DST_BIT'.+--+-- - If any element of @pRanges.aspect@ includes+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT',+-- and @image@ was created with+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageStencilUsageCreateInfo separate stencil usage>,+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'+-- /must/ have been included in the+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage.ImageStencilUsageCreateInfo'::@stencilUsage@+-- used to create @image@+--+-- - If any element of @pRanges.aspect@ includes+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT',+-- and @image@ was not created with+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageStencilUsageCreateInfo separate stencil usage>,+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'+-- /must/ have been included in the+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@usage@ used to+-- create @image@+--+-- - If any element of @pRanges.aspect@ includes+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_DEPTH_BIT',+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'+-- /must/ have been included in the+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@usage@ used to+-- create @image@+--+-- - If @image@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @imageLayout@ /must/ specify the layout of the image subresource+-- ranges of @image@ specified in @pRanges@ at the time this command is+-- executed on a 'Graphics.Vulkan.Core10.Handles.Device'+--+-- - @imageLayout@ /must/ be either of+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'+-- or 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL'+--+-- - The+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@aspectMask@+-- member of each element of the @pRanges@ array /must/ not include+-- bits other than+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_DEPTH_BIT'+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT'+--+-- - If the @image@’s format does not have a stencil component, then the+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@aspectMask@+-- member of each element of the @pRanges@ array /must/ not include the+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT'+-- bit+--+-- - If the @image@’s format does not have a depth component, then the+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@aspectMask@+-- member of each element of the @pRanges@ array /must/ not include the+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_DEPTH_BIT'+-- bit+--+-- - The+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@baseMipLevel@+-- members of the elements of the @pRanges@ array /must/ each be less+-- than the @mipLevels@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created+--+-- - For each 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'+-- element of @pRanges@, if the @levelCount@ member is not+-- 'Graphics.Vulkan.Core10.APIConstants.REMAINING_MIP_LEVELS', then+-- @baseMipLevel@ + @levelCount@ /must/ be less than the @mipLevels@+-- specified in 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when+-- @image@ was created+--+-- - The+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'::@baseArrayLayer@+-- members of the elements of the @pRanges@ array /must/ each be less+-- than the @arrayLayers@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created+--+-- - For each 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'+-- element of @pRanges@, if the @layerCount@ member is not+-- 'Graphics.Vulkan.Core10.APIConstants.REMAINING_ARRAY_LAYERS', then+-- @baseArrayLayer@ + @layerCount@ /must/ be less than the+-- @arrayLayers@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created+--+-- - @image@ /must/ have a depth\/stencil format+--+-- - If @commandBuffer@ is an unprotected command buffer, then @image@+-- /must/ not be a protected image+--+-- - If @commandBuffer@ is a protected command buffer, then @image@+-- /must/ not be an unprotected image+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle+--+-- - @imageLayout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value+--+-- - @pDepthStencil@ /must/ be a valid pointer to a valid+-- 'Graphics.Vulkan.Core10.SharedTypes.ClearDepthStencilValue'+-- structure+--+-- - @pRanges@ /must/ be a valid pointer to an array of @rangeCount@+-- valid 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'+-- structures+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - @rangeCount@ /must/ be greater than @0@+--+-- - Both of @commandBuffer@, and @image@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Graphics | Transfer |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.SharedTypes.ClearDepthStencilValue',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.Image',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout',+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange'+cmdClearDepthStencilImage :: forall io . MonadIO io => CommandBuffer -> Image -> ImageLayout -> ClearDepthStencilValue -> ("ranges" ::: Vector ImageSubresourceRange) -> io ()+cmdClearDepthStencilImage commandBuffer image imageLayout depthStencil ranges = liftIO . evalContT $ do+ let vkCmdClearDepthStencilImage' = mkVkCmdClearDepthStencilImage (pVkCmdClearDepthStencilImage (deviceCmds (commandBuffer :: CommandBuffer)))+ pDepthStencil <- ContT $ withCStruct (depthStencil)+ pPRanges <- ContT $ allocaBytesAligned @ImageSubresourceRange ((Data.Vector.length (ranges)) * 20) 4+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRanges `plusPtr` (20 * (i)) :: Ptr ImageSubresourceRange) (e) . ($ ())) (ranges)+ lift $ vkCmdClearDepthStencilImage' (commandBufferHandle (commandBuffer)) (image) (imageLayout) pDepthStencil ((fromIntegral (Data.Vector.length $ (ranges)) :: Word32)) (pPRanges)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdClearAttachments+ :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr ClearAttachment -> Word32 -> Ptr ClearRect -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr ClearAttachment -> Word32 -> Ptr ClearRect -> IO ()++-- | vkCmdClearAttachments - Clear regions within bound framebuffer+-- attachments+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @attachmentCount@ is the number of entries in the @pAttachments@+-- array.+--+-- - @pAttachments@ is a pointer to an array of 'ClearAttachment'+-- structures defining the attachments to clear and the clear values to+-- use. If any attachment to be cleared in the current subpass is+-- 'Graphics.Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', then the+-- clear has no effect on that attachment.+--+-- - @rectCount@ is the number of entries in the @pRects@ array.+--+-- - @pRects@ is a pointer to an array of 'ClearRect' structures defining+-- regions within each selected attachment to clear.+--+-- = Description+--+-- 'cmdClearAttachments' /can/ clear multiple regions of each attachment+-- used in the current subpass of a render pass instance. This command+-- /must/ be called only inside a render pass instance, and implicitly+-- selects the images to clear based on the current framebuffer attachments+-- and the command parameters.+--+-- If the render pass has a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-fragmentdensitymapattachment fragment density map attachment>,+-- clears follow the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fragmentdensitymapops operations of fragment density maps>+-- as if each clear region was a primitive which generates fragments. The+-- clear color is applied to all pixels inside each fragment’s area+-- regardless if the pixels lie outside of the clear region. Clears /may/+-- have a different set of supported fragment areas than draws.+--+-- Unlike other+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#clears clear commands>,+-- 'cmdClearAttachments' executes as a drawing command, rather than a+-- transfer command, with writes performed by it executing in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#primrast-order rasterization order>.+-- Clears to color attachments are executed as color attachment writes, by+-- the+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT'+-- stage. Clears to depth\/stencil attachments are executed as+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fragops-depth depth writes>+-- and+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fragops-stencil writes>+-- by the+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT'+-- and+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT'+-- stages.+--+-- == Valid Usage+--+-- - If the @aspectMask@ member of any element of @pAttachments@ contains+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT',+-- then the @colorAttachment@ member of that element /must/ either+-- refer to a color attachment which is+-- 'Graphics.Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', or /must/+-- be a valid color attachment.+--+-- - If the @aspectMask@ member of any element of @pAttachments@ contains+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_DEPTH_BIT',+-- then the current subpass\' depth\/stencil attachment /must/ either+-- be 'Graphics.Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', or+-- /must/ have a depth component+--+-- - If the @aspectMask@ member of any element of @pAttachments@ contains+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT',+-- then the current subpass\' depth\/stencil attachment /must/ either+-- be 'Graphics.Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', or+-- /must/ have a stencil component+--+-- - The @rect@ member of each element of @pRects@ /must/ have an+-- @extent.width@ greater than @0@+--+-- - The @rect@ member of each element of @pRects@ /must/ have an+-- @extent.height@ greater than @0@+--+-- - The rectangular region specified by each element of @pRects@ /must/+-- be contained within the render area of the current render pass+-- instance+--+-- - The layers specified by each element of @pRects@ /must/ be contained+-- within every attachment that @pAttachments@ refers to+--+-- - The @layerCount@ member of each element of @pRects@ /must/ not be+-- @0@+--+-- - If @commandBuffer@ is an unprotected command buffer, then each+-- attachment to be cleared /must/ not be a protected image.+--+-- - If @commandBuffer@ is a protected command buffer, then each+-- attachment to be cleared /must/ not be an unprotected image.+--+-- - If the render pass instance this is recorded in uses multiview, then+-- @baseArrayLayer@ /must/ be zero and @layerCount@ /must/ be one.+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @pAttachments@ /must/ be a valid pointer to an array of+-- @attachmentCount@ valid 'ClearAttachment' structures+--+-- - @pRects@ /must/ be a valid pointer to an array of @rectCount@+-- 'ClearRect' structures+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.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+--+-- - @attachmentCount@ /must/ be greater than @0@+--+-- - @rectCount@ /must/ be greater than @0@+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Inside | Graphics | Graphics |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'ClearAttachment', 'ClearRect',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+cmdClearAttachments :: forall io . MonadIO io => CommandBuffer -> ("attachments" ::: Vector ClearAttachment) -> ("rects" ::: Vector ClearRect) -> io ()+cmdClearAttachments commandBuffer attachments rects = liftIO . evalContT $ do+ let vkCmdClearAttachments' = mkVkCmdClearAttachments (pVkCmdClearAttachments (deviceCmds (commandBuffer :: CommandBuffer)))+ pPAttachments <- ContT $ allocaBytesAligned @ClearAttachment ((Data.Vector.length (attachments)) * 24) 4+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPAttachments `plusPtr` (24 * (i)) :: Ptr ClearAttachment) (e) . ($ ())) (attachments)+ pPRects <- ContT $ allocaBytesAligned @ClearRect ((Data.Vector.length (rects)) * 24) 4+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRects `plusPtr` (24 * (i)) :: Ptr ClearRect) (e) . ($ ())) (rects)+ lift $ vkCmdClearAttachments' (commandBufferHandle (commandBuffer)) ((fromIntegral (Data.Vector.length $ (attachments)) :: Word32)) (pPAttachments) ((fromIntegral (Data.Vector.length $ (rects)) :: Word32)) (pPRects)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdResolveImage+ :: FunPtr (Ptr CommandBuffer_T -> Image -> ImageLayout -> Image -> ImageLayout -> Word32 -> Ptr ImageResolve -> IO ()) -> Ptr CommandBuffer_T -> Image -> ImageLayout -> Image -> ImageLayout -> Word32 -> Ptr ImageResolve -> IO ()++-- | vkCmdResolveImage - Resolve regions of an image+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @srcImage@ is the source image.+--+-- - @srcImageLayout@ is the layout of the source image subresources for+-- the resolve.+--+-- - @dstImage@ is the destination image.+--+-- - @dstImageLayout@ is the layout of the destination image subresources+-- for the resolve.+--+-- - @regionCount@ is the number of regions to resolve.+--+-- - @pRegions@ is a pointer to an array of 'ImageResolve' structures+-- specifying the regions to resolve.+--+-- = Description+--+-- During the resolve the samples corresponding to each pixel location in+-- the source are converted to a single sample before being written to the+-- destination. If the source formats are floating-point or normalized+-- types, the sample values for each pixel are resolved in an+-- implementation-dependent manner. If the source formats are integer+-- types, a single sample’s value is selected for each pixel.+--+-- @srcOffset@ and @dstOffset@ select the initial @x@, @y@, and @z@ offsets+-- in texels of the sub-regions of the source and destination image data.+-- @extent@ is the size in texels of the source image to resolve in+-- @width@, @height@ and @depth@.+--+-- Resolves are done layer by layer starting with @baseArrayLayer@ member+-- of @srcSubresource@ for the source and @dstSubresource@ for the+-- destination. @layerCount@ layers are resolved to the destination image.+--+-- == Valid Usage+--+-- - The source region specified by each element of @pRegions@ /must/ be+-- a region that is contained within @srcImage@+--+-- - The destination region specified by each element of @pRegions@+-- /must/ be a region that is contained within @dstImage@+--+-- - The union of all source regions, and the union of all destination+-- regions, specified by the elements of @pRegions@, /must/ not overlap+-- in memory+--+-- - If @srcImage@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @srcImage@ /must/ have a sample count equal to any valid sample+-- count value other than+-- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'+--+-- - If @dstImage@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - @dstImage@ /must/ have a sample count equal to+-- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'+--+-- - @srcImageLayout@ /must/ specify the layout of the image subresources+-- of @srcImage@ specified in @pRegions@ at the time this command is+-- executed on a 'Graphics.Vulkan.Core10.Handles.Device'+--+-- - @srcImageLayout@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL'+-- or 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL'+--+-- - @dstImageLayout@ /must/ specify the layout of the image subresources+-- of @dstImage@ specified in @pRegions@ at the time this command is+-- executed on a 'Graphics.Vulkan.Core10.Handles.Device'+--+-- - @dstImageLayout@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHARED_PRESENT_KHR',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'+-- or 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL'+--+-- - The+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-format-features format features>+-- of @dstImage@ /must/ contain+-- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_COLOR_ATTACHMENT_BIT'.+--+-- - @srcImage@ and @dstImage@ /must/ have been created with the same+-- image format+--+-- - If @commandBuffer@ is an unprotected command buffer, then @srcImage@+-- /must/ not be a protected image+--+-- - If @commandBuffer@ is an unprotected command buffer, then @dstImage@+-- /must/ not be a protected image+--+-- - If @commandBuffer@ is a protected command buffer, then @dstImage@+-- /must/ not be an unprotected image+--+-- - The @srcSubresource.mipLevel@ member of each element of @pRegions@+-- /must/ be less than the @mipLevels@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was+-- created+--+-- - The @dstSubresource.mipLevel@ member of each element of @pRegions@+-- /must/ be less than the @mipLevels@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was+-- created+--+-- - The @srcSubresource.baseArrayLayer@ + @srcSubresource.layerCount@ of+-- each element of @pRegions@ /must/ be less than or equal to the+-- @arrayLayers@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @srcImage@ was+-- created+--+-- - The @dstSubresource.baseArrayLayer@ + @dstSubresource.layerCount@ of+-- each element of @pRegions@ /must/ be less than or equal to the+-- @arrayLayers@ specified in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @dstImage@ was+-- created+--+-- - @dstImage@ and @srcImage@ /must/ not have been created with @flags@+-- containing+-- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @srcImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle+--+-- - @srcImageLayout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value+--+-- - @dstImage@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle+--+-- - @dstImageLayout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value+--+-- - @pRegions@ /must/ be a valid pointer to an array of @regionCount@+-- valid 'ImageResolve' structures+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - @regionCount@ /must/ be greater than @0@+--+-- - Each of @commandBuffer@, @dstImage@, and @srcImage@ /must/ have been+-- created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Graphics | Transfer |+-- | Secondary | | | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.Image',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout', 'ImageResolve'+cmdResolveImage :: forall io . MonadIO io => CommandBuffer -> ("srcImage" ::: Image) -> ("srcImageLayout" ::: ImageLayout) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("regions" ::: Vector ImageResolve) -> io ()+cmdResolveImage commandBuffer srcImage srcImageLayout dstImage dstImageLayout regions = liftIO . evalContT $ do+ let vkCmdResolveImage' = mkVkCmdResolveImage (pVkCmdResolveImage (deviceCmds (commandBuffer :: CommandBuffer)))+ pPRegions <- ContT $ allocaBytesAligned @ImageResolve ((Data.Vector.length (regions)) * 68) 4+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPRegions `plusPtr` (68 * (i)) :: Ptr ImageResolve) (e) . ($ ())) (regions)+ lift $ vkCmdResolveImage' (commandBufferHandle (commandBuffer)) (srcImage) (srcImageLayout) (dstImage) (dstImageLayout) ((fromIntegral (Data.Vector.length $ (regions)) :: Word32)) (pPRegions)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdSetEvent+ :: FunPtr (Ptr CommandBuffer_T -> Event -> PipelineStageFlags -> IO ()) -> Ptr CommandBuffer_T -> Event -> PipelineStageFlags -> IO ()++-- | vkCmdSetEvent - Set an event object to signaled state+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded.+--+-- - @event@ is the event that will be signaled.+--+-- - @stageMask@ specifies the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages source stage mask>+-- used to determine when the @event@ is signaled.+--+-- = Description+--+-- When 'cmdSetEvent' is submitted to a queue, it defines an execution+-- dependency on commands that were submitted before it, and defines an+-- event signal operation which sets the event to the signaled state.+--+-- The first+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>+-- includes all commands that occur earlier in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>.+-- The synchronization scope is limited to operations on the pipeline+-- stages determined by the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks source stage mask>+-- specified by @stageMask@.+--+-- The second+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>+-- includes only the event signal operation.+--+-- If @event@ is already in the signaled state when 'cmdSetEvent' is+-- executed on the device, then 'cmdSetEvent' has no effect, no event+-- signal operation occurs, and no execution dependency is generated.+--+-- == Valid Usage+--+-- - @stageMask@ /must/ not include+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_HOST_BIT'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-geometryShader geometry shaders>+-- feature is not enabled, @stageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_GEOMETRY_SHADER_BIT'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-tessellationShader tessellation shaders>+-- feature is not enabled, @stageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT'+-- or+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT'+--+-- - @commandBuffer@’s current device mask /must/ include exactly one+-- physical device.+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-meshShader mesh shaders>+-- feature is not enabled, @stageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_MESH_SHADER_BIT_NV'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-taskShader task shaders>+-- feature is not enabled, @stageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TASK_SHADER_BIT_NV'+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @event@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Event'+-- handle+--+-- - @stageMask@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'+-- values+--+-- - @stageMask@ /must/ not be @0@+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - Both of @commandBuffer@, and @event@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Graphics | |+-- | Secondary | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.Event',+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlags'+cmdSetEvent :: forall io . MonadIO io => CommandBuffer -> Event -> ("stageMask" ::: PipelineStageFlags) -> io ()+cmdSetEvent commandBuffer event stageMask = liftIO $ do+ let vkCmdSetEvent' = mkVkCmdSetEvent (pVkCmdSetEvent (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdSetEvent' (commandBufferHandle (commandBuffer)) (event) (stageMask)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdResetEvent+ :: FunPtr (Ptr CommandBuffer_T -> Event -> PipelineStageFlags -> IO ()) -> Ptr CommandBuffer_T -> Event -> PipelineStageFlags -> IO ()++-- | vkCmdResetEvent - Reset an event object to non-signaled state+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded.+--+-- - @event@ is the event that will be unsignaled.+--+-- - @stageMask@ is a bitmask of+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'+-- specifying the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages source stage mask>+-- used to determine when the @event@ is unsignaled.+--+-- = Description+--+-- When 'cmdResetEvent' is submitted to a queue, it defines an execution+-- dependency on commands that were submitted before it, and defines an+-- event unsignal operation which resets the event to the unsignaled state.+--+-- The first+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>+-- includes all commands that occur earlier in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>.+-- The synchronization scope is limited to operations on the pipeline+-- stages determined by the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks source stage mask>+-- specified by @stageMask@.+--+-- The second+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>+-- includes only the event unsignal operation.+--+-- If @event@ is already in the unsignaled state when 'cmdResetEvent' is+-- executed on the device, then 'cmdResetEvent' has no effect, no event+-- unsignal operation occurs, and no execution dependency is generated.+--+-- == Valid Usage+--+-- - @stageMask@ /must/ not include+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_HOST_BIT'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-geometryShader geometry shaders>+-- feature is not enabled, @stageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_GEOMETRY_SHADER_BIT'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-tessellationShader tessellation shaders>+-- feature is not enabled, @stageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT'+-- or+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT'+--+-- - When this command executes, @event@ /must/ not be waited on by a+-- 'cmdWaitEvents' command that is currently executing+--+-- - @commandBuffer@’s current device mask /must/ include exactly one+-- physical device.+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-meshShader mesh shaders>+-- feature is not enabled, @stageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_MESH_SHADER_BIT_NV'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-taskShader task shaders>+-- feature is not enabled, @stageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TASK_SHADER_BIT_NV'+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @event@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Event'+-- handle+--+-- - @stageMask@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'+-- values+--+-- - @stageMask@ /must/ not be @0@+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - Both of @commandBuffer@, and @event@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Graphics | |+-- | Secondary | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.Event',+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlags'+cmdResetEvent :: forall io . MonadIO io => CommandBuffer -> Event -> ("stageMask" ::: PipelineStageFlags) -> io ()+cmdResetEvent commandBuffer event stageMask = liftIO $ do+ let vkCmdResetEvent' = mkVkCmdResetEvent (pVkCmdResetEvent (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdResetEvent' (commandBufferHandle (commandBuffer)) (event) (stageMask)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdWaitEvents+ :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr Event -> PipelineStageFlags -> PipelineStageFlags -> Word32 -> Ptr MemoryBarrier -> Word32 -> Ptr BufferMemoryBarrier -> Word32 -> Ptr (ImageMemoryBarrier a) -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr Event -> PipelineStageFlags -> PipelineStageFlags -> Word32 -> Ptr MemoryBarrier -> Word32 -> Ptr BufferMemoryBarrier -> Word32 -> Ptr (ImageMemoryBarrier a) -> IO ()++-- | vkCmdWaitEvents - Wait for one or more events and insert a set of memory+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded.+--+-- - @eventCount@ is the length of the @pEvents@ array.+--+-- - @pEvents@ is a pointer to an array of event object handles to wait+-- on.+--+-- - @srcStageMask@ is a bitmask of+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'+-- specifying the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages source stage mask>.+--+-- - @dstStageMask@ is a bitmask of+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'+-- specifying the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages destination stage mask>.+--+-- - @memoryBarrierCount@ is the length of the @pMemoryBarriers@ array.+--+-- - @pMemoryBarriers@ is a pointer to an array of+-- 'Graphics.Vulkan.Core10.OtherTypes.MemoryBarrier' structures.+--+-- - @bufferMemoryBarrierCount@ is the length of the+-- @pBufferMemoryBarriers@ array.+--+-- - @pBufferMemoryBarriers@ is a pointer to an array of+-- 'Graphics.Vulkan.Core10.OtherTypes.BufferMemoryBarrier' structures.+--+-- - @imageMemoryBarrierCount@ is the length of the+-- @pImageMemoryBarriers@ array.+--+-- - @pImageMemoryBarriers@ is a pointer to an array of+-- 'Graphics.Vulkan.Core10.OtherTypes.ImageMemoryBarrier' structures.+--+-- = Description+--+-- When 'cmdWaitEvents' is submitted to a queue, it defines a memory+-- dependency between prior event signal operations on the same queue or+-- the host, and subsequent commands. 'cmdWaitEvents' /must/ not be used to+-- wait on event signal operations occurring on other queues.+--+-- The first synchronization scope only includes event signal operations+-- that operate on members of @pEvents@, and the operations that+-- happened-before the event signal operations. Event signal operations+-- performed by 'cmdSetEvent' that occur earlier in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>+-- are included in the first synchronization scope, if the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-order logically latest>+-- pipeline stage in their @stageMask@ parameter is+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-order logically earlier>+-- than or equal to the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-order logically latest>+-- pipeline stage in @srcStageMask@. Event signal operations performed by+-- 'Graphics.Vulkan.Core10.Event.setEvent' are only included in the first+-- synchronization scope if+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_HOST_BIT'+-- is included in @srcStageMask@.+--+-- The second+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>+-- includes all commands that occur later in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>.+-- The second synchronization scope is limited to operations on the+-- pipeline stages determined by the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks destination stage mask>+-- specified by @dstStageMask@.+--+-- The first+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-access-scopes access scope>+-- is limited to access in the pipeline stages determined by the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks source stage mask>+-- specified by @srcStageMask@. Within that, the first access scope only+-- includes the first access scopes defined by elements of the+-- @pMemoryBarriers@, @pBufferMemoryBarriers@ and @pImageMemoryBarriers@+-- arrays, which each define a set of+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-memory-barriers memory barriers>.+-- If no memory barriers are specified, then the first access scope+-- includes no accesses.+--+-- The second+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-access-scopes access scope>+-- is limited to access in the pipeline stages determined by the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks destination stage mask>+-- specified by @dstStageMask@. Within that, the second access scope only+-- includes the second access scopes defined by elements of the+-- @pMemoryBarriers@, @pBufferMemoryBarriers@ and @pImageMemoryBarriers@+-- arrays, which each define a set of+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-memory-barriers memory barriers>.+-- If no memory barriers are specified, then the second access scope+-- includes no accesses.+--+-- Note+--+-- 'cmdWaitEvents' is used with 'cmdSetEvent' to define a memory dependency+-- between two sets of action commands, roughly in the same way as pipeline+-- barriers, but split into two commands such that work between the two+-- /may/ execute unhindered.+--+-- Unlike 'cmdPipelineBarrier', a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-queue-transfers queue family ownership transfer>+-- /cannot/ be performed using 'cmdWaitEvents'.+--+-- Note+--+-- Applications /should/ be careful to avoid race conditions when using+-- events. There is no direct ordering guarantee between a 'cmdResetEvent'+-- command and a 'cmdWaitEvents' command submitted after it, so some other+-- execution dependency /must/ be included between these commands (e.g. a+-- semaphore).+--+-- == Valid Usage+--+-- - @srcStageMask@ /must/ be the bitwise OR of the @stageMask@ parameter+-- used in previous calls to 'cmdSetEvent' with any of the members of+-- @pEvents@ and+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_HOST_BIT'+-- if any of the members of @pEvents@ was set using+-- 'Graphics.Vulkan.Core10.Event.setEvent'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-geometryShader geometry shaders>+-- feature is not enabled, @srcStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_GEOMETRY_SHADER_BIT'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-geometryShader geometry shaders>+-- feature is not enabled, @dstStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_GEOMETRY_SHADER_BIT'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-tessellationShader tessellation shaders>+-- feature is not enabled, @srcStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT'+-- or+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-tessellationShader tessellation shaders>+-- feature is not enabled, @dstStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT'+-- or+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT'+--+-- - If @pEvents@ includes one or more events that will be signaled by+-- 'Graphics.Vulkan.Core10.Event.setEvent' after @commandBuffer@ has+-- been submitted to a queue, then 'cmdWaitEvents' /must/ not be called+-- inside a render pass instance+--+-- - Any pipeline stage included in @srcStageMask@ or @dstStageMask@+-- /must/ be supported by the capabilities of the queue family+-- specified by the @queueFamilyIndex@ member of the+-- 'Graphics.Vulkan.Core10.CommandPool.CommandPoolCreateInfo' structure+-- that was used to create the+-- 'Graphics.Vulkan.Core10.Handles.CommandPool' that @commandBuffer@+-- was allocated from, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-supported table of supported pipeline stages>.+--+-- - Each element of @pMemoryBarriers@, @pBufferMemoryBarriers@ or+-- @pImageMemoryBarriers@ /must/ not have any access flag included in+-- its @srcAccessMask@ member if that bit is not supported by any of+-- the pipeline stages in @srcStageMask@, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>.+--+-- - Each element of @pMemoryBarriers@, @pBufferMemoryBarriers@ or+-- @pImageMemoryBarriers@ /must/ not have any access flag included in+-- its @dstAccessMask@ member if that bit is not supported by any of+-- the pipeline stages in @dstStageMask@, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>.+--+-- - The @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ members of any+-- element of @pBufferMemoryBarriers@ or @pImageMemoryBarriers@ /must/+-- be equal.+--+-- - @commandBuffer@’s current device mask /must/ include exactly one+-- physical device.+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-meshShader mesh shaders>+-- feature is not enabled, @srcStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_MESH_SHADER_BIT_NV'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-taskShader task shaders>+-- feature is not enabled, @srcStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TASK_SHADER_BIT_NV'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-meshShader mesh shaders>+-- feature is not enabled, @dstStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_MESH_SHADER_BIT_NV'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-taskShader task shaders>+-- feature is not enabled, @dstStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TASK_SHADER_BIT_NV'+--+-- - The @srcAccessMask@ member of each element of @pMemoryBarriers@+-- /must/ only include access flags that are supported by one or more+-- of the pipeline stages in @srcStageMask@, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>+--+-- - The @dstAccessMask@ member of each element of @pMemoryBarriers@+-- /must/ only include access flags that are supported by one or more+-- of the pipeline stages in @dstStageMask@, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>+--+-- - The @srcAccessMask@ member of each element of+-- @pBufferMemoryBarriers@ /must/ only include access flags that are+-- supported by one or more of the pipeline stages in @srcStageMask@,+-- as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>+--+-- - The @dstAccessMask@ member of each element of+-- @pBufferMemoryBarriers@ /must/ only include access flags that are+-- supported by one or more of the pipeline stages in @dstStageMask@,+-- as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>+--+-- - The @srcAccessMask@ member of each element of @pImageMemoryBarriers@+-- /must/ only include access flags that are supported by one or more+-- of the pipeline stages in @srcStageMask@, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>+--+-- - The @dstAccessMask@ member of any element of @pImageMemoryBarriers@+-- /must/ only include access flags that are supported by one or more+-- of the pipeline stages in @dstStageMask@, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @pEvents@ /must/ be a valid pointer to an array of @eventCount@+-- valid 'Graphics.Vulkan.Core10.Handles.Event' handles+--+-- - @srcStageMask@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'+-- values+--+-- - @srcStageMask@ /must/ not be @0@+--+-- - @dstStageMask@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'+-- values+--+-- - @dstStageMask@ /must/ not be @0@+--+-- - If @memoryBarrierCount@ is not @0@, @pMemoryBarriers@ /must/ be a+-- valid pointer to an array of @memoryBarrierCount@ valid+-- 'Graphics.Vulkan.Core10.OtherTypes.MemoryBarrier' structures+--+-- - If @bufferMemoryBarrierCount@ is not @0@, @pBufferMemoryBarriers@+-- /must/ be a valid pointer to an array of @bufferMemoryBarrierCount@+-- valid 'Graphics.Vulkan.Core10.OtherTypes.BufferMemoryBarrier'+-- structures+--+-- - If @imageMemoryBarrierCount@ is not @0@, @pImageMemoryBarriers@+-- /must/ be a valid pointer to an array of @imageMemoryBarrierCount@+-- valid 'Graphics.Vulkan.Core10.OtherTypes.ImageMemoryBarrier'+-- structures+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations+--+-- - @eventCount@ /must/ be greater than @0@+--+-- - Both of @commandBuffer@, and the elements of @pEvents@ /must/ have+-- been created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.OtherTypes.BufferMemoryBarrier',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.Event',+-- 'Graphics.Vulkan.Core10.OtherTypes.ImageMemoryBarrier',+-- 'Graphics.Vulkan.Core10.OtherTypes.MemoryBarrier',+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlags'+cmdWaitEvents :: forall a io . (PokeChain a, MonadIO io) => CommandBuffer -> ("events" ::: Vector Event) -> ("srcStageMask" ::: PipelineStageFlags) -> ("dstStageMask" ::: PipelineStageFlags) -> ("memoryBarriers" ::: Vector MemoryBarrier) -> ("bufferMemoryBarriers" ::: Vector BufferMemoryBarrier) -> ("imageMemoryBarriers" ::: Vector (ImageMemoryBarrier a)) -> io ()+cmdWaitEvents commandBuffer events srcStageMask dstStageMask memoryBarriers bufferMemoryBarriers imageMemoryBarriers = liftIO . evalContT $ do+ let vkCmdWaitEvents' = mkVkCmdWaitEvents (pVkCmdWaitEvents (deviceCmds (commandBuffer :: CommandBuffer)))+ pPEvents <- ContT $ allocaBytesAligned @Event ((Data.Vector.length (events)) * 8) 8+ lift $ Data.Vector.imapM_ (\i e -> poke (pPEvents `plusPtr` (8 * (i)) :: Ptr Event) (e)) (events)+ pPMemoryBarriers <- ContT $ allocaBytesAligned @MemoryBarrier ((Data.Vector.length (memoryBarriers)) * 24) 8+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPMemoryBarriers `plusPtr` (24 * (i)) :: Ptr MemoryBarrier) (e) . ($ ())) (memoryBarriers)+ pPBufferMemoryBarriers <- ContT $ allocaBytesAligned @BufferMemoryBarrier ((Data.Vector.length (bufferMemoryBarriers)) * 56) 8+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPBufferMemoryBarriers `plusPtr` (56 * (i)) :: Ptr BufferMemoryBarrier) (e) . ($ ())) (bufferMemoryBarriers)+ pPImageMemoryBarriers <- ContT $ allocaBytesAligned @(ImageMemoryBarrier _) ((Data.Vector.length (imageMemoryBarriers)) * 72) 8+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPImageMemoryBarriers `plusPtr` (72 * (i)) :: Ptr (ImageMemoryBarrier _)) (e) . ($ ())) (imageMemoryBarriers)+ lift $ vkCmdWaitEvents' (commandBufferHandle (commandBuffer)) ((fromIntegral (Data.Vector.length $ (events)) :: Word32)) (pPEvents) (srcStageMask) (dstStageMask) ((fromIntegral (Data.Vector.length $ (memoryBarriers)) :: Word32)) (pPMemoryBarriers) ((fromIntegral (Data.Vector.length $ (bufferMemoryBarriers)) :: Word32)) (pPBufferMemoryBarriers) ((fromIntegral (Data.Vector.length $ (imageMemoryBarriers)) :: Word32)) (pPImageMemoryBarriers)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdPipelineBarrier+ :: FunPtr (Ptr CommandBuffer_T -> PipelineStageFlags -> PipelineStageFlags -> DependencyFlags -> Word32 -> Ptr MemoryBarrier -> Word32 -> Ptr BufferMemoryBarrier -> Word32 -> Ptr (ImageMemoryBarrier a) -> IO ()) -> Ptr CommandBuffer_T -> PipelineStageFlags -> PipelineStageFlags -> DependencyFlags -> Word32 -> Ptr MemoryBarrier -> Word32 -> Ptr BufferMemoryBarrier -> Word32 -> Ptr (ImageMemoryBarrier a) -> IO ()++-- | vkCmdPipelineBarrier - Insert a memory dependency+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded.+--+-- - @srcStageMask@ is a bitmask of+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'+-- specifying the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks source stage mask>.+--+-- - @dstStageMask@ is a bitmask of+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'+-- specifying the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks destination stage mask>.+--+-- - @dependencyFlags@ is a bitmask of+-- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlagBits'+-- specifying how execution and memory dependencies are formed.+--+-- - @memoryBarrierCount@ is the length of the @pMemoryBarriers@ array.+--+-- - @pMemoryBarriers@ is a pointer to an array of+-- 'Graphics.Vulkan.Core10.OtherTypes.MemoryBarrier' structures.+--+-- - @bufferMemoryBarrierCount@ is the length of the+-- @pBufferMemoryBarriers@ array.+--+-- - @pBufferMemoryBarriers@ is a pointer to an array of+-- 'Graphics.Vulkan.Core10.OtherTypes.BufferMemoryBarrier' structures.+--+-- - @imageMemoryBarrierCount@ is the length of the+-- @pImageMemoryBarriers@ array.+--+-- - @pImageMemoryBarriers@ is a pointer to an array of+-- 'Graphics.Vulkan.Core10.OtherTypes.ImageMemoryBarrier' structures.+--+-- = Description+--+-- When 'cmdPipelineBarrier' is submitted to a queue, it defines a memory+-- dependency between commands that were submitted before it, and those+-- submitted after it.+--+-- If 'cmdPipelineBarrier' was recorded outside a render pass instance, the+-- first+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>+-- includes all commands that occur earlier in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>.+-- If 'cmdPipelineBarrier' was recorded inside a render pass instance, the+-- first synchronization scope includes only commands that occur earlier in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>+-- within the same subpass. In either case, the first synchronization scope+-- is limited to operations on the pipeline stages determined by the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks source stage mask>+-- specified by @srcStageMask@.+--+-- If 'cmdPipelineBarrier' was recorded outside a render pass instance, the+-- second+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-scopes synchronization scope>+-- includes all commands that occur later in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>.+-- If 'cmdPipelineBarrier' was recorded inside a render pass instance, the+-- second synchronization scope includes only commands that occur later in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-submission-order submission order>+-- within the same subpass. In either case, the second synchronization+-- scope is limited to operations on the pipeline stages determined by the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks destination stage mask>+-- specified by @dstStageMask@.+--+-- The first+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-access-scopes access scope>+-- is limited to access in the pipeline stages determined by the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks source stage mask>+-- specified by @srcStageMask@. Within that, the first access scope only+-- includes the first access scopes defined by elements of the+-- @pMemoryBarriers@, @pBufferMemoryBarriers@ and @pImageMemoryBarriers@+-- arrays, which each define a set of+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-memory-barriers memory barriers>.+-- If no memory barriers are specified, then the first access scope+-- includes no accesses.+--+-- The second+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-dependencies-access-scopes access scope>+-- is limited to access in the pipeline stages determined by the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-masks destination stage mask>+-- specified by @dstStageMask@. Within that, the second access scope only+-- includes the second access scopes defined by elements of the+-- @pMemoryBarriers@, @pBufferMemoryBarriers@ and @pImageMemoryBarriers@+-- arrays, which each define a set of+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-memory-barriers memory barriers>.+-- If no memory barriers are specified, then the second access scope+-- includes no accesses.+--+-- If @dependencyFlags@ includes+-- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_BY_REGION_BIT',+-- then any dependency between+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-framebuffer-regions framebuffer-space>+-- pipeline stages is+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-framebuffer-regions framebuffer-local>+-- - otherwise it is+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-framebuffer-regions framebuffer-global>.+--+-- == Valid Usage+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-geometryShader geometry shaders>+-- feature is not enabled, @srcStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_GEOMETRY_SHADER_BIT'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-geometryShader geometry shaders>+-- feature is not enabled, @dstStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_GEOMETRY_SHADER_BIT'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-tessellationShader tessellation shaders>+-- feature is not enabled, @srcStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT'+-- or+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-tessellationShader tessellation shaders>+-- feature is not enabled, @dstStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT'+-- or+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT'+--+-- - If 'cmdPipelineBarrier' is called within a render pass instance, the+-- render pass /must/ have been created with at least one+-- 'Graphics.Vulkan.Core10.Pass.SubpassDependency' instance in+-- 'Graphics.Vulkan.Core10.Pass.RenderPassCreateInfo'::@pDependencies@+-- that expresses a dependency from the current subpass to itself, and+-- for which @srcStageMask@ contains a subset of the bit values in+-- 'Graphics.Vulkan.Core10.Pass.SubpassDependency'::@srcStageMask@,+-- @dstStageMask@ contains a subset of the bit values in+-- 'Graphics.Vulkan.Core10.Pass.SubpassDependency'::@dstStageMask@,+-- @dependencyFlags@ is equal to+-- 'Graphics.Vulkan.Core10.Pass.SubpassDependency'::@dependencyFlags@,+-- @srcAccessMask@ member of each element of @pMemoryBarriers@ and+-- @pImageMemoryBarriers@ contains a subset of the bit values in+-- 'Graphics.Vulkan.Core10.Pass.SubpassDependency'::@srcAccessMask@,+-- and @dstAccessMask@ member of each element of @pMemoryBarriers@ and+-- @pImageMemoryBarriers@ contains a subset of the bit values in+-- 'Graphics.Vulkan.Core10.Pass.SubpassDependency'::@dstAccessMask@+--+-- - If 'cmdPipelineBarrier' is called within a render pass instance,+-- @bufferMemoryBarrierCount@ /must/ be @0@+--+-- - If 'cmdPipelineBarrier' is called within a render pass instance, the+-- @image@ member of any element of @pImageMemoryBarriers@ /must/ be+-- equal to one of the elements of @pAttachments@ that the current+-- @framebuffer@ was created with, that is also referred to by one of+-- the elements of the @pColorAttachments@, @pResolveAttachments@ or+-- @pDepthStencilAttachment@ members of the+-- 'Graphics.Vulkan.Core10.Pass.SubpassDescription' instance or by the+-- @pDepthStencilResolveAttachment@ member of the+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_depth_stencil_resolve.SubpassDescriptionDepthStencilResolve'+-- structure that the current subpass was created with+--+-- - If 'cmdPipelineBarrier' is called within a render pass instance, the+-- @oldLayout@ and @newLayout@ members of any element of+-- @pImageMemoryBarriers@ /must/ be equal to the @layout@ member of an+-- element of the @pColorAttachments@, @pResolveAttachments@ or+-- @pDepthStencilAttachment@ members of the+-- 'Graphics.Vulkan.Core10.Pass.SubpassDescription' instance or by the+-- @pDepthStencilResolveAttachment@ member of the+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_depth_stencil_resolve.SubpassDescriptionDepthStencilResolve'+-- structure that the current subpass was created with, that refers to+-- the same @image@+--+-- - If 'cmdPipelineBarrier' is called within a render pass instance, the+-- @oldLayout@ and @newLayout@ members of an element of+-- @pImageMemoryBarriers@ /must/ be equal+--+-- - If 'cmdPipelineBarrier' is called within a render pass instance, the+-- @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ members of any+-- element of @pImageMemoryBarriers@ /must/ be+-- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED'+--+-- - Any pipeline stage included in @srcStageMask@ or @dstStageMask@+-- /must/ be supported by the capabilities of the queue family+-- specified by the @queueFamilyIndex@ member of the+-- 'Graphics.Vulkan.Core10.CommandPool.CommandPoolCreateInfo' structure+-- that was used to create the+-- 'Graphics.Vulkan.Core10.Handles.CommandPool' that @commandBuffer@+-- was allocated from, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-supported table of supported pipeline stages>+--+-- - If 'cmdPipelineBarrier' is called outside of a render pass instance,+-- @dependencyFlags@ /must/ not include+-- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_VIEW_LOCAL_BIT'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-meshShader mesh shaders>+-- feature is not enabled, @srcStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_MESH_SHADER_BIT_NV'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-taskShader task shaders>+-- feature is not enabled, @srcStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TASK_SHADER_BIT_NV'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-meshShader mesh shaders>+-- feature is not enabled, @dstStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_MESH_SHADER_BIT_NV'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-taskShader task shaders>+-- feature is not enabled, @dstStageMask@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TASK_SHADER_BIT_NV'+--+-- - The @srcAccessMask@ member of each element of @pMemoryBarriers@+-- /must/ only include access flags that are supported by one or more+-- of the pipeline stages in @srcStageMask@, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>+--+-- - The @dstAccessMask@ member of each element of @pMemoryBarriers@+-- /must/ only include access flags that are supported by one or more+-- of the pipeline stages in @dstStageMask@, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>+--+-- - For any element of @pBufferMemoryBarriers@, if its+-- @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ members are equal,+-- or if its @srcQueueFamilyIndex@ is the queue family index that was+-- used to create the command pool that @commandBuffer@ was allocated+-- from, then its @srcAccessMask@ member /must/ only contain access+-- flags that are supported by one or more of the pipeline stages in+-- @srcStageMask@, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>+--+-- - For any element of @pBufferMemoryBarriers@, if its+-- @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ members are equal,+-- or if its @dstQueueFamilyIndex@ is the queue family index that was+-- used to create the command pool that @commandBuffer@ was allocated+-- from, then its @dstAccessMask@ member /must/ only contain access+-- flags that are supported by one or more of the pipeline stages in+-- @dstStageMask@, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>+--+-- - For any element of @pImageMemoryBarriers@, if its+-- @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ members are equal,+-- or if its @srcQueueFamilyIndex@ is the queue family index that was+-- used to create the command pool that @commandBuffer@ was allocated+-- from, then its @srcAccessMask@ member /must/ only contain access+-- flags that are supported by one or more of the pipeline stages in+-- @srcStageMask@, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>+--+-- - For any element of @pImageMemoryBarriers@, if its+-- @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ members are equal,+-- or if its @dstQueueFamilyIndex@ is the queue family index that was+-- used to create the command pool that @commandBuffer@ was allocated+-- from, then its @dstAccessMask@ member /must/ only contain access+-- flags that are supported by one or more of the pipeline stages in+-- @dstStageMask@, as specified in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types>+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @srcStageMask@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'+-- values+--+-- - @srcStageMask@ /must/ not be @0@+--+-- - @dstStageMask@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'+-- values+--+-- - @dstStageMask@ /must/ not be @0@+--+-- - @dependencyFlags@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlagBits'+-- values+--+-- - If @memoryBarrierCount@ is not @0@, @pMemoryBarriers@ /must/ be a+-- valid pointer to an array of @memoryBarrierCount@ valid+-- 'Graphics.Vulkan.Core10.OtherTypes.MemoryBarrier' structures+--+-- - If @bufferMemoryBarrierCount@ is not @0@, @pBufferMemoryBarriers@+-- /must/ be a valid pointer to an array of @bufferMemoryBarrierCount@+-- valid 'Graphics.Vulkan.Core10.OtherTypes.BufferMemoryBarrier'+-- structures+--+-- - If @imageMemoryBarrierCount@ is not @0@, @pImageMemoryBarriers@+-- /must/ be a valid pointer to an array of @imageMemoryBarrierCount@+-- valid 'Graphics.Vulkan.Core10.OtherTypes.ImageMemoryBarrier'+-- structures+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support transfer,+-- graphics, or compute operations+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Transfer | |+-- | Secondary | | Graphics | |+-- | | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.OtherTypes.BufferMemoryBarrier',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags',+-- 'Graphics.Vulkan.Core10.OtherTypes.ImageMemoryBarrier',+-- 'Graphics.Vulkan.Core10.OtherTypes.MemoryBarrier',+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlags'+cmdPipelineBarrier :: forall a io . (PokeChain a, MonadIO io) => CommandBuffer -> ("srcStageMask" ::: PipelineStageFlags) -> ("dstStageMask" ::: PipelineStageFlags) -> DependencyFlags -> ("memoryBarriers" ::: Vector MemoryBarrier) -> ("bufferMemoryBarriers" ::: Vector BufferMemoryBarrier) -> ("imageMemoryBarriers" ::: Vector (ImageMemoryBarrier a)) -> io ()+cmdPipelineBarrier commandBuffer srcStageMask dstStageMask dependencyFlags memoryBarriers bufferMemoryBarriers imageMemoryBarriers = liftIO . evalContT $ do+ let vkCmdPipelineBarrier' = mkVkCmdPipelineBarrier (pVkCmdPipelineBarrier (deviceCmds (commandBuffer :: CommandBuffer)))+ pPMemoryBarriers <- ContT $ allocaBytesAligned @MemoryBarrier ((Data.Vector.length (memoryBarriers)) * 24) 8+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPMemoryBarriers `plusPtr` (24 * (i)) :: Ptr MemoryBarrier) (e) . ($ ())) (memoryBarriers)+ pPBufferMemoryBarriers <- ContT $ allocaBytesAligned @BufferMemoryBarrier ((Data.Vector.length (bufferMemoryBarriers)) * 56) 8+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPBufferMemoryBarriers `plusPtr` (56 * (i)) :: Ptr BufferMemoryBarrier) (e) . ($ ())) (bufferMemoryBarriers)+ pPImageMemoryBarriers <- ContT $ allocaBytesAligned @(ImageMemoryBarrier _) ((Data.Vector.length (imageMemoryBarriers)) * 72) 8+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPImageMemoryBarriers `plusPtr` (72 * (i)) :: Ptr (ImageMemoryBarrier _)) (e) . ($ ())) (imageMemoryBarriers)+ lift $ vkCmdPipelineBarrier' (commandBufferHandle (commandBuffer)) (srcStageMask) (dstStageMask) (dependencyFlags) ((fromIntegral (Data.Vector.length $ (memoryBarriers)) :: Word32)) (pPMemoryBarriers) ((fromIntegral (Data.Vector.length $ (bufferMemoryBarriers)) :: Word32)) (pPBufferMemoryBarriers) ((fromIntegral (Data.Vector.length $ (imageMemoryBarriers)) :: Word32)) (pPImageMemoryBarriers)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdBeginQuery+ :: FunPtr (Ptr CommandBuffer_T -> QueryPool -> Word32 -> QueryControlFlags -> IO ()) -> Ptr CommandBuffer_T -> QueryPool -> Word32 -> QueryControlFlags -> IO ()++-- | vkCmdBeginQuery - Begin a query+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which this command will+-- be recorded.+--+-- - @queryPool@ is the query pool that will manage the results of the+-- query.+--+-- - @query@ is the query index within the query pool that will contain+-- the results.+--+-- - @flags@ is a bitmask of+-- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QueryControlFlagBits'+-- specifying constraints on the types of queries that /can/ be+-- performed.+--+-- = Description+--+-- If the @queryType@ of the pool is+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION' and+-- @flags@ contains+-- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QUERY_CONTROL_PRECISE_BIT',+-- an implementation /must/ return a result that matches the actual number+-- of samples passed. This is described in more detail in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-occlusion Occlusion Queries>.+--+-- Calling 'cmdBeginQuery' is equivalent to calling+-- 'Graphics.Vulkan.Extensions.VK_EXT_transform_feedback.cmdBeginQueryIndexedEXT'+-- with the @index@ parameter set to zero.+--+-- After beginning a query, that query is considered /active/ within the+-- command buffer it was called in until that same query is ended. Queries+-- active in a primary command buffer when secondary command buffers are+-- executed are considered active for those secondary command buffers.+--+-- == Valid Usage+--+-- - @queryPool@ /must/ have been created with a @queryType@ that differs+-- from that of any queries that are+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>+-- within @commandBuffer@+--+-- - All queries used by the command /must/ be unavailable+--+-- - The @queryType@ used to create @queryPool@ /must/ not be+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TIMESTAMP'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-occlusionQueryPrecise precise occlusion queries>+-- feature is not enabled, or the @queryType@ used to create+-- @queryPool@ was not+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION',+-- @flags@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QUERY_CONTROL_PRECISE_BIT'+--+-- - @query@ /must/ be less than the number of queries in @queryPool@+--+-- - If the @queryType@ used to create @queryPool@ was+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION', the+-- 'Graphics.Vulkan.Core10.Handles.CommandPool' that @commandBuffer@+-- was allocated from /must/ support graphics operations+--+-- - If the @queryType@ used to create @queryPool@ was+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PIPELINE_STATISTICS'+-- and any of the @pipelineStatistics@ indicate graphics operations,+-- the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- - If the @queryType@ used to create @queryPool@ was+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PIPELINE_STATISTICS'+-- and any of the @pipelineStatistics@ indicate compute operations, the+-- 'Graphics.Vulkan.Core10.Handles.CommandPool' that @commandBuffer@+-- was allocated from /must/ support compute operations+--+-- - @commandBuffer@ /must/ not be a protected command buffer+--+-- - If called within a render pass instance, the sum of @query@ and the+-- number of bits set in the current subpass’s view mask /must/ be less+-- than or equal to the number of queries in @queryPool@+--+-- - If the @queryType@ used to create @queryPool@ was+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT'+-- the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- - If the @queryType@ used to create @queryPool@ was+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT'+-- then+-- 'Graphics.Vulkan.Extensions.VK_EXT_transform_feedback.PhysicalDeviceTransformFeedbackPropertiesEXT'::@transformFeedbackQueries@+-- /must/ be supported+--+-- - If @queryPool@ was created with a @queryType@ of+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',+-- the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#profiling-lock profiling lock>+-- /must/ have been held before+-- 'Graphics.Vulkan.Core10.CommandBuffer.beginCommandBuffer' was called+-- on @commandBuffer@+--+-- - If @queryPool@ was created with a @queryType@ of+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'+-- and one of the counters used to create @queryPool@ was+-- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR',+-- the query begin /must/ be the first recorded command in+-- @commandBuffer@+--+-- - If @queryPool@ was created with a @queryType@ of+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'+-- and one of the counters used to create @queryPool@ was+-- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR',+-- the begin command /must/ not be recorded within a render pass+-- instance+--+-- - If @queryPool@ was created with a @queryType@ of+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'+-- and another query pool with a @queryType@+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'+-- has been used within @commandBuffer@, its parent primary command+-- buffer or secondary command buffer recorded within the same parent+-- primary command buffer as @commandBuffer@, the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-features-performanceCounterMultipleQueryPools performanceCounterMultipleQueryPools>+-- feature /must/ be enabled+--+-- - If @queryPool@ was created with a @queryType@ of+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',+-- this command /must/ not be recorded in a command buffer that, either+-- directly or through secondary command buffers, also contains a+-- 'cmdResetQueryPool' command affecting the same query.+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @queryPool@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle+--+-- - @flags@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QueryControlFlagBits'+-- values+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations+--+-- - Both of @commandBuffer@, and @queryPool@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QueryControlFlags',+-- 'Graphics.Vulkan.Core10.Handles.QueryPool'+cmdBeginQuery :: forall io . MonadIO io => CommandBuffer -> QueryPool -> ("query" ::: Word32) -> QueryControlFlags -> io ()+cmdBeginQuery commandBuffer queryPool query flags = liftIO $ do+ let vkCmdBeginQuery' = mkVkCmdBeginQuery (pVkCmdBeginQuery (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdBeginQuery' (commandBufferHandle (commandBuffer)) (queryPool) (query) (flags)+ pure $ ()++-- | A safe wrapper for 'cmdBeginQuery' and 'cmdEndQuery' using 'bracket_'+cmdWithQuery :: forall r . CommandBuffer -> QueryPool -> Word32 -> QueryControlFlags -> IO r -> IO r+cmdWithQuery commandBuffer queryPool query flags =+ bracket_+ (cmdBeginQuery commandBuffer queryPool query flags)+ (cmdEndQuery commandBuffer queryPool query)+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdEndQuery+ :: FunPtr (Ptr CommandBuffer_T -> QueryPool -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> QueryPool -> Word32 -> IO ()++-- | vkCmdEndQuery - Ends a query+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which this command will+-- be recorded.+--+-- - @queryPool@ is the query pool that is managing the results of the+-- query.+--+-- - @query@ is the query index within the query pool where the result is+-- stored.+--+-- = Description+--+-- Calling 'cmdEndQuery' is equivalent to calling+-- 'Graphics.Vulkan.Extensions.VK_EXT_transform_feedback.cmdEndQueryIndexedEXT'+-- with the @index@ parameter set to zero.+--+-- As queries operate asynchronously, ending a query does not immediately+-- set the query’s status to available. A query is considered /finished/+-- when the final results of the query are ready to be retrieved by+-- 'Graphics.Vulkan.Core10.Query.getQueryPoolResults' and+-- 'cmdCopyQueryPoolResults', and this is when the query’s status is set to+-- available.+--+-- Once a query is ended the query /must/ finish in finite time, unless the+-- state of the query is changed using other commands, e.g. by issuing a+-- reset of the query.+--+-- == Valid Usage+--+-- - All queries used by the command /must/ be+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>+--+-- - @query@ /must/ be less than the number of queries in @queryPool@+--+-- - @commandBuffer@ /must/ not be a protected command buffer+--+-- - If 'cmdEndQuery' is called within a render pass instance, the sum of+-- @query@ and the number of bits set in the current subpass’s view+-- mask /must/ be less than or equal to the number of queries in+-- @queryPool@+--+-- - If @queryPool@ was created with a @queryType@ of+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'+-- and one or more of the counters used to create @queryPool@ was+-- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR',+-- the 'cmdEndQuery' /must/ be the last recorded command in+-- @commandBuffer@+--+-- - If @queryPool@ was created with a @queryType@ of+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'+-- and one or more of the counters used to create @queryPool@ was+-- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR',+-- the 'cmdEndQuery' /must/ not be recorded within a render pass+-- instance+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @queryPool@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations+--+-- - Both of @commandBuffer@, and @queryPool@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.QueryPool'+cmdEndQuery :: forall io . MonadIO io => CommandBuffer -> QueryPool -> ("query" ::: Word32) -> io ()+cmdEndQuery commandBuffer queryPool query = liftIO $ do+ let vkCmdEndQuery' = mkVkCmdEndQuery (pVkCmdEndQuery (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdEndQuery' (commandBufferHandle (commandBuffer)) (queryPool) (query)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdResetQueryPool+ :: FunPtr (Ptr CommandBuffer_T -> QueryPool -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> QueryPool -> Word32 -> Word32 -> IO ()++-- | vkCmdResetQueryPool - Reset queries in a query pool+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which this command will+-- be recorded.+--+-- - @queryPool@ is the handle of the query pool managing the queries+-- being reset.+--+-- - @firstQuery@ is the initial query index to reset.+--+-- - @queryCount@ is the number of queries to reset.+--+-- = Description+--+-- When executed on a queue, this command sets the status of query indices+-- [@firstQuery@, @firstQuery@ + @queryCount@ - 1] to unavailable.+--+-- If the @queryType@ used to create @queryPool@ was+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',+-- this command sets the status of query indices [@firstQuery@,+-- @firstQuery@ + @queryCount@ - 1] to unavailable for each pass of+-- @queryPool@, as indicated by a call to+-- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR'.+--+-- Note+--+-- Because 'cmdResetQueryPool' resets all the passes of the indicated+-- queries, applications must not record a 'cmdResetQueryPool' command for+-- a @queryPool@ created with+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'+-- in a command buffer that needs to be submitted multiple times as+-- indicated by a call to+-- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR'.+-- Otherwise applications will never be able to complete the recorded+-- queries.+--+-- == Valid Usage+--+-- - @firstQuery@ /must/ be less than the number of queries in+-- @queryPool@+--+-- - The sum of @firstQuery@ and @queryCount@ /must/ be less than or+-- equal to the number of queries in @queryPool@+--+-- - All queries used by the command /must/ not be active+--+-- - If @queryPool@ was created with+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',+-- this command /must/ not be recorded in a command buffer that, either+-- directly or through secondary command buffers, also contains begin+-- commands for a query from the set of queries [@firstQuery@,+-- @firstQuery@ + @queryCount@ - 1]+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @queryPool@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - Both of @commandBuffer@, and @queryPool@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Graphics | |+-- | Secondary | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.QueryPool'+cmdResetQueryPool :: forall io . MonadIO io => CommandBuffer -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> io ()+cmdResetQueryPool commandBuffer queryPool firstQuery queryCount = liftIO $ do+ let vkCmdResetQueryPool' = mkVkCmdResetQueryPool (pVkCmdResetQueryPool (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdResetQueryPool' (commandBufferHandle (commandBuffer)) (queryPool) (firstQuery) (queryCount)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdWriteTimestamp+ :: FunPtr (Ptr CommandBuffer_T -> PipelineStageFlagBits -> QueryPool -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> PipelineStageFlagBits -> QueryPool -> Word32 -> IO ()++-- | vkCmdWriteTimestamp - Write a device timestamp into a query object+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded.+--+-- - @pipelineStage@ is one of the+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits',+-- specifying a stage of the pipeline.+--+-- - @queryPool@ is the query pool that will manage the timestamp.+--+-- - @query@ is the query within the query pool that will contain the+-- timestamp.+--+-- = Description+--+-- 'cmdWriteTimestamp' latches the value of the timer when all previous+-- commands have completed executing as far as the specified pipeline+-- stage, and writes the timestamp value to memory. When the timestamp+-- value is written, the availability status of the query is set to+-- available.+--+-- Note+--+-- If an implementation is unable to detect completion and latch the timer+-- at any specific stage of the pipeline, it /may/ instead do so at any+-- logically later stage.+--+-- 'cmdCopyQueryPoolResults' /can/ then be called to copy the timestamp+-- value from the query pool into buffer memory, with ordering and+-- synchronization behavior equivalent to how other queries operate.+-- Timestamp values /can/ also be retrieved from the query pool using+-- 'Graphics.Vulkan.Core10.Query.getQueryPoolResults'. As with other+-- queries, the query /must/ be reset using 'cmdResetQueryPool' or+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_host_query_reset.resetQueryPool'+-- before requesting the timestamp value be written to it.+--+-- While 'cmdWriteTimestamp' /can/ be called inside or outside of a render+-- pass instance, 'cmdCopyQueryPoolResults' /must/ only be called outside+-- of a render pass instance.+--+-- Timestamps /may/ only be meaningfully compared if they are written by+-- commands submitted to the same queue.+--+-- Note+--+-- An example of such a comparison is determining the execution time of a+-- sequence of commands.+--+-- If 'cmdWriteTimestamp' is called while executing a render pass instance+-- that has multiview enabled, the timestamp uses N consecutive query+-- indices in the query pool (starting at @query@) where N is the number of+-- bits set in the view mask of the subpass the command is executed in. The+-- resulting query values are determined by an implementation-dependent+-- choice of one of the following behaviors:+--+-- - The first query is a timestamp value and (if more than one bit is+-- set in the view mask) zero is written to the remaining queries. If+-- two timestamps are written in the same subpass, the sum of the+-- execution time of all views between those commands is the difference+-- between the first query written by each command.+--+-- - All N queries are timestamp values. If two timestamps are written in+-- the same subpass, the sum of the execution time of all views between+-- those commands is the sum of the difference between corresponding+-- queries written by each command. The difference between+-- corresponding queries /may/ be the execution time of a single view.+--+-- In either case, the application /can/ sum the differences between all N+-- queries to determine the total execution time.+--+-- == Valid Usage+--+-- - @queryPool@ /must/ have been created with a @queryType@ of+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TIMESTAMP'+--+-- - The query identified by @queryPool@ and @query@ /must/ be+-- /unavailable/+--+-- - The command pool’s queue family /must/ support a non-zero+-- @timestampValidBits@+--+-- - All queries used by the command /must/ be unavailable+--+-- - If 'cmdWriteTimestamp' is called within a render pass instance, the+-- sum of @query@ and the number of bits set in the current subpass’s+-- view mask /must/ be less than or equal to the number of queries in+-- @queryPool@+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @pipelineStage@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'+-- value+--+-- - @queryPool@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support transfer,+-- graphics, or compute operations+--+-- - Both of @commandBuffer@, and @queryPool@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Transfer | Transfer |+-- | Secondary | | Graphics | |+-- | | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits',+-- 'Graphics.Vulkan.Core10.Handles.QueryPool'+cmdWriteTimestamp :: forall io . MonadIO io => CommandBuffer -> PipelineStageFlagBits -> QueryPool -> ("query" ::: Word32) -> io ()+cmdWriteTimestamp commandBuffer pipelineStage queryPool query = liftIO $ do+ let vkCmdWriteTimestamp' = mkVkCmdWriteTimestamp (pVkCmdWriteTimestamp (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdWriteTimestamp' (commandBufferHandle (commandBuffer)) (pipelineStage) (queryPool) (query)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdCopyQueryPoolResults+ :: FunPtr (Ptr CommandBuffer_T -> QueryPool -> Word32 -> Word32 -> Buffer -> DeviceSize -> DeviceSize -> QueryResultFlags -> IO ()) -> Ptr CommandBuffer_T -> QueryPool -> Word32 -> Word32 -> Buffer -> DeviceSize -> DeviceSize -> QueryResultFlags -> IO ()++-- | vkCmdCopyQueryPoolResults - Copy the results of queries in a query pool+-- to a buffer object+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer into which this command will+-- be recorded.+--+-- - @queryPool@ is the query pool managing the queries containing the+-- desired results.+--+-- - @firstQuery@ is the initial query index.+--+-- - @queryCount@ is the number of queries. @firstQuery@ and @queryCount@+-- together define a range of queries.+--+-- - @dstBuffer@ is a 'Graphics.Vulkan.Core10.Handles.Buffer' object that+-- will receive the results of the copy command.+--+-- - @dstOffset@ is an offset into @dstBuffer@.+--+-- - @stride@ is the stride in bytes between results for individual+-- queries within @dstBuffer@. The required size of the backing memory+-- for @dstBuffer@ is determined as described above for+-- 'Graphics.Vulkan.Core10.Query.getQueryPoolResults'.+--+-- - @flags@ is a bitmask of+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QueryResultFlagBits'+-- specifying how and when results are returned.+--+-- = Description+--+-- 'cmdCopyQueryPoolResults' is guaranteed to see the effect of previous+-- uses of 'cmdResetQueryPool' in the same queue, without any additional+-- synchronization. Thus, the results will always reflect the most recent+-- use of the query.+--+-- @flags@ has the same possible values described above for the @flags@+-- parameter of 'Graphics.Vulkan.Core10.Query.getQueryPoolResults', but the+-- different style of execution causes some subtle behavioral differences.+-- Because 'cmdCopyQueryPoolResults' executes in order with respect to+-- other query commands, there is less ambiguity about which use of a query+-- is being requested.+--+-- Results for all requested occlusion queries, pipeline statistics+-- queries, transform feedback queries, and timestamp queries are written+-- as 64-bit unsigned integer values if+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_64_BIT'+-- is set or 32-bit unsigned integer values otherwise. Performance queries+-- store results in a tightly packed array whose type is determined by the+-- @unit@ member of the corresponding+-- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PerformanceCounterKHR'.+--+-- If neither of+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WAIT_BIT'+-- and+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WITH_AVAILABILITY_BIT'+-- are set, results are only written out for queries in the available+-- state.+--+-- If+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WAIT_BIT'+-- is set, the implementation will wait for each query’s status to be in+-- the available state before retrieving the numerical results for that+-- query. This is guaranteed to reflect the most recent use of the query on+-- the same queue, assuming that the query is not being simultaneously used+-- by other queues. If the query does not become available in a finite+-- amount of time (e.g. due to not issuing a query since the last reset), a+-- 'Graphics.Vulkan.Core10.Enums.Result.ERROR_DEVICE_LOST' error /may/+-- occur.+--+-- Similarly, if+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WITH_AVAILABILITY_BIT'+-- is set and+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WAIT_BIT'+-- is not set, the availability is guaranteed to reflect the most recent+-- use of the query on the same queue, assuming that the query is not being+-- simultaneously used by other queues. As with+-- 'Graphics.Vulkan.Core10.Query.getQueryPoolResults', implementations+-- /must/ guarantee that if they return a non-zero availability value, then+-- the numerical results are valid.+--+-- If+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_PARTIAL_BIT'+-- is set,+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WAIT_BIT'+-- is not set, and the query’s status is unavailable, an intermediate+-- result value between zero and the final result value is written for that+-- query.+--+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_PARTIAL_BIT'+-- /must/ not be used if the pool’s @queryType@ is+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TIMESTAMP'.+--+-- 'cmdCopyQueryPoolResults' is considered to be a transfer operation, and+-- its writes to buffer memory /must/ be synchronized using+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TRANSFER_BIT'+-- and+-- 'Graphics.Vulkan.Core10.Enums.AccessFlagBits.ACCESS_TRANSFER_WRITE_BIT'+-- before using the results.+--+-- == Valid Usage+--+-- - @dstOffset@ /must/ be less than the size of @dstBuffer@+--+-- - @firstQuery@ /must/ be less than the number of queries in+-- @queryPool@+--+-- - The sum of @firstQuery@ and @queryCount@ /must/ be less than or+-- equal to the number of queries in @queryPool@+--+-- - If+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_64_BIT'+-- is not set in @flags@ then @dstOffset@ and @stride@ /must/ be+-- multiples of @4@+--+-- - If+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_64_BIT'+-- is set in @flags@ then @dstOffset@ and @stride@ /must/ be multiples+-- of @8@+--+-- - @dstBuffer@ /must/ have enough storage, from @dstOffset@, to contain+-- the result of each query, as described+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-memorylayout here>+--+-- - @dstBuffer@ /must/ have been created with+-- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_TRANSFER_DST_BIT'+-- usage flag+--+-- - If @dstBuffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object+--+-- - If the @queryType@ used to create @queryPool@ was+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TIMESTAMP',+-- @flags@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_PARTIAL_BIT'+--+-- - If the @queryType@ used to create @queryPool@ was+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',+-- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PhysicalDevicePerformanceQueryPropertiesKHR'::@allowCommandBufferQueryCopies@+-- /must/ be 'Graphics.Vulkan.Core10.BaseType.TRUE'+--+-- - If the @queryType@ used to create @queryPool@ was+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',+-- @flags@ /must/ not contain+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WITH_AVAILABILITY_BIT',+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_PARTIAL_BIT'+-- or+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_64_BIT'+--+-- - If the @queryType@ used to create @queryPool@ was+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',+-- the @queryPool@ /must/ have been submitted once for each pass as+-- retrieved via a call to+-- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR'+--+-- - 'cmdCopyQueryPoolResults' /must/ not be called if the @queryType@+-- used to create @queryPool@ was+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_INTEL'+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @queryPool@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle+--+-- - @dstBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+--+-- - @flags@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QueryResultFlagBits'+-- values+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - Each of @commandBuffer@, @dstBuffer@, and @queryPool@ /must/ have+-- been created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Graphics | Transfer |+-- | Secondary | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.Buffer',+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.BaseType.DeviceSize',+-- 'Graphics.Vulkan.Core10.Handles.QueryPool',+-- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QueryResultFlags'+cmdCopyQueryPoolResults :: forall io . MonadIO io => CommandBuffer -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> ("stride" ::: DeviceSize) -> QueryResultFlags -> io ()+cmdCopyQueryPoolResults commandBuffer queryPool firstQuery queryCount dstBuffer dstOffset stride flags = liftIO $ do+ let vkCmdCopyQueryPoolResults' = mkVkCmdCopyQueryPoolResults (pVkCmdCopyQueryPoolResults (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdCopyQueryPoolResults' (commandBufferHandle (commandBuffer)) (queryPool) (firstQuery) (queryCount) (dstBuffer) (dstOffset) (stride) (flags)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdPushConstants+ :: FunPtr (Ptr CommandBuffer_T -> PipelineLayout -> ShaderStageFlags -> Word32 -> Word32 -> Ptr () -> IO ()) -> Ptr CommandBuffer_T -> PipelineLayout -> ShaderStageFlags -> Word32 -> Word32 -> Ptr () -> IO ()++-- | vkCmdPushConstants - Update the values of push constants+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer in which the push constant+-- update will be recorded.+--+-- - @layout@ is the pipeline layout used to program the push constant+-- updates.+--+-- - @stageFlags@ is a bitmask of+-- 'Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits.ShaderStageFlagBits'+-- specifying the shader stages that will use the push constants in the+-- updated range.+--+-- - @offset@ is the start offset of the push constant range to update,+-- in units of bytes.+--+-- - @size@ is the size of the push constant range to update, in units of+-- bytes.+--+-- - @pValues@ is a pointer to an array of @size@ bytes containing the+-- new push constant values.+--+-- = Description+--+-- Note+--+-- As @stageFlags@ needs to include all flags the relevant push constant+-- ranges were created with, any flags that are not supported by the queue+-- family that the 'Graphics.Vulkan.Core10.Handles.CommandPool' used to+-- allocate @commandBuffer@ was created on are ignored.+--+-- == Valid Usage+--+-- - For each byte in the range specified by @offset@ and @size@ and for+-- each shader stage in @stageFlags@, there /must/ be a push constant+-- range in @layout@ that includes that byte and that stage+--+-- - For each byte in the range specified by @offset@ and @size@ and for+-- each push constant range that overlaps that byte, @stageFlags@+-- /must/ include all stages in that push constant range’s+-- 'Graphics.Vulkan.Core10.PipelineLayout.PushConstantRange'::@stageFlags@+--+-- - @offset@ /must/ be a multiple of @4@+--+-- - @size@ /must/ be a multiple of @4@+--+-- - @offset@ /must/ be less than+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxPushConstantsSize@+--+-- - @size@ /must/ be less than or equal to+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxPushConstantsSize@+-- minus @offset@+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @layout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' handle+--+-- - @stageFlags@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits.ShaderStageFlagBits'+-- values+--+-- - @stageFlags@ /must/ not be @0@+--+-- - @pValues@ /must/ be a valid pointer to an array of @size@ bytes+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations+--+-- - @size@ /must/ be greater than @0@+--+-- - Both of @commandBuffer@, and @layout@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Graphics | |+-- | Secondary | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Handles.PipelineLayout',+-- 'Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits.ShaderStageFlags'+cmdPushConstants :: forall io . MonadIO io => CommandBuffer -> PipelineLayout -> ShaderStageFlags -> ("offset" ::: Word32) -> ("size" ::: Word32) -> ("values" ::: Ptr ()) -> io ()+cmdPushConstants commandBuffer layout stageFlags offset size values = liftIO $ do+ let vkCmdPushConstants' = mkVkCmdPushConstants (pVkCmdPushConstants (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdPushConstants' (commandBufferHandle (commandBuffer)) (layout) (stageFlags) (offset) (size) (values)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdBeginRenderPass+ :: FunPtr (Ptr CommandBuffer_T -> Ptr (RenderPassBeginInfo a) -> SubpassContents -> IO ()) -> Ptr CommandBuffer_T -> Ptr (RenderPassBeginInfo a) -> SubpassContents -> IO ()++-- | vkCmdBeginRenderPass - Begin a new render pass+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer in which to record the+-- command.+--+-- - @pRenderPassBegin@ is a pointer to a 'RenderPassBeginInfo' structure+-- specifying the render pass to begin an instance of, and the+-- framebuffer the instance uses.+--+-- - @contents@ is a+-- 'Graphics.Vulkan.Core10.Enums.SubpassContents.SubpassContents' value+-- specifying how the commands in the first subpass will be provided.+--+-- = Description+--+-- After beginning a render pass instance, the command buffer is ready to+-- record the commands for the first subpass of that render pass.+--+-- == Valid Usage+--+-- - If any of the @initialLayout@ or @finalLayout@ member of the+-- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures or+-- the @layout@ member of the+-- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures+-- specified when creating the render pass specified in the+-- @renderPass@ member of @pRenderPassBegin@ is+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL'+-- then the corresponding attachment image view of the framebuffer+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_COLOR_ATTACHMENT_BIT'+--+-- - If any of the @initialLayout@ or @finalLayout@ member of the+-- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures or+-- the @layout@ member of the+-- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures+-- specified when creating the render pass specified in the+-- @renderPass@ member of @pRenderPassBegin@ is+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL',+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL'+-- then the corresponding attachment image view of the framebuffer+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT'+--+-- - If any of the @initialLayout@ or @finalLayout@ member of the+-- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures or+-- the @layout@ member of the+-- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures+-- specified when creating the render pass specified in the+-- @renderPass@ member of @pRenderPassBegin@ is+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL',+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL',+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL',+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL'+-- then the corresponding attachment image view of the framebuffer+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT'+--+-- - If any of the @stencilInitialLayout@ or @stencilFinalLayout@ member+-- of the+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_separate_depth_stencil_layouts.AttachmentDescriptionStencilLayout'+-- structures or the @stencilLayout@ member of the+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_separate_depth_stencil_layouts.AttachmentReferenceStencilLayout'+-- structures specified when creating the render pass specified in the+-- @renderPass@ member of @pRenderPassBegin@ is+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL',+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL'+-- then the corresponding attachment image view of the framebuffer+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT'+--+-- - If any of the @initialLayout@ or @finalLayout@ member of the+-- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures or+-- the @layout@ member of the+-- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures+-- specified when creating the render pass specified in the+-- @renderPass@ member of @pRenderPassBegin@ is+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL'+-- then the corresponding attachment image view of the framebuffer+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT'+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_INPUT_ATTACHMENT_BIT'+--+-- - If any of the @initialLayout@ or @finalLayout@ member of the+-- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures or+-- the @layout@ member of the+-- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures+-- specified when creating the render pass specified in the+-- @renderPass@ member of @pRenderPassBegin@ is+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL'+-- then the corresponding attachment image view of the framebuffer+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_SRC_BIT'+--+-- - If any of the @initialLayout@ or @finalLayout@ member of the+-- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures or+-- the @layout@ member of the+-- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures+-- specified when creating the render pass specified in the+-- @renderPass@ member of @pRenderPassBegin@ is+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'+-- then the corresponding attachment image view of the framebuffer+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including+-- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT'+--+-- - If any of the @initialLayout@ members of the+-- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures+-- specified when creating the render pass specified in the+-- @renderPass@ member of @pRenderPassBegin@ is not+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_UNDEFINED',+-- then each such @initialLayout@ /must/ be equal to the current layout+-- of the corresponding attachment image subresource of the framebuffer+-- specified in the @framebuffer@ member of @pRenderPassBegin@+--+-- - The @srcStageMask@ and @dstStageMask@ members of any element of the+-- @pDependencies@ member of+-- 'Graphics.Vulkan.Core10.Pass.RenderPassCreateInfo' used to create+-- @renderPass@ /must/ be supported by the capabilities of the queue+-- family identified by the @queueFamilyIndex@ member of the+-- 'Graphics.Vulkan.Core10.CommandPool.CommandPoolCreateInfo' used to+-- create the command pool which @commandBuffer@ was allocated from+--+-- - For any attachment in @framebuffer@ that is used by @renderPass@ and+-- is bound to memory locations that are also bound to another+-- attachment used by @renderPass@, and if at least one of those uses+-- causes either attachment to be written to, both attachments /must/+-- have had the+-- 'Graphics.Vulkan.Core10.Enums.AttachmentDescriptionFlagBits.ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT'+-- set+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @pRenderPassBegin@ /must/ be a valid pointer to a valid+-- 'RenderPassBeginInfo' structure+--+-- - @contents@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.SubpassContents.SubpassContents' value+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations+--+-- - This command /must/ only be called outside of a render pass instance+--+-- - @commandBuffer@ /must/ be a primary+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Outside | Graphics | Graphics |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'RenderPassBeginInfo',+-- 'Graphics.Vulkan.Core10.Enums.SubpassContents.SubpassContents'+cmdBeginRenderPass :: forall a io . (PokeChain a, MonadIO io) => CommandBuffer -> RenderPassBeginInfo a -> SubpassContents -> io ()+cmdBeginRenderPass commandBuffer renderPassBegin contents = liftIO . evalContT $ do+ let vkCmdBeginRenderPass' = mkVkCmdBeginRenderPass (pVkCmdBeginRenderPass (deviceCmds (commandBuffer :: CommandBuffer)))+ pRenderPassBegin <- ContT $ withCStruct (renderPassBegin)+ lift $ vkCmdBeginRenderPass' (commandBufferHandle (commandBuffer)) pRenderPassBegin (contents)+ pure $ ()++-- | A safe wrapper for 'cmdBeginRenderPass' and 'cmdEndRenderPass' using+-- 'bracket_'+cmdWithRenderPass :: forall a r . PokeChain a => CommandBuffer -> RenderPassBeginInfo a -> SubpassContents -> IO r -> IO r+cmdWithRenderPass commandBuffer pRenderPassBegin contents =+ bracket_+ (cmdBeginRenderPass commandBuffer pRenderPassBegin contents)+ (cmdEndRenderPass commandBuffer)+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdNextSubpass+ :: FunPtr (Ptr CommandBuffer_T -> SubpassContents -> IO ()) -> Ptr CommandBuffer_T -> SubpassContents -> IO ()++-- | vkCmdNextSubpass - Transition to the next subpass of a render pass+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer in which to record the+-- command.+--+-- - @contents@ specifies how the commands in the next subpass will be+-- provided, in the same fashion as the corresponding parameter of+-- 'cmdBeginRenderPass'.+--+-- = Description+--+-- The subpass index for a render pass begins at zero when+-- 'cmdBeginRenderPass' is recorded, and increments each time+-- 'cmdNextSubpass' is recorded.+--+-- Moving to the next subpass automatically performs any multisample+-- resolve operations in the subpass being ended. End-of-subpass+-- multisample resolves are treated as color attachment writes for the+-- purposes of synchronization. This applies to resolve operations for both+-- color and depth\/stencil attachments. That is, they are considered to+-- execute in the+-- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT'+-- pipeline stage and their writes are synchronized with+-- 'Graphics.Vulkan.Core10.Enums.AccessFlagBits.ACCESS_COLOR_ATTACHMENT_WRITE_BIT'.+-- Synchronization between rendering within a subpass and any resolve+-- operations at the end of the subpass occurs automatically, without need+-- for explicit dependencies or pipeline barriers. However, if the resolve+-- attachment is also used in a different subpass, an explicit dependency+-- is needed.+--+-- After transitioning to the next subpass, the application /can/ record+-- the commands for that subpass.+--+-- == Valid Usage+--+-- - The current subpass index /must/ be less than the number of+-- subpasses in the render pass minus one+--+-- - This command /must/ not be recorded when transform feedback is+-- active+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @contents@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.SubpassContents.SubpassContents' value+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.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+--+-- - @commandBuffer@ /must/ be a primary+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Inside | Graphics | Graphics |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- 'Graphics.Vulkan.Core10.Enums.SubpassContents.SubpassContents'+cmdNextSubpass :: forall io . MonadIO io => CommandBuffer -> SubpassContents -> io ()+cmdNextSubpass commandBuffer contents = liftIO $ do+ let vkCmdNextSubpass' = mkVkCmdNextSubpass (pVkCmdNextSubpass (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdNextSubpass' (commandBufferHandle (commandBuffer)) (contents)+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdEndRenderPass+ :: FunPtr (Ptr CommandBuffer_T -> IO ()) -> Ptr CommandBuffer_T -> IO ()++-- | vkCmdEndRenderPass - End the current render pass+--+-- = Parameters+--+-- - @commandBuffer@ is the command buffer in which to end the current+-- render pass instance.+--+-- = Description+--+-- Ending a render pass instance performs any multisample resolve+-- operations on the final subpass.+--+-- == Valid Usage+--+-- - The current subpass index /must/ be equal to the number of subpasses+-- in the render pass minus one+--+-- - This command /must/ not be recorded when transform feedback is+-- active+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.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+--+-- - @commandBuffer@ /must/ be a primary+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Inside | Graphics | Graphics |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+cmdEndRenderPass :: forall io . MonadIO io => CommandBuffer -> io ()+cmdEndRenderPass commandBuffer = liftIO $ do+ let vkCmdEndRenderPass' = mkVkCmdEndRenderPass (pVkCmdEndRenderPass (deviceCmds (commandBuffer :: CommandBuffer)))+ vkCmdEndRenderPass' (commandBufferHandle (commandBuffer))+ pure $ ()+++foreign import ccall+#if !defined(SAFE_FOREIGN_CALLS)+ unsafe+#endif+ "dynamic" mkVkCmdExecuteCommands+ :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr (Ptr CommandBuffer_T) -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr (Ptr CommandBuffer_T) -> IO ()++-- | vkCmdExecuteCommands - Execute a secondary command buffer from a primary+-- command buffer+--+-- = Parameters+--+-- - @commandBuffer@ is a handle to a primary command buffer that the+-- secondary command buffers are executed in.+--+-- - @commandBufferCount@ is the length of the @pCommandBuffers@ array.+--+-- - @pCommandBuffers@ is a pointer to an array of @commandBufferCount@+-- secondary command buffer handles, which are recorded to execute in+-- the primary command buffer in the order they are listed in the+-- array.+--+-- = Description+--+-- If any element of @pCommandBuffers@ was not recorded with the+-- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT'+-- flag, and it was recorded into any other primary command buffer which is+-- currently in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle executable or recording state>,+-- that primary command buffer becomes+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle invalid>.+--+-- == Valid Usage+--+-- - Each element of @pCommandBuffers@ /must/ have been allocated with a+-- @level@ of+-- 'Graphics.Vulkan.Core10.Enums.CommandBufferLevel.COMMAND_BUFFER_LEVEL_SECONDARY'+--+-- - Each element of @pCommandBuffers@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle pending or executable state>+--+-- - If any element of @pCommandBuffers@ was not recorded with the+-- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT'+-- flag, it /must/ not be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle pending state>+--+-- - If any element of @pCommandBuffers@ was not recorded with the+-- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT'+-- flag, it /must/ not have already been recorded to @commandBuffer@+--+-- - If any element of @pCommandBuffers@ was not recorded with the+-- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT'+-- flag, it /must/ not appear more than once in @pCommandBuffers@+--+-- - Each element of @pCommandBuffers@ /must/ have been allocated from a+-- 'Graphics.Vulkan.Core10.Handles.CommandPool' that was created for+-- the same queue family as the+-- 'Graphics.Vulkan.Core10.Handles.CommandPool' from which+-- @commandBuffer@ was allocated+--+-- - If 'cmdExecuteCommands' is being called within a render pass+-- instance, that render pass instance /must/ have been begun with the+-- @contents@ parameter of 'cmdBeginRenderPass' set to+-- 'Graphics.Vulkan.Core10.Enums.SubpassContents.SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS'+--+-- - If 'cmdExecuteCommands' is being called within a render pass+-- instance, each element of @pCommandBuffers@ /must/ have been+-- recorded with the+-- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT'+--+-- - If 'cmdExecuteCommands' is being called within a render pass+-- instance, each element of @pCommandBuffers@ /must/ have been+-- recorded with+-- 'Graphics.Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo'::@subpass@+-- set to the index of the subpass which the given command buffer will+-- be executed in+--+-- - If 'cmdExecuteCommands' is being called within a render pass+-- instance, the render passes specified in the+-- @pBeginInfo->pInheritanceInfo->renderPass@ members of the+-- 'Graphics.Vulkan.Core10.CommandBuffer.beginCommandBuffer' commands+-- used to begin recording each element of @pCommandBuffers@ /must/ be+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>+-- with the current render pass+--+-- - If 'cmdExecuteCommands' is being called within a render pass+-- instance, and any element of @pCommandBuffers@ was recorded with+-- 'Graphics.Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo'::@framebuffer@+-- not equal to 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', that+-- 'Graphics.Vulkan.Core10.Handles.Framebuffer' /must/ match the+-- 'Graphics.Vulkan.Core10.Handles.Framebuffer' used in the current+-- render pass instance+--+-- - If 'cmdExecuteCommands' is being called within a render pass+-- instance that included+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'+-- in the @pNext@ chain of 'RenderPassBeginInfo', then each element of+-- @pCommandBuffers@ /must/ have been recorded with+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.CommandBufferInheritanceRenderPassTransformInfoQCOM'+-- in the @pNext@ chain of VkCommandBufferBeginInfo+--+-- - If 'cmdExecuteCommands' is being called within a render pass+-- instance that included+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'+-- in the @pNext@ chain of 'RenderPassBeginInfo', then each element of+-- @pCommandBuffers@ /must/ have been recorded with+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.CommandBufferInheritanceRenderPassTransformInfoQCOM'::@transform@+-- identical to+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'::@transform@+--+-- - If 'cmdExecuteCommands' is being called within a render pass+-- instance that included+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'+-- in the @pNext@ chain of 'RenderPassBeginInfo', then each element of+-- @pCommandBuffers@ /must/ have been recorded with+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.CommandBufferInheritanceRenderPassTransformInfoQCOM'::@renderArea@+-- identical to 'RenderPassBeginInfo'::@renderArea@+--+-- - If 'cmdExecuteCommands' is not being called within a render pass+-- instance, each element of @pCommandBuffers@ /must/ not have been+-- recorded with the+-- 'Graphics.Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT'+--+-- - If the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-inheritedQueries inherited queries>+-- feature is not enabled, @commandBuffer@ /must/ not have any queries+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>+--+-- - If @commandBuffer@ has a+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION' query+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>,+-- then each element of @pCommandBuffers@ /must/ have been recorded+-- with+-- 'Graphics.Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo'::@occlusionQueryEnable@+-- set to 'Graphics.Vulkan.Core10.BaseType.TRUE'+--+-- - If @commandBuffer@ has a+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION' query+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>,+-- then each element of @pCommandBuffers@ /must/ have been recorded+-- with+-- 'Graphics.Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo'::@queryFlags@+-- having all bits set that are set for the query+--+-- - If @commandBuffer@ has a+-- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PIPELINE_STATISTICS'+-- query+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>,+-- then each element of @pCommandBuffers@ /must/ have been recorded+-- with+-- 'Graphics.Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo'::@pipelineStatistics@+-- having all bits set that are set in the+-- 'Graphics.Vulkan.Core10.Handles.QueryPool' the query uses+--+-- - Each element of @pCommandBuffers@ /must/ not begin any query types+-- that are+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>+-- in @commandBuffer@+--+-- - If @commandBuffer@ is a protected command buffer, then each element+-- of @pCommandBuffers@ /must/ be a protected command buffer+--+-- - If @commandBuffer@ is an unprotected command buffer, then each+-- element of @pCommandBuffers@ /must/ be an unprotected command buffer+--+-- - This command /must/ not be recorded when transform feedback is+-- active+--+-- == Valid Usage (Implicit)+--+-- - @commandBuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle+--+-- - @pCommandBuffers@ /must/ be a valid pointer to an array of+-- @commandBufferCount@ valid+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handles+--+-- - @commandBuffer@ /must/ be in the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>+--+-- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ support transfer,+-- graphics, or compute operations+--+-- - @commandBuffer@ /must/ be a primary+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+--+-- - @commandBufferCount@ /must/ be greater than @0@+--+-- - Both of @commandBuffer@, and the elements of @pCommandBuffers@+-- /must/ have been created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- == Host Synchronization+--+-- - Host access to @commandBuffer@ /must/ be externally synchronized+--+-- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that+-- @commandBuffer@ was allocated from /must/ be externally synchronized+--+-- == Command Properties+--+-- \'+--+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |+-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================++-- | Primary | Both | Transfer | |+-- | | | Graphics | |+-- | | | Compute | |+-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------++--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+cmdExecuteCommands :: forall io . MonadIO io => CommandBuffer -> ("commandBuffers" ::: Vector CommandBuffer) -> io ()+cmdExecuteCommands commandBuffer commandBuffers = liftIO . evalContT $ do+ let vkCmdExecuteCommands' = mkVkCmdExecuteCommands (pVkCmdExecuteCommands (deviceCmds (commandBuffer :: CommandBuffer)))+ pPCommandBuffers <- ContT $ allocaBytesAligned @(Ptr CommandBuffer_T) ((Data.Vector.length (commandBuffers)) * 8) 8+ lift $ Data.Vector.imapM_ (\i e -> poke (pPCommandBuffers `plusPtr` (8 * (i)) :: Ptr (Ptr CommandBuffer_T)) (commandBufferHandle (e))) (commandBuffers)+ lift $ vkCmdExecuteCommands' (commandBufferHandle (commandBuffer)) ((fromIntegral (Data.Vector.length $ (commandBuffers)) :: Word32)) (pPCommandBuffers)+ pure $ ()+++-- | VkViewport - Structure specifying a viewport+--+-- = Description+--+-- The framebuffer depth coordinate @z@f /may/ be represented using either+-- a fixed-point or floating-point representation. However, a+-- floating-point representation /must/ be used if the depth\/stencil+-- attachment has a floating-point depth component. If an m-bit fixed-point+-- representation is used, we assume that it represents each value+-- \(\frac{k}{2^m - 1}\), where k ∈ { 0, 1, …, 2m-1 }, as k (e.g. 1.0 is+-- represented in binary as a string of all ones).+--+-- The viewport parameters shown in the above equations are found from+-- these values as+--+-- - ox = @x@ + @width@ \/ 2+--+-- - oy = @y@ + @height@ \/ 2+--+-- - oz = @minDepth@+--+-- - px = @width@+--+-- - py = @height@+--+-- - pz = @maxDepth@ - @minDepth@.+--+-- If a render pass transform is enabled, the values (px,py) and (ox, oy)+-- defining the viewport are transformed as described in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vertexpostproc-renderpass-transform render pass transform>+-- before participating in the viewport transform.+--+-- The application /can/ specify a negative term for @height@, which has+-- the effect of negating the y coordinate in clip space before performing+-- the transform. When using a negative @height@, the application /should/+-- also adjust the @y@ value to point to the lower left corner of the+-- viewport instead of the upper left corner. Using the negative @height@+-- allows the application to avoid having to negate the y component of the+-- @Position@ output from the last vertex processing stage in shaders that+-- also target other graphics APIs.+--+-- The width and height of the+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#limits-maxViewportDimensions implementation-dependent maximum viewport dimensions>+-- /must/ be greater than or equal to the width and height of the largest+-- image which /can/ be created and attached to a framebuffer.+--+-- The floating-point viewport bounds are represented with an+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#limits-viewportSubPixelBits implementation-dependent precision>.+--+-- == Valid Usage+--+-- - @width@ /must/ be greater than @0.0@+--+-- - @width@ /must/ be less than or equal to+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewportDimensions@[0]+--+-- - The absolute value of @height@ /must/ be less than or equal to+-- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewportDimensions@[1]+--+-- - @x@ /must/ be greater than or equal to @viewportBoundsRange@[0]+--+-- - (@x@ + @width@) /must/ be less than or equal to+-- @viewportBoundsRange@[1]+--+-- - @y@ /must/ be greater than or equal to @viewportBoundsRange@[0]+--+-- - @y@ /must/ be less than or equal to @viewportBoundsRange@[1]+--+-- - (@y@ + @height@) /must/ be greater than or equal to+-- @viewportBoundsRange@[0]+--+-- - (@y@ + @height@) /must/ be less than or equal to+-- @viewportBoundsRange@[1]+--+-- - Unless+-- @https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/html\/vkspec.html#VK_EXT_depth_range_unrestricted@+-- extension is enabled @minDepth@ /must/ be between @0.0@ and @1.0@,+-- inclusive+--+-- - Unless+-- @https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/html\/vkspec.html#VK_EXT_depth_range_unrestricted@+-- extension is enabled @maxDepth@ /must/ be between @0.0@ and @1.0@,+-- inclusive+--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.Pipeline.PipelineViewportStateCreateInfo',+-- 'cmdSetViewport'+data Viewport = Viewport+ { -- | @x@ and @y@ are the viewport’s upper left corner (x,y).+ x :: Float+ , -- No documentation found for Nested "VkViewport" "y"+ y :: Float+ , -- | @width@ and @height@ are the viewport’s width and height, respectively.+ width :: Float+ , -- No documentation found for Nested "VkViewport" "height"+ height :: Float+ , -- | @minDepth@ and @maxDepth@ are the depth range for the viewport. It is+ -- valid for @minDepth@ to be greater than or equal to @maxDepth@.+ minDepth :: Float+ , -- No documentation found for Nested "VkViewport" "maxDepth"+ maxDepth :: Float+ }+ deriving (Typeable)+deriving instance Show Viewport++instance ToCStruct Viewport where+ withCStruct x f = allocaBytesAligned 24 4 $ \p -> pokeCStruct p x (f p)+ pokeCStruct p Viewport{..} f = do+ poke ((p `plusPtr` 0 :: Ptr CFloat)) (CFloat (x))+ poke ((p `plusPtr` 4 :: Ptr CFloat)) (CFloat (y))+ poke ((p `plusPtr` 8 :: Ptr CFloat)) (CFloat (width))+ poke ((p `plusPtr` 12 :: Ptr CFloat)) (CFloat (height))+ poke ((p `plusPtr` 16 :: Ptr CFloat)) (CFloat (minDepth))+ poke ((p `plusPtr` 20 :: Ptr CFloat)) (CFloat (maxDepth))+ f+ cStructSize = 24+ cStructAlignment = 4+ pokeZeroCStruct p f = do+ poke ((p `plusPtr` 0 :: Ptr CFloat)) (CFloat (zero))+ poke ((p `plusPtr` 4 :: Ptr CFloat)) (CFloat (zero))+ poke ((p `plusPtr` 8 :: Ptr CFloat)) (CFloat (zero))+ poke ((p `plusPtr` 12 :: Ptr CFloat)) (CFloat (zero))+ poke ((p `plusPtr` 16 :: Ptr CFloat)) (CFloat (zero))+ poke ((p `plusPtr` 20 :: Ptr CFloat)) (CFloat (zero))+ f++instance FromCStruct Viewport where+ peekCStruct p = do+ x <- peek @CFloat ((p `plusPtr` 0 :: Ptr CFloat))+ y <- peek @CFloat ((p `plusPtr` 4 :: Ptr CFloat))+ width <- peek @CFloat ((p `plusPtr` 8 :: Ptr CFloat))+ height <- peek @CFloat ((p `plusPtr` 12 :: Ptr CFloat))+ minDepth <- peek @CFloat ((p `plusPtr` 16 :: Ptr CFloat))+ maxDepth <- peek @CFloat ((p `plusPtr` 20 :: Ptr CFloat))+ pure $ Viewport+ ((\(CFloat a) -> a) x) ((\(CFloat a) -> a) y) ((\(CFloat a) -> a) width) ((\(CFloat a) -> a) height) ((\(CFloat a) -> a) minDepth) ((\(CFloat a) -> a) maxDepth)++instance Storable Viewport where+ sizeOf ~_ = 24+ alignment ~_ = 4+ peek = peekCStruct+ poke ptr poked = pokeCStruct ptr poked (pure ())++instance Zero Viewport where+ zero = Viewport+ zero+ zero+ zero+ zero+ zero+ zero+++-- | VkRect2D - Structure specifying a two-dimensional subregion+--+-- = See Also+--+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_groupAndVK_KHR_bind_memory2.BindImageMemoryDeviceGroupInfo',+-- 'ClearRect',+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.CommandBufferInheritanceRenderPassTransformInfoQCOM',+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo',+-- 'Graphics.Vulkan.Extensions.VK_KHR_display_swapchain.DisplayPresentInfoKHR',+-- 'Graphics.Vulkan.Core10.SharedTypes.Extent2D',+-- 'Graphics.Vulkan.Core10.SharedTypes.Offset2D',+-- 'Graphics.Vulkan.Extensions.VK_EXT_discard_rectangles.PipelineDiscardRectangleStateCreateInfoEXT',+-- 'Graphics.Vulkan.Extensions.VK_NV_scissor_exclusive.PipelineViewportExclusiveScissorStateCreateInfoNV',+-- 'Graphics.Vulkan.Core10.Pipeline.PipelineViewportStateCreateInfo',+-- 'RenderPassBeginInfo',+-- 'Graphics.Vulkan.Extensions.VK_EXT_discard_rectangles.cmdSetDiscardRectangleEXT',+-- 'Graphics.Vulkan.Extensions.VK_NV_scissor_exclusive.cmdSetExclusiveScissorNV',+-- 'cmdSetScissor',+-- 'Graphics.Vulkan.Extensions.VK_KHR_swapchain.getPhysicalDevicePresentRectanglesKHR'+data Rect2D = Rect2D+ { -- | @offset@ is a 'Graphics.Vulkan.Core10.SharedTypes.Offset2D' specifying+ -- the rectangle offset.+ offset :: Offset2D+ , -- | @extent@ is a 'Graphics.Vulkan.Core10.SharedTypes.Extent2D' specifying+ -- the rectangle extent.+ extent :: Extent2D+ }+ deriving (Typeable)+deriving instance Show Rect2D++instance ToCStruct Rect2D where+ withCStruct x f = allocaBytesAligned 16 4 $ \p -> pokeCStruct p x (f p)+ pokeCStruct p Rect2D{..} f = evalContT $ do+ ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr Offset2D)) (offset) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 8 :: Ptr Extent2D)) (extent) . ($ ())+ lift $ f+ cStructSize = 16+ cStructAlignment = 4+ pokeZeroCStruct p f = evalContT $ do+ ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr Offset2D)) (zero) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 8 :: Ptr Extent2D)) (zero) . ($ ())+ lift $ f++instance FromCStruct Rect2D where+ peekCStruct p = do+ offset <- peekCStruct @Offset2D ((p `plusPtr` 0 :: Ptr Offset2D))+ extent <- peekCStruct @Extent2D ((p `plusPtr` 8 :: Ptr Extent2D))+ pure $ Rect2D+ offset extent++instance Zero Rect2D where+ zero = Rect2D+ zero+ zero+++-- | VkClearRect - Structure specifying a clear rectangle+--+-- = Description+--+-- The layers [@baseArrayLayer@, @baseArrayLayer@ + @layerCount@) counting+-- from the base layer of the attachment image view are cleared.+--+-- = See Also+--+-- 'Rect2D', 'cmdClearAttachments'+data ClearRect = ClearRect+ { -- | @rect@ is the two-dimensional region to be cleared.+ rect :: Rect2D+ , -- | @baseArrayLayer@ is the first layer to be cleared.+ baseArrayLayer :: Word32+ , -- | @layerCount@ is the number of layers to clear.+ layerCount :: Word32+ }+ deriving (Typeable)+deriving instance Show ClearRect++instance ToCStruct ClearRect where+ withCStruct x f = allocaBytesAligned 24 4 $ \p -> pokeCStruct p x (f p)+ pokeCStruct p ClearRect{..} f = evalContT $ do+ ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr Rect2D)) (rect) . ($ ())+ lift $ poke ((p `plusPtr` 16 :: Ptr Word32)) (baseArrayLayer)+ lift $ poke ((p `plusPtr` 20 :: Ptr Word32)) (layerCount)+ lift $ f+ cStructSize = 24+ cStructAlignment = 4+ pokeZeroCStruct p f = evalContT $ do+ ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr Rect2D)) (zero) . ($ ())+ lift $ poke ((p `plusPtr` 16 :: Ptr Word32)) (zero)+ lift $ poke ((p `plusPtr` 20 :: Ptr Word32)) (zero)+ lift $ f++instance FromCStruct ClearRect where+ peekCStruct p = do+ rect <- peekCStruct @Rect2D ((p `plusPtr` 0 :: Ptr Rect2D))+ baseArrayLayer <- peek @Word32 ((p `plusPtr` 16 :: Ptr Word32))+ layerCount <- peek @Word32 ((p `plusPtr` 20 :: Ptr Word32))+ pure $ ClearRect+ rect baseArrayLayer layerCount++instance Zero ClearRect where+ zero = ClearRect+ zero+ zero+ zero+++-- | VkBufferCopy - Structure specifying a buffer copy operation+--+-- == Valid Usage+--+-- - The @size@ /must/ be greater than @0@+--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.BaseType.DeviceSize', 'cmdCopyBuffer'+data BufferCopy = BufferCopy+ { -- | @srcOffset@ is the starting offset in bytes from the start of+ -- @srcBuffer@.+ srcOffset :: DeviceSize+ , -- | @dstOffset@ is the starting offset in bytes from the start of+ -- @dstBuffer@.+ dstOffset :: DeviceSize+ , -- | @size@ is the number of bytes to copy.+ size :: DeviceSize+ }+ deriving (Typeable)+deriving instance Show BufferCopy++instance ToCStruct BufferCopy where+ withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p)+ pokeCStruct p BufferCopy{..} f = do+ poke ((p `plusPtr` 0 :: Ptr DeviceSize)) (srcOffset)+ poke ((p `plusPtr` 8 :: Ptr DeviceSize)) (dstOffset)+ poke ((p `plusPtr` 16 :: Ptr DeviceSize)) (size)+ f+ cStructSize = 24+ cStructAlignment = 8+ pokeZeroCStruct p f = do+ poke ((p `plusPtr` 0 :: Ptr DeviceSize)) (zero)+ poke ((p `plusPtr` 8 :: Ptr DeviceSize)) (zero)+ poke ((p `plusPtr` 16 :: Ptr DeviceSize)) (zero)+ f++instance FromCStruct BufferCopy where+ peekCStruct p = do+ srcOffset <- peek @DeviceSize ((p `plusPtr` 0 :: Ptr DeviceSize))+ dstOffset <- peek @DeviceSize ((p `plusPtr` 8 :: Ptr DeviceSize))+ size <- peek @DeviceSize ((p `plusPtr` 16 :: Ptr DeviceSize))+ pure $ BufferCopy+ srcOffset dstOffset size++instance Storable BufferCopy where+ sizeOf ~_ = 24+ alignment ~_ = 8+ peek = peekCStruct+ poke ptr poked = pokeCStruct ptr poked (pure ())++instance Zero BufferCopy where+ zero = BufferCopy+ zero+ zero+ zero+++-- | VkImageCopy - Structure specifying an image copy operation+--+-- = Description+--+-- For 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' images,+-- copies are performed slice by slice starting with the @z@ member of the+-- @srcOffset@ or @dstOffset@, and copying @depth@ slices. For images with+-- multiple layers, copies are performed layer by layer starting with the+-- @baseArrayLayer@ member of the @srcSubresource@ or @dstSubresource@ and+-- copying @layerCount@ layers. Image data /can/ be copied between images+-- with different image types. If one image is+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' and the other+-- image is 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' with+-- multiple layers, then each slice is copied to or from a different layer.+--+-- Copies involving a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>+-- specify the region to be copied in terms of the /plane/ to be copied,+-- not the coordinates of the multi-planar image. This means that copies+-- accessing the R\/B planes of “@_422@” format images /must/ fit the+-- copied region within half the @width@ of the parent image, and that+-- copies accessing the R\/B planes of “@_420@” format images /must/ fit+-- the copied region within half the @width@ and @height@ of the parent+-- image.+--+-- == Valid Usage+--+-- - If neither the calling command’s @srcImage@ nor the calling+-- command’s @dstImage@ has a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>+-- then the @aspectMask@ member of @srcSubresource@ and+-- @dstSubresource@ /must/ match+--+-- - If the calling command’s @srcImage@ has a+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' with+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion two planes>+-- then the @srcSubresource@ @aspectMask@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT'+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT'+--+-- - If the calling command’s @srcImage@ has a+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' with+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion three planes>+-- then the @srcSubresource@ @aspectMask@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'+--+-- - If the calling command’s @dstImage@ has a+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' with+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion two planes>+-- then the @dstSubresource@ @aspectMask@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT'+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT'+--+-- - If the calling command’s @dstImage@ has a+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' with+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion three planes>+-- then the @dstSubresource@ @aspectMask@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'+--+-- - If the calling command’s @srcImage@ has a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>+-- and the @dstImage@ does not have a multi-planar image format, the+-- @dstSubresource@ @aspectMask@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT'+--+-- - If the calling command’s @dstImage@ has a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar image format>+-- and the @srcImage@ does not have a multi-planar image format, the+-- @srcSubresource@ @aspectMask@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT'+--+-- - The number of slices of the @extent@ (for 3D) or layers of the+-- @srcSubresource@ (for non-3D) /must/ match the number of slices of+-- the @extent@ (for 3D) or layers of the @dstSubresource@ (for non-3D)+--+-- - If either of the calling command’s @srcImage@ or @dstImage@+-- parameters are of 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType'+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', the+-- @baseArrayLayer@ and @layerCount@ members of the corresponding+-- subresource /must/ be @0@ and @1@, respectively+--+-- - The @aspectMask@ member of @srcSubresource@ /must/ specify aspects+-- present in the calling command’s @srcImage@+--+-- - The @aspectMask@ member of @dstSubresource@ /must/ specify aspects+-- present in the calling command’s @dstImage@+--+-- - @srcOffset.x@ and (@extent.width@ + @srcOffset.x@) /must/ both be+-- greater than or equal to @0@ and less than or equal to the source+-- image subresource width+--+-- - @srcOffset.y@ and (@extent.height@ + @srcOffset.y@) /must/ both be+-- greater than or equal to @0@ and less than or equal to the source+-- image subresource height+--+-- - If the calling command’s @srcImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then+-- @srcOffset.y@ /must/ be @0@ and @extent.height@ /must/ be @1@.+--+-- - @srcOffset.z@ and (@extent.depth@ + @srcOffset.z@) /must/ both be+-- greater than or equal to @0@ and less than or equal to the source+-- image subresource depth+--+-- - If the calling command’s @srcImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then+-- @srcOffset.z@ /must/ be @0@ and @extent.depth@ /must/ be @1@.+--+-- - If the calling command’s @dstImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then+-- @dstOffset.z@ /must/ be @0@ and @extent.depth@ /must/ be @1@.+--+-- - If the calling command’s @srcImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then+-- @srcOffset.z@ /must/ be @0@.+--+-- - If the calling command’s @dstImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then+-- @dstOffset.z@ /must/ be @0@.+--+-- - If both @srcImage@ and @dstImage@ are of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' then+-- @extent.depth@ /must/ be @1@.+--+-- - If the calling command’s @srcImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', and the+-- @dstImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', then+-- @extent.depth@ /must/ equal to the @layerCount@ member of+-- @srcSubresource@.+--+-- - If the calling command’s @dstImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', and the+-- @srcImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', then+-- @extent.depth@ /must/ equal to the @layerCount@ member of+-- @dstSubresource@.+--+-- - @dstOffset.x@ and (@extent.width@ + @dstOffset.x@) /must/ both be+-- greater than or equal to @0@ and less than or equal to the+-- destination image subresource width+--+-- - @dstOffset.y@ and (@extent.height@ + @dstOffset.y@) /must/ both be+-- greater than or equal to @0@ and less than or equal to the+-- destination image subresource height+--+-- - If the calling command’s @dstImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then+-- @dstOffset.y@ /must/ be @0@ and @extent.height@ /must/ be @1@.+--+-- - @dstOffset.z@ and (@extent.depth@ + @dstOffset.z@) /must/ both be+-- greater than or equal to @0@ and less than or equal to the+-- destination image subresource depth+--+-- - If the calling command’s @srcImage@ is a compressed image, or a+-- /single-plane/, “@_422@” image format, all members of @srcOffset@+-- /must/ be a multiple of the corresponding dimensions of the+-- compressed texel block+--+-- - If the calling command’s @srcImage@ is a compressed image, or a+-- /single-plane/, “@_422@” image format, @extent.width@ /must/ be a+-- multiple of the compressed texel block width or (@extent.width@ ++-- @srcOffset.x@) /must/ equal the source image subresource width+--+-- - If the calling command’s @srcImage@ is a compressed image, or a+-- /single-plane/, “@_422@” image format, @extent.height@ /must/ be a+-- multiple of the compressed texel block height or (@extent.height@ ++-- @srcOffset.y@) /must/ equal the source image subresource height+--+-- - If the calling command’s @srcImage@ is a compressed image, or a+-- /single-plane/, “@_422@” image format, @extent.depth@ /must/ be a+-- multiple of the compressed texel block depth or (@extent.depth@ ++-- @srcOffset.z@) /must/ equal the source image subresource depth+--+-- - If the calling command’s @dstImage@ is a compressed format image, or+-- a /single-plane/, “@_422@” image format, all members of @dstOffset@+-- /must/ be a multiple of the corresponding dimensions of the+-- compressed texel block+--+-- - If the calling command’s @dstImage@ is a compressed format image, or+-- a /single-plane/, “@_422@” image format, @extent.width@ /must/ be a+-- multiple of the compressed texel block width or (@extent.width@ ++-- @dstOffset.x@) /must/ equal the destination image subresource width+--+-- - If the calling command’s @dstImage@ is a compressed format image, or+-- a /single-plane/, “@_422@” image format, @extent.height@ /must/ be a+-- multiple of the compressed texel block height or (@extent.height@ ++-- @dstOffset.y@) /must/ equal the destination image subresource height+--+-- - If the calling command’s @dstImage@ is a compressed format image, or+-- a /single-plane/, “@_422@” image format, @extent.depth@ /must/ be a+-- multiple of the compressed texel block depth or (@extent.depth@ ++-- @dstOffset.z@) /must/ equal the destination image subresource depth+--+-- == Valid Usage (Implicit)+--+-- - @srcSubresource@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'+-- structure+--+-- - @dstSubresource@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'+-- structure+--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.SharedTypes.Extent3D',+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers',+-- 'Graphics.Vulkan.Core10.SharedTypes.Offset3D', 'cmdCopyImage'+data ImageCopy = ImageCopy+ { -- | @srcSubresource@ and @dstSubresource@ are+ -- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers' structures+ -- specifying the image subresources of the images used for the source and+ -- destination image data, respectively.+ srcSubresource :: ImageSubresourceLayers+ , -- | @srcOffset@ and @dstOffset@ select the initial @x@, @y@, and @z@ offsets+ -- in texels of the sub-regions of the source and destination image data.+ srcOffset :: Offset3D+ , -- No documentation found for Nested "VkImageCopy" "dstSubresource"+ dstSubresource :: ImageSubresourceLayers+ , -- No documentation found for Nested "VkImageCopy" "dstOffset"+ dstOffset :: Offset3D+ , -- | @extent@ is the size in texels of the image to copy in @width@, @height@+ -- and @depth@.+ extent :: Extent3D+ }+ deriving (Typeable)+deriving instance Show ImageCopy++instance ToCStruct ImageCopy where+ withCStruct x f = allocaBytesAligned 68 4 $ \p -> pokeCStruct p x (f p)+ pokeCStruct p ImageCopy{..} f = evalContT $ do+ ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers)) (srcSubresource) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr Offset3D)) (srcOffset) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 28 :: Ptr ImageSubresourceLayers)) (dstSubresource) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 44 :: Ptr Offset3D)) (dstOffset) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 56 :: Ptr Extent3D)) (extent) . ($ ())+ lift $ f+ cStructSize = 68+ cStructAlignment = 4+ pokeZeroCStruct p f = evalContT $ do+ ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr Offset3D)) (zero) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 28 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 44 :: Ptr Offset3D)) (zero) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 56 :: Ptr Extent3D)) (zero) . ($ ())+ lift $ f++instance FromCStruct ImageCopy where+ peekCStruct p = do+ srcSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers))+ srcOffset <- peekCStruct @Offset3D ((p `plusPtr` 16 :: Ptr Offset3D))+ dstSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 28 :: Ptr ImageSubresourceLayers))+ dstOffset <- peekCStruct @Offset3D ((p `plusPtr` 44 :: Ptr Offset3D))+ extent <- peekCStruct @Extent3D ((p `plusPtr` 56 :: Ptr Extent3D))+ pure $ ImageCopy+ srcSubresource srcOffset dstSubresource dstOffset extent++instance Zero ImageCopy where+ zero = ImageCopy+ zero+ zero+ zero+ zero+ zero+++-- | VkImageBlit - Structure specifying an image blit operation+--+-- = Description+--+-- For each element of the @pRegions@ array, a blit operation is performed+-- the specified source and destination regions.+--+-- == Valid Usage+--+-- - The @aspectMask@ member of @srcSubresource@ and @dstSubresource@+-- /must/ match+--+-- - The @layerCount@ member of @srcSubresource@ and @dstSubresource@+-- /must/ match+--+-- - If either of the calling command’s @srcImage@ or @dstImage@+-- parameters are of 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType'+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', the+-- @baseArrayLayer@ and @layerCount@ members of both @srcSubresource@+-- and @dstSubresource@ /must/ be @0@ and @1@, respectively+--+-- - The @aspectMask@ member of @srcSubresource@ /must/ specify aspects+-- present in the calling command’s @srcImage@+--+-- - The @aspectMask@ member of @dstSubresource@ /must/ specify aspects+-- present in the calling command’s @dstImage@+--+-- - @srcOffset@[0].x and @srcOffset@[1].x /must/ both be greater than or+-- equal to @0@ and less than or equal to the source image subresource+-- width+--+-- - @srcOffset@[0].y and @srcOffset@[1].y /must/ both be greater than or+-- equal to @0@ and less than or equal to the source image subresource+-- height+--+-- - If the calling command’s @srcImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then+-- @srcOffset@[0].y /must/ be @0@ and @srcOffset@[1].y /must/ be @1@.+--+-- - @srcOffset@[0].z and @srcOffset@[1].z /must/ both be greater than or+-- equal to @0@ and less than or equal to the source image subresource+-- depth+--+-- - If the calling command’s @srcImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' or+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then+-- @srcOffset@[0].z /must/ be @0@ and @srcOffset@[1].z /must/ be @1@.+--+-- - @dstOffset@[0].x and @dstOffset@[1].x /must/ both be greater than or+-- equal to @0@ and less than or equal to the destination image+-- subresource width+--+-- - @dstOffset@[0].y and @dstOffset@[1].y /must/ both be greater than or+-- equal to @0@ and less than or equal to the destination image+-- subresource height+--+-- - If the calling command’s @dstImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then+-- @dstOffset@[0].y /must/ be @0@ and @dstOffset@[1].y /must/ be @1@.+--+-- - @dstOffset@[0].z and @dstOffset@[1].z /must/ both be greater than or+-- equal to @0@ and less than or equal to the destination image+-- subresource depth+--+-- - If the calling command’s @dstImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' or+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then+-- @dstOffset@[0].z /must/ be @0@ and @dstOffset@[1].z /must/ be @1@.+--+-- == Valid Usage (Implicit)+--+-- - @srcSubresource@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'+-- structure+--+-- - @dstSubresource@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'+-- structure+--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers',+-- 'Graphics.Vulkan.Core10.SharedTypes.Offset3D', 'cmdBlitImage'+data ImageBlit = ImageBlit+ { -- | @srcSubresource@ is the subresource to blit from.+ srcSubresource :: ImageSubresourceLayers+ , -- | @srcOffsets@ is a pointer to an array of two+ -- 'Graphics.Vulkan.Core10.SharedTypes.Offset3D' structures specifying the+ -- bounds of the source region within @srcSubresource@.+ srcOffsets :: (Offset3D, Offset3D)+ , -- | @dstSubresource@ is the subresource to blit into.+ dstSubresource :: ImageSubresourceLayers+ , -- | @dstOffsets@ is a pointer to an array of two+ -- 'Graphics.Vulkan.Core10.SharedTypes.Offset3D' structures specifying the+ -- bounds of the destination region within @dstSubresource@.+ dstOffsets :: (Offset3D, Offset3D)+ }+ deriving (Typeable)+deriving instance Show ImageBlit++instance ToCStruct ImageBlit where+ withCStruct x f = allocaBytesAligned 80 4 $ \p -> pokeCStruct p x (f p)+ pokeCStruct p ImageBlit{..} f = evalContT $ do+ ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers)) (srcSubresource) . ($ ())+ let pSrcOffsets' = lowerArrayPtr ((p `plusPtr` 16 :: Ptr (Data.Vector.Storable.Sized.Vector 2 Offset3D)))+ case (srcOffsets) of+ (e0, e1) -> do+ ContT $ pokeCStruct (pSrcOffsets' :: Ptr Offset3D) (e0) . ($ ())+ ContT $ pokeCStruct (pSrcOffsets' `plusPtr` 12 :: Ptr Offset3D) (e1) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 40 :: Ptr ImageSubresourceLayers)) (dstSubresource) . ($ ())+ let pDstOffsets' = lowerArrayPtr ((p `plusPtr` 56 :: Ptr (Data.Vector.Storable.Sized.Vector 2 Offset3D)))+ case (dstOffsets) of+ (e0, e1) -> do+ ContT $ pokeCStruct (pDstOffsets' :: Ptr Offset3D) (e0) . ($ ())+ ContT $ pokeCStruct (pDstOffsets' `plusPtr` 12 :: Ptr Offset3D) (e1) . ($ ())+ lift $ f+ cStructSize = 80+ cStructAlignment = 4+ pokeZeroCStruct p f = evalContT $ do+ ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())+ let pSrcOffsets' = lowerArrayPtr ((p `plusPtr` 16 :: Ptr (Data.Vector.Storable.Sized.Vector 2 Offset3D)))+ case ((zero, zero)) of+ (e0, e1) -> do+ ContT $ pokeCStruct (pSrcOffsets' :: Ptr Offset3D) (e0) . ($ ())+ ContT $ pokeCStruct (pSrcOffsets' `plusPtr` 12 :: Ptr Offset3D) (e1) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 40 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())+ let pDstOffsets' = lowerArrayPtr ((p `plusPtr` 56 :: Ptr (Data.Vector.Storable.Sized.Vector 2 Offset3D)))+ case ((zero, zero)) of+ (e0, e1) -> do+ ContT $ pokeCStruct (pDstOffsets' :: Ptr Offset3D) (e0) . ($ ())+ ContT $ pokeCStruct (pDstOffsets' `plusPtr` 12 :: Ptr Offset3D) (e1) . ($ ())+ lift $ f++instance FromCStruct ImageBlit where+ peekCStruct p = do+ srcSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers))+ let psrcOffsets = lowerArrayPtr @Offset3D ((p `plusPtr` 16 :: Ptr (Data.Vector.Storable.Sized.Vector 2 Offset3D)))+ srcOffsets0 <- peekCStruct @Offset3D ((psrcOffsets `advancePtrBytes` 0 :: Ptr Offset3D))+ srcOffsets1 <- peekCStruct @Offset3D ((psrcOffsets `advancePtrBytes` 12 :: Ptr Offset3D))+ dstSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 40 :: Ptr ImageSubresourceLayers))+ let pdstOffsets = lowerArrayPtr @Offset3D ((p `plusPtr` 56 :: Ptr (Data.Vector.Storable.Sized.Vector 2 Offset3D)))+ dstOffsets0 <- peekCStruct @Offset3D ((pdstOffsets `advancePtrBytes` 0 :: Ptr Offset3D))+ dstOffsets1 <- peekCStruct @Offset3D ((pdstOffsets `advancePtrBytes` 12 :: Ptr Offset3D))+ pure $ ImageBlit+ srcSubresource ((srcOffsets0, srcOffsets1)) dstSubresource ((dstOffsets0, dstOffsets1))++instance Zero ImageBlit where+ zero = ImageBlit+ zero+ (zero, zero)+ zero+ (zero, zero)+++-- | VkBufferImageCopy - Structure specifying a buffer image copy operation+--+-- = Description+--+-- When copying to or from a depth or stencil aspect, the data in buffer+-- memory uses a layout that is a (mostly) tightly packed representation of+-- the depth or stencil data. Specifically:+--+-- - data copied to or from the stencil aspect of any depth\/stencil+-- format is tightly packed with one+-- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_S8_UINT' value per+-- texel.+--+-- - data copied to or from the depth aspect of a+-- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D16_UNORM' or+-- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D16_UNORM_S8_UINT'+-- format is tightly packed with one+-- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D16_UNORM' value per+-- texel.+--+-- - data copied to or from the depth aspect of a+-- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D32_SFLOAT' or+-- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D32_SFLOAT_S8_UINT'+-- format is tightly packed with one+-- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D32_SFLOAT' value per+-- texel.+--+-- - data copied to or from the depth aspect of a+-- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_X8_D24_UNORM_PACK32' or+-- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_D24_UNORM_S8_UINT'+-- format is packed with one 32-bit word per texel with the D24 value+-- in the LSBs of the word, and undefined values in the eight MSBs.+--+-- Note+--+-- To copy both the depth and stencil aspects of a depth\/stencil format,+-- two entries in @pRegions@ /can/ be used, where one specifies the depth+-- aspect in @imageSubresource@, and the other specifies the stencil+-- aspect.+--+-- Because depth or stencil aspect buffer to image copies /may/ require+-- format conversions on some implementations, they are not supported on+-- queues that do not support graphics.+--+-- When copying to a depth aspect, and the+-- @https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/html\/vkspec.html#VK_EXT_depth_range_unrestricted@+-- extension is not enabled, the data in buffer memory /must/ be in the+-- range [0,1], or the resulting values are undefined.+--+-- Copies are done layer by layer starting with image layer+-- @baseArrayLayer@ member of @imageSubresource@. @layerCount@ layers are+-- copied from the source image or to the destination image.+--+-- == Valid Usage+--+-- - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'+-- parameter’s format is not a depth\/stencil format or a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,+-- then @bufferOffset@ /must/ be a multiple of the format’s texel block+-- size.+--+-- - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'+-- parameter’s format is a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,+-- then @bufferOffset@ /must/ be a multiple of the element size of the+-- compatible format for the format and the @aspectMask@ of the+-- @imageSubresource@ as defined in+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatible-planes>+--+-- - @bufferOffset@ /must/ be a multiple of @4@+--+-- - @bufferRowLength@ /must/ be @0@, or greater than or equal to the+-- @width@ member of @imageExtent@+--+-- - @bufferImageHeight@ /must/ be @0@, or greater than or equal to the+-- @height@ member of @imageExtent@+--+-- - @imageOffset.x@ and (@imageExtent.width@ + @imageOffset.x@) /must/+-- both be greater than or equal to @0@ and less than or equal to the+-- image subresource width where this refers to the width of the+-- /plane/ of the image involved in the copy in the case of a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>+--+-- - @imageOffset.y@ and (imageExtent.height + @imageOffset.y@) /must/+-- both be greater than or equal to @0@ and less than or equal to the+-- image subresource height where this refers to the height of the+-- /plane/ of the image involved in the copy in the case of a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>+--+-- - If the calling command’s @srcImage@ ('cmdCopyImageToBuffer') or+-- @dstImage@ ('cmdCopyBufferToImage') is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then+-- @imageOffset.y@ /must/ be @0@ and @imageExtent.height@ /must/ be+-- @1@.+--+-- - @imageOffset.z@ and (imageExtent.depth + @imageOffset.z@) /must/+-- both be greater than or equal to @0@ and less than or equal to the+-- image subresource depth+--+-- - If the calling command’s @srcImage@ ('cmdCopyImageToBuffer') or+-- @dstImage@ ('cmdCopyBufferToImage') is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' or+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then+-- @imageOffset.z@ /must/ be @0@ and @imageExtent.depth@ /must/ be @1@+--+-- - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'+-- parameter is a compressed image, or a /single-plane/, “@_422@” image+-- format, @bufferRowLength@ /must/ be a multiple of the compressed+-- texel block width+--+-- - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'+-- parameter is a compressed image, or a /single-plane/, “@_422@” image+-- format, @bufferImageHeight@ /must/ be a multiple of the compressed+-- texel block height+--+-- - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'+-- parameter is a compressed image, or a /single-plane/, “@_422@” image+-- format, all members of @imageOffset@ /must/ be a multiple of the+-- corresponding dimensions of the compressed texel block+--+-- - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'+-- parameter is a compressed image, or a /single-plane/, “@_422@” image+-- format, @bufferOffset@ /must/ be a multiple of the compressed texel+-- block size in bytes+--+-- - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'+-- parameter is a compressed image, or a /single-plane/, “@_422@” image+-- format, @imageExtent.width@ /must/ be a multiple of the compressed+-- texel block width or (@imageExtent.width@ + @imageOffset.x@) /must/+-- equal the image subresource width+--+-- - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'+-- parameter is a compressed image, or a /single-plane/, “@_422@” image+-- format, @imageExtent.height@ /must/ be a multiple of the compressed+-- texel block height or (@imageExtent.height@ + @imageOffset.y@)+-- /must/ equal the image subresource height+--+-- - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'+-- parameter is a compressed image, or a /single-plane/, “@_422@” image+-- format, @imageExtent.depth@ /must/ be a multiple of the compressed+-- texel block depth or (@imageExtent.depth@ + @imageOffset.z@) /must/+-- equal the image subresource depth+--+-- - The @aspectMask@ member of @imageSubresource@ /must/ specify aspects+-- present in the calling command’s+-- 'Graphics.Vulkan.Core10.Handles.Image' parameter+--+-- - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'+-- parameter’s format is a+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>,+-- then the @aspectMask@ member of @imageSubresource@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT',+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT',+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'+-- (with+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT'+-- valid only for image formats with three planes)+--+-- - The @aspectMask@ member of @imageSubresource@ /must/ only have a+-- single bit set+--+-- - If the calling command’s 'Graphics.Vulkan.Core10.Handles.Image'+-- parameter is of 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType'+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', the+-- @baseArrayLayer@ and @layerCount@ members of @imageSubresource@+-- /must/ be @0@ and @1@, respectively+--+-- == Valid Usage (Implicit)+--+-- - @imageSubresource@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'+-- structure+--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.BaseType.DeviceSize',+-- 'Graphics.Vulkan.Core10.SharedTypes.Extent3D',+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers',+-- 'Graphics.Vulkan.Core10.SharedTypes.Offset3D', 'cmdCopyBufferToImage',+-- 'cmdCopyImageToBuffer'+data BufferImageCopy = BufferImageCopy+ { -- | @bufferOffset@ is the offset in bytes from the start of the buffer+ -- object where the image data is copied from or to.+ bufferOffset :: DeviceSize+ , -- | @bufferRowLength@ and @bufferImageHeight@ specify in texels a subregion+ -- of a larger two- or three-dimensional image in buffer memory, and+ -- control the addressing calculations. If either of these values is zero,+ -- that aspect of the buffer memory is considered to be tightly packed+ -- according to the @imageExtent@.+ bufferRowLength :: Word32+ , -- No documentation found for Nested "VkBufferImageCopy" "bufferImageHeight"+ bufferImageHeight :: Word32+ , -- | @imageSubresource@ is a+ -- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers' used to+ -- specify the specific image subresources of the image used for the source+ -- or destination image data.+ imageSubresource :: ImageSubresourceLayers+ , -- | @imageOffset@ selects the initial @x@, @y@, @z@ offsets in texels of the+ -- sub-region of the source or destination image data.+ imageOffset :: Offset3D+ , -- | @imageExtent@ is the size in texels of the image to copy in @width@,+ -- @height@ and @depth@.+ imageExtent :: Extent3D+ }+ deriving (Typeable)+deriving instance Show BufferImageCopy++instance ToCStruct BufferImageCopy where+ withCStruct x f = allocaBytesAligned 56 8 $ \p -> pokeCStruct p x (f p)+ pokeCStruct p BufferImageCopy{..} f = evalContT $ do+ lift $ poke ((p `plusPtr` 0 :: Ptr DeviceSize)) (bufferOffset)+ lift $ poke ((p `plusPtr` 8 :: Ptr Word32)) (bufferRowLength)+ lift $ poke ((p `plusPtr` 12 :: Ptr Word32)) (bufferImageHeight)+ ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr ImageSubresourceLayers)) (imageSubresource) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 32 :: Ptr Offset3D)) (imageOffset) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 44 :: Ptr Extent3D)) (imageExtent) . ($ ())+ lift $ f+ cStructSize = 56+ cStructAlignment = 8+ pokeZeroCStruct p f = evalContT $ do+ lift $ poke ((p `plusPtr` 0 :: Ptr DeviceSize)) (zero)+ lift $ poke ((p `plusPtr` 8 :: Ptr Word32)) (zero)+ lift $ poke ((p `plusPtr` 12 :: Ptr Word32)) (zero)+ ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 32 :: Ptr Offset3D)) (zero) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 44 :: Ptr Extent3D)) (zero) . ($ ())+ lift $ f++instance FromCStruct BufferImageCopy where+ peekCStruct p = do+ bufferOffset <- peek @DeviceSize ((p `plusPtr` 0 :: Ptr DeviceSize))+ bufferRowLength <- peek @Word32 ((p `plusPtr` 8 :: Ptr Word32))+ bufferImageHeight <- peek @Word32 ((p `plusPtr` 12 :: Ptr Word32))+ imageSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 16 :: Ptr ImageSubresourceLayers))+ imageOffset <- peekCStruct @Offset3D ((p `plusPtr` 32 :: Ptr Offset3D))+ imageExtent <- peekCStruct @Extent3D ((p `plusPtr` 44 :: Ptr Extent3D))+ pure $ BufferImageCopy+ bufferOffset bufferRowLength bufferImageHeight imageSubresource imageOffset imageExtent++instance Zero BufferImageCopy where+ zero = BufferImageCopy+ zero+ zero+ zero+ zero+ zero+ zero+++-- | VkImageResolve - Structure specifying an image resolve operation+--+-- == Valid Usage+--+-- - The @aspectMask@ member of @srcSubresource@ and @dstSubresource@+-- /must/ only contain+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT'+--+-- - The @layerCount@ member of @srcSubresource@ and @dstSubresource@+-- /must/ match+--+-- - If either of the calling command’s @srcImage@ or @dstImage@+-- parameters are of 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType'+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', the+-- @baseArrayLayer@ and @layerCount@ members of both @srcSubresource@+-- and @dstSubresource@ /must/ be @0@ and @1@, respectively+--+-- - @srcOffset.x@ and (@extent.width@ + @srcOffset.x@) /must/ both be+-- greater than or equal to @0@ and less than or equal to the source+-- image subresource width+--+-- - @srcOffset.y@ and (@extent.height@ + @srcOffset.y@) /must/ both be+-- greater than or equal to @0@ and less than or equal to the source+-- image subresource height+--+-- - If the calling command’s @srcImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then+-- @srcOffset.y@ /must/ be @0@ and @extent.height@ /must/ be @1@.+--+-- - @srcOffset.z@ and (@extent.depth@ + @srcOffset.z@) /must/ both be+-- greater than or equal to @0@ and less than or equal to the source+-- image subresource depth+--+-- - If the calling command’s @srcImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' or+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then+-- @srcOffset.z@ /must/ be @0@ and @extent.depth@ /must/ be @1@.+--+-- - @dstOffset.x@ and (@extent.width@ + @dstOffset.x@) /must/ both be+-- greater than or equal to @0@ and less than or equal to the+-- destination image subresource width+--+-- - @dstOffset.y@ and (@extent.height@ + @dstOffset.y@) /must/ both be+-- greater than or equal to @0@ and less than or equal to the+-- destination image subresource height+--+-- - If the calling command’s @dstImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', then+-- @dstOffset.y@ /must/ be @0@ and @extent.height@ /must/ be @1@.+--+-- - @dstOffset.z@ and (@extent.depth@ + @dstOffset.z@) /must/ both be+-- greater than or equal to @0@ and less than or equal to the+-- destination image subresource depth+--+-- - If the calling command’s @dstImage@ is of type+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' or+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', then+-- @dstOffset.z@ /must/ be @0@ and @extent.depth@ /must/ be @1@.+--+-- == Valid Usage (Implicit)+--+-- - @srcSubresource@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'+-- structure+--+-- - @dstSubresource@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers'+-- structure+--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.SharedTypes.Extent3D',+-- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers',+-- 'Graphics.Vulkan.Core10.SharedTypes.Offset3D', 'cmdResolveImage'+data ImageResolve = ImageResolve+ { -- | @srcSubresource@ and @dstSubresource@ are+ -- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceLayers' structures+ -- specifying the image subresources of the images used for the source and+ -- destination image data, respectively. Resolve of depth\/stencil images+ -- is not supported.+ srcSubresource :: ImageSubresourceLayers+ , -- | @srcOffset@ and @dstOffset@ select the initial @x@, @y@, and @z@ offsets+ -- in texels of the sub-regions of the source and destination image data.+ srcOffset :: Offset3D+ , -- No documentation found for Nested "VkImageResolve" "dstSubresource"+ dstSubresource :: ImageSubresourceLayers+ , -- No documentation found for Nested "VkImageResolve" "dstOffset"+ dstOffset :: Offset3D+ , -- | @extent@ is the size in texels of the source image to resolve in+ -- @width@, @height@ and @depth@.+ extent :: Extent3D+ }+ deriving (Typeable)+deriving instance Show ImageResolve++instance ToCStruct ImageResolve where+ withCStruct x f = allocaBytesAligned 68 4 $ \p -> pokeCStruct p x (f p)+ pokeCStruct p ImageResolve{..} f = evalContT $ do+ ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers)) (srcSubresource) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr Offset3D)) (srcOffset) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 28 :: Ptr ImageSubresourceLayers)) (dstSubresource) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 44 :: Ptr Offset3D)) (dstOffset) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 56 :: Ptr Extent3D)) (extent) . ($ ())+ lift $ f+ cStructSize = 68+ cStructAlignment = 4+ pokeZeroCStruct p f = evalContT $ do+ ContT $ pokeCStruct ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 16 :: Ptr Offset3D)) (zero) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 28 :: Ptr ImageSubresourceLayers)) (zero) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 44 :: Ptr Offset3D)) (zero) . ($ ())+ ContT $ pokeCStruct ((p `plusPtr` 56 :: Ptr Extent3D)) (zero) . ($ ())+ lift $ f++instance FromCStruct ImageResolve where+ peekCStruct p = do+ srcSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 0 :: Ptr ImageSubresourceLayers))+ srcOffset <- peekCStruct @Offset3D ((p `plusPtr` 16 :: Ptr Offset3D))+ dstSubresource <- peekCStruct @ImageSubresourceLayers ((p `plusPtr` 28 :: Ptr ImageSubresourceLayers))+ dstOffset <- peekCStruct @Offset3D ((p `plusPtr` 44 :: Ptr Offset3D))+ extent <- peekCStruct @Extent3D ((p `plusPtr` 56 :: Ptr Extent3D))+ pure $ ImageResolve+ srcSubresource srcOffset dstSubresource dstOffset extent++instance Zero ImageResolve where+ zero = ImageResolve+ zero+ zero+ zero+ zero+ zero+++-- | VkRenderPassBeginInfo - Structure specifying render pass begin info+--+-- = Description+--+-- @renderArea@ is the render area that is affected by the render pass+-- instance. The effects of attachment load, store and multisample resolve+-- operations are restricted to the pixels whose x and y coordinates fall+-- within the render area on all attachments. The render area extends to+-- all layers of @framebuffer@. The application /must/ ensure (using+-- scissor if necessary) that all rendering is contained within the render+-- area. The render area, after any transform specified by+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'::@transform@+-- is applied, /must/ be contained within the framebuffer dimensions.+--+-- If+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vertexpostproc-renderpass-transform render pass transform>+-- is enabled, then @renderArea@ must equal the framebuffer pre-transformed+-- dimensions. After @renderArea@ has been transformed by+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'::@transform@,+-- the resulting render area /must/ be equal to the framebuffer dimensions.+--+-- When multiview is enabled, the resolve operation at the end of a subpass+-- applies to all views in the view mask.+--+-- Note+--+-- There /may/ be a performance cost for using a render area smaller than+-- the framebuffer, unless it matches the render area granularity for the+-- render pass.+--+-- == Valid Usage+--+-- - @clearValueCount@ /must/ be greater than the largest attachment+-- index in @renderPass@ that specifies a @loadOp@ (or @stencilLoadOp@,+-- if the attachment has a depth\/stencil format) of+-- 'Graphics.Vulkan.Core10.Enums.AttachmentLoadOp.ATTACHMENT_LOAD_OP_CLEAR'+--+-- - @renderPass@ /must/ be+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>+-- with the @renderPass@ member of the+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo' structure+-- specified when creating @framebuffer@+--+-- - If the @pNext@ chain does not contain+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo'+-- or its @deviceRenderAreaCount@ member is equal to 0,+-- @renderArea.offset.x@ /must/ be greater than or equal to 0+--+-- - If the @pNext@ chain does not contain+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo'+-- or its @deviceRenderAreaCount@ member is equal to 0,+-- @renderArea.offset.y@ /must/ be greater than or equal to 0+--+-- - If the @pNext@ chain does not contain+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo'+-- or its @deviceRenderAreaCount@ member is equal to 0,+-- @renderArea.offset.x@ + @renderArea.offset.width@ /must/ be less+-- than or equal to+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@width@ the+-- @framebuffer@ was created with+--+-- - If the @pNext@ chain does not contain+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo'+-- or its @deviceRenderAreaCount@ member is equal to 0,+-- @renderArea.offset.y@ + @renderArea.offset.height@ /must/ be less+-- than or equal to+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@height@ the+-- @framebuffer@ was created with+--+-- - If the @pNext@ chain contains+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo',+-- the @offset.x@ member of each element of @pDeviceRenderAreas@ /must/+-- be greater than or equal to 0+--+-- - If the @pNext@ chain contains+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo',+-- the @offset.y@ member of each element of @pDeviceRenderAreas@ /must/+-- be greater than or equal to 0+--+-- - If the @pNext@ chain contains+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo',+-- @offset.x@ + @offset.width@ of each element of @pDeviceRenderAreas@+-- /must/ be less than or equal to+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@width@ the+-- @framebuffer@ was created with+--+-- - If the @pNext@ chain contains+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo',+-- @offset.y@ + @offset.height@ of each element of @pDeviceRenderAreas@+-- /must/ be less than or equal to+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@height@ the+-- @framebuffer@ was created with+--+-- - If @framebuffer@ was created with a+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@flags@ value+-- that did not include+-- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',+-- and the @pNext@ chain includes a+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'+-- structure, its @attachmentCount@ /must/ be zero+--+-- - If @framebuffer@ was created with a+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@flags@ value+-- that included+-- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',+-- the @attachmentCount@ of a+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'+-- structure included in the @pNext@ chain /must/ be equal to the value+-- of+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@attachmentImageInfoCount@+-- used to create @framebuffer@+--+-- - If @framebuffer@ was created with a+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@flags@ value+-- that included+-- 'Graphics.Vulkan.Extensions.VK_KHR_imageless_framebuffer.FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR',+-- each element of the @pAttachments@ member of a+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'+-- structure included in the @pNext@ chain /must/ have been created on+-- the same 'Graphics.Vulkan.Core10.Handles.Device' as @framebuffer@+-- and @renderPass@+--+-- - If @framebuffer@ was created with a+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@flags@ value+-- that included+-- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',+-- each element of the @pAttachments@ member of a+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'+-- structure included in the @pNext@ chain /must/ be a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with+-- a value of 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@+-- equal to the @flags@ member of the corresponding element of+-- 'Graphics.Vulkan.Extensions.VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfoKHR'::@pAttachments@+-- used to create @framebuffer@+--+-- - If @framebuffer@ was created with a+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@flags@ value+-- that included+-- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',+-- each element of the @pAttachments@ member of a+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'+-- structure included in the @pNext@ chain /must/ be a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with+-- a value of 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@usage@+-- equal to the @usage@ member of the corresponding element of+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@pAttachments@+-- used to create @framebuffer@+--+-- - If @framebuffer@ was created with a+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@flags@ value+-- that included+-- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',+-- each element of the @pAttachments@ member of a+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'+-- structure included in the @pNext@ chain /must/ be a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' with a width equal to the+-- @width@ member of the corresponding element of+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@pAttachments@+-- used to create @framebuffer@+--+-- - If @framebuffer@ was created with a+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@flags@ value+-- that included+-- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',+-- each element of the @pAttachments@ member of a+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'+-- structure included in the @pNext@ chain /must/ be a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' with a height equal to+-- the @height@ member of the corresponding element of+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@pAttachments@+-- used to create @framebuffer@+--+-- - If @framebuffer@ was created with a+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@flags@ value+-- that included+-- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',+-- each element of the @pAttachments@ member of a+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'+-- structure included in the @pNext@ chain /must/ be a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with+-- a value of+-- 'Graphics.Vulkan.Core10.ImageView.ImageViewCreateInfo'::@subresourceRange.layerCount@+-- equal to the @layerCount@ member of the corresponding element of+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@pAttachments@+-- used to create @framebuffer@+--+-- - If @framebuffer@ was created with a+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@flags@ value+-- that included+-- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',+-- each element of the @pAttachments@ member of a+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'+-- structure included in the @pNext@ chain /must/ be a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with+-- a value of+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'::@viewFormatCount@+-- equal to the @viewFormatCount@ member of the corresponding element+-- of+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@pAttachments@+-- used to create @framebuffer@+--+-- - If @framebuffer@ was created with a+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@flags@ value+-- that included+-- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',+-- each element of the @pAttachments@ member of a+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'+-- structure included in the @pNext@ chain /must/ be a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with+-- a set of elements in+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'::@pViewFormats@+-- equal to the set of elements in the @pViewFormats@ member of the+-- corresponding element of+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo'::@pAttachments@+-- used to create @framebuffer@+--+-- - If @framebuffer@ was created with a+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@flags@ value+-- that included+-- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',+-- each element of the @pAttachments@ member of a+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'+-- structure included in the @pNext@ chain /must/ be a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with+-- a value of+-- 'Graphics.Vulkan.Core10.ImageView.ImageViewCreateInfo'::@format@+-- equal to the corresponding value of+-- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription'::@format@ in+-- @renderPass@+--+-- - If @framebuffer@ was created with a+-- 'Graphics.Vulkan.Core10.Pass.FramebufferCreateInfo'::@flags@ value+-- that included+-- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT',+-- each element of the @pAttachments@ member of a+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo'+-- structure included in the @pNext@ chain /must/ be a+-- 'Graphics.Vulkan.Core10.Handles.ImageView' of an image created with+-- a value of 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@samples@+-- equal to the corresponding value of+-- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription'::@samples@ in+-- @renderPass@+--+-- - If the @pNext@ chain includes+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM',+-- @renderArea@::@offset@ /must/ equal (0,0).+--+-- - If the @pNext@ chain includes+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM',+-- @renderArea@::@extent@ transformed by+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'::@transform@+-- /must/ equal the @framebuffer@ dimensions.+--+-- == Valid Usage (Implicit)+--+-- - @sType@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO'+--+-- - Each @pNext@ member of any structure (including this one) in the+-- @pNext@ chain /must/ be either @NULL@ or a pointer to a valid+-- instance of+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.DeviceGroupRenderPassBeginInfo',+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.RenderPassAttachmentBeginInfo',+-- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.RenderPassSampleLocationsBeginInfoEXT',+-- or+-- 'Graphics.Vulkan.Extensions.VK_QCOM_render_pass_transform.RenderPassTransformBeginInfoQCOM'+--+-- - The @sType@ value of each struct in the @pNext@ chain /must/ be+-- unique+--+-- - @renderPass@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.RenderPass' handle+--+-- - @framebuffer@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.Framebuffer' handle+--+-- - If @clearValueCount@ is not @0@, @pClearValues@ /must/ be a valid+-- pointer to an array of @clearValueCount@+-- 'Graphics.Vulkan.Core10.SharedTypes.ClearValue' unions+--+-- - Both of @framebuffer@, and @renderPass@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device'+--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.SharedTypes.ClearValue',+-- 'Graphics.Vulkan.Core10.Handles.Framebuffer', 'Rect2D',+-- 'Graphics.Vulkan.Core10.Handles.RenderPass',+-- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType',+-- 'cmdBeginRenderPass',+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.cmdBeginRenderPass2',+-- 'Graphics.Vulkan.Extensions.VK_KHR_create_renderpass2.cmdBeginRenderPass2KHR'+data RenderPassBeginInfo (es :: [Type]) = RenderPassBeginInfo+ { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure.+ next :: Chain es+ , -- | @renderPass@ is the render pass to begin an instance of.+ renderPass :: RenderPass+ , -- | @framebuffer@ is the framebuffer containing the attachments that are+ -- used with the render pass.+ framebuffer :: Framebuffer+ , -- | @renderArea@ is the render area that is affected by the render pass+ -- instance, and is described in more detail below.+ renderArea :: Rect2D+ , -- | @pClearValues@ is a pointer to an array of @clearValueCount@+ -- 'Graphics.Vulkan.Core10.SharedTypes.ClearValue' structures that contains+ -- clear values for each attachment, if the attachment uses a @loadOp@+ -- value of+ -- 'Graphics.Vulkan.Core10.Enums.AttachmentLoadOp.ATTACHMENT_LOAD_OP_CLEAR'+ -- or if the attachment has a depth\/stencil format and uses a+ -- @stencilLoadOp@ value of+ -- 'Graphics.Vulkan.Core10.Enums.AttachmentLoadOp.ATTACHMENT_LOAD_OP_CLEAR'.+ -- The array is indexed by attachment number. Only elements corresponding+ -- to cleared attachments are used. Other elements of @pClearValues@ are+ -- ignored.+ clearValues :: Vector ClearValue+ }+ deriving (Typeable)+deriving instance Show (Chain es) => Show (RenderPassBeginInfo es)++instance Extensible RenderPassBeginInfo where+ extensibleType = STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO+ setNext x next = x{next = next}+ getNext RenderPassBeginInfo{..} = next+ extends :: forall e b proxy. Typeable e => proxy e -> (Extends RenderPassBeginInfo e => b) -> Maybe b+ extends _ f+ | Just Refl <- eqT @e @RenderPassTransformBeginInfoQCOM = Just f+ | Just Refl <- eqT @e @RenderPassAttachmentBeginInfo = Just f+ | Just Refl <- eqT @e @RenderPassSampleLocationsBeginInfoEXT = Just f+ | Just Refl <- eqT @e @DeviceGroupRenderPassBeginInfo = Just f+ | otherwise = Nothing++instance PokeChain es => ToCStruct (RenderPassBeginInfo es) where+ withCStruct x f = allocaBytesAligned 64 8 $ \p -> pokeCStruct p x (f p)+ pokeCStruct p RenderPassBeginInfo{..} f = evalContT $ do+ lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO)+ pNext'' <- fmap castPtr . ContT $ withChain (next)+ lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext''+ lift $ poke ((p `plusPtr` 16 :: Ptr RenderPass)) (renderPass)+ lift $ poke ((p `plusPtr` 24 :: Ptr Framebuffer)) (framebuffer)+ ContT $ pokeCStruct ((p `plusPtr` 32 :: Ptr Rect2D)) (renderArea) . ($ ())+ lift $ poke ((p `plusPtr` 48 :: Ptr Word32)) ((fromIntegral (Data.Vector.length $ (clearValues)) :: Word32))+ pPClearValues' <- ContT $ allocaBytesAligned @ClearValue ((Data.Vector.length (clearValues)) * 16) 4+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPClearValues' `plusPtr` (16 * (i)) :: Ptr ClearValue) (e) . ($ ())) (clearValues)+ lift $ poke ((p `plusPtr` 56 :: Ptr (Ptr ClearValue))) (pPClearValues')+ lift $ f+ cStructSize = 64+ cStructAlignment = 8+ pokeZeroCStruct p f = evalContT $ do+ lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO)+ pNext' <- fmap castPtr . ContT $ withZeroChain @es+ lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext'+ lift $ poke ((p `plusPtr` 16 :: Ptr RenderPass)) (zero)+ lift $ poke ((p `plusPtr` 24 :: Ptr Framebuffer)) (zero)+ ContT $ pokeCStruct ((p `plusPtr` 32 :: Ptr Rect2D)) (zero) . ($ ())+ pPClearValues' <- ContT $ allocaBytesAligned @ClearValue ((Data.Vector.length (mempty)) * 16) 4+ Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPClearValues' `plusPtr` (16 * (i)) :: Ptr ClearValue) (e) . ($ ())) (mempty)+ lift $ poke ((p `plusPtr` 56 :: Ptr (Ptr ClearValue))) (pPClearValues')+ lift $ f++instance es ~ '[] => Zero (RenderPassBeginInfo es) where+ zero = RenderPassBeginInfo+ ()+ zero+ zero+ zero+ mempty+++-- | VkClearAttachment - Structure specifying a clear attachment+--+-- = Description+--+-- No memory barriers are needed between 'cmdClearAttachments' and+-- preceding or subsequent draw or attachment clear commands in the same+-- subpass.+--+-- The 'cmdClearAttachments' command is not affected by the bound pipeline+-- state.+--+-- Attachments /can/ also be cleared at the beginning of a render pass+-- instance by setting @loadOp@ (or @stencilLoadOp@) of+-- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' to+-- 'Graphics.Vulkan.Core10.Enums.AttachmentLoadOp.ATTACHMENT_LOAD_OP_CLEAR',+-- as described for 'Graphics.Vulkan.Core10.Pass.createRenderPass'.+--+-- == Valid Usage+--+-- - If @aspectMask@ includes+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT',+-- it /must/ not include+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_DEPTH_BIT'+-- or+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT'+--+-- - @aspectMask@ /must/ not include+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_METADATA_BIT'+--+-- - @aspectMask@ /must/ not include+-- @VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT@ for any index @i@.+--+-- - @clearValue@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.SharedTypes.ClearValue' union+--+-- == Valid Usage (Implicit)+--+-- - @aspectMask@ /must/ be a valid combination of+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.ImageAspectFlagBits'+-- values+--+-- - @aspectMask@ /must/ not be @0@+--+-- = See Also+--+-- 'Graphics.Vulkan.Core10.SharedTypes.ClearValue',+-- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.ImageAspectFlags',+-- 'cmdClearAttachments'+data ClearAttachment = ClearAttachment+ { -- | @aspectMask@ is a mask selecting the color, depth and\/or stencil+ -- aspects of the attachment to be cleared.+ aspectMask :: ImageAspectFlags+ , -- | @colorAttachment@ is only meaningful if+ -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT'+ -- is set in @aspectMask@, in which case it is an index to the+ -- @pColorAttachments@ array in the+ -- 'Graphics.Vulkan.Core10.Pass.SubpassDescription' structure of the+ -- current subpass which selects the color attachment to clear.+ colorAttachment :: Word32+ , -- | @clearValue@ is the color or depth\/stencil value to clear the+ -- attachment to, as described in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#clears-values Clear Values> -- below. clearValue :: ClearValue
src/Graphics/Vulkan/Core10/CommandPool.hs view
@@ -7,6 +7,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -16,6 +17,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -31,9 +33,8 @@ import Graphics.Vulkan.Core10.Handles (CommandPool) import Graphics.Vulkan.Core10.Handles (CommandPool(..)) import Graphics.Vulkan.Core10.Enums.CommandPoolCreateFlagBits (CommandPoolCreateFlags)-import Graphics.Vulkan.Core10.Enums.CommandPoolResetFlagBits (CommandPoolResetFlags)-import Graphics.Vulkan.Core10.Enums.CommandPoolResetFlagBits (CommandPoolResetFlags) import Graphics.Vulkan.Core10.Enums.CommandPoolResetFlagBits (CommandPoolResetFlagBits(..))+import Graphics.Vulkan.Core10.Enums.CommandPoolResetFlagBits (CommandPoolResetFlags) import Graphics.Vulkan.Core10.Handles (Device) import Graphics.Vulkan.Core10.Handles (Device(..)) import Graphics.Vulkan.Dynamic (DeviceCmds(pVkCreateCommandPool))@@ -62,8 +63,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the command pool.+-- - @device@ is the logical device that creates the command pool. -- -- - @pCreateInfo@ is a pointer to a 'CommandPoolCreateInfo' structure -- specifying the state of the command pool object.@@ -79,13 +79,12 @@ -- == Valid Usage -- -- - @pCreateInfo->queueFamilyIndex@ /must/ be the index of a queue--- family available in the logical device--- 'Graphics.Vulkan.Core10.Handles.Device'.+-- family available in the logical device @device@. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'CommandPoolCreateInfo' structure@@ -115,8 +114,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.CommandPool', 'CommandPoolCreateInfo', -- 'Graphics.Vulkan.Core10.Handles.Device'-createCommandPool :: Device -> CommandPoolCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (CommandPool)-createCommandPool device createInfo allocator = evalContT $ do+createCommandPool :: forall io . MonadIO io => Device -> CommandPoolCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io (CommandPool)+createCommandPool device createInfo allocator = liftIO . evalContT $ do let vkCreateCommandPool' = mkVkCreateCommandPool (pVkCreateCommandPool (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -132,11 +131,11 @@ -- 'bracket' -- -- The allocated value must not be returned from the provided computation-withCommandPool :: Device -> CommandPoolCreateInfo -> Maybe AllocationCallbacks -> (CommandPool -> IO r) -> IO r-withCommandPool device commandPoolCreateInfo allocationCallbacks =+withCommandPool :: forall r . Device -> CommandPoolCreateInfo -> Maybe AllocationCallbacks -> ((CommandPool) -> IO r) -> IO r+withCommandPool device pCreateInfo pAllocator = bracket- (createCommandPool device commandPoolCreateInfo allocationCallbacks)- (\o -> destroyCommandPool device o allocationCallbacks)+ (createCommandPool device pCreateInfo pAllocator)+ (\(o0) -> destroyCommandPool device o0 pAllocator) foreign import ccall@@ -150,11 +149,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the command pool.+-- - @device@ is the logical device that destroys the command pool. ----- - 'Graphics.Vulkan.Core10.Handles.CommandPool' is the handle of the--- command pool to destroy.+-- - @commandPool@ is the handle of the command pool to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -169,57 +166,54 @@ -- Any primary command buffer allocated from another -- 'Graphics.Vulkan.Core10.Handles.CommandPool' that is in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording or executable state>--- and has a secondary command buffer allocated from--- 'Graphics.Vulkan.Core10.Handles.CommandPool' recorded into it, becomes+-- and has a secondary command buffer allocated from @commandPool@ recorded+-- into it, becomes -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle invalid>. -- -- == Valid Usage -- -- - All 'Graphics.Vulkan.Core10.Handles.CommandBuffer' objects allocated--- from 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/ not be in--- the+-- from @commandPool@ /must/ not be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle pending state>. -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.CommandPool' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @commandPool@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.CommandPool' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @commandPool@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.CommandPool' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.CommandPool' handle+-- - If @commandPool@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @commandPool@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.CommandPool'+-- handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.CommandPool' is a valid handle,--- it /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @commandPool@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/--- be externally synchronized+-- - Host access to @commandPool@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.CommandPool', -- 'Graphics.Vulkan.Core10.Handles.Device'-destroyCommandPool :: Device -> CommandPool -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyCommandPool device commandPool allocator = evalContT $ do+destroyCommandPool :: forall io . MonadIO io => Device -> CommandPool -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyCommandPool device commandPool allocator = liftIO . evalContT $ do let vkDestroyCommandPool' = mkVkDestroyCommandPool (pVkDestroyCommandPool (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -239,13 +233,11 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the command pool.+-- - @device@ is the logical device that owns the command pool. ----- - 'Graphics.Vulkan.Core10.Handles.CommandPool' is the command pool to--- reset.+-- - @commandPool@ is the command pool to reset. ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+-- - @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.CommandPoolResetFlagBits.CommandPoolResetFlagBits' -- controlling the reset operation. --@@ -260,38 +252,34 @@ -- Any primary command buffer allocated from another -- 'Graphics.Vulkan.Core10.Handles.CommandPool' that is in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording or executable state>--- and has a secondary command buffer allocated from--- 'Graphics.Vulkan.Core10.Handles.CommandPool' recorded into it, becomes+-- and has a secondary command buffer allocated from @commandPool@ recorded+-- into it, becomes -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle invalid>. -- -- == Valid Usage -- -- - All 'Graphics.Vulkan.Core10.Handles.CommandBuffer' objects allocated--- from 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/ not be in--- the+-- from @commandPool@ /must/ not be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle pending state> -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/ be a valid+-- - @commandPool@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandPool' handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.CommandPoolResetFlagBits.CommandPoolResetFlagBits' -- values ----- - 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/ have been--- created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - @commandPool@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/--- be externally synchronized+-- - Host access to @commandPool@ /must/ be externally synchronized -- -- == Return Codes --@@ -310,8 +298,8 @@ -- 'Graphics.Vulkan.Core10.Handles.CommandPool', -- 'Graphics.Vulkan.Core10.Enums.CommandPoolResetFlagBits.CommandPoolResetFlags', -- 'Graphics.Vulkan.Core10.Handles.Device'-resetCommandPool :: Device -> CommandPool -> CommandPoolResetFlags -> IO ()-resetCommandPool device commandPool flags = do+resetCommandPool :: forall io . MonadIO io => Device -> CommandPool -> CommandPoolResetFlags -> io ()+resetCommandPool device commandPool flags = liftIO $ do let vkResetCommandPool' = mkVkResetCommandPool (pVkResetCommandPool (deviceCmds (device :: Device))) r <- vkResetCommandPool' (deviceHandle (device)) (commandPool) (flags) when (r < SUCCESS) (throwIO (VulkanException r))@@ -324,7 +312,7 @@ -- -- - If the protected memory feature is not enabled, the -- 'Graphics.Vulkan.Core10.Enums.CommandPoolCreateFlagBits.COMMAND_POOL_CREATE_PROTECTED_BIT'--- bit of 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not be set.+-- bit of @flags@ /must/ not be set. -- -- == Valid Usage (Implicit) --@@ -333,8 +321,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.CommandPoolCreateFlagBits.CommandPoolCreateFlagBits' -- values --@@ -344,7 +331,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createCommandPool' data CommandPoolCreateInfo = CommandPoolCreateInfo- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ { -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.CommandPoolCreateFlagBits.CommandPoolCreateFlagBits' -- indicating usage behavior for the pool and command buffers allocated -- from it.
src/Graphics/Vulkan/Core10/DescriptorSet.hs view
@@ -23,6 +23,7 @@ import Control.Exception.Base (bracket) import Control.Monad (unless)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -38,6 +39,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Either (Either) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable)@@ -123,8 +125,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the descriptor set layout.+-- - @device@ is the logical device that creates the descriptor set+-- layout. -- -- - @pCreateInfo@ is a pointer to a 'DescriptorSetLayoutCreateInfo' -- structure specifying the state of the descriptor set layout object.@@ -139,8 +141,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'DescriptorSetLayoutCreateInfo' structure@@ -170,8 +172,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout', -- 'DescriptorSetLayoutCreateInfo', 'Graphics.Vulkan.Core10.Handles.Device'-createDescriptorSetLayout :: PokeChain a => Device -> DescriptorSetLayoutCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (DescriptorSetLayout)-createDescriptorSetLayout device createInfo allocator = evalContT $ do+createDescriptorSetLayout :: forall a io . (PokeChain a, MonadIO io) => Device -> DescriptorSetLayoutCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (DescriptorSetLayout)+createDescriptorSetLayout device createInfo allocator = liftIO . evalContT $ do let vkCreateDescriptorSetLayout' = mkVkCreateDescriptorSetLayout (pVkCreateDescriptorSetLayout (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -187,11 +189,11 @@ -- 'destroyDescriptorSetLayout' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withDescriptorSetLayout :: PokeChain a => Device -> DescriptorSetLayoutCreateInfo a -> Maybe AllocationCallbacks -> (DescriptorSetLayout -> IO r) -> IO r-withDescriptorSetLayout device descriptorSetLayoutCreateInfo allocationCallbacks =+withDescriptorSetLayout :: forall a r . PokeChain a => Device -> DescriptorSetLayoutCreateInfo a -> Maybe AllocationCallbacks -> ((DescriptorSetLayout) -> IO r) -> IO r+withDescriptorSetLayout device pCreateInfo pAllocator = bracket- (createDescriptorSetLayout device descriptorSetLayoutCreateInfo allocationCallbacks)- (\o -> destroyDescriptorSetLayout device o allocationCallbacks)+ (createDescriptorSetLayout device pCreateInfo pAllocator)+ (\(o0) -> destroyDescriptorSetLayout device o0 pAllocator) foreign import ccall@@ -205,11 +207,10 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the descriptor set layout.+-- - @device@ is the logical device that destroys the descriptor set+-- layout. ----- - 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' is the--- descriptor set layout to destroy.+-- - @descriptorSetLayout@ is the descriptor set layout to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -218,47 +219,44 @@ -- == Valid Usage -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when--- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' was created, a--- compatible set of callbacks /must/ be provided here+-- were provided when @descriptorSetLayout@ was created, a compatible+-- set of callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when--- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' was created,--- @pAllocator@ /must/ be @NULL@+-- were provided when @descriptorSetLayout@ was created, @pAllocator@+-- /must/ be @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' is not+-- - If @descriptorSetLayout@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' /must/ be a--- valid 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' handle+-- @descriptorSetLayout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' is a valid--- handle, it /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @descriptorSetLayout@ is a valid handle, it /must/ have been+-- created, allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout'--- /must/ be externally synchronized+-- - Host access to @descriptorSetLayout@ /must/ be externally+-- synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout', -- 'Graphics.Vulkan.Core10.Handles.Device'-destroyDescriptorSetLayout :: Device -> DescriptorSetLayout -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyDescriptorSetLayout device descriptorSetLayout allocator = evalContT $ do+destroyDescriptorSetLayout :: forall io . MonadIO io => Device -> DescriptorSetLayout -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyDescriptorSetLayout device descriptorSetLayout allocator = liftIO . evalContT $ do let vkDestroyDescriptorSetLayout' = mkVkDestroyDescriptorSetLayout (pVkDestroyDescriptorSetLayout (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -278,8 +276,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the descriptor pool.+-- - @device@ is the logical device that creates the descriptor pool. -- -- - @pCreateInfo@ is a pointer to a 'DescriptorPoolCreateInfo' structure -- specifying the state of the descriptor pool object.@@ -302,8 +299,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'DescriptorPoolCreateInfo' structure@@ -335,8 +332,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.DescriptorPool', -- 'DescriptorPoolCreateInfo', 'Graphics.Vulkan.Core10.Handles.Device'-createDescriptorPool :: PokeChain a => Device -> DescriptorPoolCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (DescriptorPool)-createDescriptorPool device createInfo allocator = evalContT $ do+createDescriptorPool :: forall a io . (PokeChain a, MonadIO io) => Device -> DescriptorPoolCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (DescriptorPool)+createDescriptorPool device createInfo allocator = liftIO . evalContT $ do let vkCreateDescriptorPool' = mkVkCreateDescriptorPool (pVkCreateDescriptorPool (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -352,11 +349,11 @@ -- using 'bracket' -- -- The allocated value must not be returned from the provided computation-withDescriptorPool :: PokeChain a => Device -> DescriptorPoolCreateInfo a -> Maybe AllocationCallbacks -> (DescriptorPool -> IO r) -> IO r-withDescriptorPool device descriptorPoolCreateInfo allocationCallbacks =+withDescriptorPool :: forall a r . PokeChain a => Device -> DescriptorPoolCreateInfo a -> Maybe AllocationCallbacks -> ((DescriptorPool) -> IO r) -> IO r+withDescriptorPool device pCreateInfo pAllocator = bracket- (createDescriptorPool device descriptorPoolCreateInfo allocationCallbacks)- (\o -> destroyDescriptorPool device o allocationCallbacks)+ (createDescriptorPool device pCreateInfo pAllocator)+ (\(o0) -> destroyDescriptorPool device o0 pAllocator) foreign import ccall@@ -370,11 +367,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the descriptor pool.+-- - @device@ is the logical device that destroys the descriptor pool. ----- - 'Graphics.Vulkan.Core10.Handles.DescriptorPool' is the descriptor--- pool to destroy.+-- - @descriptorPool@ is the descriptor pool to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -389,50 +384,47 @@ -- -- == Valid Usage ----- - All submitted commands that refer to--- 'Graphics.Vulkan.Core10.Handles.DescriptorPool' (via any allocated--- descriptor sets) /must/ have completed execution+-- - All submitted commands that refer to @descriptorPool@ (via any+-- allocated descriptor sets) /must/ have completed execution -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.DescriptorPool'--- was created, a compatible set of callbacks /must/ be provided here+-- were provided when @descriptorPool@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.DescriptorPool'--- was created, @pAllocator@ /must/ be @NULL@+-- were provided when @descriptorPool@ was created, @pAllocator@ /must/+-- be @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.DescriptorPool' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.DescriptorPool' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.DescriptorPool' handle+-- - If @descriptorPool@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @descriptorPool@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.DescriptorPool'+-- handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.DescriptorPool' is a valid--- handle, it /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @descriptorPool@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.DescriptorPool'--- /must/ be externally synchronized+-- - Host access to @descriptorPool@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.DescriptorPool', -- 'Graphics.Vulkan.Core10.Handles.Device'-destroyDescriptorPool :: Device -> DescriptorPool -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyDescriptorPool device descriptorPool allocator = evalContT $ do+destroyDescriptorPool :: forall io . MonadIO io => Device -> DescriptorPool -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyDescriptorPool device descriptorPool allocator = liftIO . evalContT $ do let vkDestroyDescriptorPool' = mkVkDestroyDescriptorPool (pVkDestroyDescriptorPool (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -452,13 +444,11 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the descriptor pool.+-- - @device@ is the logical device that owns the descriptor pool. ----- - 'Graphics.Vulkan.Core10.Handles.DescriptorPool' is the descriptor--- pool to be reset.+-- - @descriptorPool@ is the descriptor pool to be reset. ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+-- - @flags@ is reserved for future use. -- -- = Description --@@ -468,31 +458,28 @@ -- -- == Valid Usage ----- - All uses of 'Graphics.Vulkan.Core10.Handles.DescriptorPool' (via any--- allocated descriptor sets) /must/ have completed execution+-- - All uses of @descriptorPool@ (via any allocated descriptor sets)+-- /must/ have completed execution -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.DescriptorPool' /must/ be a valid+-- - @descriptorPool@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.DescriptorPool' handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ ----- - 'Graphics.Vulkan.Core10.Handles.DescriptorPool' /must/ have been--- created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - @descriptorPool@ /must/ have been created, allocated, or retrieved+-- from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.DescriptorPool'--- /must/ be externally synchronized+-- - Host access to @descriptorPool@ /must/ be externally synchronized -- -- - Host access to any 'Graphics.Vulkan.Core10.Handles.DescriptorSet'--- objects allocated from--- 'Graphics.Vulkan.Core10.Handles.DescriptorPool' /must/ be externally+-- objects allocated from @descriptorPool@ /must/ be externally -- synchronized -- -- == Return Codes@@ -506,8 +493,8 @@ -- 'Graphics.Vulkan.Core10.Handles.DescriptorPool', -- 'Graphics.Vulkan.Core10.Enums.DescriptorPoolResetFlags.DescriptorPoolResetFlags', -- 'Graphics.Vulkan.Core10.Handles.Device'-resetDescriptorPool :: Device -> DescriptorPool -> DescriptorPoolResetFlags -> IO ()-resetDescriptorPool device descriptorPool flags = do+resetDescriptorPool :: forall io . MonadIO io => Device -> DescriptorPool -> DescriptorPoolResetFlags -> io ()+resetDescriptorPool device descriptorPool flags = liftIO $ do let vkResetDescriptorPool' = mkVkResetDescriptorPool (pVkResetDescriptorPool (deviceCmds (device :: Device))) _ <- vkResetDescriptorPool' (deviceHandle (device)) (descriptorPool) (flags) pure $ ()@@ -524,8 +511,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the descriptor pool.+-- - @device@ is the logical device that owns the descriptor pool. -- -- - @pAllocateInfo@ is a pointer to a 'DescriptorSetAllocateInfo' -- structure describing parameters of the allocation.@@ -596,8 +582,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pAllocateInfo@ /must/ be a valid pointer to a valid -- 'DescriptorSetAllocateInfo' structure@@ -634,8 +620,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.DescriptorSet', -- 'DescriptorSetAllocateInfo', 'Graphics.Vulkan.Core10.Handles.Device'-allocateDescriptorSets :: PokeChain a => Device -> DescriptorSetAllocateInfo a -> IO (("descriptorSets" ::: Vector DescriptorSet))-allocateDescriptorSets device allocateInfo = evalContT $ do+allocateDescriptorSets :: forall a io . (PokeChain a, MonadIO io) => Device -> DescriptorSetAllocateInfo a -> io (("descriptorSets" ::: Vector DescriptorSet))+allocateDescriptorSets device allocateInfo = liftIO . evalContT $ do let vkAllocateDescriptorSets' = mkVkAllocateDescriptorSets (pVkAllocateDescriptorSets (deviceCmds (device :: Device))) pAllocateInfo <- ContT $ withCStruct (allocateInfo) pPDescriptorSets <- ContT $ bracket (callocBytes @DescriptorSet ((fromIntegral . Data.Vector.length . setLayouts $ (allocateInfo)) * 8)) free@@ -648,11 +634,11 @@ -- using 'bracket' -- -- The allocated value must not be returned from the provided computation-withDescriptorSets :: PokeChain a => Device -> DescriptorSetAllocateInfo a -> (Vector DescriptorSet -> IO r) -> IO r-withDescriptorSets device descriptorSetAllocateInfo =+withDescriptorSets :: forall a r . PokeChain a => Device -> DescriptorSetAllocateInfo a -> DescriptorPool -> ((Vector DescriptorSet) -> IO r) -> IO r+withDescriptorSets device pAllocateInfo descriptorPool = bracket- (allocateDescriptorSets device descriptorSetAllocateInfo)- (\o -> freeDescriptorSets device (descriptorPool (descriptorSetAllocateInfo :: DescriptorSetAllocateInfo _)) o)+ (allocateDescriptorSets device pAllocateInfo)+ (\(o0) -> freeDescriptorSets device descriptorPool o0) foreign import ccall@@ -666,11 +652,10 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the descriptor pool.+-- - @device@ is the logical device that owns the descriptor pool. ----- - 'Graphics.Vulkan.Core10.Handles.DescriptorPool' is the descriptor--- pool from which the descriptor sets were allocated.+-- - @descriptorPool@ is the descriptor pool from which the descriptor+-- sets were allocated. -- -- - @descriptorSetCount@ is the number of elements in the -- @pDescriptorSets@ array.@@ -694,35 +679,31 @@ -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' -- -- - Each valid handle in @pDescriptorSets@ /must/ have been allocated--- from 'Graphics.Vulkan.Core10.Handles.DescriptorPool'+-- from @descriptorPool@ ----- - 'Graphics.Vulkan.Core10.Handles.DescriptorPool' /must/ have been--- created with the+-- - @descriptorPool@ /must/ have been created with the -- 'Graphics.Vulkan.Core10.Enums.DescriptorPoolCreateFlagBits.DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT' -- flag -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.DescriptorPool' /must/ be a valid+-- - @descriptorPool@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.DescriptorPool' handle -- -- - @descriptorSetCount@ /must/ be greater than @0@ ----- - 'Graphics.Vulkan.Core10.Handles.DescriptorPool' /must/ have been--- created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - @descriptorPool@ /must/ have been created, allocated, or retrieved+-- from @device@ -- -- - Each element of @pDescriptorSets@ that is a valid handle /must/ have--- been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.DescriptorPool'+-- been created, allocated, or retrieved from @descriptorPool@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.DescriptorPool'--- /must/ be externally synchronized+-- - Host access to @descriptorPool@ /must/ be externally synchronized -- -- - Host access to each member of @pDescriptorSets@ /must/ be externally -- synchronized@@ -738,8 +719,8 @@ -- 'Graphics.Vulkan.Core10.Handles.DescriptorPool', -- 'Graphics.Vulkan.Core10.Handles.DescriptorSet', -- 'Graphics.Vulkan.Core10.Handles.Device'-freeDescriptorSets :: Device -> DescriptorPool -> ("descriptorSets" ::: Vector DescriptorSet) -> IO ()-freeDescriptorSets device descriptorPool descriptorSets = evalContT $ do+freeDescriptorSets :: forall io . MonadIO io => Device -> DescriptorPool -> ("descriptorSets" ::: Vector DescriptorSet) -> io ()+freeDescriptorSets device descriptorPool descriptorSets = liftIO . evalContT $ do let vkFreeDescriptorSets' = mkVkFreeDescriptorSets (pVkFreeDescriptorSets (deviceCmds (device :: Device))) pPDescriptorSets <- ContT $ allocaBytesAligned @DescriptorSet ((Data.Vector.length (descriptorSets)) * 8) 8 lift $ Data.Vector.imapM_ (\i e -> poke (pPDescriptorSets `plusPtr` (8 * (i)) :: Ptr DescriptorSet) (e)) (descriptorSets)@@ -758,8 +739,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- updates the descriptor sets.+-- - @device@ is the logical device that updates the descriptor sets. -- -- - @descriptorWriteCount@ is the number of elements in the -- @pDescriptorWrites@ array.@@ -812,8 +792,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - If @descriptorWriteCount@ is not @0@, @pDescriptorWrites@ /must/ be -- a valid pointer to an array of @descriptorWriteCount@ valid@@ -835,8 +815,8 @@ -- -- 'CopyDescriptorSet', 'Graphics.Vulkan.Core10.Handles.Device', -- 'WriteDescriptorSet'-updateDescriptorSets :: PokeChain a => Device -> ("descriptorWrites" ::: Vector (WriteDescriptorSet a)) -> ("descriptorCopies" ::: Vector CopyDescriptorSet) -> IO ()-updateDescriptorSets device descriptorWrites descriptorCopies = evalContT $ do+updateDescriptorSets :: forall a io . (PokeChain a, MonadIO io) => Device -> ("descriptorWrites" ::: Vector (WriteDescriptorSet a)) -> ("descriptorCopies" ::: Vector CopyDescriptorSet) -> io ()+updateDescriptorSets device descriptorWrites descriptorCopies = liftIO . evalContT $ do let vkUpdateDescriptorSets' = mkVkUpdateDescriptorSets (pVkUpdateDescriptorSets (deviceCmds (device :: Device))) pPDescriptorWrites <- ContT $ allocaBytesAligned @(WriteDescriptorSet _) ((Data.Vector.length (descriptorWrites)) * 64) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPDescriptorWrites `plusPtr` (64 * (i)) :: Ptr (WriteDescriptorSet _)) (e) . ($ ())) (descriptorWrites)@@ -873,8 +853,7 @@ -- -- == Valid Usage ----- - @offset@ /must/ be less than the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'+-- - @offset@ /must/ be less than the size of @buffer@ -- -- - If @range@ is not equal to -- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', @range@ /must/ be@@ -882,25 +861,23 @@ -- -- - If @range@ is not equal to -- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', @range@ /must/ be--- less than or equal to the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer' minus @offset@+-- less than or equal to the size of @buffer@ minus @offset@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle -- -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize', 'WriteDescriptorSet' data DescriptorBufferInfo = DescriptorBufferInfo- { -- | 'Graphics.Vulkan.Core10.Handles.Buffer' is the buffer resource.+ { -- | @buffer@ is the buffer resource. buffer :: Buffer- , -- | @offset@ is the offset in bytes from the start of- -- 'Graphics.Vulkan.Core10.Handles.Buffer'. Access to buffer memory via- -- this descriptor uses addressing that is relative to this starting- -- offset.+ , -- | @offset@ is the offset in bytes from the start of @buffer@. Access to+ -- buffer memory via this descriptor uses addressing that is relative to+ -- this starting offset. offset :: DeviceSize , -- | @range@ is the size in bytes that is used for this descriptor update, or -- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE' to use the range from@@ -955,31 +932,28 @@ -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Handles.ImageView' /must/ not be 2D or 2D--- array image view created from a 3D image+-- - @imageView@ /must/ not be 2D or 2D array image view created from a+-- 3D image ----- - If 'Graphics.Vulkan.Core10.Handles.ImageView' is created from a--- depth\/stencil image, the @aspectMask@ used to create the--- 'Graphics.Vulkan.Core10.Handles.ImageView' /must/ include either+-- - If @imageView@ is created from a depth\/stencil image, the+-- @aspectMask@ used to create the @imageView@ /must/ include either -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_DEPTH_BIT' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT' -- but not both. ----- - 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' /must/ match--- the actual 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' of--- each subresource accessible from--- 'Graphics.Vulkan.Core10.Handles.ImageView' at the time this--- descriptor is accessed as defined by the+-- - @imageLayout@ /must/ match the actual+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' of each+-- subresource accessible from @imageView@ at the time this descriptor+-- is accessed as defined by the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-layouts-matching-rule image layout matching rules> ----- - If 'Graphics.Vulkan.Core10.Handles.Sampler' is used and the+-- - If @sampler@ is used and the -- 'Graphics.Vulkan.Core10.Enums.Format.Format' of the image is a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>, -- the image /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT',--- and the @aspectMask@ of the--- 'Graphics.Vulkan.Core10.Handles.ImageView' /must/ be+-- and the @aspectMask@ of the @imageView@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT', -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT' -- or (for three-plane formats only)@@ -987,8 +961,7 @@ -- -- == Valid Usage (Implicit) ----- - Both of 'Graphics.Vulkan.Core10.Handles.ImageView', and--- 'Graphics.Vulkan.Core10.Handles.Sampler' that are valid handles of+-- - Both of @imageView@, and @sampler@ that are valid handles of -- non-ignored parameters /must/ have been created, allocated, or -- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device' --@@ -998,27 +971,24 @@ -- 'Graphics.Vulkan.Core10.Handles.ImageView', -- 'Graphics.Vulkan.Core10.Handles.Sampler', 'WriteDescriptorSet' data DescriptorImageInfo = DescriptorImageInfo- { -- | 'Graphics.Vulkan.Core10.Handles.Sampler' is a sampler handle, and is- -- used in descriptor updates for types+ { -- | @sampler@ is a sampler handle, and is used in descriptor updates for+ -- types -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER' -- and -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER' -- if the binding being updated does not use immutable samplers. sampler :: Sampler- , -- | 'Graphics.Vulkan.Core10.Handles.ImageView' is an image view handle, and- -- is used in descriptor updates for types+ , -- | @imageView@ is an image view handle, and is used in descriptor updates+ -- for types -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER', -- and -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT'. imageView :: ImageView- , -- | 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' is the layout- -- that the image subresources accessible from- -- 'Graphics.Vulkan.Core10.Handles.ImageView' will be in at the time this- -- descriptor is accessed.- -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' is used in- -- descriptor updates for types+ , -- | @imageLayout@ is the layout that the image subresources accessible from+ -- @imageView@ will be in at the time this descriptor is accessed.+ -- @imageLayout@ is used in descriptor updates for types -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',@@ -1072,15 +1042,14 @@ -- -- Only one of @pImageInfo@, @pBufferInfo@, or @pTexelBufferView@ members -- is used according to the descriptor type specified in the--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' member of--- the containing 'WriteDescriptorSet' structure, or none of them in case--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- @descriptorType@ member of the containing 'WriteDescriptorSet'+-- structure, or none of them in case @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT', -- in which case the source data for the descriptor writes is taken from -- the -- 'Graphics.Vulkan.Extensions.VK_EXT_inline_uniform_block.WriteDescriptorSetInlineUniformBlockEXT' -- structure included in the @pNext@ chain of 'WriteDescriptorSet', or if--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV', -- in which case the source data for the descriptor writes is taken from -- the@@ -1117,17 +1086,15 @@ -- -- - All consecutive bindings updated via a single 'WriteDescriptorSet' -- structure, except those with a @descriptorCount@ of zero, /must/--- have identical--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' and--- @stageFlags@.+-- have identical @descriptorType@ and @stageFlags@. -- -- - All consecutive bindings updated via a single 'WriteDescriptorSet' -- structure, except those with a @descriptorCount@ of zero, /must/ all -- either use immutable samplers or /must/ all not use immutable -- samplers. ----- - 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' /must/--- match the type of @dstBinding@ within @dstSet@+-- - @descriptorType@ /must/ match the type of @dstBinding@ within+-- @dstSet@ -- -- - @dstSet@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.DescriptorSet' handle@@ -1138,15 +1105,15 @@ -- bindings, as described by -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-updates-consecutive> ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT', -- @dstArrayElement@ /must/ be an integer multiple of @4@ ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT', -- @descriptorCount@ /must/ be an integer multiple of @4@ ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE',@@ -1156,7 +1123,7 @@ -- @pImageInfo@ /must/ be a valid pointer to an array of -- @descriptorCount@ valid 'DescriptorImageInfo' structures ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER',@@ -1164,7 +1131,7 @@ -- @descriptorCount@ valid 'Graphics.Vulkan.Core10.Handles.BufferView' -- handles ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC',@@ -1173,54 +1140,50 @@ -- @pBufferInfo@ /must/ be a valid pointer to an array of -- @descriptorCount@ valid 'DescriptorBufferInfo' structures ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER', -- and @dstSet@ was not allocated with a layout that included immutable--- samplers for @dstBinding@ with--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType', the--- 'Graphics.Vulkan.Core10.Handles.Sampler' member of each element of--- @pImageInfo@ /must/ be a valid+-- samplers for @dstBinding@ with @descriptorType@, the @sampler@+-- member of each element of @pImageInfo@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Sampler' object ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE', -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT',--- the 'Graphics.Vulkan.Core10.Handles.ImageView' and--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' members of--- each element of @pImageInfo@ /must/ be a valid+-- the @imageView@ and @imageLayout@ members of each element of+-- @pImageInfo@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.ImageView' and -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout', respectively ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT', -- the @pNext@ chain /must/ include a -- 'Graphics.Vulkan.Extensions.VK_EXT_inline_uniform_block.WriteDescriptorSetInlineUniformBlockEXT' -- structure whose @dataSize@ member equals @descriptorCount@ ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV', -- the @pNext@ chain /must/ include a -- 'Graphics.Vulkan.Extensions.VK_NV_ray_tracing.WriteDescriptorSetAccelerationStructureNV' -- structure whose @accelerationStructureCount@ member equals -- @descriptorCount@ ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE',--- then the 'Graphics.Vulkan.Core10.Handles.ImageView' member of each--- @pImageInfo@ element /must/ have been created without a+-- then the @imageView@ member of each @pImageInfo@ element /must/ have+-- been created without a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionInfo' -- structure in its @pNext@ chain ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',--- and if any element of @pImageInfo@ has a--- 'Graphics.Vulkan.Core10.Handles.ImageView' member that was created--- with a+-- and if any element of @pImageInfo@ has a @imageView@ member that was+-- created with a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionInfo' -- structure in its @pNext@ chain, then @dstSet@ /must/ have been -- allocated with a layout that included immutable samplers for@@ -1229,12 +1192,12 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionInfo' -- object ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER', -- and @dstSet@ was allocated with a layout that included immutable--- samplers for @dstBinding@, then the--- 'Graphics.Vulkan.Core10.Handles.ImageView' member of each element of--- @pImageInfo@ which corresponds to an immutable sampler that enables+-- samplers for @dstBinding@, then the @imageView@ member of each+-- element of @pImageInfo@ which corresponds to an immutable sampler+-- that enables -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#samplers-YCbCr-conversion sampler Y′CBCR conversion> -- /must/ have been created with a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionInfo'@@ -1242,15 +1205,14 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionInfo' -- to the corresponding immutable sampler ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE', -- for each descriptor that will be accessed via load or store--- operations the--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' member for--- corresponding elements of @pImageInfo@ /must/ be+-- operations the @imageLayout@ member for corresponding elements of+-- @pImageInfo@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL' ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC',@@ -1258,7 +1220,7 @@ -- multiple of -- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@minUniformBufferOffsetAlignment@ ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC',@@ -1266,36 +1228,36 @@ -- multiple of -- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@minStorageBufferOffsetAlignment@ ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER', -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC',--- and the 'Graphics.Vulkan.Core10.Handles.Buffer' member of any--- element of @pBufferInfo@ is the handle of a non-sparse buffer, then--- that buffer /must/ be bound completely and contiguously to a single+-- and the @buffer@ member of any element of @pBufferInfo@ is the+-- handle of a non-sparse buffer, then that buffer /must/ be bound+-- completely and contiguously to a single -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC',--- the 'Graphics.Vulkan.Core10.Handles.Buffer' member of each element--- of @pBufferInfo@ /must/ have been created with+-- the @buffer@ member of each element of @pBufferInfo@ /must/ have+-- been created with -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_UNIFORM_BUFFER_BIT' -- set ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC',--- the 'Graphics.Vulkan.Core10.Handles.Buffer' member of each element--- of @pBufferInfo@ /must/ have been created with+-- the @buffer@ member of each element of @pBufferInfo@ /must/ have+-- been created with -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_STORAGE_BUFFER_BIT' -- set ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC',@@ -1305,7 +1267,7 @@ -- than or equal to -- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxUniformBufferRange@ ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC',@@ -1315,59 +1277,58 @@ -- than or equal to -- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxStorageBufferRange@ ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER', -- the 'Graphics.Vulkan.Core10.Handles.Buffer' that each element of -- @pTexelBufferView@ was created from /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT' -- set ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER', -- the 'Graphics.Vulkan.Core10.Handles.Buffer' that each element of -- @pTexelBufferView@ was created from /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT' -- set ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT',--- the 'Graphics.Vulkan.Core10.Handles.ImageView' member of each--- element of @pImageInfo@ /must/ have been created with the identity--- swizzle+-- the @imageView@ member of each element of @pImageInfo@ /must/ have+-- been created with the identity swizzle ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',--- the 'Graphics.Vulkan.Core10.Handles.ImageView' member of each--- element of @pImageInfo@ /must/ have been created with+-- the @imageView@ member of each element of @pImageInfo@ /must/ have+-- been created with -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT' -- set ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',--- the 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' member of--- each element of @pImageInfo@ /must/ be a member of the list given in+-- the @imageLayout@ member of each element of @pImageInfo@ /must/ be a+-- member of the list given in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-sampledimage Sampled Image> -- or -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-combinedimagesampler Combined Image Sampler>, -- corresponding to its type ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT',--- the 'Graphics.Vulkan.Core10.Handles.ImageView' member of each--- element of @pImageInfo@ /must/ have been created with+-- the @imageView@ member of each element of @pImageInfo@ /must/ have+-- been created with -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_INPUT_ATTACHMENT_BIT' -- set ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE',--- the 'Graphics.Vulkan.Core10.Handles.ImageView' member of each--- element of @pImageInfo@ /must/ have been created with+-- the @imageView@ member of each element of @pImageInfo@ /must/ have+-- been created with -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_STORAGE_BIT' -- set --@@ -1376,7 +1337,7 @@ -- have identical -- 'Graphics.Vulkan.Core12.Enums.DescriptorBindingFlagBits.DescriptorBindingFlagBits'. ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER', -- then @dstSet@ /must/ not have been allocated with a layout that -- included immutable samplers for @dstBinding@@@ -1396,8 +1357,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' /must/--- be a valid+-- - @descriptorType@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' value -- -- - @descriptorCount@ /must/ be greater than @0@@@ -1429,7 +1389,7 @@ -- then @dstArrayElement@ specifies the starting byte offset within the -- binding. dstArrayElement :: Word32- , -- | 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is a+ , -- | @descriptorType@ is a -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' specifying -- the type of each descriptor in @pImageInfo@, @pBufferInfo@, or -- @pTexelBufferView@, as described below. It /must/ be the same type as@@ -1742,8 +1702,7 @@ -- = Description -- -- - @pImmutableSamplers@ affects initialization of samplers. If--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType'--- specifies a+-- @descriptorType@ specifies a -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'@@ -1763,21 +1722,19 @@ -- set layout and any descriptor pools and sets created using it. If -- @pImmutableSamplers@ is @NULL@, then the sampler slots are dynamic -- and sampler handles /must/ be bound into descriptor sets using this--- layout. If--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is not--- one of these descriptor types, then @pImmutableSamplers@ is ignored.+-- layout. If @descriptorType@ is not one of these descriptor types,+-- then @pImmutableSamplers@ is ignored. -- -- The above layout definition allows the descriptor bindings to be -- specified sparsely such that not all binding numbers between 0 and the -- maximum binding number need to be specified in the @pBindings@ array. -- Bindings that are not specified have a @descriptorCount@ and--- @stageFlags@ of zero, and the value of--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is--- undefined. However, all binding numbers between 0 and the maximum--- binding number in the 'DescriptorSetLayoutCreateInfo'::@pBindings@ array--- /may/ consume memory in the descriptor set layout even if not all--- descriptor bindings are used, though it /should/ not consume additional--- memory from the descriptor pool.+-- @stageFlags@ of zero, and the value of @descriptorType@ is undefined.+-- However, all binding numbers between 0 and the maximum binding number in+-- the 'DescriptorSetLayoutCreateInfo'::@pBindings@ array /may/ consume+-- memory in the descriptor set layout even if not all descriptor bindings+-- are used, though it /should/ not consume additional memory from the+-- descriptor pool. -- -- Note --@@ -1786,7 +1743,7 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',@@ -1795,11 +1752,11 @@ -- of @descriptorCount@ valid 'Graphics.Vulkan.Core10.Handles.Sampler' -- handles ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT' -- then @descriptorCount@ /must/ be a multiple of @4@ ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT' -- then @descriptorCount@ /must/ be less than or equal to -- 'Graphics.Vulkan.Extensions.VK_EXT_inline_uniform_block.PhysicalDeviceInlineUniformBlockPropertiesEXT'::@maxInlineUniformBlockSize@@@ -1809,15 +1766,14 @@ -- 'Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits.ShaderStageFlagBits' -- values ----- - If 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT' -- and @descriptorCount@ is not @0@, then @stageFlags@ /must/ be @0@ or -- 'Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_FRAGMENT_BIT' -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' /must/--- be a valid+-- - @descriptorType@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' value -- -- = See Also@@ -1830,7 +1786,7 @@ { -- | @binding@ is the binding number of this entry and corresponds to a -- resource of the same binding number in the shader stages. binding :: Word32- , -- | 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is a+ , -- | @descriptorType@ is a -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' specifying -- which type of resource descriptors are used for this binding. descriptorType :: DescriptorType@@ -1906,21 +1862,21 @@ -- - The 'DescriptorSetLayoutBinding'::@binding@ members of the elements -- of the @pBindings@ array /must/ each have different values. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR',--- then all elements of @pBindings@ /must/ not have a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- then all elements of @pBindings@ /must/ not have a @descriptorType@+-- of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR',--- then all elements of @pBindings@ /must/ not have a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- then all elements of @pBindings@ /must/ not have a @descriptorType@+-- of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR', -- then the total number of elements of all bindings /must/ be less -- than or equal to@@ -1928,13 +1884,12 @@ -- -- - If any binding has the -- 'Graphics.Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT'--- bit set, 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ include+-- bit set, @flags@ /must/ include -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT' -- -- - If any binding has the -- 'Graphics.Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT'--- bit set, then all bindings /must/ not have--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set, then all bindings /must/ not have @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'@@ -1950,8 +1905,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DescriptorSetLayoutCreateFlagBits' -- values --@@ -1970,7 +1924,7 @@ data DescriptorSetLayoutCreateInfo (es :: [Type]) = DescriptorSetLayoutCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DescriptorSetLayoutCreateFlagBits' -- specifying options for descriptor set layout creation. flags :: DescriptorSetLayoutCreateFlags@@ -2138,7 +2092,7 @@ -- /can/ create an additional descriptor pool to perform further descriptor -- set allocations. ----- If 'Graphics.Vulkan.Core10.BaseType.Flags' has the+-- If @flags@ has the -- 'Graphics.Vulkan.Core10.Enums.DescriptorPoolCreateFlagBits.DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT' -- bit set, descriptor pool creation /may/ fail with the error -- 'Graphics.Vulkan.Core10.Enums.Result.ERROR_FRAGMENTATION' if the total@@ -2161,8 +2115,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.DescriptorPoolCreateFlagBits.DescriptorPoolCreateFlagBits' -- values --@@ -2180,7 +2133,7 @@ data DescriptorPoolCreateInfo (es :: [Type]) = DescriptorPoolCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.DescriptorPoolCreateFlagBits.DescriptorPoolCreateFlagBits' -- specifying certain supported operations on the pool. flags :: DescriptorPoolCreateFlags@@ -2260,8 +2213,7 @@ -- -- - If any element of @pSetLayouts@ was created with the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set, 'Graphics.Vulkan.Core10.Handles.DescriptorPool' /must/ have--- been created with the+-- bit set, @descriptorPool@ /must/ have been created with the -- 'Graphics.Vulkan.Core10.Enums.DescriptorPoolCreateFlagBits.DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT' -- flag set --@@ -2276,7 +2228,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.Handles.DescriptorPool' /must/ be a valid+-- - @descriptorPool@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.DescriptorPool' handle -- -- - @pSetLayouts@ /must/ be a valid pointer to an array of@@ -2285,9 +2237,9 @@ -- -- - @descriptorSetCount@ /must/ be greater than @0@ ----- - Both of 'Graphics.Vulkan.Core10.Handles.DescriptorPool', and the--- elements of @pSetLayouts@ /must/ have been created, allocated, or--- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Both of @descriptorPool@, and the elements of @pSetLayouts@ /must/+-- have been created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device' -- -- = See Also --@@ -2298,8 +2250,7 @@ data DescriptorSetAllocateInfo (es :: [Type]) = DescriptorSetAllocateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.Handles.DescriptorPool' is the pool which the- -- sets will be allocated from.+ , -- | @descriptorPool@ is the pool which the sets will be allocated from. descriptorPool :: DescriptorPool , -- | @pSetLayouts@ is a pointer to an array of descriptor set layouts, with -- each member specifying how the corresponding descriptor set is
src/Graphics/Vulkan/Core10/Device.hs view
@@ -7,6 +7,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -24,6 +25,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.C.Types (CChar)@@ -148,8 +150,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be one of the--- device handles returned from a call to+-- - @physicalDevice@ /must/ be one of the device handles returned from a+-- call to -- 'Graphics.Vulkan.Core10.DeviceInitialization.enumeratePhysicalDevices' -- (see -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#devsandqueues-physical-device-enumeration Physical Device Enumeration>).@@ -201,7 +203,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -242,8 +244,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', 'DeviceCreateInfo', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-createDevice :: PokeChain a => PhysicalDevice -> DeviceCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (Device)-createDevice physicalDevice createInfo allocator = evalContT $ do+createDevice :: forall a io . (PokeChain a, MonadIO io) => PhysicalDevice -> DeviceCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Device)+createDevice physicalDevice createInfo allocator = liftIO . evalContT $ do let cmds = instanceCmds (physicalDevice :: PhysicalDevice) let vkCreateDevice' = mkVkCreateDevice (pVkCreateDevice cmds) pCreateInfo <- ContT $ withCStruct (createInfo)@@ -260,11 +262,11 @@ -- | A safe wrapper for 'createDevice' and 'destroyDevice' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withDevice :: PokeChain a => PhysicalDevice -> DeviceCreateInfo a -> Maybe AllocationCallbacks -> (Device -> IO r) -> IO r-withDevice physicalDevice deviceCreateInfo allocationCallbacks =+withDevice :: forall a r . PokeChain a => PhysicalDevice -> DeviceCreateInfo a -> Maybe AllocationCallbacks -> ((Device) -> IO r) -> IO r+withDevice physicalDevice pCreateInfo pAllocator = bracket- (createDevice physicalDevice deviceCreateInfo allocationCallbacks)- (\o -> destroyDevice o allocationCallbacks)+ (createDevice physicalDevice pCreateInfo pAllocator)+ (\(o0) -> destroyDevice o0 pAllocator) foreign import ccall@@ -278,8 +280,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device to--- destroy.+-- - @device@ is the logical device to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -303,23 +304,21 @@ -- -- == Valid Usage ----- - All child objects created on 'Graphics.Vulkan.Core10.Handles.Device'--- /must/ have been destroyed prior to destroying--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - All child objects created on @device@ /must/ have been destroyed+-- prior to destroying @device@ -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Device' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @device@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Device' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @device@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - If 'Graphics.Vulkan.Core10.Handles.Device' is not @NULL@,--- 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid+-- - If @device@ is not @NULL@, @device@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Device' handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid@@ -329,15 +328,14 @@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Device' /must/ be--- externally synchronized+-- - Host access to @device@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device'-destroyDevice :: Device -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyDevice device allocator = evalContT $ do+destroyDevice :: forall io . MonadIO io => Device -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyDevice device allocator = liftIO . evalContT $ do let vkDestroyDevice' = mkVkDestroyDevice (pVkDestroyDevice (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -369,7 +367,7 @@ -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-protectedMemory protected memory> -- feature is not enabled, the -- 'Graphics.Vulkan.Core10.Enums.DeviceQueueCreateFlagBits.DEVICE_QUEUE_CREATE_PROTECTED_BIT'--- bit of 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not be set.+-- bit of @flags@ /must/ not be set. -- -- == Valid Usage (Implicit) --@@ -382,8 +380,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.DeviceQueueCreateFlagBits.DeviceQueueCreateFlagBits' -- values --@@ -400,8 +397,7 @@ data DeviceQueueCreateInfo (es :: [Type]) = DeviceQueueCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask indicating behavior- -- of the queue.+ , -- | @flags@ is a bitmask indicating behavior of the queue. flags :: DeviceQueueCreateFlags , -- | @queueFamilyIndex@ is an unsigned integer indicating the index of the -- queue family to create on this device. This index corresponds to the@@ -637,7 +633,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - @pQueueCreateInfos@ /must/ be a valid pointer to an array of -- @queueCreateInfoCount@ valid 'DeviceQueueCreateInfo' structures@@ -667,7 +663,7 @@ data DeviceCreateInfo (es :: [Type]) = DeviceCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ , -- | @flags@ is reserved for future use. flags :: DeviceCreateFlags , -- | @pQueueCreateInfos@ is a pointer to an array of 'DeviceQueueCreateInfo' -- structures describing the queues that are requested to be created along
src/Graphics/Vulkan/Core10/DeviceInitialization.hs view
@@ -27,6 +27,7 @@ import Control.Exception.Base (bracket) import Control.Monad (unless)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -45,10 +46,11 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Foreign.C.Types (CChar(..))+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.C.Types (CChar)-import Foreign.C.Types (CChar(..)) import Foreign.C.Types (CFloat) import Foreign.C.Types (CFloat(CFloat)) import Foreign.C.Types (CSize)@@ -99,16 +101,14 @@ import Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits (FormatFeatureFlags) import Graphics.Vulkan.CStruct (FromCStruct) import Graphics.Vulkan.CStruct (FromCStruct(..))-import Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlags)-import Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlags) import Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlagBits(..))+import Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlags) import Graphics.Vulkan.Core10.Enums.ImageTiling (ImageTiling) import Graphics.Vulkan.Core10.Enums.ImageTiling (ImageTiling(..)) import Graphics.Vulkan.Core10.Enums.ImageType (ImageType) import Graphics.Vulkan.Core10.Enums.ImageType (ImageType(..))-import Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags)-import Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags) import Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlagBits(..))+import Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags) import Graphics.Vulkan.Core10.Handles (Instance) import Graphics.Vulkan.Core10.Handles (Instance(..)) import Graphics.Vulkan.Core10.Handles (Instance(Instance))@@ -236,8 +236,8 @@ -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Instance', 'InstanceCreateInfo'-createInstance :: PokeChain a => InstanceCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (Instance)-createInstance createInfo allocator = evalContT $ do+createInstance :: forall a io . (PokeChain a, MonadIO io) => InstanceCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Instance)+createInstance createInfo allocator = liftIO . evalContT $ do vkCreateInstance' <- lift $ mkVkCreateInstance . castFunPtr @_ @(("pCreateInfo" ::: Ptr (InstanceCreateInfo _)) -> ("pAllocator" ::: Ptr AllocationCallbacks) -> ("pInstance" ::: Ptr (Ptr Instance_T)) -> IO Result) <$> getInstanceProcAddr' nullPtr (Ptr "vkCreateInstance"#) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -254,11 +254,11 @@ -- 'bracket' -- -- The allocated value must not be returned from the provided computation-withInstance :: PokeChain a => InstanceCreateInfo a -> Maybe AllocationCallbacks -> (Instance -> IO r) -> IO r-withInstance instanceCreateInfo allocationCallbacks =+withInstance :: forall a r . PokeChain a => InstanceCreateInfo a -> Maybe AllocationCallbacks -> ((Instance) -> IO r) -> IO r+withInstance pCreateInfo pAllocator = bracket- (createInstance instanceCreateInfo allocationCallbacks)- (\o -> destroyInstance o allocationCallbacks)+ (createInstance pCreateInfo pAllocator)+ (\(o0) -> destroyInstance o0 pAllocator) foreign import ccall@@ -272,8 +272,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the handle of the--- instance to destroy.+-- - @instance@ is the handle of the instance to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -281,23 +280,21 @@ -- -- == Valid Usage ----- - All child objects created using--- 'Graphics.Vulkan.Core10.Handles.Instance' /must/ have been destroyed--- prior to destroying 'Graphics.Vulkan.Core10.Handles.Instance'+-- - All child objects created using @instance@ /must/ have been+-- destroyed prior to destroying @instance@ -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Instance' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @instance@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Instance' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @instance@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - If 'Graphics.Vulkan.Core10.Handles.Instance' is not @NULL@,--- 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - If @instance@ is not @NULL@, @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid@@ -307,15 +304,14 @@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be--- externally synchronized+-- - Host access to @instance@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Instance'-destroyInstance :: Instance -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyInstance instance' allocator = evalContT $ do+destroyInstance :: forall io . MonadIO io => Instance -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyInstance instance' allocator = liftIO . evalContT $ do let vkDestroyInstance' = mkVkDestroyInstance (pVkDestroyInstance (instanceCmds (instance' :: Instance))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -336,8 +332,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is a handle to a Vulkan--- instance previously created with 'createInstance'.+-- - @instance@ is a handle to a Vulkan instance previously created with+-- 'createInstance'. -- -- - @pPhysicalDeviceCount@ is a pointer to an integer related to the -- number of physical devices available or queried, as described below.@@ -362,7 +358,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pPhysicalDeviceCount@ /must/ be a valid pointer to a @uint32_t@@@ -393,8 +389,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Instance', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-enumeratePhysicalDevices :: Instance -> IO (Result, ("physicalDevices" ::: Vector PhysicalDevice))-enumeratePhysicalDevices instance' = evalContT $ do+enumeratePhysicalDevices :: forall io . MonadIO io => Instance -> io (Result, ("physicalDevices" ::: Vector PhysicalDevice))+enumeratePhysicalDevices instance' = liftIO . evalContT $ do let cmds = instanceCmds (instance' :: Instance) let vkEnumeratePhysicalDevices' = mkVkEnumeratePhysicalDevices (pVkEnumeratePhysicalDevices cmds) let instance'' = instanceHandle (instance')@@ -432,27 +428,27 @@ -- 'Graphics.Vulkan.Core10.FuncPointers.PFN_vkVoidFunction', and must be -- cast to the type of the command being queried. The function pointer -- /must/ only be called with a dispatchable object (the first parameter)--- that is 'Graphics.Vulkan.Core10.Handles.Device' or a child of--- 'Graphics.Vulkan.Core10.Handles.Device'.+-- that is @device@ or a child of @device@. ----- +-----------------------------------------+----------------------+-----------------------+--- | 'Graphics.Vulkan.Core10.Handles.Device' | @pName@ | return value |--- +=========================================+======================+=======================+--- | @NULL@ | *1 | undefined |--- +-----------------------------------------+----------------------+-----------------------+--- | invalid device | *1 | undefined |--- +-----------------------------------------+----------------------+-----------------------+--- | device | @NULL@ | undefined |--- +-----------------------------------------+----------------------+-----------------------+--- | device | core device-level | fp2 |--- | | Vulkan command | |--- +-----------------------------------------+----------------------+-----------------------+--- | device | enabled extension | fp2 |--- | | device-level | |--- | | commands | |--- +-----------------------------------------+----------------------+-----------------------+--- | any other case, not covered above | @NULL@ | |--- +-----------------------------------------+----------------------+-----------------------++-- +----------------------+----------------------+-----------------------++-- | @device@ | @pName@ | return value |+-- +======================+======================+=======================++-- | @NULL@ | *1 | undefined |+-- +----------------------+----------------------+-----------------------++-- | invalid device | *1 | undefined |+-- +----------------------+----------------------+-----------------------++-- | device | @NULL@ | undefined |+-- +----------------------+----------------------+-----------------------++-- | device | core device-level | fp2 |+-- | | Vulkan command | |+-- +----------------------+----------------------+-----------------------++-- | device | enabled extension | fp2 |+-- | | device-level | |+-- | | commands | |+-- +----------------------+----------------------+-----------------------++-- | any other case, not | @NULL@ | |+-- | covered above | | |+-- +----------------------+----------------------+-----------------------+ -- -- vkGetDeviceProcAddr behavior --@@ -462,10 +458,8 @@ -- -- [2] -- The returned function pointer /must/ only be called with a--- dispatchable object (the first parameter) that is--- 'Graphics.Vulkan.Core10.Handles.Device' or a child of--- 'Graphics.Vulkan.Core10.Handles.Device' e.g.--- 'Graphics.Vulkan.Core10.Handles.Device',+-- dispatchable object (the first parameter) that is @device@ or a+-- child of @device@ e.g. 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Queue', or -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'. --@@ -475,8 +469,8 @@ -- -- 'Graphics.Vulkan.Core10.FuncPointers.PFN_vkVoidFunction', -- 'Graphics.Vulkan.Core10.Handles.Device'-getDeviceProcAddr :: Device -> ("name" ::: ByteString) -> IO (PFN_vkVoidFunction)-getDeviceProcAddr device name = evalContT $ do+getDeviceProcAddr :: forall io . MonadIO io => Device -> ("name" ::: ByteString) -> io (PFN_vkVoidFunction)+getDeviceProcAddr device name = liftIO . evalContT $ do let vkGetDeviceProcAddr' = mkVkGetDeviceProcAddr (pVkGetDeviceProcAddr (deviceCmds (device :: Device))) pName <- ContT $ useAsCString (name) r <- lift $ vkGetDeviceProcAddr' (deviceHandle (device)) pName@@ -494,9 +488,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance that the--- function pointer will be compatible with, or @NULL@ for commands not--- dependent on any instance.+-- - @instance@ is the instance that the function pointer will be+-- compatible with, or @NULL@ for commands not dependent on any+-- instance. -- -- - @pName@ is the name of the command to obtain. --@@ -515,31 +509,31 @@ -- 'Graphics.Vulkan.Core10.FuncPointers.PFN_vkVoidFunction', and must be -- cast to the type of the command being queried. ----- +-------------------------------------------+----------------------------------------------------------------------------------+-----------------------+--- | 'Graphics.Vulkan.Core10.Handles.Instance' | @pName@ | return value |--- +===========================================+==================================================================================+=======================+--- | *1 | @NULL@ | undefined |--- +-------------------------------------------+----------------------------------------------------------------------------------+-----------------------+--- | invalid non-@NULL@ instance | *1 | undefined |--- +-------------------------------------------+----------------------------------------------------------------------------------+-----------------------+--- | @NULL@ | 'Graphics.Vulkan.Core11.DeviceInitialization.enumerateInstanceVersion' | fp |--- +-------------------------------------------+----------------------------------------------------------------------------------+-----------------------+--- | @NULL@ | 'Graphics.Vulkan.Core10.ExtensionDiscovery.enumerateInstanceExtensionProperties' | fp |--- +-------------------------------------------+----------------------------------------------------------------------------------+-----------------------+--- | @NULL@ | 'Graphics.Vulkan.Core10.LayerDiscovery.enumerateInstanceLayerProperties' | fp |--- +-------------------------------------------+----------------------------------------------------------------------------------+-----------------------+--- | @NULL@ | 'createInstance' | fp |--- +-------------------------------------------+----------------------------------------------------------------------------------+-----------------------+--- | instance | core Vulkan command | fp2 |--- +-------------------------------------------+----------------------------------------------------------------------------------+-----------------------+--- | instance | enabled instance extension commands for | fp2 |--- | | 'Graphics.Vulkan.Core10.Handles.Instance' | |--- +-------------------------------------------+----------------------------------------------------------------------------------+-----------------------+--- | instance | available device extension3 commands for | fp2 |--- | | 'Graphics.Vulkan.Core10.Handles.Instance' | |--- +-------------------------------------------+----------------------------------------------------------------------------------+-----------------------+--- | any other case, not covered above | @NULL@ | |--- +-------------------------------------------+----------------------------------------------------------------------------------+-----------------------++-- +----------------------+----------------------------------------------------------------------------------+-----------------------++-- | @instance@ | @pName@ | return value |+-- +======================+==================================================================================+=======================++-- | *1 | @NULL@ | undefined |+-- +----------------------+----------------------------------------------------------------------------------+-----------------------++-- | invalid non-@NULL@ | *1 | undefined |+-- | instance | | |+-- +----------------------+----------------------------------------------------------------------------------+-----------------------++-- | @NULL@ | 'Graphics.Vulkan.Core11.DeviceInitialization.enumerateInstanceVersion' | fp |+-- +----------------------+----------------------------------------------------------------------------------+-----------------------++-- | @NULL@ | 'Graphics.Vulkan.Core10.ExtensionDiscovery.enumerateInstanceExtensionProperties' | fp |+-- +----------------------+----------------------------------------------------------------------------------+-----------------------++-- | @NULL@ | 'Graphics.Vulkan.Core10.LayerDiscovery.enumerateInstanceLayerProperties' | fp |+-- +----------------------+----------------------------------------------------------------------------------+-----------------------++-- | @NULL@ | 'createInstance' | fp |+-- +----------------------+----------------------------------------------------------------------------------+-----------------------++-- | instance | core Vulkan command | fp2 |+-- +----------------------+----------------------------------------------------------------------------------+-----------------------++-- | instance | enabled instance extension commands for @instance@ | fp2 |+-- +----------------------+----------------------------------------------------------------------------------+-----------------------++-- | instance | available device extension3 commands for @instance@ | fp2 |+-- +----------------------+----------------------------------------------------------------------------------+-----------------------++-- | any other case, not | @NULL@ | |+-- | covered above | | |+-- +----------------------+----------------------------------------------------------------------------------+-----------------------+ -- -- vkGetInstanceProcAddr behavior --@@ -549,10 +543,8 @@ -- -- [2] -- The returned function pointer /must/ only be called with a--- dispatchable object (the first parameter) that is--- 'Graphics.Vulkan.Core10.Handles.Instance' or a child of--- 'Graphics.Vulkan.Core10.Handles.Instance', e.g.--- 'Graphics.Vulkan.Core10.Handles.Instance',+-- dispatchable object (the first parameter) that is @instance@ or a+-- child of @instance@, e.g. 'Graphics.Vulkan.Core10.Handles.Instance', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Queue', or@@ -560,13 +552,11 @@ -- -- [3] -- An “available device extension” is a device extension supported by--- any physical device enumerated by--- 'Graphics.Vulkan.Core10.Handles.Instance'.+-- any physical device enumerated by @instance@. -- -- == Valid Usage (Implicit) ----- - If 'Graphics.Vulkan.Core10.Handles.Instance' is not @NULL@,--- 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - If @instance@ is not @NULL@, @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pName@ /must/ be a null-terminated UTF-8 string@@ -575,8 +565,8 @@ -- -- 'Graphics.Vulkan.Core10.FuncPointers.PFN_vkVoidFunction', -- 'Graphics.Vulkan.Core10.Handles.Instance'-getInstanceProcAddr :: Instance -> ("name" ::: ByteString) -> IO (PFN_vkVoidFunction)-getInstanceProcAddr instance' name = evalContT $ do+getInstanceProcAddr :: forall io . MonadIO io => Instance -> ("name" ::: ByteString) -> io (PFN_vkVoidFunction)+getInstanceProcAddr instance' name = liftIO . evalContT $ do let vkGetInstanceProcAddr' = mkVkGetInstanceProcAddr (pVkGetInstanceProcAddr (instanceCmds (instance' :: Instance))) pName <- ContT $ useAsCString (name) r <- lift $ vkGetInstanceProcAddr' (instanceHandle (instance')) pName@@ -594,8 +584,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the handle to the--- physical device whose properties will be queried.+-- - @physicalDevice@ is the handle to the physical device whose+-- properties will be queried. -- -- - @pProperties@ is a pointer to a 'PhysicalDeviceProperties' structure -- in which properties are returned.@@ -606,8 +596,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceProperties'-getPhysicalDeviceProperties :: PhysicalDevice -> IO (PhysicalDeviceProperties)-getPhysicalDeviceProperties physicalDevice = evalContT $ do+getPhysicalDeviceProperties :: forall io . MonadIO io => PhysicalDevice -> io (PhysicalDeviceProperties)+getPhysicalDeviceProperties physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceProperties' = mkVkGetPhysicalDeviceProperties (pVkGetPhysicalDeviceProperties (instanceCmds (physicalDevice :: PhysicalDevice))) pPProperties <- ContT (withZeroCStruct @PhysicalDeviceProperties) lift $ vkGetPhysicalDeviceProperties' (physicalDeviceHandle (physicalDevice)) (pPProperties)@@ -627,8 +617,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the handle to the--- physical device whose properties will be queried.+-- - @physicalDevice@ is the handle to the physical device whose+-- properties will be queried. -- -- - @pQueueFamilyPropertyCount@ is a pointer to an integer related to -- the number of queue families available or queried, as described@@ -652,7 +642,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pQueueFamilyPropertyCount@ /must/ be a valid pointer to a@@ -666,8 +656,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', 'QueueFamilyProperties'-getPhysicalDeviceQueueFamilyProperties :: PhysicalDevice -> IO (("queueFamilyProperties" ::: Vector QueueFamilyProperties))-getPhysicalDeviceQueueFamilyProperties physicalDevice = evalContT $ do+getPhysicalDeviceQueueFamilyProperties :: forall io . MonadIO io => PhysicalDevice -> io (("queueFamilyProperties" ::: Vector QueueFamilyProperties))+getPhysicalDeviceQueueFamilyProperties physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceQueueFamilyProperties' = mkVkGetPhysicalDeviceQueueFamilyProperties (pVkGetPhysicalDeviceQueueFamilyProperties (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPQueueFamilyPropertyCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -693,8 +683,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the handle to the--- device to query.+-- - @physicalDevice@ is the handle to the device to query. -- -- - @pMemoryProperties@ is a pointer to a -- 'PhysicalDeviceMemoryProperties' structure in which the properties@@ -706,8 +695,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceMemoryProperties'-getPhysicalDeviceMemoryProperties :: PhysicalDevice -> IO (PhysicalDeviceMemoryProperties)-getPhysicalDeviceMemoryProperties physicalDevice = evalContT $ do+getPhysicalDeviceMemoryProperties :: forall io . MonadIO io => PhysicalDevice -> io (PhysicalDeviceMemoryProperties)+getPhysicalDeviceMemoryProperties physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceMemoryProperties' = mkVkGetPhysicalDeviceMemoryProperties (pVkGetPhysicalDeviceMemoryProperties (instanceCmds (physicalDevice :: PhysicalDevice))) pPMemoryProperties <- ContT (withZeroCStruct @PhysicalDeviceMemoryProperties) lift $ vkGetPhysicalDeviceMemoryProperties' (physicalDeviceHandle (physicalDevice)) (pPMemoryProperties)@@ -726,8 +715,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the supported features.+-- - @physicalDevice@ is the physical device from which to query the+-- supported features. -- -- - @pFeatures@ is a pointer to a 'PhysicalDeviceFeatures' structure in -- which the physical device features are returned. For each feature, a@@ -742,8 +731,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceFeatures'-getPhysicalDeviceFeatures :: PhysicalDevice -> IO (PhysicalDeviceFeatures)-getPhysicalDeviceFeatures physicalDevice = evalContT $ do+getPhysicalDeviceFeatures :: forall io . MonadIO io => PhysicalDevice -> io (PhysicalDeviceFeatures)+getPhysicalDeviceFeatures physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceFeatures' = mkVkGetPhysicalDeviceFeatures (pVkGetPhysicalDeviceFeatures (instanceCmds (physicalDevice :: PhysicalDevice))) pPFeatures <- ContT (withZeroCStruct @PhysicalDeviceFeatures) lift $ vkGetPhysicalDeviceFeatures' (physicalDeviceHandle (physicalDevice)) (pPFeatures)@@ -763,15 +752,13 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the format properties.+-- - @physicalDevice@ is the physical device from which to query the+-- format properties. ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' is the format whose--- properties are queried.+-- - @format@ is the format whose properties are queried. -- -- - @pFormatProperties@ is a pointer to a 'FormatProperties' structure--- in which physical device properties for--- 'Graphics.Vulkan.Core10.Enums.Format.Format' are returned.+-- in which physical device properties for @format@ are returned. -- -- == Valid Usage (Implicit) --@@ -779,8 +766,8 @@ -- -- 'Graphics.Vulkan.Core10.Enums.Format.Format', 'FormatProperties', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceFormatProperties :: PhysicalDevice -> Format -> IO (FormatProperties)-getPhysicalDeviceFormatProperties physicalDevice format = evalContT $ do+getPhysicalDeviceFormatProperties :: forall io . MonadIO io => PhysicalDevice -> Format -> io (FormatProperties)+getPhysicalDeviceFormatProperties physicalDevice format = liftIO . evalContT $ do let vkGetPhysicalDeviceFormatProperties' = mkVkGetPhysicalDeviceFormatProperties (pVkGetPhysicalDeviceFormatProperties (instanceCmds (physicalDevice :: PhysicalDevice))) pPFormatProperties <- ContT (withZeroCStruct @FormatProperties) lift $ vkGetPhysicalDeviceFormatProperties' (physicalDeviceHandle (physicalDevice)) (format) (pPFormatProperties)@@ -800,17 +787,16 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the image capabilities.+-- - @physicalDevice@ is the physical device from which to query the+-- image capabilities. ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' is a--- 'Graphics.Vulkan.Core10.Enums.Format.Format' value specifying the--- image format, corresponding to--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.Enums.Format.Format'.+-- - @format@ is a 'Graphics.Vulkan.Core10.Enums.Format.Format' value+-- specifying the image format, corresponding to+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@format@. -- -- - @type@ is a 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' value -- specifying the image type, corresponding to--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.Enums.ImageType.ImageType'.+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@imageType@. -- -- - @tiling@ is a 'Graphics.Vulkan.Core10.Enums.ImageTiling.ImageTiling' -- value specifying the image tiling, corresponding to@@ -821,27 +807,24 @@ -- specifying the intended usage of the image, corresponding to -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@usage@. ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+-- - @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlagBits' -- specifying additional parameters of the image, corresponding to--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'.+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@. -- -- - @pImageFormatProperties@ is a pointer to a 'ImageFormatProperties' -- structure in which capabilities are returned. -- -- = Description ----- The 'Graphics.Vulkan.Core10.Enums.Format.Format', @type@, @tiling@,--- @usage@, and 'Graphics.Vulkan.Core10.BaseType.Flags' parameters+-- The @format@, @type@, @tiling@, @usage@, and @flags@ parameters -- correspond to parameters that would be consumed by -- 'Graphics.Vulkan.Core10.Image.createImage' (as members of -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'). ----- If 'Graphics.Vulkan.Core10.Enums.Format.Format' is not a supported image--- format, or if the combination of--- 'Graphics.Vulkan.Core10.Enums.Format.Format', @type@, @tiling@, @usage@,--- and 'Graphics.Vulkan.Core10.BaseType.Flags' is not supported for images,--- then 'getPhysicalDeviceImageFormatProperties' returns+-- If @format@ is not a supported image format, or if the combination of+-- @format@, @type@, @tiling@, @usage@, and @flags@ is not supported for+-- images, then 'getPhysicalDeviceImageFormatProperties' returns -- 'Graphics.Vulkan.Core10.Enums.Result.ERROR_FORMAT_NOT_SUPPORTED'. -- -- The limitations on an image format that are reported by@@ -854,8 +837,7 @@ -- such that the bits set in @flags1@ are a subset of the bits set in -- @flags2@, then the limitations for @usage1@ and @flags1@ /must/ be no -- more strict than the limitations for @usage2@ and @flags2@, for all--- values of 'Graphics.Vulkan.Core10.Enums.Format.Format', @type@, and--- @tiling@.+-- values of @format@, @type@, and @tiling@. -- -- == Return Codes --@@ -880,8 +862,8 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType', -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlags', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceImageFormatProperties :: PhysicalDevice -> Format -> ImageType -> ImageTiling -> ImageUsageFlags -> ImageCreateFlags -> IO (ImageFormatProperties)-getPhysicalDeviceImageFormatProperties physicalDevice format type' tiling usage flags = evalContT $ do+getPhysicalDeviceImageFormatProperties :: forall io . MonadIO io => PhysicalDevice -> Format -> ImageType -> ImageTiling -> ImageUsageFlags -> ImageCreateFlags -> io (ImageFormatProperties)+getPhysicalDeviceImageFormatProperties physicalDevice format type' tiling usage flags = liftIO . evalContT $ do let vkGetPhysicalDeviceImageFormatProperties' = mkVkGetPhysicalDeviceImageFormatProperties (pVkGetPhysicalDeviceImageFormatProperties (instanceCmds (physicalDevice :: PhysicalDevice))) pPImageFormatProperties <- ContT (withZeroCStruct @ImageFormatProperties) r <- lift $ vkGetPhysicalDeviceImageFormatProperties' (physicalDeviceHandle (physicalDevice)) (format) (type') (tiling) (usage) (flags) (pPImageFormatProperties)@@ -1235,7 +1217,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - If @pApplicationInfo@ is not @NULL@, @pApplicationInfo@ /must/ be a -- valid pointer to a valid 'ApplicationInfo' structure@@ -1257,7 +1239,7 @@ data InstanceCreateInfo (es :: [Type]) = InstanceCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ , -- | @flags@ is reserved for future use. flags :: InstanceCreateFlags , -- | @pApplicationInfo@ is @NULL@ or a pointer to a 'ApplicationInfo' -- structure. If not @NULL@, this information helps implementations@@ -1433,7 +1415,7 @@ -- 'Graphics.Vulkan.Core10.Enums.QueueFlagBits.QueueFlags', -- 'getPhysicalDeviceQueueFamilyProperties' data QueueFamilyProperties = QueueFamilyProperties- { -- | 'Graphics.Vulkan.Core10.Enums.QueueFlagBits.QueueFlags' is a bitmask of+ { -- | @queueFlags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.QueueFlagBits.QueueFlagBits' indicating -- capabilities of the queues in this queue family. queueFlags :: QueueFlags@@ -1515,9 +1497,8 @@ -- -- At least one heap /must/ include -- 'Graphics.Vulkan.Core10.Enums.MemoryHeapFlagBits.MEMORY_HEAP_DEVICE_LOCAL_BIT'--- in 'MemoryHeap'::'Graphics.Vulkan.Core10.BaseType.Flags'. If there are--- multiple heaps that all have similar performance characteristics, they--- /may/ all include+-- in 'MemoryHeap'::@flags@. If there are multiple heaps that all have+-- similar performance characteristics, they /may/ all include -- 'Graphics.Vulkan.Core10.Enums.MemoryHeapFlagBits.MEMORY_HEAP_DEVICE_LOCAL_BIT'. -- In a unified memory architecture (UMA) system there is often only a -- single memory heap which is considered to be equally “local” to the host@@ -1874,7 +1855,7 @@ data MemoryHeap = MemoryHeap { -- | @size@ is the total memory size in bytes in the heap. size :: DeviceSize- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.MemoryHeapFlagBits.MemoryHeapFlagBits' -- specifying attribute flags for the heap. flags :: MemoryHeapFlags@@ -1922,13 +1903,11 @@ -- If no format feature flags are supported, the format itself is not -- supported, and images of that format cannot be created. ----- If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a block-compressed--- format, then @bufferFeatures@ /must/ not support any features for the--- format.+-- If @format@ is a block-compressed format, then @bufferFeatures@ /must/+-- not support any features for the format. ----- If 'Graphics.Vulkan.Core10.Enums.Format.Format' is not a multi-plane--- format then @linearTilingFeatures@ and @optimalTilingFeatures@ /must/--- not contain+-- If @format@ is not a multi-plane format then @linearTilingFeatures@ and+-- @optimalTilingFeatures@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_DISJOINT_BIT'. -- -- = See Also@@ -2018,11 +1997,10 @@ -- structure with a handle type included in the @handleTypes@ -- member for which mipmap image support is not required ----- - image 'Graphics.Vulkan.Core10.Enums.Format.Format' is one of--- those listed in+-- - image @format@ is one of those listed in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion> ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT' -- -- - @maxArrayLayers@ is the maximum number of array layers.@@ -2039,8 +2017,7 @@ -- and @type@ is -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' is one of those--- listed in+-- - @format@ is one of those listed in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion> -- -- - If @tiling@ is@@ -2321,12 +2298,11 @@ -- factors. See -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#framebuffer-dsb>. dualSrcBlend :: Bool- , -- | 'Graphics.Vulkan.Core10.Enums.LogicOp.LogicOp' specifies whether logic- -- operations are supported. If this feature is not enabled, the- -- @logicOpEnable@ member of the+ , -- | @logicOp@ specifies whether logic operations are supported. If this+ -- feature is not enabled, the @logicOpEnable@ member of the -- 'Graphics.Vulkan.Core10.Pipeline.PipelineColorBlendStateCreateInfo' -- structure /must/ be set to 'Graphics.Vulkan.Core10.BaseType.FALSE', and- -- the 'Graphics.Vulkan.Core10.Enums.LogicOp.LogicOp' member is ignored.+ -- the @logicOp@ member is ignored. logicOp :: Bool , -- | @multiDrawIndirect@ specifies whether multiple draw indirect is -- supported. If this feature is not enabled, the @drawCount@ parameter to@@ -2592,14 +2568,13 @@ textureCompressionBC :: Bool , -- | @occlusionQueryPrecise@ specifies whether occlusion queries returning -- actual sample counts are supported. Occlusion queries are created in a- -- 'Graphics.Vulkan.Core10.Handles.QueryPool' by specifying the- -- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of- -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION' in the+ -- 'Graphics.Vulkan.Core10.Handles.QueryPool' by specifying the @queryType@+ -- of 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION' in the -- 'Graphics.Vulkan.Core10.Query.QueryPoolCreateInfo' structure which is -- passed to 'Graphics.Vulkan.Core10.Query.createQueryPool'. If this -- feature is enabled, queries of this type /can/ enable -- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QUERY_CONTROL_PRECISE_BIT'- -- in the 'Graphics.Vulkan.Core10.BaseType.Flags' parameter to+ -- in the @flags@ parameter to -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdBeginQuery'. If this -- feature is not supported, the implementation supports only boolean -- occlusion queries. When any samples are passed, boolean queries will@@ -2851,7 +2826,7 @@ -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_BINDING_BIT' -- and -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_BINDING_BIT'- -- set in the 'Graphics.Vulkan.Core10.BaseType.Flags' member of the+ -- set in the @flags@ member of the -- 'Graphics.Vulkan.Core10.Buffer.BufferCreateInfo' and -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' structures, respectively. -- Otherwise resource memory /can/ be managed as described in@@ -2861,72 +2836,67 @@ -- partially resident buffers. If this feature is not enabled, buffers -- /must/ not be created with -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_RESIDENCY_BIT'- -- set in the 'Graphics.Vulkan.Core10.BaseType.Flags' member of the+ -- set in the @flags@ member of the -- 'Graphics.Vulkan.Core10.Buffer.BufferCreateInfo' structure. sparseResidencyBuffer :: Bool , -- | @sparseResidencyImage2D@ specifies whether the device /can/ access -- partially resident 2D images with 1 sample per pixel. If this feature is- -- not enabled, images with an- -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' of+ -- not enabled, images with an @imageType@ of -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and @samples@ set -- to 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT' -- /must/ not be created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT'- -- set in the 'Graphics.Vulkan.Core10.BaseType.Flags' member of the+ -- set in the @flags@ member of the -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' structure. sparseResidencyImage2D :: Bool , -- | @sparseResidencyImage3D@ specifies whether the device /can/ access -- partially resident 3D images. If this feature is not enabled, images- -- with an 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' of+ -- with an @imageType@ of -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' /must/ not be -- created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT'- -- set in the 'Graphics.Vulkan.Core10.BaseType.Flags' member of the+ -- set in the @flags@ member of the -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' structure. sparseResidencyImage3D :: Bool , -- | @sparseResidency2Samples@ specifies whether the physical device /can/ -- access partially resident 2D images with 2 samples per pixel. If this- -- feature is not enabled, images with an- -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' of+ -- feature is not enabled, images with an @imageType@ of -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and @samples@ set -- to 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_2_BIT' -- /must/ not be created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT'- -- set in the 'Graphics.Vulkan.Core10.BaseType.Flags' member of the+ -- set in the @flags@ member of the -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' structure. sparseResidency2Samples :: Bool , -- | @sparseResidency4Samples@ specifies whether the physical device /can/ -- access partially resident 2D images with 4 samples per pixel. If this- -- feature is not enabled, images with an- -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' of+ -- feature is not enabled, images with an @imageType@ of -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and @samples@ set -- to 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_4_BIT' -- /must/ not be created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT'- -- set in the 'Graphics.Vulkan.Core10.BaseType.Flags' member of the+ -- set in the @flags@ member of the -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' structure. sparseResidency4Samples :: Bool , -- | @sparseResidency8Samples@ specifies whether the physical device /can/ -- access partially resident 2D images with 8 samples per pixel. If this- -- feature is not enabled, images with an- -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' of+ -- feature is not enabled, images with an @imageType@ of -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and @samples@ set -- to 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_8_BIT' -- /must/ not be created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT'- -- set in the 'Graphics.Vulkan.Core10.BaseType.Flags' member of the+ -- set in the @flags@ member of the -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' structure. sparseResidency8Samples :: Bool , -- | @sparseResidency16Samples@ specifies whether the physical device /can/ -- access partially resident 2D images with 16 samples per pixel. If this- -- feature is not enabled, images with an- -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' of+ -- feature is not enabled, images with an @imageType@ of -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and @samples@ set -- to -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_16_BIT' -- /must/ not be created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT'- -- set in the 'Graphics.Vulkan.Core10.BaseType.Flags' member of the+ -- set in the @flags@ member of the -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' structure. sparseResidency16Samples :: Bool , -- | @sparseResidencyAliased@ specifies whether the physical device /can/@@ -2935,8 +2905,7 @@ -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_ALIASED_BIT' -- and -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_ALIASED_BIT'- -- enum values /must/ not be used in- -- 'Graphics.Vulkan.Core10.BaseType.Flags' members of the+ -- enum values /must/ not be used in @flags@ members of the -- 'Graphics.Vulkan.Core10.Buffer.BufferCreateInfo' and -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' structures, respectively. sparseResidencyAliased :: Bool@@ -3250,7 +3219,7 @@ -- structure will be placed in the mip tail. If this property is reported -- the implementation is allowed to return -- 'Graphics.Vulkan.Core10.Enums.SparseImageFormatFlagBits.SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT'- -- in the 'Graphics.Vulkan.Core10.BaseType.Flags' member of+ -- in the @flags@ member of -- 'Graphics.Vulkan.Core10.SparseResourceMemoryManagement.SparseImageFormatProperties', -- indicating that mip level dimensions that are not integer multiples of -- the corresponding dimensions of the sparse image block will be placed in@@ -3339,28 +3308,24 @@ -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlags' data PhysicalDeviceLimits = PhysicalDeviceLimits { -- | @maxImageDimension1D@ is the maximum dimension (@width@) supported for- -- all images created with an- -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' of+ -- all images created with an @imageType@ of -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D'. maxImageDimension1D :: Word32 , -- | @maxImageDimension2D@ is the maximum dimension (@width@ or @height@)- -- supported for all images created with an- -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' of+ -- supported for all images created with an @imageType@ of -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and without -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CUBE_COMPATIBLE_BIT'- -- set in 'Graphics.Vulkan.Core10.BaseType.Flags'.+ -- set in @flags@. maxImageDimension2D :: Word32 , -- | @maxImageDimension3D@ is the maximum dimension (@width@, @height@, or- -- @depth@) supported for all images created with an- -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' of+ -- @depth@) supported for all images created with an @imageType@ of -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D'. maxImageDimension3D :: Word32 , -- | @maxImageDimensionCube@ is the maximum dimension (@width@ or @height@)- -- supported for all images created with an- -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' of+ -- supported for all images created with an @imageType@ of -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CUBE_COMPATIBLE_BIT'- -- set in 'Graphics.Vulkan.Core10.BaseType.Flags'.+ -- set in @flags@. maxImageDimensionCube :: Word32 , -- | @maxImageArrayLayers@ is the maximum number of layers (@arrayLayers@) -- for an image.@@ -4039,9 +4004,8 @@ -- 'Graphics.Vulkan.Core10.BaseType.TRUE', all queues that advertise the -- 'Graphics.Vulkan.Core10.Enums.QueueFlagBits.QUEUE_GRAPHICS_BIT' or -- 'Graphics.Vulkan.Core10.Enums.QueueFlagBits.QUEUE_COMPUTE_BIT' in the- -- 'QueueFamilyProperties'::'Graphics.Vulkan.Core10.Enums.QueueFlagBits.QueueFlags'- -- support 'QueueFamilyProperties'::@timestampValidBits@ of at least 36.- -- See+ -- 'QueueFamilyProperties'::@queueFlags@ support+ -- 'QueueFamilyProperties'::@timestampValidBits@ of at least 36. See -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-timestamps Timestamp Queries>. timestampComputeAndGraphics :: Bool , -- | @timestampPeriod@ is the number of nanoseconds /required/ for a
src/Graphics/Vulkan/Core10/Enums/BufferUsageFlagBits.hs view
@@ -77,7 +77,7 @@ -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'. pattern BUFFER_USAGE_STORAGE_BUFFER_BIT = BufferUsageFlagBits 0x00000020 -- | 'BUFFER_USAGE_INDEX_BUFFER_BIT' specifies that the buffer is suitable--- for passing as the 'Graphics.Vulkan.Core10.Handles.Buffer' parameter to+-- for passing as the @buffer@ parameter to -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdBindIndexBuffer'. pattern BUFFER_USAGE_INDEX_BUFFER_BIT = BufferUsageFlagBits 0x00000040 -- | 'BUFFER_USAGE_VERTEX_BUFFER_BIT' specifies that the buffer is suitable@@ -85,14 +85,13 @@ -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdBindVertexBuffers'. pattern BUFFER_USAGE_VERTEX_BUFFER_BIT = BufferUsageFlagBits 0x00000080 -- | 'BUFFER_USAGE_INDIRECT_BUFFER_BIT' specifies that the buffer is suitable--- for passing as the 'Graphics.Vulkan.Core10.Handles.Buffer' parameter to+-- for passing as the @buffer@ parameter to -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdDrawIndirect', -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdDrawIndexedIndirect', -- 'Graphics.Vulkan.Extensions.VK_NV_mesh_shader.cmdDrawMeshTasksIndirectNV', -- 'Graphics.Vulkan.Extensions.VK_NV_mesh_shader.cmdDrawMeshTasksIndirectCountNV', -- or 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdDispatchIndirect'.--- It is also suitable for passing as the--- 'Graphics.Vulkan.Core10.Handles.Buffer' member of+-- It is also suitable for passing as the @buffer@ member of -- 'Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands.IndirectCommandsTokenNVX', -- or @sequencesCountBuffer@ or @sequencesIndexBuffer@ member of -- 'Graphics.Vulkan.Extensions.VK_NVX_device_generated_commands.CmdProcessCommandsInfoNVX'@@ -103,8 +102,7 @@ -- 'Graphics.Vulkan.Extensions.VK_NV_ray_tracing.cmdBuildAccelerationStructureNV'. pattern BUFFER_USAGE_RAY_TRACING_BIT_NV = BufferUsageFlagBits 0x00000400 -- | 'BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT' specifies that the buffer--- is suitable for passing as the 'Graphics.Vulkan.Core10.Handles.Buffer'--- parameter to+-- is suitable for passing as the @buffer@ parameter to -- 'Graphics.Vulkan.Extensions.VK_EXT_conditional_rendering.cmdBeginConditionalRenderingEXT'. pattern BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT = BufferUsageFlagBits 0x00000200 -- | 'BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT' specifies that
src/Graphics/Vulkan/Core10/Enums/CommandBufferResetFlagBits.hs view
@@ -33,8 +33,7 @@ -- memory resources currently owned by the command buffer /should/ be -- returned to the parent command pool. If this flag is not set, then the -- command buffer /may/ hold onto memory resources and reuse them when--- recording commands. 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is--- moved to the+-- recording commands. @commandBuffer@ is moved to the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle initial state>. pattern COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = CommandBufferResetFlagBits 0x00000001
src/Graphics/Vulkan/Core10/Enums/DescriptorType.hs view
@@ -77,17 +77,15 @@ -- - otherwise they are ignored. The members accessed are as follows for -- each descriptor type: ----- - For 'DESCRIPTOR_TYPE_SAMPLER', only the--- 'Graphics.Vulkan.Core10.Handles.Sampler' member of each element of+-- - For 'DESCRIPTOR_TYPE_SAMPLER', only the @sampler@ member of each+-- element of -- 'Graphics.Vulkan.Core10.DescriptorSet.WriteDescriptorSet'::@pImageInfo@ -- is accessed. -- -- - For 'DESCRIPTOR_TYPE_SAMPLED_IMAGE', -- 'DESCRIPTOR_TYPE_STORAGE_IMAGE', or--- 'DESCRIPTOR_TYPE_INPUT_ATTACHMENT', only the--- 'Graphics.Vulkan.Core10.Handles.ImageView' and--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' members of--- each element of+-- 'DESCRIPTOR_TYPE_INPUT_ATTACHMENT', only the @imageView@ and+-- @imageLayout@ members of each element of -- 'Graphics.Vulkan.Core10.DescriptorSet.WriteDescriptorSet'::@pImageInfo@ -- are accessed. --@@ -109,14 +107,14 @@ -- 'Graphics.Vulkan.Core10.DescriptorSet.WriteDescriptorSet'::@pTexelBufferView@ -- is accessed. ----- When updating descriptors with a 'DescriptorType' of+-- When updating descriptors with a @descriptorType@ of -- 'DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT', none of the @pImageInfo@, -- @pBufferInfo@, or @pTexelBufferView@ members are accessed, instead the -- source data of the descriptor update operation is taken from the -- 'Graphics.Vulkan.Extensions.VK_EXT_inline_uniform_block.WriteDescriptorSetInlineUniformBlockEXT' -- structure in the @pNext@ chain of -- 'Graphics.Vulkan.Core10.DescriptorSet.WriteDescriptorSet'. When updating--- descriptors with a 'DescriptorType' of+-- descriptors with a @descriptorType@ of -- 'DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV', none of the @pImageInfo@, -- @pBufferInfo@, or @pTexelBufferView@ members are accessed, instead the -- source data of the descriptor update operation is taken from the
src/Graphics/Vulkan/Core10/Enums/FormatFeatureFlagBits.hs view
@@ -57,7 +57,7 @@ -- or -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageView image views> -- created with the queried--- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceFormatProperties'::'Graphics.Vulkan.Core10.Enums.Format.Format':+-- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceFormatProperties'::@format@: -- -- - 'FORMAT_FEATURE_SAMPLED_IMAGE_BIT' specifies that an image view -- /can/ be@@ -99,9 +99,8 @@ -- If 'FORMAT_FEATURE_BLIT_SRC_BIT' is also set, an image can be used -- as the @srcImage@ to -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdBlitImage' with a--- 'Graphics.Vulkan.Core10.Enums.Filter.Filter' of--- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR'. This bit /must/--- only be exposed for formats that also support the+-- @filter@ of 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR'.+-- This bit /must/ only be exposed for formats that also support the -- 'FORMAT_FEATURE_SAMPLED_IMAGE_BIT' or 'FORMAT_FEATURE_BLIT_SRC_BIT'. -- -- If the format being queried is a depth\/stencil format, this bit@@ -138,8 +137,7 @@ -- specifies that 'Graphics.Vulkan.Core10.Handles.Image' /can/ be used -- with a sampler that has either of @magFilter@ or @minFilter@ set to -- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT',--- or be the source image for a blit with--- 'Graphics.Vulkan.Core10.Enums.Filter.Filter' set to+-- or be the source image for a blit with @filter@ set to -- 'Graphics.Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT'. -- This bit /must/ only be exposed for formats that also support the -- 'FORMAT_FEATURE_SAMPLED_IMAGE_BIT'. If the format being queried is a@@ -216,7 +214,7 @@ -- or -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkBufferView buffer views> -- created with the queried--- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceProperties'::'Graphics.Vulkan.Core10.Enums.Format.Format':+-- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceProperties'::@format@: -- -- - 'FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT' specifies that the format -- /can/ be used to create a buffer view that /can/ be bound to a@@ -235,7 +233,7 @@ -- -- - 'FORMAT_FEATURE_VERTEX_BUFFER_BIT' specifies that the format /can/ -- be used as a vertex attribute format--- ('Graphics.Vulkan.Core10.Pipeline.VertexInputAttributeDescription'::'Graphics.Vulkan.Core10.Enums.Format.Format').+-- ('Graphics.Vulkan.Core10.Pipeline.VertexInputAttributeDescription'::@format@). -- -- = See Also --@@ -270,7 +268,7 @@ pattern FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = FormatFeatureFlagBits 0x00000020 -- | 'FORMAT_FEATURE_VERTEX_BUFFER_BIT' specifies that the format /can/ be -- used as a vertex attribute format--- ('Graphics.Vulkan.Core10.Pipeline.VertexInputAttributeDescription'::'Graphics.Vulkan.Core10.Enums.Format.Format').+-- ('Graphics.Vulkan.Core10.Pipeline.VertexInputAttributeDescription'::@format@). pattern FORMAT_FEATURE_VERTEX_BUFFER_BIT = FormatFeatureFlagBits 0x00000040 -- | 'FORMAT_FEATURE_COLOR_ATTACHMENT_BIT' specifies that an image view /can/ -- be used as a framebuffer color attachment and as an input attachment.@@ -300,9 +298,8 @@ -- If 'FORMAT_FEATURE_BLIT_SRC_BIT' is also set, an image can be used as -- the @srcImage@ to -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdBlitImage' with a--- 'Graphics.Vulkan.Core10.Enums.Filter.Filter' of--- 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR'. This bit /must/--- only be exposed for formats that also support the+-- @filter@ of 'Graphics.Vulkan.Core10.Enums.Filter.FILTER_LINEAR'. This+-- bit /must/ only be exposed for formats that also support the -- 'FORMAT_FEATURE_SAMPLED_IMAGE_BIT' or 'FORMAT_FEATURE_BLIT_SRC_BIT'. -- -- If the format being queried is a depth\/stencil format, this bit only
src/Graphics/Vulkan/Core10/Enums/ImageCreateFlagBits.hs view
@@ -84,7 +84,7 @@ -- Accessing a subsampled image has additional considerations: -- -- - Image data read as an image sampler is undefined if the sampler was--- not created with 'Graphics.Vulkan.Core10.BaseType.Flags' containing+-- not created with @flags@ containing -- 'Graphics.Vulkan.Core10.Enums.SamplerCreateFlagBits.SAMPLER_CREATE_SUBSAMPLED_BIT_EXT' -- or was not sampled through the use of a combined image sampler with -- an immutable sampler in
src/Graphics/Vulkan/Core10/Enums/SamplerCreateFlagBits.hs view
@@ -46,8 +46,7 @@ -- color value for texture access from a subsampled image. pattern SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT = SamplerCreateFlagBits 0x00000002 -- | 'SAMPLER_CREATE_SUBSAMPLED_BIT_EXT' specifies that the sampler will read--- from an image created with 'Graphics.Vulkan.Core10.BaseType.Flags'--- containing+-- from an image created with @flags@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'. pattern SAMPLER_CREATE_SUBSAMPLED_BIT_EXT = SamplerCreateFlagBits 0x00000001
src/Graphics/Vulkan/Core10/Event.hs view
@@ -9,6 +9,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -18,6 +19,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -62,8 +64,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the event.+-- - @device@ is the logical device that creates the event. -- -- - @pCreateInfo@ is a pointer to a 'EventCreateInfo' structure -- containing information about how the event is to be created.@@ -81,8 +82,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid 'EventCreateInfo' -- structure@@ -112,8 +113,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Event', 'EventCreateInfo'-createEvent :: Device -> EventCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (Event)-createEvent device createInfo allocator = evalContT $ do+createEvent :: forall io . MonadIO io => Device -> EventCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Event)+createEvent device createInfo allocator = liftIO . evalContT $ do let vkCreateEvent' = mkVkCreateEvent (pVkCreateEvent (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -128,11 +129,11 @@ -- | A safe wrapper for 'createEvent' and 'destroyEvent' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withEvent :: Device -> EventCreateInfo -> Maybe AllocationCallbacks -> (Event -> IO r) -> IO r-withEvent device eventCreateInfo allocationCallbacks =+withEvent :: forall r . Device -> EventCreateInfo -> Maybe AllocationCallbacks -> ((Event) -> IO r) -> IO r+withEvent device pCreateInfo pAllocator = bracket- (createEvent device eventCreateInfo allocationCallbacks)- (\o -> destroyEvent device o allocationCallbacks)+ (createEvent device pCreateInfo pAllocator)+ (\(o0) -> destroyEvent device o0 pAllocator) foreign import ccall@@ -146,11 +147,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the event.+-- - @device@ is the logical device that destroys the event. ----- - 'Graphics.Vulkan.Core10.Handles.Event' is the handle of the event to--- destroy.+-- - @event@ is the handle of the event to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -158,50 +157,46 @@ -- -- == Valid Usage ----- - All submitted commands that refer to--- 'Graphics.Vulkan.Core10.Handles.Event' /must/ have completed+-- - All submitted commands that refer to @event@ /must/ have completed -- execution -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Event' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @event@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Event' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @event@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.Event' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Event' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Event' handle+-- - If @event@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @event@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Event'+-- handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.Event' is a valid handle, it--- /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @event@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Event' /must/ be--- externally synchronized+-- - Host access to @event@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Event'-destroyEvent :: Device -> Event -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyEvent device event allocator = evalContT $ do+destroyEvent :: forall io . MonadIO io => Device -> Event -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyEvent device event allocator = liftIO . evalContT $ do let vkDestroyEvent' = mkVkDestroyEvent (pVkDestroyEvent (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -221,28 +216,24 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the event.+-- - @device@ is the logical device that owns the event. ----- - 'Graphics.Vulkan.Core10.Handles.Event' is the handle of the event to--- query.+-- - @event@ is the handle of the event to query. -- -- = Description -- -- Upon success, 'getEventStatus' returns the state of the event object -- with the following return codes: ----- +---------------------------------------------------+----------------------------------------+--- | Status | Meaning |--- +===================================================+========================================+--- | 'Graphics.Vulkan.Core10.Enums.Result.EVENT_SET' | The event specified by |--- | | 'Graphics.Vulkan.Core10.Handles.Event' |--- | | is signaled. |--- +---------------------------------------------------+----------------------------------------+--- | 'Graphics.Vulkan.Core10.Enums.Result.EVENT_RESET' | The event specified by |--- | | 'Graphics.Vulkan.Core10.Handles.Event' |--- | | is unsignaled. |--- +---------------------------------------------------+----------------------------------------++-- +---------------------------------------------------+-----------------------------------++-- | Status | Meaning |+-- +===================================================+===================================++-- | 'Graphics.Vulkan.Core10.Enums.Result.EVENT_SET' | The event specified by @event@ is |+-- | | signaled. |+-- +---------------------------------------------------+-----------------------------------++-- | 'Graphics.Vulkan.Core10.Enums.Result.EVENT_RESET' | The event specified by @event@ is |+-- | | unsignaled. |+-- +---------------------------------------------------+-----------------------------------+ -- -- Event Object Status Codes --@@ -278,8 +269,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Event'-getEventStatus :: Device -> Event -> IO (Result)-getEventStatus device event = do+getEventStatus :: forall io . MonadIO io => Device -> Event -> io (Result)+getEventStatus device event = liftIO $ do let vkGetEventStatus' = mkVkGetEventStatus (pVkGetEventStatus (deviceCmds (device :: Device))) r <- vkGetEventStatus' (deviceHandle (device)) (event) when (r < SUCCESS) (throwIO (VulkanException r))@@ -297,35 +288,32 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the event.+-- - @device@ is the logical device that owns the event. ----- - 'Graphics.Vulkan.Core10.Handles.Event' is the event to set.+-- - @event@ is the event to set. -- -- = Description -- -- When 'setEvent' is executed on the host, it defines an /event signal -- operation/ which sets the event to the signaled state. ----- If 'Graphics.Vulkan.Core10.Handles.Event' is already in the signaled--- state when 'setEvent' is executed, then 'setEvent' has no effect, and no--- event signal operation occurs.+-- If @event@ is already in the signaled state when 'setEvent' is executed,+-- then 'setEvent' has no effect, and no event signal operation occurs. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.Event' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Event' handle+-- - @event@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Event'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.Event' /must/ have been created,--- allocated, or retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- - @event@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Event' /must/ be--- externally synchronized+-- - Host access to @event@ /must/ be externally synchronized -- -- == Return Codes --@@ -343,8 +331,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Event'-setEvent :: Device -> Event -> IO ()-setEvent device event = do+setEvent :: forall io . MonadIO io => Device -> Event -> io ()+setEvent device event = liftIO $ do let vkSetEvent' = mkVkSetEvent (pVkSetEvent (deviceCmds (device :: Device))) r <- vkSetEvent' (deviceHandle (device)) (event) when (r < SUCCESS) (throwIO (VulkanException r))@@ -361,41 +349,39 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the event.+-- - @device@ is the logical device that owns the event. ----- - 'Graphics.Vulkan.Core10.Handles.Event' is the event to reset.+-- - @event@ is the event to reset. -- -- = Description -- -- When 'resetEvent' is executed on the host, it defines an /event unsignal -- operation/ which resets the event to the unsignaled state. ----- If 'Graphics.Vulkan.Core10.Handles.Event' is already in the unsignaled--- state when 'resetEvent' is executed, then 'resetEvent' has no effect,--- and no event unsignal operation occurs.+-- If @event@ is already in the unsignaled state when 'resetEvent' is+-- executed, then 'resetEvent' has no effect, and no event unsignal+-- operation occurs. -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Handles.Event' /must/ not be waited on by a+-- - @event@ /must/ not be waited on by a -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdWaitEvents' command -- that is currently executing -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.Event' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Event' handle+-- - @event@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Event'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.Event' /must/ have been created,--- allocated, or retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- - @event@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Event' /must/ be--- externally synchronized+-- - Host access to @event@ /must/ be externally synchronized -- -- == Return Codes --@@ -413,8 +399,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Event'-resetEvent :: Device -> Event -> IO ()-resetEvent device event = do+resetEvent :: forall io . MonadIO io => Device -> Event -> io ()+resetEvent device event = liftIO $ do let vkResetEvent' = mkVkResetEvent (pVkResetEvent (deviceCmds (device :: Device))) r <- vkResetEvent' (deviceHandle (device)) (event) when (r < SUCCESS) (throwIO (VulkanException r))@@ -431,7 +417,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createEvent' data EventCreateInfo = EventCreateInfo- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: EventCreateFlags } deriving (Typeable) deriving instance Show EventCreateInfo
src/Graphics/Vulkan/Core10/ExtensionDiscovery.hs view
@@ -5,6 +5,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -18,9 +19,10 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Data.Vector (generateM)+import Foreign.C.Types (CChar(..))+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.C.Types (CChar)-import Foreign.C.Types (CChar(..)) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek)) import Foreign.Storable (Storable(poke))@@ -134,8 +136,8 @@ -- = See Also -- -- 'ExtensionProperties'-enumerateInstanceExtensionProperties :: ("layerName" ::: Maybe ByteString) -> IO (Result, ("properties" ::: Vector ExtensionProperties))-enumerateInstanceExtensionProperties layerName = evalContT $ do+enumerateInstanceExtensionProperties :: forall io . MonadIO io => ("layerName" ::: Maybe ByteString) -> io (Result, ("properties" ::: Vector ExtensionProperties))+enumerateInstanceExtensionProperties layerName = liftIO . evalContT $ do vkEnumerateInstanceExtensionProperties' <- lift $ mkVkEnumerateInstanceExtensionProperties . castFunPtr @_ @(("pLayerName" ::: Ptr CChar) -> ("pPropertyCount" ::: Ptr Word32) -> ("pProperties" ::: Ptr ExtensionProperties) -> IO Result) <$> getInstanceProcAddr' nullPtr (Ptr "vkEnumerateInstanceExtensionProperties"#) pLayerName <- case (layerName) of Nothing -> pure nullPtr@@ -165,8 +167,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device that will be queried.+-- - @physicalDevice@ is the physical device that will be queried. -- -- - @pLayerName@ is either @NULL@ or a pointer to a null-terminated -- UTF-8 string naming the layer to retrieve extensions from.@@ -192,7 +193,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - If @pLayerName@ is not @NULL@, @pLayerName@ /must/ be a@@ -223,8 +224,8 @@ -- = See Also -- -- 'ExtensionProperties', 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-enumerateDeviceExtensionProperties :: PhysicalDevice -> ("layerName" ::: Maybe ByteString) -> IO (Result, ("properties" ::: Vector ExtensionProperties))-enumerateDeviceExtensionProperties physicalDevice layerName = evalContT $ do+enumerateDeviceExtensionProperties :: forall io . MonadIO io => PhysicalDevice -> ("layerName" ::: Maybe ByteString) -> io (Result, ("properties" ::: Vector ExtensionProperties))+enumerateDeviceExtensionProperties physicalDevice layerName = liftIO . evalContT $ do let vkEnumerateDeviceExtensionProperties' = mkVkEnumerateDeviceExtensionProperties (pVkEnumerateDeviceExtensionProperties (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pLayerName <- case (layerName) of
src/Graphics/Vulkan/Core10/Fence.hs view
@@ -9,6 +9,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -22,6 +23,7 @@ import Control.Monad.Trans.Cont (evalContT) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable(peek))@@ -80,8 +82,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the fence.+-- - @device@ is the logical device that creates the fence. -- -- - @pCreateInfo@ is a pointer to a 'FenceCreateInfo' structure -- containing information about how the fence is to be created.@@ -95,8 +96,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid 'FenceCreateInfo' -- structure@@ -126,8 +127,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Fence', 'FenceCreateInfo'-createFence :: PokeChain a => Device -> FenceCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (Fence)-createFence device createInfo allocator = evalContT $ do+createFence :: forall a io . (PokeChain a, MonadIO io) => Device -> FenceCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Fence)+createFence device createInfo allocator = liftIO . evalContT $ do let vkCreateFence' = mkVkCreateFence (pVkCreateFence (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -142,11 +143,11 @@ -- | A safe wrapper for 'createFence' and 'destroyFence' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withFence :: PokeChain a => Device -> FenceCreateInfo a -> Maybe AllocationCallbacks -> (Fence -> IO r) -> IO r-withFence device fenceCreateInfo allocationCallbacks =+withFence :: forall a r . PokeChain a => Device -> FenceCreateInfo a -> Maybe AllocationCallbacks -> ((Fence) -> IO r) -> IO r+withFence device pCreateInfo pAllocator = bracket- (createFence device fenceCreateInfo allocationCallbacks)- (\o -> destroyFence device o allocationCallbacks)+ (createFence device pCreateInfo pAllocator)+ (\(o0) -> destroyFence device o0 pAllocator) foreign import ccall@@ -160,11 +161,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the fence.+-- - @device@ is the logical device that destroys the fence. ----- - 'Graphics.Vulkan.Core10.Handles.Fence' is the handle of the fence to--- destroy.+-- - @fence@ is the handle of the fence to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -174,49 +173,45 @@ -- -- - All -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#devsandqueues-submission queue submission>--- commands that refer to 'Graphics.Vulkan.Core10.Handles.Fence' /must/--- have completed execution+-- commands that refer to @fence@ /must/ have completed execution -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Fence' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @fence@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Fence' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @fence@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.Fence' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Fence' handle+-- - If @fence@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @fence@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Fence'+-- handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.Fence' is a valid handle, it--- /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @fence@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be--- externally synchronized+-- - Host access to @fence@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Fence'-destroyFence :: Device -> Fence -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyFence device fence allocator = evalContT $ do+destroyFence :: forall io . MonadIO io => Device -> Fence -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyFence device fence allocator = liftIO . evalContT $ do let vkDestroyFence' = mkVkDestroyFence (pVkDestroyFence (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -236,8 +231,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the fences.+-- - @device@ is the logical device that owns the fences. -- -- - @fenceCount@ is the number of fences to reset. --@@ -266,8 +260,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pFences@ /must/ be a valid pointer to an array of @fenceCount@ -- valid 'Graphics.Vulkan.Core10.Handles.Fence' handles@@ -275,7 +269,7 @@ -- - @fenceCount@ /must/ be greater than @0@ -- -- - Each element of @pFences@ /must/ have been created, allocated, or--- retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- retrieved from @device@ -- -- == Host Synchronization --@@ -298,8 +292,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Fence'-resetFences :: Device -> ("fences" ::: Vector Fence) -> IO ()-resetFences device fences = evalContT $ do+resetFences :: forall io . MonadIO io => Device -> ("fences" ::: Vector Fence) -> io ()+resetFences device fences = liftIO . evalContT $ do let vkResetFences' = mkVkResetFences (pVkResetFences (deviceCmds (device :: Device))) pPFences <- ContT $ allocaBytesAligned @Fence ((Data.Vector.length (fences)) * 8) 8 lift $ Data.Vector.imapM_ (\i e -> poke (pPFences `plusPtr` (8 * (i)) :: Ptr Fence) (e)) (fences)@@ -318,11 +312,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the fence.+-- - @device@ is the logical device that owns the fence. ----- - 'Graphics.Vulkan.Core10.Handles.Fence' is the handle of the fence to--- query.+-- - @fence@ is the handle of the fence to query. -- -- = Description --@@ -332,9 +324,9 @@ -- +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ -- | Status | Meaning | -- +=========================================================+========================================================================================================================+--- | 'Graphics.Vulkan.Core10.Enums.Result.SUCCESS' | The fence specified by 'Graphics.Vulkan.Core10.Handles.Fence' is signaled. |+-- | 'Graphics.Vulkan.Core10.Enums.Result.SUCCESS' | The fence specified by @fence@ is signaled. | -- +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--- | 'Graphics.Vulkan.Core10.Enums.Result.NOT_READY' | The fence specified by 'Graphics.Vulkan.Core10.Handles.Fence' is unsignaled. |+-- | 'Graphics.Vulkan.Core10.Enums.Result.NOT_READY' | The fence specified by @fence@ is unsignaled. | -- +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ -- | 'Graphics.Vulkan.Core10.Enums.Result.ERROR_DEVICE_LOST' | The device has been lost. See | -- | | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#devsandqueues-lost-device Lost Device>. |@@ -374,8 +366,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Fence'-getFenceStatus :: Device -> Fence -> IO (Result)-getFenceStatus device fence = do+getFenceStatus :: forall io . MonadIO io => Device -> Fence -> io (Result)+getFenceStatus device fence = liftIO $ do let vkGetFenceStatus' = mkVkGetFenceStatus (pVkGetFenceStatus (deviceCmds (device :: Device))) r <- vkGetFenceStatus' (deviceHandle (device)) (fence) when (r < SUCCESS) (throwIO (VulkanException r))@@ -393,8 +385,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the fences.+-- - @device@ is the logical device that owns the fences. -- -- - @fenceCount@ is the number of fences to wait on. --@@ -448,8 +439,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pFences@ /must/ be a valid pointer to an array of @fenceCount@ -- valid 'Graphics.Vulkan.Core10.Handles.Fence' handles@@ -457,7 +448,7 @@ -- - @fenceCount@ /must/ be greater than @0@ -- -- - Each element of @pFences@ /must/ have been created, allocated, or--- retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- retrieved from @device@ -- -- == Return Codes --@@ -480,8 +471,8 @@ -- 'Graphics.Vulkan.Core10.BaseType.Bool32', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Fence'-waitForFences :: Device -> ("fences" ::: Vector Fence) -> ("waitAll" ::: Bool) -> ("timeout" ::: Word64) -> IO (Result)-waitForFences device fences waitAll timeout = evalContT $ do+waitForFences :: forall io . MonadIO io => Device -> ("fences" ::: Vector Fence) -> ("waitAll" ::: Bool) -> ("timeout" ::: Word64) -> io (Result)+waitForFences device fences waitAll timeout = liftIO . evalContT $ do let vkWaitForFences' = mkVkWaitForFences (pVkWaitForFences (deviceCmds (device :: Device))) pPFences <- ContT $ allocaBytesAligned @Fence ((Data.Vector.length (fences)) * 8) 8 lift $ Data.Vector.imapM_ (\i e -> poke (pPFences `plusPtr` (8 * (i)) :: Ptr Fence) (e)) (fences)@@ -508,8 +499,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.FenceCreateFlagBits.FenceCreateFlagBits' -- values --@@ -521,7 +511,7 @@ data FenceCreateInfo (es :: [Type]) = FenceCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.FenceCreateFlagBits.FenceCreateFlagBits' -- specifying the initial state and behavior of the fence. flags :: FenceCreateFlags
src/Graphics/Vulkan/Core10/Image.hs view
@@ -9,6 +9,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -23,6 +24,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -95,8 +97,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the image.+-- - @device@ is the logical device that creates the image. -- -- - @pCreateInfo@ is a pointer to a 'ImageCreateInfo' structure -- containing parameters to be used to create the image.@@ -110,8 +111,7 @@ -- -- == Valid Usage ----- - If the 'Graphics.Vulkan.Core10.BaseType.Flags' member of--- @pCreateInfo@ includes+-- - If the @flags@ member of @pCreateInfo@ includes -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_BINDING_BIT', -- creating this 'Graphics.Vulkan.Core10.Handles.Image' /must/ not -- cause the total required sparse memory for all currently valid@@ -120,8 +120,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid 'ImageCreateInfo' -- structure@@ -151,8 +151,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Image', 'ImageCreateInfo'-createImage :: PokeChain a => Device -> ImageCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (Image)-createImage device createInfo allocator = evalContT $ do+createImage :: forall a io . (PokeChain a, MonadIO io) => Device -> ImageCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Image)+createImage device createInfo allocator = liftIO . evalContT $ do let vkCreateImage' = mkVkCreateImage (pVkCreateImage (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -167,11 +167,11 @@ -- | A safe wrapper for 'createImage' and 'destroyImage' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withImage :: PokeChain a => Device -> ImageCreateInfo a -> Maybe AllocationCallbacks -> (Image -> IO r) -> IO r-withImage device imageCreateInfo allocationCallbacks =+withImage :: forall a r . PokeChain a => Device -> ImageCreateInfo a -> Maybe AllocationCallbacks -> ((Image) -> IO r) -> IO r+withImage device pCreateInfo pAllocator = bracket- (createImage device imageCreateInfo allocationCallbacks)- (\o -> destroyImage device o allocationCallbacks)+ (createImage device pCreateInfo pAllocator)+ (\(o0) -> destroyImage device o0 pAllocator) foreign import ccall@@ -185,10 +185,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the image.+-- - @device@ is the logical device that destroys the image. ----- - 'Graphics.Vulkan.Core10.Handles.Image' is the image to destroy.+-- - @image@ is the image to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -196,51 +195,47 @@ -- -- == Valid Usage ----- - All submitted commands that refer to--- 'Graphics.Vulkan.Core10.Handles.Image', either directly or via a--- 'Graphics.Vulkan.Core10.Handles.ImageView', /must/ have completed+-- - All submitted commands that refer to @image@, either directly or via+-- a 'Graphics.Vulkan.Core10.Handles.ImageView', /must/ have completed -- execution -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Image' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @image@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Image' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @image@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle+-- - If @image@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is a valid handle, it--- /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @image@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Image' /must/ be--- externally synchronized+-- - Host access to @image@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Image'-destroyImage :: Device -> Image -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyImage device image allocator = evalContT $ do+destroyImage :: forall io . MonadIO io => Device -> Image -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyImage device image allocator = liftIO . evalContT $ do let vkDestroyImage' = mkVkDestroyImage (pVkDestroyImage (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -261,11 +256,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the image.+-- - @device@ is the logical device that owns the image. ----- - 'Graphics.Vulkan.Core10.Handles.Image' is the image whose layout is--- being queried.+-- - @image@ is the image whose layout is being queried. -- -- - @pSubresource@ is a pointer to a 'ImageSubresource' structure -- selecting a specific image for the image subresource.@@ -306,8 +299,7 @@ -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created with--- @tiling@ equal to+-- - @image@ /must/ have been created with @tiling@ equal to -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_LINEAR' or -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT' --@@ -315,25 +307,24 @@ -- bit set -- -- - The @mipLevel@ member of @pSubresource@ /must/ be less than the--- @mipLevels@ specified in 'ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created+-- @mipLevels@ specified in 'ImageCreateInfo' when @image@ was created -- -- - The @arrayLayer@ member of @pSubresource@ /must/ be less than the--- @arrayLayers@ specified in 'ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created+-- @arrayLayers@ specified in 'ImageCreateInfo' when @image@ was+-- created ----- - If the @tiling@ of the 'Graphics.Vulkan.Core10.Handles.Image' is+-- - If the @tiling@ of the @image@ is -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_LINEAR' and--- its 'Graphics.Vulkan.Core10.Enums.Format.Format' is a+-- its @format@ is a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format> -- with two planes, the @aspectMask@ member of @pSubresource@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT' ----- - If the @tiling@ of the 'Graphics.Vulkan.Core10.Handles.Image' is+-- - If the @tiling@ of the @image@ is -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_LINEAR' and--- its 'Graphics.Vulkan.Core10.Enums.Format.Format' is a+-- its @format@ is a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format> -- with three planes, the @aspectMask@ member of @pSubresource@ /must/ -- be@@ -342,29 +333,28 @@ -- or -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with the+-- - If @image@ was created with the -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID'--- external memory handle type, then--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ be bound to memory.+-- external memory handle type, then @image@ /must/ be bound to memory. ----- - If the @tiling@ of the 'Graphics.Vulkan.Core10.Handles.Image' is+-- - If the @tiling@ of the @image@ is -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT', -- then the @aspectMask@ member of @pSubresource@ /must/ be -- @VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT@ and the index @i@ /must/ be -- less than the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkDrmFormatModifierPropertiesEXT drmFormatModifierPlaneCount> -- associated with the image’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageCreateInfo >+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageCreateInfo format> -- and -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageDrmFormatModifierPropertiesEXT drmFormatModifier>. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle+-- - @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle -- -- - @pSubresource@ /must/ be a valid pointer to a valid -- 'ImageSubresource' structure@@ -372,16 +362,16 @@ -- - @pLayout@ /must/ be a valid pointer to a 'SubresourceLayout' -- structure ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created,--- allocated, or retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- - @image@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Image', 'ImageSubresource', -- 'SubresourceLayout'-getImageSubresourceLayout :: Device -> Image -> ImageSubresource -> IO (SubresourceLayout)-getImageSubresourceLayout device image subresource = evalContT $ do+getImageSubresourceLayout :: forall io . MonadIO io => Device -> Image -> ImageSubresource -> io (SubresourceLayout)+getImageSubresourceLayout device image subresource = liftIO . evalContT $ do let vkGetImageSubresourceLayout' = mkVkGetImageSubresourceLayout (pVkGetImageSubresourceLayout (deviceCmds (device :: Device))) pSubresource <- ContT $ withCStruct (subresource) pPLayout <- ContT (withZeroCStruct @SubresourceLayout)@@ -460,11 +450,10 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_LINEAR' /may/ not -- be supported unless other parameters meet all of the constraints: ----- - 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is+-- - @imageType@ is -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' is not a depth\/stencil--- format+-- - @format@ is not a depth\/stencil format -- -- - @mipLevels@ is 1 --@@ -478,8 +467,7 @@ -- and\/or -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT' ----- Images created with a 'Graphics.Vulkan.Core10.Enums.Format.Format' from--- one of those listed in+-- Images created with a @format@ from one of those listed in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion> -- have further restrictions on their limits and capabilities compared to -- images created with other formats. Creation of images with a format@@ -488,7 +476,7 @@ -- /may/ not be supported unless other parameters meet all of the -- constraints: ----- - 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is+-- - @imageType@ is -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' -- -- - @mipLevels@ is 1@@ -583,9 +571,7 @@ -- 'Graphics.Vulkan.Core10.DeviceInitialization.ImageFormatProperties'::@linearTilingFeatures@ -- found by calling -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceFormatProperties'--- with parameter 'Graphics.Vulkan.Core10.Enums.Format.Format'--- equal to--- 'ImageCreateInfo'::'Graphics.Vulkan.Core10.Enums.Format.Format'.+-- with parameter @format@ equal to 'ImageCreateInfo'::@format@. -- -- - If @tiling@ is -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_OPTIMAL',@@ -596,9 +582,7 @@ -- 'Graphics.Vulkan.Core10.DeviceInitialization.ImageFormatProperties'::@optimalTilingFeatures@ -- found by calling -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceFormatProperties'--- with parameter 'Graphics.Vulkan.Core10.Enums.Format.Format'--- equal to--- 'ImageCreateInfo'::'Graphics.Vulkan.Core10.Enums.Format.Format'.+-- with parameter @format@ equal to 'ImageCreateInfo'::@format@. -- -- - If @tiling@ is -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_OPTIMAL',@@ -617,10 +601,8 @@ -- calling -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceFormatProperties2' -- with--- 'Graphics.Vulkan.Core10.DeviceInitialization.ImageFormatProperties'::'Graphics.Vulkan.Core10.Enums.Format.Format'--- equal to--- 'ImageCreateInfo'::'Graphics.Vulkan.Core10.Enums.Format.Format'--- and with+-- 'Graphics.Vulkan.Core10.DeviceInitialization.ImageFormatProperties'::@format@+-- equal to 'ImageCreateInfo'::@format@ and with -- 'Graphics.Vulkan.Extensions.VK_EXT_image_drm_format_modifier.DrmFormatModifierPropertiesListEXT' -- chained into -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.ImageFormatProperties2';@@ -645,11 +627,9 @@ -- possibly multiple times, as follows: -- -- - The parameters--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceImageFormatInfo2'::'Graphics.Vulkan.Core10.Enums.Format.Format',--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType',--- @tiling@, @usage@, and--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be equal to--- those in 'ImageCreateInfo'.+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceImageFormatInfo2'::@format@,+-- @imageType@, @tiling@, @usage@, and @flags@ /must/ be equal+-- to those in 'ImageCreateInfo'. -- -- - If 'ImageCreateInfo'::@pNext@ contains a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExternalMemoryImageCreateInfo'@@ -680,16 +660,12 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceImageFormatInfo2'::@pNext@ -- /must/ contain a -- 'Graphics.Vulkan.Extensions.VK_EXT_image_drm_format_modifier.PhysicalDeviceImageDrmFormatModifierInfoEXT'--- structure where--- 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is--- equal to--- 'ImageCreateInfo'::'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode';--- and, if--- 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is+-- structure where @sharingMode@ is equal to+-- 'ImageCreateInfo'::@sharingMode@; and, if @sharingMode@ is -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- then @queueFamilyIndexCount@ and @pQueueFamilyIndices@ -- /must/ be equal to those in 'ImageCreateInfo'; and, if--- 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT', -- then the -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'@@ -770,35 +746,33 @@ -- @imageCreateMaxArrayLayers@, @imageCreateMaxExtent@, and -- @imageCreateSampleCounts@. ----- - If 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is+-- - If @sharingMode@ is -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- @pQueueFamilyIndices@ /must/ be a valid pointer to an array of -- @queueFamilyIndexCount@ @uint32_t@ values ----- - If 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is+-- - If @sharingMode@ is -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- @queueFamilyIndexCount@ /must/ be greater than @1@ ----- - If 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is+-- - If @sharingMode@ is -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- each element of @pQueueFamilyIndices@ /must/ be unique and /must/ be -- less than @pQueueFamilyPropertyCount@ returned by either -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceQueueFamilyProperties' -- or -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceQueueFamilyProperties2'--- for the 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' that was--- used to create 'Graphics.Vulkan.Core10.Handles.Device'+-- for the @physicalDevice@ that was used to create @device@ -- -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID'--- structure, and its @externalFormat@ member is non-zero the--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED'.+-- structure, and its @externalFormat@ member is non-zero the @format@+-- /must/ be 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED'. -- -- - If the @pNext@ chain does not include a -- 'Graphics.Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID' -- structure, or does and its @externalFormat@ member is @0@, the--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ not be+-- @format@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED'. -- -- - @extent.width@ /must/ be greater than @0@.@@ -811,19 +785,19 @@ -- -- - @arrayLayers@ /must/ be greater than @0@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CUBE_COMPATIBLE_BIT',--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' /must/ be+-- @imageType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT',--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' /must/ be+-- @imageType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT',--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' /must/ be+-- @imageType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' -- -- - @extent.width@ /must/ be less than or equal to@@ -838,18 +812,18 @@ -- @imageCreateMaxExtent.depth@ (as defined in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-creation-limits Image Creation Limits>). ----- - If 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and--- 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @imageType@ is+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' and @flags@+-- contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CUBE_COMPATIBLE_BIT', -- @extent.width@ and @extent.height@ /must/ be equal and @arrayLayers@ -- /must/ be greater than or equal to 6 ----- - If 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is+-- - If @imageType@ is -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', both -- @extent.height@ and @extent.depth@ /must/ be @1@ ----- - If 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is+-- - If @imageType@ is -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', -- @extent.depth@ /must/ be @1@ --@@ -865,15 +839,15 @@ -- @imageCreateMaxArrayLayers@ (as defined in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-creation-limits Image Creation Limits>). ----- - If 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is+-- - If @imageType@ is -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', -- @arrayLayers@ /must/ be @1@. -- -- - If @samples@ is not -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT',--- then 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' /must/ be--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- then @imageType@ /must/ be+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', @flags@+-- /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CUBE_COMPATIBLE_BIT', -- @mipLevels@ /must/ be equal to @1@, and @imageCreateMaybeLinear@ (as -- defined in@@ -943,78 +917,70 @@ -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-sparseBinding sparse bindings>--- feature is not enabled, 'Graphics.Vulkan.Core10.BaseType.Flags'--- /must/ not contain+-- feature is not enabled, @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_BINDING_BIT' -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-sparseResidencyAliased sparse aliased residency>--- feature is not enabled, 'Graphics.Vulkan.Core10.BaseType.Flags'--- /must/ not contain+-- feature is not enabled, @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_ALIASED_BIT' ----- - If 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- - If @imageType@ is+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D', @flags@+-- /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT' -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-sparseResidencyImage2D sparse residency for 2D images>--- feature is not enabled, and--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- feature is not enabled, and @imageType@ is+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', @flags@+-- /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT' -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-sparseResidencyImage3D sparse residency for 3D images>--- feature is not enabled, and--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is--- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- feature is not enabled, and @imageType@ is+-- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', @flags@+-- /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT' -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-sparseResidency2Samples sparse residency for images with 2 samples>--- feature is not enabled,--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is+-- feature is not enabled, @imageType@ is -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', and -- @samples@ is -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_2_BIT',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT' -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-sparseResidency4Samples sparse residency for images with 4 samples>--- feature is not enabled,--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is+-- feature is not enabled, @imageType@ is -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', and -- @samples@ is -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_4_BIT',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT' -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-sparseResidency8Samples sparse residency for images with 8 samples>--- feature is not enabled,--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is+-- feature is not enabled, @imageType@ is -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', and -- @samples@ is -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_8_BIT',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT' -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-sparseResidency16Samples sparse residency for images with 16 samples>--- feature is not enabled,--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is+-- feature is not enabled, @imageType@ is -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', and -- @samples@ is -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_16_BIT',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_ALIASED_BIT',@@ -1030,8 +996,8 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT' -- /must/ not also be set ----- - If the protected memory feature is not enabled,--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- - If the protected memory feature is not enabled, @flags@ /must/ not+-- contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_PROTECTED_BIT'. -- -- - If any of the bits@@ -1056,10 +1022,8 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.ExternalImageFormatProperties'::@externalMemoryProperties.compatibleHandleTypes@, -- as returned by -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'--- with 'Graphics.Vulkan.Core10.Enums.Format.Format',--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType', @tiling@,--- @usage@, and 'Graphics.Vulkan.Core10.BaseType.Flags' equal to those--- in this structure, and with a+-- with @format@, @imageType@, @tiling@, @usage@, and @flags@ equal to+-- those in this structure, and with a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.PhysicalDeviceExternalImageFormatInfo' -- structure included in the @pNext@ chain, with a @handleType@ equal -- to any one of the handle types specified in@@ -1072,40 +1036,37 @@ -- 'Graphics.Vulkan.Extensions.VK_NV_external_memory_capabilities.ExternalImageFormatPropertiesNV'::@externalMemoryProperties.compatibleHandleTypes@, -- as returned by -- 'Graphics.Vulkan.Extensions.VK_NV_external_memory_capabilities.getPhysicalDeviceExternalImageFormatPropertiesNV'--- with 'Graphics.Vulkan.Core10.Enums.Format.Format',--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType', @tiling@,--- @usage@, and 'Graphics.Vulkan.Core10.BaseType.Flags' equal to those--- in this structure, and with @externalHandleType@ equal to any one of--- the handle types specified in+-- with @format@, @imageType@, @tiling@, @usage@, and @flags@ equal to+-- those in this structure, and with @externalHandleType@ equal to any+-- one of the handle types specified in -- 'Graphics.Vulkan.Extensions.VK_NV_external_memory.ExternalMemoryImageCreateInfoNV'::@handleTypes@ -- -- - If the logical device was created with -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group_creation.DeviceGroupDeviceCreateInfo'::@physicalDeviceCount@--- equal to 1, 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not--- contain+-- equal to 1, @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT', -- then @mipLevels@ /must/ be one, @arrayLayers@ /must/ be one,--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' /must/ be+-- @imageType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D'. and -- @imageCreateMaybeLinear@ (as defined in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-creation-limits Image Creation Limits>) -- /must/ be @false@. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT',--- then 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be a+-- then @format@ /must/ be a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#appendix-compressedtex-bc block-compressed image format>, -- an -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#appendix-compressedtex-etc2 ETC compressed image format>, -- or an -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#appendix-compressedtex-astc ASTC compressed image format>. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT',--- then 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ also contain+-- then @flags@ /must/ also contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT'. -- -- - @initialLayout@ /must/ be@@ -1120,42 +1081,37 @@ -- /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_UNDEFINED' ----- - If the image 'Graphics.Vulkan.Core10.Enums.Format.Format' is one of--- those listed in+-- - If the image @format@ is one of those listed in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion>, -- then @mipLevels@ /must/ be 1 ----- - If the image 'Graphics.Vulkan.Core10.Enums.Format.Format' is one of--- those listed in+-- - If the image @format@ is one of those listed in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion>, -- @samples@ must be -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT' ----- - If the image 'Graphics.Vulkan.Core10.Enums.Format.Format' is one of--- those listed in+-- - If the image @format@ is one of those listed in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion>,--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' /must/ be+-- @imageType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' ----- - If the image 'Graphics.Vulkan.Core10.Enums.Format.Format' is one of--- those listed in+-- - If the image @format@ is one of those listed in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion>, -- and the @ycbcrImageArrays@ feature is not enabled, @arrayLayers@ -- /must/ be 1 ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a /multi-planar/--- format, and if @imageCreateFormatFeatures@ (as defined in+-- - If @format@ is a /multi-planar/ format, and if+-- @imageCreateFormatFeatures@ (as defined in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-creation-limits Image Creation Limits>) -- does not contain -- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_DISJOINT_BIT',--- then 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- then @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_DISJOINT_BIT' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is not a--- /multi-planar/ format, and 'Graphics.Vulkan.Core10.BaseType.Flags'--- does not include+-- - If @format@ is not a /multi-planar/ format, and @flags@ does not+-- include -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_ALIAS_BIT',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_DISJOINT_BIT' -- -- - If @tiling@ is@@ -1175,22 +1131,21 @@ -- -- - If @tiling@ is -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT'--- and 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- and @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT', -- then the @pNext@ chain /must/ include a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo' -- structure with non-zero @viewFormatCount@. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT'--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be a depth or--- depth\/stencil format+-- @format@ /must/ be a depth or depth\/stencil format -- -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExternalMemoryImageCreateInfo' -- structure whose @handleTypes@ member includes -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID',--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' /must/ be+-- @imageType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D'. -- -- - If the @pNext@ chain includes a@@ -1203,8 +1158,8 @@ -- -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID'--- structure whose @externalFormat@ member is not @0@,--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not include+-- structure whose @externalFormat@ member is not @0@, @flags@ /must/+-- not include -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT'. -- -- - If the @pNext@ chain includes a@@ -1218,8 +1173,7 @@ -- structure whose @externalFormat@ member is not @0@, @tiling@ /must/ -- be 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_OPTIMAL'. ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth-stencil--- format, @usage@ includes+-- - If @format@ is a depth-stencil format, @usage@ includes -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT', -- and the @pNext@ chain includes a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage.ImageStencilUsageCreateInfo'@@ -1228,8 +1182,7 @@ -- member /must/ also include -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth-stencil--- format, @usage@ does not include+-- - If @format@ is a depth-stencil format, @usage@ does not include -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT', -- and the @pNext@ chain includes a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage.ImageStencilUsageCreateInfo'@@ -1238,8 +1191,7 @@ -- member /must/ also not include -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth-stencil--- format, @usage@ includes+-- - If @format@ is a depth-stencil format, @usage@ includes -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT', -- and the @pNext@ chain includes a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage.ImageStencilUsageCreateInfo'@@ -1248,8 +1200,7 @@ -- member /must/ also include -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth-stencil--- format, @usage@ does not include+-- - If @format@ is a depth-stencil format, @usage@ does not include -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT', -- and the @pNext@ chain includes a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage.ImageStencilUsageCreateInfo'@@ -1266,8 +1217,8 @@ -- @extent.width@ /must/ be less than or equal to -- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxFramebufferWidth@ ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth-stencil--- format and the @pNext@ chain includes a+-- - If @format@ is a depth-stencil format and the @pNext@ chain includes+-- a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage.ImageStencilUsageCreateInfo' -- structure with its @stencilUsage@ member including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_INPUT_ATTACHMENT_BIT',@@ -1276,43 +1227,42 @@ -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-shaderStorageImageMultisample multisampled storage images>--- feature is not enabled, 'Graphics.Vulkan.Core10.Enums.Format.Format'--- is a depth-stencil format and the @pNext@ chain includes a+-- feature is not enabled, @format@ is a depth-stencil format and the+-- @pNext@ chain includes a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage.ImageStencilUsageCreateInfo' -- structure with its @stencilUsage@ including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_STORAGE_BIT', -- @samples@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV',--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' /must/ be+-- @imageType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' or -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV', -- it /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CUBE_COMPATIBLE_BIT'--- and the 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ not be a--- depth\/stencil format+-- and the @format@ /must/ not be a depth\/stencil format ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'--- and 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is+-- and @imageType@ is -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D', -- @extent.width@ and @extent.height@ /must/ be greater than @1@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'--- and 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is+-- and @imageType@ is -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D', -- @extent.width@, @extent.height@, and @extent.depth@ /must/ be -- greater than @1@ -- -- - If @usage@ includes -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV',--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' /must/ be+-- @imageType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D'. -- -- - If @usage@ includes@@ -1325,22 +1275,22 @@ -- @tiling@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_OPTIMAL'. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT', -- @tiling@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT',--- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' /must/ be+-- @imageType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CUBE_COMPATIBLE_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT', -- @mipLevels@ /must/ be @1@ --@@ -1366,15 +1316,14 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlagBits' -- values ----- - 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' /must/ be a valid+-- - @imageType@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' value ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be a valid+-- - @format@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value -- -- - @samples@ /must/ be a valid@@ -1390,8 +1339,8 @@ -- -- - @usage@ /must/ not be @0@ ----- - 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' /must/ be a--- valid 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' value+-- - @sharingMode@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' value -- -- - @initialLayout@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value@@ -1413,18 +1362,17 @@ data ImageCreateInfo (es :: [Type]) = ImageCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlagBits' -- describing additional parameters of the image. flags :: ImageCreateFlags- , -- | 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' is a- -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' value specifying the- -- basic dimensionality of the image. Layers in array textures do not count- -- as a dimension for the purposes of the image type.+ , -- | @imageType@ is a 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType'+ -- value specifying the basic dimensionality of the image. Layers in array+ -- textures do not count as a dimension for the purposes of the image type. imageType :: ImageType- , -- | 'Graphics.Vulkan.Core10.Enums.Format.Format' is a- -- 'Graphics.Vulkan.Core10.Enums.Format.Format' describing the format and- -- type of the texel blocks that will be contained in the image.+ , -- | @format@ is a 'Graphics.Vulkan.Core10.Enums.Format.Format' describing+ -- the format and type of the texel blocks that will be contained in the+ -- image. format :: Format , -- | @extent@ is a 'Graphics.Vulkan.Core10.SharedTypes.Extent3D' describing -- the number of data elements in each dimension of the base level.@@ -1446,14 +1394,13 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlagBits' -- describing the intended usage of the image. usage :: ImageUsageFlags- , -- | 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is a+ , -- | @sharingMode@ is a -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' value specifying -- the sharing mode of the image when it will be accessed by multiple queue -- families. sharingMode :: SharingMode , -- | @pQueueFamilyIndices@ is a list of queue families that will access this- -- image (ignored if 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode'- -- is not+ -- image (ignored if @sharingMode@ is not -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT'). queueFamilyIndices :: Vector Word32 , -- | @initialLayout@ is a@@ -1636,7 +1583,7 @@ -- plane index @i@ is defined by the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkDrmFormatModifierPropertiesEXT drmFormatModifierPlaneCount> -- associated with the image’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageCreateInfo >+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageCreateInfo format> -- and -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#glossary-drm-format-modifier modifier>. -- The memory range used by the subresource is described by @offset@ and
src/Graphics/Vulkan/Core10/ImageView.hs view
@@ -7,6 +7,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -18,6 +19,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -75,8 +77,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the image view.+-- - @device@ is the logical device that creates the image view. -- -- - @pCreateInfo@ is a pointer to a 'ImageViewCreateInfo' structure -- containing parameters to be used to create the image view.@@ -90,8 +91,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'ImageViewCreateInfo' structure@@ -121,8 +122,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.ImageView', 'ImageViewCreateInfo'-createImageView :: PokeChain a => Device -> ImageViewCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (ImageView)-createImageView device createInfo allocator = evalContT $ do+createImageView :: forall a io . (PokeChain a, MonadIO io) => Device -> ImageViewCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (ImageView)+createImageView device createInfo allocator = liftIO . evalContT $ do let vkCreateImageView' = mkVkCreateImageView (pVkCreateImageView (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -138,11 +139,11 @@ -- 'bracket' -- -- The allocated value must not be returned from the provided computation-withImageView :: PokeChain a => Device -> ImageViewCreateInfo a -> Maybe AllocationCallbacks -> (ImageView -> IO r) -> IO r-withImageView device imageViewCreateInfo allocationCallbacks =+withImageView :: forall a r . PokeChain a => Device -> ImageViewCreateInfo a -> Maybe AllocationCallbacks -> ((ImageView) -> IO r) -> IO r+withImageView device pCreateInfo pAllocator = bracket- (createImageView device imageViewCreateInfo allocationCallbacks)- (\o -> destroyImageView device o allocationCallbacks)+ (createImageView device pCreateInfo pAllocator)+ (\(o0) -> destroyImageView device o0 pAllocator) foreign import ccall@@ -156,11 +157,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the image view.+-- - @device@ is the logical device that destroys the image view. ----- - 'Graphics.Vulkan.Core10.Handles.ImageView' is the image view to--- destroy.+-- - @imageView@ is the image view to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -168,50 +167,46 @@ -- -- == Valid Usage ----- - All submitted commands that refer to--- 'Graphics.Vulkan.Core10.Handles.ImageView' /must/ have completed--- execution+-- - All submitted commands that refer to @imageView@ /must/ have+-- completed execution -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.ImageView' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @imageView@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.ImageView' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @imageView@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.ImageView' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.ImageView' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.ImageView' handle+-- - If @imageView@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @imageView@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.ImageView' handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.ImageView' is a valid handle, it--- /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @imageView@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.ImageView' /must/ be--- externally synchronized+-- - Host access to @imageView@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.ImageView'-destroyImageView :: Device -> ImageView -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyImageView device imageView allocator = evalContT $ do+destroyImageView :: forall io . MonadIO io => Device -> ImageView -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyImageView device imageView allocator = liftIO . evalContT $ do let vkDestroyImageView' = mkVkDestroyImageView (pVkDestroyImageView (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -292,11 +287,10 @@ -- -- = Description ----- Some of the 'Graphics.Vulkan.Core10.Handles.Image' creation parameters--- are inherited by the view. In particular, image view creation inherits--- the implicit parameter @usage@ specifying the allowed usages of the--- image view that, by default, takes the value of the corresponding--- @usage@ parameter specified in+-- Some of the @image@ creation parameters are inherited by the view. In+-- particular, image view creation inherits the implicit parameter @usage@+-- specifying the allowed usages of the image view that, by default, takes+-- the value of the corresponding @usage@ parameter specified in -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' at image creation time. -- If the image was has a depth-stencil format and was created with a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage.ImageStencilUsageCreateInfo'@@ -322,22 +316,19 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_maintenance2.ImageViewUsageCreateInfo' -- structure to the @pNext@ chain. ----- If 'Graphics.Vulkan.Core10.Handles.Image' was created with the+-- If @image@ was created with the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT'--- flag, and if the 'Graphics.Vulkan.Core10.Enums.Format.Format' of the--- image is not+-- flag, and if the @format@ of the image is not -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar>,--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /can/ be different from the--- image’s format, but if 'Graphics.Vulkan.Core10.Handles.Image' was+-- @format@ /can/ be different from the image’s format, but if @image@ was -- created without the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT' -- flag and they are not equal they /must/ be /compatible/. Image format -- compatibility is defined in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatibility-classes Format Compatibility Classes> -- section. Views of compatible formats will have the same mapping between--- texel coordinates and memory locations irrespective of the--- 'Graphics.Vulkan.Core10.Enums.Format.Format', with only the--- interpretation of the bit pattern changing.+-- texel coordinates and memory locations irrespective of the @format@,+-- with only the interpretation of the bit pattern changing. -- -- Note --@@ -350,12 +341,11 @@ -- exactly equal to -2b /may/ be changed to -2b + 1 as described in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-fixedfpconv Conversion from Normalized Fixed-Point to Floating-Point>. ----- If 'Graphics.Vulkan.Core10.Handles.Image' was created with the+-- If @image@ was created with the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT'--- flag, 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be--- /compatible/ with the image’s format as described above, or /must/ be an--- uncompressed format in which case it /must/ be /size-compatible/ with--- the image’s format, as defined for+-- flag, @format@ /must/ be /compatible/ with the image’s format as+-- described above, or /must/ be an uncompressed format in which case it+-- /must/ be /size-compatible/ with the image’s format, as defined for -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#copies-images-format-size-compatibility copying data between images> -- In this case the resulting image view’s texel dimensions equal the -- dimensions of the selected mip level divided by the compressed texel@@ -375,25 +365,22 @@ -- -- If the image has a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar>--- 'Graphics.Vulkan.Core10.Enums.Format.Format' and--- @subresourceRange.aspectMask@ is+-- @format@ and @subresourceRange.aspectMask@ is -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT',--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be identical to the--- image 'Graphics.Vulkan.Core10.Enums.Format.Format', and the sampler to+-- @format@ /must/ be identical to the image @format@, and the sampler to -- be used with the image view /must/ enable -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#samplers-YCbCr-conversion sampler Y′CBCR conversion>. ----- If 'Graphics.Vulkan.Core10.Handles.Image' was created with the+-- If @image@ was created with the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT' -- and the image has a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar>--- 'Graphics.Vulkan.Core10.Enums.Format.Format', and if--- @subresourceRange.aspectMask@ is+-- @format@, and if @subresourceRange.aspectMask@ is -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT', -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT', -- or -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT',--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be+-- @format@ /must/ be -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatible-planes compatible> -- with the corresponding plane of the image, and the sampler to be used -- with the image view /must/ not enable@@ -422,118 +409,105 @@ -- | Arrayed, | | | -- | MS | | | -- +==========+=========================================================================================+=========================================================================+--- | | 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' = | @baseArrayLayer@, @layerCount@, and @levelCount@ are members of the |--- | | ci.'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' | @subresourceRange@ member. |--- | | @width@ = ci.@extent.width@ | |+-- | | @imageType@ = ci.@imageType@ | @baseArrayLayer@, @layerCount@, and @levelCount@ are members of the |+-- | | @width@ = ci.@extent.width@ | @subresourceRange@ member. | -- | | @height@ = ci.@extent.height@ | | -- | | @depth@ = ci.@extent.depth@ | | -- | | @arrayLayers@ = ci.@arrayLayers@ | | -- | | @samples@ = ci.@samples@ | |--- | | 'Graphics.Vulkan.Core10.BaseType.Flags' = ci.'Graphics.Vulkan.Core10.BaseType.Flags' | |--- | | where ci is the 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' used to create | |--- | | 'Graphics.Vulkan.Core10.Handles.Image'. | |+-- | | @flags@ = ci.@flags@ | |+-- | | where ci is the 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' used to create @image@. | | -- +----------+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--- | __1D, 0, | 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' = | @viewType@ = |--- | 0__ | 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D' |--- | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 |--- | | @height@ = 1 | @layerCount@ = 1 |--- | | @depth@ = 1 | |+-- | __1D, 0, | @imageType@ = 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' | @viewType@ = |+-- | 0__ | @width@ ≥ 1 | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D' |+-- | | @height@ = 1 | @baseArrayLayer@ ≥ 0 |+-- | | @depth@ = 1 | @layerCount@ = 1 | -- | | @arrayLayers@ ≥ 1 | | -- | | @samples@ = 1 | | -- +----------+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--- | __1D, 1, | 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' = | @viewType@ = |--- | 0__ | 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY' |--- | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 |--- | | @height@ = 1 | @layerCount@ ≥ 1 |--- | | @depth@ = 1 | |+-- | __1D, 1, | @imageType@ = 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_1D' | @viewType@ = |+-- | 0__ | @width@ ≥ 1 | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY' |+-- | | @height@ = 1 | @baseArrayLayer@ ≥ 0 |+-- | | @depth@ = 1 | @layerCount@ ≥ 1 | -- | | @arrayLayers@ ≥ 1 | | -- | | @samples@ = 1 | | -- +----------+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--- | __2D, 0, | 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' = | @viewType@ = |--- | 0__ | 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' |--- | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 |--- | | @height@ ≥ 1 | @layerCount@ = 1 |--- | | @depth@ = 1 | |+-- | __2D, 0, | @imageType@ = 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' | @viewType@ = |+-- | 0__ | @width@ ≥ 1 | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' |+-- | | @height@ ≥ 1 | @baseArrayLayer@ ≥ 0 |+-- | | @depth@ = 1 | @layerCount@ = 1 | -- | | @arrayLayers@ ≥ 1 | | -- | | @samples@ = 1 | | -- +----------+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--- | __2D, 1, | 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' = | @viewType@ = |--- | 0__ | 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY' |--- | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 |--- | | @height@ ≥ 1 | @layerCount@ ≥ 1 |--- | | @depth@ = 1 | |+-- | __2D, 1, | @imageType@ = 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' | @viewType@ = |+-- | 0__ | @width@ ≥ 1 | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY' |+-- | | @height@ ≥ 1 | @baseArrayLayer@ ≥ 0 |+-- | | @depth@ = 1 | @layerCount@ ≥ 1 | -- | | @arrayLayers@ ≥ 1 | | -- | | @samples@ = 1 | | -- +----------+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--- | __2D, 0, | 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' = | @viewType@ = |--- | 1__ | 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' |--- | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 |--- | | @height@ ≥ 1 | @layerCount@ = 1 |--- | | @depth@ = 1 | |+-- | __2D, 0, | @imageType@ = 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' | @viewType@ = |+-- | 1__ | @width@ ≥ 1 | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' |+-- | | @height@ ≥ 1 | @baseArrayLayer@ ≥ 0 |+-- | | @depth@ = 1 | @layerCount@ = 1 | -- | | @arrayLayers@ ≥ 1 | | -- | | @samples@ > 1 | | -- +----------+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--- | __2D, 1, | 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' = | @viewType@ = |--- | 1__ | 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY' |--- | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 |--- | | @height@ ≥ 1 | @layerCount@ ≥ 1 |--- | | @depth@ = 1 | |+-- | __2D, 1, | @imageType@ = 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' | @viewType@ = |+-- | 1__ | @width@ ≥ 1 | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY' |+-- | | @height@ ≥ 1 | @baseArrayLayer@ ≥ 0 |+-- | | @depth@ = 1 | @layerCount@ ≥ 1 | -- | | @arrayLayers@ ≥ 1 | | -- | | @samples@ > 1 | | -- +----------+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--- | __CUBE, | 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' = | @viewType@ = |--- | 0, 0__ | 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE' |--- | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 |--- | | @height@ = @width@ | @layerCount@ = 6 |--- | | @depth@ = 1 | |+-- | __CUBE, | @imageType@ = 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' | @viewType@ = |+-- | 0, 0__ | @width@ ≥ 1 | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE' |+-- | | @height@ = @width@ | @baseArrayLayer@ ≥ 0 |+-- | | @depth@ = 1 | @layerCount@ = 6 | -- | | @arrayLayers@ ≥ 6 | | -- | | @samples@ = 1 | |--- | | 'Graphics.Vulkan.Core10.BaseType.Flags' includes | |+-- | | @flags@ includes | | -- | | 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CUBE_COMPATIBLE_BIT' | | -- +----------+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--- | __CUBE, | 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' = | @viewType@ = |--- | 1, 0__ | 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY' |--- | | @width@ ≥ 1 | @baseArrayLayer@ ≥ 0 |--- | | @height@ = width | @layerCount@ = 6 × /N/, /N/ ≥ 1 |--- | | @depth@ = 1 | |+-- | __CUBE, | @imageType@ = 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_2D' | @viewType@ = |+-- | 1, 0__ | @width@ ≥ 1 | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY' |+-- | | @height@ = width | @baseArrayLayer@ ≥ 0 |+-- | | @depth@ = 1 | @layerCount@ = 6 × /N/, /N/ ≥ 1 | -- | | /N/ ≥ 1 | | -- | | @arrayLayers@ ≥ 6 × /N/ | | -- | | @samples@ = 1 | |--- | | 'Graphics.Vulkan.Core10.BaseType.Flags' includes | |+-- | | @flags@ includes | | -- | | 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CUBE_COMPATIBLE_BIT' | | -- +----------+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--- | __3D, 0, | 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' = | @viewType@ = |--- | 0__ | 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D' |--- | | @width@ ≥ 1 | @baseArrayLayer@ = 0 |--- | | @height@ ≥ 1 | @layerCount@ = 1 |--- | | @depth@ ≥ 1 | |+-- | __3D, 0, | @imageType@ = 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' | @viewType@ = |+-- | 0__ | @width@ ≥ 1 | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D' |+-- | | @height@ ≥ 1 | @baseArrayLayer@ = 0 |+-- | | @depth@ ≥ 1 | @layerCount@ = 1 | -- | | @arrayLayers@ = 1 | | -- | | @samples@ = 1 | | -- +----------+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--- | __3D, 0, | 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' = | @viewType@ = |--- | 0__ | 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' |--- | | @width@ ≥ 1 | @levelCount@ = 1 |--- | | @height@ ≥ 1 | @baseArrayLayer@ ≥ 0 |--- | | @depth@ ≥ 1 | @layerCount@ = 1 |--- | | @arrayLayers@ = 1 | |+-- | __3D, 0, | @imageType@ = 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' | @viewType@ = |+-- | 0__ | @width@ ≥ 1 | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' |+-- | | @height@ ≥ 1 | @levelCount@ = 1 |+-- | | @depth@ ≥ 1 | @baseArrayLayer@ ≥ 0 |+-- | | @arrayLayers@ = 1 | @layerCount@ = 1 | -- | | @samples@ = 1 | |--- | | 'Graphics.Vulkan.Core10.BaseType.Flags' includes | |+-- | | @flags@ includes | | -- | | 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT' | |--- | | 'Graphics.Vulkan.Core10.BaseType.Flags' does not include | |+-- | | @flags@ does not include | | -- | | 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_BINDING_BIT', | | -- | | 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT', | | -- | | and 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_ALIASED_BIT' | | -- +----------+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--- | __3D, 0, | 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' = | @viewType@ = |--- | 0__ | 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY' |--- | | @width@ ≥ 1 | @levelCount@ = 1 |--- | | @height@ ≥ 1 | @baseArrayLayer@ ≥ 0 |--- | | @depth@ ≥ 1 | @layerCount@ ≥ 1 |--- | | @arrayLayers@ = 1 | |+-- | __3D, 0, | @imageType@ = 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' | @viewType@ = |+-- | 0__ | @width@ ≥ 1 | 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY' |+-- | | @height@ ≥ 1 | @levelCount@ = 1 |+-- | | @depth@ ≥ 1 | @baseArrayLayer@ ≥ 0 |+-- | | @arrayLayers@ = 1 | @layerCount@ ≥ 1 | -- | | @samples@ = 1 | |--- | | 'Graphics.Vulkan.Core10.BaseType.Flags' includes | |+-- | | @flags@ includes | | -- | | 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT' | |--- | | 'Graphics.Vulkan.Core10.BaseType.Flags' does not include | |+-- | | @flags@ does not include | | -- | | 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_BINDING_BIT', | | -- | | 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT', | | -- | | and 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_ALIASED_BIT' | |@@ -543,7 +517,7 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was not created with+-- - If @image@ was not created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CUBE_COMPATIBLE_BIT' -- then @viewType@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE' or@@ -554,15 +528,15 @@ -- feature is not enabled, @viewType@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with+-- - If @image@ was created with -- 'Graphics.Vulkan.Core10.Enums.ImageType.IMAGE_TYPE_3D' but without -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT' -- set then @viewType@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' or -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY' ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created with--- a @usage@ value containing at least one of+-- - @image@ /must/ have been created with a @usage@ value containing at+-- least one of -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT', -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_STORAGE_BIT', -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_COLOR_ATTACHMENT_BIT',@@ -615,35 +589,32 @@ -- -- - @subresourceRange.baseMipLevel@ /must/ be less than the @mipLevels@ -- specified in 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created+-- @image@ was created -- -- - If @subresourceRange.levelCount@ is not -- 'Graphics.Vulkan.Core10.APIConstants.REMAINING_MIP_LEVELS', -- @subresourceRange.baseMipLevel@ + @subresourceRange.levelCount@ -- /must/ be less than or equal to the @mipLevels@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with @usage@--- containing+-- - If @image@ was created with @usage@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT', -- @subresourceRange.levelCount@ /must/ be @1@ ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is not a 3D image created--- with+-- - If @image@ is not a 3D image created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT' -- set, or @viewType@ is not -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' or -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY', -- @subresourceRange.baseArrayLayer@ /must/ be less than the -- @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created -- -- - If @subresourceRange.layerCount@ is not -- 'Graphics.Vulkan.Core10.APIConstants.REMAINING_ARRAY_LAYERS',--- 'Graphics.Vulkan.Core10.Handles.Image' is not a 3D image created--- with+-- @image@ is not a 3D image created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT' -- set, or @viewType@ is not -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' or@@ -651,24 +622,23 @@ -- @subresourceRange.layerCount@ /must/ be non-zero and -- @subresourceRange.baseArrayLayer@ + @subresourceRange.layerCount@ -- /must/ be less than or equal to the @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is a 3D image created with+-- - If @image@ is a 3D image created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT' -- set, and @viewType@ is -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' or -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY', -- @subresourceRange.baseArrayLayer@ /must/ be less than the depth -- computed from @baseMipLevel@ and @extent.depth@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created, according to the--- formula defined in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created, according to the formula defined in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-miplevel-sizing Image Miplevel Sizing>. -- -- - If @subresourceRange.layerCount@ is not -- 'Graphics.Vulkan.Core10.APIConstants.REMAINING_ARRAY_LAYERS',--- 'Graphics.Vulkan.Core10.Handles.Image' is a 3D image created with+-- @image@ is a 3D image created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT' -- set, and @viewType@ is -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' or@@ -677,39 +647,33 @@ -- @subresourceRange.baseArrayLayer@ + @subresourceRange.layerCount@ -- /must/ be less than or equal to the depth computed from -- @baseMipLevel@ and @extent.depth@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created, according to the--- formula defined in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created, according to the formula defined in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-miplevel-sizing Image Miplevel Sizing>. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with the+-- - If @image@ was created with the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT'--- flag, 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be--- compatible with the 'Graphics.Vulkan.Core10.Enums.Format.Format'--- used to create 'Graphics.Vulkan.Core10.Handles.Image', as defined in+-- flag, @format@ /must/ be compatible with the @format@ used to create+-- @image@, as defined in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatibility-classes Format Compatibility Classes> ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with the+-- - If @image@ was created with the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT' -- flag, but without the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT'--- flag, and if the 'Graphics.Vulkan.Core10.Enums.Format.Format' of the--- 'Graphics.Vulkan.Core10.Handles.Image' is not a+-- flag, and if the @format@ of the @image@ is not a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar>--- format, 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be--- compatible with the 'Graphics.Vulkan.Core10.Enums.Format.Format'--- used to create 'Graphics.Vulkan.Core10.Handles.Image', as defined in+-- format, @format@ /must/ be compatible with the @format@ used to+-- create @image@, as defined in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatibility-classes Format Compatibility Classes> ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with the+-- - If @image@ was created with the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT'--- flag, 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be--- compatible with, or /must/ be an uncompressed format that is--- size-compatible with, the--- 'Graphics.Vulkan.Core10.Enums.Format.Format' used to create--- 'Graphics.Vulkan.Core10.Handles.Image'.+-- flag, @format@ /must/ be compatible with, or /must/ be an+-- uncompressed format that is size-compatible with, the @format@ used+-- to create @image@. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with the+-- - If @image@ was created with the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT' -- flag, the @levelCount@ and @layerCount@ members of -- @subresourceRange@ /must/ both be @1@.@@ -718,40 +682,33 @@ -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo' -- structure was included in the @pNext@ chain of the -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' structure used when--- creating 'Graphics.Vulkan.Core10.Handles.Image' and the--- @viewFormatCount@ field of+-- creating @image@ and the @viewFormatCount@ field of -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'--- is not zero then 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/--- be one of the formats in+-- is not zero then @format@ /must/ be one of the formats in -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'::@pViewFormats@. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with the+-- - If @image@ was created with the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT'--- flag, if the 'Graphics.Vulkan.Core10.Enums.Format.Format' of the--- 'Graphics.Vulkan.Core10.Handles.Image' is a+-- flag, if the @format@ of the @image@ is a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar> -- format, and if @subresourceRange.aspectMask@ is one of -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT', -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT', -- or -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT',--- then 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be--- compatible with the 'Graphics.Vulkan.Core10.Enums.Format.Format' for--- the plane of the 'Graphics.Vulkan.Core10.Handles.Image'--- 'Graphics.Vulkan.Core10.Enums.Format.Format' indicated by--- @subresourceRange.aspectMask@, as defined in+-- then @format@ /must/ be compatible with the+-- 'Graphics.Vulkan.Core10.Enums.Format.Format' for the plane of the+-- @image@ @format@ indicated by @subresourceRange.aspectMask@, as+-- defined in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatible-planes> ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was not created with the+-- - If @image@ was not created with the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT'--- flag, or if the 'Graphics.Vulkan.Core10.Enums.Format.Format' of the--- 'Graphics.Vulkan.Core10.Handles.Image' is a+-- flag, or if the @format@ of the @image@ is a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar> -- format and if @subresourceRange.aspectMask@ is -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT',--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be identical to--- the 'Graphics.Vulkan.Core10.Enums.Format.Format' used to create--- 'Graphics.Vulkan.Core10.Handles.Image'+-- @format@ /must/ be identical to the @format@ used to create @image@ -- -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionInfo'@@ -760,56 +717,53 @@ -- @components@ /must/ have the value -- 'Graphics.Vulkan.Core10.Enums.ComponentSwizzle.COMPONENT_SWIZZLE_IDENTITY'. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is non-sparse then it--- /must/ be bound completely and contiguously to a single+-- - If @image@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object -- -- - @subresourceRange@ and @viewType@ /must/ be compatible with the -- image, as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-views-compatibility compatibility table> ----- - If 'Graphics.Vulkan.Core10.Handles.Image' has an+-- - If @image@ has an -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-external-android-hardware-buffer-external-formats external format>,--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be+-- @format@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED'. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' has an+-- - If @image@ has an -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-external-android-hardware-buffer-external-formats external format>, -- the @pNext@ chain /must/ include a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionInfo' -- structure with a @conversion@ object created with the same external--- format as 'Graphics.Vulkan.Core10.Handles.Image'.+-- format as @image@. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' has an+-- - If @image@ has an -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-external-android-hardware-buffer-external-formats external format>, -- all members of @components@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ComponentSwizzle.COMPONENT_SWIZZLE_IDENTITY'. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with @usage@--- containing+-- - If @image@ was created with @usage@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV', -- @viewType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' or -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with @usage@--- containing+-- - If @image@ was created with @usage@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV',--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be+-- @format@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_R8_UINT' -- -- - If -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-fragmentdensitymapdynamic dynamic fragment density map>--- feature is not enabled, 'Graphics.Vulkan.Core10.BaseType.Flags'--- /must/ not contain+-- feature is not enabled, @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.ImageViewCreateFlagBits.IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT' -- -- - If -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-fragmentdensitymapdynamic dynamic fragment density map>--- feature is not enabled and 'Graphics.Vulkan.Core10.Handles.Image'--- was created with @usage@ containing+-- feature is not enabled and @image@ was created with @usage@+-- containing -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain any of+-- @flags@ /must/ not contain any of -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_PROTECTED_BIT', -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_BINDING_BIT', -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT',@@ -818,18 +772,17 @@ -- -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_maintenance2.ImageViewUsageCreateInfo'--- structure, and 'Graphics.Vulkan.Core10.Handles.Image' was not--- created with a+-- structure, and @image@ was not created with a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage.ImageStencilUsageCreateInfo' -- structure included in the @pNext@ chain of -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo', its @usage@ member -- /must/ not include any bits that were not set in the @usage@ member -- of the 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' structure used--- to create 'Graphics.Vulkan.Core10.Handles.Image'+-- to create @image@ -- -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_maintenance2.ImageViewUsageCreateInfo'--- structure, 'Graphics.Vulkan.Core10.Handles.Image' was created with a+-- structure, @image@ was created with a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage.ImageStencilUsageCreateInfo' -- structure included in the @pNext@ chain of -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo', and@@ -840,11 +793,11 @@ -- instance /must/ not include any bits that were not set in the -- @usage@ member of the -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage.ImageStencilUsageCreateInfo'--- structure used to create 'Graphics.Vulkan.Core10.Handles.Image'+-- structure used to create @image@ -- -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_maintenance2.ImageViewUsageCreateInfo'--- structure, 'Graphics.Vulkan.Core10.Handles.Image' was created with a+-- structure, @image@ was created with a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_separate_stencil_usage.ImageStencilUsageCreateInfo' -- structure included in the @pNext@ chain of -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo', and@@ -854,7 +807,7 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_maintenance2.ImageViewUsageCreateInfo' -- structure /must/ not include any bits that were not set in the -- @usage@ member of the 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'--- structure used to create 'Graphics.Vulkan.Core10.Handles.Image'+-- structure used to create @image@ -- -- == Valid Usage (Implicit) --@@ -872,18 +825,17 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.ImageViewCreateFlagBits.ImageViewCreateFlagBits' -- values ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle+-- - @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle -- -- - @viewType@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' value ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be a valid+-- - @format@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value -- -- - @components@ /must/ be a valid 'ComponentMapping' structure@@ -903,21 +855,19 @@ data ImageViewCreateInfo (es :: [Type]) = ImageViewCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.ImageViewCreateFlagBits.ImageViewCreateFlagBits' -- describing additional parameters of the image view. flags :: ImageViewCreateFlags- , -- | 'Graphics.Vulkan.Core10.Handles.Image' is a- -- 'Graphics.Vulkan.Core10.Handles.Image' on which the view will be- -- created.+ , -- | @image@ is a 'Graphics.Vulkan.Core10.Handles.Image' on which the view+ -- will be created. image :: Image , -- | @viewType@ is a -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' value -- specifying the type of the image view. viewType :: ImageViewType- , -- | 'Graphics.Vulkan.Core10.Enums.Format.Format' is a- -- 'Graphics.Vulkan.Core10.Enums.Format.Format' describing the format and- -- type used to interpret texel blocks in the image.+ , -- | @format@ is a 'Graphics.Vulkan.Core10.Enums.Format.Format' describing+ -- the format and type used to interpret texel blocks in the image. format :: Format , -- | @components@ is a 'ComponentMapping' specifies a remapping of color -- components (or of depth or stencil components after they have been
src/Graphics/Vulkan/Core10/LayerDiscovery.hs view
@@ -5,6 +5,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -17,6 +18,7 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Data.Vector (generateM)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.C.Types (CChar) import Foreign.Storable (Storable)@@ -118,8 +120,8 @@ -- = See Also -- -- 'LayerProperties'-enumerateInstanceLayerProperties :: IO (Result, ("properties" ::: Vector LayerProperties))-enumerateInstanceLayerProperties = evalContT $ do+enumerateInstanceLayerProperties :: forall io . MonadIO io => io (Result, ("properties" ::: Vector LayerProperties))+enumerateInstanceLayerProperties = liftIO . evalContT $ do vkEnumerateInstanceLayerProperties' <- lift $ mkVkEnumerateInstanceLayerProperties . castFunPtr @_ @(("pPropertyCount" ::: Ptr Word32) -> ("pProperties" ::: Ptr LayerProperties) -> IO Result) <$> getInstanceProcAddr' nullPtr (Ptr "vkEnumerateInstanceLayerProperties"#) pPPropertyCount <- ContT $ bracket (callocBytes @Word32 4) free r <- lift $ vkEnumerateInstanceLayerProperties' (pPPropertyCount) (nullPtr)@@ -174,7 +176,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pPropertyCount@ /must/ be a valid pointer to a @uint32_t@ value@@ -200,8 +202,8 @@ -- = See Also -- -- 'LayerProperties', 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-enumerateDeviceLayerProperties :: PhysicalDevice -> IO (Result, ("properties" ::: Vector LayerProperties))-enumerateDeviceLayerProperties physicalDevice = evalContT $ do+enumerateDeviceLayerProperties :: forall io . MonadIO io => PhysicalDevice -> io (Result, ("properties" ::: Vector LayerProperties))+enumerateDeviceLayerProperties physicalDevice = liftIO . evalContT $ do let vkEnumerateDeviceLayerProperties' = mkVkEnumerateDeviceLayerProperties (pVkEnumerateDeviceLayerProperties (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPPropertyCount <- ContT $ bracket (callocBytes @Word32 4) free
src/Graphics/Vulkan/Core10/Memory.hs view
@@ -13,6 +13,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -26,6 +27,7 @@ import Control.Monad.Trans.Cont (evalContT) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -99,8 +101,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the memory.+-- - @device@ is the logical device that owns the memory. -- -- - @pAllocateInfo@ is a pointer to a 'MemoryAllocateInfo' structure -- describing parameters of the allocation. A successful returned@@ -173,14 +174,14 @@ -- as returned by -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceMemoryProperties' -- for the 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' that--- 'Graphics.Vulkan.Core10.Handles.Device' was created from.+-- @device@ was created from. -- -- - @pAllocateInfo->memoryTypeIndex@ /must/ be less than -- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceMemoryProperties'::@memoryTypeCount@ -- as returned by -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceMemoryProperties' -- for the 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' that--- 'Graphics.Vulkan.Core10.Handles.Device' was created from.+-- @device@ was created from. -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-deviceCoherentMemory deviceCoherentMemory>@@ -190,8 +191,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pAllocateInfo@ /must/ be a valid pointer to a valid -- 'MemoryAllocateInfo' structure@@ -227,8 +228,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory', 'MemoryAllocateInfo'-allocateMemory :: PokeChain a => Device -> MemoryAllocateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (DeviceMemory)-allocateMemory device allocateInfo allocator = evalContT $ do+allocateMemory :: forall a io . (PokeChain a, MonadIO io) => Device -> MemoryAllocateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (DeviceMemory)+allocateMemory device allocateInfo allocator = liftIO . evalContT $ do let vkAllocateMemory' = mkVkAllocateMemory (pVkAllocateMemory (deviceCmds (device :: Device))) pAllocateInfo <- ContT $ withCStruct (allocateInfo) pAllocator <- case (allocator) of@@ -243,11 +244,11 @@ -- | A safe wrapper for 'allocateMemory' and 'freeMemory' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withMemory :: PokeChain a => Device -> MemoryAllocateInfo a -> Maybe AllocationCallbacks -> (DeviceMemory -> IO r) -> IO r-withMemory device memoryAllocateInfo allocationCallbacks =+withMemory :: forall a r . PokeChain a => Device -> MemoryAllocateInfo a -> Maybe AllocationCallbacks -> ((DeviceMemory) -> IO r) -> IO r+withMemory device pAllocateInfo pAllocator = bracket- (allocateMemory device memoryAllocateInfo allocationCallbacks)- (\o -> freeMemory device o allocationCallbacks)+ (allocateMemory device pAllocateInfo pAllocator)+ (\(o0) -> freeMemory device o0 pAllocator) foreign import ccall@@ -261,8 +262,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the memory.+-- - @device@ is the logical device that owns the memory. -- -- - @memory@ is the 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object -- to be freed.@@ -305,8 +305,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - If @memory@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @memory@ /must/@@ -318,7 +318,7 @@ -- structure -- -- - If @memory@ is a valid handle, it /must/ have been created,--- allocated, or retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- allocated, or retrieved from @device@ -- -- == Host Synchronization --@@ -329,8 +329,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory'-freeMemory :: Device -> DeviceMemory -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-freeMemory device memory allocator = evalContT $ do+freeMemory :: forall io . MonadIO io => Device -> DeviceMemory -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+freeMemory device memory allocator = liftIO . evalContT $ do let vkFreeMemory' = mkVkFreeMemory (pVkFreeMemory (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -350,8 +350,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the memory.+-- - @device@ is the logical device that owns the memory. -- -- - @memory@ is the 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object -- to be mapped.@@ -363,7 +362,7 @@ -- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE' to map from -- @offset@ to the end of the allocation. ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+-- - @flags@ is reserved for future use. -- -- - @ppData@ is a pointer to a @void *@ variable in which is returned a -- host-accessible pointer to the beginning of the mapped range. This@@ -440,18 +439,18 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @memory@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - @ppData@ /must/ be a valid pointer to a pointer value -- -- - @memory@ /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- @device@ -- -- == Host Synchronization --@@ -477,8 +476,8 @@ -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize', -- 'Graphics.Vulkan.Core10.Enums.MemoryMapFlags.MemoryMapFlags'-mapMemory :: Device -> DeviceMemory -> ("offset" ::: DeviceSize) -> DeviceSize -> MemoryMapFlags -> IO (("data" ::: Ptr ()))-mapMemory device memory offset size flags = evalContT $ do+mapMemory :: forall io . MonadIO io => Device -> DeviceMemory -> ("offset" ::: DeviceSize) -> DeviceSize -> MemoryMapFlags -> io (("data" ::: Ptr ()))+mapMemory device memory offset size flags = liftIO . evalContT $ do let vkMapMemory' = mkVkMapMemory (pVkMapMemory (deviceCmds (device :: Device))) pPpData <- ContT $ bracket (callocBytes @(Ptr ()) 8) free r <- lift $ vkMapMemory' (deviceHandle (device)) (memory) (offset) (size) (flags) (pPpData)@@ -489,11 +488,11 @@ -- | A safe wrapper for 'mapMemory' and 'unmapMemory' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withMappedMemory :: Device -> DeviceMemory -> DeviceSize -> DeviceSize -> MemoryMapFlags -> (Ptr () -> IO r) -> IO r-withMappedMemory device deviceMemory offset' size' flags' =+withMappedMemory :: forall r . Device -> DeviceMemory -> DeviceSize -> DeviceSize -> MemoryMapFlags -> ((Ptr ()) -> IO r) -> IO r+withMappedMemory device memory offset size flags = bracket- (mapMemory device deviceMemory offset' size' flags')- (\_ -> unmapMemory device deviceMemory)+ (mapMemory device memory offset size flags)+ (\(_) -> unmapMemory device memory) foreign import ccall@@ -507,8 +506,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the memory.+-- - @device@ is the logical device that owns the memory. -- -- - @memory@ is the memory object to be unmapped. --@@ -518,14 +516,14 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @memory@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' handle -- -- - @memory@ /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- @device@ -- -- == Host Synchronization --@@ -535,8 +533,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory'-unmapMemory :: Device -> DeviceMemory -> IO ()-unmapMemory device memory = do+unmapMemory :: forall io . MonadIO io => Device -> DeviceMemory -> io ()+unmapMemory device memory = liftIO $ do let vkUnmapMemory' = mkVkUnmapMemory (pVkUnmapMemory (deviceCmds (device :: Device))) vkUnmapMemory' (deviceHandle (device)) (memory) pure $ ()@@ -553,8 +551,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the memory ranges.+-- - @device@ is the logical device that owns the memory ranges. -- -- - @memoryRangeCount@ is the length of the @pMemoryRanges@ array. --@@ -607,8 +604,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'MappedMemoryRange'-flushMappedMemoryRanges :: Device -> ("memoryRanges" ::: Vector MappedMemoryRange) -> IO ()-flushMappedMemoryRanges device memoryRanges = evalContT $ do+flushMappedMemoryRanges :: forall io . MonadIO io => Device -> ("memoryRanges" ::: Vector MappedMemoryRange) -> io ()+flushMappedMemoryRanges device memoryRanges = liftIO . evalContT $ do let vkFlushMappedMemoryRanges' = mkVkFlushMappedMemoryRanges (pVkFlushMappedMemoryRanges (deviceCmds (device :: Device))) pPMemoryRanges <- ContT $ allocaBytesAligned @MappedMemoryRange ((Data.Vector.length (memoryRanges)) * 40) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPMemoryRanges `plusPtr` (40 * (i)) :: Ptr MappedMemoryRange) (e) . ($ ())) (memoryRanges)@@ -628,8 +625,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the memory ranges.+-- - @device@ is the logical device that owns the memory ranges. -- -- - @memoryRangeCount@ is the length of the @pMemoryRanges@ array. --@@ -672,8 +668,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'MappedMemoryRange'-invalidateMappedMemoryRanges :: Device -> ("memoryRanges" ::: Vector MappedMemoryRange) -> IO ()-invalidateMappedMemoryRanges device memoryRanges = evalContT $ do+invalidateMappedMemoryRanges :: forall io . MonadIO io => Device -> ("memoryRanges" ::: Vector MappedMemoryRange) -> io ()+invalidateMappedMemoryRanges device memoryRanges = liftIO . evalContT $ do let vkInvalidateMappedMemoryRanges' = mkVkInvalidateMappedMemoryRanges (pVkInvalidateMappedMemoryRanges (deviceCmds (device :: Device))) pPMemoryRanges <- ContT $ allocaBytesAligned @MappedMemoryRange ((Data.Vector.length (memoryRanges)) * 40) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPMemoryRanges `plusPtr` (40 * (i)) :: Ptr MappedMemoryRange) (e) . ($ ())) (memoryRanges)@@ -693,8 +689,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the memory.+-- - @device@ is the logical device that owns the memory. -- -- - @memory@ is the memory object being queried. --@@ -718,8 +713,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-getDeviceMemoryCommitment :: Device -> DeviceMemory -> IO (("committedMemoryInBytes" ::: DeviceSize))-getDeviceMemoryCommitment device memory = evalContT $ do+getDeviceMemoryCommitment :: forall io . MonadIO io => Device -> DeviceMemory -> io (("committedMemoryInBytes" ::: DeviceSize))+getDeviceMemoryCommitment device memory = liftIO . evalContT $ do let vkGetDeviceMemoryCommitment' = mkVkGetDeviceMemoryCommitment (pVkGetDeviceMemoryCommitment (deviceCmds (device :: Device))) pPCommittedMemoryInBytes <- ContT $ bracket (callocBytes @DeviceSize 8) free lift $ vkGetDeviceMemoryCommitment' (deviceHandle (device)) (memory) (pPCommittedMemoryInBytes)@@ -745,7 +740,7 @@ -- with a non-zero @handleType@ value -- -- - 'Graphics.Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ImportAndroidHardwareBufferInfoANDROID'--- with a non-@NULL@ 'Graphics.Vulkan.Core10.Handles.Buffer' value+-- with a non-@NULL@ @buffer@ value -- -- Importing memory /must/ not modify the content of the memory. -- Implementations /must/ ensure that importing memory does not enable the@@ -792,9 +787,8 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo' -- or -- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationMemoryAllocateInfoNV'--- structure with either its 'Graphics.Vulkan.Core10.Handles.Image' or--- 'Graphics.Vulkan.Core10.Handles.Buffer' member set to a value other--- than 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'.+-- structure with either its @image@ or @buffer@ member set to a value+-- other than 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'. -- -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExportMemoryAllocateInfo'@@ -853,8 +847,7 @@ -- or -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT', -- @allocationSize@ /must/ match the size reported in the memory--- requirements of the 'Graphics.Vulkan.Core10.Handles.Image' or--- 'Graphics.Vulkan.Core10.Handles.Buffer' member of the+-- requirements of the @image@ or @buffer@ member of the -- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationMemoryAllocateInfoNV' -- structure included in the @pNext@ chain. --@@ -886,16 +879,14 @@ -- - If the parameters define an import operation and the external handle -- is a host pointer, the @pNext@ chain /must/ not include a -- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationMemoryAllocateInfoNV'--- structure with either its 'Graphics.Vulkan.Core10.Handles.Image' or--- 'Graphics.Vulkan.Core10.Handles.Buffer' field set to a value other--- than 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'.+-- structure with either its @image@ or @buffer@ field set to a value+-- other than 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'. -- -- - If the parameters define an import operation and the external handle -- is a host pointer, the @pNext@ chain /must/ not include a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'--- structure with either its 'Graphics.Vulkan.Core10.Handles.Image' or--- 'Graphics.Vulkan.Core10.Handles.Buffer' field set to a value other--- than 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'.+-- structure with either its @image@ or @buffer@ field set to a value+-- other than 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'. -- -- - If the parameters define an import operation and the external handle -- type is@@ -910,13 +901,11 @@ -- and the @pNext@ chain does not include a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo' -- structure or--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Image'+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@image@ -- is 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', the Android--- hardware buffer /must/ have a--- @AHardwareBuffer_Desc@::'Graphics.Vulkan.Core10.Enums.Format.Format'--- of @AHARDWAREBUFFER_FORMAT_BLOB@ and a--- @AHardwareBuffer_Desc@::@usage@ that includes--- @AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER@.+-- hardware buffer /must/ have a @AHardwareBuffer_Desc@::@format@ of+-- @AHARDWAREBUFFER_FORMAT_BLOB@ and a @AHardwareBuffer_Desc@::@usage@+-- that includes @AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER@. -- -- - If the parameters define an import operation and the external handle -- type is@@ -933,7 +922,7 @@ -- included in its @handleTypes@ member, and the @pNext@ chain includes -- a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'--- structure with 'Graphics.Vulkan.Core10.Handles.Image' not equal to+-- structure with @image@ not equal to -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', then -- @allocationSize@ /must/ be @0@, otherwise @allocationSize@ /must/ be -- greater than @0@.@@ -941,7 +930,7 @@ -- - If the parameters define an import operation, the external handle is -- an Android hardware buffer, and the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'--- with 'Graphics.Vulkan.Core10.Handles.Image' that is not+-- with @image@ that is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', the Android -- hardware buffer’s -- 'Graphics.Vulkan.Extensions.WSITypes.AHardwareBuffer'::@usage@@@ -952,54 +941,50 @@ -- - If the parameters define an import operation, the external handle is -- an Android hardware buffer, and the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'--- with 'Graphics.Vulkan.Core10.Handles.Image' that is not+-- with @image@ that is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', the format of--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ be+-- @image@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED' or the format -- returned by -- 'Graphics.Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.getAndroidHardwareBufferPropertiesANDROID' -- in--- 'Graphics.Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.AndroidHardwareBufferFormatPropertiesANDROID'::'Graphics.Vulkan.Core10.Enums.Format.Format'+-- 'Graphics.Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.AndroidHardwareBufferFormatPropertiesANDROID'::@format@ -- for the Android hardware buffer. -- -- - If the parameters define an import operation, the external handle is -- an Android hardware buffer, and the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'--- structure with 'Graphics.Vulkan.Core10.Handles.Image' that is not+-- structure with @image@ that is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', the width,--- height, and array layer dimensions of--- 'Graphics.Vulkan.Core10.Handles.Image' and the Android hardware--- buffer’s @AHardwareBuffer_Desc@ /must/ be identical.+-- height, and array layer dimensions of @image@ and the Android+-- hardware buffer’s @AHardwareBuffer_Desc@ /must/ be identical. -- -- - If the parameters define an import operation, the external handle is -- an Android hardware buffer, and the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'--- structure with 'Graphics.Vulkan.Core10.Handles.Image' that is not+-- structure with @image@ that is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', and the Android -- hardware buffer’s -- 'Graphics.Vulkan.Extensions.WSITypes.AHardwareBuffer'::@usage@--- includes @AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE@, the--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ have a complete mipmap--- chain.+-- includes @AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE@, the @image@+-- /must/ have a complete mipmap chain. -- -- - If the parameters define an import operation, the external handle is -- an Android hardware buffer, and the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'--- structure with 'Graphics.Vulkan.Core10.Handles.Image' that is not+-- structure with @image@ that is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', and the Android -- hardware buffer’s -- 'Graphics.Vulkan.Extensions.WSITypes.AHardwareBuffer'::@usage@ does--- not include @AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE@, the--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ have exactly one--- mipmap level.+-- not include @AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE@, the @image@+-- /must/ have exactly one mipmap level. -- -- - If the parameters define an import operation, the external handle is -- an Android hardware buffer, and the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'--- structure with 'Graphics.Vulkan.Core10.Handles.Image' that is not+-- structure with @image@ that is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', each bit set in--- the usage of 'Graphics.Vulkan.Core10.Handles.Image' /must/ be listed--- in+-- the usage of @image@ /must/ be listed in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-external-android-hardware-buffer-usage AHardwareBuffer Usage Equivalence>, -- and if there is a corresponding @AHARDWAREBUFFER_USAGE@ bit listed -- that bit /must/ be included in the Android hardware buffer’s@@ -1008,12 +993,12 @@ -- - If -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address.MemoryOpaqueCaptureAddressAllocateInfo'::@opaqueCaptureAddress@ -- is not zero,--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.MemoryAllocateFlagsInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.MemoryAllocateFlagsInfo'::@flags@ -- /must/ include -- 'Graphics.Vulkan.Core11.Enums.MemoryAllocateFlagBits.MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT' -- -- - If--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.MemoryAllocateFlagsInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.MemoryAllocateFlagsInfo'::@flags@ -- includes -- 'Graphics.Vulkan.Core11.Enums.MemoryAllocateFlagBits.MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT', -- the@@ -1021,7 +1006,7 @@ -- feature /must/ be enabled -- -- - If--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.MemoryAllocateFlagsInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.MemoryAllocateFlagsInfo'::@flags@ -- includes -- 'Graphics.Vulkan.Core11.Enums.MemoryAllocateFlagBits.MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT', -- the
src/Graphics/Vulkan/Core10/MemoryManagement.hs view
@@ -6,12 +6,14 @@ , MemoryRequirements(..) ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import GHC.Base (when) import GHC.IO (throwIO) import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -58,10 +60,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the buffer.+-- - @device@ is the logical device that owns the buffer. ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' is the buffer to query.+-- - @buffer@ is the buffer to query. -- -- - @pMemoryRequirements@ is a pointer to a 'MemoryRequirements' -- structure in which the memory requirements of the buffer object are@@ -73,8 +74,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'Graphics.Vulkan.Core10.Handles.Device', 'MemoryRequirements'-getBufferMemoryRequirements :: Device -> Buffer -> IO (MemoryRequirements)-getBufferMemoryRequirements device buffer = evalContT $ do+getBufferMemoryRequirements :: forall io . MonadIO io => Device -> Buffer -> io (MemoryRequirements)+getBufferMemoryRequirements device buffer = liftIO . evalContT $ do let vkGetBufferMemoryRequirements' = mkVkGetBufferMemoryRequirements (pVkGetBufferMemoryRequirements (deviceCmds (device :: Device))) pPMemoryRequirements <- ContT (withZeroCStruct @MemoryRequirements) lift $ vkGetBufferMemoryRequirements' (deviceHandle (device)) (buffer) (pPMemoryRequirements)@@ -93,11 +94,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the buffer and memory.+-- - @device@ is the logical device that owns the buffer and memory. ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' is the buffer to be attached--- to memory.+-- - @buffer@ is the buffer to be attached to memory. -- -- - @memory@ is a 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object -- describing the device memory to attach.@@ -116,47 +115,42 @@ -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ not already be backed--- by a memory object+-- - @buffer@ /must/ not already be backed by a memory object ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ not have been created--- with any sparse memory binding flags+-- - @buffer@ /must/ not have been created with any sparse memory binding+-- flags -- -- - @memoryOffset@ /must/ be less than the size of @memory@ -- -- - @memory@ /must/ have been allocated using one of the memory types -- allowed in the @memoryTypeBits@ member of the 'MemoryRequirements' -- structure returned from a call to 'getBufferMemoryRequirements' with--- 'Graphics.Vulkan.Core10.Handles.Buffer'+-- @buffer@ -- -- - @memoryOffset@ /must/ be an integer multiple of the @alignment@ -- member of the 'MemoryRequirements' structure returned from a call to--- 'getBufferMemoryRequirements' with--- 'Graphics.Vulkan.Core10.Handles.Buffer'+-- 'getBufferMemoryRequirements' with @buffer@ -- -- - The @size@ member of the 'MemoryRequirements' structure returned--- from a call to 'getBufferMemoryRequirements' with--- 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be less than or equal--- to the size of @memory@ minus @memoryOffset@+-- from a call to 'getBufferMemoryRequirements' with @buffer@ /must/ be+-- less than or equal to the size of @memory@ minus @memoryOffset@ ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' requires a dedicated--- allocation(as reported by+-- - If @buffer@ requires a dedicated allocation(as reported by -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.getBufferMemoryRequirements2' -- in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedRequirements'::requiresDedicatedAllocation--- for 'Graphics.Vulkan.Core10.Handles.Buffer'), @memory@ /must/ have--- been created with--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Buffer'--- equal to 'Graphics.Vulkan.Core10.Handles.Buffer'+-- for @buffer@), @memory@ /must/ have been created with+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@buffer@+-- equal to @buffer@ -- -- - If the 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' provided -- when @memory@ was allocated included a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo' -- structure in its @pNext@ chain, and--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Buffer'+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@buffer@ -- was not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', then--- 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ equal--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Buffer',+-- @buffer@ /must/ equal+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@buffer@, -- and @memoryOffset@ /must/ be zero. -- -- - If buffer was created with the@@ -171,31 +165,29 @@ -- created with a memory type that reports -- 'Graphics.Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_PROTECTED_BIT' ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' was created with+-- - If @buffer@ was created with -- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationBufferCreateInfoNV'::@dedicatedAllocation@ -- equal to 'Graphics.Vulkan.Core10.BaseType.TRUE', @memory@ /must/ -- have been created with--- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationMemoryAllocateInfoNV'::'Graphics.Vulkan.Core10.Handles.Buffer'+-- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationMemoryAllocateInfoNV'::@buffer@ -- equal to a buffer handle created with identical creation parameters--- to 'Graphics.Vulkan.Core10.Handles.Buffer' and @memoryOffset@ /must/--- be zero+-- to @buffer@ and @memoryOffset@ /must/ be zero -- -- - If the value of -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExportMemoryAllocateInfo'::@handleTypes@ -- used to allocate @memory@ is not @0@, it /must/ include at least one -- of the handles set in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExternalMemoryBufferCreateInfo'::@handleTypes@--- when 'Graphics.Vulkan.Core10.Handles.Buffer' was created+-- when @buffer@ was created -- -- - If @memory@ was created by a memory import operation, the external -- handle type of the imported memory /must/ also have been set in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExternalMemoryBufferCreateInfo'::@handleTypes@--- when 'Graphics.Vulkan.Core10.Handles.Buffer' was created+-- when @buffer@ was created -- -- - If the -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address.PhysicalDeviceBufferDeviceAddressFeatures'::@bufferDeviceAddress@--- feature is enabled and 'Graphics.Vulkan.Core10.Handles.Buffer' was--- created with the+-- feature is enabled and @buffer@ was created with the -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT' -- bit set, @memory@ /must/ have been allocated with the -- 'Graphics.Vulkan.Core11.Enums.MemoryAllocateFlagBits.MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT'@@ -203,25 +195,24 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle -- -- - @memory@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' handle ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ have been created,--- allocated, or retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- - @buffer@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- - @memory@ /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be--- externally synchronized+-- - Host access to @buffer@ /must/ be externally synchronized -- -- == Return Codes --@@ -243,8 +234,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-bindBufferMemory :: Device -> Buffer -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> IO ()-bindBufferMemory device buffer memory memoryOffset = do+bindBufferMemory :: forall io . MonadIO io => Device -> Buffer -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> io ()+bindBufferMemory device buffer memory memoryOffset = liftIO $ do let vkBindBufferMemory' = mkVkBindBufferMemory (pVkBindBufferMemory (deviceCmds (device :: Device))) r <- vkBindBufferMemory' (deviceHandle (device)) (buffer) (memory) (memoryOffset) when (r < SUCCESS) (throwIO (VulkanException r))@@ -262,10 +253,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the image.+-- - @device@ is the logical device that owns the image. ----- - 'Graphics.Vulkan.Core10.Handles.Image' is the image to query.+-- - @image@ is the image to query. -- -- - @pMemoryRequirements@ is a pointer to a 'MemoryRequirements' -- structure in which the memory requirements of the image object are@@ -277,8 +267,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Image', 'MemoryRequirements'-getImageMemoryRequirements :: Device -> Image -> IO (MemoryRequirements)-getImageMemoryRequirements device image = evalContT $ do+getImageMemoryRequirements :: forall io . MonadIO io => Device -> Image -> io (MemoryRequirements)+getImageMemoryRequirements device image = liftIO . evalContT $ do let vkGetImageMemoryRequirements' = mkVkGetImageMemoryRequirements (pVkGetImageMemoryRequirements (deviceCmds (device :: Device))) pPMemoryRequirements <- ContT (withZeroCStruct @MemoryRequirements) lift $ vkGetImageMemoryRequirements' (deviceHandle (device)) (image) (pPMemoryRequirements)@@ -297,10 +287,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the image and memory.+-- - @device@ is the logical device that owns the image and memory. ----- - 'Graphics.Vulkan.Core10.Handles.Image' is the image.+-- - @image@ is the image. -- -- - @memory@ is the 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object -- describing the device memory to attach.@@ -319,44 +308,38 @@ -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ not have been created--- with the+-- - @image@ /must/ not have been created with the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_DISJOINT_BIT' -- set. ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ not already be backed--- by a memory object+-- - @image@ /must/ not already be backed by a memory object ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ not have been created--- with any sparse memory binding flags+-- - @image@ /must/ not have been created with any sparse memory binding+-- flags -- -- - @memoryOffset@ /must/ be less than the size of @memory@ -- -- - @memory@ /must/ have been allocated using one of the memory types -- allowed in the @memoryTypeBits@ member of the 'MemoryRequirements' -- structure returned from a call to 'getImageMemoryRequirements' with--- 'Graphics.Vulkan.Core10.Handles.Image'+-- @image@ -- -- - @memoryOffset@ /must/ be an integer multiple of the @alignment@ -- member of the 'MemoryRequirements' structure returned from a call to--- 'getImageMemoryRequirements' with--- 'Graphics.Vulkan.Core10.Handles.Image'+-- 'getImageMemoryRequirements' with @image@ -- -- - The difference of the size of @memory@ and @memoryOffset@ /must/ be -- greater than or equal to the @size@ member of the -- 'MemoryRequirements' structure returned from a call to--- 'getImageMemoryRequirements' with the same--- 'Graphics.Vulkan.Core10.Handles.Image'+-- 'getImageMemoryRequirements' with the same @image@ ----- - If 'Graphics.Vulkan.Core10.Handles.Image' requires a dedicated--- allocation (as reported by+-- - If @image@ requires a dedicated allocation (as reported by -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.getImageMemoryRequirements2' -- in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedRequirements'::requiresDedicatedAllocation--- for 'Graphics.Vulkan.Core10.Handles.Image'), @memory@ /must/ have--- been created with--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Image'--- equal to 'Graphics.Vulkan.Core10.Handles.Image'+-- for @image@), @memory@ /must/ have been created with+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@image@+-- equal to @image@ -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-dedicatedAllocationImageAliasing dedicated allocation image aliasing>@@ -365,10 +348,10 @@ -- @memory@ was allocated included a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo' -- structure in its @pNext@ chain, and--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Image'+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@image@ -- was not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', then--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ equal--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Image'+-- @image@ /must/ equal+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@image@ -- and @memoryOffset@ /must/ be zero. -- -- - If the@@ -378,11 +361,10 @@ -- @memory@ was allocated included a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo' -- structure in its @pNext@ chain, and--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Image'+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@image@ -- was not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', then--- @memoryOffset@ /must/ be zero, and--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ be either equal to--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Image'+-- @memoryOffset@ /must/ be zero, and @image@ /must/ be either equal to+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@image@ -- or an image that was created using the same parameters in -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo', with the exception -- that @extent@ and @arrayLayers@ /may/ differ subject to the@@ -405,48 +387,46 @@ -- created with a memory type that reports -- 'Graphics.Vulkan.Core10.Enums.MemoryPropertyFlagBits.MEMORY_PROPERTY_PROTECTED_BIT' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with+-- - If @image@ was created with -- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationImageCreateInfoNV'::@dedicatedAllocation@ -- equal to 'Graphics.Vulkan.Core10.BaseType.TRUE', @memory@ /must/ -- have been created with--- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationMemoryAllocateInfoNV'::'Graphics.Vulkan.Core10.Handles.Image'+-- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationMemoryAllocateInfoNV'::@image@ -- equal to an image handle created with identical creation parameters--- to 'Graphics.Vulkan.Core10.Handles.Image' and @memoryOffset@ /must/--- be zero+-- to @image@ and @memoryOffset@ /must/ be zero -- -- - If the value of -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExportMemoryAllocateInfo'::@handleTypes@ -- used to allocate @memory@ is not @0@, it /must/ include at least one -- of the handles set in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExternalMemoryImageCreateInfo'::@handleTypes@--- when 'Graphics.Vulkan.Core10.Handles.Image' was created+-- when @image@ was created -- -- - If @memory@ was created by a memory import operation, the external -- handle type of the imported memory /must/ also have been set in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExternalMemoryImageCreateInfo'::@handleTypes@--- when 'Graphics.Vulkan.Core10.Handles.Image' was created+-- when @image@ was created -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle+-- - @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle -- -- - @memory@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' handle ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created,--- allocated, or retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- - @image@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- - @memory@ /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Image' /must/ be--- externally synchronized+-- - Host access to @image@ /must/ be externally synchronized -- -- == Return Codes --@@ -466,8 +446,8 @@ -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize', -- 'Graphics.Vulkan.Core10.Handles.Image'-bindImageMemory :: Device -> Image -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> IO ()-bindImageMemory device image memory memoryOffset = do+bindImageMemory :: forall io . MonadIO io => Device -> Image -> DeviceMemory -> ("memoryOffset" ::: DeviceSize) -> io ()+bindImageMemory device image memory memoryOffset = liftIO $ do let vkBindImageMemory' = mkVkBindImageMemory (pVkBindImageMemory (deviceCmds (device :: Device))) r <- vkBindImageMemory' (deviceHandle (device)) (image) (memory) (memoryOffset) when (r < SUCCESS) (throwIO (VulkanException r))
src/Graphics/Vulkan/Core10/OtherTypes.hs view
@@ -166,8 +166,7 @@ -- -- == Valid Usage ----- - @offset@ /must/ be less than the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'+-- - @offset@ /must/ be less than the size of @buffer@ -- -- - If @size@ is not equal to -- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', @size@ /must/ be@@ -175,17 +174,14 @@ -- -- - If @size@ is not equal to -- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE', @size@ /must/ be--- less than or equal to than the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer' minus @offset@+-- less than or equal to than the size of @buffer@ minus @offset@ ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' was created with a--- sharing mode of+-- - If @buffer@ was created with a sharing mode of -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- at least one of @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ -- /must/ be 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED' ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' was created with a--- sharing mode of+-- - If @buffer@ was created with a sharing mode of -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- and one of @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ is -- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED', the@@ -195,16 +191,14 @@ -- transfers, as described in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-queue-transfers>. ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' was created with a--- sharing mode of+-- - If @buffer@ was created with a sharing mode of -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_EXCLUSIVE' -- and @srcQueueFamilyIndex@ is -- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED', -- @dstQueueFamilyIndex@ /must/ also be -- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED' ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' was created with a--- sharing mode of+-- - If @buffer@ was created with a sharing mode of -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_EXCLUSIVE' -- and @srcQueueFamilyIndex@ is not -- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED', it@@ -212,8 +206,7 @@ -- for external memory transfers, as described in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-queue-transfers>. ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' was created with a--- sharing mode of+-- - If @buffer@ was created with a sharing mode of -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_EXCLUSIVE' -- and @dstQueueFamilyIndex@ is not -- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED', it@@ -221,16 +214,15 @@ -- for external memory transfers, as described in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-queue-transfers>. ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' was created with a--- sharing mode of+-- - If @buffer@ was created with a sharing mode of -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_EXCLUSIVE', -- and @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ are not -- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED', at least -- one of them /must/ be the same as the family of the queue that will -- execute this barrier ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is non-sparse then it--- /must/ be bound completely and contiguously to a single+-- - If @buffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object -- -- == Valid Usage (Implicit)@@ -240,8 +232,8 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle -- -- = See Also --@@ -268,18 +260,16 @@ , -- | @dstQueueFamilyIndex@ is the destination queue family for a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-queue-transfers queue family ownership transfer>. dstQueueFamilyIndex :: Word32- , -- | 'Graphics.Vulkan.Core10.Handles.Buffer' is a handle to the buffer whose- -- backing memory is affected by the barrier.+ , -- | @buffer@ is a handle to the buffer whose backing memory is affected by+ -- the barrier. buffer :: Buffer- , -- | @offset@ is an offset in bytes into the backing memory for- -- 'Graphics.Vulkan.Core10.Handles.Buffer'; this is relative to the base- -- offset as bound to the buffer (see+ , -- | @offset@ is an offset in bytes into the backing memory for @buffer@;+ -- this is relative to the base offset as bound to the buffer (see -- 'Graphics.Vulkan.Core10.MemoryManagement.bindBufferMemory'). offset :: DeviceSize , -- | @size@ is a size in bytes of the affected area of backing memory for- -- 'Graphics.Vulkan.Core10.Handles.Buffer', or- -- 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE' to use the range from- -- @offset@ to the end of the buffer.+ -- @buffer@, or 'Graphics.Vulkan.Core10.APIConstants.WHOLE_SIZE' to use the+ -- range from @offset@ to the end of the buffer. size :: DeviceSize } deriving (Typeable)@@ -400,9 +390,9 @@ -- created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT' -- is dependent on the last sample locations used to render to the image--- subresource as a depth\/stencil attachment, thus when the--- 'Graphics.Vulkan.Core10.Handles.Image' member of a 'ImageMemoryBarrier'--- is an image created with this flag the application /can/ include a+-- subresource as a depth\/stencil attachment, thus when the @image@ member+-- of a 'ImageMemoryBarrier' is an image created with this flag the+-- application /can/ include a -- 'Graphics.Vulkan.Extensions.VK_EXT_sample_locations.SampleLocationsInfoEXT' -- structure in the @pNext@ chain of 'ImageMemoryBarrier' to specify the -- sample locations to use during the image layout transition.@@ -418,8 +408,8 @@ -- if @oldLayout@ would equal -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_UNDEFINED'. ----- If 'Graphics.Vulkan.Core10.Handles.Image' has a multi-planar format and--- the image is /disjoint/, then including+-- If @image@ has a multi-planar format and the image is /disjoint/, then+-- including -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT' -- in the @aspectMask@ member of @subresourceRange@ is equivalent to -- including@@ -438,14 +428,12 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_UNDEFINED' or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_PREINITIALIZED' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with a sharing--- mode of+-- - If @image@ was created with a sharing mode of -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- at least one of @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ -- /must/ be 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with a sharing--- mode of+-- - If @image@ was created with a sharing mode of -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- and one of @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ is -- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED', the@@ -455,16 +443,14 @@ -- described in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-queue-transfers>. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with a sharing--- mode of+-- - If @image@ was created with a sharing mode of -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_EXCLUSIVE' -- and @srcQueueFamilyIndex@ is -- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED', -- @dstQueueFamilyIndex@ /must/ also be -- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED'. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with a sharing--- mode of+-- - If @image@ was created with a sharing mode of -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_EXCLUSIVE' -- and @srcQueueFamilyIndex@ is not -- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED', it@@ -472,8 +458,7 @@ -- for external memory transfers, as described in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-queue-transfers>. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with a sharing--- mode of+-- - If @image@ was created with a sharing mode of -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_EXCLUSIVE' -- and @dstQueueFamilyIndex@ is not -- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED', it@@ -481,8 +466,7 @@ -- for external memory transfers, as described in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-queue-transfers>. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with a sharing--- mode of+-- - If @image@ was created with a sharing mode of -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_EXCLUSIVE', -- and @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ are not -- 'Graphics.Vulkan.Core10.APIConstants.QUEUE_FAMILY_IGNORED', at least@@ -491,29 +475,29 @@ -- -- - @subresourceRange.baseMipLevel@ /must/ be less than the @mipLevels@ -- specified in 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created+-- @image@ was created -- -- - If @subresourceRange.levelCount@ is not -- 'Graphics.Vulkan.Core10.APIConstants.REMAINING_MIP_LEVELS', -- @subresourceRange.baseMipLevel@ + @subresourceRange.levelCount@ -- /must/ be less than or equal to the @mipLevels@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created -- -- - @subresourceRange.baseArrayLayer@ /must/ be less than the -- @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created -- -- - If @subresourceRange.layerCount@ is not -- 'Graphics.Vulkan.Core10.APIConstants.REMAINING_ARRAY_LAYERS', -- @subresourceRange.baseArrayLayer@ + @subresourceRange.layerCount@ -- /must/ be less than or equal to the @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created ----- - If 'Graphics.Vulkan.Core10.Handles.Image' has a depth\/stencil--- format with both depth and stencil and the+-- - If @image@ has a depth\/stencil format with both depth and stencil+-- and the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-separateDepthStencilLayouts separateDepthStencilLayouts> -- feature is enabled, then the @aspectMask@ member of -- @subresourceRange@ /must/ include either or both@@ -521,8 +505,8 @@ -- and -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' has a depth\/stencil--- format with both depth and stencil and the+-- - If @image@ has a depth\/stencil format with both depth and stencil+-- and the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-separateDepthStencilLayouts separateDepthStencilLayouts> -- feature is not enabled, then the @aspectMask@ member of -- @subresourceRange@ /must/ include both@@ -530,14 +514,13 @@ -- and -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' has a single-plane color--- format or is not /disjoint/, then the @aspectMask@ member of--- @subresourceRange@ /must/ be+-- - If @image@ has a single-plane color format or is not /disjoint/,+-- then the @aspectMask@ member of @subresourceRange@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' has a multi-planar format--- and the image is /disjoint/, then the @aspectMask@ member of--- @subresourceRange@ /must/ include either at least one of+-- - If @image@ has a multi-planar format and the image is /disjoint/,+-- then the @aspectMask@ member of @subresourceRange@ /must/ include+-- either at least one of -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_0_BIT', -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_1_BIT', -- and@@ -545,50 +528,43 @@ -- or /must/ include -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' has a multi-planar format--- with only two planes, then the @aspectMask@ member of--- @subresourceRange@ /must/ not include+-- - If @image@ has a multi-planar format with only two planes, then the+-- @aspectMask@ member of @subresourceRange@ /must/ not include -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_PLANE_2_BIT' -- -- - If either @oldLayout@ or @newLayout@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL'--- then 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created--- with+-- then @image@ /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_COLOR_ATTACHMENT_BIT' -- set -- -- - If either @oldLayout@ or @newLayout@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL'--- then 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created--- with+-- then @image@ /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' -- set -- -- - If either @oldLayout@ or @newLayout@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL'--- then 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created--- with+-- then @image@ /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' -- set -- -- - If either @oldLayout@ or @newLayout@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL'--- then 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created--- with+-- then @image@ /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' -- set -- -- - If either @oldLayout@ or @newLayout@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL'--- then 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created--- with+-- then @image@ /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' -- set -- -- - If either @oldLayout@ or @newLayout@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL'--- then 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created--- with+-- then @image@ /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_INPUT_ATTACHMENT_BIT'@@ -596,26 +572,23 @@ -- -- - If either @oldLayout@ or @newLayout@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL'--- then 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created--- with+-- then @image@ /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_SRC_BIT' -- set -- -- - If either @oldLayout@ or @newLayout@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'--- then 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created--- with+-- then @image@ /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT' -- set ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is non-sparse then it--- /must/ be bound completely and contiguously to a single+-- - If @image@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object -- -- - If either @oldLayout@ or @newLayout@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV'--- then 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created--- with+-- then @image@ /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV' -- set --@@ -636,8 +609,8 @@ -- - @newLayout@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle+-- - @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle -- -- - @subresourceRange@ /must/ be a valid -- 'Graphics.Vulkan.Core10.SharedTypes.ImageSubresourceRange' structure@@ -676,13 +649,11 @@ , -- | @dstQueueFamilyIndex@ is the destination queue family for a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-queue-transfers queue family ownership transfer>. dstQueueFamilyIndex :: Word32- , -- | 'Graphics.Vulkan.Core10.Handles.Image' is a handle to the image affected- -- by this barrier.+ , -- | @image@ is a handle to the image affected by this barrier. image :: Image , -- | @subresourceRange@ describes the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-views image subresource range>- -- within 'Graphics.Vulkan.Core10.Handles.Image' that is affected by this- -- barrier.+ -- within @image@ that is affected by this barrier. subresourceRange :: ImageSubresourceRange } deriving (Typeable)@@ -849,10 +820,8 @@ -- -- - (@indexSize@ * (@firstIndex@ + @indexCount@) + @offset@) /must/ be -- less than or equal to the size of the bound index buffer, with--- @indexSize@ being based on the type specified by--- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType', where the index--- buffer, 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType', and--- @offset@ are specified via+-- @indexSize@ being based on the type specified by @indexType@, where+-- the index buffer, @indexType@, and @offset@ are specified via -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdBindIndexBuffer' -- -- - If the
src/Graphics/Vulkan/Core10/Pass.hs view
@@ -16,6 +16,7 @@ import Control.Exception.Base (bracket) import Control.Monad (unless)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -32,6 +33,7 @@ import qualified Data.Vector (imapM_) import qualified Data.Vector (length) import qualified Data.Vector (null)+import Control.Monad.IO.Class (MonadIO) import Data.Either (Either) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable)@@ -111,8 +113,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the framebuffer.+-- - @device@ is the logical device that creates the framebuffer. -- -- - @pCreateInfo@ is a pointer to a 'FramebufferCreateInfo' structure -- describing additional information about framebuffer creation.@@ -130,13 +131,12 @@ -- - If @pCreateInfo->flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- and @attachmentCount@ is not @0@, each element of--- @pCreateInfo->pAttachments@ /must/ have been created on--- 'Graphics.Vulkan.Core10.Handles.Device'+-- @pCreateInfo->pAttachments@ /must/ have been created on @device@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'FramebufferCreateInfo' structure@@ -166,8 +166,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Framebuffer', 'FramebufferCreateInfo'-createFramebuffer :: PokeChain a => Device -> FramebufferCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (Framebuffer)-createFramebuffer device createInfo allocator = evalContT $ do+createFramebuffer :: forall a io . (PokeChain a, MonadIO io) => Device -> FramebufferCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Framebuffer)+createFramebuffer device createInfo allocator = liftIO . evalContT $ do let vkCreateFramebuffer' = mkVkCreateFramebuffer (pVkCreateFramebuffer (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -183,11 +183,11 @@ -- 'bracket' -- -- The allocated value must not be returned from the provided computation-withFramebuffer :: PokeChain a => Device -> FramebufferCreateInfo a -> Maybe AllocationCallbacks -> (Framebuffer -> IO r) -> IO r-withFramebuffer device framebufferCreateInfo allocationCallbacks =+withFramebuffer :: forall a r . PokeChain a => Device -> FramebufferCreateInfo a -> Maybe AllocationCallbacks -> ((Framebuffer) -> IO r) -> IO r+withFramebuffer device pCreateInfo pAllocator = bracket- (createFramebuffer device framebufferCreateInfo allocationCallbacks)- (\o -> destroyFramebuffer device o allocationCallbacks)+ (createFramebuffer device pCreateInfo pAllocator)+ (\(o0) -> destroyFramebuffer device o0 pAllocator) foreign import ccall@@ -201,11 +201,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the framebuffer.+-- - @device@ is the logical device that destroys the framebuffer. ----- - 'Graphics.Vulkan.Core10.Handles.Framebuffer' is the handle of the--- framebuffer to destroy.+-- - @framebuffer@ is the handle of the framebuffer to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -213,50 +211,47 @@ -- -- == Valid Usage ----- - All submitted commands that refer to--- 'Graphics.Vulkan.Core10.Handles.Framebuffer' /must/ have completed--- execution+-- - All submitted commands that refer to @framebuffer@ /must/ have+-- completed execution -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Framebuffer' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @framebuffer@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Framebuffer' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @framebuffer@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Framebuffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Framebuffer' handle+-- - If @framebuffer@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @framebuffer@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Framebuffer'+-- handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.Framebuffer' is a valid handle,--- it /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @framebuffer@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Framebuffer' /must/--- be externally synchronized+-- - Host access to @framebuffer@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Framebuffer'-destroyFramebuffer :: Device -> Framebuffer -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyFramebuffer device framebuffer allocator = evalContT $ do+destroyFramebuffer :: forall io . MonadIO io => Device -> Framebuffer -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyFramebuffer device framebuffer allocator = liftIO . evalContT $ do let vkDestroyFramebuffer' = mkVkDestroyFramebuffer (pVkDestroyFramebuffer (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -276,8 +271,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the render pass.+-- - @device@ is the logical device that creates the render pass. -- -- - @pCreateInfo@ is a pointer to a 'RenderPassCreateInfo' structure -- describing the parameters of the render pass.@@ -292,8 +286,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'RenderPassCreateInfo' structure@@ -323,8 +317,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.RenderPass', 'RenderPassCreateInfo'-createRenderPass :: PokeChain a => Device -> RenderPassCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (RenderPass)-createRenderPass device createInfo allocator = evalContT $ do+createRenderPass :: forall a io . (PokeChain a, MonadIO io) => Device -> RenderPassCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (RenderPass)+createRenderPass device createInfo allocator = liftIO . evalContT $ do let vkCreateRenderPass' = mkVkCreateRenderPass (pVkCreateRenderPass (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -340,11 +334,11 @@ -- 'bracket' -- -- The allocated value must not be returned from the provided computation-withRenderPass :: PokeChain a => Device -> RenderPassCreateInfo a -> Maybe AllocationCallbacks -> (RenderPass -> IO r) -> IO r-withRenderPass device renderPassCreateInfo allocationCallbacks =+withRenderPass :: forall a r . PokeChain a => Device -> RenderPassCreateInfo a -> Maybe AllocationCallbacks -> ((RenderPass) -> IO r) -> IO r+withRenderPass device pCreateInfo pAllocator = bracket- (createRenderPass device renderPassCreateInfo allocationCallbacks)- (\o -> destroyRenderPass device o allocationCallbacks)+ (createRenderPass device pCreateInfo pAllocator)+ (\(o0) -> destroyRenderPass device o0 pAllocator) foreign import ccall@@ -358,11 +352,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the render pass.+-- - @device@ is the logical device that destroys the render pass. ----- - 'Graphics.Vulkan.Core10.Handles.RenderPass' is the handle of the--- render pass to destroy.+-- - @renderPass@ is the handle of the render pass to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -370,50 +362,46 @@ -- -- == Valid Usage ----- - All submitted commands that refer to--- 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ have completed--- execution+-- - All submitted commands that refer to @renderPass@ /must/ have+-- completed execution -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.RenderPass' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @renderPass@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.RenderPass' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @renderPass@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.RenderPass' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.RenderPass' handle+-- - If @renderPass@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @renderPass@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.RenderPass' handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.RenderPass' is a valid handle, it--- /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @renderPass@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ be--- externally synchronized+-- - Host access to @renderPass@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.RenderPass'-destroyRenderPass :: Device -> RenderPass -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyRenderPass device renderPass allocator = evalContT $ do+destroyRenderPass :: forall io . MonadIO io => Device -> RenderPass -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyRenderPass device renderPass allocator = liftIO . evalContT $ do let vkDestroyRenderPass' = mkVkDestroyRenderPass (pVkDestroyRenderPass (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -434,11 +422,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the render pass.+-- - @device@ is the logical device that owns the render pass. ----- - 'Graphics.Vulkan.Core10.Handles.RenderPass' is a handle to a render--- pass.+-- - @renderPass@ is a handle to a render pass. -- -- - @pGranularity@ is a pointer to a -- 'Graphics.Vulkan.Core10.SharedTypes.Extent2D' structure in which the@@ -458,14 +444,12 @@ -- -- - either the @offset.width@ member in @renderArea@ is a multiple of -- the horizontal granularity or @offset.x@+@offset.width@ is equal to--- the @width@ of the 'Graphics.Vulkan.Core10.Handles.Framebuffer' in--- the+-- the @width@ of the @framebuffer@ in the -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.RenderPassBeginInfo'. -- -- - either the @offset.height@ member in @renderArea@ is a multiple of -- the vertical granularity or @offset.y@+@offset.height@ is equal to--- the @height@ of the 'Graphics.Vulkan.Core10.Handles.Framebuffer' in--- the+-- the @height@ of the @framebuffer@ in the -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.RenderPassBeginInfo'. -- -- Subpass dependencies are not affected by the render area, and apply to@@ -477,26 +461,25 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ be a valid+-- - @renderPass@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.RenderPass' handle -- -- - @pGranularity@ /must/ be a valid pointer to a -- 'Graphics.Vulkan.Core10.SharedTypes.Extent2D' structure ----- - 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ have been--- created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - @renderPass@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.SharedTypes.Extent2D', -- 'Graphics.Vulkan.Core10.Handles.RenderPass'-getRenderAreaGranularity :: Device -> RenderPass -> IO (("granularity" ::: Extent2D))-getRenderAreaGranularity device renderPass = evalContT $ do+getRenderAreaGranularity :: forall io . MonadIO io => Device -> RenderPass -> io (("granularity" ::: Extent2D))+getRenderAreaGranularity device renderPass = liftIO . evalContT $ do let vkGetRenderAreaGranularity' = mkVkGetRenderAreaGranularity (pVkGetRenderAreaGranularity (deviceCmds (device :: Device))) pPGranularity <- ContT (withZeroCStruct @Extent2D) lift $ vkGetRenderAreaGranularity' (deviceHandle (device)) (renderPass) (pPGranularity)@@ -565,7 +548,7 @@ -- and -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-fixedconv Fixed-Point Data Conversions>. ----- If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.AttachmentDescriptionFlagBits.ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT', -- then the attachment is treated as if it shares physical memory with -- another attachment in the same render pass. This information limits the@@ -638,28 +621,25 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_UNDEFINED' or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_PREINITIALIZED' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a color format,--- @initialLayout@ /must/ not be+-- - If @format@ is a color format, @initialLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL', -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format, @initialLayout@ /must/ not be+-- - If @format@ is a depth\/stencil format, @initialLayout@ /must/ not+-- be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a color format,--- @finalLayout@ /must/ not be+-- - If @format@ is a color format, @finalLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL', -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format, @finalLayout@ /must/ not be+-- - If @format@ is a depth\/stencil format, @finalLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL' -- -- - If the@@ -680,76 +660,67 @@ -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a color format,--- @initialLayout@ /must/ not be+-- - If @format@ is a color format, @initialLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL', -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a color format,--- @finalLayout@ /must/ not be+-- - If @format@ is a color format, @finalLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL', -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format which includes both depth and stencil aspects,--- @initialLayout@ /must/ not be+-- - If @format@ is a depth\/stencil format which includes both depth and+-- stencil aspects, @initialLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL', -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format which includes both depth and stencil aspects, @finalLayout@--- /must/ not be+-- - If @format@ is a depth\/stencil format which includes both depth and+-- stencil aspects, @finalLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL', -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format which includes only the depth aspect, @initialLayout@ /must/--- not be+-- - If @format@ is a depth\/stencil format which includes only the depth+-- aspect, @initialLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format which includes only the depth aspect, @finalLayout@ /must/--- not be+-- - If @format@ is a depth\/stencil format which includes only the depth+-- aspect, @finalLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format which includes only the stencil aspect, @initialLayout@--- /must/ not be+-- - If @format@ is a depth\/stencil format which includes only the+-- stencil aspect, @initialLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format which includes only the stencil aspect, @finalLayout@ /must/--- not be+-- - If @format@ is a depth\/stencil format which includes only the+-- stencil aspect, @finalLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL' -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.AttachmentDescriptionFlagBits.AttachmentDescriptionFlagBits' -- values ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be a valid+-- - @format@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value -- -- - @samples@ /must/ be a valid@@ -788,13 +759,13 @@ -- 'RenderPassCreateInfo', -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' data AttachmentDescription = AttachmentDescription- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ { -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.AttachmentDescriptionFlagBits.AttachmentDescriptionFlagBits' -- specifying additional properties of the attachment. flags :: AttachmentDescriptionFlags- , -- | 'Graphics.Vulkan.Core10.Enums.Format.Format' is a- -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value specifying the format- -- of the image view that will be used for the attachment.+ , -- | @format@ is a 'Graphics.Vulkan.Core10.Enums.Format.Format' value+ -- specifying the format of the image view that will be used for the+ -- attachment. format :: Format , -- | @samples@ is the number of samples of the image as defined in -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits'.@@ -1056,8 +1027,7 @@ -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- /must/ be+-- - @pipelineBindPoint@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS' -- -- - @colorAttachmentCount@ /must/ be less than or equal to@@ -1140,7 +1110,7 @@ -- - If any attachment is used by more than one 'AttachmentReference' -- member, then each use /must/ use the same @layout@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX', -- it /must/ also include -- 'Graphics.Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX'.@@ -1152,13 +1122,11 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SubpassDescriptionFlagBits' -- values ----- - 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- /must/ be a valid+-- - @pipelineBindPoint@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' -- value --@@ -1190,11 +1158,11 @@ -- 'RenderPassCreateInfo', -- 'Graphics.Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SubpassDescriptionFlags' data SubpassDescription = SubpassDescription- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ { -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SubpassDescriptionFlagBits' -- specifying usage of the subpass. flags :: SubpassDescriptionFlags- , -- | 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' is a+ , -- | @pipelineBindPoint@ is a -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' value -- specifying the pipeline type supported for this subpass. pipelineBindPoint :: PipelineBindPoint@@ -1449,27 +1417,21 @@ -- - If @srcSubpass@ equals @dstSubpass@, and @srcStageMask@ and -- @dstStageMask@ both include a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-framebuffer-regions framebuffer-space stage>,--- then--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- /must/ include+-- then @dependencyFlags@ /must/ include -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_BY_REGION_BIT' ----- - If 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- includes+-- - If @dependencyFlags@ includes -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_VIEW_LOCAL_BIT', -- @srcSubpass@ /must/ not be equal to -- 'Graphics.Vulkan.Core10.APIConstants.SUBPASS_EXTERNAL' ----- - If 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- includes+-- - If @dependencyFlags@ includes -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_VIEW_LOCAL_BIT', -- @dstSubpass@ /must/ not be equal to -- 'Graphics.Vulkan.Core10.APIConstants.SUBPASS_EXTERNAL' -- -- - If @srcSubpass@ equals @dstSubpass@ and that subpass has more than--- one bit set in the view mask, then--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- /must/ include+-- one bit set in the view mask, then @dependencyFlags@ /must/ include -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_VIEW_LOCAL_BIT' -- -- - If the@@ -1512,8 +1474,7 @@ -- - @dstAccessMask@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.AccessFlagBits.AccessFlagBits' values ----- - 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- /must/ be a valid combination of+-- - @dependencyFlags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlagBits' -- values --@@ -1550,8 +1511,7 @@ -- a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-masks destination access mask>. dstAccessMask :: AccessFlags- , -- | 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags' is a- -- bitmask of+ , -- | @dependencyFlags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlagBits'. dependencyFlags :: DependencyFlags }@@ -1696,8 +1656,7 @@ -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_multiview.RenderPassMultiviewCreateInfo' -- structure, for any element of @pDependencies@ with a--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- member that does not include+-- @dependencyFlags@ member that does not include -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_VIEW_LOCAL_BIT', -- the corresponding element of the @pViewOffsets@ member of that -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_multiview.RenderPassMultiviewCreateInfo'@@ -1711,8 +1670,8 @@ -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_multiview.RenderPassMultiviewCreateInfo' -- structure, and each element of its @pViewMasks@ member is @0@, the--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- member of each element of @pDependencies@ /must/ not include+-- @dependencyFlags@ member of each element of @pDependencies@ /must/+-- not include -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_VIEW_LOCAL_BIT' -- -- - If the @pNext@ chain includes a@@ -1731,18 +1690,15 @@ -- flags included in the @srcStageMask@ member of that dependency -- /must/ be a pipeline stage supported by the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types pipeline>--- identified by the--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- member of the source subpass+-- identified by the @pipelineBindPoint@ member of the source subpass -- -- - For any element of @pDependencies@, if the @dstSubpass@ is not -- 'Graphics.Vulkan.Core10.APIConstants.SUBPASS_EXTERNAL', all stage -- flags included in the @dstStageMask@ member of that dependency -- /must/ be a pipeline stage supported by the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types pipeline>--- identified by the--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- member of the destination subpass+-- identified by the @pipelineBindPoint@ member of the destination+-- subpass -- -- - The @srcSubpass@ member of each element of @pDependencies@ /must/ be -- less than @subpassCount@@@ -1766,8 +1722,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.RenderPassCreateFlagBits.RenderPassCreateFlagBits' -- values --@@ -1793,7 +1748,7 @@ data RenderPassCreateInfo (es :: [Type]) = RenderPassCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.RenderPassCreateFlagBits.RenderPassCreateFlagBits' flags :: RenderPassCreateFlags , -- | @pAttachments@ is a pointer to an array of @attachmentCount@@@ -1935,115 +1890,110 @@ -- == Valid Usage -- -- - @attachmentCount@ /must/ be equal to the attachment count specified--- in 'Graphics.Vulkan.Core10.Handles.RenderPass'+-- in @renderPass@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- and @attachmentCount@ is not @0@, @pAttachments@ must be a valid -- pointer to an array of @attachmentCount@ valid -- 'Graphics.Vulkan.Core10.Handles.ImageView' handles ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- each element of @pAttachments@ that is used as a color attachment or--- resolve attachment by 'Graphics.Vulkan.Core10.Handles.RenderPass'--- /must/ have been created with a @usage@ value including+-- resolve attachment by @renderPass@ /must/ have been created with a+-- @usage@ value including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_COLOR_ATTACHMENT_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- each element of @pAttachments@ that is used as a depth\/stencil--- attachment by 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/--- have been created with a @usage@ value including+-- attachment by @renderPass@ /must/ have been created with a @usage@+-- value including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- each element of @pAttachments@ that is used as a depth\/stencil--- resolve attachment by 'Graphics.Vulkan.Core10.Handles.RenderPass'--- /must/ have been created with a @usage@ value including+-- resolve attachment by @renderPass@ /must/ have been created with a+-- @usage@ value including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- each element of @pAttachments@ that is used as an input attachment--- by 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ have been--- created with a @usage@ value including+-- by @renderPass@ /must/ have been created with a @usage@ value+-- including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_INPUT_ATTACHMENT_BIT' -- -- - Each element of @pAttachments@ that is used as a fragment density--- map attachment by 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/--- not have been created with a 'Graphics.Vulkan.Core10.BaseType.Flags'--- value including+-- map attachment by @renderPass@ /must/ not have been created with a+-- @flags@ value including -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT'. ----- - If 'Graphics.Vulkan.Core10.Handles.RenderPass' has a fragment--- density map attachment and+-- - If @renderPass@ has a fragment density map attachment and -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-nonsubsampledimages non-subsample image feature> -- is not enabled, each element of @pAttachments@ /must/ have been--- created with a 'Graphics.Vulkan.Core10.BaseType.Flags' value--- including+-- created with a @flags@ value including -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SUBSAMPLED_BIT_EXT' -- unless that element is the fragment density map attachment. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- each element of @pAttachments@ /must/ have been created with a -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value that matches the -- 'Graphics.Vulkan.Core10.Enums.Format.Format' specified by the--- corresponding 'AttachmentDescription' in--- 'Graphics.Vulkan.Core10.Handles.RenderPass'+-- corresponding 'AttachmentDescription' in @renderPass@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- each element of @pAttachments@ /must/ have been created with a -- @samples@ value that matches the @samples@ value specified by the--- corresponding 'AttachmentDescription' in--- 'Graphics.Vulkan.Core10.Handles.RenderPass'+-- corresponding 'AttachmentDescription' in @renderPass@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- each element of @pAttachments@ /must/ have dimensions at least as -- large as the corresponding framebuffer dimension except for any -- element that is referenced by @fragmentDensityMapAttachment@ ----- - If 'Graphics.Vulkan.Core10.Handles.RenderPass' was specified with--- non-zero view masks, each element of @pAttachments@ that is not--- referenced by @fragmentDensityMapAttachment@ /must/ have a--- @layerCount@ greater than the index of the most significant bit set--- in any of those view masks+-- - If @renderPass@ was specified with non-zero view masks, each element+-- of @pAttachments@ that is not referenced by+-- @fragmentDensityMapAttachment@ /must/ have a @layerCount@ greater+-- than the index of the most significant bit set in any of those view+-- masks ----- - If 'Graphics.Vulkan.Core10.Handles.RenderPass' was specified with--- non-zero view masks, each element of @pAttachments@ that is--- referenced by @fragmentDensityMapAttachment@ /must/ have a--- @layerCount@ equal to @1@ or greater than the index of the most--- significant bit set in any of those view masks+-- - If @renderPass@ was specified with non-zero view masks, each element+-- of @pAttachments@ that is referenced by+-- @fragmentDensityMapAttachment@ /must/ have a @layerCount@ equal to+-- @1@ or greater than the index of the most significant bit set in any+-- of those view masks ----- - If 'Graphics.Vulkan.Core10.Handles.RenderPass' was not specified--- with non-zero view masks, each element of @pAttachments@ that is--- referenced by @fragmentDensityMapAttachment@ /must/ have a--- @layerCount@ equal to @1@+-- - If @renderPass@ was not specified with non-zero view masks, each+-- element of @pAttachments@ that is referenced by+-- @fragmentDensityMapAttachment@ /must/ have a @layerCount@ equal to+-- @1@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- an element of @pAttachments@ that is referenced by -- @fragmentDensityMapAttachment@ /must/ have a width at least as large -- as -- \(\lceil{\frac{width}{maxFragmentDensityTexelSize_{width}}}\rceil\) ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- an element of @pAttachments@ that is referenced by -- @fragmentDensityMapAttachment@ /must/ have a height at least as -- large as -- \(\lceil{\frac{height}{maxFragmentDensityTexelSize_{height}}}\rceil\) ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- each element of @pAttachments@ /must/ only specify a single mip -- level ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- each element of @pAttachments@ /must/ have been created with the -- identity swizzle@@ -2063,15 +2013,15 @@ -- - @layers@ /must/ be less than or equal to -- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxFramebufferLayers@ ----- - If 'Graphics.Vulkan.Core10.Handles.RenderPass' was specified with--- non-zero view masks, @layers@ /must/ be @1@+-- - If @renderPass@ was specified with non-zero view masks, @layers@+-- /must/ be @1@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- each element of @pAttachments@ that is a 2D or 2D array image view -- taken from a 3D image /must/ not be a depth\/stencil format ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' does not include+-- - If @flags@ does not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- and @attachmentCount@ is not 0, @pAttachments@ /must/ be a valid -- pointer to an array of @attachmentCount@ valid@@ -2079,24 +2029,23 @@ -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-imagelessFramebuffer imageless framebuffer>--- feature is not enabled, 'Graphics.Vulkan.Core10.BaseType.Flags'--- /must/ not include+-- feature is not enabled, @flags@ /must/ not include -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- the @pNext@ chain /must/ include a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo' -- structure ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- the @attachmentImageInfoCount@ member of a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo' -- structure included in the @pNext@ chain /must/ be equal to either -- zero or @attachmentCount@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- the @width@ member of any element of the @pAttachmentImageInfos@ -- member of a@@ -2104,9 +2053,9 @@ -- structure included in the @pNext@ chain /must/ be greater than or -- equal to @width@, except for any element that is referenced by -- 'Graphics.Vulkan.Extensions.VK_EXT_fragment_density_map.RenderPassFragmentDensityMapCreateInfoEXT'::@fragmentDensityMapAttachment@--- in 'Graphics.Vulkan.Core10.Handles.RenderPass'+-- in @renderPass@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- the @height@ member of any element of the @pAttachmentImageInfos@ -- member of a@@ -2114,44 +2063,38 @@ -- structure included in the @pNext@ chain /must/ be greater than or -- equal to @height@, except for any element that is referenced by -- 'Graphics.Vulkan.Extensions.VK_EXT_fragment_density_map.RenderPassFragmentDensityMapCreateInfoEXT'::@fragmentDensityMapAttachment@--- in 'Graphics.Vulkan.Core10.Handles.RenderPass'+-- in @renderPass@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- the @width@ member of any element of the @pAttachmentImageInfos@ -- member of a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo' -- structure included in the @pNext@ chain that is referenced by -- 'Graphics.Vulkan.Extensions.VK_EXT_fragment_density_map.RenderPassFragmentDensityMapCreateInfoEXT'::@fragmentDensityMapAttachment@--- in 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ be greater--- than or equal to+-- in @renderPass@ /must/ be greater than or equal to -- \(\lceil{\frac{width}{maxFragmentDensityTexelSize_{width}}}\rceil\) ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- the @height@ member of any element of the @pAttachmentImageInfos@ -- member of a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo' -- structure included in the @pNext@ chain that is referenced by -- 'Graphics.Vulkan.Extensions.VK_EXT_fragment_density_map.RenderPassFragmentDensityMapCreateInfoEXT'::@fragmentDensityMapAttachment@--- in 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ be greater--- than or equal to+-- in @renderPass@ /must/ be greater than or equal to -- \(\lceil{\frac{height}{maxFragmentDensityTexelSize_{height}}}\rceil\) ----- - If multiview is enabled for--- 'Graphics.Vulkan.Core10.Handles.RenderPass', and--- 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If multiview is enabled for @renderPass@, and @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- the @layerCount@ member of any element of the -- @pAttachmentImageInfos@ member of a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo' -- structure included in the @pNext@ chain /must/ be greater than the -- maximum bit index set in the view mask in the subpasses in which it--- is used in 'Graphics.Vulkan.Core10.Handles.RenderPass'+-- is used in @renderPass@ ----- - If multiview is not enabled for--- 'Graphics.Vulkan.Core10.Handles.RenderPass', and--- 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If multiview is not enabled for @renderPass@, and @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- the @layerCount@ member of any element of the -- @pAttachmentImageInfos@ member of a@@ -2159,55 +2102,52 @@ -- structure included in the @pNext@ chain /must/ be greater than or -- equal to @layers@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- the @usage@ member of any element of the @pAttachmentImageInfos@ -- member of a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo' -- structure included in the @pNext@ chain that refers to an attachment--- used as a color attachment or resolve attachment by--- 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ include+-- used as a color attachment or resolve attachment by @renderPass@+-- /must/ include -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_COLOR_ATTACHMENT_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- the @usage@ member of any element of the @pAttachmentImageInfos@ -- member of a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo' -- structure included in the @pNext@ chain that refers to an attachment--- used as a depth\/stencil attachment by--- 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ include+-- used as a depth\/stencil attachment by @renderPass@ /must/ include -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- the @usage@ member of any element of the @pAttachmentImageInfos@ -- member of a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo' -- structure included in the @pNext@ chain that refers to an attachment--- used as a depth\/stencil resolve attachment by--- 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ include+-- used as a depth\/stencil resolve attachment by @renderPass@ /must/+-- include -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- the @usage@ member of any element of the @pAttachmentImageInfos@ -- member of a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo' -- structure included in the @pNext@ chain that refers to an attachment--- used as an input attachment by--- 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ include+-- used as an input attachment by @renderPass@ /must/ include -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_INPUT_ATTACHMENT_BIT' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- at least one element of the @pViewFormats@ member of any element of -- the @pAttachmentImageInfos@ member of a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer.FramebufferAttachmentsCreateInfo' -- structure included in the @pNext@ chain /must/ be equal to the--- corresponding value of--- 'AttachmentDescription'::'Graphics.Vulkan.Core10.Enums.Format.Format'--- used to create 'Graphics.Vulkan.Core10.Handles.RenderPass'+-- corresponding value of 'AttachmentDescription'::@format@ used to+-- create @renderPass@ -- -- == Valid Usage (Implicit) --@@ -2220,18 +2160,17 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FramebufferCreateFlagBits' -- values ----- - 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ be a valid+-- - @renderPass@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.RenderPass' handle ----- - Both of 'Graphics.Vulkan.Core10.Handles.RenderPass', and the--- elements of @pAttachments@ that are valid handles of non-ignored--- parameters /must/ have been created, allocated, or retrieved from--- the same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Both of @renderPass@, and the elements of @pAttachments@ that are+-- valid handles of non-ignored parameters /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device' -- -- = See Also --@@ -2243,18 +2182,18 @@ data FramebufferCreateInfo (es :: [Type]) = FramebufferCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FramebufferCreateFlagBits' flags :: FramebufferCreateFlags- , -- | 'Graphics.Vulkan.Core10.Handles.RenderPass' is a render pass defining- -- what render passes the framebuffer will be compatible with. See+ , -- | @renderPass@ is a render pass defining what render passes the+ -- framebuffer will be compatible with. See -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility Render Pass Compatibility> -- for details. renderPass :: RenderPass , -- | @pAttachments@ is a pointer to an array of -- 'Graphics.Vulkan.Core10.Handles.ImageView' handles, each of which will -- be used as the corresponding attachment in a render pass instance. If- -- 'Graphics.Vulkan.Core10.BaseType.Flags' includes+ -- @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.FramebufferCreateFlagBits.FRAMEBUFFER_CREATE_IMAGELESS_BIT', -- this parameter is ignored. attachments :: Vector ImageView
src/Graphics/Vulkan/Core10/Pipeline.hs view
@@ -26,6 +26,8 @@ import Control.Exception.Base (bracket) import Control.Monad (unless)+import Control.Monad.IO.Class (liftIO)+import Data.Foldable (traverse_) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -44,6 +46,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Either (Either) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable)@@ -186,10 +189,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the graphics pipelines.+-- - @device@ is the logical device that creates the graphics pipelines. ----- - 'Graphics.Vulkan.Core10.Handles.PipelineCache' is either+-- - @pipelineCache@ is either -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', indicating that -- pipeline caching is disabled; or the handle of a valid -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#pipelines-cache pipeline cache>@@ -219,15 +221,13 @@ -- -- == Valid Usage ----- - If the 'Graphics.Vulkan.Core10.BaseType.Flags' member of any element--- of @pCreateInfos@ contains the+-- - If the @flags@ member of any element of @pCreateInfos@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and the @basePipelineIndex@ member of that same element is not -- @-1@, @basePipelineIndex@ /must/ be less than the index into -- @pCreateInfos@ that corresponds to that element ----- - If the 'Graphics.Vulkan.Core10.BaseType.Flags' member of any element--- of @pCreateInfos@ contains the+-- - If the @flags@ member of any element of @pCreateInfos@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, the base pipeline /must/ have been created with the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT'@@ -235,13 +235,13 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.PipelineCache' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.PipelineCache' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.PipelineCache' handle+-- - If @pipelineCache@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @pipelineCache@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.PipelineCache'+-- handle -- -- - @pCreateInfos@ /must/ be a valid pointer to an array of -- @createInfoCount@ valid 'GraphicsPipelineCreateInfo' structures@@ -256,9 +256,8 @@ -- -- - @createInfoCount@ /must/ be greater than @0@ ----- - If 'Graphics.Vulkan.Core10.Handles.PipelineCache' is a valid handle,--- it /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @pipelineCache@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Return Codes --@@ -280,8 +279,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', 'GraphicsPipelineCreateInfo', -- 'Graphics.Vulkan.Core10.Handles.Pipeline', -- 'Graphics.Vulkan.Core10.Handles.PipelineCache'-createGraphicsPipelines :: PokeChain a => Device -> PipelineCache -> ("createInfos" ::: Vector (GraphicsPipelineCreateInfo a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (("pipelines" ::: Vector Pipeline))-createGraphicsPipelines device pipelineCache createInfos allocator = evalContT $ do+createGraphicsPipelines :: forall a io . (PokeChain a, MonadIO io) => Device -> PipelineCache -> ("createInfos" ::: Vector (GraphicsPipelineCreateInfo a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io (("pipelines" ::: Vector Pipeline))+createGraphicsPipelines device pipelineCache createInfos allocator = liftIO . evalContT $ do let vkCreateGraphicsPipelines' = mkVkCreateGraphicsPipelines (pVkCreateGraphicsPipelines (deviceCmds (device :: Device))) pPCreateInfos <- ContT $ allocaBytesAligned @(GraphicsPipelineCreateInfo _) ((Data.Vector.length (createInfos)) * 144) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPCreateInfos `plusPtr` (144 * (i)) :: Ptr (GraphicsPipelineCreateInfo _)) (e) . ($ ())) (createInfos)@@ -298,11 +297,11 @@ -- 'bracket' -- -- The allocated value must not be returned from the provided computation-withGraphicsPipelines :: PokeChain a => Device -> PipelineCache -> Vector (GraphicsPipelineCreateInfo a) -> Maybe AllocationCallbacks -> (Vector Pipeline -> IO r) -> IO r-withGraphicsPipelines device pipelineCache graphicsPipelineCreateInfo allocationCallbacks =+withGraphicsPipelines :: forall a r . PokeChain a => Device -> PipelineCache -> Vector (GraphicsPipelineCreateInfo a) -> Maybe AllocationCallbacks -> ((Vector Pipeline) -> IO r) -> IO r+withGraphicsPipelines device pipelineCache pCreateInfos pAllocator = bracket- (createGraphicsPipelines device pipelineCache graphicsPipelineCreateInfo allocationCallbacks)- (traverse (\o -> destroyPipeline device o allocationCallbacks))+ (createGraphicsPipelines device pipelineCache pCreateInfos pAllocator)+ (\(o0) -> traverse_ (\o0Elem -> destroyPipeline device o0Elem pAllocator) o0) foreign import ccall@@ -316,10 +315,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the compute pipelines.+-- - @device@ is the logical device that creates the compute pipelines. ----- - 'Graphics.Vulkan.Core10.Handles.PipelineCache' is either+-- - @pipelineCache@ is either -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', indicating that -- pipeline caching is disabled; or the handle of a valid -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#pipelines-cache pipeline cache>@@ -342,15 +340,13 @@ -- -- == Valid Usage ----- - If the 'Graphics.Vulkan.Core10.BaseType.Flags' member of any element--- of @pCreateInfos@ contains the+-- - If the @flags@ member of any element of @pCreateInfos@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and the @basePipelineIndex@ member of that same element is not -- @-1@, @basePipelineIndex@ /must/ be less than the index into -- @pCreateInfos@ that corresponds to that element ----- - If the 'Graphics.Vulkan.Core10.BaseType.Flags' member of any element--- of @pCreateInfos@ contains the+-- - If the @flags@ member of any element of @pCreateInfos@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, the base pipeline /must/ have been created with the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT'@@ -358,13 +354,13 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.PipelineCache' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.PipelineCache' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.PipelineCache' handle+-- - If @pipelineCache@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @pipelineCache@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.PipelineCache'+-- handle -- -- - @pCreateInfos@ /must/ be a valid pointer to an array of -- @createInfoCount@ valid 'ComputePipelineCreateInfo' structures@@ -379,9 +375,8 @@ -- -- - @createInfoCount@ /must/ be greater than @0@ ----- - If 'Graphics.Vulkan.Core10.Handles.PipelineCache' is a valid handle,--- it /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @pipelineCache@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Return Codes --@@ -403,8 +398,8 @@ -- 'ComputePipelineCreateInfo', 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Pipeline', -- 'Graphics.Vulkan.Core10.Handles.PipelineCache'-createComputePipelines :: PokeChain a => Device -> PipelineCache -> ("createInfos" ::: Vector (ComputePipelineCreateInfo a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (("pipelines" ::: Vector Pipeline))-createComputePipelines device pipelineCache createInfos allocator = evalContT $ do+createComputePipelines :: forall a io . (PokeChain a, MonadIO io) => Device -> PipelineCache -> ("createInfos" ::: Vector (ComputePipelineCreateInfo a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io (("pipelines" ::: Vector Pipeline))+createComputePipelines device pipelineCache createInfos allocator = liftIO . evalContT $ do let vkCreateComputePipelines' = mkVkCreateComputePipelines (pVkCreateComputePipelines (deviceCmds (device :: Device))) pPCreateInfos <- ContT $ allocaBytesAligned @(ComputePipelineCreateInfo _) ((Data.Vector.length (createInfos)) * 96) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPCreateInfos `plusPtr` (96 * (i)) :: Ptr (ComputePipelineCreateInfo _)) (e) . ($ ())) (createInfos)@@ -421,11 +416,11 @@ -- 'bracket' -- -- The allocated value must not be returned from the provided computation-withComputePipelines :: PokeChain a => Device -> PipelineCache -> Vector (ComputePipelineCreateInfo a) -> Maybe AllocationCallbacks -> (Vector Pipeline -> IO r) -> IO r-withComputePipelines device pipelineCache computePipelineCreateInfo allocationCallbacks =+withComputePipelines :: forall a r . PokeChain a => Device -> PipelineCache -> Vector (ComputePipelineCreateInfo a) -> Maybe AllocationCallbacks -> ((Vector Pipeline) -> IO r) -> IO r+withComputePipelines device pipelineCache pCreateInfos pAllocator = bracket- (createComputePipelines device pipelineCache computePipelineCreateInfo allocationCallbacks)- (traverse (\o -> destroyPipeline device o allocationCallbacks))+ (createComputePipelines device pipelineCache pCreateInfos pAllocator)+ (\(o0) -> traverse_ (\o0Elem -> destroyPipeline device o0Elem pAllocator) o0) foreign import ccall@@ -439,11 +434,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the pipeline.+-- - @device@ is the logical device that destroys the pipeline. ----- - 'Graphics.Vulkan.Core10.Handles.Pipeline' is the handle of the--- pipeline to destroy.+-- - @pipeline@ is the handle of the pipeline to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -451,50 +444,46 @@ -- -- == Valid Usage ----- - All submitted commands that refer to--- 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ have completed--- execution+-- - All submitted commands that refer to @pipeline@ /must/ have+-- completed execution -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Pipeline' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @pipeline@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Pipeline' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @pipeline@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.Pipeline' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Pipeline' handle+-- - If @pipeline@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @pipeline@ /must/+-- be a valid 'Graphics.Vulkan.Core10.Handles.Pipeline' handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.Pipeline' is a valid handle, it--- /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @pipeline@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ be--- externally synchronized+-- - Host access to @pipeline@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Pipeline'-destroyPipeline :: Device -> Pipeline -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyPipeline device pipeline allocator = evalContT $ do+destroyPipeline :: forall io . MonadIO io => Device -> Pipeline -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyPipeline device pipeline allocator = liftIO . evalContT $ do let vkDestroyPipeline' = mkVkDestroyPipeline (pVkDestroyPipeline (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -770,13 +759,13 @@ -- equal to -- 'Graphics.Vulkan.Extensions.VK_NV_mesh_shader.PhysicalDeviceMeshShaderPropertiesNV'::@maxMeshOutputPrimitives@. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' has the+-- - If @flags@ has the -- 'Graphics.Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT' -- flag set, the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-subgroupSizeControl subgroupSizeControl> -- feature /must/ be enabled. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' has the+-- - If @flags@ has the -- 'Graphics.Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT' -- flag set, the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-computeFullSubgroups computeFullSubgroups>@@ -784,8 +773,8 @@ -- -- - If a -- 'Graphics.Vulkan.Extensions.VK_EXT_subgroup_size_control.PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT'--- structure is included in the @pNext@ chain,--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not have the+-- structure is included in the @pNext@ chain, @flags@ /must/ not have+-- the -- 'Graphics.Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT' -- flag set. --@@ -809,14 +798,13 @@ -- -- - If a -- 'Graphics.Vulkan.Extensions.VK_EXT_subgroup_size_control.PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT'--- structure is included in the @pNext@ chain, and--- 'Graphics.Vulkan.Core10.BaseType.Flags' has the+-- structure is included in the @pNext@ chain, and @flags@ has the -- 'Graphics.Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT' -- flag set, the local workgroup size in the X dimension of the -- pipeline /must/ be a multiple of -- 'Graphics.Vulkan.Extensions.VK_EXT_subgroup_size_control.PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT'::@requiredSubgroupSize@. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' has both the+-- - If @flags@ has both the -- 'Graphics.Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT' -- and -- 'Graphics.Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT'@@ -824,10 +812,9 @@ -- pipeline /must/ be a multiple of -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#limits-max-subgroup-size maxSubgroupSize>. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' has the+-- - If @flags@ has the -- 'Graphics.Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT'--- flag set and 'Graphics.Vulkan.Core10.BaseType.Flags' does not have--- the+-- flag set and @flags@ does not have the -- 'Graphics.Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT' -- flag set and no -- 'Graphics.Vulkan.Extensions.VK_EXT_subgroup_size_control.PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT'@@ -846,8 +833,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PipelineShaderStageCreateFlagBits' -- values --@@ -875,7 +861,7 @@ data PipelineShaderStageCreateInfo (es :: [Type]) = PipelineShaderStageCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PipelineShaderStageCreateFlagBits' -- specifying how the pipeline shader stage will be generated. flags :: PipelineShaderStageCreateFlags@@ -969,25 +955,25 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains the+-- - If @flags@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and @basePipelineIndex@ is -1, @basePipelineHandle@ /must/ be -- a valid handle to a compute -- 'Graphics.Vulkan.Core10.Handles.Pipeline' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains the+-- - If @flags@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and @basePipelineHandle@ is -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', -- @basePipelineIndex@ /must/ be a valid index into the calling -- command’s @pCreateInfos@ parameter ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains the+-- - If @flags@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and @basePipelineIndex@ is not -1, @basePipelineHandle@ /must/ -- be 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains the+-- - If @flags@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and @basePipelineHandle@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',@@ -1025,8 +1011,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits' -- values --@@ -1050,7 +1035,7 @@ data ComputePipelineCreateInfo (es :: [Type]) = ComputePipelineCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits' -- specifying how the pipeline will be generated. flags :: PipelineCreateFlags@@ -1199,8 +1184,8 @@ , -- | @binding@ /must/ be less than -- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxVertexInputBindings@ binding :: Word32- , -- | 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be a valid- -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value+ , -- | @format@ /must/ be a valid 'Graphics.Vulkan.Core10.Enums.Format.Format'+ -- value format :: Format , -- | @offset@ /must/ be less than or equal to -- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxVertexInputAttributeOffset@@@ -1282,7 +1267,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - If @vertexBindingDescriptionCount@ is not @0@, -- @pVertexBindingDescriptions@ /must/ be a valid pointer to an array@@ -1303,7 +1288,7 @@ data PipelineVertexInputStateCreateInfo (es :: [Type]) = PipelineVertexInputStateCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ , -- | @flags@ is reserved for future use. flags :: PipelineVertexInputStateCreateFlags , -- | @pVertexBindingDescriptions@ is a pointer to an array of -- 'VertexInputBindingDescription' structures.@@ -1422,7 +1407,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - @topology@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.PrimitiveTopology.PrimitiveTopology'@@ -1435,7 +1420,7 @@ -- 'Graphics.Vulkan.Core10.Enums.PrimitiveTopology.PrimitiveTopology', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PipelineInputAssemblyStateCreateInfo = PipelineInputAssemblyStateCreateInfo- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ { -- | @flags@ is reserved for future use. flags :: PipelineInputAssemblyStateCreateFlags , -- | @topology@ is a -- 'Graphics.Vulkan.Core10.Enums.PrimitiveTopology.PrimitiveTopology'@@ -1446,13 +1431,13 @@ -- applies to indexed draws -- ('Graphics.Vulkan.Core10.CommandBufferBuilding.cmdDrawIndexed' and -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdDrawIndexedIndirect'),- -- and the special index value is either 0xFFFFFFFF when the- -- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' parameter of+ -- and the special index value is either 0xFFFFFFFF when the @indexType@+ -- parameter of -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdBindIndexBuffer' is -- equal to 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT32',- -- 0xFF when 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' is equal to+ -- 0xFF when @indexType@ is equal to -- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT8_EXT', or 0xFFFF- -- when 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' is equal to+ -- when @indexType@ is equal to -- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT16'. Primitive -- restart is not allowed for “list” topologies. primitiveRestartEnable :: Bool@@ -1519,7 +1504,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- = See Also --@@ -1529,7 +1514,7 @@ data PipelineTessellationStateCreateInfo (es :: [Type]) = PipelineTessellationStateCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ , -- | @flags@ is reserved for future use. flags :: PipelineTessellationStateCreateFlags , -- | @patchControlPoints@ number of control points per patch. patchControlPoints :: Word32@@ -1638,7 +1623,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - @viewportCount@ /must/ be greater than @0@ --@@ -1654,7 +1639,7 @@ data PipelineViewportStateCreateInfo (es :: [Type]) = PipelineViewportStateCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ , -- | @flags@ is reserved for future use. flags :: PipelineViewportStateCreateFlags , -- | @pViewports@ is a pointer to an array of -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.Viewport' structures,@@ -1761,15 +1746,13 @@ -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-fillModeNonSolid non-solid fill modes>--- feature is not enabled,--- 'Graphics.Vulkan.Core10.Enums.PolygonMode.PolygonMode' /must/ be+-- feature is not enabled, @polygonMode@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.PolygonMode.POLYGON_MODE_FILL' or -- 'Graphics.Vulkan.Core10.Enums.PolygonMode.POLYGON_MODE_FILL_RECTANGLE_NV' -- -- - If the -- @https:\/\/www.khronos.org\/registry\/vulkan\/specs\/1.2-extensions\/html\/vkspec.html#VK_NV_fill_rectangle@--- extension is not enabled,--- 'Graphics.Vulkan.Core10.Enums.PolygonMode.PolygonMode' /must/ not be+-- extension is not enabled, @polygonMode@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.PolygonMode.POLYGON_MODE_FILL_RECTANGLE_NV' -- -- == Valid Usage (Implicit)@@ -1790,16 +1773,16 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ ----- - 'Graphics.Vulkan.Core10.Enums.PolygonMode.PolygonMode' /must/ be a--- valid 'Graphics.Vulkan.Core10.Enums.PolygonMode.PolygonMode' value+-- - @polygonMode@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.PolygonMode.PolygonMode' value -- -- - @cullMode@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.CullModeFlagBits.CullModeFlagBits' -- values ----- - 'Graphics.Vulkan.Core10.Enums.FrontFace.FrontFace' /must/ be a valid+-- - @frontFace@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.FrontFace.FrontFace' value -- -- = See Also@@ -1814,7 +1797,7 @@ data PipelineRasterizationStateCreateInfo (es :: [Type]) = PipelineRasterizationStateCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ , -- | @flags@ is reserved for future use. flags :: PipelineRasterizationStateCreateFlags , -- | @depthClampEnable@ controls whether to clamp the fragment’s depth values -- as described in@@ -1830,16 +1813,15 @@ , -- | @rasterizerDiscardEnable@ controls whether primitives are discarded -- immediately before the rasterization stage. rasterizerDiscardEnable :: Bool- , -- | 'Graphics.Vulkan.Core10.Enums.PolygonMode.PolygonMode' is the triangle- -- rendering mode. See+ , -- | @polygonMode@ is the triangle rendering mode. See -- 'Graphics.Vulkan.Core10.Enums.PolygonMode.PolygonMode'. polygonMode :: PolygonMode , -- | @cullMode@ is the triangle facing direction used for primitive culling. -- See 'Graphics.Vulkan.Core10.Enums.CullModeFlagBits.CullModeFlagBits'. cullMode :: CullModeFlags- , -- | 'Graphics.Vulkan.Core10.Enums.FrontFace.FrontFace' is a- -- 'Graphics.Vulkan.Core10.Enums.FrontFace.FrontFace' value specifying the- -- front-facing triangle orientation to be used for culling.+ , -- | @frontFace@ is a 'Graphics.Vulkan.Core10.Enums.FrontFace.FrontFace'+ -- value specifying the front-facing triangle orientation to be used for+ -- culling. frontFace :: FrontFace , -- | @depthBiasEnable@ controls whether to bias fragment depth values. depthBiasEnable :: Bool@@ -1979,7 +1961,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - @rasterizationSamples@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits'@@ -2000,7 +1982,7 @@ data PipelineMultisampleStateCreateInfo (es :: [Type]) = PipelineMultisampleStateCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ , -- | @flags@ is reserved for future use. flags :: PipelineMultisampleStateCreateFlags , -- | @rasterizationSamples@ is a -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits'@@ -2055,7 +2037,7 @@ lift $ poke ((p `plusPtr` 28 :: Ptr CFloat)) (CFloat (minSampleShading)) pSampleMask'' <- case Data.Vector.length (sampleMask) of 0 -> pure nullPtr- vecLen -> do+ vecLen -> do let requiredLen = case (rasterizationSamples) of SampleCountFlagBits n -> (n + 31) `quot` 32 lift $ unless (requiredLen == fromIntegral vecLen) $@@ -2357,7 +2339,7 @@ -- 'Graphics.Vulkan.Core10.BaseType.FALSE' -- -- - If @logicOpEnable@ is 'Graphics.Vulkan.Core10.BaseType.TRUE',--- 'Graphics.Vulkan.Core10.Enums.LogicOp.LogicOp' /must/ be a valid+-- @logicOp@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.LogicOp.LogicOp' value -- -- == Valid Usage (Implicit)@@ -2371,7 +2353,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - If @attachmentCount@ is not @0@, @pAttachments@ /must/ be a valid -- pointer to an array of @attachmentCount@ valid@@ -2387,13 +2369,12 @@ data PipelineColorBlendStateCreateInfo (es :: [Type]) = PipelineColorBlendStateCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ , -- | @flags@ is reserved for future use. flags :: PipelineColorBlendStateCreateFlags , -- | @logicOpEnable@ controls whether to apply -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#framebuffer-logicop Logical Operations>. logicOpEnable :: Bool- , -- | 'Graphics.Vulkan.Core10.Enums.LogicOp.LogicOp' selects which logical- -- operation to apply.+ , -- | @logicOp@ selects which logical operation to apply. logicOp :: LogicOp , -- | @pAttachments@: is a pointer to an array of per target attachment -- states.@@ -2499,7 +2480,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - If @dynamicStateCount@ is not @0@, @pDynamicStates@ /must/ be a -- valid pointer to an array of @dynamicStateCount@ valid@@ -2512,7 +2493,7 @@ -- 'Graphics.Vulkan.Core10.Enums.PipelineDynamicStateCreateFlags.PipelineDynamicStateCreateFlags', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PipelineDynamicStateCreateInfo = PipelineDynamicStateCreateInfo- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ { -- | @flags@ is reserved for future use. flags :: PipelineDynamicStateCreateFlags , -- | @pDynamicStates@ is a pointer to an array of -- 'Graphics.Vulkan.Core10.Enums.DynamicState.DynamicState' values@@ -2578,7 +2559,7 @@ , -- | @depthFailOp@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.StencilOp.StencilOp' value depthFailOp :: StencilOp- , -- | 'Graphics.Vulkan.Core10.Enums.CompareOp.CompareOp' /must/ be a valid+ , -- | @compareOp@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.CompareOp.CompareOp' value compareOp :: CompareOp , -- | @compareMask@ selects the bits of the unsigned integer stencil values@@ -2663,7 +2644,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - @depthCompareOp@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.CompareOp.CompareOp' value@@ -2681,7 +2662,7 @@ -- 'StencilOpState', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PipelineDepthStencilStateCreateInfo = PipelineDepthStencilStateCreateInfo- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ { -- | @flags@ is reserved for future use. flags :: PipelineDepthStencilStateCreateFlags , -- | @depthTestEnable@ controls whether -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fragops-depth depth testing>@@ -2796,25 +2777,25 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains the+-- - If @flags@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and @basePipelineIndex@ is -1, @basePipelineHandle@ /must/ be -- a valid handle to a graphics -- 'Graphics.Vulkan.Core10.Handles.Pipeline' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains the+-- - If @flags@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and @basePipelineHandle@ is -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', -- @basePipelineIndex@ /must/ be a valid index into the calling -- command’s @pCreateInfos@ parameter ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains the+-- - If @flags@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and @basePipelineIndex@ is not -1, @basePipelineHandle@ /must/ -- be 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains the+-- - If @flags@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and @basePipelineHandle@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',@@ -2911,8 +2892,7 @@ -- chapter -- -- - If rasterization is not disabled and @subpass@ uses a depth\/stencil--- attachment in 'Graphics.Vulkan.Core10.Handles.RenderPass' that has a--- layout of+-- attachment in @renderPass@ that has a layout of -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL'@@ -2921,8 +2901,7 @@ -- /must/ be 'Graphics.Vulkan.Core10.BaseType.FALSE' -- -- - If rasterization is not disabled and @subpass@ uses a depth\/stencil--- attachment in 'Graphics.Vulkan.Core10.Handles.RenderPass' that has a--- layout of+-- attachment in @renderPass@ that has a layout of -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL'@@ -3081,38 +3060,35 @@ -- @pMultisampleState@ /must/ follow the rules for a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-noattachments zero-attachment subpass> ----- - @subpass@ /must/ be a valid subpass within--- 'Graphics.Vulkan.Core10.Handles.RenderPass'+-- - @subpass@ /must/ be a valid subpass within @renderPass@ ----- - If the 'Graphics.Vulkan.Core10.Handles.RenderPass' has multiview--- enabled and @subpass@ has more than one bit set in the view mask and--- @multiviewTessellationShader@ is not enabled, then @pStages@ /must/--- not include tessellation shaders.+-- - If the @renderPass@ has multiview enabled and @subpass@ has more+-- than one bit set in the view mask and @multiviewTessellationShader@+-- is not enabled, then @pStages@ /must/ not include tessellation+-- shaders. ----- - If the 'Graphics.Vulkan.Core10.Handles.RenderPass' has multiview--- enabled and @subpass@ has more than one bit set in the view mask and--- @multiviewGeometryShader@ is not enabled, then @pStages@ /must/ not--- include a geometry shader.+-- - If the @renderPass@ has multiview enabled and @subpass@ has more+-- than one bit set in the view mask and @multiviewGeometryShader@ is+-- not enabled, then @pStages@ /must/ not include a geometry shader. ----- - If the 'Graphics.Vulkan.Core10.Handles.RenderPass' has multiview--- enabled and @subpass@ has more than one bit set in the view mask,--- shaders in the pipeline /must/ not write to the @Layer@ built-in--- output+-- - If the @renderPass@ has multiview enabled and @subpass@ has more+-- than one bit set in the view mask, shaders in the pipeline /must/+-- not write to the @Layer@ built-in output ----- - If the 'Graphics.Vulkan.Core10.Handles.RenderPass' has multiview--- enabled, then all shaders /must/ not include variables decorated--- with the @Layer@ built-in decoration in their interfaces.+-- - If the @renderPass@ has multiview enabled, then all shaders /must/+-- not include variables decorated with the @Layer@ built-in decoration+-- in their interfaces. ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain the+-- - @flags@ /must/ not contain the -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group.PIPELINE_CREATE_DISPATCH_BASE' -- flag. -- -- - If @pStages@ includes a fragment shader stage and an input -- attachment was referenced by the -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_maintenance2.RenderPassInputAttachmentAspectCreateInfo'--- at 'Graphics.Vulkan.Core10.Handles.RenderPass' create time, its--- shader code /must/ not read from any aspect that was not specified--- in the @aspectMask@ of the corresponding+-- at @renderPass@ create time, its shader code /must/ not read from+-- any aspect that was not specified in the @aspectMask@ of the+-- corresponding -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_maintenance2.InputAttachmentAspectReference' -- structure. --@@ -3209,8 +3185,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits' -- values --@@ -3226,15 +3201,15 @@ -- - @layout@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' handle ----- - 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ be a valid+-- - @renderPass@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.RenderPass' handle -- -- - @stageCount@ /must/ be greater than @0@ ----- - Each of @basePipelineHandle@, @layout@, and--- 'Graphics.Vulkan.Core10.Handles.RenderPass' that are valid handles--- of non-ignored parameters /must/ have been created, allocated, or--- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Each of @basePipelineHandle@, @layout@, and @renderPass@ that are+-- valid handles of non-ignored parameters /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device' -- -- = See Also --@@ -3254,7 +3229,7 @@ data GraphicsPipelineCreateInfo (es :: [Type]) = GraphicsPipelineCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits' -- specifying how the pipeline will be generated. flags :: PipelineCreateFlags@@ -3307,10 +3282,10 @@ , -- | @layout@ is the description of binding locations used by both the -- pipeline and descriptor sets used with the pipeline. layout :: PipelineLayout- , -- | 'Graphics.Vulkan.Core10.Handles.RenderPass' is a handle to a render pass- -- object describing the environment in which the pipeline will be used;- -- the pipeline /must/ only be used with an instance of any render pass- -- compatible with the one provided. See+ , -- | @renderPass@ is a handle to a render pass object describing the+ -- environment in which the pipeline will be used; the pipeline /must/ only+ -- be used with an instance of any render pass compatible with the one+ -- provided. See -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility Render Pass Compatibility> -- for more information. renderPass :: RenderPass
src/Graphics/Vulkan/Core10/PipelineCache.hs view
@@ -8,6 +8,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -21,10 +22,11 @@ import Control.Monad.Trans.Cont (evalContT) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Foreign.C.Types (CSize(..))+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.C.Types (CChar) import Foreign.C.Types (CSize)-import Foreign.C.Types (CSize(..)) import Foreign.C.Types (CSize(CSize)) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -72,8 +74,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the pipeline cache object.+-- - @device@ is the logical device that creates the pipeline cache+-- object. -- -- - @pCreateInfo@ is a pointer to a 'PipelineCacheCreateInfo' structure -- containing initial parameters for the pipeline cache object.@@ -117,8 +119,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'PipelineCacheCreateInfo' structure@@ -149,8 +151,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.PipelineCache', -- 'PipelineCacheCreateInfo'-createPipelineCache :: Device -> PipelineCacheCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (PipelineCache)-createPipelineCache device createInfo allocator = evalContT $ do+createPipelineCache :: forall io . MonadIO io => Device -> PipelineCacheCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io (PipelineCache)+createPipelineCache device createInfo allocator = liftIO . evalContT $ do let vkCreatePipelineCache' = mkVkCreatePipelineCache (pVkCreatePipelineCache (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -166,11 +168,11 @@ -- using 'bracket' -- -- The allocated value must not be returned from the provided computation-withPipelineCache :: Device -> PipelineCacheCreateInfo -> Maybe AllocationCallbacks -> (PipelineCache -> IO r) -> IO r-withPipelineCache device pipelineCacheCreateInfo allocationCallbacks =+withPipelineCache :: forall r . Device -> PipelineCacheCreateInfo -> Maybe AllocationCallbacks -> ((PipelineCache) -> IO r) -> IO r+withPipelineCache device pCreateInfo pAllocator = bracket- (createPipelineCache device pipelineCacheCreateInfo allocationCallbacks)- (\o -> destroyPipelineCache device o allocationCallbacks)+ (createPipelineCache device pCreateInfo pAllocator)+ (\(o0) -> destroyPipelineCache device o0 pAllocator) foreign import ccall@@ -184,11 +186,10 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the pipeline cache object.+-- - @device@ is the logical device that destroys the pipeline cache+-- object. ----- - 'Graphics.Vulkan.Core10.Handles.PipelineCache' is the handle of the--- pipeline cache to destroy.+-- - @pipelineCache@ is the handle of the pipeline cache to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -197,45 +198,43 @@ -- == Valid Usage -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.PipelineCache'--- was created, a compatible set of callbacks /must/ be provided here+-- were provided when @pipelineCache@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.PipelineCache'--- was created, @pAllocator@ /must/ be @NULL@+-- were provided when @pipelineCache@ was created, @pAllocator@ /must/+-- be @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.PipelineCache' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.PipelineCache' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.PipelineCache' handle+-- - If @pipelineCache@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @pipelineCache@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.PipelineCache'+-- handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.PipelineCache' is a valid handle,--- it /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @pipelineCache@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.PipelineCache' /must/--- be externally synchronized+-- - Host access to @pipelineCache@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.PipelineCache'-destroyPipelineCache :: Device -> PipelineCache -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyPipelineCache device pipelineCache allocator = evalContT $ do+destroyPipelineCache :: forall io . MonadIO io => Device -> PipelineCache -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyPipelineCache device pipelineCache allocator = liftIO . evalContT $ do let vkDestroyPipelineCache' = mkVkDestroyPipelineCache (pVkDestroyPipelineCache (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -255,11 +254,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the pipeline cache.+-- - @device@ is the logical device that owns the pipeline cache. ----- - 'Graphics.Vulkan.Core10.Handles.PipelineCache' is the pipeline cache--- to retrieve data from.+-- - @pipelineCache@ is the pipeline cache to retrieve data from. -- -- - @pDataSize@ is a pointer to a @size_t@ value related to the amount -- of data in the pipeline cache, as described below.@@ -334,10 +331,10 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.PipelineCache' /must/ be a valid+-- - @pipelineCache@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PipelineCache' handle -- -- - @pDataSize@ /must/ be a valid pointer to a @size_t@ value@@ -346,9 +343,8 @@ -- not @NULL@, @pData@ /must/ be a valid pointer to an array of -- @pDataSize@ bytes ----- - 'Graphics.Vulkan.Core10.Handles.PipelineCache' /must/ have been--- created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - @pipelineCache@ /must/ have been created, allocated, or retrieved+-- from @device@ -- -- == Return Codes --@@ -368,8 +364,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.PipelineCache'-getPipelineCacheData :: Device -> PipelineCache -> IO (Result, ("data" ::: ByteString))-getPipelineCacheData device pipelineCache = evalContT $ do+getPipelineCacheData :: forall io . MonadIO io => Device -> PipelineCache -> io (Result, ("data" ::: ByteString))+getPipelineCacheData device pipelineCache = liftIO . evalContT $ do let vkGetPipelineCacheData' = mkVkGetPipelineCacheData (pVkGetPipelineCacheData (deviceCmds (device :: Device))) let device' = deviceHandle (device) pPDataSize <- ContT $ bracket (callocBytes @CSize 8) free@@ -395,8 +391,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the pipeline cache objects.+-- - @device@ is the logical device that owns the pipeline cache objects. -- -- - @dstCache@ is the handle of the pipeline cache to merge results -- into.@@ -421,8 +416,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @dstCache@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PipelineCache' handle@@ -434,10 +429,10 @@ -- - @srcCacheCount@ /must/ be greater than @0@ -- -- - @dstCache@ /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- @device@ -- -- - Each element of @pSrcCaches@ /must/ have been created, allocated, or--- retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- retrieved from @device@ -- -- == Host Synchronization --@@ -459,8 +454,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.PipelineCache'-mergePipelineCaches :: Device -> ("dstCache" ::: PipelineCache) -> ("srcCaches" ::: Vector PipelineCache) -> IO ()-mergePipelineCaches device dstCache srcCaches = evalContT $ do+mergePipelineCaches :: forall io . MonadIO io => Device -> ("dstCache" ::: PipelineCache) -> ("srcCaches" ::: Vector PipelineCache) -> io ()+mergePipelineCaches device dstCache srcCaches = liftIO . evalContT $ do let vkMergePipelineCaches' = mkVkMergePipelineCaches (pVkMergePipelineCaches (deviceCmds (device :: Device))) pPSrcCaches <- ContT $ allocaBytesAligned @PipelineCache ((Data.Vector.length (srcCaches)) * 8) 8 lift $ Data.Vector.imapM_ (\i e -> poke (pPSrcCaches `plusPtr` (8 * (i)) :: Ptr PipelineCache) (e)) (srcCaches)@@ -487,7 +482,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - If @initialDataSize@ is not @0@, @pInitialData@ /must/ be a valid -- pointer to an array of @initialDataSize@ bytes@@ -498,7 +493,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createPipelineCache' data PipelineCacheCreateInfo = PipelineCacheCreateInfo- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ { -- | @flags@ is reserved for future use. flags :: PipelineCacheCreateFlags , -- | @initialDataSize@ is the number of bytes in @pInitialData@. If -- @initialDataSize@ is zero, the pipeline cache will initially be empty.
src/Graphics/Vulkan/Core10/PipelineLayout.hs view
@@ -7,6 +7,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -19,6 +20,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -65,8 +67,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the pipeline layout.+-- - @device@ is the logical device that creates the pipeline layout. -- -- - @pCreateInfo@ is a pointer to a 'PipelineLayoutCreateInfo' structure -- specifying the state of the pipeline layout object.@@ -81,8 +82,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'PipelineLayoutCreateInfo' structure@@ -113,8 +114,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.PipelineLayout', -- 'PipelineLayoutCreateInfo'-createPipelineLayout :: Device -> PipelineLayoutCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (PipelineLayout)-createPipelineLayout device createInfo allocator = evalContT $ do+createPipelineLayout :: forall io . MonadIO io => Device -> PipelineLayoutCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io (PipelineLayout)+createPipelineLayout device createInfo allocator = liftIO . evalContT $ do let vkCreatePipelineLayout' = mkVkCreatePipelineLayout (pVkCreatePipelineLayout (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -130,11 +131,11 @@ -- using 'bracket' -- -- The allocated value must not be returned from the provided computation-withPipelineLayout :: Device -> PipelineLayoutCreateInfo -> Maybe AllocationCallbacks -> (PipelineLayout -> IO r) -> IO r-withPipelineLayout device pipelineLayoutCreateInfo allocationCallbacks =+withPipelineLayout :: forall r . Device -> PipelineLayoutCreateInfo -> Maybe AllocationCallbacks -> ((PipelineLayout) -> IO r) -> IO r+withPipelineLayout device pCreateInfo pAllocator = bracket- (createPipelineLayout device pipelineLayoutCreateInfo allocationCallbacks)- (\o -> destroyPipelineLayout device o allocationCallbacks)+ (createPipelineLayout device pCreateInfo pAllocator)+ (\(o0) -> destroyPipelineLayout device o0 pAllocator) foreign import ccall@@ -148,11 +149,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the pipeline layout.+-- - @device@ is the logical device that destroys the pipeline layout. ----- - 'Graphics.Vulkan.Core10.Handles.PipelineLayout' is the pipeline--- layout to destroy.+-- - @pipelineLayout@ is the pipeline layout to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -161,51 +160,48 @@ -- == Valid Usage -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.PipelineLayout'--- was created, a compatible set of callbacks /must/ be provided here+-- were provided when @pipelineLayout@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.PipelineLayout'--- was created, @pAllocator@ /must/ be @NULL@+-- were provided when @pipelineLayout@ was created, @pAllocator@ /must/+-- be @NULL@ ----- - 'Graphics.Vulkan.Core10.Handles.PipelineLayout' /must/ not have been--- passed to any @vkCmd*@ command for any command buffers that are--- still in the+-- - @pipelineLayout@ /must/ not have been passed to any @vkCmd*@ command+-- for any command buffers that are still in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- when 'destroyPipelineLayout' is called -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.PipelineLayout' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' handle+-- - If @pipelineLayout@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @pipelineLayout@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.PipelineLayout'+-- handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.PipelineLayout' is a valid--- handle, it /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @pipelineLayout@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.PipelineLayout'--- /must/ be externally synchronized+-- - Host access to @pipelineLayout@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.PipelineLayout'-destroyPipelineLayout :: Device -> PipelineLayout -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyPipelineLayout device pipelineLayout allocator = evalContT $ do+destroyPipelineLayout :: forall io . MonadIO io => Device -> PipelineLayout -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyPipelineLayout device pipelineLayout allocator = liftIO . evalContT $ do let vkDestroyPipelineLayout' = mkVkDestroyPipelineLayout (pVkDestroyPipelineLayout (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -282,8 +278,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER' -- and -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'@@ -294,8 +289,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER' -- and -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC'@@ -306,8 +300,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER' -- and -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'@@ -318,8 +311,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE', -- and@@ -331,8 +323,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE', -- and -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER'@@ -343,8 +334,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT' -- accessible to any given shader stage across all elements of -- @pSetLayouts@ /must/ be less than or equal to@@ -353,15 +343,13 @@ -- - The total number of bindings in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT' -- accessible to any given shader stage across all elements of -- @pSetLayouts@ /must/ be less than or equal to -- 'Graphics.Vulkan.Extensions.VK_EXT_inline_uniform_block.PhysicalDeviceInlineUniformBlockPropertiesEXT'::@maxPerStageDescriptorInlineUniformBlocks@ ----- - The total number of descriptors with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- - The total number of descriptors with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER' -- and -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'@@ -369,8 +357,7 @@ -- @pSetLayouts@ /must/ be less than or equal to -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_descriptor_indexing.PhysicalDeviceDescriptorIndexingProperties'::@maxPerStageDescriptorUpdateAfterBindSamplers@ ----- - The total number of descriptors with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- - The total number of descriptors with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER' -- and -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC'@@ -378,8 +365,7 @@ -- @pSetLayouts@ /must/ be less than or equal to -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_descriptor_indexing.PhysicalDeviceDescriptorIndexingProperties'::@maxPerStageDescriptorUpdateAfterBindUniformBuffers@ ----- - The total number of descriptors with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- - The total number of descriptors with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER' -- and -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'@@ -387,8 +373,7 @@ -- @pSetLayouts@ /must/ be less than or equal to -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_descriptor_indexing.PhysicalDeviceDescriptorIndexingProperties'::@maxPerStageDescriptorUpdateAfterBindStorageBuffers@ ----- - The total number of descriptors with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- - The total number of descriptors with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE', -- and@@ -397,8 +382,7 @@ -- @pSetLayouts@ /must/ be less than or equal to -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_descriptor_indexing.PhysicalDeviceDescriptorIndexingProperties'::@maxPerStageDescriptorUpdateAfterBindSampledImages@ ----- - The total number of descriptors with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- - The total number of descriptors with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE', -- and -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER'@@ -406,15 +390,13 @@ -- @pSetLayouts@ /must/ be less than or equal to -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_descriptor_indexing.PhysicalDeviceDescriptorIndexingProperties'::@maxPerStageDescriptorUpdateAfterBindStorageImages@ ----- - The total number of descriptors with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- - The total number of descriptors with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT' -- accessible to any given shader stage across all elements of -- @pSetLayouts@ /must/ be less than or equal to -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_descriptor_indexing.PhysicalDeviceDescriptorIndexingProperties'::@maxPerStageDescriptorUpdateAfterBindInputAttachments@ ----- - The total number of bindings with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- - The total number of bindings with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT' -- accessible to any given shader stage across all elements of -- @pSetLayouts@ /must/ be less than or equal to@@ -423,8 +405,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER' -- and -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'@@ -435,8 +416,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER' -- accessible across all shader stages and across all elements of -- @pSetLayouts@ /must/ be less than or equal to@@ -445,8 +425,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC' -- accessible across all shader stages and across all elements of -- @pSetLayouts@ /must/ be less than or equal to@@ -455,8 +434,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER' -- accessible across all shader stages and across all elements of -- @pSetLayouts@ /must/ be less than or equal to@@ -465,8 +443,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC' -- accessible across all shader stages and across all elements of -- @pSetLayouts@ /must/ be less than or equal to@@ -475,8 +452,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE', -- and@@ -488,8 +464,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE', -- and -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER'@@ -500,8 +475,7 @@ -- - The total number of descriptors in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT' -- accessible across all shader stages and across all elements of -- @pSetLayouts@ /must/ be less than or equal to@@ -510,8 +484,7 @@ -- - The total number of bindings in descriptor set layouts created -- without the -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'--- bit set with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- bit set with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT' -- accessible across all shader stages and across all elements of -- @pSetLayouts@ /must/ be less than or equal to@@ -572,8 +545,7 @@ -- @pSetLayouts@ /must/ be less than or equal to -- 'Graphics.Vulkan.Core12.Promoted_From_VK_EXT_descriptor_indexing.PhysicalDeviceDescriptorIndexingProperties'::@maxDescriptorSetUpdateAfterBindInputAttachments@ ----- - The total number of bindings with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- - The total number of bindings with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT' -- accessible across all shader stages and across all elements of -- @pSetLayouts@ /must/ be less than or equal to@@ -587,8 +559,7 @@ -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR' -- set ----- - The total number of bindings with a--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' of+-- - The total number of bindings with a @descriptorType@ of -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV' -- accessible across all shader stages and across all elements of -- @pSetLayouts@ /must/ be less than or equal to@@ -601,7 +572,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - If @setLayoutCount@ is not @0@, @pSetLayouts@ /must/ be a valid -- pointer to an array of @setLayoutCount@ valid@@ -619,7 +590,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createPipelineLayout' data PipelineLayoutCreateInfo = PipelineLayoutCreateInfo- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ { -- | @flags@ is reserved for future use. flags :: PipelineLayoutCreateFlags , -- | @pSetLayouts@ is a pointer to an array of -- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' objects.
src/Graphics/Vulkan/Core10/Query.hs view
@@ -7,6 +7,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -18,10 +19,11 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Foreign.C.Types (CSize(..))+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.C.Types (CSize)-import Foreign.C.Types (CSize(..)) import Foreign.C.Types (CSize(CSize)) import Foreign.Storable (Storable(peek)) import Foreign.Storable (Storable(poke))@@ -55,9 +57,8 @@ import Graphics.Vulkan.Core10.Enums.QueryPoolCreateFlags (QueryPoolCreateFlags) import {-# SOURCE #-} Graphics.Vulkan.Extensions.VK_INTEL_performance_query (QueryPoolCreateInfoINTEL) import {-# SOURCE #-} Graphics.Vulkan.Extensions.VK_KHR_performance_query (QueryPoolPerformanceCreateInfoKHR)-import Graphics.Vulkan.Core10.Enums.QueryResultFlagBits (QueryResultFlags)-import Graphics.Vulkan.Core10.Enums.QueryResultFlagBits (QueryResultFlags) import Graphics.Vulkan.Core10.Enums.QueryResultFlagBits (QueryResultFlagBits(..))+import Graphics.Vulkan.Core10.Enums.QueryResultFlagBits (QueryResultFlags) import Graphics.Vulkan.Core10.Enums.QueryType (QueryType) import Graphics.Vulkan.Core10.Enums.Result (Result) import Graphics.Vulkan.Core10.Enums.Result (Result(..))@@ -79,8 +80,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the query pool.+-- - @device@ is the logical device that creates the query pool. -- -- - @pCreateInfo@ is a pointer to a 'QueryPoolCreateInfo' structure -- containing the number and type of queries to be managed by the pool.@@ -95,8 +95,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'QueryPoolCreateInfo' structure@@ -126,8 +126,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.QueryPool', 'QueryPoolCreateInfo'-createQueryPool :: PokeChain a => Device -> QueryPoolCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (QueryPool)-createQueryPool device createInfo allocator = evalContT $ do+createQueryPool :: forall a io . (PokeChain a, MonadIO io) => Device -> QueryPoolCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (QueryPool)+createQueryPool device createInfo allocator = liftIO . evalContT $ do let vkCreateQueryPool' = mkVkCreateQueryPool (pVkCreateQueryPool (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -143,11 +143,11 @@ -- 'bracket' -- -- The allocated value must not be returned from the provided computation-withQueryPool :: PokeChain a => Device -> QueryPoolCreateInfo a -> Maybe AllocationCallbacks -> (QueryPool -> IO r) -> IO r-withQueryPool device queryPoolCreateInfo allocationCallbacks =+withQueryPool :: forall a r . PokeChain a => Device -> QueryPoolCreateInfo a -> Maybe AllocationCallbacks -> ((QueryPool) -> IO r) -> IO r+withQueryPool device pCreateInfo pAllocator = bracket- (createQueryPool device queryPoolCreateInfo allocationCallbacks)- (\o -> destroyQueryPool device o allocationCallbacks)+ (createQueryPool device pCreateInfo pAllocator)+ (\(o0) -> destroyQueryPool device o0 pAllocator) foreign import ccall@@ -161,11 +161,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the query pool.+-- - @device@ is the logical device that destroys the query pool. ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' is the query pool to--- destroy.+-- - @queryPool@ is the query pool to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -173,50 +171,46 @@ -- -- == Valid Usage ----- - All submitted commands that refer to--- 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have completed--- execution+-- - All submitted commands that refer to @queryPool@ /must/ have+-- completed execution -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @queryPool@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.QueryPool' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @queryPool@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.QueryPool' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle+-- - If @queryPool@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @queryPool@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.QueryPool' handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.QueryPool' is a valid handle, it--- /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @queryPool@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ be--- externally synchronized+-- - Host access to @queryPool@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.QueryPool'-destroyQueryPool :: Device -> QueryPool -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyQueryPool device queryPool allocator = evalContT $ do+destroyQueryPool :: forall io . MonadIO io => Device -> QueryPool -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyQueryPool device queryPool allocator = liftIO . evalContT $ do let vkDestroyQueryPool' = mkVkDestroyQueryPool (pVkDestroyQueryPool (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -237,11 +231,10 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the query pool.+-- - @device@ is the logical device that owns the query pool. ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' is the query pool--- managing the queries containing the desired results.+-- - @queryPool@ is the query pool managing the queries containing the+-- desired results. -- -- - @firstQuery@ is the initial query index. --@@ -255,7 +248,7 @@ -- - @stride@ is the stride in bytes between results for individual -- queries within @pData@. ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+-- - @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QueryResultFlagBits' -- specifying how and when results are returned. --@@ -266,10 +259,10 @@ -- the pool contains one integer value for each bit that is enabled in -- 'QueryPoolCreateInfo'::@pipelineStatistics@ when the pool is created. ----- If no bits are set in 'Graphics.Vulkan.Core10.BaseType.Flags', and all--- requested queries are in the available state, results are written as an--- array of 32-bit unsigned integer values. The behavior when not all--- queries are available, is described+-- If no bits are set in @flags@, and all requested queries are in the+-- available state, results are written as an array of 32-bit unsigned+-- integer values. The behavior when not all queries are available, is+-- described -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-wait-bit-not-set below>. -- -- If@@ -365,81 +358,74 @@ -- == Valid Usage -- -- - @firstQuery@ /must/ be less than the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'+-- @queryPool@ -- -- - If -- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_64_BIT'--- is not set in 'Graphics.Vulkan.Core10.BaseType.Flags', then @pData@--- and @stride@ /must/ be multiples of @4@+-- is not set in @flags@, then @pData@ and @stride@ /must/ be multiples+-- of @4@ -- -- - If -- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_64_BIT'--- is not set in 'Graphics.Vulkan.Core10.BaseType.Flags' and the--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to create--- 'Graphics.Vulkan.Core10.Handles.QueryPool' was not+-- is not set in @flags@ and the @queryType@ used to create @queryPool@+-- was not -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR', -- then @pData@ and @stride@ /must/ be multiples of @4@ -- -- - If -- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_64_BIT'--- is set in 'Graphics.Vulkan.Core10.BaseType.Flags' then @pData@ and--- @stride@ /must/ be multiples of @8@+-- is set in @flags@ then @pData@ and @stride@ /must/ be multiples of+-- @8@ ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- - If the @queryType@ used to create @queryPool@ was -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR', -- then @pData@ and @stride@ /must/ be multiples of the size of -- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PerformanceCounterResultKHR' -- -- - The sum of @firstQuery@ and @queryCount@ /must/ be less than or--- equal to the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'+-- equal to the number of queries in @queryPool@ -- -- - @dataSize@ /must/ be large enough to contain the result of each -- query, as described -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-memorylayout here> ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- - If the @queryType@ used to create @queryPool@ was -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TIMESTAMP',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_PARTIAL_BIT' ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- - If the @queryType@ used to create @queryPool@ was -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_WITH_AVAILABILITY_BIT', -- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_PARTIAL_BIT' -- or -- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QUERY_RESULT_64_BIT' ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- - If the @queryType@ used to create @queryPool@ was -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR',--- the 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been--- recorded once for each pass as retrieved via a call to+-- the @queryPool@ /must/ have been recorded once for each pass as+-- retrieved via a call to -- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR' -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ be a valid+-- - @queryPool@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle -- -- - @pData@ /must/ be a valid pointer to an array of @dataSize@ bytes ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QueryResultFlagBits' -- values -- -- - @dataSize@ /must/ be greater than @0@ ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been created,--- allocated, or retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- - @queryPool@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- == Return Codes --@@ -463,8 +449,8 @@ -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize', -- 'Graphics.Vulkan.Core10.Handles.QueryPool', -- 'Graphics.Vulkan.Core10.Enums.QueryResultFlagBits.QueryResultFlags'-getQueryPoolResults :: Device -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> ("stride" ::: DeviceSize) -> QueryResultFlags -> IO (Result)-getQueryPoolResults device queryPool firstQuery queryCount dataSize data' stride flags = do+getQueryPoolResults :: forall io . MonadIO io => Device -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> ("stride" ::: DeviceSize) -> QueryResultFlags -> io (Result)+getQueryPoolResults device queryPool firstQuery queryCount dataSize data' stride flags = liftIO $ do let vkGetQueryPoolResults' = mkVkGetQueryPoolResults (pVkGetQueryPoolResults (deviceCmds (device :: Device))) r <- vkGetQueryPoolResults' (deviceHandle (device)) (queryPool) (firstQuery) (queryCount) (CSize (dataSize)) (data') (stride) (flags) when (r < SUCCESS) (throwIO (VulkanException r))@@ -476,25 +462,23 @@ -- -- = Description ----- @pipelineStatistics@ is ignored if--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' is not+-- @pipelineStatistics@ is ignored if @queryType@ is not -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PIPELINE_STATISTICS'. -- -- == Valid Usage -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-pipelineStatisticsQuery pipeline statistics queries>--- feature is not enabled,--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' /must/ not be+-- feature is not enabled, @queryType@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PIPELINE_STATISTICS' ----- - If 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' is+-- - If @queryType@ is -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PIPELINE_STATISTICS', -- @pipelineStatistics@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.QueryPipelineStatisticFlagBits.QueryPipelineStatisticFlagBits' -- values ----- - If 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' is+-- - If @queryType@ is -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR', -- the @pNext@ chain /must/ include a structure of type -- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.QueryPoolPerformanceCreateInfoKHR'@@ -516,9 +500,9 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ ----- - 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' /must/ be a valid+-- - @queryType@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' value -- -- = See Also@@ -531,11 +515,10 @@ data QueryPoolCreateInfo (es :: [Type]) = QueryPoolCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ , -- | @flags@ is reserved for future use. flags :: QueryPoolCreateFlags- , -- | 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' is a- -- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' value specifying the- -- type of queries managed by the pool.+ , -- | @queryType@ is a 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType'+ -- value specifying the type of queries managed by the pool. queryType :: QueryType , -- | @queryCount@ is the number of queries managed by the pool. queryCount :: Word32
src/Graphics/Vulkan/Core10/Queue.hs view
@@ -8,6 +8,7 @@ import Control.Exception.Base (bracket) import Control.Monad (unless)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -21,6 +22,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable(peek))@@ -87,8 +89,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the queue.+-- - @device@ is the logical device that owns the queue. -- -- - @queueFamilyIndex@ is the index of the queue family to which the -- queue belongs.@@ -102,33 +103,29 @@ -- = Description -- -- 'getDeviceQueue' /must/ only be used to get queues that were created--- with the 'Graphics.Vulkan.Core10.BaseType.Flags' parameter of+-- with the @flags@ parameter of -- 'Graphics.Vulkan.Core10.Device.DeviceQueueCreateInfo' set to zero. To--- get queues that were created with a non-zero--- 'Graphics.Vulkan.Core10.BaseType.Flags' parameter use+-- get queues that were created with a non-zero @flags@ parameter use -- 'Graphics.Vulkan.Core11.Originally_Based_On_VK_KHR_protected_memory.getDeviceQueue2'. -- -- == Valid Usage -- -- - @queueFamilyIndex@ /must/ be one of the queue family indices--- specified when 'Graphics.Vulkan.Core10.Handles.Device' was created,--- via the 'Graphics.Vulkan.Core10.Device.DeviceQueueCreateInfo'--- structure+-- specified when @device@ was created, via the+-- 'Graphics.Vulkan.Core10.Device.DeviceQueueCreateInfo' structure -- -- - @queueIndex@ /must/ be less than the number of queues created for--- the specified queue family index when--- 'Graphics.Vulkan.Core10.Handles.Device' was created, via the+-- the specified queue family index when @device@ was created, via the -- @queueCount@ member of the -- 'Graphics.Vulkan.Core10.Device.DeviceQueueCreateInfo' structure ----- - 'Graphics.Vulkan.Core10.Device.DeviceQueueCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- /must/ have been set to zero when--- 'Graphics.Vulkan.Core10.Handles.Device' was created+-- - 'Graphics.Vulkan.Core10.Device.DeviceQueueCreateInfo'::@flags@+-- /must/ have been set to zero when @device@ was created -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pQueue@ /must/ be a valid pointer to a -- 'Graphics.Vulkan.Core10.Handles.Queue' handle@@ -137,8 +134,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Queue'-getDeviceQueue :: Device -> ("queueFamilyIndex" ::: Word32) -> ("queueIndex" ::: Word32) -> IO (Queue)-getDeviceQueue device queueFamilyIndex queueIndex = evalContT $ do+getDeviceQueue :: forall io . MonadIO io => Device -> ("queueFamilyIndex" ::: Word32) -> ("queueIndex" ::: Word32) -> io (Queue)+getDeviceQueue device queueFamilyIndex queueIndex = liftIO . evalContT $ do let cmds = deviceCmds (device :: Device) let vkGetDeviceQueue' = mkVkGetDeviceQueue (pVkGetDeviceQueue cmds) pPQueue <- ContT $ bracket (callocBytes @(Ptr Queue_T) 8) free@@ -159,17 +156,15 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Queue' is the queue that the command--- buffers will be submitted to.+-- - @queue@ is the queue that the command buffers will be submitted to. -- -- - @submitCount@ is the number of elements in the @pSubmits@ array. -- -- - @pSubmits@ is a pointer to an array of 'SubmitInfo' structures, each -- specifying a command buffer submission batch. ----- - 'Graphics.Vulkan.Core10.Handles.Fence' is an /optional/ handle to a--- fence to be signaled once all submitted command buffers have--- completed execution. If 'Graphics.Vulkan.Core10.Handles.Fence' is+-- - @fence@ is an /optional/ handle to a fence to be signaled once all+-- submitted command buffers have completed execution. If @fence@ is -- not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', it defines a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-fences-signaling fence signal operation>. --@@ -239,15 +234,12 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.Handles.Fence' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be unsignaled+-- - If @fence@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @fence@ /must/ be unsignaled ----- - If 'Graphics.Vulkan.Core10.Handles.Fence' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Fence' /must/ not be associated with--- any other queue command that has not yet completed execution on that--- queue+-- - If @fence@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @fence@ /must/ not be associated with any other queue command that+-- has not yet completed execution on that queue -- -- - Any calls to -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdSetEvent',@@ -261,8 +253,7 @@ -- -- - Any stage flag included in any element of the @pWaitDstStageMask@ -- member of any element of @pSubmits@ /must/ be a pipeline stage--- supported by one of the capabilities of--- 'Graphics.Vulkan.Core10.Handles.Queue', as specified in the+-- supported by one of the capabilities of @queue@, as specified in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-supported table of supported pipeline stages> -- -- - Each element of the @pSignalSemaphores@ member of any element of@@ -271,8 +262,7 @@ -- -- - When a semaphore wait operation referring to a binary semaphore -- defined by any element of the @pWaitSemaphores@ member of any--- element of @pSubmits@ executes on--- 'Graphics.Vulkan.Core10.Handles.Queue', there /must/ be no other+-- element of @pSubmits@ executes on @queue@, there /must/ be no other -- queues waiting on the same semaphore -- -- - All elements of the @pWaitSemaphores@ member of all elements of@@ -310,8 +300,7 @@ -- - Each element of the @pCommandBuffers@ member of each element of -- @pSubmits@ /must/ have been allocated from a -- 'Graphics.Vulkan.Core10.Handles.CommandPool' that was created for--- the same queue family 'Graphics.Vulkan.Core10.Handles.Queue' belongs--- to+-- the same queue family @queue@ belongs to -- -- - If any element of @pSubmits->pCommandBuffers@ includes a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-queue-transfers-acquire Queue Family Transfer Acquire Operation>,@@ -325,48 +314,41 @@ -- -- - If a command recorded into any element of @pCommandBuffers@ was a -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdBeginQuery' whose--- 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of+-- @queryPool@ was created with a @queryType@ of -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR', -- the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#profiling-lock profiling lock> -- /must/ have been held continuously on the--- 'Graphics.Vulkan.Core10.Handles.Device' that--- 'Graphics.Vulkan.Core10.Handles.Queue' was retrieved from,--- throughout recording of those command buffers+-- 'Graphics.Vulkan.Core10.Handles.Device' that @queue@ was retrieved+-- from, throughout recording of those command buffers -- -- - Any resource created with -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_EXCLUSIVE' -- that is read by an operation specified by @pSubmits@ /must/ not be--- owned by any queue family other than the one which--- 'Graphics.Vulkan.Core10.Handles.Queue' belongs to, at the time it is--- executed+-- owned by any queue family other than the one which @queue@ belongs+-- to, at the time it is executed -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Queue' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Queue' handle+-- - @queue@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Queue'+-- handle -- -- - If @submitCount@ is not @0@, @pSubmits@ /must/ be a valid pointer to -- an array of @submitCount@ valid 'SubmitInfo' structures ----- - If 'Graphics.Vulkan.Core10.Handles.Fence' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Fence' handle+-- - If @fence@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @fence@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Fence'+-- handle ----- - Both of 'Graphics.Vulkan.Core10.Handles.Fence', and--- 'Graphics.Vulkan.Core10.Handles.Queue' that are valid handles of--- non-ignored parameters /must/ have been created, allocated, or--- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Both of @fence@, and @queue@ that are valid handles of non-ignored+-- parameters /must/ have been created, allocated, or retrieved from+-- the same 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Queue' /must/ be--- externally synchronized+-- - Host access to @queue@ /must/ be externally synchronized ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be--- externally synchronized+-- - Host access to @fence@ /must/ be externally synchronized -- -- == Command Properties --@@ -396,8 +378,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Fence', -- 'Graphics.Vulkan.Core10.Handles.Queue', 'SubmitInfo'-queueSubmit :: PokeChain a => Queue -> ("submits" ::: Vector (SubmitInfo a)) -> Fence -> IO ()-queueSubmit queue submits fence = evalContT $ do+queueSubmit :: forall a io . (PokeChain a, MonadIO io) => Queue -> ("submits" ::: Vector (SubmitInfo a)) -> Fence -> io ()+queueSubmit queue submits fence = liftIO . evalContT $ do let vkQueueSubmit' = mkVkQueueSubmit (pVkQueueSubmit (deviceCmds (queue :: Queue))) pPSubmits <- ContT $ allocaBytesAligned @(SubmitInfo _) ((Data.Vector.length (submits)) * 72) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPSubmits `plusPtr` (72 * (i)) :: Ptr (SubmitInfo _)) (e) . ($ ())) (submits)@@ -416,8 +398,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Queue' is the queue on which to--- wait.+-- - @queue@ is the queue on which to wait. -- -- = Description --@@ -426,13 +407,12 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Queue' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Queue' handle+-- - @queue@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Queue'+-- handle -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Queue' /must/ be--- externally synchronized+-- - Host access to @queue@ /must/ be externally synchronized -- -- == Command Properties --@@ -461,8 +441,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Queue'-queueWaitIdle :: Queue -> IO ()-queueWaitIdle queue = do+queueWaitIdle :: forall io . MonadIO io => Queue -> io ()+queueWaitIdle queue = liftIO $ do let vkQueueWaitIdle' = mkVkQueueWaitIdle (pVkQueueWaitIdle (deviceCmds (queue :: Queue))) r <- vkQueueWaitIdle' (queueHandle (queue)) when (r < SUCCESS) (throwIO (VulkanException r))@@ -479,24 +459,22 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device to--- idle.+-- - @device@ is the logical device to idle. -- -- = Description -- -- 'deviceWaitIdle' is equivalent to calling 'queueWaitIdle' for all queues--- owned by 'Graphics.Vulkan.Core10.Handles.Device'.+-- owned by @device@. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- == Host Synchronization -- -- - Host access to all 'Graphics.Vulkan.Core10.Handles.Queue' objects--- created from 'Graphics.Vulkan.Core10.Handles.Device' /must/ be--- externally synchronized+-- created from @device@ /must/ be externally synchronized -- -- == Return Codes --@@ -515,8 +493,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device'-deviceWaitIdle :: Device -> IO ()-deviceWaitIdle device = do+deviceWaitIdle :: forall io . MonadIO io => Device -> io ()+deviceWaitIdle device = liftIO $ do let vkDeviceWaitIdle' = mkVkDeviceWaitIdle (pVkDeviceWaitIdle (deviceCmds (device :: Device))) r <- vkDeviceWaitIdle' (deviceHandle (device)) when (r < SUCCESS) (throwIO (VulkanException r))
src/Graphics/Vulkan/Core10/QueueSemaphore.hs view
@@ -6,6 +6,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -17,6 +18,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable(peek))@@ -67,8 +69,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the semaphore.+-- - @device@ is the logical device that creates the semaphore. -- -- - @pCreateInfo@ is a pointer to a 'SemaphoreCreateInfo' structure -- containing information about how the semaphore is to be created.@@ -82,8 +83,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'SemaphoreCreateInfo' structure@@ -113,8 +114,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Semaphore', 'SemaphoreCreateInfo'-createSemaphore :: PokeChain a => Device -> SemaphoreCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (Semaphore)-createSemaphore device createInfo allocator = evalContT $ do+createSemaphore :: forall a io . (PokeChain a, MonadIO io) => Device -> SemaphoreCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Semaphore)+createSemaphore device createInfo allocator = liftIO . evalContT $ do let vkCreateSemaphore' = mkVkCreateSemaphore (pVkCreateSemaphore (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -130,11 +131,11 @@ -- 'bracket' -- -- The allocated value must not be returned from the provided computation-withSemaphore :: PokeChain a => Device -> SemaphoreCreateInfo a -> Maybe AllocationCallbacks -> (Semaphore -> IO r) -> IO r-withSemaphore device semaphoreCreateInfo allocationCallbacks =+withSemaphore :: forall a r . PokeChain a => Device -> SemaphoreCreateInfo a -> Maybe AllocationCallbacks -> ((Semaphore) -> IO r) -> IO r+withSemaphore device pCreateInfo pAllocator = bracket- (createSemaphore device semaphoreCreateInfo allocationCallbacks)- (\o -> destroySemaphore device o allocationCallbacks)+ (createSemaphore device pCreateInfo pAllocator)+ (\(o0) -> destroySemaphore device o0 pAllocator) foreign import ccall@@ -148,11 +149,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the semaphore.+-- - @device@ is the logical device that destroys the semaphore. ----- - 'Graphics.Vulkan.Core10.Handles.Semaphore' is the handle of the--- semaphore to destroy.+-- - @semaphore@ is the handle of the semaphore to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -160,50 +159,46 @@ -- -- == Valid Usage ----- - All submitted batches that refer to--- 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ have completed--- execution+-- - All submitted batches that refer to @semaphore@ /must/ have+-- completed execution -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Semaphore' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @semaphore@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Semaphore' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @semaphore@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.Semaphore' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Semaphore' handle+-- - If @semaphore@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @semaphore@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Semaphore' handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.Semaphore' is a valid handle, it--- /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @semaphore@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ be--- externally synchronized+-- - Host access to @semaphore@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Semaphore'-destroySemaphore :: Device -> Semaphore -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroySemaphore device semaphore allocator = evalContT $ do+destroySemaphore :: forall io . MonadIO io => Device -> Semaphore -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroySemaphore device semaphore allocator = liftIO . evalContT $ do let vkDestroySemaphore' = mkVkDestroySemaphore (pVkDestroySemaphore (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -231,7 +226,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- = See Also --@@ -241,7 +236,7 @@ data SemaphoreCreateInfo (es :: [Type]) = SemaphoreCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ , -- | @flags@ is reserved for future use. flags :: SemaphoreCreateFlags } deriving (Typeable)
src/Graphics/Vulkan/Core10/Sampler.hs view
@@ -6,6 +6,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -17,6 +18,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.C.Types (CFloat)@@ -76,8 +78,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the sampler.+-- - @device@ is the logical device that creates the sampler. -- -- - @pCreateInfo@ is a pointer to a 'SamplerCreateInfo' structure -- specifying the state of the sampler object.@@ -92,8 +93,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'SamplerCreateInfo' structure@@ -125,8 +126,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Sampler', 'SamplerCreateInfo'-createSampler :: PokeChain a => Device -> SamplerCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (Sampler)-createSampler device createInfo allocator = evalContT $ do+createSampler :: forall a io . (PokeChain a, MonadIO io) => Device -> SamplerCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Sampler)+createSampler device createInfo allocator = liftIO . evalContT $ do let vkCreateSampler' = mkVkCreateSampler (pVkCreateSampler (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -141,11 +142,11 @@ -- | A safe wrapper for 'createSampler' and 'destroySampler' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withSampler :: PokeChain a => Device -> SamplerCreateInfo a -> Maybe AllocationCallbacks -> (Sampler -> IO r) -> IO r-withSampler device samplerCreateInfo allocationCallbacks =+withSampler :: forall a r . PokeChain a => Device -> SamplerCreateInfo a -> Maybe AllocationCallbacks -> ((Sampler) -> IO r) -> IO r+withSampler device pCreateInfo pAllocator = bracket- (createSampler device samplerCreateInfo allocationCallbacks)- (\o -> destroySampler device o allocationCallbacks)+ (createSampler device pCreateInfo pAllocator)+ (\(o0) -> destroySampler device o0 pAllocator) foreign import ccall@@ -159,10 +160,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the sampler.+-- - @device@ is the logical device that destroys the sampler. ----- - 'Graphics.Vulkan.Core10.Handles.Sampler' is the sampler to destroy.+-- - @sampler@ is the sampler to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -170,50 +170,46 @@ -- -- == Valid Usage ----- - All submitted commands that refer to--- 'Graphics.Vulkan.Core10.Handles.Sampler' /must/ have completed+-- - All submitted commands that refer to @sampler@ /must/ have completed -- execution -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Sampler' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @sampler@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.Sampler' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @sampler@ was created, @pAllocator@ /must/ be+-- @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.Sampler' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Sampler' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Sampler' handle+-- - If @sampler@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @sampler@ /must/+-- be a valid 'Graphics.Vulkan.Core10.Handles.Sampler' handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.Sampler' is a valid handle, it--- /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @sampler@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Sampler' /must/ be--- externally synchronized+-- - Host access to @sampler@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Sampler'-destroySampler :: Device -> Sampler -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroySampler device sampler allocator = evalContT $ do+destroySampler :: forall io . MonadIO io => Device -> Sampler -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroySampler device sampler allocator = liftIO . evalContT $ do let vkDestroySampler' = mkVkDestroySampler (pVkDestroySampler (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -324,8 +320,8 @@ -- -- - If any of @addressModeU@, @addressModeV@ or @addressModeW@ are -- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER',--- 'Graphics.Vulkan.Core10.Enums.BorderColor.BorderColor' /must/ be a--- valid 'Graphics.Vulkan.Core10.Enums.BorderColor.BorderColor' value+-- @borderColor@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.BorderColor.BorderColor' value -- -- - If -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#samplers-YCbCr-conversion sampler Y′CBCR conversion>@@ -352,7 +348,7 @@ -- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE' -- -- - If @compareEnable@ is 'Graphics.Vulkan.Core10.BaseType.TRUE',--- 'Graphics.Vulkan.Core10.Enums.CompareOp.CompareOp' /must/ be a valid+-- @compareOp@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.CompareOp.CompareOp' value -- -- - If either @magFilter@ or @minFilter@ is@@ -365,37 +361,37 @@ -- /must/ be -- 'Graphics.Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.SamplerCreateFlagBits.SAMPLER_CREATE_SUBSAMPLED_BIT_EXT', -- then @minFilter@ and @magFilter@ /must/ be equal. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.SamplerCreateFlagBits.SAMPLER_CREATE_SUBSAMPLED_BIT_EXT', -- then @mipmapMode@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_NEAREST'. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.SamplerCreateFlagBits.SAMPLER_CREATE_SUBSAMPLED_BIT_EXT', -- then @minLod@ and @maxLod@ /must/ be zero. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.SamplerCreateFlagBits.SAMPLER_CREATE_SUBSAMPLED_BIT_EXT', -- then @addressModeU@ and @addressModeV@ /must/ each be either -- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE' -- or -- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER'. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.SamplerCreateFlagBits.SAMPLER_CREATE_SUBSAMPLED_BIT_EXT', -- then @anisotropyEnable@ /must/ be -- 'Graphics.Vulkan.Core10.BaseType.FALSE'. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.SamplerCreateFlagBits.SAMPLER_CREATE_SUBSAMPLED_BIT_EXT', -- then @compareEnable@ /must/ be -- 'Graphics.Vulkan.Core10.BaseType.FALSE'. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.SamplerCreateFlagBits.SAMPLER_CREATE_SUBSAMPLED_BIT_EXT', -- then @unnormalizedCoordinates@ /must/ be -- 'Graphics.Vulkan.Core10.BaseType.FALSE'.@@ -415,8 +411,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.SamplerCreateFlagBits.SamplerCreateFlagBits' -- values --@@ -456,7 +451,7 @@ data SamplerCreateInfo (es :: [Type]) = SamplerCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.SamplerCreateFlagBits.SamplerCreateFlagBits' -- describing additional parameters of the sampler. flags :: SamplerCreateFlags@@ -508,10 +503,9 @@ -- - Note: Some implementations will default to shader state if this -- member does not match. compareEnable :: Bool- , -- | 'Graphics.Vulkan.Core10.Enums.CompareOp.CompareOp' is a- -- 'Graphics.Vulkan.Core10.Enums.CompareOp.CompareOp' value specifying the- -- comparison function to apply to fetched data before filtering as- -- described in the+ , -- | @compareOp@ is a 'Graphics.Vulkan.Core10.Enums.CompareOp.CompareOp'+ -- value specifying the comparison function to apply to fetched data before+ -- filtering as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#textures-depth-compare-operation Depth Compare Operation> -- section. compareOp :: CompareOp@@ -522,7 +516,7 @@ minLod :: Float , -- No documentation found for Nested "VkSamplerCreateInfo" "maxLod" maxLod :: Float- , -- | 'Graphics.Vulkan.Core10.Enums.BorderColor.BorderColor' is a+ , -- | @borderColor@ is a -- 'Graphics.Vulkan.Core10.Enums.BorderColor.BorderColor' value specifying -- the predefined border color to use. borderColor :: BorderColor
src/Graphics/Vulkan/Core10/Shader.hs view
@@ -7,6 +7,7 @@ import Control.Exception.Base (bracket) import Control.Monad (unless)+import Control.Monad.IO.Class (liftIO) import Data.Bits ((.&.)) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned)@@ -24,6 +25,7 @@ import Data.ByteString.Unsafe (unsafeUseAsCString) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.C.Types (CChar)@@ -79,8 +81,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the shader module.+-- - @device@ is the logical device that creates the shader module. -- -- - @pCreateInfo@ is a pointer to a 'ShaderModuleCreateInfo' structure. --@@ -109,8 +110,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'ShaderModuleCreateInfo' structure@@ -142,8 +143,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.ShaderModule', 'ShaderModuleCreateInfo'-createShaderModule :: PokeChain a => Device -> ShaderModuleCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (ShaderModule)-createShaderModule device createInfo allocator = evalContT $ do+createShaderModule :: forall a io . (PokeChain a, MonadIO io) => Device -> ShaderModuleCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (ShaderModule)+createShaderModule device createInfo allocator = liftIO . evalContT $ do let vkCreateShaderModule' = mkVkCreateShaderModule (pVkCreateShaderModule (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -159,11 +160,11 @@ -- 'bracket' -- -- The allocated value must not be returned from the provided computation-withShaderModule :: PokeChain a => Device -> ShaderModuleCreateInfo a -> Maybe AllocationCallbacks -> (ShaderModule -> IO r) -> IO r-withShaderModule device shaderModuleCreateInfo allocationCallbacks =+withShaderModule :: forall a r . PokeChain a => Device -> ShaderModuleCreateInfo a -> Maybe AllocationCallbacks -> ((ShaderModule) -> IO r) -> IO r+withShaderModule device pCreateInfo pAllocator = bracket- (createShaderModule device shaderModuleCreateInfo allocationCallbacks)- (\o -> destroyShaderModule device o allocationCallbacks)+ (createShaderModule device pCreateInfo pAllocator)+ (\(o0) -> destroyShaderModule device o0 pAllocator) foreign import ccall@@ -177,11 +178,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the shader module.+-- - @device@ is the logical device that destroys the shader module. ----- - 'Graphics.Vulkan.Core10.Handles.ShaderModule' is the handle of the--- shader module to destroy.+-- - @shaderModule@ is the handle of the shader module to destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -195,45 +194,43 @@ -- == Valid Usage -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.ShaderModule' was--- created, a compatible set of callbacks /must/ be provided here+-- were provided when @shaderModule@ was created, a compatible set of+-- callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when 'Graphics.Vulkan.Core10.Handles.ShaderModule' was--- created, @pAllocator@ /must/ be @NULL@+-- were provided when @shaderModule@ was created, @pAllocator@ /must/+-- be @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.ShaderModule' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.ShaderModule' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.ShaderModule' handle+-- - If @shaderModule@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @shaderModule@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.ShaderModule'+-- handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.ShaderModule' is a valid handle,--- it /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @shaderModule@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.ShaderModule' /must/--- be externally synchronized+-- - Host access to @shaderModule@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.ShaderModule'-destroyShaderModule :: Device -> ShaderModule -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyShaderModule device shaderModule allocator = evalContT $ do+destroyShaderModule :: forall io . MonadIO io => Device -> ShaderModule -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyShaderModule device shaderModule allocator = liftIO . evalContT $ do let vkDestroyShaderModule' = mkVkDestroyShaderModule (pVkDestroyShaderModule (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -293,7 +290,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - @pCode@ /must/ be a valid pointer to an array of -- \(\textrm{codeSize} \over 4\) @uint32_t@ values@@ -306,7 +303,7 @@ data ShaderModuleCreateInfo (es :: [Type]) = ShaderModuleCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ , -- | @flags@ is reserved for future use. flags :: ShaderModuleCreateFlags , -- | @pCode@ is a pointer to code that is used to create the shader module. -- The type and format of the code is determined from the content of the
@@ -381,9 +381,8 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_DEPTH_BIT' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_STENCIL_BIT'--- if 'Graphics.Vulkan.Core10.Enums.Format.Format' is a color, depth-only--- or stencil-only format, respectively, except if--- 'Graphics.Vulkan.Core10.Enums.Format.Format' is a+-- if @format@ is a color, depth-only or stencil-only format, respectively,+-- except if @format@ is a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar format>. -- If using a depth\/stencil format with both depth and stencil components, -- @aspectMask@ /must/ include at least one of@@ -430,8 +429,8 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits.IMAGE_ASPECT_COLOR_BIT'. -- -- When creating a 'Graphics.Vulkan.Core10.Handles.ImageView', if sampler--- Y′CBCR conversion is not enabled in the sampler and the image--- 'Graphics.Vulkan.Core10.Enums.Format.Format' is+-- Y′CBCR conversion is not enabled in the sampler and the image @format@+-- is -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-requiring-sampler-ycbcr-conversion multi-planar>, -- the image /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT',
src/Graphics/Vulkan/Core10/SparseResourceMemoryManagement.hs view
@@ -13,6 +13,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -27,6 +28,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -68,9 +70,8 @@ import Graphics.Vulkan.Core10.Enums.ImageTiling (ImageTiling(..)) import Graphics.Vulkan.Core10.Enums.ImageType (ImageType) import Graphics.Vulkan.Core10.Enums.ImageType (ImageType(..))-import Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags)-import Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags) import Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlagBits(..))+import Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags) import Graphics.Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceSparseImageFormatProperties)) import Graphics.Vulkan.Core10.SharedTypes (Offset3D) import Graphics.Vulkan.CStruct.Extends (PeekChain)@@ -110,12 +111,10 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the image.+-- - @device@ is the logical device that owns the image. ----- - 'Graphics.Vulkan.Core10.Handles.Image' is the--- 'Graphics.Vulkan.Core10.Handles.Image' object to get the memory--- requirements for.+-- - @image@ is the 'Graphics.Vulkan.Core10.Handles.Image' object to get+-- the memory requirements for. -- -- - @pSparseMemoryRequirementCount@ is a pointer to an integer related -- to the number of sparse memory requirements available or queried, as@@ -154,11 +153,11 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle+-- - @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle -- -- - @pSparseMemoryRequirementCount@ /must/ be a valid pointer to a -- @uint32_t@ value@@ -169,15 +168,15 @@ -- @pSparseMemoryRequirementCount@ 'SparseImageMemoryRequirements' -- structures ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created,--- allocated, or retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- - @image@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Image', 'SparseImageMemoryRequirements'-getImageSparseMemoryRequirements :: Device -> Image -> IO (("sparseMemoryRequirements" ::: Vector SparseImageMemoryRequirements))-getImageSparseMemoryRequirements device image = evalContT $ do+getImageSparseMemoryRequirements :: forall io . MonadIO io => Device -> Image -> io (("sparseMemoryRequirements" ::: Vector SparseImageMemoryRequirements))+getImageSparseMemoryRequirements device image = liftIO . evalContT $ do let vkGetImageSparseMemoryRequirements' = mkVkGetImageSparseMemoryRequirements (pVkGetImageSparseMemoryRequirements (deviceCmds (device :: Device))) let device' = deviceHandle (device) pPSparseMemoryRequirementCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -203,10 +202,10 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the sparse image capabilities.+-- - @physicalDevice@ is the physical device from which to query the+-- sparse image capabilities. ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' is the image format.+-- - @format@ is the image format. -- -- - @type@ is the dimensionality of image. --@@ -255,19 +254,17 @@ -- 'Graphics.Vulkan.Core10.DeviceInitialization.ImageFormatProperties'::@sampleCounts@ -- returned by -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceImageFormatProperties'--- with 'Graphics.Vulkan.Core10.Enums.Format.Format', @type@, @tiling@,--- and @usage@ equal to those in this command and--- 'Graphics.Vulkan.Core10.BaseType.Flags' equal to the value that is--- set in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- when the image is created+-- with @format@, @type@, @tiling@, and @usage@ equal to those in this+-- command and @flags@ equal to the value that is set in+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ when the+-- image is created -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be a valid+-- - @format@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value -- -- - @type@ /must/ be a valid@@ -302,8 +299,8 @@ -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits', -- 'SparseImageFormatProperties'-getPhysicalDeviceSparseImageFormatProperties :: PhysicalDevice -> Format -> ImageType -> ("samples" ::: SampleCountFlagBits) -> ImageUsageFlags -> ImageTiling -> IO (("properties" ::: Vector SparseImageFormatProperties))-getPhysicalDeviceSparseImageFormatProperties physicalDevice format type' samples usage tiling = evalContT $ do+getPhysicalDeviceSparseImageFormatProperties :: forall io . MonadIO io => PhysicalDevice -> Format -> ImageType -> ("samples" ::: SampleCountFlagBits) -> ImageUsageFlags -> ImageTiling -> io (("properties" ::: Vector SparseImageFormatProperties))+getPhysicalDeviceSparseImageFormatProperties physicalDevice format type' samples usage tiling = liftIO . evalContT $ do let vkGetPhysicalDeviceSparseImageFormatProperties' = mkVkGetPhysicalDeviceSparseImageFormatProperties (pVkGetPhysicalDeviceSparseImageFormatProperties (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPPropertyCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -328,17 +325,17 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Queue' is the queue that the sparse--- binding operations will be submitted to.+-- - @queue@ is the queue that the sparse binding operations will be+-- submitted to. -- -- - @bindInfoCount@ is the number of elements in the @pBindInfo@ array. -- -- - @pBindInfo@ is a pointer to an array of 'BindSparseInfo' structures, -- each specifying a sparse binding submission batch. ----- - 'Graphics.Vulkan.Core10.Handles.Fence' is an /optional/ handle to a--- fence to be signaled. If 'Graphics.Vulkan.Core10.Handles.Fence' is--- not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', it defines a+-- - @fence@ is an /optional/ handle to a fence to be signaled. If+-- @fence@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', it+-- defines a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-fences-signaling fence signal operation>. -- -- = Description@@ -366,15 +363,12 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.Handles.Fence' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be unsignaled+-- - If @fence@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @fence@ /must/ be unsignaled ----- - If 'Graphics.Vulkan.Core10.Handles.Fence' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Fence' /must/ not be associated with--- any other queue command that has not yet completed execution on that--- queue+-- - If @fence@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @fence@ /must/ not be associated with any other queue command that+-- has not yet completed execution on that queue -- -- - Each element of the @pSignalSemaphores@ member of each element of -- @pBindInfo@ /must/ be unsignaled when the semaphore signal operation@@ -382,8 +376,7 @@ -- -- - When a semaphore wait operation referring to a binary semaphore -- defined by any element of the @pWaitSemaphores@ member of any--- element of @pBindInfo@ executes on--- 'Graphics.Vulkan.Core10.Handles.Queue', there /must/ be no other+-- element of @pBindInfo@ executes on @queue@, there /must/ be no other -- queues waiting on the same semaphore. -- -- - All elements of the @pWaitSemaphores@ member of all elements of@@ -402,29 +395,25 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Queue' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Queue' handle+-- - @queue@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Queue'+-- handle -- -- - If @bindInfoCount@ is not @0@, @pBindInfo@ /must/ be a valid pointer -- to an array of @bindInfoCount@ valid 'BindSparseInfo' structures ----- - If 'Graphics.Vulkan.Core10.Handles.Fence' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Fence' handle+-- - If @fence@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @fence@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Fence'+-- handle ----- - The 'Graphics.Vulkan.Core10.Handles.Queue' /must/ support sparse--- binding operations+-- - The @queue@ /must/ support sparse binding operations ----- - Both of 'Graphics.Vulkan.Core10.Handles.Fence', and--- 'Graphics.Vulkan.Core10.Handles.Queue' that are valid handles of--- non-ignored parameters /must/ have been created, allocated, or--- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Both of @fence@, and @queue@ that are valid handles of non-ignored+-- parameters /must/ have been created, allocated, or retrieved from+-- the same 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Queue' /must/ be--- externally synchronized+-- - Host access to @queue@ /must/ be externally synchronized -- -- - Host access to @pBindInfo@[].pBufferBinds[].buffer /must/ be -- externally synchronized@@ -435,8 +424,7 @@ -- - Host access to @pBindInfo@[].pImageBinds[].image /must/ be -- externally synchronized ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be--- externally synchronized+-- - Host access to @fence@ /must/ be externally synchronized -- -- == Command Properties --@@ -466,8 +454,8 @@ -- -- 'BindSparseInfo', 'Graphics.Vulkan.Core10.Handles.Fence', -- 'Graphics.Vulkan.Core10.Handles.Queue'-queueBindSparse :: PokeChain a => Queue -> ("bindInfo" ::: Vector (BindSparseInfo a)) -> Fence -> IO ()-queueBindSparse queue bindInfo fence = evalContT $ do+queueBindSparse :: forall a io . (PokeChain a, MonadIO io) => Queue -> ("bindInfo" ::: Vector (BindSparseInfo a)) -> Fence -> io ()+queueBindSparse queue bindInfo fence = liftIO . evalContT $ do let vkQueueBindSparse' = mkVkQueueBindSparse (pVkQueueBindSparse (deviceCmds (queue :: Queue))) pPBindInfo <- ContT $ allocaBytesAligned @(BindSparseInfo _) ((Data.Vector.length (bindInfo)) * 96) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPBindInfo `plusPtr` (96 * (i)) :: Ptr (BindSparseInfo _)) (e) . ($ ())) (bindInfo)@@ -494,7 +482,7 @@ , -- | @imageGranularity@ is the width, height, and depth of the sparse image -- block in texels or compressed texel blocks. imageGranularity :: Extent3D- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.SparseImageFormatFlagBits.SparseImageFormatFlagBits' -- specifying additional information about the sparse resource. flags :: SparseImageFormatFlags@@ -607,8 +595,7 @@ -- = Description -- -- The /binding range/ [@resourceOffset@, @resourceOffset@ + @size@) has--- different constraints based on 'Graphics.Vulkan.Core10.BaseType.Flags'.--- If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- different constraints based on @flags@. If @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.SparseMemoryBindFlagBits.SPARSE_MEMORY_BIND_METADATA_BIT', -- the binding range /must/ be within the mip tail region of the metadata -- aspect. This metadata region is defined by:@@ -626,7 +613,7 @@ -- 'SparseImageMemoryRequirements'::@formatProperties.flags@ contains -- 'Graphics.Vulkan.Core10.Enums.SparseImageFormatFlagBits.SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT'. ----- If 'Graphics.Vulkan.Core10.BaseType.Flags' does not contain+-- If @flags@ does not contain -- 'Graphics.Vulkan.Core10.Enums.SparseMemoryBindFlagBits.SPARSE_MEMORY_BIND_METADATA_BIT', -- the binding range /must/ be within the range -- [0,'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements'::@size@).@@ -679,8 +666,7 @@ -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @memory@ /must/ -- be a valid 'Graphics.Vulkan.Core10.Handles.DeviceMemory' handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.SparseMemoryBindFlagBits.SparseMemoryBindFlagBits' -- values --@@ -705,7 +691,7 @@ -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', this value is -- ignored. memoryOffset :: DeviceSize- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.SparseMemoryBindFlagBits.SparseMemoryBindFlagBits' -- specifying usage of the binding operation. flags :: SparseMemoryBindFlags@@ -766,12 +752,10 @@ -- overlap with those bound ranges -- -- - @memory@ and @memoryOffset@ /must/ match the memory requirements of--- the calling command’s 'Graphics.Vulkan.Core10.Handles.Image', as--- described in section+-- the calling command’s @image@, as described in section -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-association> ----- - @subresource@ /must/ be a valid image subresource for--- 'Graphics.Vulkan.Core10.Handles.Image' (see+-- - @subresource@ /must/ be a valid image subresource for @image@ (see -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-views>) -- -- - @offset.x@ /must/ be a multiple of the sparse image block width@@ -808,7 +792,7 @@ -- - If @memory@ was created by a memory import operation, the external -- handle type of the imported memory /must/ also have been set in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExternalMemoryImageCreateInfo'::@handleTypes@--- when 'Graphics.Vulkan.Core10.Handles.Image' was created.+-- when @image@ was created. -- -- == Valid Usage (Implicit) --@@ -819,8 +803,7 @@ -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @memory@ /must/ -- be a valid 'Graphics.Vulkan.Core10.Handles.DeviceMemory' handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.SparseMemoryBindFlagBits.SparseMemoryBindFlagBits' -- values --@@ -856,7 +839,7 @@ -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', this value is -- ignored. memoryOffset :: DeviceSize- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' are sparse memory binding flags.+ , -- | @flags@ are sparse memory binding flags. flags :: SparseMemoryBindFlags } deriving (Typeable)@@ -912,8 +895,8 @@ -- 'BindSparseInfo', 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'SparseMemoryBind' data SparseBufferMemoryBindInfo = SparseBufferMemoryBindInfo- { -- | 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid- -- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+ { -- | @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+ -- handle buffer :: Buffer , -- | @pBinds@ /must/ be a valid pointer to an array of @bindCount@ valid -- 'SparseMemoryBind' structures@@ -960,16 +943,15 @@ -- -- == Valid Usage ----- - If the 'Graphics.Vulkan.Core10.BaseType.Flags' member of any element--- of @pBinds@ contains+-- - If the @flags@ member of any element of @pBinds@ contains -- 'Graphics.Vulkan.Core10.Enums.SparseMemoryBindFlagBits.SPARSE_MEMORY_BIND_METADATA_BIT', -- the binding range defined /must/ be within the mip tail region of--- the metadata aspect of 'Graphics.Vulkan.Core10.Handles.Image'+-- the metadata aspect of @image@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle+-- - @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle -- -- - @pBinds@ /must/ be a valid pointer to an array of @bindCount@ valid -- 'SparseMemoryBind' structures@@ -981,8 +963,8 @@ -- 'BindSparseInfo', 'Graphics.Vulkan.Core10.Handles.Image', -- 'SparseMemoryBind' data SparseImageOpaqueMemoryBindInfo = SparseImageOpaqueMemoryBindInfo- { -- | 'Graphics.Vulkan.Core10.Handles.Image' is the- -- 'Graphics.Vulkan.Core10.Handles.Image' object to be bound.+ { -- | @image@ is the 'Graphics.Vulkan.Core10.Handles.Image' object to be+ -- bound. image :: Image , -- | @pBinds@ is a pointer to an array of 'SparseMemoryBind' structures. binds :: Vector SparseMemoryBind@@ -1030,18 +1012,18 @@ -- -- - The @subresource.mipLevel@ member of each element of @pBinds@ /must/ -- be less than the @mipLevels@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created -- -- - The @subresource.arrayLayer@ member of each element of @pBinds@ -- /must/ be less than the @arrayLayers@ specified in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when--- 'Graphics.Vulkan.Core10.Handles.Image' was created+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo' when @image@ was+-- created -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle+-- - @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle -- -- - @pBinds@ /must/ be a valid pointer to an array of @bindCount@ valid -- 'SparseImageMemoryBind' structures@@ -1053,8 +1035,7 @@ -- 'BindSparseInfo', 'Graphics.Vulkan.Core10.Handles.Image', -- 'SparseImageMemoryBind' data SparseImageMemoryBindInfo = SparseImageMemoryBindInfo- { -- | 'Graphics.Vulkan.Core10.Handles.Image' is the- -- 'Graphics.Vulkan.Core10.Handles.Image' object to be bound+ { -- | @image@ is the 'Graphics.Vulkan.Core10.Handles.Image' object to be bound image :: Image , -- | @pBinds@ is a pointer to an array of 'SparseImageMemoryBind' structures binds :: Vector SparseImageMemoryBind
src/Graphics/Vulkan/Core11/DeviceInitialization.hs view
@@ -2,12 +2,14 @@ module Graphics.Vulkan.Core11.DeviceInitialization (enumerateInstanceVersion) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free) import Foreign.Ptr (castFunPtr) import Foreign.Ptr (nullPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Foreign.Storable (Storable(peek)) import Foreign.Ptr (FunPtr) import Foreign.Ptr (Ptr)@@ -44,8 +46,8 @@ -- = See Also -- -- No cross-references are available-enumerateInstanceVersion :: IO (("apiVersion" ::: Word32))-enumerateInstanceVersion = evalContT $ do+enumerateInstanceVersion :: forall io . MonadIO io => io (("apiVersion" ::: Word32))+enumerateInstanceVersion = liftIO . evalContT $ do vkEnumerateInstanceVersion' <- lift $ mkVkEnumerateInstanceVersion . castFunPtr @_ @(("pApiVersion" ::: Ptr Word32) -> IO Result) <$> getInstanceProcAddr' nullPtr (Ptr "vkEnumerateInstanceVersion"#) pPApiVersion <- ContT $ bracket (callocBytes @Word32 4) free _ <- lift $ vkEnumerateInstanceVersion' (pPApiVersion)
src/Graphics/Vulkan/Core11/Originally_Based_On_VK_KHR_protected_memory.hs view
@@ -20,6 +20,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -27,6 +28,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -82,8 +84,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the queue.+-- - @device@ is the logical device that owns the queue. -- -- - @pQueueInfo@ is a pointer to a 'DeviceQueueInfo2' structure, -- describing the parameters used to create the device queue.@@ -97,8 +98,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'DeviceQueueInfo2', -- 'Graphics.Vulkan.Core10.Handles.Queue'-getDeviceQueue2 :: Device -> DeviceQueueInfo2 -> IO (Queue)-getDeviceQueue2 device queueInfo = evalContT $ do+getDeviceQueue2 :: forall io . MonadIO io => Device -> DeviceQueueInfo2 -> io (Queue)+getDeviceQueue2 device queueInfo = liftIO . evalContT $ do let cmds = deviceCmds (device :: Device) let vkGetDeviceQueue2' = mkVkGetDeviceQueue2 (pVkGetDeviceQueue2 cmds) pQueueInfo <- ContT $ withCStruct (queueInfo)@@ -299,13 +300,11 @@ -- -- = Description ----- The queue returned by 'getDeviceQueue2' /must/ have the same--- 'Graphics.Vulkan.Core10.BaseType.Flags' value from this structure as--- that used at device creation time in a+-- The queue returned by 'getDeviceQueue2' /must/ have the same @flags@+-- value from this structure as that used at device creation time in a -- 'Graphics.Vulkan.Core10.Device.DeviceQueueCreateInfo' instance. If no--- matching 'Graphics.Vulkan.Core10.BaseType.Flags' were specified at--- device creation time then @pQueue@ will return--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'.+-- matching @flags@ were specified at device creation time then @pQueue@+-- will return 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'. -- -- == Valid Usage (Implicit) --@@ -315,21 +314,19 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'getDeviceQueue2' data DeviceQueueInfo2 = DeviceQueueInfo2- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid combination of+ { -- | @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.DeviceQueueCreateFlagBits.DeviceQueueCreateFlagBits' -- values flags :: DeviceQueueCreateFlags , -- | @queueFamilyIndex@ /must/ be one of the queue family indices specified- -- when 'Graphics.Vulkan.Core10.Handles.Device' was created, via the+ -- when @device@ was created, via the -- 'Graphics.Vulkan.Core10.Device.DeviceQueueCreateInfo' structure queueFamilyIndex :: Word32 , -- | @queueIndex@ /must/ be less than the number of queues created for the -- specified queue family index and -- 'Graphics.Vulkan.Core10.Enums.DeviceQueueCreateFlagBits.DeviceQueueCreateFlags'- -- member 'Graphics.Vulkan.Core10.BaseType.Flags' equal to this- -- 'Graphics.Vulkan.Core10.BaseType.Flags' value when- -- 'Graphics.Vulkan.Core10.Handles.Device' was created, via the- -- @queueCount@ member of the+ -- member @flags@ equal to this @flags@ value when @device@ was created,+ -- via the @queueCount@ member of the -- 'Graphics.Vulkan.Core10.Device.DeviceQueueCreateInfo' structure queueIndex :: Word32 }
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_bind_memory2.hs view
@@ -8,6 +8,7 @@ , ImageCreateFlags ) where +import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import GHC.Base (when)@@ -18,6 +19,7 @@ import Control.Monad.Trans.Cont (evalContT) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable(peek))@@ -75,8 +77,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the buffers and memory.+-- - @device@ is the logical device that owns the buffers and memory. -- -- - @bindInfoCount@ is the number of elements in @pBindInfos@. --@@ -106,8 +107,8 @@ -- = See Also -- -- 'BindBufferMemoryInfo', 'Graphics.Vulkan.Core10.Handles.Device'-bindBufferMemory2 :: PokeChain a => Device -> ("bindInfos" ::: Vector (BindBufferMemoryInfo a)) -> IO ()-bindBufferMemory2 device bindInfos = evalContT $ do+bindBufferMemory2 :: forall a io . (PokeChain a, MonadIO io) => Device -> ("bindInfos" ::: Vector (BindBufferMemoryInfo a)) -> io ()+bindBufferMemory2 device bindInfos = liftIO . evalContT $ do let vkBindBufferMemory2' = mkVkBindBufferMemory2 (pVkBindBufferMemory2 (deviceCmds (device :: Device))) pPBindInfos <- ContT $ allocaBytesAligned @(BindBufferMemoryInfo _) ((Data.Vector.length (bindInfos)) * 40) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPBindInfos `plusPtr` (40 * (i)) :: Ptr (BindBufferMemoryInfo _)) (e) . ($ ())) (bindInfos)@@ -126,8 +127,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the images and memory.+-- - @device@ is the logical device that owns the images and memory. -- -- - @bindInfoCount@ is the number of elements in @pBindInfos@. --@@ -148,8 +148,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pBindInfos@ /must/ be a valid pointer to an array of -- @bindInfoCount@ valid 'BindImageMemoryInfo' structures@@ -171,8 +171,8 @@ -- = See Also -- -- 'BindImageMemoryInfo', 'Graphics.Vulkan.Core10.Handles.Device'-bindImageMemory2 :: PokeChain a => Device -> ("bindInfos" ::: Vector (BindImageMemoryInfo a)) -> IO ()-bindImageMemory2 device bindInfos = evalContT $ do+bindImageMemory2 :: forall a io . (PokeChain a, MonadIO io) => Device -> ("bindInfos" ::: Vector (BindImageMemoryInfo a)) -> io ()+bindImageMemory2 device bindInfos = liftIO . evalContT $ do let vkBindImageMemory2' = mkVkBindImageMemory2 (pVkBindImageMemory2 (deviceCmds (device :: Device))) pPBindInfos <- ContT $ allocaBytesAligned @(BindImageMemoryInfo _) ((Data.Vector.length (bindInfos)) * 40) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPBindInfos `plusPtr` (40 * (i)) :: Ptr (BindImageMemoryInfo _)) (e) . ($ ())) (bindInfos)@@ -185,11 +185,10 @@ -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ not already be backed--- by a memory object+-- - @buffer@ /must/ not already be backed by a memory object ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ not have been created--- with any sparse memory binding flags+-- - @buffer@ /must/ not have been created with any sparse memory binding+-- flags -- -- - @memoryOffset@ /must/ be less than the size of @memory@ --@@ -198,50 +197,46 @@ -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements' -- structure returned from a call to -- 'Graphics.Vulkan.Core10.MemoryManagement.getBufferMemoryRequirements'--- with 'Graphics.Vulkan.Core10.Handles.Buffer'+-- with @buffer@ -- -- - @memoryOffset@ /must/ be an integer multiple of the @alignment@ -- member of the -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements' -- structure returned from a call to -- 'Graphics.Vulkan.Core10.MemoryManagement.getBufferMemoryRequirements'--- with 'Graphics.Vulkan.Core10.Handles.Buffer'+-- with @buffer@ -- -- - The @size@ member of the -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements' -- structure returned from a call to -- 'Graphics.Vulkan.Core10.MemoryManagement.getBufferMemoryRequirements'--- with 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be less than or--- equal to the size of @memory@ minus @memoryOffset@+-- with @buffer@ /must/ be less than or equal to the size of @memory@+-- minus @memoryOffset@ ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' requires a dedicated--- allocation(as reported by+-- - If @buffer@ requires a dedicated allocation(as reported by -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.getBufferMemoryRequirements2' -- in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedRequirements'::requiresDedicatedAllocation--- for 'Graphics.Vulkan.Core10.Handles.Buffer'), @memory@ /must/ have--- been created with--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Buffer'--- equal to 'Graphics.Vulkan.Core10.Handles.Buffer' and @memoryOffset@--- /must/ be zero+-- for @buffer@), @memory@ /must/ have been created with+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@buffer@+-- equal to @buffer@ and @memoryOffset@ /must/ be zero -- -- - If the 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' provided -- when @memory@ was allocated included a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo' -- structure in its @pNext@ chain, and--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Buffer'+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@buffer@ -- was not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', then--- 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ equal--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Buffer'+-- @buffer@ /must/ equal+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@buffer@ -- and @memoryOffset@ /must/ be zero. ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' was created with+-- - If @buffer@ was created with -- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationBufferCreateInfoNV'::@dedicatedAllocation@ -- equal to 'Graphics.Vulkan.Core10.BaseType.TRUE', @memory@ /must/ -- have been created with--- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationMemoryAllocateInfoNV'::'Graphics.Vulkan.Core10.Handles.Buffer'--- equal to 'Graphics.Vulkan.Core10.Handles.Buffer' and @memoryOffset@--- /must/ be zero+-- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationMemoryAllocateInfoNV'::@buffer@+-- equal to @buffer@ and @memoryOffset@ /must/ be zero -- -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_groupAndVK_KHR_bind_memory2.BindBufferMemoryDeviceGroupInfo'@@ -254,17 +249,16 @@ -- used to allocate @memory@ is not @0@, it /must/ include at least one -- of the handles set in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExternalMemoryBufferCreateInfo'::@handleTypes@--- when 'Graphics.Vulkan.Core10.Handles.Buffer' was created+-- when @buffer@ was created -- -- - If @memory@ was created by a memory import operation, the external -- handle type of the imported memory /must/ also have been set in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExternalMemoryBufferCreateInfo'::@handleTypes@--- when 'Graphics.Vulkan.Core10.Handles.Buffer' was created+-- when @buffer@ was created -- -- - If the -- 'Graphics.Vulkan.Extensions.VK_KHR_buffer_device_address.PhysicalDeviceBufferDeviceAddressFeaturesKHR'::@bufferDeviceAddress@--- feature is enabled and 'Graphics.Vulkan.Core10.Handles.Buffer' was--- created with the+-- feature is enabled and @buffer@ was created with the -- 'Graphics.Vulkan.Extensions.VK_KHR_buffer_device_address.BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR' -- bit set, @memory@ /must/ have been allocated with the -- 'Graphics.Vulkan.Extensions.VK_KHR_buffer_device_address.MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR'@@ -281,15 +275,14 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle -- -- - @memory@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' handle ----- - Both of 'Graphics.Vulkan.Core10.Handles.Buffer', and @memory@ /must/--- have been created, allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - Both of @buffer@, and @memory@ /must/ have been created, allocated,+-- or retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device' -- -- = See Also --@@ -302,8 +295,7 @@ data BindBufferMemoryInfo (es :: [Type]) = BindBufferMemoryInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.Handles.Buffer' is the buffer to be attached to- -- memory.+ , -- | @buffer@ is the buffer to be attached to memory. buffer :: Buffer , -- | @memory@ is a 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object -- describing the device memory to attach.@@ -371,11 +363,10 @@ -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ not already be backed--- by a memory object+-- - @image@ /must/ not already be backed by a memory object ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ not have been created--- with any sparse memory binding flags+-- - @image@ /must/ not have been created with any sparse memory binding+-- flags -- -- - @memoryOffset@ /must/ be less than the size of @memory@ --@@ -386,7 +377,7 @@ -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements' -- structure returned from a call to -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.getImageMemoryRequirements2'--- with 'Graphics.Vulkan.Core10.Handles.Image'+-- with @image@ -- -- - If the @pNext@ chain does not include a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.BindImagePlaneMemoryInfo'@@ -395,7 +386,7 @@ -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements' -- structure returned from a call to -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.getImageMemoryRequirements2'--- with 'Graphics.Vulkan.Core10.Handles.Image'+-- with @image@ -- -- - If the @pNext@ chain does not include a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.BindImagePlaneMemoryInfo'@@ -404,12 +395,11 @@ -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements' -- structure returned from a call to -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.getImageMemoryRequirements2'--- with the same 'Graphics.Vulkan.Core10.Handles.Image'+-- with the same @image@ -- -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.BindImagePlaneMemoryInfo'--- structure, 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been--- created with the+-- structure, @image@ /must/ have been created with the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_DISJOINT_BIT' -- bit set. --@@ -420,7 +410,7 @@ -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements' -- structure returned from a call to -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.getImageMemoryRequirements2'--- with 'Graphics.Vulkan.Core10.Handles.Image' and where+-- with @image@ and where -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.BindImagePlaneMemoryInfo'::@planeAspect@ -- corresponds to the -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.ImagePlaneMemoryRequirementsInfo'::@planeAspect@@@ -435,7 +425,7 @@ -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements' -- structure returned from a call to -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.getImageMemoryRequirements2'--- with 'Graphics.Vulkan.Core10.Handles.Image' and where+-- with @image@ and where -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.BindImagePlaneMemoryInfo'::@planeAspect@ -- corresponds to the -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.ImagePlaneMemoryRequirementsInfo'::@planeAspect@@@ -450,7 +440,7 @@ -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements' -- structure returned from a call to -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.getImageMemoryRequirements2'--- with the same 'Graphics.Vulkan.Core10.Handles.Image' and where+-- with the same @image@ and where -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.BindImagePlaneMemoryInfo'::@planeAspect@ -- corresponds to the -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.ImagePlaneMemoryRequirementsInfo'::@planeAspect@@@ -458,16 +448,13 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.ImageMemoryRequirementsInfo2' -- structure’s @pNext@ chain ----- - If 'Graphics.Vulkan.Core10.Handles.Image' requires a dedicated--- allocation (as reported by+-- - If @image@ requires a dedicated allocation (as reported by -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.getImageMemoryRequirements2' -- in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedRequirements'::requiresDedicatedAllocation--- for 'Graphics.Vulkan.Core10.Handles.Image'), @memory@ /must/ have--- been created with--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Image'--- equal to 'Graphics.Vulkan.Core10.Handles.Image' and @memoryOffset@--- /must/ be zero+-- for @image@), @memory@ /must/ have been created with+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@image@+-- equal to @image@ and @memoryOffset@ /must/ be zero -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-dedicatedAllocationImageAliasing dedicated allocation image aliasing>@@ -476,10 +463,10 @@ -- @memory@ was allocated included a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo' -- structure in its @pNext@ chain, and--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Image'+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@image@ -- was not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', then--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ equal--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Image'+-- @image@ /must/ equal+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@image@ -- and @memoryOffset@ /must/ be zero. -- -- - If the@@ -489,11 +476,10 @@ -- @memory@ was allocated included a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo' -- structure in its @pNext@ chain, and--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Image'+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@image@ -- was not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', then--- @memoryOffset@ /must/ be zero, and--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ be either equal to--- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::'Graphics.Vulkan.Core10.Handles.Image'+-- @memoryOffset@ /must/ be zero, and @image@ /must/ be either equal to+-- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'::@image@ -- or an image that was created using the same parameters in -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo', with the exception -- that @extent@ and @arrayLayers@ /may/ differ subject to the@@ -504,13 +490,12 @@ -- or smaller than the original image for which the allocation was -- created. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with+-- - If @image@ was created with -- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationImageCreateInfoNV'::@dedicatedAllocation@ -- equal to 'Graphics.Vulkan.Core10.BaseType.TRUE', @memory@ /must/ -- have been created with--- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationMemoryAllocateInfoNV'::'Graphics.Vulkan.Core10.Handles.Image'--- equal to 'Graphics.Vulkan.Core10.Handles.Image' and @memoryOffset@--- /must/ be zero+-- 'Graphics.Vulkan.Extensions.VK_NV_dedicated_allocation.DedicatedAllocationMemoryAllocateInfoNV'::@image@+-- equal to @image@ and @memoryOffset@ /must/ be zero -- -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_groupAndVK_KHR_bind_memory2.BindImageMemoryDeviceGroupInfo'@@ -522,8 +507,7 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_groupAndVK_KHR_bind_memory2.BindImageMemoryDeviceGroupInfo' -- structure, and -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_groupAndVK_KHR_bind_memory2.BindImageMemoryDeviceGroupInfo'::@splitInstanceBindRegionCount@--- is not zero, then 'Graphics.Vulkan.Core10.Handles.Image' /must/ have--- been created with the+-- is not zero, then @image@ /must/ have been created with the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT' -- bit set --@@ -532,18 +516,16 @@ -- structure, all elements of -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_groupAndVK_KHR_bind_memory2.BindImageMemoryDeviceGroupInfo'::@pSplitInstanceBindRegions@ -- /must/ be valid rectangles contained within the dimensions of--- 'Graphics.Vulkan.Core10.Handles.Image'+-- @image@ -- -- - If the @pNext@ chain includes a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_groupAndVK_KHR_bind_memory2.BindImageMemoryDeviceGroupInfo' -- structure, the union of the areas of all elements of -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_groupAndVK_KHR_bind_memory2.BindImageMemoryDeviceGroupInfo'::@pSplitInstanceBindRegions@--- that correspond to the same instance of--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ cover the entire--- image.+-- that correspond to the same instance of @image@ /must/ cover the+-- entire image. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with a valid--- swapchain handle in+-- - If @image@ was created with a valid swapchain handle in -- 'Graphics.Vulkan.Extensions.VK_KHR_swapchain.ImageSwapchainCreateInfoKHR'::@swapchain@, -- then the @pNext@ chain /must/ include a -- 'Graphics.Vulkan.Extensions.VK_KHR_swapchain.BindImageMemorySwapchainInfoKHR'@@ -564,12 +546,12 @@ -- used to allocate @memory@ is not @0@, it /must/ include at least one -- of the handles set in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExternalMemoryImageCreateInfo'::@handleTypes@--- when 'Graphics.Vulkan.Core10.Handles.Image' was created+-- when @image@ was created -- -- - If @memory@ was created by a memory import operation, the external -- handle type of the imported memory /must/ also have been set in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExternalMemoryImageCreateInfo'::@handleTypes@--- when 'Graphics.Vulkan.Core10.Handles.Image' was created+-- when @image@ was created -- -- == Valid Usage (Implicit) --@@ -587,13 +569,12 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle+-- - @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle ----- - Both of 'Graphics.Vulkan.Core10.Handles.Image', and @memory@ that--- are valid handles of non-ignored parameters /must/ have been--- created, allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - Both of @image@, and @memory@ that are valid handles of non-ignored+-- parameters /must/ have been created, allocated, or retrieved from+-- the same 'Graphics.Vulkan.Core10.Handles.Device' -- -- = See Also --@@ -606,8 +587,7 @@ data BindImageMemoryInfo (es :: [Type]) = BindImageMemoryInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.Handles.Image' is the image to be attached to- -- memory.+ , -- | @image@ is the image to be attached to memory. image :: Image , -- | @memory@ is a 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object -- describing the device memory to attach.
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_dedicated_allocation.hs view
@@ -75,11 +75,9 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.getBufferMemoryRequirements2' -- call and -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_BINDING_BIT'--- was set in--- 'Graphics.Vulkan.Core10.Buffer.BufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- when 'Graphics.Vulkan.Core10.Handles.Buffer' was created then the--- implementation /must/ set both @prefersDedicatedAllocation@ and--- @requiresDedicatedAllocation@ to+-- was set in 'Graphics.Vulkan.Core10.Buffer.BufferCreateInfo'::@flags@+-- when @buffer@ was created then the implementation /must/ set both+-- @prefersDedicatedAllocation@ and @requiresDedicatedAllocation@ to -- 'Graphics.Vulkan.Core10.BaseType.FALSE'. -- -- If the 'MemoryDedicatedRequirements' structure is included in the@@ -119,11 +117,9 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.getImageMemoryRequirements2' -- call and -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_BINDING_BIT'--- was set in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- when 'Graphics.Vulkan.Core10.Handles.Image' was created then the--- implementation /must/ set both @prefersDedicatedAllocation@ and--- @requiresDedicatedAllocation@ to+-- was set in 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ when+-- @image@ was created then the implementation /must/ set both+-- @prefersDedicatedAllocation@ and @requiresDedicatedAllocation@ to -- 'Graphics.Vulkan.Core10.BaseType.FALSE'. -- -- == Valid Usage (Implicit)@@ -189,44 +185,36 @@ -- -- == Valid Usage ----- - At least one of 'Graphics.Vulkan.Core10.Handles.Image' and--- 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be+-- - At least one of @image@ and @buffer@ /must/ be -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- - If @image@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', -- 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo'::@allocationSize@ -- /must/ equal the -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements'::@size@ -- of the image ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ have been created--- without+-- - If @image@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @image@ /must/ have been created without -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_BINDING_BIT'--- set in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'+-- set in 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is not+-- - If @buffer@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', -- 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo'::@allocationSize@ -- /must/ equal the -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements'::@size@ -- of the buffer ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ have been created--- without+-- - If @buffer@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @buffer@ /must/+-- have been created without -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_SPARSE_BINDING_BIT'--- set in--- 'Graphics.Vulkan.Core10.Buffer.BufferCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'+-- set in 'Graphics.Vulkan.Core10.Buffer.BufferCreateInfo'::@flags@ ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' and--- 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' defines a memory--- import operation with handle type+-- - If @image@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'+-- and 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' defines a+-- memory import operation with handle type -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT', -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT', -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT',@@ -236,13 +224,12 @@ -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT', -- and the external handle was created by the Vulkan API, then the -- memory being imported /must/ also be a dedicated image allocation--- and 'Graphics.Vulkan.Core10.Handles.Image' must be identical to the--- image associated with the imported memory.+-- and @image@ must be identical to the image associated with the+-- imported memory. ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' and--- 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' defines a memory--- import operation with handle type+-- - If @buffer@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'+-- and 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' defines a+-- memory import operation with handle type -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT', -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT', -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT',@@ -252,54 +239,46 @@ -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT', -- and the external handle was created by the Vulkan API, then the -- memory being imported /must/ also be a dedicated buffer allocation--- and 'Graphics.Vulkan.Core10.Handles.Buffer' must be identical to the--- buffer associated with the imported memory.+-- and @buffer@ must be identical to the buffer associated with the+-- imported memory. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' and--- 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' defines a memory--- import operation with handle type+-- - If @image@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'+-- and 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' defines a+-- memory import operation with handle type -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT', -- the memory being imported /must/ also be a dedicated image--- allocation and 'Graphics.Vulkan.Core10.Handles.Image' must be--- identical to the image associated with the imported memory.+-- allocation and @image@ must be identical to the image associated+-- with the imported memory. ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' and--- 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' defines a memory--- import operation with handle type+-- - If @buffer@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'+-- and 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' defines a+-- memory import operation with handle type -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT', -- the memory being imported /must/ also be a dedicated buffer--- allocation and 'Graphics.Vulkan.Core10.Handles.Buffer' must be--- identical to the buffer associated with the imported memory.+-- allocation and @buffer@ must be identical to the buffer associated+-- with the imported memory. ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ not have been created--- with+-- - If @image@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @image@ /must/ not have been created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_DISJOINT_BIT'--- set in--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'+-- set in 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ -- -- == Valid Usage (Implicit) -- -- - @sType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle+-- - If @image@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - If @buffer@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @buffer@ /must/+-- be a valid 'Graphics.Vulkan.Core10.Handles.Buffer' handle ----- - Both of 'Graphics.Vulkan.Core10.Handles.Buffer', and--- 'Graphics.Vulkan.Core10.Handles.Image' that are valid handles of--- non-ignored parameters /must/ have been created, allocated, or--- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Both of @buffer@, and @image@ that are valid handles of non-ignored+-- parameters /must/ have been created, allocated, or retrieved from+-- the same 'Graphics.Vulkan.Core10.Handles.Device' -- -- = See Also --@@ -307,13 +286,11 @@ -- 'Graphics.Vulkan.Core10.Handles.Image', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data MemoryDedicatedAllocateInfo = MemoryDedicatedAllocateInfo- { -- | 'Graphics.Vulkan.Core10.Handles.Image' is- -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a handle of an- -- image which this memory will be bound to.+ { -- | @image@ is 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a handle+ -- of an image which this memory will be bound to. image :: Image- , -- | 'Graphics.Vulkan.Core10.Handles.Buffer' is- -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a handle of a- -- buffer which this memory will be bound to.+ , -- | @buffer@ is 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a+ -- handle of a buffer which this memory will be bound to. buffer :: Buffer } deriving (Typeable)
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_descriptor_update_template.hs view
@@ -13,6 +13,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -25,6 +26,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.C.Types (CSize) import Foreign.C.Types (CSize(CSize))@@ -86,8 +88,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the descriptor update template.+-- - @device@ is the logical device that creates the descriptor update+-- template. -- -- - @pCreateInfo@ is a pointer to a 'DescriptorUpdateTemplateCreateInfo' -- structure specifying the set of descriptors to update with a single@@ -105,8 +107,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'DescriptorUpdateTemplateCreateInfo' structure@@ -137,8 +139,8 @@ -- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate', -- 'DescriptorUpdateTemplateCreateInfo', -- 'Graphics.Vulkan.Core10.Handles.Device'-createDescriptorUpdateTemplate :: Device -> DescriptorUpdateTemplateCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (DescriptorUpdateTemplate)-createDescriptorUpdateTemplate device createInfo allocator = evalContT $ do+createDescriptorUpdateTemplate :: forall io . MonadIO io => Device -> DescriptorUpdateTemplateCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io (DescriptorUpdateTemplate)+createDescriptorUpdateTemplate device createInfo allocator = liftIO . evalContT $ do let vkCreateDescriptorUpdateTemplate' = mkVkCreateDescriptorUpdateTemplate (pVkCreateDescriptorUpdateTemplate (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -154,11 +156,11 @@ -- 'destroyDescriptorUpdateTemplate' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withDescriptorUpdateTemplate :: Device -> DescriptorUpdateTemplateCreateInfo -> Maybe AllocationCallbacks -> (DescriptorUpdateTemplate -> IO r) -> IO r-withDescriptorUpdateTemplate device descriptorUpdateTemplateCreateInfo allocationCallbacks =+withDescriptorUpdateTemplate :: forall r . Device -> DescriptorUpdateTemplateCreateInfo -> Maybe AllocationCallbacks -> ((DescriptorUpdateTemplate) -> IO r) -> IO r+withDescriptorUpdateTemplate device pCreateInfo pAllocator = bracket- (createDescriptorUpdateTemplate device descriptorUpdateTemplateCreateInfo allocationCallbacks)- (\o -> destroyDescriptorUpdateTemplate device o allocationCallbacks)+ (createDescriptorUpdateTemplate device pCreateInfo pAllocator)+ (\(o0) -> destroyDescriptorUpdateTemplate device o0 pAllocator) foreign import ccall@@ -173,11 +175,11 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- has been used to create the descriptor update template+-- - @device@ is the logical device that has been used to create the+-- descriptor update template ----- - 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' is the--- descriptor update template to destroy.+-- - @descriptorUpdateTemplate@ is the descriptor update template to+-- destroy. -- -- - @pAllocator@ controls host memory allocation as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>@@ -186,49 +188,44 @@ -- == Valid Usage -- -- - If 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when--- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' was created, a--- compatible set of callbacks /must/ be provided here+-- were provided when @descriptorSetLayout@ was created, a compatible+-- set of callbacks /must/ be provided here -- -- - If no -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'--- were provided when--- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' was created,--- @pAllocator@ /must/ be @NULL@+-- were provided when @descriptorSetLayout@ was created, @pAllocator@+-- /must/ be @NULL@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' is not+-- - If @descriptorUpdateTemplate@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' /must/ be--- a valid 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate'--- handle+-- @descriptorUpdateTemplate@ /must/ be a valid+-- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' handle -- -- - If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid -- pointer to a valid -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - If 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' is a--- valid handle, it /must/ have been created, allocated, or retrieved--- from 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @descriptorUpdateTemplate@ is a valid handle, it /must/ have been+-- created, allocated, or retrieved from @device@ -- -- == Host Synchronization ----- - Host access to--- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' /must/ be--- externally synchronized+-- - Host access to @descriptorUpdateTemplate@ /must/ be externally+-- synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate', -- 'Graphics.Vulkan.Core10.Handles.Device'-destroyDescriptorUpdateTemplate :: Device -> DescriptorUpdateTemplate -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyDescriptorUpdateTemplate device descriptorUpdateTemplate allocator = evalContT $ do+destroyDescriptorUpdateTemplate :: forall io . MonadIO io => Device -> DescriptorUpdateTemplate -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyDescriptorUpdateTemplate device descriptorUpdateTemplate allocator = liftIO . evalContT $ do let vkDestroyDescriptorUpdateTemplate' = mkVkDestroyDescriptorUpdateTemplate (pVkDestroyDescriptorUpdateTemplate (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -249,13 +246,11 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- updates the descriptor sets.+-- - @device@ is the logical device that updates the descriptor sets. ----- - 'Graphics.Vulkan.Core10.Handles.DescriptorSet' is the descriptor set--- to update+-- - @descriptorSet@ is the descriptor set to update ----- - 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' is a+-- - @descriptorUpdateTemplate@ is a -- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' object -- specifying the update mapping between @pData@ and the descriptor set -- to update.@@ -273,29 +268,26 @@ -- 'Graphics.Vulkan.Core10.DescriptorSet.DescriptorImageInfo', -- 'Graphics.Vulkan.Core10.DescriptorSet.DescriptorBufferInfo', or -- 'Graphics.Vulkan.Core10.Handles.BufferView' in a layout defined by--- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' when it--- was created with 'createDescriptorUpdateTemplate'+-- @descriptorUpdateTemplate@ when it was created with+-- 'createDescriptorUpdateTemplate' -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.DescriptorSet' /must/ be a valid+-- - @descriptorSet@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.DescriptorSet' handle ----- - 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' /must/ be--- a valid 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate'--- handle+-- - @descriptorUpdateTemplate@ /must/ be a valid+-- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' handle ----- - 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' /must/--- have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - @descriptorUpdateTemplate@ /must/ have been created, allocated, or+-- retrieved from @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.DescriptorSet' /must/--- be externally synchronized+-- - Host access to @descriptorSet@ /must/ be externally synchronized -- -- __API example.__ --@@ -380,8 +372,8 @@ -- 'Graphics.Vulkan.Core10.Handles.DescriptorSet', -- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate', -- 'Graphics.Vulkan.Core10.Handles.Device'-updateDescriptorSetWithTemplate :: Device -> DescriptorSet -> DescriptorUpdateTemplate -> ("data" ::: Ptr ()) -> IO ()-updateDescriptorSetWithTemplate device descriptorSet descriptorUpdateTemplate data' = do+updateDescriptorSetWithTemplate :: forall io . MonadIO io => Device -> DescriptorSet -> DescriptorUpdateTemplate -> ("data" ::: Ptr ()) -> io ()+updateDescriptorSetWithTemplate device descriptorSet descriptorUpdateTemplate data' = liftIO $ do let vkUpdateDescriptorSetWithTemplate' = mkVkUpdateDescriptorSetWithTemplate (pVkUpdateDescriptorSetWithTemplate (deviceCmds (device :: Device))) vkUpdateDescriptorSetWithTemplate' (deviceHandle (device)) (descriptorSet) (descriptorUpdateTemplate) (data') pure $ ()@@ -413,8 +405,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' /must/--- be a valid+-- - @descriptorType@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' value -- -- = See Also@@ -442,7 +433,7 @@ -- remaining array elements in the destination binding refer to the -- remaining number of bytes in it. descriptorCount :: Word32- , -- | 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is a+ , -- | @descriptorType@ is a -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' specifying -- the type of the descriptor. descriptorType :: DescriptorType@@ -457,8 +448,7 @@ -- > const char *ptr = (const char *)pData + pDescriptorUpdateEntries[i].offset + j * pDescriptorUpdateEntries[i].stride -- -- The stride is useful in case the bindings are stored in structs along- -- with other data. If- -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+ -- with other data. If @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT' -- then the value of @stride@ is ignored and the stride is assumed to be -- @1@, i.e. the descriptor update information for them is always specified@@ -523,19 +513,18 @@ -- -- - If @templateType@ is -- 'Graphics.Vulkan.Core11.Enums.DescriptorUpdateTemplateType.DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET',--- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' /must/ be a--- valid 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' handle+-- @descriptorSetLayout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' handle -- -- - If @templateType@ is -- 'Graphics.Vulkan.Core11.Enums.DescriptorUpdateTemplateType.DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR',--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- /must/ be a valid+-- @pipelineBindPoint@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' -- value -- -- - If @templateType@ is -- 'Graphics.Vulkan.Core11.Enums.DescriptorUpdateTemplateType.DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR',--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' /must/ be a valid+-- @pipelineLayout@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' handle -- -- - If @templateType@ is@@ -551,7 +540,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - @pDescriptorUpdateEntries@ /must/ be a valid pointer to an array of -- @descriptorUpdateEntryCount@ valid 'DescriptorUpdateTemplateEntry'@@ -563,8 +552,7 @@ -- -- - @descriptorUpdateEntryCount@ /must/ be greater than @0@ ----- - Both of 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout', and--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that are valid+-- - Both of @descriptorSetLayout@, and @pipelineLayout@ that are valid -- handles of non-ignored parameters /must/ have been created, -- allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Device'@@ -581,7 +569,7 @@ -- 'createDescriptorUpdateTemplate', -- 'Graphics.Vulkan.Extensions.VK_KHR_descriptor_update_template.createDescriptorUpdateTemplateKHR' data DescriptorUpdateTemplateCreateInfo = DescriptorUpdateTemplateCreateInfo- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ { -- | @flags@ is reserved for future use. flags :: DescriptorUpdateTemplateCreateFlags , -- | @pDescriptorUpdateEntries@ is a pointer to an array of -- 'DescriptorUpdateTemplateEntry' structures describing the descriptors to@@ -591,33 +579,31 @@ -- set to -- 'Graphics.Vulkan.Core11.Enums.DescriptorUpdateTemplateType.DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET' -- it /can/ only be used to update descriptor sets with a fixed- -- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout'. If set to+ -- @descriptorSetLayout@. If set to -- 'Graphics.Vulkan.Core11.Enums.DescriptorUpdateTemplateType.DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR' -- it /can/ only be used to push descriptor sets using the provided- -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint',- -- 'Graphics.Vulkan.Core10.Handles.PipelineLayout', and @set@ number.+ -- @pipelineBindPoint@, @pipelineLayout@, and @set@ number. templateType :: DescriptorUpdateTemplateType- , -- | 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' is the descriptor- -- set layout the parameter update template will be used with. All- -- descriptor sets which are going to be updated through the newly created- -- descriptor update template /must/ be created with this layout.- -- 'Graphics.Vulkan.Core10.Handles.DescriptorSetLayout' is the descriptor- -- set layout used to build the descriptor update template. All descriptor- -- sets which are going to be updated through the newly created descriptor+ , -- | @descriptorSetLayout@ is the descriptor set layout the parameter update+ -- template will be used with. All descriptor sets which are going to be+ -- updated through the newly created descriptor update template /must/ be+ -- created with this layout. @descriptorSetLayout@ is the descriptor set+ -- layout used to build the descriptor update template. All descriptor sets+ -- which are going to be updated through the newly created descriptor -- update template /must/ be created with a layout that matches (is the -- same as, or defined identically to) this layout. This parameter is -- ignored if @templateType@ is not -- 'Graphics.Vulkan.Core11.Enums.DescriptorUpdateTemplateType.DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET'. descriptorSetLayout :: DescriptorSetLayout- , -- | 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' is a+ , -- | @pipelineBindPoint@ is a -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' -- indicating whether the descriptors will be used by graphics pipelines or -- compute pipelines. This parameter is ignored if @templateType@ is not -- 'Graphics.Vulkan.Core11.Enums.DescriptorUpdateTemplateType.DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR' pipelineBindPoint :: PipelineBindPoint- , -- | 'Graphics.Vulkan.Core10.Handles.PipelineLayout' is a- -- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' object used to program- -- the bindings. This parameter is ignored if @templateType@ is not+ , -- | @pipelineLayout@ is a 'Graphics.Vulkan.Core10.Handles.PipelineLayout'+ -- object used to program the bindings. This parameter is ignored if+ -- @templateType@ is not -- 'Graphics.Vulkan.Core11.Enums.DescriptorUpdateTemplateType.DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR' pipelineLayout :: PipelineLayout , -- | @set@ is the set number of the descriptor set in the pipeline layout
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_device_group.hs view
@@ -20,6 +20,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -30,6 +31,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -55,9 +57,8 @@ import Graphics.Vulkan.CStruct (FromCStruct) import Graphics.Vulkan.CStruct (FromCStruct(..)) import Graphics.Vulkan.Core11.Enums.MemoryAllocateFlagBits (MemoryAllocateFlags)-import Graphics.Vulkan.Core11.Enums.PeerMemoryFeatureFlagBits (PeerMemoryFeatureFlags)-import Graphics.Vulkan.Core11.Enums.PeerMemoryFeatureFlagBits (PeerMemoryFeatureFlags) import Graphics.Vulkan.Core11.Enums.PeerMemoryFeatureFlagBits (PeerMemoryFeatureFlagBits(..))+import Graphics.Vulkan.Core11.Enums.PeerMemoryFeatureFlagBits (PeerMemoryFeatureFlags) import Graphics.Vulkan.Core10.CommandBufferBuilding (Rect2D) import Graphics.Vulkan.Core10.Enums.StructureType (StructureType) import Graphics.Vulkan.CStruct (ToCStruct)@@ -91,8 +92,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the memory.+-- - @device@ is the logical device that owns the memory. -- -- - @heapIndex@ is the index of the memory heap from which the memory is -- allocated.@@ -114,8 +114,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core11.Enums.PeerMemoryFeatureFlagBits.PeerMemoryFeatureFlags'-getDeviceGroupPeerMemoryFeatures :: Device -> ("heapIndex" ::: Word32) -> ("localDeviceIndex" ::: Word32) -> ("remoteDeviceIndex" ::: Word32) -> IO (("peerMemoryFeatures" ::: PeerMemoryFeatureFlags))-getDeviceGroupPeerMemoryFeatures device heapIndex localDeviceIndex remoteDeviceIndex = evalContT $ do+getDeviceGroupPeerMemoryFeatures :: forall io . MonadIO io => Device -> ("heapIndex" ::: Word32) -> ("localDeviceIndex" ::: Word32) -> ("remoteDeviceIndex" ::: Word32) -> io (("peerMemoryFeatures" ::: PeerMemoryFeatureFlags))+getDeviceGroupPeerMemoryFeatures device heapIndex localDeviceIndex remoteDeviceIndex = liftIO . evalContT $ do let vkGetDeviceGroupPeerMemoryFeatures' = mkVkGetDeviceGroupPeerMemoryFeatures (pVkGetDeviceGroupPeerMemoryFeatures (deviceCmds (device :: Device))) pPPeerMemoryFeatures <- ContT $ bracket (callocBytes @PeerMemoryFeatureFlags 4) free lift $ vkGetDeviceGroupPeerMemoryFeatures' (deviceHandle (device)) (heapIndex) (localDeviceIndex) (remoteDeviceIndex) (pPPeerMemoryFeatures)@@ -134,8 +134,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is command buffer--- whose current device mask is modified.+-- - @commandBuffer@ is command buffer whose current device mask is+-- modified. -- -- - @deviceMask@ is the new value of the current device mask. --@@ -167,24 +167,22 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, compute, or transfer operations+-- @commandBuffer@ was allocated from /must/ support graphics, compute,+-- or transfer operations -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -201,8 +199,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdSetDeviceMask :: CommandBuffer -> ("deviceMask" ::: Word32) -> IO ()-cmdSetDeviceMask commandBuffer deviceMask = do+cmdSetDeviceMask :: forall io . MonadIO io => CommandBuffer -> ("deviceMask" ::: Word32) -> io ()+cmdSetDeviceMask commandBuffer deviceMask = liftIO $ do let vkCmdSetDeviceMask' = mkVkCmdSetDeviceMask (pVkCmdSetDeviceMask (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdSetDeviceMask' (commandBufferHandle (commandBuffer)) (deviceMask) pure $ ()@@ -219,8 +217,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @baseGroupX@ is the start value for the X component of -- @WorkgroupId@.@@ -295,8 +293,7 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV' -- sampled as a result of this command /must/ only be sampled using a -- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'@@ -334,9 +331,8 @@ -- -- - If the 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and done so after--- any previously bound pipeline with the corresponding state not+-- 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@@ -393,11 +389,10 @@ -- specified in the descriptor set bound to the same pipeline bind -- point ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource+-- - If @commandBuffer@ is an unprotected command buffer, any resource+-- accessed by the 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource -- -- - @baseGroupX@ /must/ be less than -- 'Graphics.Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxComputeWorkGroupCount@[0]@@ -426,26 +421,23 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support compute operations+-- @commandBuffer@ was allocated from /must/ support compute operations -- -- - This command /must/ only be called outside of a render pass instance -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -461,8 +453,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdDispatchBase :: CommandBuffer -> ("baseGroupX" ::: Word32) -> ("baseGroupY" ::: Word32) -> ("baseGroupZ" ::: Word32) -> ("groupCountX" ::: Word32) -> ("groupCountY" ::: Word32) -> ("groupCountZ" ::: Word32) -> IO ()-cmdDispatchBase commandBuffer baseGroupX baseGroupY baseGroupZ groupCountX groupCountY groupCountZ = do+cmdDispatchBase :: forall io . MonadIO io => CommandBuffer -> ("baseGroupX" ::: Word32) -> ("baseGroupY" ::: Word32) -> ("baseGroupZ" ::: Word32) -> ("groupCountX" ::: Word32) -> ("groupCountY" ::: Word32) -> ("groupCountZ" ::: Word32) -> io ()+cmdDispatchBase commandBuffer baseGroupX baseGroupY baseGroupZ groupCountX groupCountY groupCountZ = liftIO $ do let vkCmdDispatchBase' = mkVkCmdDispatchBase (pVkCmdDispatchBase (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdDispatchBase' (commandBufferHandle (commandBuffer)) (baseGroupX) (baseGroupY) (baseGroupZ) (groupCountX) (groupCountY) (groupCountZ) pure $ ()@@ -518,8 +510,7 @@ -- - @sType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO' ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core11.Enums.MemoryAllocateFlagBits.MemoryAllocateFlagBits' -- values --@@ -528,7 +519,7 @@ -- 'Graphics.Vulkan.Core11.Enums.MemoryAllocateFlagBits.MemoryAllocateFlags', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data MemoryAllocateFlagsInfo = MemoryAllocateFlagsInfo- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ { -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core11.Enums.MemoryAllocateFlagBits.MemoryAllocateFlagBits' -- controlling the allocation. flags :: MemoryAllocateFlags@@ -536,7 +527,7 @@ -- indicating that memory /must/ be allocated on each device in the mask, -- if -- 'Graphics.Vulkan.Core11.Enums.MemoryAllocateFlagBits.MEMORY_ALLOCATE_DEVICE_MASK_BIT'- -- is set in 'Graphics.Vulkan.Core10.BaseType.Flags'.+ -- is set in @flags@. deviceMask :: Word32 } deriving (Typeable)
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_device_groupAndVK_KHR_bind_memory2.hs view
@@ -166,8 +166,8 @@ -- of memory. -- -- If @deviceIndexCount@ is greater than zero, then on device index i--- 'Graphics.Vulkan.Core10.Handles.Image' is attached to the instance of--- the memory on the physical device with device index pDeviceIndices[i].+-- @image@ is attached to the instance of the memory on the physical device+-- with device index pDeviceIndices[i]. -- -- Let N be the number of physical devices in the logical device. If -- @splitInstanceBindRegionCount@ is greater than zero, then@@ -179,9 +179,8 @@ -- being bound to a contiguous range of memory. In other words, -- horizontally adjacent image blocks use consecutive blocks of memory, -- vertically adjacent image blocks are separated by the number of bytes--- per block multiplied by the width in blocks of--- 'Graphics.Vulkan.Core10.Handles.Image', and the block at (0,0)--- corresponds to memory starting at @memoryOffset@.+-- per block multiplied by the width in blocks of @image@, and the block at+-- (0,0) corresponds to memory starting at @memoryOffset@. -- -- If @splitInstanceBindRegionCount@ and @deviceIndexCount@ are zero and -- the memory comes from a memory heap with the
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_device_group_creation.hs view
@@ -11,6 +11,7 @@ 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)@@ -23,6 +24,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -79,8 +81,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is a handle to a Vulkan--- instance previously created with+-- - @instance@ is a handle to a Vulkan instance previously created with -- 'Graphics.Vulkan.Core10.DeviceInitialization.createInstance'. -- -- - @pPhysicalDeviceGroupCount@ is a pointer to an integer related to@@ -110,7 +111,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pPhysicalDeviceGroupCount@ /must/ be a valid pointer to a@@ -142,8 +143,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Instance', -- 'PhysicalDeviceGroupProperties'-enumeratePhysicalDeviceGroups :: Instance -> IO (Result, ("physicalDeviceGroupProperties" ::: Vector PhysicalDeviceGroupProperties))-enumeratePhysicalDeviceGroups instance' = evalContT $ do+enumeratePhysicalDeviceGroups :: forall io . MonadIO io => Instance -> io (Result, ("physicalDeviceGroupProperties" ::: Vector PhysicalDeviceGroupProperties))+enumeratePhysicalDeviceGroups instance' = liftIO . evalContT $ do let vkEnumeratePhysicalDeviceGroups' = mkVkEnumeratePhysicalDeviceGroups (pVkEnumeratePhysicalDeviceGroups (instanceCmds (instance' :: Instance))) let instance'' = instanceHandle (instance') pPPhysicalDeviceGroupCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -254,7 +255,7 @@ -- A logical device created without using 'DeviceGroupDeviceCreateInfo', or -- with @physicalDeviceCount@ equal to zero, is equivalent to a -- @physicalDeviceCount@ of one and @pPhysicalDevices@ pointing to the--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' parameter to+-- @physicalDevice@ parameter to -- 'Graphics.Vulkan.Core10.Device.createDevice'. In particular, the device -- index of that physical device is zero. --@@ -265,10 +266,9 @@ -- - All elements of @pPhysicalDevices@ /must/ be in the same device -- group as enumerated by 'enumeratePhysicalDeviceGroups' ----- - If @physicalDeviceCount@ is not @0@, the--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' parameter of--- 'Graphics.Vulkan.Core10.Device.createDevice' /must/ be an element of--- @pPhysicalDevices@.+-- - If @physicalDeviceCount@ is not @0@, the @physicalDevice@ parameter+-- of 'Graphics.Vulkan.Core10.Device.createDevice' /must/ be an element+-- of @pPhysicalDevices@. -- -- == Valid Usage (Implicit) --
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_external_fence_capabilities.hs view
@@ -9,11 +9,13 @@ , ExternalFenceFeatureFlags ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Ptr (nullPtr) import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -55,8 +57,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the fence capabilities.+-- - @physicalDevice@ is the physical device from which to query the+-- fence capabilities. -- -- - @pExternalFenceInfo@ is a pointer to a -- 'PhysicalDeviceExternalFenceInfo' structure describing the@@ -74,8 +76,8 @@ -- 'ExternalFenceProperties', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceExternalFenceInfo'-getPhysicalDeviceExternalFenceProperties :: PhysicalDevice -> PhysicalDeviceExternalFenceInfo -> IO (ExternalFenceProperties)-getPhysicalDeviceExternalFenceProperties physicalDevice externalFenceInfo = evalContT $ do+getPhysicalDeviceExternalFenceProperties :: forall io . MonadIO io => PhysicalDevice -> PhysicalDeviceExternalFenceInfo -> io (ExternalFenceProperties)+getPhysicalDeviceExternalFenceProperties physicalDevice externalFenceInfo = liftIO . evalContT $ do let vkGetPhysicalDeviceExternalFenceProperties' = mkVkGetPhysicalDeviceExternalFenceProperties (pVkGetPhysicalDeviceExternalFenceProperties (instanceCmds (physicalDevice :: PhysicalDevice))) pExternalFenceInfo <- ContT $ withCStruct (externalFenceInfo) pPExternalFenceProperties <- ContT (withZeroCStruct @ExternalFenceProperties)
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_external_memory_capabilities.hs view
@@ -15,11 +15,13 @@ , pattern LUID_SIZE ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Ptr (nullPtr) import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -79,8 +81,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the buffer capabilities.+-- - @physicalDevice@ is the physical device from which to query the+-- buffer capabilities. -- -- - @pExternalBufferInfo@ is a pointer to a -- 'PhysicalDeviceExternalBufferInfo' structure describing the@@ -98,8 +100,8 @@ -- 'ExternalBufferProperties', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceExternalBufferInfo'-getPhysicalDeviceExternalBufferProperties :: PhysicalDevice -> PhysicalDeviceExternalBufferInfo -> IO (ExternalBufferProperties)-getPhysicalDeviceExternalBufferProperties physicalDevice externalBufferInfo = evalContT $ do+getPhysicalDeviceExternalBufferProperties :: forall io . MonadIO io => PhysicalDevice -> PhysicalDeviceExternalBufferInfo -> io (ExternalBufferProperties)+getPhysicalDeviceExternalBufferProperties physicalDevice externalBufferInfo = liftIO . evalContT $ do let vkGetPhysicalDeviceExternalBufferProperties' = mkVkGetPhysicalDeviceExternalBufferProperties (pVkGetPhysicalDeviceExternalBufferProperties (instanceCmds (physicalDevice :: PhysicalDevice))) pExternalBufferInfo <- ContT $ withCStruct (externalBufferInfo) pPExternalBufferProperties <- ContT (withZeroCStruct @ExternalBufferProperties)@@ -192,9 +194,8 @@ -- will behave as if 'PhysicalDeviceExternalImageFormatInfo' was not -- present, and 'ExternalImageFormatProperties' will be ignored. ----- If @handleType@ is not compatible with the--- 'Graphics.Vulkan.Core10.Enums.Format.Format', @type@, @tiling@, @usage@,--- and 'Graphics.Vulkan.Core10.BaseType.Flags' specified in+-- If @handleType@ is not compatible with the @format@, @type@, @tiling@,+-- @usage@, and @flags@ specified in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceImageFormatInfo2', -- then -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'@@ -264,7 +265,7 @@ -- 'ExternalMemoryProperties', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data ExternalImageFormatProperties = ExternalImageFormatProperties- { -- | 'ExternalMemoryProperties' is a 'ExternalMemoryProperties' structure+ { -- | @externalMemoryProperties@ is a 'ExternalMemoryProperties' structure -- specifying various capabilities of the external handle type when used -- with the specified image creation parameters. externalMemoryProperties :: ExternalMemoryProperties }@@ -311,7 +312,7 @@ -- 'getPhysicalDeviceExternalBufferProperties', -- 'Graphics.Vulkan.Extensions.VK_KHR_external_memory_capabilities.getPhysicalDeviceExternalBufferPropertiesKHR' data PhysicalDeviceExternalBufferInfo = PhysicalDeviceExternalBufferInfo- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid combination of+ { -- | @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BufferCreateFlagBits' -- values flags :: BufferCreateFlags@@ -376,7 +377,7 @@ -- 'getPhysicalDeviceExternalBufferProperties', -- 'Graphics.Vulkan.Extensions.VK_KHR_external_memory_capabilities.getPhysicalDeviceExternalBufferPropertiesKHR' data ExternalBufferProperties = ExternalBufferProperties- { -- | 'ExternalMemoryProperties' is a 'ExternalMemoryProperties' structure+ { -- | @externalMemoryProperties@ is a 'ExternalMemoryProperties' structure -- specifying various capabilities of the external handle type when used -- with the specified buffer creation parameters. externalMemoryProperties :: ExternalMemoryProperties }@@ -460,15 +461,13 @@ -- is running on the Windows operating system, the contents of @deviceLUID@ -- /can/ be cast to an @LUID@ object and /must/ be equal to the locally -- unique identifier of a @IDXGIAdapter1@ object that corresponds to--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'. If @deviceLUIDValid@ is+-- @physicalDevice@. If @deviceLUIDValid@ is -- 'Graphics.Vulkan.Core10.BaseType.TRUE', @deviceNodeMask@ /must/ contain -- exactly one bit. If Vulkan is running on an operating system that--- supports the Direct3D 12 API and--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' corresponds to an+-- supports the Direct3D 12 API and @physicalDevice@ corresponds to an -- individual device in a linked device adapter, @deviceNodeMask@--- identifies the Direct3D 12 node corresponding to--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'. Otherwise,--- @deviceNodeMask@ /must/ be @1@.+-- identifies the Direct3D 12 node corresponding to @physicalDevice@.+-- Otherwise, @deviceNodeMask@ /must/ be @1@. -- -- Note --
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_external_semaphore_capabilities.hs view
@@ -9,6 +9,7 @@ , ExternalSemaphoreFeatureFlags ) where +import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import GHC.Ptr (castPtr)@@ -16,6 +17,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -66,8 +68,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the semaphore capabilities.+-- - @physicalDevice@ is the physical device from which to query the+-- semaphore capabilities. -- -- - @pExternalSemaphoreInfo@ is a pointer to a -- 'PhysicalDeviceExternalSemaphoreInfo' structure describing the@@ -85,8 +87,8 @@ -- 'ExternalSemaphoreProperties', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceExternalSemaphoreInfo'-getPhysicalDeviceExternalSemaphoreProperties :: PokeChain a => PhysicalDevice -> PhysicalDeviceExternalSemaphoreInfo a -> IO (ExternalSemaphoreProperties)-getPhysicalDeviceExternalSemaphoreProperties physicalDevice externalSemaphoreInfo = evalContT $ do+getPhysicalDeviceExternalSemaphoreProperties :: forall a io . (PokeChain a, MonadIO io) => PhysicalDevice -> PhysicalDeviceExternalSemaphoreInfo a -> io (ExternalSemaphoreProperties)+getPhysicalDeviceExternalSemaphoreProperties physicalDevice externalSemaphoreInfo = liftIO . evalContT $ do let vkGetPhysicalDeviceExternalSemaphoreProperties' = mkVkGetPhysicalDeviceExternalSemaphoreProperties (pVkGetPhysicalDeviceExternalSemaphoreProperties (instanceCmds (physicalDevice :: PhysicalDevice))) pExternalSemaphoreInfo <- ContT $ withCStruct (externalSemaphoreInfo) pPExternalSemaphoreProperties <- ContT (withZeroCStruct @ExternalSemaphoreProperties)
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_get_memory_requirements2.hs view
@@ -12,6 +12,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -22,6 +23,7 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Data.Vector (generateM)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -79,8 +81,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the buffer.+-- - @device@ is the logical device that owns the buffer. -- -- - @pInfo@ is a pointer to a 'BufferMemoryRequirementsInfo2' structure -- containing parameters required for the memory requirements query.@@ -95,8 +96,8 @@ -- -- 'BufferMemoryRequirementsInfo2', -- 'Graphics.Vulkan.Core10.Handles.Device', 'MemoryRequirements2'-getBufferMemoryRequirements2 :: (PokeChain a, PeekChain a) => Device -> BufferMemoryRequirementsInfo2 -> IO (MemoryRequirements2 a)-getBufferMemoryRequirements2 device info = evalContT $ do+getBufferMemoryRequirements2 :: forall a io . (PokeChain a, PeekChain a, MonadIO io) => Device -> BufferMemoryRequirementsInfo2 -> io (MemoryRequirements2 a)+getBufferMemoryRequirements2 device info = liftIO . evalContT $ do let vkGetBufferMemoryRequirements2' = mkVkGetBufferMemoryRequirements2 (pVkGetBufferMemoryRequirements2 (deviceCmds (device :: Device))) pInfo <- ContT $ withCStruct (info) pPMemoryRequirements <- ContT (withZeroCStruct @(MemoryRequirements2 _))@@ -117,8 +118,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the image.+-- - @device@ is the logical device that owns the image. -- -- - @pInfo@ is a pointer to a 'ImageMemoryRequirementsInfo2' structure -- containing parameters required for the memory requirements query.@@ -133,8 +133,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'ImageMemoryRequirementsInfo2', -- 'MemoryRequirements2'-getImageMemoryRequirements2 :: (PokeChain a, PokeChain b, PeekChain b) => Device -> ImageMemoryRequirementsInfo2 a -> IO (MemoryRequirements2 b)-getImageMemoryRequirements2 device info = evalContT $ do+getImageMemoryRequirements2 :: forall a b io . (PokeChain a, PokeChain b, PeekChain b, MonadIO io) => Device -> ImageMemoryRequirementsInfo2 a -> io (MemoryRequirements2 b)+getImageMemoryRequirements2 device info = liftIO . evalContT $ do let vkGetImageMemoryRequirements2' = mkVkGetImageMemoryRequirements2 (pVkGetImageMemoryRequirements2 (deviceCmds (device :: Device))) pInfo <- ContT $ withCStruct (info) pPMemoryRequirements <- ContT (withZeroCStruct @(MemoryRequirements2 _))@@ -155,8 +155,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the image.+-- - @device@ is the logical device that owns the image. -- -- - @pInfo@ is a pointer to a 'ImageSparseMemoryRequirementsInfo2' -- structure containing parameters required for the memory requirements@@ -171,8 +170,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pInfo@ /must/ be a valid pointer to a valid -- 'ImageSparseMemoryRequirementsInfo2' structure@@ -190,8 +189,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'ImageSparseMemoryRequirementsInfo2', 'SparseImageMemoryRequirements2'-getImageSparseMemoryRequirements2 :: Device -> ImageSparseMemoryRequirementsInfo2 -> IO (("sparseMemoryRequirements" ::: Vector SparseImageMemoryRequirements2))-getImageSparseMemoryRequirements2 device info = evalContT $ do+getImageSparseMemoryRequirements2 :: forall io . MonadIO io => Device -> ImageSparseMemoryRequirementsInfo2 -> io (("sparseMemoryRequirements" ::: Vector SparseImageMemoryRequirements2))+getImageSparseMemoryRequirements2 device info = liftIO . evalContT $ do let vkGetImageSparseMemoryRequirements2' = mkVkGetImageSparseMemoryRequirements2 (pVkGetImageSparseMemoryRequirements2 (deviceCmds (device :: Device))) let device' = deviceHandle (device) pInfo <- ContT $ withCStruct (info)@@ -217,8 +216,8 @@ -- 'getBufferMemoryRequirements2', -- 'Graphics.Vulkan.Extensions.VK_KHR_get_memory_requirements2.getBufferMemoryRequirements2KHR' data BufferMemoryRequirementsInfo2 = BufferMemoryRequirementsInfo2- { -- | 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid- -- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+ { -- | @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+ -- handle buffer :: Buffer } deriving (Typeable) deriving instance Show BufferMemoryRequirementsInfo2@@ -259,15 +258,14 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with a--- /multi-planar/ format and the+-- - If @image@ was created with a /multi-planar/ format and the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_DISJOINT_BIT' -- flag, there /must/ be a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.ImagePlaneMemoryRequirementsInfo' -- included in the @pNext@ chain of the 'ImageMemoryRequirementsInfo2' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with+-- - If @image@ was created with -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_DISJOINT_BIT' -- and with -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT',@@ -276,25 +274,24 @@ -- included in the @pNext@ chain of the 'ImageMemoryRequirementsInfo2' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was not created with the+-- - If @image@ was not created with the -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_DISJOINT_BIT' -- flag, there /must/ not be a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.ImagePlaneMemoryRequirementsInfo' -- included in the @pNext@ chain of the 'ImageMemoryRequirementsInfo2' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with a--- single-plane format and with any @tiling@ other than+-- - If @image@ was created with a single-plane format and with any+-- @tiling@ other than -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT', -- then there /must/ not be a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.ImagePlaneMemoryRequirementsInfo' -- included in the @pNext@ chain of the 'ImageMemoryRequirementsInfo2' -- structure ----- - If 'Graphics.Vulkan.Core10.Handles.Image' was created with the+-- - If @image@ was created with the -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID'--- external memory handle type, then--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ be bound to memory.+-- external memory handle type, then @image@ /must/ be bound to memory. -- -- == Valid Usage (Implicit) --@@ -307,8 +304,8 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle+-- - @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle -- -- = See Also --@@ -319,7 +316,7 @@ data ImageMemoryRequirementsInfo2 (es :: [Type]) = ImageMemoryRequirementsInfo2 { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.Handles.Image' is the image to query.+ , -- | @image@ is the image to query. image :: Image } deriving (Typeable)@@ -376,8 +373,7 @@ -- 'getImageSparseMemoryRequirements2', -- 'Graphics.Vulkan.Extensions.VK_KHR_get_memory_requirements2.getImageSparseMemoryRequirements2KHR' data ImageSparseMemoryRequirementsInfo2 = ImageSparseMemoryRequirementsInfo2- { -- | 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid- -- 'Graphics.Vulkan.Core10.Handles.Image' handle+ { -- | @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image' handle image :: Image } deriving (Typeable) deriving instance Show ImageSparseMemoryRequirementsInfo2@@ -438,7 +434,7 @@ data MemoryRequirements2 (es :: [Type]) = MemoryRequirements2 { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements' is a+ , -- | @memoryRequirements@ is a -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements' structure -- describing the memory requirements of the resource. memoryRequirements :: MemoryRequirements@@ -497,7 +493,7 @@ -- 'getImageSparseMemoryRequirements2', -- 'Graphics.Vulkan.Extensions.VK_KHR_get_memory_requirements2.getImageSparseMemoryRequirements2KHR' data SparseImageMemoryRequirements2 = SparseImageMemoryRequirements2- { -- | 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements' is a+ { -- | @memoryRequirements@ is a -- 'Graphics.Vulkan.Core10.SparseResourceMemoryManagement.SparseImageMemoryRequirements' -- structure describing the memory requirements of the sparse image. memoryRequirements :: SparseImageMemoryRequirements }
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_get_physical_device_properties2.hs view
@@ -19,6 +19,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -31,6 +32,7 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Data.Vector (generateM)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -213,8 +215,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the supported features.+-- - @physicalDevice@ is the physical device from which to query the+-- supported features. -- -- - @pFeatures@ is a pointer to a 'PhysicalDeviceFeatures2' structure in -- which the physical device features are returned.@@ -232,8 +234,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceFeatures2'-getPhysicalDeviceFeatures2 :: (PokeChain a, PeekChain a) => PhysicalDevice -> IO (PhysicalDeviceFeatures2 a)-getPhysicalDeviceFeatures2 physicalDevice = evalContT $ do+getPhysicalDeviceFeatures2 :: forall a io . (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> io (PhysicalDeviceFeatures2 a)+getPhysicalDeviceFeatures2 physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceFeatures2' = mkVkGetPhysicalDeviceFeatures2 (pVkGetPhysicalDeviceFeatures2 (instanceCmds (physicalDevice :: PhysicalDevice))) pPFeatures <- ContT (withZeroCStruct @(PhysicalDeviceFeatures2 _)) lift $ vkGetPhysicalDeviceFeatures2' (physicalDeviceHandle (physicalDevice)) (pPFeatures)@@ -252,8 +254,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the handle to the--- physical device whose properties will be queried.+-- - @physicalDevice@ is the handle to the physical device whose+-- properties will be queried. -- -- - @pProperties@ is a pointer to a 'PhysicalDeviceProperties2' -- structure in which properties are returned.@@ -271,8 +273,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceProperties2'-getPhysicalDeviceProperties2 :: (PokeChain a, PeekChain a) => PhysicalDevice -> IO (PhysicalDeviceProperties2 a)-getPhysicalDeviceProperties2 physicalDevice = evalContT $ do+getPhysicalDeviceProperties2 :: forall a io . (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> io (PhysicalDeviceProperties2 a)+getPhysicalDeviceProperties2 physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceProperties2' = mkVkGetPhysicalDeviceProperties2 (pVkGetPhysicalDeviceProperties2 (instanceCmds (physicalDevice :: PhysicalDevice))) pPProperties <- ContT (withZeroCStruct @(PhysicalDeviceProperties2 _)) lift $ vkGetPhysicalDeviceProperties2' (physicalDeviceHandle (physicalDevice)) (pPProperties)@@ -292,15 +294,13 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the format properties.+-- - @physicalDevice@ is the physical device from which to query the+-- format properties. ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' is the format whose--- properties are queried.+-- - @format@ is the format whose properties are queried. -- -- - @pFormatProperties@ is a pointer to a 'FormatProperties2' structure--- in which physical device properties for--- 'Graphics.Vulkan.Core10.Enums.Format.Format' are returned.+-- in which physical device properties for @format@ are returned. -- -- = Description --@@ -315,8 +315,8 @@ -- -- 'Graphics.Vulkan.Core10.Enums.Format.Format', 'FormatProperties2', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceFormatProperties2 :: (PokeChain a, PeekChain a) => PhysicalDevice -> Format -> IO (FormatProperties2 a)-getPhysicalDeviceFormatProperties2 physicalDevice format = evalContT $ do+getPhysicalDeviceFormatProperties2 :: forall a io . (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> Format -> io (FormatProperties2 a)+getPhysicalDeviceFormatProperties2 physicalDevice format = liftIO . evalContT $ do let vkGetPhysicalDeviceFormatProperties2' = mkVkGetPhysicalDeviceFormatProperties2 (pVkGetPhysicalDeviceFormatProperties2 (instanceCmds (physicalDevice :: PhysicalDevice))) pPFormatProperties <- ContT (withZeroCStruct @(FormatProperties2 _)) lift $ vkGetPhysicalDeviceFormatProperties2' (physicalDeviceHandle (physicalDevice)) (format) (pPFormatProperties)@@ -336,8 +336,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the image capabilities.+-- - @physicalDevice@ is the physical device from which to query the+-- image capabilities. -- -- - @pImageFormatInfo@ is a pointer to a -- 'PhysicalDeviceImageFormatInfo2' structure describing the parameters@@ -365,7 +365,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pImageFormatInfo@ /must/ be a valid pointer to a valid@@ -393,8 +393,8 @@ -- 'ImageFormatProperties2', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceImageFormatInfo2'-getPhysicalDeviceImageFormatProperties2 :: (PokeChain a, PokeChain b, PeekChain b) => PhysicalDevice -> PhysicalDeviceImageFormatInfo2 a -> IO (ImageFormatProperties2 b)-getPhysicalDeviceImageFormatProperties2 physicalDevice imageFormatInfo = evalContT $ do+getPhysicalDeviceImageFormatProperties2 :: forall a b io . (PokeChain a, PokeChain b, PeekChain b, MonadIO io) => PhysicalDevice -> PhysicalDeviceImageFormatInfo2 a -> io (ImageFormatProperties2 b)+getPhysicalDeviceImageFormatProperties2 physicalDevice imageFormatInfo = liftIO . evalContT $ do let vkGetPhysicalDeviceImageFormatProperties2' = mkVkGetPhysicalDeviceImageFormatProperties2 (pVkGetPhysicalDeviceImageFormatProperties2 (instanceCmds (physicalDevice :: PhysicalDevice))) pImageFormatInfo <- ContT $ withCStruct (imageFormatInfo) pPImageFormatProperties <- ContT (withZeroCStruct @(ImageFormatProperties2 _))@@ -416,8 +416,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the handle to the--- physical device whose properties will be queried.+-- - @physicalDevice@ is the handle to the physical device whose+-- properties will be queried. -- -- - @pQueueFamilyPropertyCount@ is a pointer to an integer related to -- the number of queue families available or queried, as described in@@ -435,7 +435,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pQueueFamilyPropertyCount@ /must/ be a valid pointer to a@@ -450,8 +450,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'QueueFamilyProperties2'-getPhysicalDeviceQueueFamilyProperties2 :: (PokeChain a, PeekChain a) => PhysicalDevice -> IO (("queueFamilyProperties" ::: Vector (QueueFamilyProperties2 a)))-getPhysicalDeviceQueueFamilyProperties2 physicalDevice = evalContT $ do+getPhysicalDeviceQueueFamilyProperties2 :: forall a io . (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> io (("queueFamilyProperties" ::: Vector (QueueFamilyProperties2 a)))+getPhysicalDeviceQueueFamilyProperties2 physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceQueueFamilyProperties2' = mkVkGetPhysicalDeviceQueueFamilyProperties2 (pVkGetPhysicalDeviceQueueFamilyProperties2 (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPQueueFamilyPropertyCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -477,8 +477,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the handle to the--- device to query.+-- - @physicalDevice@ is the handle to the device to query. -- -- - @pMemoryProperties@ is a pointer to a -- 'PhysicalDeviceMemoryProperties2' structure in which the properties@@ -497,8 +496,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceMemoryProperties2'-getPhysicalDeviceMemoryProperties2 :: (PokeChain a, PeekChain a) => PhysicalDevice -> IO (PhysicalDeviceMemoryProperties2 a)-getPhysicalDeviceMemoryProperties2 physicalDevice = evalContT $ do+getPhysicalDeviceMemoryProperties2 :: forall a io . (PokeChain a, PeekChain a, MonadIO io) => PhysicalDevice -> io (PhysicalDeviceMemoryProperties2 a)+getPhysicalDeviceMemoryProperties2 physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceMemoryProperties2' = mkVkGetPhysicalDeviceMemoryProperties2 (pVkGetPhysicalDeviceMemoryProperties2 (instanceCmds (physicalDevice :: PhysicalDevice))) pPMemoryProperties <- ContT (withZeroCStruct @(PhysicalDeviceMemoryProperties2 _)) lift $ vkGetPhysicalDeviceMemoryProperties2' (physicalDeviceHandle (physicalDevice)) (pPMemoryProperties)@@ -518,8 +517,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the sparse image capabilities.+-- - @physicalDevice@ is the physical device from which to query the+-- sparse image capabilities. -- -- - @pFormatInfo@ is a pointer to a -- 'PhysicalDeviceSparseImageFormatInfo2' structure containing input@@ -540,7 +539,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pFormatInfo@ /must/ be a valid pointer to a valid@@ -557,8 +556,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceSparseImageFormatInfo2', 'SparseImageFormatProperties2'-getPhysicalDeviceSparseImageFormatProperties2 :: PhysicalDevice -> PhysicalDeviceSparseImageFormatInfo2 -> IO (("properties" ::: Vector SparseImageFormatProperties2))-getPhysicalDeviceSparseImageFormatProperties2 physicalDevice formatInfo = evalContT $ do+getPhysicalDeviceSparseImageFormatProperties2 :: forall io . MonadIO io => PhysicalDevice -> PhysicalDeviceSparseImageFormatInfo2 -> io (("properties" ::: Vector SparseImageFormatProperties2))+getPhysicalDeviceSparseImageFormatProperties2 physicalDevice formatInfo = liftIO . evalContT $ do let vkGetPhysicalDeviceSparseImageFormatProperties2' = mkVkGetPhysicalDeviceSparseImageFormatProperties2 (pVkGetPhysicalDeviceSparseImageFormatProperties2 (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pFormatInfo <- ContT $ withCStruct (formatInfo)@@ -877,7 +876,7 @@ data FormatProperties2 (es :: [Type]) = FormatProperties2 { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.DeviceInitialization.FormatProperties' is a+ , -- | @formatProperties@ is a -- 'Graphics.Vulkan.Core10.DeviceInitialization.FormatProperties' structure -- describing features supported by the requested format. formatProperties :: FormatProperties@@ -933,20 +932,16 @@ -- If the combination of parameters to -- 'getPhysicalDeviceImageFormatProperties2' is not supported by the -- implementation for use in 'Graphics.Vulkan.Core10.Image.createImage',--- then all members of--- 'Graphics.Vulkan.Core10.DeviceInitialization.ImageFormatProperties' will--- be filled with zero.+-- then all members of @imageFormatProperties@ will be filled with zero. -- -- Note ----- Filling--- 'Graphics.Vulkan.Core10.DeviceInitialization.ImageFormatProperties' with--- zero for unsupported formats is an exception to the usual rule that--- output structures have undefined contents on error. This exception was--- unintentional, but is preserved for backwards compatibility. This--- exeption only applies to--- 'Graphics.Vulkan.Core10.DeviceInitialization.ImageFormatProperties', not--- @sType@, @pNext@, or any structures chained from @pNext@.+-- Filling @imageFormatProperties@ with zero for unsupported formats is an+-- exception to the usual rule that output structures have undefined+-- contents on error. This exception was unintentional, but is preserved+-- for backwards compatibility. This exeption only applies to+-- @imageFormatProperties@, not @sType@, @pNext@, or any structures chained+-- from @pNext@. -- -- == Valid Usage (Implicit) --@@ -978,7 +973,7 @@ -- specification of additional capabilities to be returned from -- 'getPhysicalDeviceImageFormatProperties2'. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.DeviceInitialization.ImageFormatProperties' is a+ , -- | @imageFormatProperties@ is a -- 'Graphics.Vulkan.Core10.DeviceInitialization.ImageFormatProperties' -- structure in which capabilities are returned. imageFormatProperties :: ImageFormatProperties@@ -1049,7 +1044,7 @@ -- -- - If @tiling@ is -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT'--- and 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- and @flags@ contains -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT', -- then the @pNext@ chain /must/ include a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'@@ -1073,7 +1068,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be a valid+-- - @format@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value -- -- - @type@ /must/ be a valid@@ -1088,8 +1083,7 @@ -- -- - @usage@ /must/ not be @0@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlagBits' -- values --@@ -1109,14 +1103,13 @@ -- additional image parameters to -- 'getPhysicalDeviceImageFormatProperties2'. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.Enums.Format.Format' is a- -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value indicating the image- -- format, corresponding to- -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.Enums.Format.Format'.+ , -- | @format@ is a 'Graphics.Vulkan.Core10.Enums.Format.Format' value+ -- indicating the image format, corresponding to+ -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@format@. format :: Format , -- | @type@ is a 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' value -- indicating the image type, corresponding to- -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.Enums.ImageType.ImageType'.+ -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@imageType@. type' :: ImageType , -- | @tiling@ is a 'Graphics.Vulkan.Core10.Enums.ImageTiling.ImageTiling' -- value indicating the image tiling, corresponding to@@ -1127,10 +1120,10 @@ -- indicating the intended usage of the image, corresponding to -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@usage@. usage :: ImageUsageFlags- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlagBits' -- indicating additional parameters of the image, corresponding to- -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'.+ -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@. flags :: ImageCreateFlags } deriving (Typeable)@@ -1218,7 +1211,7 @@ data QueueFamilyProperties2 (es :: [Type]) = QueueFamilyProperties2 { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.DeviceInitialization.QueueFamilyProperties' is a+ , -- | @queueFamilyProperties@ is a -- 'Graphics.Vulkan.Core10.DeviceInitialization.QueueFamilyProperties' -- structure which is populated with the same values as in -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceQueueFamilyProperties'.@@ -1401,8 +1394,8 @@ -- 'getPhysicalDeviceSparseImageFormatProperties2', -- 'Graphics.Vulkan.Extensions.VK_KHR_get_physical_device_properties2.getPhysicalDeviceSparseImageFormatProperties2KHR' data PhysicalDeviceSparseImageFormatInfo2 = PhysicalDeviceSparseImageFormatInfo2- { -- | 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be a valid- -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value+ { -- | @format@ /must/ be a valid 'Graphics.Vulkan.Core10.Enums.Format.Format'+ -- value format :: Format , -- | @type@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType' value
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_maintenance1.hs view
@@ -8,6 +8,8 @@ , FormatFeatureFlags ) where +import Control.Monad.IO.Class (liftIO)+import Control.Monad.IO.Class (MonadIO) import Foreign.Ptr (FunPtr) import Foreign.Ptr (Ptr) import Graphics.Vulkan.Core10.Handles (CommandPool)@@ -35,13 +37,11 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the command pool.+-- - @device@ is the logical device that owns the command pool. ----- - 'Graphics.Vulkan.Core10.Handles.CommandPool' is the command pool to--- trim.+-- - @commandPool@ is the command pool to trim. ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+-- - @flags@ is reserved for future use. -- -- = Description --@@ -86,30 +86,28 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/ be a valid+-- - @commandPool@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandPool' handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ ----- - 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/ have been--- created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - @commandPool@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandPool' /must/--- be externally synchronized+-- - Host access to @commandPool@ /must/ be externally synchronized -- -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandPool', -- 'Graphics.Vulkan.Core11.Enums.CommandPoolTrimFlags.CommandPoolTrimFlags', -- 'Graphics.Vulkan.Core10.Handles.Device'-trimCommandPool :: Device -> CommandPool -> CommandPoolTrimFlags -> IO ()-trimCommandPool device commandPool flags = do+trimCommandPool :: forall io . MonadIO io => Device -> CommandPool -> CommandPoolTrimFlags -> io ()+trimCommandPool device commandPool flags = liftIO $ do let vkTrimCommandPool' = mkVkTrimCommandPool (pVkTrimCommandPool (deviceCmds (device :: Device))) vkTrimCommandPool' (deviceHandle (device)) (commandPool) (flags) pure $ ()
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_maintenance2.hs view
@@ -187,8 +187,7 @@ -- 'Graphics.Vulkan.Core11.Enums.PointClippingBehavior.PointClippingBehavior', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PhysicalDevicePointClippingProperties = PhysicalDevicePointClippingProperties- { -- | 'Graphics.Vulkan.Core11.Enums.PointClippingBehavior.PointClippingBehavior'- -- is a+ { -- | @pointClippingBehavior@ is a -- 'Graphics.Vulkan.Core11.Enums.PointClippingBehavior.PointClippingBehavior' -- value specifying the point clipping behavior supported by the -- implementation.
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_maintenance3.hs view
@@ -5,6 +5,7 @@ , StructureType(..) ) where +import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import GHC.Ptr (castPtr)@@ -12,6 +13,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -61,8 +63,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- would create the descriptor set layout.+-- - @device@ is the logical device that would create the descriptor set+-- layout. -- -- - @pCreateInfo@ is a pointer to a -- 'Graphics.Vulkan.Core10.DescriptorSet.DescriptorSetLayoutCreateInfo'@@ -108,8 +110,8 @@ -- -- 'Graphics.Vulkan.Core10.DescriptorSet.DescriptorSetLayoutCreateInfo', -- 'DescriptorSetLayoutSupport', 'Graphics.Vulkan.Core10.Handles.Device'-getDescriptorSetLayoutSupport :: (PokeChain a, PokeChain b, PeekChain b) => Device -> DescriptorSetLayoutCreateInfo a -> IO (DescriptorSetLayoutSupport b)-getDescriptorSetLayoutSupport device createInfo = evalContT $ do+getDescriptorSetLayoutSupport :: forall a b io . (PokeChain a, PokeChain b, PeekChain b, MonadIO io) => Device -> DescriptorSetLayoutCreateInfo a -> io (DescriptorSetLayoutSupport b)+getDescriptorSetLayoutSupport device createInfo = liftIO . evalContT $ do let vkGetDescriptorSetLayoutSupport' = mkVkGetDescriptorSetLayoutSupport (pVkGetDescriptorSetLayoutSupport (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pPSupport <- ContT (withZeroCStruct @(DescriptorSetLayoutSupport _))
src/Graphics/Vulkan/Core11/Promoted_From_VK_KHR_sampler_ycbcr_conversion.hs view
@@ -24,6 +24,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -35,6 +36,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -113,8 +115,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the sampler Y′CBCR conversion.+-- - @device@ is the logical device that creates the sampler Y′CBCR+-- conversion. -- -- - @pCreateInfo@ is a pointer to a 'SamplerYcbcrConversionCreateInfo' -- structure specifying the requested sampler Y′CBCR conversion.@@ -144,8 +146,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'SamplerYcbcrConversionCreateInfo' structure@@ -176,8 +178,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core11.Handles.SamplerYcbcrConversion', -- 'SamplerYcbcrConversionCreateInfo'-createSamplerYcbcrConversion :: PokeChain a => Device -> SamplerYcbcrConversionCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SamplerYcbcrConversion)-createSamplerYcbcrConversion device createInfo allocator = evalContT $ do+createSamplerYcbcrConversion :: forall a io . (PokeChain a, MonadIO io) => Device -> SamplerYcbcrConversionCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SamplerYcbcrConversion)+createSamplerYcbcrConversion device createInfo allocator = liftIO . evalContT $ do let vkCreateSamplerYcbcrConversion' = mkVkCreateSamplerYcbcrConversion (pVkCreateSamplerYcbcrConversion (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -193,11 +195,11 @@ -- 'destroySamplerYcbcrConversion' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withSamplerYcbcrConversion :: PokeChain a => Device -> SamplerYcbcrConversionCreateInfo a -> Maybe AllocationCallbacks -> (SamplerYcbcrConversion -> IO r) -> IO r-withSamplerYcbcrConversion device samplerYcbcrConversionCreateInfo allocationCallbacks =+withSamplerYcbcrConversion :: forall a r . PokeChain a => Device -> SamplerYcbcrConversionCreateInfo a -> Maybe AllocationCallbacks -> ((SamplerYcbcrConversion) -> IO r) -> IO r+withSamplerYcbcrConversion device pCreateInfo pAllocator = bracket- (createSamplerYcbcrConversion device samplerYcbcrConversionCreateInfo allocationCallbacks)- (\o -> destroySamplerYcbcrConversion device o allocationCallbacks)+ (createSamplerYcbcrConversion device pCreateInfo pAllocator)+ (\(o0) -> destroySamplerYcbcrConversion device o0 pAllocator) foreign import ccall@@ -211,8 +213,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the Y′CBCR conversion.+-- - @device@ is the logical device that destroys the Y′CBCR conversion. -- -- - @ycbcrConversion@ is the conversion to destroy. --@@ -222,8 +223,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - If @ycbcrConversion@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @ycbcrConversion@@@ -236,7 +237,7 @@ -- structure -- -- - If @ycbcrConversion@ is a valid handle, it /must/ have been created,--- allocated, or retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- allocated, or retrieved from @device@ -- -- == Host Synchronization --@@ -247,8 +248,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core11.Handles.SamplerYcbcrConversion'-destroySamplerYcbcrConversion :: Device -> SamplerYcbcrConversion -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroySamplerYcbcrConversion device ycbcrConversion allocator = evalContT $ do+destroySamplerYcbcrConversion :: forall io . MonadIO io => Device -> SamplerYcbcrConversion -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroySamplerYcbcrConversion device ycbcrConversion allocator = liftIO . evalContT $ do let vkDestroySamplerYcbcrConversion' = mkVkDestroySamplerYcbcrConversion (pVkDestroySamplerYcbcrConversion (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -317,7 +318,7 @@ -- on implementations where explicit reconstruction is not the default mode -- of operation. ----- If 'Graphics.Vulkan.Core10.Enums.Format.Format' supports+-- If @format@ supports -- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT' -- the @forceExplicitReconstruction@ value behaves as if it was set to -- 'Graphics.Vulkan.Core10.BaseType.TRUE'.@@ -326,7 +327,7 @@ -- 'Graphics.Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID' -- structure with non-zero @externalFormat@ member, the sampler Y′CBCR -- conversion object represents an /external format conversion/, and--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be+-- @format@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED'. Such conversions -- /must/ only be used to sample image views with a matching -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-external-android-hardware-buffer-external-formats external format>.@@ -335,13 +336,12 @@ -- -- == Valid Usage ----- - If an external format conversion is being created,--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED', otherwise it--- /must/ not be+-- - If an external format conversion is being created, @format@ /must/+-- be 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED', otherwise+-- it /must/ not be -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED'. ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ support+-- - @format@ /must/ support -- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT' -- or -- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT'@@ -356,9 +356,8 @@ -- @xChromaOffset@ and @yChromaOffset@ /must/ not be -- 'Graphics.Vulkan.Core11.Enums.ChromaLocation.CHROMA_LOCATION_MIDPOINT' ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ represent--- unsigned normalized values (i.e. the format must be a @UNORM@--- format)+-- - @format@ /must/ represent unsigned normalized values (i.e. the+-- format must be a @UNORM@ format) -- -- - If the format has a @_422@ or @_420@ suffix, then @components.g@ -- /must/ be@@ -392,9 +391,8 @@ -- - If @ycbcrModel@ is not -- 'Graphics.Vulkan.Core11.Enums.SamplerYcbcrModelConversion.SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY', -- then @components.r@, @components.g@, and @components.b@ /must/--- correspond to channels of the--- 'Graphics.Vulkan.Core10.Enums.Format.Format'; that is,--- @components.r@, @components.g@, and @components.b@ /must/ not be+-- correspond to channels of the @format@; that is, @components.r@,+-- @components.g@, and @components.b@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ComponentSwizzle.COMPONENT_SWIZZLE_ZERO' -- or -- 'Graphics.Vulkan.Core10.Enums.ComponentSwizzle.COMPONENT_SWIZZLE_ONE',@@ -405,8 +403,8 @@ -- - If @ycbcrRange@ is -- 'Graphics.Vulkan.Core11.Enums.SamplerYcbcrRange.SAMPLER_YCBCR_RANGE_ITU_NARROW' -- then the R, G and B channels obtained by applying the @component@--- swizzle to 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ each--- have a bit-depth greater than or equal to 8.+-- swizzle to @format@ /must/ each have a bit-depth greater than or+-- equal to 8. -- -- - If the format does not support -- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT'@@ -429,7 +427,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be a valid+-- - @format@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value -- -- - @ycbcrModel@ /must/ be a valid@@ -477,8 +475,8 @@ data SamplerYcbcrConversionCreateInfo (es :: [Type]) = SamplerYcbcrConversionCreateInfo { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.Enums.Format.Format' is the format of the image- -- from which color information will be retrieved.+ , -- | @format@ is the format of the image from which color information will be+ -- retrieved. format :: Format , -- | @ycbcrModel@ describes the color matrix for conversion between color -- models.@@ -606,7 +604,7 @@ -- less than the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkDrmFormatModifierPropertiesEXT drmFormatModifierPlaneCount> -- associated with the image’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageCreateInfo >+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageCreateInfo format> -- and -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageDrmFormatModifierPropertiesEXT drmFormatModifier>.) --@@ -687,7 +685,7 @@ -- less than the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkDrmFormatModifierPropertiesEXT drmFormatModifierPlaneCount> -- associated with the image’s--- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageCreateInfo >+-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageCreateInfo format> -- and -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkImageDrmFormatModifierPropertiesEXT drmFormatModifier>.) --@@ -757,13 +755,11 @@ -- 'Graphics.Vulkan.Core10.BaseType.Bool32', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PhysicalDeviceSamplerYcbcrConversionFeatures = PhysicalDeviceSamplerYcbcrConversionFeatures- { -- | 'Graphics.Vulkan.Core11.Handles.SamplerYcbcrConversion' specifies- -- whether the implementation supports+ { -- | @samplerYcbcrConversion@ specifies whether the implementation supports -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#samplers-YCbCr-conversion sampler Y′CBCR conversion>.- -- If 'Graphics.Vulkan.Core11.Handles.SamplerYcbcrConversion' is- -- 'Graphics.Vulkan.Core10.BaseType.FALSE', sampler Y′CBCR conversion is- -- not supported, and samplers using sampler Y′CBCR conversion /must/ not- -- be used.+ -- If @samplerYcbcrConversion@ is 'Graphics.Vulkan.Core10.BaseType.FALSE',+ -- sampler Y′CBCR conversion is not supported, and samplers using sampler+ -- Y′CBCR conversion /must/ not be used. samplerYcbcrConversion :: Bool } deriving (Typeable) deriving instance Show PhysicalDeviceSamplerYcbcrConversionFeatures
src/Graphics/Vulkan/Core12.hs view
@@ -191,13 +191,11 @@ variablePointers :: Bool , -- | @protectedMemory@ specifies whether protected memory is supported. protectedMemory :: Bool- , -- | 'Graphics.Vulkan.Core11.Handles.SamplerYcbcrConversion' specifies- -- whether the implementation supports+ , -- | @samplerYcbcrConversion@ specifies whether the implementation supports -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#samplers-YCbCr-conversion sampler Y′CBCR conversion>.- -- If 'Graphics.Vulkan.Core11.Handles.SamplerYcbcrConversion' is- -- 'Graphics.Vulkan.Core10.BaseType.FALSE', sampler Y′CBCR conversion is- -- not supported, and samplers using sampler Y′CBCR conversion /must/ not- -- be used.+ -- If @samplerYcbcrConversion@ is 'Graphics.Vulkan.Core10.BaseType.FALSE',+ -- sampler Y′CBCR conversion is not supported, and samplers using sampler+ -- Y′CBCR conversion /must/ not be used. samplerYcbcrConversion :: Bool , -- | @shaderDrawParameters@ specifies whether shader draw parameters are -- supported.@@ -357,8 +355,7 @@ -- are available in all stages, or are restricted to fragment and compute -- stages. subgroupQuadOperationsInAllStages :: Bool- , -- | 'Graphics.Vulkan.Core11.Enums.PointClippingBehavior.PointClippingBehavior'- -- /must/ be a valid+ , -- | @pointClippingBehavior@ /must/ be a valid -- 'Graphics.Vulkan.Core11.Enums.PointClippingBehavior.PointClippingBehavior' -- value pointClippingBehavior :: PointClippingBehavior@@ -1213,9 +1210,8 @@ , -- | @driverInfo@ /must/ be a null-terminated UTF-8 string whose length is -- less than or equal to VK_MAX_DRIVER_INFO_SIZE driverInfo :: ByteString- , -- | 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_driver_properties.ConformanceVersion'- -- is the version of the Vulkan conformance test this driver is conformant- -- against (see+ , -- | @conformanceVersion@ is the version of the Vulkan conformance test this+ -- driver is conformant against (see -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_driver_properties.ConformanceVersion'). conformanceVersion :: ConformanceVersion , -- | @denormBehaviorIndependence@ /must/ be a valid
src/Graphics/Vulkan/Core12/Promoted_From_VK_EXT_descriptor_indexing.hs view
@@ -678,7 +678,7 @@ -- 'Graphics.Vulkan.Core10.DescriptorSet.DescriptorSetLayoutCreateInfo'::@bindingCount@ -- -- - If--- 'Graphics.Vulkan.Core10.DescriptorSet.DescriptorSetLayoutCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'+-- 'Graphics.Vulkan.Core10.DescriptorSet.DescriptorSetLayoutCreateInfo'::@flags@ -- includes -- 'Graphics.Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR', -- then all elements of @pBindingFlags@ /must/ not include@@ -770,9 +770,7 @@ -- -- - If an element of @pBindingFlags@ includes -- 'Graphics.Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT',--- that element’s--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' /must/--- not be+-- that element’s @descriptorType@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'
src/Graphics/Vulkan/Core12/Promoted_From_VK_EXT_host_query_reset.hs view
@@ -4,9 +4,11 @@ , StructureType(..) ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Ptr (nullPtr) import Foreign.Ptr (plusPtr)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -45,11 +47,10 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the query pool.+-- - @device@ is the logical device that owns the query pool. ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' is the handle of the--- query pool managing the queries being reset.+-- - @queryPool@ is the handle of the query pool managing the queries+-- being reset. -- -- - @firstQuery@ is the initial query index to reset. --@@ -60,7 +61,7 @@ -- This command sets the status of query indices [@firstQuery@, -- @firstQuery@ + @queryCount@ - 1] to unavailable. ----- If 'Graphics.Vulkan.Core10.Handles.QueryPool' is+-- If @queryPool@ is -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR' -- this command sets the status of query indices [@firstQuery@, -- @firstQuery@ + @queryCount@ - 1] to unavailable for each pass.@@ -72,38 +73,36 @@ -- feature /must/ be enabled -- -- - @firstQuery@ /must/ be less than the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'+-- @queryPool@ -- -- - The sum of @firstQuery@ and @queryCount@ /must/ be less than or--- equal to the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'+-- equal to the number of queries in @queryPool@ -- -- - Submitted commands that refer to the range specified by @firstQuery@--- and @queryCount@ in 'Graphics.Vulkan.Core10.Handles.QueryPool'--- /must/ have completed execution+-- and @queryCount@ in @queryPool@ /must/ have completed execution -- -- - The range of queries specified by @firstQuery@ and @queryCount@ in--- 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ not be in use by--- calls to 'Graphics.Vulkan.Core10.Query.getQueryPoolResults' or+-- @queryPool@ /must/ not be in use by calls to+-- 'Graphics.Vulkan.Core10.Query.getQueryPoolResults' or -- 'resetQueryPool' in other threads -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ be a valid+-- - @queryPool@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been created,--- allocated, or retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- - @queryPool@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.QueryPool'-resetQueryPool :: Device -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> IO ()-resetQueryPool device queryPool firstQuery queryCount = do+resetQueryPool :: forall io . MonadIO io => Device -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> io ()+resetQueryPool device queryPool firstQuery queryCount = liftIO $ do let vkResetQueryPool' = mkVkResetQueryPool (pVkResetQueryPool (deviceCmds (device :: Device))) vkResetQueryPool' (deviceHandle (device)) (queryPool) (firstQuery) (queryCount) pure $ ()
src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_buffer_device_address.hs view
@@ -17,11 +17,13 @@ , MemoryAllocateFlags ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Ptr (nullPtr) import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -75,8 +77,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- the buffer was created on.+-- - @device@ is the logical device that the buffer was created on. -- -- - @pInfo@ is a pointer to a 'BufferDeviceAddressInfo' structure -- specifying the buffer to retrieve an address for.@@ -96,15 +97,14 @@ -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-bufferDeviceAddress bufferDeviceAddress> -- feature /must/ be enabled ----- - If 'Graphics.Vulkan.Core10.Handles.Device' was created with multiple--- physical devices, then the+-- - If @device@ was created with multiple physical devices, then the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-bufferDeviceAddressMultiDevice bufferDeviceAddressMultiDevice> -- feature /must/ be enabled -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pInfo@ /must/ be a valid pointer to a valid -- 'BufferDeviceAddressInfo' structure@@ -112,8 +112,8 @@ -- = See Also -- -- 'BufferDeviceAddressInfo', 'Graphics.Vulkan.Core10.Handles.Device'-getBufferOpaqueCaptureAddress :: Device -> BufferDeviceAddressInfo -> IO (Word64)-getBufferOpaqueCaptureAddress device info = evalContT $ do+getBufferOpaqueCaptureAddress :: forall io . MonadIO io => Device -> BufferDeviceAddressInfo -> io (Word64)+getBufferOpaqueCaptureAddress device info = liftIO . evalContT $ do let vkGetBufferOpaqueCaptureAddress' = mkVkGetBufferOpaqueCaptureAddress (pVkGetBufferOpaqueCaptureAddress (deviceCmds (device :: Device))) pInfo <- ContT $ withCStruct (info) r <- lift $ vkGetBufferOpaqueCaptureAddress' (deviceHandle (device)) pInfo@@ -131,8 +131,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- the buffer was created on.+-- - @device@ is the logical device that the buffer was created on. -- -- - @pInfo@ is a pointer to a 'BufferDeviceAddressInfo' structure -- specifying the buffer to retrieve an address for.@@ -154,7 +153,7 @@ -- -- If the buffer was created with a non-zero value of -- 'BufferOpaqueCaptureAddressCreateInfo'::@opaqueCaptureAddress@ or--- 'Graphics.Vulkan.Extensions.VK_EXT_buffer_device_address.BufferDeviceAddressCreateInfoEXT'::'Graphics.Vulkan.Core10.BaseType.DeviceAddress'+-- 'Graphics.Vulkan.Extensions.VK_EXT_buffer_device_address.BufferDeviceAddressCreateInfoEXT'::@deviceAddress@ -- the return value will be the same address that was returned at capture -- time. --@@ -166,8 +165,7 @@ -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-bufferDeviceAddressEXT ::bufferDeviceAddress> -- feature /must/ be enabled ----- - If 'Graphics.Vulkan.Core10.Handles.Device' was created with multiple--- physical devices, then the+-- - If @device@ was created with multiple physical devices, then the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-bufferDeviceAddressMultiDevice bufferDeviceAddressMultiDevice> -- or -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-bufferDeviceAddressMultiDeviceEXT ::bufferDeviceAddressMultiDevice>@@ -175,8 +173,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pInfo@ /must/ be a valid pointer to a valid -- 'BufferDeviceAddressInfo' structure@@ -184,8 +182,8 @@ -- = See Also -- -- 'BufferDeviceAddressInfo', 'Graphics.Vulkan.Core10.Handles.Device'-getBufferDeviceAddress :: Device -> BufferDeviceAddressInfo -> IO (DeviceAddress)-getBufferDeviceAddress device info = evalContT $ do+getBufferDeviceAddress :: forall io . MonadIO io => Device -> BufferDeviceAddressInfo -> io (DeviceAddress)+getBufferDeviceAddress device info = liftIO . evalContT $ do let vkGetBufferDeviceAddress' = mkVkGetBufferDeviceAddress (pVkGetBufferDeviceAddress (deviceCmds (device :: Device))) pInfo <- ContT $ withCStruct (info) r <- lift $ vkGetBufferDeviceAddress' (deviceHandle (device)) pInfo@@ -204,8 +202,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- the memory object was allocated on.+-- - @device@ is the logical device that the memory object was allocated+-- on. -- -- - @pInfo@ is a pointer to a 'DeviceMemoryOpaqueCaptureAddressInfo' -- structure specifying the memory object to retrieve an address for.@@ -231,15 +229,14 @@ -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-bufferDeviceAddress bufferDeviceAddress> -- feature /must/ be enabled ----- - If 'Graphics.Vulkan.Core10.Handles.Device' was created with multiple--- physical devices, then the+-- - If @device@ was created with multiple physical devices, then the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-bufferDeviceAddressMultiDevice bufferDeviceAddressMultiDevice> -- feature /must/ be enabled -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pInfo@ /must/ be a valid pointer to a valid -- 'DeviceMemoryOpaqueCaptureAddressInfo' structure@@ -248,8 +245,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'DeviceMemoryOpaqueCaptureAddressInfo'-getDeviceMemoryOpaqueCaptureAddress :: Device -> DeviceMemoryOpaqueCaptureAddressInfo -> IO (Word64)-getDeviceMemoryOpaqueCaptureAddress device info = evalContT $ do+getDeviceMemoryOpaqueCaptureAddress :: forall io . MonadIO io => Device -> DeviceMemoryOpaqueCaptureAddressInfo -> io (Word64)+getDeviceMemoryOpaqueCaptureAddress device info = liftIO . evalContT $ do let vkGetDeviceMemoryOpaqueCaptureAddress' = mkVkGetDeviceMemoryOpaqueCaptureAddress (pVkGetDeviceMemoryOpaqueCaptureAddress (deviceCmds (device :: Device))) pInfo <- ContT $ withCStruct (info) r <- lift $ vkGetDeviceMemoryOpaqueCaptureAddress' (deviceHandle (device)) pInfo@@ -352,14 +349,12 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is non-sparse and was not--- created with the+-- - If @buffer@ is non-sparse and was not created with the -- 'Graphics.Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT' -- flag, then it /must/ be bound completely and contiguously to a -- single 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ have been created--- with+-- - @buffer@ /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT' -- -- == Valid Usage (Implicit)@@ -369,8 +364,8 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle -- -- = See Also --@@ -382,8 +377,7 @@ -- 'getBufferOpaqueCaptureAddress', -- 'Graphics.Vulkan.Extensions.VK_KHR_buffer_device_address.getBufferOpaqueCaptureAddressKHR' data BufferDeviceAddressInfo = BufferDeviceAddressInfo- { -- | 'Graphics.Vulkan.Core10.Handles.Buffer' specifies the buffer whose- -- address is being queried.+ { -- | @buffer@ specifies the buffer whose address is being queried. buffer :: Buffer } deriving (Typeable) deriving instance Show BufferDeviceAddressInfo
src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_create_renderpass2.hs view
@@ -1,6 +1,7 @@ {-# language CPP #-} module Graphics.Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2 ( createRenderPass2 , cmdBeginRenderPass2+ , cmdWithRenderPass2 , cmdNextSubpass2 , cmdEndRenderPass2 , AttachmentDescription2(..)@@ -14,7 +15,9 @@ ) where import Control.Exception.Base (bracket)+import Control.Exception.Base (bracket_) import Control.Monad (unless)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -31,6 +34,7 @@ import qualified Data.Vector (imapM_) import qualified Data.Vector (length) import qualified Data.Vector (null)+import Control.Monad.IO.Class (MonadIO) import Data.Either (Either) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable)@@ -122,8 +126,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the render pass.+-- - @device@ is the logical device that creates the render pass. -- -- - @pCreateInfo@ is a pointer to a 'RenderPassCreateInfo2' structure -- describing the parameters of the render pass.@@ -145,8 +148,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'RenderPassCreateInfo2' structure@@ -176,8 +179,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.RenderPass', 'RenderPassCreateInfo2'-createRenderPass2 :: PokeChain a => Device -> RenderPassCreateInfo2 a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (RenderPass)-createRenderPass2 device createInfo allocator = evalContT $ do+createRenderPass2 :: forall a io . (PokeChain a, MonadIO io) => Device -> RenderPassCreateInfo2 a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (RenderPass)+createRenderPass2 device createInfo allocator = liftIO . evalContT $ do let vkCreateRenderPass2' = mkVkCreateRenderPass2 (pVkCreateRenderPass2 (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -201,8 +204,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- in which to record the command.+-- - @commandBuffer@ is the command buffer in which to record the+-- command. -- -- - @pRenderPassBegin@ is a pointer to a -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.RenderPassBeginInfo'@@ -220,24 +223,21 @@ -- -- == Valid Usage ----- - Both the 'Graphics.Vulkan.Core10.Handles.Framebuffer' and--- 'Graphics.Vulkan.Core10.Handles.RenderPass' members of+-- - Both the @framebuffer@ and @renderPass@ members of -- @pRenderPassBegin@ /must/ have been created on the same--- 'Graphics.Vulkan.Core10.Handles.Device' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated on+-- 'Graphics.Vulkan.Core10.Handles.Device' that @commandBuffer@ was+-- allocated on -- -- - If any of the @initialLayout@ or @finalLayout@ member of the -- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures or -- the @layout@ member of the -- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures -- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is+-- @renderPass@ member of @pRenderPassBegin@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL' -- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_COLOR_ATTACHMENT_BIT' -- -- - If any of the @initialLayout@ or @finalLayout@ member of the@@ -245,17 +245,15 @@ -- the @layout@ member of the -- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures -- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is+-- @renderPass@ member of @pRenderPassBegin@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL', -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL' -- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' -- -- - If any of the @initialLayout@ or @finalLayout@ member of the@@ -263,8 +261,7 @@ -- the @layout@ member of the -- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures -- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is+-- @renderPass@ member of @pRenderPassBegin@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL', -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL',@@ -272,9 +269,8 @@ -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' -- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' -- -- - If any of the @stencilInitialLayout@ or @stencilFinalLayout@ member@@ -283,15 +279,13 @@ -- structures or the @stencilLayout@ member of the -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_separate_depth_stencil_layouts.AttachmentReferenceStencilLayout' -- structures specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is+-- @renderPass@ member of @pRenderPassBegin@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL', -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' -- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' -- -- - If any of the @initialLayout@ or @finalLayout@ member of the@@ -299,13 +293,11 @@ -- the @layout@ member of the -- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures -- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is+-- @renderPass@ member of @pRenderPassBegin@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL' -- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_INPUT_ATTACHMENT_BIT'@@ -315,13 +307,11 @@ -- the @layout@ member of the -- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures -- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is+-- @renderPass@ member of @pRenderPassBegin@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL' -- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_SRC_BIT' -- -- - If any of the @initialLayout@ or @finalLayout@ member of the@@ -329,48 +319,41 @@ -- the @layout@ member of the -- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' structures -- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is+-- @renderPass@ member of @pRenderPassBegin@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL' -- then the corresponding attachment image view of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@ /must/ have been created with a @usage@ value--- including+-- specified in the @framebuffer@ member of @pRenderPassBegin@ /must/+-- have been created with a @usage@ value including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_TRANSFER_DST_BIT' -- -- - If any of the @initialLayout@ members of the -- 'Graphics.Vulkan.Core10.Pass.AttachmentDescription' structures -- specified when creating the render pass specified in the--- 'Graphics.Vulkan.Core10.Handles.RenderPass' member of--- @pRenderPassBegin@ is not+-- @renderPass@ member of @pRenderPassBegin@ is not -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_UNDEFINED', -- then each such @initialLayout@ /must/ be equal to the current layout -- of the corresponding attachment image subresource of the framebuffer--- specified in the 'Graphics.Vulkan.Core10.Handles.Framebuffer' member--- of @pRenderPassBegin@+-- specified in the @framebuffer@ member of @pRenderPassBegin@ -- -- - The @srcStageMask@ and @dstStageMask@ members of any element of the -- @pDependencies@ member of -- 'Graphics.Vulkan.Core10.Pass.RenderPassCreateInfo' used to create--- 'Graphics.Vulkan.Core10.Handles.RenderPass' /must/ be supported by--- the capabilities of the queue family identified by the--- @queueFamilyIndex@ member of the+-- @renderPass@ /must/ be supported by the capabilities of the queue+-- family identified by the @queueFamilyIndex@ member of the -- 'Graphics.Vulkan.Core10.CommandPool.CommandPoolCreateInfo' used to--- create the command pool which--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from+-- create the command pool which @commandBuffer@ was allocated from ----- - For any attachment in 'Graphics.Vulkan.Core10.Handles.Framebuffer'--- that is used by 'Graphics.Vulkan.Core10.Handles.RenderPass' and is--- bound to memory locations that are also bound to another attachment--- used by 'Graphics.Vulkan.Core10.Handles.RenderPass', and if at least--- one of those uses causes either attachment to be written to, both--- attachments /must/ have had the+-- - For any attachment in @framebuffer@ that is used by @renderPass@ and+-- is bound to memory locations that are also bound to another+-- attachment used by @renderPass@, and if at least one of those uses+-- causes either attachment to be written to, both attachments /must/+-- have had the -- 'Graphics.Vulkan.Core10.Enums.AttachmentDescriptionFlagBits.ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT' -- set -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pRenderPassBegin@ /must/ be a valid pointer to a valid@@ -380,26 +363,24 @@ -- - @pSubpassBeginInfo@ /must/ be a valid pointer to a valid -- 'SubpassBeginInfo' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - This command /must/ only be called outside of a render pass instance ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a primary+-- - @commandBuffer@ /must/ be a primary -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -416,15 +397,23 @@ -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.RenderPassBeginInfo', -- 'SubpassBeginInfo'-cmdBeginRenderPass2 :: PokeChain a => CommandBuffer -> RenderPassBeginInfo a -> SubpassBeginInfo -> IO ()-cmdBeginRenderPass2 commandBuffer renderPassBegin subpassBeginInfo = evalContT $ do+cmdBeginRenderPass2 :: forall a io . (PokeChain a, MonadIO io) => CommandBuffer -> RenderPassBeginInfo a -> SubpassBeginInfo -> io ()+cmdBeginRenderPass2 commandBuffer renderPassBegin subpassBeginInfo = liftIO . evalContT $ do let vkCmdBeginRenderPass2' = mkVkCmdBeginRenderPass2 (pVkCmdBeginRenderPass2 (deviceCmds (commandBuffer :: CommandBuffer))) pRenderPassBegin <- ContT $ withCStruct (renderPassBegin) pSubpassBeginInfo <- ContT $ withCStruct (subpassBeginInfo) lift $ vkCmdBeginRenderPass2' (commandBufferHandle (commandBuffer)) pRenderPassBegin pSubpassBeginInfo pure $ () +-- | A safe wrapper for 'cmdBeginRenderPass2' and 'cmdEndRenderPass2' using+-- 'bracket_'+cmdWithRenderPass2 :: forall a r . PokeChain a => CommandBuffer -> RenderPassBeginInfo a -> SubpassBeginInfo -> SubpassEndInfo -> IO r -> IO r+cmdWithRenderPass2 commandBuffer pRenderPassBegin pSubpassBeginInfo pSubpassEndInfo =+ bracket_+ (cmdBeginRenderPass2 commandBuffer pRenderPassBegin pSubpassBeginInfo)+ (cmdEndRenderPass2 commandBuffer pSubpassEndInfo) + foreign import ccall #if !defined(SAFE_FOREIGN_CALLS) unsafe@@ -436,8 +425,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- in which to record the command.+-- - @commandBuffer@ is the command buffer in which to record the+-- command. -- -- - @pSubpassBeginInfo@ is a pointer to a 'SubpassBeginInfo' structure -- containing information about the subpass which is about to begin@@ -463,7 +452,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pSubpassBeginInfo@ /must/ be a valid pointer to a valid@@ -472,26 +461,24 @@ -- - @pSubpassEndInfo@ /must/ be a valid pointer to a valid -- 'SubpassEndInfo' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - This command /must/ only be called inside of a render pass instance ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a primary+-- - @commandBuffer@ /must/ be a primary -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -507,8 +494,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'SubpassBeginInfo', -- 'SubpassEndInfo'-cmdNextSubpass2 :: CommandBuffer -> SubpassBeginInfo -> SubpassEndInfo -> IO ()-cmdNextSubpass2 commandBuffer subpassBeginInfo subpassEndInfo = evalContT $ do+cmdNextSubpass2 :: forall io . MonadIO io => CommandBuffer -> SubpassBeginInfo -> SubpassEndInfo -> io ()+cmdNextSubpass2 commandBuffer subpassBeginInfo subpassEndInfo = liftIO . evalContT $ do let vkCmdNextSubpass2' = mkVkCmdNextSubpass2 (pVkCmdNextSubpass2 (deviceCmds (commandBuffer :: CommandBuffer))) pSubpassBeginInfo <- ContT $ withCStruct (subpassBeginInfo) pSubpassEndInfo <- ContT $ withCStruct (subpassEndInfo)@@ -527,8 +514,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- in which to end the current render pass instance.+-- - @commandBuffer@ is the command buffer in which to end the current+-- render pass instance. -- -- - @pSubpassEndInfo@ is a pointer to a 'SubpassEndInfo' structure -- containing information about how the previous subpass will be ended.@@ -549,32 +536,30 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pSubpassEndInfo@ /must/ be a valid pointer to a valid -- 'SubpassEndInfo' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - This command /must/ only be called inside of a render pass instance ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a primary+-- - @commandBuffer@ /must/ be a primary -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -589,8 +574,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'SubpassEndInfo'-cmdEndRenderPass2 :: CommandBuffer -> SubpassEndInfo -> IO ()-cmdEndRenderPass2 commandBuffer subpassEndInfo = evalContT $ do+cmdEndRenderPass2 :: forall io . MonadIO io => CommandBuffer -> SubpassEndInfo -> io ()+cmdEndRenderPass2 commandBuffer subpassEndInfo = liftIO . evalContT $ do let vkCmdEndRenderPass2' = mkVkCmdEndRenderPass2 (pVkCmdEndRenderPass2 (deviceCmds (commandBuffer :: CommandBuffer))) pSubpassEndInfo <- ContT $ withCStruct (subpassEndInfo) lift $ vkCmdEndRenderPass2' (commandBufferHandle (commandBuffer)) pSubpassEndInfo@@ -608,22 +593,22 @@ -- -- If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-separateDepthStencilLayouts separateDepthStencilLayouts>--- feature is enabled, and 'Graphics.Vulkan.Core10.Enums.Format.Format' is--- a depth\/stencil format, @initialLayout@ and @finalLayout@ /can/ be set--- to a layout that only specifies the layout of the depth aspect.+-- feature is enabled, and @format@ is a depth\/stencil format,+-- @initialLayout@ and @finalLayout@ /can/ be set to a layout that only+-- specifies the layout of the depth aspect. ----- If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format, and @initialLayout@ only specifies the initial layout of the--- depth aspect of the attachment, the initial layout of the stencil aspect--- is specified by the @stencilInitialLayout@ member of a+-- If @format@ is a depth\/stencil format, and @initialLayout@ only+-- specifies the initial layout of the depth aspect of the attachment, the+-- initial layout of the stencil aspect is specified by the+-- @stencilInitialLayout@ member of a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_separate_depth_stencil_layouts.AttachmentDescriptionStencilLayout' -- structure included in the @pNext@ chain. Otherwise, @initialLayout@ -- describes the initial layout for all relevant image aspects. ----- If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format, and @finalLayout@ only specifies the final layout of the depth--- aspect of the attachment, the final layout of the stencil aspect is--- specified by the @stencilFinalLayout@ member of a+-- If @format@ is a depth\/stencil format, and @finalLayout@ only specifies+-- the final layout of the depth aspect of the attachment, the final layout+-- of the stencil aspect is specified by the @stencilFinalLayout@ member of+-- a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_separate_depth_stencil_layouts.AttachmentDescriptionStencilLayout' -- structure included in the @pNext@ chain. Otherwise, @finalLayout@ -- describes the final layout for all relevant image aspects.@@ -634,28 +619,25 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_UNDEFINED' or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_PREINITIALIZED' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a color format,--- @initialLayout@ /must/ not be+-- - If @format@ is a color format, @initialLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL', -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format, @initialLayout@ /must/ not be+-- - If @format@ is a depth\/stencil format, @initialLayout@ /must/ not+-- be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a color format,--- @finalLayout@ /must/ not be+-- - If @format@ is a color format, @finalLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL', -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format, @finalLayout@ /must/ not be+-- - If @format@ is a depth\/stencil format, @finalLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL' -- -- - If the@@ -676,25 +658,22 @@ -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a color format,--- @initialLayout@ /must/ not be+-- - If @format@ is a color format, @initialLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a color format,--- @finalLayout@ /must/ not be+-- - If @format@ is a color format, @finalLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format which includes both depth and stencil aspects, and--- @initialLayout@ is+-- - If @format@ is a depth\/stencil format which includes both depth and+-- stencil aspects, and @initialLayout@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL',@@ -702,9 +681,8 @@ -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_separate_depth_stencil_layouts.AttachmentDescriptionStencilLayout' -- structure ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format which includes both depth and stencil aspects, and--- @finalLayout@ is+-- - If @format@ is a depth\/stencil format which includes both depth and+-- stencil aspects, and @finalLayout@ is -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL',@@ -712,30 +690,26 @@ -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_separate_depth_stencil_layouts.AttachmentDescriptionStencilLayout' -- structure ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format which includes only the depth aspect, @initialLayout@ /must/--- not be+-- - If @format@ is a depth\/stencil format which includes only the depth+-- aspect, @initialLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format which includes only the depth aspect, @finalLayout@ /must/--- not be+-- - If @format@ is a depth\/stencil format which includes only the depth+-- aspect, @finalLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format which includes only the stencil aspect, @initialLayout@--- /must/ not be+-- - If @format@ is a depth\/stencil format which includes only the+-- stencil aspect, @initialLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL' ----- - If 'Graphics.Vulkan.Core10.Enums.Format.Format' is a depth\/stencil--- format which includes only the stencil aspect, @finalLayout@ /must/--- not be+-- - If @format@ is a depth\/stencil format which includes only the+-- stencil aspect, @finalLayout@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL' -- or -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL'@@ -745,12 +719,11 @@ -- - @sType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2' ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.AttachmentDescriptionFlagBits.AttachmentDescriptionFlagBits' -- values ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ be a valid+-- - @format@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value -- -- - @samples@ /must/ be a valid@@ -792,13 +765,12 @@ data AttachmentDescription2 (es :: [Type]) = AttachmentDescription2 { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.AttachmentDescriptionFlagBits.AttachmentDescriptionFlagBits' -- specifying additional properties of the attachment. flags :: AttachmentDescriptionFlags- , -- | 'Graphics.Vulkan.Core10.Enums.Format.Format' is a- -- 'Graphics.Vulkan.Core10.Enums.Format.Format' value specifying the format- -- of the image that will be used for the attachment.+ , -- | @format@ is a 'Graphics.Vulkan.Core10.Enums.Format.Format' value+ -- specifying the format of the image that will be used for the attachment. format :: Format , -- | @samples@ is the number of samples of the image as defined in -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits'.@@ -1111,8 +1083,7 @@ -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- /must/ be+-- - @pipelineBindPoint@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_GRAPHICS' -- -- - @colorAttachmentCount@ /must/ be less than or equal to@@ -1174,7 +1145,7 @@ -- 'Graphics.Vulkan.Core10.Pass.AttachmentReference' member, then each -- use /must/ use the same @layout@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' includes+-- - If @flags@ includes -- 'Graphics.Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX', -- it /must/ also include -- 'Graphics.Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX'.@@ -1198,13 +1169,11 @@ -- - @sType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2' ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SubpassDescriptionFlagBits' -- values ----- - 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- /must/ be a valid+-- - @pipelineBindPoint@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' -- value --@@ -1239,11 +1208,11 @@ data SubpassDescription2 (es :: [Type]) = SubpassDescription2 { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SubpassDescriptionFlagBits' -- specifying usage of the subpass. flags :: SubpassDescriptionFlags- , -- | 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' is a+ , -- | @pipelineBindPoint@ is a -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' value -- specifying the pipeline type supported for this subpass. pipelineBindPoint :: PipelineBindPoint@@ -1442,14 +1411,12 @@ -- one of the pipeline stages in @dstStageMask@, as specified in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-types-supported table of supported access types> ----- - If 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- includes+-- - If @dependencyFlags@ includes -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_VIEW_LOCAL_BIT', -- @srcSubpass@ /must/ not be equal to -- 'Graphics.Vulkan.Core10.APIConstants.SUBPASS_EXTERNAL' ----- - If 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- includes+-- - If @dependencyFlags@ includes -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_VIEW_LOCAL_BIT', -- @dstSubpass@ /must/ not be equal to -- 'Graphics.Vulkan.Core10.APIConstants.SUBPASS_EXTERNAL'@@ -1457,16 +1424,13 @@ -- - If @srcSubpass@ equals @dstSubpass@, and @srcStageMask@ and -- @dstStageMask@ both include a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-framebuffer-regions framebuffer-space stage>,--- then--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- /must/ include+-- then @dependencyFlags@ /must/ include -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_BY_REGION_BIT' -- -- - If @viewOffset@ is not equal to @0@, @srcSubpass@ /must/ not be -- equal to @dstSubpass@ ----- - If 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- does not include+-- - If @dependencyFlags@ does not include -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_VIEW_LOCAL_BIT', -- @viewOffset@ /must/ be @0@ --@@ -1516,8 +1480,7 @@ -- - @dstAccessMask@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.AccessFlagBits.AccessFlagBits' values ----- - 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- /must/ be a valid combination of+-- - @dependencyFlags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlagBits' -- values --@@ -1555,8 +1518,7 @@ -- a -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-access-masks destination access mask>. dstAccessMask :: AccessFlags- , -- | 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags' is a- -- bitmask of+ , -- | @dependencyFlags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlagBits'. dependencyFlags :: DependencyFlags , -- | @viewOffset@ controls which views in the source subpass the views in the@@ -1662,7 +1624,7 @@ -- (including the same subpass), the 'AttachmentDescription2' -- structures describing them /must/ include -- 'Graphics.Vulkan.Core10.Enums.AttachmentDescriptionFlagBits.ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT'--- in 'Graphics.Vulkan.Core10.BaseType.Flags'+-- in @flags@ -- -- - If the @attachment@ member of any element of @pInputAttachments@, -- @pColorAttachments@, @pResolveAttachments@ or@@ -1694,18 +1656,15 @@ -- flags included in the @srcStageMask@ member of that dependency -- /must/ be a pipeline stage supported by the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types pipeline>--- identified by the--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- member of the source subpass+-- identified by the @pipelineBindPoint@ member of the source subpass -- -- - For any element of @pDependencies@, if the @dstSubpass@ is not -- 'Graphics.Vulkan.Core10.APIConstants.SUBPASS_EXTERNAL', all stage -- flags included in the @dstStageMask@ member of that dependency -- /must/ be a pipeline stage supported by the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types pipeline>--- identified by the--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- member of the destination subpass+-- identified by the @pipelineBindPoint@ member of the destination+-- subpass -- -- - The set of bits included in any element of @pCorrelatedViewMasks@ -- /must/ not overlap with the set of bits included in any other@@ -1718,17 +1677,14 @@ -- @pSubpasses@ /must/ either all be @0@, or all not be @0@ -- -- - If the 'SubpassDescription2'::@viewMask@ member of all elements of--- @pSubpasses@ is @0@, the--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- member of any element of @pDependencies@ /must/ not include+-- @pSubpasses@ is @0@, the @dependencyFlags@ member of any element of+-- @pDependencies@ /must/ not include -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_VIEW_LOCAL_BIT' -- -- - For any element of @pDependencies@ where its @srcSubpass@ member -- equals its @dstSubpass@ member, if the @viewMask@ member of the -- corresponding element of @pSubpasses@ includes more than one bit,--- its--- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DependencyFlags'--- member /must/ include+-- its @dependencyFlags@ member /must/ include -- 'Graphics.Vulkan.Core10.Enums.DependencyFlagBits.DEPENDENCY_VIEW_LOCAL_BIT' -- -- - The @viewMask@ member /must/ not have a bit set at an index greater@@ -1759,8 +1715,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.RenderPassCreateFlagBits.RenderPassCreateFlagBits' -- values --@@ -1791,7 +1746,7 @@ data RenderPassCreateInfo2 (es :: [Type]) = RenderPassCreateInfo2 { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ , -- | @flags@ is reserved for future use. flags :: RenderPassCreateFlags , -- | @pAttachments@ is a pointer to an array of @attachmentCount@ -- 'AttachmentDescription2' structures describing the attachments used by
src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_draw_indirect_count.hs view
@@ -3,6 +3,8 @@ , cmdDrawIndexedIndirectCount ) where +import Control.Monad.IO.Class (liftIO)+import Control.Monad.IO.Class (MonadIO) import Foreign.Ptr (FunPtr) import Foreign.Ptr (Ptr) import Data.Word (Word32)@@ -27,14 +29,12 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' is the buffer containing--- draw parameters.+-- - @buffer@ is the buffer containing draw parameters. ----- - @offset@ is the byte offset into--- 'Graphics.Vulkan.Core10.Handles.Buffer' where parameters begin.+-- - @offset@ is the byte offset into @buffer@ where parameters begin. -- -- - @countBuffer@ is the buffer containing the draw count. --@@ -103,8 +103,7 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV' -- sampled as a result of this command /must/ only be sampled using a -- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'@@ -142,9 +141,8 @@ -- -- - If the 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and done so after--- any previously bound pipeline with the corresponding state not+-- 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@@ -201,15 +199,14 @@ -- specified in the descriptor set bound to the same pipeline bind -- point ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource+-- - If @commandBuffer@ is an unprotected command buffer, any resource+-- accessed by the 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource -- -- - The current render pass /must/ be -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>--- with the 'Graphics.Vulkan.Core10.Handles.RenderPass' member of the+-- with the @renderPass@ member of the -- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' -- structure specified when creating the -- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to@@ -250,19 +247,17 @@ -- binding, as described in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fxvertex-input ???> ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is non-sparse then it--- /must/ be bound completely and contiguously to a single+-- - If @buffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ have been created--- with the+-- - @buffer@ /must/ have been created with the -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT' -- bit set -- -- - @offset@ /must/ be a multiple of @4@ ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be a--- protected command buffer+-- - @commandBuffer@ /must/ not be a protected command buffer -- -- - If @countBuffer@ is non-sparse then it /must/ be bound completely -- and contiguously to a single@@ -284,19 +279,16 @@ -- - If @maxDrawCount@ is greater than or equal to @1@, (@stride@ × -- (@maxDrawCount@ - 1) + @offset@ + -- sizeof('Graphics.Vulkan.Core10.OtherTypes.DrawIndirectCommand'))--- /must/ be less than or equal to the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'+-- /must/ be less than or equal to the size of @buffer@ -- -- - If the count stored in @countBuffer@ is equal to @1@, (@offset@ + -- sizeof('Graphics.Vulkan.Core10.OtherTypes.DrawIndirectCommand'))--- /must/ be less than or equal to the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'+-- /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('Graphics.Vulkan.Core10.OtherTypes.DrawIndirectCommand'))--- /must/ be less than or equal to the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'+-- /must/ be less than or equal to the size of @buffer@ -- -- - If -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-drawIndirectCount drawIndirectCount>@@ -304,37 +296,34 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle -- -- - @countBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Buffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - This command /must/ only be called inside of a render pass instance ----- - Each of 'Graphics.Vulkan.Core10.Handles.Buffer',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and @countBuffer@--- /must/ have been created, allocated, or retrieved from the same+-- - Each of @buffer@, @commandBuffer@, and @countBuffer@ /must/ have+-- been created, allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -352,8 +341,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdDrawIndirectCount :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()-cmdDrawIndirectCount commandBuffer buffer offset countBuffer countBufferOffset maxDrawCount stride = do+cmdDrawIndirectCount :: forall io . MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()+cmdDrawIndirectCount commandBuffer buffer offset countBuffer countBufferOffset maxDrawCount stride = liftIO $ do let vkCmdDrawIndirectCount' = mkVkCmdDrawIndirectCount (pVkCmdDrawIndirectCount (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdDrawIndirectCount' (commandBufferHandle (commandBuffer)) (buffer) (offset) (countBuffer) (countBufferOffset) (maxDrawCount) (stride) pure $ ()@@ -371,14 +360,12 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' is the buffer containing--- draw parameters.+-- - @buffer@ is the buffer containing draw parameters. ----- - @offset@ is the byte offset into--- 'Graphics.Vulkan.Core10.Handles.Buffer' where parameters begin.+-- - @offset@ is the byte offset into @buffer@ where parameters begin. -- -- - @countBuffer@ is the buffer containing the draw count. --@@ -447,8 +434,7 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV' -- sampled as a result of this command /must/ only be sampled using a -- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'@@ -486,9 +472,8 @@ -- -- - If the 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and done so after--- any previously bound pipeline with the corresponding state not+-- 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@@ -545,15 +530,14 @@ -- specified in the descriptor set bound to the same pipeline bind -- point ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource+-- - If @commandBuffer@ is an unprotected command buffer, any resource+-- accessed by the 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource -- -- - The current render pass /must/ be -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>--- with the 'Graphics.Vulkan.Core10.Handles.RenderPass' member of the+-- with the @renderPass@ member of the -- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' -- structure specified when creating the -- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to@@ -594,19 +578,17 @@ -- binding, as described in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fxvertex-input ???> ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is non-sparse then it--- /must/ be bound completely and contiguously to a single+-- - If @buffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ have been created--- with the+-- - @buffer@ /must/ have been created with the -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT' -- bit set -- -- - @offset@ /must/ be a multiple of @4@ ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be a--- protected command buffer+-- - @commandBuffer@ /must/ not be a protected command buffer -- -- - If @countBuffer@ is non-sparse then it /must/ be bound completely -- and contiguously to a single@@ -628,53 +610,47 @@ -- - If @maxDrawCount@ is greater than or equal to @1@, (@stride@ × -- (@maxDrawCount@ - 1) + @offset@ + -- sizeof('Graphics.Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand'))--- /must/ be less than or equal to the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'+-- /must/ be less than or equal to the size of @buffer@ -- -- - If count stored in @countBuffer@ is equal to @1@, (@offset@ + -- sizeof('Graphics.Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand'))--- /must/ be less than or equal to the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'+-- /must/ be less than or equal to the size of @buffer@ -- -- - If count stored in @countBuffer@ is greater than @1@, (@stride@ × -- (@drawCount@ - 1) + @offset@ + -- sizeof('Graphics.Vulkan.Core10.OtherTypes.DrawIndexedIndirectCommand'))--- /must/ be less than or equal to the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer'+-- /must/ be less than or equal to the size of @buffer@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle -- -- - @countBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Buffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - This command /must/ only be called inside of a render pass instance ----- - Each of 'Graphics.Vulkan.Core10.Handles.Buffer',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and @countBuffer@--- /must/ have been created, allocated, or retrieved from the same+-- - Each of @buffer@, @commandBuffer@, and @countBuffer@ /must/ have+-- been created, allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -692,8 +668,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdDrawIndexedIndirectCount :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()-cmdDrawIndexedIndirectCount commandBuffer buffer offset countBuffer countBufferOffset maxDrawCount stride = do+cmdDrawIndexedIndirectCount :: forall io . MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()+cmdDrawIndexedIndirectCount commandBuffer buffer offset countBuffer countBufferOffset maxDrawCount stride = liftIO $ do let vkCmdDrawIndexedIndirectCount' = mkVkCmdDrawIndexedIndirectCount (pVkCmdDrawIndexedIndirectCount (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdDrawIndexedIndirectCount' (commandBufferHandle (commandBuffer)) (buffer) (offset) (countBuffer) (countBufferOffset) (maxDrawCount) (stride) pure $ ()
src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_driver_properties.hs view
@@ -132,7 +132,7 @@ -- containing a null-terminated UTF-8 string with additional information -- about the driver. driverInfo :: ByteString- , -- | 'ConformanceVersion' is the version of the Vulkan conformance test this+ , -- | @conformanceVersion@ is the version of the Vulkan conformance test this -- driver is conformant against (see 'ConformanceVersion'). conformanceVersion :: ConformanceVersion }
src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_image_format_list.hs view
@@ -43,19 +43,18 @@ -- -- - If @viewFormatCount@ is not @0@, all of the formats in the -- @pViewFormats@ array /must/ be compatible with the format specified--- in the 'Graphics.Vulkan.Core10.Enums.Format.Format' field of+-- in the @format@ field of -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo', as described in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-compatibility compatibility table>. ----- - If--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- does not contain+-- - If 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ does not+-- contain -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT', -- @viewFormatCount@ /must/ be @0@ or @1@. -- -- - If @viewFormatCount@ is not @0@,--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.Enums.Format.Format'--- /must/ be in @pViewFormats@.+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@format@ /must/ be+-- in @pViewFormats@. -- -- == Valid Usage (Implicit) --
src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_imageless_framebuffer.hs view
@@ -185,8 +185,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlagBits' -- values --@@ -208,11 +207,11 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlags', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data FramebufferAttachmentImageInfo = FramebufferAttachmentImageInfo- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ { -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlagBits', -- matching the value of- -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'- -- used to create an image that will be used with this framebuffer.+ -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ used to create+ -- an image that will be used with this framebuffer. flags :: ImageCreateFlags , -- | @usage@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlagBits',
src/Graphics/Vulkan/Core12/Promoted_From_VK_KHR_timeline_semaphore.hs view
@@ -16,6 +16,7 @@ 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)@@ -29,6 +30,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Either (Either) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -91,11 +93,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the semaphore.+-- - @device@ is the logical device that owns the semaphore. ----- - 'Graphics.Vulkan.Core10.Handles.Semaphore' is the handle of the--- semaphore to query.+-- - @semaphore@ is the handle of the semaphore to query. -- -- - @pValue@ is a pointer to a 64-bit integer value in which the current -- counter value of the semaphore is returned.@@ -127,8 +127,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Semaphore'-getSemaphoreCounterValue :: Device -> Semaphore -> IO (("value" ::: Word64))-getSemaphoreCounterValue device semaphore = evalContT $ do+getSemaphoreCounterValue :: forall io . MonadIO io => Device -> Semaphore -> io (("value" ::: Word64))+getSemaphoreCounterValue device semaphore = liftIO . evalContT $ do let vkGetSemaphoreCounterValue' = mkVkGetSemaphoreCounterValue (pVkGetSemaphoreCounterValue (deviceCmds (device :: Device))) pPValue <- ContT $ bracket (callocBytes @Word64 8) free r <- lift $ vkGetSemaphoreCounterValue' (deviceHandle (device)) (semaphore) (pPValue)@@ -148,8 +148,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the semaphore.+-- - @device@ is the logical device that owns the semaphore. -- -- - @pWaitInfo@ is a pointer to a 'SemaphoreWaitInfo' structure -- containing information about the wait condition.@@ -205,8 +204,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'SemaphoreWaitInfo'-waitSemaphores :: Device -> SemaphoreWaitInfo -> ("timeout" ::: Word64) -> IO (Result)-waitSemaphores device waitInfo timeout = evalContT $ do+waitSemaphores :: forall io . MonadIO io => Device -> SemaphoreWaitInfo -> ("timeout" ::: Word64) -> io (Result)+waitSemaphores device waitInfo timeout = liftIO . evalContT $ do let vkWaitSemaphores' = mkVkWaitSemaphores (pVkWaitSemaphores (deviceCmds (device :: Device))) pWaitInfo <- ContT $ withCStruct (waitInfo) r <- lift $ vkWaitSemaphores' (deviceHandle (device)) pWaitInfo (timeout)@@ -225,8 +224,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the semaphore.+-- - @device@ is the logical device that owns the semaphore. -- -- - @pSignalInfo@ is a pointer to a 'SemaphoreSignalInfo' structure -- containing information about the signal operation.@@ -259,8 +257,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'SemaphoreSignalInfo'-signalSemaphore :: Device -> SemaphoreSignalInfo -> IO ()-signalSemaphore device signalInfo = evalContT $ do+signalSemaphore :: forall io . MonadIO io => Device -> SemaphoreSignalInfo -> io ()+signalSemaphore device signalInfo = liftIO . evalContT $ do let vkSignalSemaphore' = mkVkSignalSemaphore (pVkSignalSemaphore (deviceCmds (device :: Device))) pSignalInfo <- ContT $ withCStruct (signalInfo) r <- lift $ vkSignalSemaphore' (deviceHandle (device)) pSignalInfo@@ -393,20 +391,17 @@ -- - @sType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO' ----- - 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType' /must/ be--- a valid 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType'--- value+-- - @semaphoreType@ /must/ be a valid+-- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType' value -- -- == Valid Usage -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-timelineSemaphore timelineSemaphore>--- feature is not enabled,--- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType' /must/--- not equal+-- feature is not enabled, @semaphoreType@ /must/ not equal -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SEMAPHORE_TYPE_TIMELINE' ----- - If 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType' is+-- - If @semaphoreType@ is -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SEMAPHORE_TYPE_BINARY', -- @initialValue@ /must/ be zero. --@@ -421,12 +416,11 @@ -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data SemaphoreTypeCreateInfo = SemaphoreTypeCreateInfo- { -- | 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType' is a+ { -- | @semaphoreType@ is a -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType' value -- specifying the type of the semaphore. semaphoreType :: SemaphoreType- , -- | @initialValue@ is the initial payload value if- -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType' is+ , -- | @initialValue@ is the initial payload value if @semaphoreType@ is -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SEMAPHORE_TYPE_TIMELINE'. initialValue :: Word64 }@@ -582,8 +576,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core12.Enums.SemaphoreWaitFlagBits.SemaphoreWaitFlagBits' -- values --@@ -604,7 +597,7 @@ -- 'waitSemaphores', -- 'Graphics.Vulkan.Extensions.VK_KHR_timeline_semaphore.waitSemaphoresKHR' data SemaphoreWaitInfo = SemaphoreWaitInfo- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ { -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core12.Enums.SemaphoreWaitFlagBits.SemaphoreWaitFlagBits' -- specifying additional parameters for the semaphore wait operation. flags :: SemaphoreWaitFlags@@ -679,13 +672,12 @@ -- 'signalSemaphore', -- 'Graphics.Vulkan.Extensions.VK_KHR_timeline_semaphore.signalSemaphoreKHR' data SemaphoreSignalInfo = SemaphoreSignalInfo- { -- | 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ be a valid- -- 'Graphics.Vulkan.Core10.Handles.Semaphore' handle+ { -- | @semaphore@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Semaphore'+ -- handle semaphore :: Semaphore , -- | @value@ /must/ have a value which does not differ from the current value -- of the semaphore or the value of any outstanding semaphore wait or- -- signal operation on 'Graphics.Vulkan.Core10.Handles.Semaphore' by more- -- than+ -- signal operation on @semaphore@ by more than -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#limits-maxTimelineSemaphoreValueDifference maxTimelineSemaphoreValueDifference>. value :: Word64 }
src/Graphics/Vulkan/Extensions/VK_AMD_buffer_marker.hs view
@@ -6,6 +6,8 @@ , pattern AMD_BUFFER_MARKER_EXTENSION_NAME ) where +import Control.Monad.IO.Class (liftIO)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Foreign.Ptr (FunPtr) import Foreign.Ptr (Ptr)@@ -32,8 +34,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @pipelineStage@ is one of the -- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'@@ -96,7 +98,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pipelineStage@ /must/ be a valid@@ -106,25 +108,23 @@ -- - @dstBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Buffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support transfer, graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support transfer,+-- graphics, or compute operations ----- - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- @dstBuffer@ /must/ have been created, allocated, or retrieved from--- the same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Both of @commandBuffer@, and @dstBuffer@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -144,8 +144,8 @@ -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize', -- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PipelineStageFlagBits'-cmdWriteBufferMarkerAMD :: CommandBuffer -> PipelineStageFlagBits -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> ("marker" ::: Word32) -> IO ()-cmdWriteBufferMarkerAMD commandBuffer pipelineStage dstBuffer dstOffset marker = do+cmdWriteBufferMarkerAMD :: forall io . MonadIO io => CommandBuffer -> PipelineStageFlagBits -> ("dstBuffer" ::: Buffer) -> ("dstOffset" ::: DeviceSize) -> ("marker" ::: Word32) -> io ()+cmdWriteBufferMarkerAMD commandBuffer pipelineStage dstBuffer dstOffset marker = liftIO $ do let vkCmdWriteBufferMarkerAMD' = mkVkCmdWriteBufferMarkerAMD (pVkCmdWriteBufferMarkerAMD (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdWriteBufferMarkerAMD' (commandBufferHandle (commandBuffer)) (pipelineStage) (dstBuffer) (dstOffset) (marker) pure $ ()
src/Graphics/Vulkan/Extensions/VK_AMD_display_native_hdr.hs view
@@ -10,9 +10,11 @@ , ColorSpaceKHR(..) ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) 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)@@ -54,8 +56,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device associated--- with @swapChain@.+-- - @device@ is the device associated with @swapChain@. -- -- - @swapChain@ handle to enable local dimming. --@@ -64,14 +65,14 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @swapChain@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR' handle ----- - Both of 'Graphics.Vulkan.Core10.Handles.Device', and @swapChain@--- /must/ have been created, allocated, or retrieved from the same+-- - Both of @device@, and @swapChain@ /must/ have been created,+-- allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Valid Usage@@ -85,8 +86,8 @@ -- 'Graphics.Vulkan.Core10.BaseType.Bool32', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR'-setLocalDimmingAMD :: Device -> SwapchainKHR -> ("localDimmingEnable" ::: Bool) -> IO ()-setLocalDimmingAMD device swapChain localDimmingEnable = do+setLocalDimmingAMD :: forall io . MonadIO io => Device -> SwapchainKHR -> ("localDimmingEnable" ::: Bool) -> io ()+setLocalDimmingAMD device swapChain localDimmingEnable = liftIO $ do let vkSetLocalDimmingAMD' = mkVkSetLocalDimmingAMD (pVkSetLocalDimmingAMD (deviceCmds (device :: Device))) vkSetLocalDimmingAMD' (deviceHandle (device)) (swapChain) (boolToBool32 (localDimmingEnable)) pure $ ()
src/Graphics/Vulkan/Extensions/VK_AMD_shader_info.hs view
@@ -14,6 +14,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -34,11 +35,12 @@ import Data.ByteString (packCStringLen) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Foreign.C.Types (CSize(..))+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.C.Types (CChar) import Foreign.C.Types (CSize)-import Foreign.C.Types (CSize(..)) import Foreign.C.Types (CSize(CSize)) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -88,11 +90,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device that created--- 'Graphics.Vulkan.Core10.Handles.Pipeline'.+-- - @device@ is the device that created @pipeline@. ----- - 'Graphics.Vulkan.Core10.Handles.Pipeline' is the target of the--- query.+-- - @pipeline@ is the target of the query. -- -- - @shaderStage@ identifies the particular shader within the pipeline -- about which information is being queried.@@ -144,10 +144,10 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ be a valid+-- - @pipeline@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Pipeline' handle -- -- - @shaderStage@ /must/ be a valid@@ -162,8 +162,8 @@ -- not @NULL@, @pInfo@ /must/ be a valid pointer to an array of -- @pInfoSize@ bytes ----- - 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ have been created,--- allocated, or retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- - @pipeline@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- == Return Codes --@@ -184,8 +184,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Pipeline', 'ShaderInfoTypeAMD', -- 'Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits.ShaderStageFlagBits'-getShaderInfoAMD :: Device -> Pipeline -> ShaderStageFlagBits -> ShaderInfoTypeAMD -> IO (Result, ("info" ::: ByteString))-getShaderInfoAMD device pipeline shaderStage infoType = evalContT $ do+getShaderInfoAMD :: forall io . MonadIO io => Device -> Pipeline -> ShaderStageFlagBits -> ShaderInfoTypeAMD -> io (Result, ("info" ::: ByteString))+getShaderInfoAMD device pipeline shaderStage infoType = liftIO . evalContT $ do let vkGetShaderInfoAMD' = mkVkGetShaderInfoAMD (pVkGetShaderInfoAMD (deviceCmds (device :: Device))) let device' = deviceHandle (device) pPInfoSize <- ContT $ bracket (callocBytes @CSize 8) free
src/Graphics/Vulkan/Extensions/VK_ANDROID_external_memory_android_hardware_buffer.hs view
@@ -15,6 +15,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -26,6 +27,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable)@@ -89,15 +91,13 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- will be importing 'Graphics.Vulkan.Core10.Handles.Buffer'.+-- - @device@ is the logical device that will be importing @buffer@. ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' is the Android hardware--- buffer which will be imported.+-- - @buffer@ is the Android hardware buffer which will be imported. -- -- - @pProperties@ is a pointer to a -- 'AndroidHardwareBufferPropertiesANDROID' structure in which the--- properties of 'Graphics.Vulkan.Core10.Handles.Buffer' are returned.+-- properties of @buffer@ are returned. -- -- == Return Codes --@@ -113,8 +113,8 @@ -- -- 'AndroidHardwareBufferPropertiesANDROID', -- 'Graphics.Vulkan.Core10.Handles.Device'-getAndroidHardwareBufferPropertiesANDROID :: (PokeChain a, PeekChain a) => Device -> Ptr AHardwareBuffer -> IO (AndroidHardwareBufferPropertiesANDROID a)-getAndroidHardwareBufferPropertiesANDROID device buffer = evalContT $ do+getAndroidHardwareBufferPropertiesANDROID :: forall a io . (PokeChain a, PeekChain a, MonadIO io) => Device -> Ptr AHardwareBuffer -> io (AndroidHardwareBufferPropertiesANDROID a)+getAndroidHardwareBufferPropertiesANDROID device buffer = liftIO . evalContT $ do let vkGetAndroidHardwareBufferPropertiesANDROID' = mkVkGetAndroidHardwareBufferPropertiesANDROID (pVkGetAndroidHardwareBufferPropertiesANDROID (deviceCmds (device :: Device))) pPProperties <- ContT (withZeroCStruct @(AndroidHardwareBufferPropertiesANDROID _)) r <- lift $ vkGetAndroidHardwareBufferPropertiesANDROID' (deviceHandle (device)) (buffer) (pPProperties)@@ -135,8 +135,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- created the device memory being exported.+-- - @device@ is the logical device that created the device memory being+-- exported. -- -- - @pInfo@ is a pointer to a -- 'MemoryGetAndroidHardwareBufferInfoANDROID' structure containing@@ -175,8 +175,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'MemoryGetAndroidHardwareBufferInfoANDROID'-getMemoryAndroidHardwareBufferANDROID :: Device -> MemoryGetAndroidHardwareBufferInfoANDROID -> IO (Ptr AHardwareBuffer)-getMemoryAndroidHardwareBufferANDROID device info = evalContT $ do+getMemoryAndroidHardwareBufferANDROID :: forall io . MonadIO io => Device -> MemoryGetAndroidHardwareBufferInfoANDROID -> io (Ptr AHardwareBuffer)+getMemoryAndroidHardwareBufferANDROID device info = liftIO . evalContT $ do let vkGetMemoryAndroidHardwareBufferANDROID' = mkVkGetMemoryAndroidHardwareBufferANDROID (pVkGetMemoryAndroidHardwareBufferANDROID (deviceCmds (device :: Device))) pInfo <- ContT $ withCStruct (info) pPBuffer <- ContT $ bracket (callocBytes @(Ptr AHardwareBuffer) 8) free@@ -198,17 +198,16 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is not @NULL@, Android--- hardware buffers /must/ be supported for import, as reported by+-- - If @buffer@ is not @NULL@, Android hardware buffers /must/ be+-- supported for import, as reported by -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.ExternalImageFormatProperties' -- or -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.ExternalBufferProperties'. ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is not @NULL@, it /must/--- be a valid Android hardware buffer object with--- @AHardwareBuffer_Desc@::'Graphics.Vulkan.Core10.Enums.Format.Format'--- and @AHardwareBuffer_Desc@::@usage@ compatible with Vulkan as--- described in+-- - If @buffer@ is not @NULL@, it /must/ be a valid Android hardware+-- buffer object with @AHardwareBuffer_Desc@::@format@ and+-- @AHardwareBuffer_Desc@::@usage@ compatible with Vulkan as described+-- in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-external-android-hardware-buffer Android Hardware Buffers>. -- -- == Valid Usage (Implicit)@@ -216,15 +215,14 @@ -- - @sType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID' ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid pointer to--- an 'Graphics.Vulkan.Extensions.WSITypes.AHardwareBuffer' value+-- - @buffer@ /must/ be a valid pointer to an+-- 'Graphics.Vulkan.Extensions.WSITypes.AHardwareBuffer' value -- -- = See Also -- -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data ImportAndroidHardwareBufferInfoANDROID = ImportAndroidHardwareBufferInfoANDROID- { -- | 'Graphics.Vulkan.Core10.Handles.Buffer' is the Android hardware buffer- -- to import.+ { -- | @buffer@ is the Android hardware buffer to import. buffer :: Ptr AHardwareBuffer } deriving (Typeable) deriving instance Show ImportAndroidHardwareBufferInfoANDROID@@ -270,8 +268,7 @@ -- buffer usage flags listed in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-external-android-hardware-buffer-usage AHardwareBuffer Usage Equivalence> -- table when the corresponding Vulkan image usage or image creation flags--- are included in the @usage@ or 'Graphics.Vulkan.Core10.BaseType.Flags'--- fields of+-- are included in the @usage@ or @flags@ fields of -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceImageFormatInfo2'. -- It /must/ include at least one GPU usage flag -- (@AHARDWAREBUFFER_USAGE_GPU_@*), even if none of the corresponding@@ -422,9 +419,8 @@ -- 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' used to allocate -- @memory@ included a -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo'--- with non-@NULL@ 'Graphics.Vulkan.Core10.Handles.Image' member, then--- that 'Graphics.Vulkan.Core10.Handles.Image' /must/ already be bound--- to @memory@.+-- with non-@NULL@ @image@ member, then that @image@ /must/ already be+-- bound to @memory@. -- -- == Valid Usage (Implicit) --@@ -487,9 +483,8 @@ -- -- If the Android hardware buffer has one of the formats listed in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-external-android-hardware-buffer-formats Format Equivalence table>,--- then 'Graphics.Vulkan.Core10.Enums.Format.Format' /must/ have the--- equivalent Vulkan format listed in the table. Otherwise,--- 'Graphics.Vulkan.Core10.Enums.Format.Format' /may/ be+-- then @format@ /must/ have the equivalent Vulkan format listed in the+-- table. Otherwise, @format@ /may/ be -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED', indicating the -- Android hardware buffer /can/ only be used with an external format. --@@ -538,12 +533,12 @@ -- samplers and pipelines created from them) for any Android hardware -- buffers that have the same external format. ----- If 'Graphics.Vulkan.Core10.Enums.Format.Format' is not+-- If @format@ is not -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED', then the value -- of @samplerYcbcrConversionComponents@ /must/ be valid when used as the -- @components@ member of -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionCreateInfo'--- with that format. If 'Graphics.Vulkan.Core10.Enums.Format.Format' is+-- with that format. If @format@ is -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED', all members of -- @samplerYcbcrConversionComponents@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.ComponentSwizzle.COMPONENT_SWIZZLE_IDENTITY'.@@ -581,8 +576,8 @@ -- 'Graphics.Vulkan.Core11.Enums.SamplerYcbcrRange.SamplerYcbcrRange', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data AndroidHardwareBufferFormatPropertiesANDROID = AndroidHardwareBufferFormatPropertiesANDROID- { -- | 'Graphics.Vulkan.Core10.Enums.Format.Format' is the Vulkan format- -- corresponding to the Android hardware buffer’s format, or+ { -- | @format@ is the Vulkan format corresponding to the Android hardware+ -- buffer’s format, or -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED' if there is not -- an equivalent Vulkan format. format :: Format@@ -590,8 +585,7 @@ -- for use with 'ExternalFormatANDROID'. It /must/ not be zero. externalFormat :: Word64 , -- | @formatFeatures@ describes the capabilities of this external format when- -- used with an image bound to memory imported from- -- 'Graphics.Vulkan.Core10.Handles.Buffer'.+ -- used with an image bound to memory imported from @buffer@. formatFeatures :: FormatFeatureFlags , -- | @samplerYcbcrConversionComponents@ is the component swizzle that -- /should/ be used in@@ -674,8 +668,7 @@ -- -- If @externalFormat@ is zero, the effect is as if the -- 'ExternalFormatANDROID' structure was not present. Otherwise, the--- 'Graphics.Vulkan.Core10.Handles.Image' will have the specified external--- format.+-- @image@ will have the specified external format. -- -- == Valid Usage (Implicit) --
src/Graphics/Vulkan/Extensions/VK_EXT_acquire_xlib_display.hs view
@@ -11,12 +11,14 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free) import GHC.Base (when) import GHC.IO (throwIO) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Foreign.Storable (Storable(peek)) import Foreign.Ptr (FunPtr)@@ -50,29 +52,24 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' The physical device--- the display is on.+-- - @physicalDevice@ The physical device the display is on. ----- - @dpy@ A connection to the X11 server that currently owns--- 'Graphics.Vulkan.Extensions.WSITypes.Display'.+-- - @dpy@ A connection to the X11 server that currently owns @display@. ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' The display the caller--- wishes to control in Vulkan.+-- - @display@ The display the caller wishes to control in Vulkan. -- -- = Description -- -- All permissions necessary to control the display are granted to the--- Vulkan instance associated with--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' until the display is+-- Vulkan instance associated with @physicalDevice@ until the display is -- released or the X11 connection specified by @dpy@ is terminated. -- Permission to access the display /may/ be temporarily revoked during -- periods when the X11 server from which control was acquired itself loses--- access to 'Graphics.Vulkan.Extensions.WSITypes.Display'. During such--- periods, operations which require access to the display /must/ fail with--- an approriate error code. If the X11 server associated with @dpy@ does--- not own 'Graphics.Vulkan.Extensions.WSITypes.Display', or if permission--- to access it has already been acquired by another entity, the call--- /must/ return the error code+-- access to @display@. During such periods, operations which require+-- access to the display /must/ fail with an approriate error code. If the+-- X11 server associated with @dpy@ does not own @display@, or if+-- permission to access it has already been acquired by another entity, the+-- call /must/ return the error code -- 'Graphics.Vulkan.Core10.Enums.Result.ERROR_INITIALIZATION_FAILED'. -- -- Note@@ -94,8 +91,8 @@ -- -- 'Graphics.Vulkan.Extensions.Handles.DisplayKHR', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-acquireXlibDisplayEXT :: PhysicalDevice -> ("dpy" ::: Ptr Display) -> DisplayKHR -> IO ()-acquireXlibDisplayEXT physicalDevice dpy display = do+acquireXlibDisplayEXT :: forall io . MonadIO io => PhysicalDevice -> ("dpy" ::: Ptr Display) -> DisplayKHR -> io ()+acquireXlibDisplayEXT physicalDevice dpy display = liftIO $ do let vkAcquireXlibDisplayEXT' = mkVkAcquireXlibDisplayEXT (pVkAcquireXlibDisplayEXT (instanceCmds (physicalDevice :: PhysicalDevice))) r <- vkAcquireXlibDisplayEXT' (physicalDeviceHandle (physicalDevice)) (dpy) (display) when (r < SUCCESS) (throwIO (VulkanException r))@@ -113,8 +110,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' The physical device--- to query the display handle on.+-- - @physicalDevice@ The physical device to query the display handle on. -- -- - @dpy@ A connection to the X11 server from which @rrOutput@ was -- queried.@@ -128,8 +124,7 @@ -- = Description -- -- If there is no 'Graphics.Vulkan.Extensions.Handles.DisplayKHR'--- corresponding to @rrOutput@ on--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice',+-- corresponding to @rrOutput@ on @physicalDevice@, -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' /must/ be returned in -- @pDisplay@. --@@ -143,8 +138,8 @@ -- -- 'Graphics.Vulkan.Extensions.Handles.DisplayKHR', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getRandROutputDisplayEXT :: PhysicalDevice -> ("dpy" ::: Ptr Display) -> RROutput -> IO (DisplayKHR)-getRandROutputDisplayEXT physicalDevice dpy rrOutput = evalContT $ do+getRandROutputDisplayEXT :: forall io . MonadIO io => PhysicalDevice -> ("dpy" ::: Ptr Display) -> RROutput -> io (DisplayKHR)+getRandROutputDisplayEXT physicalDevice dpy rrOutput = liftIO . evalContT $ do let vkGetRandROutputDisplayEXT' = mkVkGetRandROutputDisplayEXT (pVkGetRandROutputDisplayEXT (instanceCmds (physicalDevice :: PhysicalDevice))) pPDisplay <- ContT $ bracket (callocBytes @DisplayKHR 8) free _ <- lift $ vkGetRandROutputDisplayEXT' (physicalDeviceHandle (physicalDevice)) (dpy) (rrOutput) (pPDisplay)
src/Graphics/Vulkan/Extensions/VK_EXT_astc_decode_mode.hs view
@@ -49,8 +49,7 @@ -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_R8G8B8A8_UNORM' the -- image view /must/ not include blocks using any of the ASTC HDR modes ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' of the image view--- /must/ be one of+-- - @format@ of the image view /must/ be one of -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_ASTC_4x4_UNORM_BLOCK', -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_ASTC_4x4_SRGB_BLOCK', -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_ASTC_5x4_UNORM_BLOCK',@@ -81,8 +80,7 @@ -- or -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_ASTC_12x12_SRGB_BLOCK' ----- If 'Graphics.Vulkan.Core10.Enums.Format.Format' uses sRGB encoding then--- the @decodeMode@ has no effect.+-- If @format@ uses sRGB encoding then the @decodeMode@ has no effect. -- -- == Valid Usage (Implicit) --
src/Graphics/Vulkan/Extensions/VK_EXT_buffer_device_address.hs view
@@ -170,16 +170,14 @@ -- -- = Description ----- If 'Graphics.Vulkan.Core10.BaseType.DeviceAddress' is zero, no specific--- address is requested.+-- If @deviceAddress@ is zero, no specific address is requested. ----- If 'Graphics.Vulkan.Core10.BaseType.DeviceAddress' is not zero, then it--- /must/ be an address retrieved from an identically created buffer on the--- same implementation. The buffer /must/ also be bound to an identically--- created 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object.+-- If @deviceAddress@ is not zero, then it /must/ be an address retrieved+-- from an identically created buffer on the same implementation. The+-- buffer /must/ also be bound to an identically created+-- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object. ----- If this structure is not present, it is as if--- 'Graphics.Vulkan.Core10.BaseType.DeviceAddress' is zero.+-- If this structure is not present, it is as if @deviceAddress@ is zero. -- -- Apps /should/ avoid creating buffers with app-provided addresses and -- implementation-provided addresses in the same process, to reduce the@@ -192,8 +190,7 @@ -- 'Graphics.Vulkan.Core10.BaseType.DeviceAddress', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data BufferDeviceAddressCreateInfoEXT = BufferDeviceAddressCreateInfoEXT- { -- | 'Graphics.Vulkan.Core10.BaseType.DeviceAddress' is the device address- -- requested for the buffer.+ { -- | @deviceAddress@ is the device address requested for the buffer. deviceAddress :: DeviceAddress } deriving (Typeable) deriving instance Show BufferDeviceAddressCreateInfoEXT
src/Graphics/Vulkan/Extensions/VK_EXT_calibrated_timestamps.hs view
@@ -15,6 +15,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -36,6 +37,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -86,8 +88,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the set of calibrateable time domains.+-- - @physicalDevice@ is the physical device from which to query the set+-- of calibrateable time domains. -- -- - @pTimeDomainCount@ is a pointer to an integer related to the number -- of calibrateable time domains available or queried, as described@@ -100,8 +102,7 @@ -- = Description -- -- If @pTimeDomains@ is @NULL@, then the number of calibrateable time--- domains supported for the given--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is returned in+-- domains supported for the given @physicalDevice@ is returned in -- @pTimeDomainCount@. Otherwise, @pTimeDomainCount@ /must/ point to a -- variable set by the user to the number of elements in the @pTimeDomains@ -- array, and on return the variable is overwritten with the number of@@ -109,15 +110,14 @@ -- @pTimeDomainCount@ is less than the number of calibrateable time domains -- supported, at most @pTimeDomainCount@ values will be written to -- @pTimeDomains@. If @pTimeDomainCount@ is smaller than the number of--- calibrateable time domains supported for the given--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice',+-- calibrateable time domains supported for the given @physicalDevice@, -- 'Graphics.Vulkan.Core10.Enums.Result.INCOMPLETE' will be returned -- instead of 'Graphics.Vulkan.Core10.Enums.Result.SUCCESS' to indicate -- that not all the available values were returned. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pTimeDomainCount@ /must/ be a valid pointer to a @uint32_t@ value@@ -143,8 +143,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', 'TimeDomainEXT'-getPhysicalDeviceCalibrateableTimeDomainsEXT :: PhysicalDevice -> IO (Result, ("timeDomains" ::: Vector TimeDomainEXT))-getPhysicalDeviceCalibrateableTimeDomainsEXT physicalDevice = evalContT $ do+getPhysicalDeviceCalibrateableTimeDomainsEXT :: forall io . MonadIO io => PhysicalDevice -> io (Result, ("timeDomains" ::: Vector TimeDomainEXT))+getPhysicalDeviceCalibrateableTimeDomainsEXT physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceCalibrateableTimeDomainsEXT' = mkVkGetPhysicalDeviceCalibrateableTimeDomainsEXT (pVkGetPhysicalDeviceCalibrateableTimeDomainsEXT (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPTimeDomainCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -170,8 +170,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device used--- to perform the query.+-- - @device@ is the logical device used to perform the query. -- -- - @timestampCount@ is the number of timestamps to query. --@@ -221,8 +220,8 @@ -- = See Also -- -- 'CalibratedTimestampInfoEXT', 'Graphics.Vulkan.Core10.Handles.Device'-getCalibratedTimestampsEXT :: Device -> ("timestampInfos" ::: Vector CalibratedTimestampInfoEXT) -> IO (("timestamps" ::: Vector Word64), ("maxDeviation" ::: Word64))-getCalibratedTimestampsEXT device timestampInfos = evalContT $ do+getCalibratedTimestampsEXT :: forall io . MonadIO io => Device -> ("timestampInfos" ::: Vector CalibratedTimestampInfoEXT) -> io (("timestamps" ::: Vector Word64), ("maxDeviation" ::: Word64))+getCalibratedTimestampsEXT device timestampInfos = liftIO . evalContT $ do let vkGetCalibratedTimestampsEXT' = mkVkGetCalibratedTimestampsEXT (pVkGetCalibratedTimestampsEXT (deviceCmds (device :: Device))) pPTimestampInfos <- ContT $ allocaBytesAligned @CalibratedTimestampInfoEXT ((Data.Vector.length (timestampInfos)) * 24) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPTimestampInfos `plusPtr` (24 * (i)) :: Ptr CalibratedTimestampInfoEXT) (e) . ($ ())) (timestampInfos)
src/Graphics/Vulkan/Extensions/VK_EXT_conditional_rendering.hs view
@@ -1,5 +1,6 @@ {-# language CPP #-} module Graphics.Vulkan.Extensions.VK_EXT_conditional_rendering ( cmdBeginConditionalRenderingEXT+ , cmdWithConditionalRenderingEXT , cmdEndConditionalRenderingEXT , ConditionalRenderingBeginInfoEXT(..) , CommandBufferInheritanceConditionalRenderingInfoEXT(..)@@ -14,6 +15,8 @@ , pattern EXT_CONDITIONAL_RENDERING_EXTENSION_NAME ) where +import Control.Exception.Base (bracket_)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Ptr (nullPtr) import Foreign.Ptr (plusPtr)@@ -28,6 +31,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -74,8 +78,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which this command will be recorded.+-- - @commandBuffer@ is the command buffer into which this command will+-- be recorded. -- -- - @pConditionalRenderingBegin@ is a pointer to a -- 'ConditionalRenderingBeginInfoEXT' structure specifying parameters@@ -88,27 +92,25 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pConditionalRenderingBegin@ /must/ be a valid pointer to a valid -- 'ConditionalRenderingBeginInfoEXT' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -125,14 +127,22 @@ -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'ConditionalRenderingBeginInfoEXT'-cmdBeginConditionalRenderingEXT :: CommandBuffer -> ConditionalRenderingBeginInfoEXT -> IO ()-cmdBeginConditionalRenderingEXT commandBuffer conditionalRenderingBegin = evalContT $ do+cmdBeginConditionalRenderingEXT :: forall io . MonadIO io => CommandBuffer -> ConditionalRenderingBeginInfoEXT -> io ()+cmdBeginConditionalRenderingEXT commandBuffer conditionalRenderingBegin = liftIO . evalContT $ do let vkCmdBeginConditionalRenderingEXT' = mkVkCmdBeginConditionalRenderingEXT (pVkCmdBeginConditionalRenderingEXT (deviceCmds (commandBuffer :: CommandBuffer))) pConditionalRenderingBegin <- ContT $ withCStruct (conditionalRenderingBegin) lift $ vkCmdBeginConditionalRenderingEXT' (commandBufferHandle (commandBuffer)) pConditionalRenderingBegin pure $ () +-- | A safe wrapper for 'cmdBeginConditionalRenderingEXT' and+-- 'cmdEndConditionalRenderingEXT' using 'bracket_'+cmdWithConditionalRenderingEXT :: forall r . CommandBuffer -> ConditionalRenderingBeginInfoEXT -> IO r -> IO r+cmdWithConditionalRenderingEXT commandBuffer pConditionalRenderingBegin =+ bracket_+ (cmdBeginConditionalRenderingEXT commandBuffer pConditionalRenderingBegin)+ (cmdEndConditionalRenderingEXT commandBuffer) + foreign import ccall #if !defined(SAFE_FOREIGN_CALLS) unsafe@@ -145,8 +155,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which this command will be recorded.+-- - @commandBuffer@ is the command buffer into which this command will+-- be recorded. -- -- = Description --@@ -168,24 +178,22 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -201,8 +209,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdEndConditionalRenderingEXT :: CommandBuffer -> IO ()-cmdEndConditionalRenderingEXT commandBuffer = do+cmdEndConditionalRenderingEXT :: forall io . MonadIO io => CommandBuffer -> io ()+cmdEndConditionalRenderingEXT commandBuffer = liftIO $ do let vkCmdEndConditionalRenderingEXT' = mkVkCmdEndConditionalRenderingEXT (pVkCmdEndConditionalRenderingEXT (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdEndConditionalRenderingEXT' (commandBufferHandle (commandBuffer)) pure $ ()@@ -213,8 +221,7 @@ -- -- = Description ----- If the 32-bit value at @offset@ in--- 'Graphics.Vulkan.Core10.Handles.Buffer' memory is zero, then the+-- If the 32-bit value at @offset@ in @buffer@ memory is zero, then the -- rendering commands are discarded, otherwise they are executed as normal. -- If the value of the predicate in buffer memory changes while conditional -- rendering is active, the rendering commands /may/ be discarded in an@@ -224,17 +231,16 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is non-sparse then it--- /must/ be bound completely and contiguously to a single+-- - If @buffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ have been created--- with the+-- - @buffer@ /must/ have been created with the -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT' -- bit set ----- - @offset@ /must/ be less than the size of--- 'Graphics.Vulkan.Core10.Handles.Buffer' by at least 32 bits.+-- - @offset@ /must/ be less than the size of @buffer@ by at least 32+-- bits. -- -- - @offset@ /must/ be a multiple of 4 --@@ -245,11 +251,11 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of 'ConditionalRenderingFlagBitsEXT' values+-- - @flags@ /must/ be a valid combination of+-- 'ConditionalRenderingFlagBitsEXT' values -- -- = See Also --@@ -258,15 +264,13 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'cmdBeginConditionalRenderingEXT' data ConditionalRenderingBeginInfoEXT = ConditionalRenderingBeginInfoEXT- { -- | 'Graphics.Vulkan.Core10.Handles.Buffer' is a buffer containing the- -- predicate for conditional rendering.+ { -- | @buffer@ is a buffer containing the predicate for conditional rendering. buffer :: Buffer- , -- | @offset@ is the byte offset into 'Graphics.Vulkan.Core10.Handles.Buffer'- -- where the predicate is located.+ , -- | @offset@ is the byte offset into @buffer@ where the predicate is+ -- located. offset :: DeviceSize- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of- -- 'ConditionalRenderingFlagsEXT' specifying the behavior of conditional- -- rendering.+ , -- | @flags@ is a bitmask of 'ConditionalRenderingFlagsEXT' specifying the+ -- behavior of conditional rendering. flags :: ConditionalRenderingFlagsEXT } deriving (Typeable)@@ -458,9 +462,9 @@ -- | 'CONDITIONAL_RENDERING_INVERTED_BIT_EXT' specifies the condition used to -- determine whether to discard rendering commands or not. That is, if the--- 32-bit predicate read from 'Graphics.Vulkan.Core10.Handles.Buffer'--- memory at @offset@ is zero, the rendering commands are not discarded,--- and if non zero, then they are discarded.+-- 32-bit predicate read from @buffer@ memory at @offset@ is zero, the+-- rendering commands are not discarded, and if non zero, then they are+-- discarded. pattern CONDITIONAL_RENDERING_INVERTED_BIT_EXT = ConditionalRenderingFlagBitsEXT 0x00000001 type ConditionalRenderingFlagsEXT = ConditionalRenderingFlagBitsEXT
src/Graphics/Vulkan/Extensions/VK_EXT_conservative_rasterization.hs view
@@ -225,7 +225,7 @@ -- 'PipelineRasterizationConservativeStateCreateFlagsEXT', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PipelineRasterizationConservativeStateCreateInfoEXT = PipelineRasterizationConservativeStateCreateInfoEXT- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: PipelineRasterizationConservativeStateCreateFlagsEXT , -- | @conservativeRasterizationMode@ /must/ be a valid -- 'ConservativeRasterizationModeEXT' value
src/Graphics/Vulkan/Extensions/VK_EXT_debug_marker.hs view
@@ -14,6 +14,7 @@ , DebugReportObjectTypeEXT(..) ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import GHC.Base (when) import GHC.IO (throwIO)@@ -23,6 +24,7 @@ import Data.ByteString (useAsCString) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.C.Types (CChar)@@ -80,8 +82,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device that created--- the object.+-- - @device@ is the device that created the object. -- -- - @pNameInfo@ is a pointer to a 'DebugMarkerObjectNameInfoEXT' -- structure specifying the parameters of the name to set on the@@ -89,8 +90,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pNameInfo@ /must/ be a valid pointer to a valid -- 'DebugMarkerObjectNameInfoEXT' structure@@ -114,8 +115,8 @@ -- = See Also -- -- 'DebugMarkerObjectNameInfoEXT', 'Graphics.Vulkan.Core10.Handles.Device'-debugMarkerSetObjectNameEXT :: Device -> DebugMarkerObjectNameInfoEXT -> IO ()-debugMarkerSetObjectNameEXT device nameInfo = evalContT $ do+debugMarkerSetObjectNameEXT :: forall io . MonadIO io => Device -> DebugMarkerObjectNameInfoEXT -> io ()+debugMarkerSetObjectNameEXT device nameInfo = liftIO . evalContT $ do let vkDebugMarkerSetObjectNameEXT' = mkVkDebugMarkerSetObjectNameEXT (pVkDebugMarkerSetObjectNameEXT (deviceCmds (device :: Device))) pNameInfo <- ContT $ withCStruct (nameInfo) r <- lift $ vkDebugMarkerSetObjectNameEXT' (deviceHandle (device)) pNameInfo@@ -133,16 +134,15 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device that created--- the object.+-- - @device@ is the device that created the object. -- -- - @pTagInfo@ is a pointer to a 'DebugMarkerObjectTagInfoEXT' structure -- specifying the parameters of the tag to attach to the object. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pTagInfo@ /must/ be a valid pointer to a valid -- 'DebugMarkerObjectTagInfoEXT' structure@@ -166,8 +166,8 @@ -- = See Also -- -- 'DebugMarkerObjectTagInfoEXT', 'Graphics.Vulkan.Core10.Handles.Device'-debugMarkerSetObjectTagEXT :: Device -> DebugMarkerObjectTagInfoEXT -> IO ()-debugMarkerSetObjectTagEXT device tagInfo = evalContT $ do+debugMarkerSetObjectTagEXT :: forall io . MonadIO io => Device -> DebugMarkerObjectTagInfoEXT -> io ()+debugMarkerSetObjectTagEXT device tagInfo = liftIO . evalContT $ do let vkDebugMarkerSetObjectTagEXT' = mkVkDebugMarkerSetObjectTagEXT (pVkDebugMarkerSetObjectTagEXT (deviceCmds (device :: Device))) pTagInfo <- ContT $ withCStruct (tagInfo) r <- lift $ vkDebugMarkerSetObjectTagEXT' (deviceHandle (device)) pTagInfo@@ -185,32 +185,31 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. -- -- - @pMarkerInfo@ is a pointer to a 'DebugMarkerMarkerInfoEXT' structure -- specifying the parameters of the marker region to open. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pMarkerInfo@ /must/ be a valid pointer to a valid -- 'DebugMarkerMarkerInfoEXT' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations -- -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -227,8 +226,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'DebugMarkerMarkerInfoEXT'-cmdDebugMarkerBeginEXT :: CommandBuffer -> DebugMarkerMarkerInfoEXT -> IO ()-cmdDebugMarkerBeginEXT commandBuffer markerInfo = evalContT $ do+cmdDebugMarkerBeginEXT :: forall io . MonadIO io => CommandBuffer -> DebugMarkerMarkerInfoEXT -> io ()+cmdDebugMarkerBeginEXT commandBuffer markerInfo = liftIO . evalContT $ do let vkCmdDebugMarkerBeginEXT' = mkVkCmdDebugMarkerBeginEXT (pVkCmdDebugMarkerBeginEXT (deviceCmds (commandBuffer :: CommandBuffer))) pMarkerInfo <- ContT $ withCStruct (markerInfo) lift $ vkCmdDebugMarkerBeginEXT' (commandBufferHandle (commandBuffer)) pMarkerInfo@@ -246,8 +245,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. -- -- = Description --@@ -262,31 +261,29 @@ -- -- - There /must/ be an outstanding 'cmdDebugMarkerBeginEXT' command -- prior to the 'cmdDebugMarkerEndEXT' on the queue that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is submitted to+-- @commandBuffer@ is submitted to ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a secondary--- command buffer, there /must/ be an outstanding--- 'cmdDebugMarkerBeginEXT' command recorded to--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' that has not--- previously been ended by a call to 'cmdDebugMarkerEndEXT'.+-- - If @commandBuffer@ is a secondary command buffer, there /must/ be an+-- outstanding 'cmdDebugMarkerBeginEXT' command recorded to+-- @commandBuffer@ that has not previously been ended by a call to+-- 'cmdDebugMarkerEndEXT'. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations -- -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -302,8 +299,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdDebugMarkerEndEXT :: CommandBuffer -> IO ()-cmdDebugMarkerEndEXT commandBuffer = do+cmdDebugMarkerEndEXT :: forall io . MonadIO io => CommandBuffer -> io ()+cmdDebugMarkerEndEXT commandBuffer = liftIO $ do let vkCmdDebugMarkerEndEXT' = mkVkCmdDebugMarkerEndEXT (pVkCmdDebugMarkerEndEXT (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdDebugMarkerEndEXT' (commandBufferHandle (commandBuffer)) pure $ ()@@ -320,32 +317,31 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. -- -- - @pMarkerInfo@ is a pointer to a 'DebugMarkerMarkerInfoEXT' structure -- specifying the parameters of the marker to insert. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pMarkerInfo@ /must/ be a valid pointer to a valid -- 'DebugMarkerMarkerInfoEXT' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations -- -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -362,8 +358,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'DebugMarkerMarkerInfoEXT'-cmdDebugMarkerInsertEXT :: CommandBuffer -> DebugMarkerMarkerInfoEXT -> IO ()-cmdDebugMarkerInsertEXT commandBuffer markerInfo = evalContT $ do+cmdDebugMarkerInsertEXT :: forall io . MonadIO io => CommandBuffer -> DebugMarkerMarkerInfoEXT -> io ()+cmdDebugMarkerInsertEXT commandBuffer markerInfo = liftIO . evalContT $ do let vkCmdDebugMarkerInsertEXT' = mkVkCmdDebugMarkerInsertEXT (pVkCmdDebugMarkerInsertEXT (deviceCmds (commandBuffer :: CommandBuffer))) pMarkerInfo <- ContT $ withCStruct (markerInfo) lift $ vkCmdDebugMarkerInsertEXT' (commandBufferHandle (commandBuffer)) pMarkerInfo@@ -387,12 +383,12 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'debugMarkerSetObjectNameEXT' data DebugMarkerObjectNameInfoEXT = DebugMarkerObjectNameInfoEXT- { -- | 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' /must/ be a valid+ { -- | @objectType@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.VK_EXT_debug_report.DebugReportObjectTypeEXT' -- value objectType :: DebugReportObjectTypeEXT , -- | @object@ /must/ be a Vulkan object of the type associated with- -- 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' as defined in+ -- @objectType@ as defined in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#debug-report-object-types>. object :: Word64 , -- | @pObjectName@ /must/ be a null-terminated UTF-8 string@@ -454,12 +450,12 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'debugMarkerSetObjectTagEXT' data DebugMarkerObjectTagInfoEXT = DebugMarkerObjectTagInfoEXT- { -- | 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' /must/ be a valid+ { -- | @objectType@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.VK_EXT_debug_report.DebugReportObjectTypeEXT' -- value objectType :: DebugReportObjectTypeEXT , -- | @object@ /must/ be a Vulkan object of the type associated with- -- 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' as defined in+ -- @objectType@ as defined in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#debug-report-object-types>. object :: Word64 , -- | @tagName@ is a numerical identifier of the tag.
src/Graphics/Vulkan/Extensions/VK_EXT_debug_report.hs view
@@ -62,6 +62,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -82,13 +83,14 @@ import Data.ByteString (useAsCString) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Foreign.C.Types (CChar(..))+import Foreign.C.Types (CSize(..))+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.C.Types (CChar)-import Foreign.C.Types (CChar(..)) import Foreign.C.Types (CSize)-import Foreign.C.Types (CSize(..)) import Foreign.C.Types (CSize(CSize)) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -139,8 +141,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' the instance the callback--- will be logged on.+-- - @instance@ the instance the callback will be logged on. -- -- - @pCreateInfo@ is a pointer to a 'DebugReportCallbackCreateInfoEXT' -- structure defining the conditions under which this callback will be@@ -156,7 +157,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -186,8 +187,8 @@ -- 'DebugReportCallbackCreateInfoEXT', -- 'Graphics.Vulkan.Extensions.Handles.DebugReportCallbackEXT', -- 'Graphics.Vulkan.Core10.Handles.Instance'-createDebugReportCallbackEXT :: Instance -> DebugReportCallbackCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (DebugReportCallbackEXT)-createDebugReportCallbackEXT instance' createInfo allocator = evalContT $ do+createDebugReportCallbackEXT :: forall io . MonadIO io => Instance -> DebugReportCallbackCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io (DebugReportCallbackEXT)+createDebugReportCallbackEXT instance' createInfo allocator = liftIO . evalContT $ do let vkCreateDebugReportCallbackEXT' = mkVkCreateDebugReportCallbackEXT (pVkCreateDebugReportCallbackEXT (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -203,11 +204,11 @@ -- 'destroyDebugReportCallbackEXT' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withDebugReportCallbackEXT :: Instance -> DebugReportCallbackCreateInfoEXT -> Maybe AllocationCallbacks -> (DebugReportCallbackEXT -> IO r) -> IO r-withDebugReportCallbackEXT instance' debugReportCallbackCreateInfoEXT allocationCallbacks =+withDebugReportCallbackEXT :: forall r . Instance -> DebugReportCallbackCreateInfoEXT -> Maybe AllocationCallbacks -> ((DebugReportCallbackEXT) -> IO r) -> IO r+withDebugReportCallbackEXT instance' pCreateInfo pAllocator = bracket- (createDebugReportCallbackEXT instance' debugReportCallbackCreateInfoEXT allocationCallbacks)- (\o -> destroyDebugReportCallbackEXT instance' o allocationCallbacks)+ (createDebugReportCallbackEXT instance' pCreateInfo pAllocator)+ (\(o0) -> destroyDebugReportCallbackEXT instance' o0 pAllocator) foreign import ccall@@ -221,8 +222,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' the instance where the--- callback was created.+-- - @instance@ the instance where the callback was created. -- -- - @callback@ the -- 'Graphics.Vulkan.Extensions.Handles.DebugReportCallbackEXT' object@@ -248,7 +248,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @callback@ /must/ be a valid@@ -260,7 +260,7 @@ -- structure -- -- - @callback@ /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Instance'+-- @instance@ -- -- == Host Synchronization --@@ -271,8 +271,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Extensions.Handles.DebugReportCallbackEXT', -- 'Graphics.Vulkan.Core10.Handles.Instance'-destroyDebugReportCallbackEXT :: Instance -> DebugReportCallbackEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyDebugReportCallbackEXT instance' callback allocator = evalContT $ do+destroyDebugReportCallbackEXT :: forall io . MonadIO io => Instance -> DebugReportCallbackEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyDebugReportCallbackEXT instance' callback allocator = liftIO . evalContT $ do let vkDestroyDebugReportCallbackEXT' = mkVkDestroyDebugReportCallbackEXT (pVkDestroyDebugReportCallbackEXT (instanceCmds (instance' :: Instance))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -292,15 +292,14 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the debug stream’s+-- - @instance@ is the debug stream’s -- 'Graphics.Vulkan.Core10.Handles.Instance'. ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' specifies the--- 'DebugReportFlagBitsEXT' classification of this event\/message.+-- - @flags@ specifies the 'DebugReportFlagBitsEXT' classification of+-- this event\/message. ----- - 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' is a--- 'DebugReportObjectTypeEXT' specifying the type of object being used--- or created at the time the event was triggered.+-- - @objectType@ is a 'DebugReportObjectTypeEXT' specifying the type of+-- object being used or created at the time the event was triggered. -- -- - @object@ this is the object where the issue was detected. @object@ -- /can/ be 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' if there@@ -328,25 +327,23 @@ -- - @object@ /must/ be a Vulkan object or -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' ----- - If 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' is not--- 'DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT' and @object@ is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @object@ /must/--- be a Vulkan object of the corresponding type associated with--- 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' as defined in+-- - If @objectType@ is not 'DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT' and+-- @object@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @object@ /must/ be a Vulkan object of the corresponding type+-- associated with @objectType@ as defined in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#debug-report-object-types>. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of 'DebugReportFlagBitsEXT' values+-- - @flags@ /must/ be a valid combination of 'DebugReportFlagBitsEXT'+-- values ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not be @0@+-- - @flags@ /must/ not be @0@ ----- - 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' /must/ be a--- valid 'DebugReportObjectTypeEXT' value+-- - @objectType@ /must/ be a valid 'DebugReportObjectTypeEXT' value -- -- - @pLayerPrefix@ /must/ be a null-terminated UTF-8 string --@@ -356,8 +353,8 @@ -- -- 'DebugReportFlagsEXT', 'DebugReportObjectTypeEXT', -- 'Graphics.Vulkan.Core10.Handles.Instance'-debugReportMessageEXT :: Instance -> DebugReportFlagsEXT -> DebugReportObjectTypeEXT -> ("object" ::: Word64) -> ("location" ::: Word64) -> ("messageCode" ::: Int32) -> ("layerPrefix" ::: ByteString) -> ("message" ::: ByteString) -> IO ()-debugReportMessageEXT instance' flags objectType object location messageCode layerPrefix message = evalContT $ do+debugReportMessageEXT :: forall io . MonadIO io => Instance -> DebugReportFlagsEXT -> DebugReportObjectTypeEXT -> ("object" ::: Word64) -> ("location" ::: Word64) -> ("messageCode" ::: Int32) -> ("layerPrefix" ::: ByteString) -> ("message" ::: ByteString) -> io ()+debugReportMessageEXT instance' flags objectType object location messageCode layerPrefix message = liftIO . evalContT $ do let vkDebugReportMessageEXT' = mkVkDebugReportMessageEXT (pVkDebugReportMessageEXT (instanceCmds (instance' :: Instance))) pLayerPrefix <- ContT $ useAsCString (layerPrefix) pMessage <- ContT $ useAsCString (message)@@ -375,8 +372,7 @@ -- = Description -- -- For each 'Graphics.Vulkan.Extensions.Handles.DebugReportCallbackEXT'--- that is created the--- 'DebugReportCallbackCreateInfoEXT'::'Graphics.Vulkan.Core10.BaseType.Flags'+-- that is created the 'DebugReportCallbackCreateInfoEXT'::@flags@ -- determine when that 'DebugReportCallbackCreateInfoEXT'::@pfnCallback@ is -- called. When an event happens, the implementation will do a bitwise AND -- of the event’s 'DebugReportFlagBitsEXT' flags to each@@ -403,8 +399,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createDebugReportCallbackEXT' data DebugReportCallbackCreateInfoEXT = DebugReportCallbackCreateInfoEXT- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid combination of- -- 'DebugReportFlagBitsEXT' values+ { -- | @flags@ /must/ be a valid combination of 'DebugReportFlagBitsEXT' values flags :: DebugReportFlagsEXT , -- | @pfnCallback@ /must/ be a valid 'PFN_vkDebugReportCallbackEXT' value pfnCallback :: PFN_vkDebugReportCallbackEXT@@ -810,16 +805,15 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' specifies the--- 'DebugReportFlagBitsEXT' that triggered this callback.+-- - @flags@ specifies the 'DebugReportFlagBitsEXT' that triggered this+-- callback. ----- - 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' is a--- 'DebugReportObjectTypeEXT' value specifying the type of object being--- used or created at the time the event was triggered.+-- - @objectType@ is a 'DebugReportObjectTypeEXT' value specifying the+-- type of object being used or created at the time the event was+-- triggered. ----- - @object@ is the object where the issue was detected. If--- 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' is--- 'DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT', @object@ is undefined.+-- - @object@ is the object where the issue was detected. If @objectType@+-- is 'DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT', @object@ is undefined. -- -- - @location@ is a component (layer, driver, loader) defined value -- specifying the /location/ of the trigger. This is an /optional/@@ -851,12 +845,11 @@ -- layer development. -- -- @object@ /must/ be a Vulkan object or--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'. If--- 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' is not--- 'DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT' and @object@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'. If @objectType@ is+-- not 'DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT' and @object@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @object@ /must/ be a--- Vulkan object of the corresponding type associated with--- 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' as defined in+-- Vulkan object of the corresponding type associated with @objectType@ as+-- defined in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#debug-report-object-types>. -- -- = See Also
src/Graphics/Vulkan/Extensions/VK_EXT_debug_utils.hs view
@@ -5,6 +5,7 @@ , queueEndDebugUtilsLabelEXT , queueInsertDebugUtilsLabelEXT , cmdBeginDebugUtilsLabelEXT+ , cmdWithDebugUtilsLabelEXT , cmdEndDebugUtilsLabelEXT , cmdInsertDebugUtilsLabelEXT , createDebugUtilsMessengerEXT@@ -41,6 +42,8 @@ ) where import Control.Exception.Base (bracket)+import Control.Exception.Base (bracket_)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -65,6 +68,7 @@ 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)@@ -149,8 +153,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device that created--- the object.+-- - @device@ is the device that created the object. -- -- - @pNameInfo@ is a pointer to a 'DebugUtilsObjectNameInfoEXT' -- structure specifying parameters of the name to set on the object.@@ -165,8 +168,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pNameInfo@ /must/ be a valid pointer to a valid -- 'DebugUtilsObjectNameInfoEXT' structure@@ -191,8 +194,8 @@ -- = See Also -- -- 'DebugUtilsObjectNameInfoEXT', 'Graphics.Vulkan.Core10.Handles.Device'-setDebugUtilsObjectNameEXT :: Device -> DebugUtilsObjectNameInfoEXT -> IO ()-setDebugUtilsObjectNameEXT device nameInfo = evalContT $ do+setDebugUtilsObjectNameEXT :: forall io . MonadIO io => Device -> DebugUtilsObjectNameInfoEXT -> io ()+setDebugUtilsObjectNameEXT device nameInfo = liftIO . evalContT $ do let vkSetDebugUtilsObjectNameEXT' = mkVkSetDebugUtilsObjectNameEXT (pVkSetDebugUtilsObjectNameEXT (deviceCmds (device :: Device))) pNameInfo <- ContT $ withCStruct (nameInfo) r <- lift $ vkSetDebugUtilsObjectNameEXT' (deviceHandle (device)) pNameInfo@@ -210,16 +213,15 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device that created--- the object.+-- - @device@ is the device that created the object. -- -- - @pTagInfo@ is a pointer to a 'DebugUtilsObjectTagInfoEXT' structure -- specifying parameters of the tag to attach to the object. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pTagInfo@ /must/ be a valid pointer to a valid -- 'DebugUtilsObjectTagInfoEXT' structure@@ -244,8 +246,8 @@ -- = See Also -- -- 'DebugUtilsObjectTagInfoEXT', 'Graphics.Vulkan.Core10.Handles.Device'-setDebugUtilsObjectTagEXT :: Device -> DebugUtilsObjectTagInfoEXT -> IO ()-setDebugUtilsObjectTagEXT device tagInfo = evalContT $ do+setDebugUtilsObjectTagEXT :: forall io . MonadIO io => Device -> DebugUtilsObjectTagInfoEXT -> io ()+setDebugUtilsObjectTagEXT device tagInfo = liftIO . evalContT $ do let vkSetDebugUtilsObjectTagEXT' = mkVkSetDebugUtilsObjectTagEXT (pVkSetDebugUtilsObjectTagEXT (deviceCmds (device :: Device))) pTagInfo <- ContT $ withCStruct (tagInfo) r <- lift $ vkSetDebugUtilsObjectTagEXT' (deviceHandle (device)) pTagInfo@@ -263,8 +265,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Queue' is the queue in which to--- start a debug label region.+-- - @queue@ is the queue in which to start a debug label region. -- -- - @pLabelInfo@ is a pointer to a 'DebugUtilsLabelEXT' structure -- specifying parameters of the label region to open.@@ -282,8 +283,8 @@ -- = See Also -- -- 'DebugUtilsLabelEXT', 'Graphics.Vulkan.Core10.Handles.Queue'-queueBeginDebugUtilsLabelEXT :: Queue -> ("labelInfo" ::: DebugUtilsLabelEXT) -> IO ()-queueBeginDebugUtilsLabelEXT queue labelInfo = evalContT $ do+queueBeginDebugUtilsLabelEXT :: forall io . MonadIO io => Queue -> ("labelInfo" ::: DebugUtilsLabelEXT) -> io ()+queueBeginDebugUtilsLabelEXT queue labelInfo = liftIO . evalContT $ do let vkQueueBeginDebugUtilsLabelEXT' = mkVkQueueBeginDebugUtilsLabelEXT (pVkQueueBeginDebugUtilsLabelEXT (deviceCmds (queue :: Queue))) pLabelInfo <- ContT $ withCStruct (labelInfo) lift $ vkQueueBeginDebugUtilsLabelEXT' (queueHandle (queue)) pLabelInfo@@ -301,8 +302,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Queue' is the queue in which a debug--- label region should be closed.+-- - @queue@ is the queue in which a debug label region should be closed. -- -- = Description --@@ -316,8 +316,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Queue' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Queue' handle+-- - @queue@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Queue'+-- handle -- -- == Command Properties --@@ -332,8 +332,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Queue'-queueEndDebugUtilsLabelEXT :: Queue -> IO ()-queueEndDebugUtilsLabelEXT queue = do+queueEndDebugUtilsLabelEXT :: forall io . MonadIO io => Queue -> io ()+queueEndDebugUtilsLabelEXT queue = liftIO $ do let vkQueueEndDebugUtilsLabelEXT' = mkVkQueueEndDebugUtilsLabelEXT (pVkQueueEndDebugUtilsLabelEXT (deviceCmds (queue :: Queue))) vkQueueEndDebugUtilsLabelEXT' (queueHandle (queue)) pure $ ()@@ -350,8 +350,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Queue' is the queue into which a--- debug label will be inserted.+-- - @queue@ is the queue into which a debug label will be inserted. -- -- - @pLabelInfo@ is a pointer to a 'DebugUtilsLabelEXT' structure -- specifying parameters of the label to insert.@@ -369,8 +368,8 @@ -- = See Also -- -- 'DebugUtilsLabelEXT', 'Graphics.Vulkan.Core10.Handles.Queue'-queueInsertDebugUtilsLabelEXT :: Queue -> ("labelInfo" ::: DebugUtilsLabelEXT) -> IO ()-queueInsertDebugUtilsLabelEXT queue labelInfo = evalContT $ do+queueInsertDebugUtilsLabelEXT :: forall io . MonadIO io => Queue -> ("labelInfo" ::: DebugUtilsLabelEXT) -> io ()+queueInsertDebugUtilsLabelEXT queue labelInfo = liftIO . evalContT $ do let vkQueueInsertDebugUtilsLabelEXT' = mkVkQueueInsertDebugUtilsLabelEXT (pVkQueueInsertDebugUtilsLabelEXT (deviceCmds (queue :: Queue))) pLabelInfo <- ContT $ withCStruct (labelInfo) lift $ vkQueueInsertDebugUtilsLabelEXT' (queueHandle (queue)) pLabelInfo@@ -388,32 +387,31 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. -- -- - @pLabelInfo@ is a pointer to a 'DebugUtilsLabelEXT' structure -- specifying parameters of the label region to open. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pLabelInfo@ /must/ be a valid pointer to a valid -- 'DebugUtilsLabelEXT' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations -- -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -429,14 +427,22 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'DebugUtilsLabelEXT'-cmdBeginDebugUtilsLabelEXT :: CommandBuffer -> ("labelInfo" ::: DebugUtilsLabelEXT) -> IO ()-cmdBeginDebugUtilsLabelEXT commandBuffer labelInfo = evalContT $ do+cmdBeginDebugUtilsLabelEXT :: forall io . MonadIO io => CommandBuffer -> ("labelInfo" ::: DebugUtilsLabelEXT) -> io ()+cmdBeginDebugUtilsLabelEXT commandBuffer labelInfo = liftIO . evalContT $ do let vkCmdBeginDebugUtilsLabelEXT' = mkVkCmdBeginDebugUtilsLabelEXT (pVkCmdBeginDebugUtilsLabelEXT (deviceCmds (commandBuffer :: CommandBuffer))) pLabelInfo <- ContT $ withCStruct (labelInfo) lift $ vkCmdBeginDebugUtilsLabelEXT' (commandBufferHandle (commandBuffer)) pLabelInfo pure $ () +-- | A safe wrapper for 'cmdBeginDebugUtilsLabelEXT' and+-- 'cmdEndDebugUtilsLabelEXT' using 'bracket_'+cmdWithDebugUtilsLabelEXT :: forall r . CommandBuffer -> DebugUtilsLabelEXT -> IO r -> IO r+cmdWithDebugUtilsLabelEXT commandBuffer pLabelInfo =+ bracket_+ (cmdBeginDebugUtilsLabelEXT commandBuffer pLabelInfo)+ (cmdEndDebugUtilsLabelEXT commandBuffer) + foreign import ccall #if !defined(SAFE_FOREIGN_CALLS) unsafe@@ -448,8 +454,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. -- -- = Description --@@ -464,31 +470,29 @@ -- -- - There /must/ be an outstanding 'cmdBeginDebugUtilsLabelEXT' command -- prior to the 'cmdEndDebugUtilsLabelEXT' on the queue that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is submitted to+-- @commandBuffer@ is submitted to ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a secondary--- command buffer, there /must/ be an outstanding--- 'cmdBeginDebugUtilsLabelEXT' command recorded to--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' that has not--- previously been ended by a call to 'cmdEndDebugUtilsLabelEXT'.+-- - If @commandBuffer@ is a secondary command buffer, there /must/ be an+-- outstanding 'cmdBeginDebugUtilsLabelEXT' command recorded to+-- @commandBuffer@ that has not previously been ended by a call to+-- 'cmdEndDebugUtilsLabelEXT'. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations -- -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -504,8 +508,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdEndDebugUtilsLabelEXT :: CommandBuffer -> IO ()-cmdEndDebugUtilsLabelEXT commandBuffer = do+cmdEndDebugUtilsLabelEXT :: forall io . MonadIO io => CommandBuffer -> io ()+cmdEndDebugUtilsLabelEXT commandBuffer = liftIO $ do let vkCmdEndDebugUtilsLabelEXT' = mkVkCmdEndDebugUtilsLabelEXT (pVkCmdEndDebugUtilsLabelEXT (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdEndDebugUtilsLabelEXT' (commandBufferHandle (commandBuffer)) pure $ ()@@ -522,32 +526,31 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. -- -- - @pInfo@ is a pointer to a 'DebugUtilsLabelEXT' structure specifying -- parameters of the label to insert. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pLabelInfo@ /must/ be a valid pointer to a valid -- 'DebugUtilsLabelEXT' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations -- -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -563,8 +566,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'DebugUtilsLabelEXT'-cmdInsertDebugUtilsLabelEXT :: CommandBuffer -> ("labelInfo" ::: DebugUtilsLabelEXT) -> IO ()-cmdInsertDebugUtilsLabelEXT commandBuffer labelInfo = evalContT $ do+cmdInsertDebugUtilsLabelEXT :: forall io . MonadIO io => CommandBuffer -> ("labelInfo" ::: DebugUtilsLabelEXT) -> io ()+cmdInsertDebugUtilsLabelEXT commandBuffer labelInfo = liftIO . evalContT $ do let vkCmdInsertDebugUtilsLabelEXT' = mkVkCmdInsertDebugUtilsLabelEXT (pVkCmdInsertDebugUtilsLabelEXT (deviceCmds (commandBuffer :: CommandBuffer))) pLabelInfo <- ContT $ withCStruct (labelInfo) lift $ vkCmdInsertDebugUtilsLabelEXT' (commandBufferHandle (commandBuffer)) pLabelInfo@@ -582,8 +585,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' the instance the messenger--- will be used with.+-- - @instance@ the instance the messenger will be used with. -- -- - @pCreateInfo@ is a pointer to a 'DebugUtilsMessengerCreateInfoEXT' -- structure containing the callback pointer, as well as defining@@ -599,7 +601,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -625,8 +627,7 @@ -- -- The application /must/ ensure that 'createDebugUtilsMessengerEXT' is not -- executed in parallel with any Vulkan command that is also called with--- 'Graphics.Vulkan.Core10.Handles.Instance' or child of--- 'Graphics.Vulkan.Core10.Handles.Instance' as the dispatchable argument.+-- @instance@ or child of @instance@ as the dispatchable argument. -- -- = See Also --@@ -634,8 +635,8 @@ -- 'DebugUtilsMessengerCreateInfoEXT', -- 'Graphics.Vulkan.Extensions.Handles.DebugUtilsMessengerEXT', -- 'Graphics.Vulkan.Core10.Handles.Instance'-createDebugUtilsMessengerEXT :: Instance -> DebugUtilsMessengerCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (DebugUtilsMessengerEXT)-createDebugUtilsMessengerEXT instance' createInfo allocator = evalContT $ do+createDebugUtilsMessengerEXT :: forall io . MonadIO io => Instance -> DebugUtilsMessengerCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io (DebugUtilsMessengerEXT)+createDebugUtilsMessengerEXT instance' createInfo allocator = liftIO . evalContT $ do let vkCreateDebugUtilsMessengerEXT' = mkVkCreateDebugUtilsMessengerEXT (pVkCreateDebugUtilsMessengerEXT (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -651,11 +652,11 @@ -- 'destroyDebugUtilsMessengerEXT' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withDebugUtilsMessengerEXT :: Instance -> DebugUtilsMessengerCreateInfoEXT -> Maybe AllocationCallbacks -> (DebugUtilsMessengerEXT -> IO r) -> IO r-withDebugUtilsMessengerEXT instance' debugUtilsMessengerCreateInfoEXT allocationCallbacks =+withDebugUtilsMessengerEXT :: forall r . Instance -> DebugUtilsMessengerCreateInfoEXT -> Maybe AllocationCallbacks -> ((DebugUtilsMessengerEXT) -> IO r) -> IO r+withDebugUtilsMessengerEXT instance' pCreateInfo pAllocator = bracket- (createDebugUtilsMessengerEXT instance' debugUtilsMessengerCreateInfoEXT allocationCallbacks)- (\o -> destroyDebugUtilsMessengerEXT instance' o allocationCallbacks)+ (createDebugUtilsMessengerEXT instance' pCreateInfo pAllocator)+ (\(o0) -> destroyDebugUtilsMessengerEXT instance' o0 pAllocator) foreign import ccall@@ -669,8 +670,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' the instance where the--- callback was created.+-- - @instance@ the instance where the callback was created. -- -- - @messenger@ the -- 'Graphics.Vulkan.Extensions.Handles.DebugUtilsMessengerEXT' object@@ -696,7 +696,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @messenger@ /must/ be a valid@@ -708,7 +708,7 @@ -- structure -- -- - @messenger@ /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Instance'+-- @instance@ -- -- == Host Synchronization --@@ -716,16 +716,15 @@ -- -- The application /must/ ensure that 'destroyDebugUtilsMessengerEXT' is -- not executed in parallel with any Vulkan command that is also called--- with 'Graphics.Vulkan.Core10.Handles.Instance' or child of--- 'Graphics.Vulkan.Core10.Handles.Instance' as the dispatchable argument.+-- with @instance@ or child of @instance@ as the dispatchable argument. -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Extensions.Handles.DebugUtilsMessengerEXT', -- 'Graphics.Vulkan.Core10.Handles.Instance'-destroyDebugUtilsMessengerEXT :: Instance -> DebugUtilsMessengerEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyDebugUtilsMessengerEXT instance' messenger allocator = evalContT $ do+destroyDebugUtilsMessengerEXT :: forall io . MonadIO io => Instance -> DebugUtilsMessengerEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyDebugUtilsMessengerEXT instance' messenger allocator = liftIO . evalContT $ do let vkDestroyDebugUtilsMessengerEXT' = mkVkDestroyDebugUtilsMessengerEXT (pVkDestroyDebugUtilsMessengerEXT (instanceCmds (instance' :: Instance))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -745,7 +744,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the debug stream’s+-- - @instance@ is the debug stream’s -- 'Graphics.Vulkan.Core10.Handles.Instance'. -- -- - @messageSeverity@ is the 'DebugUtilsMessageSeverityFlagBitsEXT'@@ -766,13 +765,13 @@ -- -- == Valid Usage ----- - The 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' member of--- each element of @pCallbackData->pObjects@ /must/ not be+-- - The @objectType@ member of each element of @pCallbackData->pObjects@+-- /must/ not be -- 'Graphics.Vulkan.Core10.Enums.ObjectType.OBJECT_TYPE_UNKNOWN' -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @messageSeverity@ /must/ be a valid@@ -791,8 +790,8 @@ -- 'DebugUtilsMessageSeverityFlagBitsEXT', 'DebugUtilsMessageTypeFlagsEXT', -- 'DebugUtilsMessengerCallbackDataEXT', -- 'Graphics.Vulkan.Core10.Handles.Instance'-submitDebugUtilsMessageEXT :: Instance -> DebugUtilsMessageSeverityFlagBitsEXT -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> DebugUtilsMessengerCallbackDataEXT -> IO ()-submitDebugUtilsMessageEXT instance' messageSeverity messageTypes callbackData = evalContT $ do+submitDebugUtilsMessageEXT :: forall io . MonadIO io => Instance -> DebugUtilsMessageSeverityFlagBitsEXT -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> DebugUtilsMessengerCallbackDataEXT -> io ()+submitDebugUtilsMessageEXT instance' messageSeverity messageTypes callbackData = liftIO . evalContT $ do let vkSubmitDebugUtilsMessageEXT' = mkVkSubmitDebugUtilsMessageEXT (pVkSubmitDebugUtilsMessageEXT (instanceCmds (instance' :: Instance))) pCallbackData <- ContT $ withCStruct (callbackData) lift $ vkSubmitDebugUtilsMessageEXT' (instanceHandle (instance')) (messageSeverity) (messageTypes) pCallbackData@@ -811,18 +810,16 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' is+-- - If @objectType@ is -- 'Graphics.Vulkan.Core10.Enums.ObjectType.OBJECT_TYPE_UNKNOWN', -- @objectHandle@ /must/ not be -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' ----- - If 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' is not+-- - If @objectType@ is not -- 'Graphics.Vulkan.Core10.Enums.ObjectType.OBJECT_TYPE_UNKNOWN', -- @objectHandle@ /must/ be -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a valid Vulkan--- handle of the type associated with--- 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' as defined in--- the+-- handle of the type associated with @objectType@ as defined in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#debugging-object-types VkObjectType and Vulkan Handle Relationship> -- table --@@ -833,8 +830,8 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' /must/ be a--- valid 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' value+-- - @objectType@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' value -- -- - @pObjectName@ /must/ be a null-terminated UTF-8 string --@@ -845,9 +842,8 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'setDebugUtilsObjectNameEXT' data DebugUtilsObjectNameInfoEXT = DebugUtilsObjectNameInfoEXT- { -- | 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' is a- -- 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' specifying the type- -- of the object to be named.+ { -- | @objectType@ is a 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType'+ -- specifying the type of the object to be named. objectType :: ObjectType , -- | @objectHandle@ is the object to be named. objectHandle :: Word64@@ -911,12 +907,11 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'setDebugUtilsObjectTagEXT' data DebugUtilsObjectTagInfoEXT = DebugUtilsObjectTagInfoEXT- { -- | 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' /must/ be a valid+ { -- | @objectType@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' value objectType :: ObjectType , -- | @objectHandle@ /must/ be a valid Vulkan handle of the type associated- -- with 'Graphics.Vulkan.Core10.Enums.ObjectType.ObjectType' as defined in- -- the+ -- with @objectType@ as defined in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#debugging-object-types VkObjectType and Vulkan Handle Relationship> -- table objectHandle :: Word64@@ -1092,7 +1087,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createDebugUtilsMessengerEXT' data DebugUtilsMessengerCreateInfoEXT = DebugUtilsMessengerCreateInfoEXT- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: DebugUtilsMessengerCreateFlagsEXT , -- | @messageSeverity@ /must/ not be @0@ messageSeverity :: DebugUtilsMessageSeverityFlagsEXT@@ -1195,7 +1190,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - If @pMessageIdName@ is not @NULL@, @pMessageIdName@ /must/ be a -- null-terminated UTF-8 string@@ -1221,8 +1216,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'submitDebugUtilsMessageEXT' data DebugUtilsMessengerCallbackDataEXT = DebugUtilsMessengerCallbackDataEXT- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is 0 and reserved for future- -- use.+ { -- | @flags@ is 0 and reserved for future use. flags :: DebugUtilsMessengerCallbackDataFlagsEXT , -- | @pMessageIdName@ is a null-terminated string that identifies the -- particular message ID that is associated with the provided message. If
src/Graphics/Vulkan/Extensions/VK_EXT_depth_clip_enable.hs view
@@ -122,7 +122,7 @@ -- 'PipelineRasterizationDepthClipStateCreateFlagsEXT', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PipelineRasterizationDepthClipStateCreateInfoEXT = PipelineRasterizationDepthClipStateCreateInfoEXT- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: PipelineRasterizationDepthClipStateCreateFlagsEXT , -- | @depthClipEnable@ controls whether depth clipping is enabled as -- described in
src/Graphics/Vulkan/Extensions/VK_EXT_direct_mode_display.hs view
@@ -7,6 +7,8 @@ , DisplayKHR(..) ) where +import Control.Monad.IO.Class (liftIO)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Foreign.Ptr (FunPtr) import Foreign.Ptr (Ptr)@@ -30,11 +32,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' The physical device--- the display is on.+-- - @physicalDevice@ The physical device the display is on. ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' The display to release--- control of.+-- - @display@ The display to release control of. -- -- == Return Codes --@@ -46,8 +46,8 @@ -- -- 'Graphics.Vulkan.Extensions.Handles.DisplayKHR', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-releaseDisplayEXT :: PhysicalDevice -> DisplayKHR -> IO ()-releaseDisplayEXT physicalDevice display = do+releaseDisplayEXT :: forall io . MonadIO io => PhysicalDevice -> DisplayKHR -> io ()+releaseDisplayEXT physicalDevice display = liftIO $ do let vkReleaseDisplayEXT' = mkVkReleaseDisplayEXT (pVkReleaseDisplayEXT (instanceCmds (physicalDevice :: PhysicalDevice))) _ <- vkReleaseDisplayEXT' (physicalDeviceHandle (physicalDevice)) (display) pure $ ()
src/Graphics/Vulkan/Extensions/VK_EXT_discard_rectangles.hs view
@@ -13,6 +13,7 @@ , pattern EXT_DISCARD_RECTANGLES_EXTENSION_NAME ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Utils (maybePeek) import Foreign.Ptr (nullPtr)@@ -32,6 +33,7 @@ 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.Either (Either) import Data.String (IsString)@@ -77,8 +79,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @firstDiscardRectangle@ is the index of the first discard rectangle -- whose state is updated by the command.@@ -118,30 +120,28 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pDiscardRectangles@ /must/ be a valid pointer to an array of -- @discardRectangleCount@ -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.Rect2D' structures ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - @discardRectangleCount@ /must/ be greater than @0@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -158,8 +158,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.Rect2D'-cmdSetDiscardRectangleEXT :: CommandBuffer -> ("firstDiscardRectangle" ::: Word32) -> ("discardRectangles" ::: Vector Rect2D) -> IO ()-cmdSetDiscardRectangleEXT commandBuffer firstDiscardRectangle discardRectangles = evalContT $ do+cmdSetDiscardRectangleEXT :: forall io . MonadIO io => CommandBuffer -> ("firstDiscardRectangle" ::: Word32) -> ("discardRectangles" ::: Vector Rect2D) -> io ()+cmdSetDiscardRectangleEXT commandBuffer firstDiscardRectangle discardRectangles = liftIO . evalContT $ do let vkCmdSetDiscardRectangleEXT' = mkVkCmdSetDiscardRectangleEXT (pVkCmdSetDiscardRectangleEXT (deviceCmds (commandBuffer :: CommandBuffer))) pPDiscardRectangles <- ContT $ allocaBytesAligned @Rect2D ((Data.Vector.length (discardRectangles)) * 16) 4 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPDiscardRectangles `plusPtr` (16 * (i)) :: Ptr Rect2D) (e) . ($ ())) (discardRectangles)@@ -238,7 +238,7 @@ -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.Rect2D', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PipelineDiscardRectangleStateCreateInfoEXT = PipelineDiscardRectangleStateCreateInfoEXT- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: PipelineDiscardRectangleStateCreateFlagsEXT , -- | @discardRectangleMode@ /must/ be a valid 'DiscardRectangleModeEXT' value discardRectangleMode :: DiscardRectangleModeEXT
src/Graphics/Vulkan/Extensions/VK_EXT_display_control.hs view
@@ -29,6 +29,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -47,6 +48,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -109,30 +111,26 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is a logical device--- associated with 'Graphics.Vulkan.Extensions.WSITypes.Display'.+-- - @device@ is a logical device associated with @display@. ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' is the display whose--- power state is modified.+-- - @display@ is the display whose power state is modified. -- -- - @pDisplayPowerInfo@ is a 'DisplayPowerInfoEXT' structure specifying--- the new power state of--- 'Graphics.Vulkan.Extensions.WSITypes.Display'.+-- the new power state of @display@. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' /must/ be a valid+-- - @display@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.DisplayKHR' handle -- -- - @pDisplayPowerInfo@ /must/ be a valid pointer to a valid -- 'DisplayPowerInfoEXT' structure ----- - Both of 'Graphics.Vulkan.Core10.Handles.Device', and--- 'Graphics.Vulkan.Extensions.WSITypes.Display' /must/ have been--- created, allocated, or retrieved from the same+-- - Both of @device@, and @display@ /must/ have been created, allocated,+-- or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' -- -- == Return Codes@@ -145,8 +143,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.Handles.DisplayKHR', 'DisplayPowerInfoEXT'-displayPowerControlEXT :: Device -> DisplayKHR -> DisplayPowerInfoEXT -> IO ()-displayPowerControlEXT device display displayPowerInfo = evalContT $ do+displayPowerControlEXT :: forall io . MonadIO io => Device -> DisplayKHR -> DisplayPowerInfoEXT -> io ()+displayPowerControlEXT device display displayPowerInfo = liftIO . evalContT $ do let vkDisplayPowerControlEXT' = mkVkDisplayPowerControlEXT (pVkDisplayPowerControlEXT (deviceCmds (device :: Device))) pDisplayPowerInfo <- ContT $ withCStruct (displayPowerInfo) _ <- lift $ vkDisplayPowerControlEXT' (deviceHandle (device)) (display) pDisplayPowerInfo@@ -164,8 +162,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is a logical device on which--- the event /may/ occur.+-- - @device@ is a logical device on which the event /may/ occur. -- -- - @pDeviceEventInfo@ is a pointer to a 'DeviceEventInfoEXT' structure -- describing the event of interest to the application.@@ -179,8 +176,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pDeviceEventInfo@ /must/ be a valid pointer to a valid -- 'DeviceEventInfoEXT' structure@@ -204,8 +201,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', 'DeviceEventInfoEXT', -- 'Graphics.Vulkan.Core10.Handles.Fence'-registerDeviceEventEXT :: Device -> DeviceEventInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (Fence)-registerDeviceEventEXT device deviceEventInfo allocator = evalContT $ do+registerDeviceEventEXT :: forall io . MonadIO io => Device -> DeviceEventInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Fence)+registerDeviceEventEXT device deviceEventInfo allocator = liftIO . evalContT $ do let vkRegisterDeviceEventEXT' = mkVkRegisterDeviceEventEXT (pVkRegisterDeviceEventEXT (deviceCmds (device :: Device))) pDeviceEventInfo <- ContT $ withCStruct (deviceEventInfo) pAllocator <- case (allocator) of@@ -228,11 +225,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is a logical device--- associated with 'Graphics.Vulkan.Extensions.WSITypes.Display'+-- - @device@ is a logical device associated with @display@ ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' is the display on--- which the event /may/ occur.+-- - @display@ is the display on which the event /may/ occur. -- -- - @pDisplayEventInfo@ is a pointer to a 'DisplayEventInfoEXT' -- structure describing the event of interest to the application.@@ -246,10 +241,10 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' /must/ be a valid+-- - @display@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.DisplayKHR' handle -- -- - @pDisplayEventInfo@ /must/ be a valid pointer to a valid@@ -263,9 +258,8 @@ -- - @pFence@ /must/ be a valid pointer to a -- 'Graphics.Vulkan.Core10.Handles.Fence' handle ----- - Both of 'Graphics.Vulkan.Core10.Handles.Device', and--- 'Graphics.Vulkan.Extensions.WSITypes.Display' /must/ have been--- created, allocated, or retrieved from the same+-- - Both of @device@, and @display@ /must/ have been created, allocated,+-- or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' -- -- == Return Codes@@ -280,8 +274,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', 'DisplayEventInfoEXT', -- 'Graphics.Vulkan.Extensions.Handles.DisplayKHR', -- 'Graphics.Vulkan.Core10.Handles.Fence'-registerDisplayEventEXT :: Device -> DisplayKHR -> DisplayEventInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (Fence)-registerDisplayEventEXT device display displayEventInfo allocator = evalContT $ do+registerDisplayEventEXT :: forall io . MonadIO io => Device -> DisplayKHR -> DisplayEventInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Fence)+registerDisplayEventEXT device display displayEventInfo allocator = liftIO . evalContT $ do let vkRegisterDisplayEventEXT' = mkVkRegisterDisplayEventEXT (pVkRegisterDisplayEventEXT (deviceCmds (device :: Device))) pDisplayEventInfo <- ContT $ withCStruct (displayEventInfo) pAllocator <- case (allocator) of@@ -304,8 +298,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the--- 'Graphics.Vulkan.Core10.Handles.Device' associated with @swapchain@.+-- - @device@ is the 'Graphics.Vulkan.Core10.Handles.Device' associated+-- with @swapchain@. -- -- - @swapchain@ is the swapchain from which to query the counter value. --@@ -326,8 +320,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @swapchain@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR' handle@@ -338,8 +332,8 @@ -- -- - @pCounterValue@ /must/ be a valid pointer to a @uint64_t@ value ----- - Both of 'Graphics.Vulkan.Core10.Handles.Device', and @swapchain@--- /must/ have been created, allocated, or retrieved from the same+-- - Both of @device@, and @swapchain@ /must/ have been created,+-- allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Return Codes@@ -359,8 +353,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.VK_EXT_display_surface_counter.SurfaceCounterFlagBitsEXT', -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR'-getSwapchainCounterEXT :: Device -> SwapchainKHR -> SurfaceCounterFlagBitsEXT -> IO (("counterValue" ::: Word64))-getSwapchainCounterEXT device swapchain counter = evalContT $ do+getSwapchainCounterEXT :: forall io . MonadIO io => Device -> SwapchainKHR -> SurfaceCounterFlagBitsEXT -> io (("counterValue" ::: Word64))+getSwapchainCounterEXT device swapchain counter = liftIO . evalContT $ do let vkGetSwapchainCounterEXT' = mkVkGetSwapchainCounterEXT (pVkGetSwapchainCounterEXT (deviceCmds (device :: Device))) pPCounterValue <- ContT $ bracket (callocBytes @Word64 8) free r <- lift $ vkGetSwapchainCounterEXT' (deviceHandle (device)) (swapchain) (counter) (pPCounterValue)
src/Graphics/Vulkan/Extensions/VK_EXT_display_surface_counter.hs view
@@ -22,6 +22,7 @@ , SurfaceTransformFlagsKHR ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import GHC.Base (when) import GHC.IO (throwIO)@@ -38,6 +39,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -88,9 +90,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device that will be associated with the swapchain to be created, as--- described for+-- - @physicalDevice@ is the physical device that will be associated with+-- the swapchain to be created, as described for -- 'Graphics.Vulkan.Extensions.VK_KHR_swapchain.createSwapchainKHR'. -- -- - @surface@ is the surface that will be associated with the swapchain.@@ -107,7 +108,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @surface@ /must/ be a valid@@ -116,9 +117,9 @@ -- - @pSurfaceCapabilities@ /must/ be a valid pointer to a -- 'SurfaceCapabilities2EXT' structure ----- - Both of 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', and--- @surface@ /must/ have been created, allocated, or retrieved from the--- same 'Graphics.Vulkan.Core10.Handles.Instance'+-- - Both of @physicalDevice@, and @surface@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Return Codes --@@ -139,8 +140,8 @@ -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'SurfaceCapabilities2EXT', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-getPhysicalDeviceSurfaceCapabilities2EXT :: PhysicalDevice -> SurfaceKHR -> IO (SurfaceCapabilities2EXT)-getPhysicalDeviceSurfaceCapabilities2EXT physicalDevice surface = evalContT $ do+getPhysicalDeviceSurfaceCapabilities2EXT :: forall io . MonadIO io => PhysicalDevice -> SurfaceKHR -> io (SurfaceCapabilities2EXT)+getPhysicalDeviceSurfaceCapabilities2EXT physicalDevice surface = liftIO . evalContT $ do let vkGetPhysicalDeviceSurfaceCapabilities2EXT' = mkVkGetPhysicalDeviceSurfaceCapabilities2EXT (pVkGetPhysicalDeviceSurfaceCapabilities2EXT (instanceCmds (physicalDevice :: PhysicalDevice))) pPSurfaceCapabilities <- ContT (withZeroCStruct @SurfaceCapabilities2EXT) r <- lift $ vkGetPhysicalDeviceSurfaceCapabilities2EXT' (physicalDeviceHandle (physicalDevice)) (surface) (pPSurfaceCapabilities)
src/Graphics/Vulkan/Extensions/VK_EXT_external_memory_host.hs view
@@ -11,6 +11,7 @@ , ExternalMemoryHandleTypeFlagBitsKHR ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import GHC.Base (when) import GHC.IO (throwIO)@@ -18,6 +19,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -64,8 +66,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- will be importing @pHostPointer@.+-- - @device@ is the logical device that will be importing+-- @pHostPointer@. -- -- - @handleType@ is the type of the handle @pHostPointer@. --@@ -95,8 +97,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @handleType@ /must/ be a valid -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.ExternalMemoryHandleTypeFlagBits'@@ -120,8 +122,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.ExternalMemoryHandleTypeFlagBits', -- 'MemoryHostPointerPropertiesEXT'-getMemoryHostPointerPropertiesEXT :: Device -> ExternalMemoryHandleTypeFlagBits -> ("hostPointer" ::: Ptr ()) -> IO (MemoryHostPointerPropertiesEXT)-getMemoryHostPointerPropertiesEXT device handleType hostPointer = evalContT $ do+getMemoryHostPointerPropertiesEXT :: forall io . MonadIO io => Device -> ExternalMemoryHandleTypeFlagBits -> ("hostPointer" ::: Ptr ()) -> io (MemoryHostPointerPropertiesEXT)+getMemoryHostPointerPropertiesEXT device handleType hostPointer = liftIO . evalContT $ do let vkGetMemoryHostPointerPropertiesEXT' = mkVkGetMemoryHostPointerPropertiesEXT (pVkGetMemoryHostPointerPropertiesEXT (deviceCmds (device :: Device))) pPMemoryHostPointerProperties <- ContT (withZeroCStruct @MemoryHostPointerPropertiesEXT) r <- lift $ vkGetMemoryHostPointerPropertiesEXT' (deviceHandle (device)) (handleType) (hostPointer) (pPMemoryHostPointerProperties)
src/Graphics/Vulkan/Extensions/VK_EXT_filter_cubic.hs view
@@ -53,8 +53,8 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PhysicalDeviceImageViewImageFormatInfoEXT = PhysicalDeviceImageViewImageFormatInfoEXT- { -- | 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' /must/ be a- -- valid 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' value+ { -- | @imageViewType@ /must/ be a valid+ -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' value imageViewType :: ImageViewType } deriving (Typeable) deriving instance Show PhysicalDeviceImageViewImageFormatInfoEXT@@ -108,8 +108,7 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceImageFormatInfo2' -- structure /must/ include a -- 'PhysicalDeviceImageViewImageFormatInfoEXT' structure with an--- 'Graphics.Vulkan.Core10.Enums.ImageViewType.ImageViewType' that is--- compatible with 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType'.+-- @imageViewType@ that is compatible with @imageType@. -- -- = See Also --
src/Graphics/Vulkan/Extensions/VK_EXT_fragment_density_map.hs view
@@ -74,7 +74,7 @@ -- not enabled, -- 'Graphics.Vulkan.Core10.Enums.ImageViewCreateFlagBits.IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT' -- /must/ not be included in- -- 'Graphics.Vulkan.Core10.ImageView.ImageViewCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'.+ -- 'Graphics.Vulkan.Core10.ImageView.ImageViewCreateInfo'::@flags@. fragmentDensityMapDynamic :: Bool , -- | @fragmentDensityMapNonSubsampledImages@ specifies whether the -- implementation supports regular non-subsampled image attachments with@@ -206,8 +206,7 @@ -- The fragment density map attachment is read at an -- implementation-dependent time either by the host during -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdBeginRenderPass' if the--- attachment’s image view was not created with--- 'Graphics.Vulkan.Core10.BaseType.Flags' containing+-- attachment’s image view was not created with @flags@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageViewCreateFlagBits.IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT', -- or by the device when drawing commands in the renderpass execute -- 'Graphics.Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT'.
src/Graphics/Vulkan/Extensions/VK_EXT_full_screen_exclusive.hs view
@@ -26,6 +26,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -45,6 +46,7 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Data.Vector (generateM)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -70,9 +72,8 @@ import Graphics.Vulkan.Dynamic (DeviceCmds(pVkAcquireFullScreenExclusiveModeEXT)) import Graphics.Vulkan.Dynamic (DeviceCmds(pVkGetDeviceGroupSurfacePresentModes2EXT)) import Graphics.Vulkan.Dynamic (DeviceCmds(pVkReleaseFullScreenExclusiveModeEXT))-import Graphics.Vulkan.Extensions.VK_KHR_swapchain (DeviceGroupPresentModeFlagsKHR)-import Graphics.Vulkan.Extensions.VK_KHR_swapchain (DeviceGroupPresentModeFlagsKHR) import Graphics.Vulkan.Extensions.VK_KHR_swapchain (DeviceGroupPresentModeFlagBitsKHR(..))+import Graphics.Vulkan.Extensions.VK_KHR_swapchain (DeviceGroupPresentModeFlagsKHR) import Graphics.Vulkan.Core10.Handles (Device_T) import Graphics.Vulkan.CStruct (FromCStruct) import Graphics.Vulkan.CStruct (FromCStruct(..))@@ -118,9 +119,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device that will be associated with the swapchain to be created, as--- described for+-- - @physicalDevice@ is the physical device that will be associated with+-- the swapchain to be created, as described for -- 'Graphics.Vulkan.Extensions.VK_KHR_swapchain.createSwapchainKHR'. -- -- - @pSurfaceInfo@ is a pointer to a@@ -145,7 +145,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pSurfaceInfo@ /must/ be a valid pointer to a valid@@ -181,8 +181,8 @@ -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'Graphics.Vulkan.Extensions.VK_KHR_get_surface_capabilities2.PhysicalDeviceSurfaceInfo2KHR', -- 'Graphics.Vulkan.Extensions.VK_KHR_shared_presentable_image.PresentModeKHR'-getPhysicalDeviceSurfacePresentModes2EXT :: PokeChain a => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> IO (Result, ("presentModes" ::: Vector PresentModeKHR))-getPhysicalDeviceSurfacePresentModes2EXT physicalDevice surfaceInfo = evalContT $ do+getPhysicalDeviceSurfacePresentModes2EXT :: forall a io . (PokeChain a, MonadIO io) => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> io (Result, ("presentModes" ::: Vector PresentModeKHR))+getPhysicalDeviceSurfacePresentModes2EXT physicalDevice surfaceInfo = liftIO . evalContT $ do let vkGetPhysicalDeviceSurfacePresentModes2EXT' = mkVkGetPhysicalDeviceSurfacePresentModes2EXT (pVkGetPhysicalDeviceSurfacePresentModes2EXT (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pSurfaceInfo <- ContT $ withCStruct (surfaceInfo)@@ -210,7 +210,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device.+-- - @device@ is the logical device. -- -- - @pSurfaceInfo@ is a pointer to a -- 'Graphics.Vulkan.Extensions.VK_KHR_get_surface_capabilities2.PhysicalDeviceSurfaceInfo2KHR'@@ -249,8 +249,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.VK_KHR_swapchain.DeviceGroupPresentModeFlagsKHR', -- 'Graphics.Vulkan.Extensions.VK_KHR_get_surface_capabilities2.PhysicalDeviceSurfaceInfo2KHR'-getDeviceGroupSurfacePresentModes2EXT :: PokeChain a => Device -> PhysicalDeviceSurfaceInfo2KHR a -> IO (("modes" ::: DeviceGroupPresentModeFlagsKHR))-getDeviceGroupSurfacePresentModes2EXT device surfaceInfo = evalContT $ do+getDeviceGroupSurfacePresentModes2EXT :: forall a io . (PokeChain a, MonadIO io) => Device -> PhysicalDeviceSurfaceInfo2KHR a -> io (("modes" ::: DeviceGroupPresentModeFlagsKHR))+getDeviceGroupSurfacePresentModes2EXT device surfaceInfo = liftIO . evalContT $ do let vkGetDeviceGroupSurfacePresentModes2EXT' = mkVkGetDeviceGroupSurfacePresentModes2EXT (pVkGetDeviceGroupSurfacePresentModes2EXT (deviceCmds (device :: Device))) pSurfaceInfo <- ContT $ withCStruct (surfaceInfo) pPModes <- ContT $ bracket (callocBytes @DeviceGroupPresentModeFlagsKHR 4) free@@ -272,8 +272,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device associated--- with @swapchain@.+-- - @device@ is the device associated with @swapchain@. -- -- - @swapchain@ is the swapchain to acquire exclusive full-screen access -- for.@@ -308,14 +307,14 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @swapchain@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR' handle ----- - Both of 'Graphics.Vulkan.Core10.Handles.Device', and @swapchain@--- /must/ have been created, allocated, or retrieved from the same+-- - Both of @device@, and @swapchain@ /must/ have been created,+-- allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Return Codes@@ -338,8 +337,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR'-acquireFullScreenExclusiveModeEXT :: Device -> SwapchainKHR -> IO ()-acquireFullScreenExclusiveModeEXT device swapchain = do+acquireFullScreenExclusiveModeEXT :: forall io . MonadIO io => Device -> SwapchainKHR -> io ()+acquireFullScreenExclusiveModeEXT device swapchain = liftIO $ do let vkAcquireFullScreenExclusiveModeEXT' = mkVkAcquireFullScreenExclusiveModeEXT (pVkAcquireFullScreenExclusiveModeEXT (deviceCmds (device :: Device))) r <- vkAcquireFullScreenExclusiveModeEXT' (deviceHandle (device)) (swapchain) when (r < SUCCESS) (throwIO (VulkanException r))@@ -357,8 +356,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device associated--- with @swapchain@.+-- - @device@ is the device associated with @swapchain@. -- -- - @swapchain@ is the swapchain to release exclusive full-screen access -- from.@@ -378,8 +376,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR'-releaseFullScreenExclusiveModeEXT :: Device -> SwapchainKHR -> IO ()-releaseFullScreenExclusiveModeEXT device swapchain = do+releaseFullScreenExclusiveModeEXT :: forall io . MonadIO io => Device -> SwapchainKHR -> io ()+releaseFullScreenExclusiveModeEXT device swapchain = liftIO $ do let vkReleaseFullScreenExclusiveModeEXT' = mkVkReleaseFullScreenExclusiveModeEXT (pVkReleaseFullScreenExclusiveModeEXT (deviceCmds (device :: Device))) r <- vkReleaseFullScreenExclusiveModeEXT' (deviceHandle (device)) (swapchain) when (r < SUCCESS) (throwIO (VulkanException r))
src/Graphics/Vulkan/Extensions/VK_EXT_hdr_metadata.hs view
@@ -10,6 +10,7 @@ ) where import Control.Monad (unless)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import GHC.IO (throwIO) import Foreign.Ptr (nullPtr)@@ -18,6 +19,7 @@ import Control.Monad.Trans.Cont (evalContT) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.C.Types (CFloat)@@ -60,8 +62,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device where--- the swapchain(s) were created.+-- - @device@ is the logical device where the swapchain(s) were created. -- -- - @swapchainCount@ is the number of swapchains included in -- @pSwapchains@.@@ -74,8 +75,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pSwapchains@ /must/ be a valid pointer to an array of -- @swapchainCount@ valid@@ -86,16 +87,16 @@ -- -- - @swapchainCount@ /must/ be greater than @0@ ----- - Both of 'Graphics.Vulkan.Core10.Handles.Device', and the elements of--- @pSwapchains@ /must/ have been created, allocated, or retrieved from--- the same 'Graphics.Vulkan.Core10.Handles.Instance'+-- - Both of @device@, and the elements of @pSwapchains@ /must/ have been+-- created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'HdrMetadataEXT', -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR'-setHdrMetadataEXT :: Device -> ("swapchains" ::: Vector SwapchainKHR) -> ("metadata" ::: Vector HdrMetadataEXT) -> IO ()-setHdrMetadataEXT device swapchains metadata = evalContT $ do+setHdrMetadataEXT :: forall io . MonadIO io => Device -> ("swapchains" ::: Vector SwapchainKHR) -> ("metadata" ::: Vector HdrMetadataEXT) -> io ()+setHdrMetadataEXT device swapchains metadata = liftIO . evalContT $ do let vkSetHdrMetadataEXT' = mkVkSetHdrMetadataEXT (pVkSetHdrMetadataEXT (deviceCmds (device :: Device))) let pSwapchainsLength = Data.Vector.length $ (swapchains) let pMetadataLength = Data.Vector.length $ (metadata)
src/Graphics/Vulkan/Extensions/VK_EXT_headless_surface.hs view
@@ -10,6 +10,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -28,6 +29,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -75,8 +77,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance to--- associate the surface with.+-- - @instance@ is the instance to associate the surface with. -- -- - @pCreateInfo@ is a pointer to a 'HeadlessSurfaceCreateInfoEXT' -- structure containing parameters affecting the creation of the@@ -93,7 +94,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -125,8 +126,8 @@ -- 'HeadlessSurfaceCreateInfoEXT', -- 'Graphics.Vulkan.Core10.Handles.Instance', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-createHeadlessSurfaceEXT :: Instance -> HeadlessSurfaceCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SurfaceKHR)-createHeadlessSurfaceEXT instance' createInfo allocator = evalContT $ do+createHeadlessSurfaceEXT :: forall io . MonadIO io => Instance -> HeadlessSurfaceCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)+createHeadlessSurfaceEXT instance' createInfo allocator = liftIO . evalContT $ do let vkCreateHeadlessSurfaceEXT' = mkVkCreateHeadlessSurfaceEXT (pVkCreateHeadlessSurfaceEXT (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -150,7 +151,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createHeadlessSurfaceEXT' data HeadlessSurfaceCreateInfoEXT = HeadlessSurfaceCreateInfoEXT- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: HeadlessSurfaceCreateFlagsEXT } deriving (Typeable) deriving instance Show HeadlessSurfaceCreateInfoEXT
src/Graphics/Vulkan/Extensions/VK_EXT_image_drm_format_modifier.hs view
@@ -12,6 +12,7 @@ , pattern EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Ptr (nullPtr) import Foreign.Ptr (plusPtr)@@ -20,6 +21,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -68,10 +70,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the image.+-- - @device@ is the logical device that owns the image. ----- - 'Graphics.Vulkan.Core10.Handles.Image' is the queried image.+-- - @image@ is the queried image. -- -- - @pProperties@ will return properties of the image’s /DRM format -- modifier/.@@ -87,8 +88,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Image', -- 'ImageDrmFormatModifierPropertiesEXT'-getImageDrmFormatModifierPropertiesEXT :: Device -> Image -> IO (ImageDrmFormatModifierPropertiesEXT)-getImageDrmFormatModifierPropertiesEXT device image = evalContT $ do+getImageDrmFormatModifierPropertiesEXT :: forall io . MonadIO io => Device -> Image -> io (ImageDrmFormatModifierPropertiesEXT)+getImageDrmFormatModifierPropertiesEXT device image = liftIO . evalContT $ do let vkGetImageDrmFormatModifierPropertiesEXT' = mkVkGetImageDrmFormatModifierPropertiesEXT (pVkGetImageDrmFormatModifierPropertiesEXT (deviceCmds (device :: Device))) pPProperties <- ContT (withZeroCStruct @ImageDrmFormatModifierPropertiesEXT) _ <- lift $ vkGetImageDrmFormatModifierPropertiesEXT' (deviceHandle (device)) (image) (pPProperties)@@ -103,9 +104,9 @@ -- -- If @pDrmFormatModifierProperties@ is @NULL@, then the function returns -- in @drmFormatModifierCount@ the number of modifiers compatible with the--- queried 'Graphics.Vulkan.Core10.Enums.Format.Format'. Otherwise, the--- application /must/ set @drmFormatModifierCount@ to the length of the--- array @pDrmFormatModifierProperties@; the function will write at most+-- queried @format@. Otherwise, the application /must/ set+-- @drmFormatModifierCount@ to the length of the array+-- @pDrmFormatModifierProperties@; the function will write at most -- @drmFormatModifierCount@ elements to the array, and will return in -- @drmFormatModifierCount@ the number of elements written. --@@ -120,8 +121,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data DrmFormatModifierPropertiesListEXT = DrmFormatModifierPropertiesListEXT { -- | @drmFormatModifierCount@ is an inout parameter related to the number of- -- modifiers compatible with the- -- 'Graphics.Vulkan.Core10.Enums.Format.Format', as described below.+ -- modifiers compatible with the @format@, as described below. drmFormatModifierCount :: Word32 , -- | @pDrmFormatModifierProperties@ is either @NULL@ or an array of -- 'DrmFormatModifierPropertiesEXT' structures.@@ -220,12 +220,12 @@ -- then the partition of the image’s __memory__ into /memory planes/ is -- implementation-specific and /may/ be unrelated to the partition of the -- image’s __content__ into /format planes/. For example, consider an image--- whose 'Graphics.Vulkan.Core10.Enums.Format.Format' is+-- whose @format@ is -- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_G8_B8_R8_3PLANE_420_UNORM', -- @tiling@ is -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT',--- whose @drmFormatModifier@ is not @DRM_FORMAT_MOD_LINEAR@, and--- 'Graphics.Vulkan.Core10.BaseType.Flags' lacks+-- whose @drmFormatModifier@ is not @DRM_FORMAT_MOD_LINEAR@, and @flags@+-- lacks -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_DISJOINT_BIT'. -- The image has 3 /format planes/, and commands such -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.cmdCopyBufferToImage' act@@ -255,14 +255,14 @@ { -- | @drmFormatModifier@ is a /Linux DRM format modifier/. drmFormatModifier :: Word64 , -- | @drmFormatModifierPlaneCount@ is the number of /memory planes/ in any- -- image created with 'Graphics.Vulkan.Core10.Enums.Format.Format' and- -- @drmFormatModifier@. An image’s /memory planecount/ is distinct from its- -- /format planecount/, as explained below.+ -- image created with @format@ and @drmFormatModifier@. An image’s /memory+ -- planecount/ is distinct from its /format planecount/, as explained+ -- below. drmFormatModifierPlaneCount :: Word32 , -- | @drmFormatModifierTilingFeatures@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.FormatFeatureFlagBits.FormatFeatureFlagBits'- -- that are supported by any image created with- -- 'Graphics.Vulkan.Core10.Enums.Format.Format' and @drmFormatModifier@.+ -- that are supported by any image created with @format@ and+ -- @drmFormatModifier@. drmFormatModifierTilingFeatures :: FormatFeatureFlags } deriving (Typeable)@@ -321,30 +321,29 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is+-- - If @sharingMode@ is -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- then @pQueueFamilyIndices@ /must/ be a valid pointer to an array of -- @queueFamilyIndexCount@ @uint32_t@ values. ----- - If 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is+-- - If @sharingMode@ is -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- then @queueFamilyIndexCount@ /must/ be greater than @1@. ----- - If 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' is+-- - If @sharingMode@ is -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT', -- each element of @pQueueFamilyIndices@ /must/ be unique and /must/ be -- less than the @pQueueFamilyPropertyCount@ returned by -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceQueueFamilyProperties2'--- for the 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' that was--- used to create 'Graphics.Vulkan.Core10.Handles.Device'.+-- for the @physicalDevice@ that was used to create @device@. -- -- == Valid Usage (Implicit) -- -- - @sType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT' ----- - 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' /must/ be a--- valid 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' value+-- - @sharingMode@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' value -- -- = See Also --@@ -356,12 +355,11 @@ -- 'ImageDrmFormatModifierExplicitCreateInfoEXT'::@modifier@ or to -- 'ImageDrmFormatModifierListCreateInfoEXT'::@pModifiers@. drmFormatModifier :: Word64- , -- | 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode' specifies how the- -- image will be accessed by multiple queue families.+ , -- | @sharingMode@ specifies how the image will be accessed by multiple queue+ -- families. sharingMode :: SharingMode , -- | @pQueueFamilyIndices@ is a list of queue families that will access the- -- image (ignored if 'Graphics.Vulkan.Core10.Enums.SharingMode.SharingMode'- -- is not+ -- image (ignored if @sharingMode@ is not -- 'Graphics.Vulkan.Core10.Enums.SharingMode.SHARING_MODE_CONCURRENT'). queueFamilyIndices :: Vector Word32 }@@ -509,8 +507,8 @@ -- - @drmFormatModifierPlaneCount@ /must/ be equal to the -- 'DrmFormatModifierPropertiesEXT'::@drmFormatModifierPlaneCount@ -- associated with--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.Enums.Format.Format'--- and @drmFormatModifier@, as found by querying+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@format@ and+-- @drmFormatModifier@, as found by querying -- 'DrmFormatModifierPropertiesListEXT'. -- -- - For each element of @pPlaneLayouts@, @size@ /must/ be 0@@ -588,15 +586,14 @@ -- -- = Description ----- If the 'Graphics.Vulkan.Core10.Handles.Image' was created with+-- If the @image@ was created with -- 'ImageDrmFormatModifierListCreateInfoEXT', then the returned -- @drmFormatModifier@ /must/ belong to the list of modifiers provided at -- time of image creation in -- 'ImageDrmFormatModifierListCreateInfoEXT'::@pDrmFormatModifiers@. If the--- 'Graphics.Vulkan.Core10.Handles.Image' was created with--- 'ImageDrmFormatModifierExplicitCreateInfoEXT', then the returned--- @drmFormatModifier@ /must/ be the modifier provided at time of image--- creation in+-- @image@ was created with 'ImageDrmFormatModifierExplicitCreateInfoEXT',+-- then the returned @drmFormatModifier@ /must/ be the modifier provided at+-- time of image creation in -- 'ImageDrmFormatModifierExplicitCreateInfoEXT'::@drmFormatModifier@. -- -- == Valid Usage (Implicit)
src/Graphics/Vulkan/Extensions/VK_EXT_line_rasterization.hs view
@@ -15,6 +15,7 @@ , pattern EXT_LINE_RASTERIZATION_EXTENSION_NAME ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Ptr (nullPtr) import Foreign.Ptr (plusPtr)@@ -27,6 +28,7 @@ import Text.ParserCombinators.ReadPrec ((+++)) import Text.ParserCombinators.ReadPrec (prec) import Text.ParserCombinators.ReadPrec (step)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -70,8 +72,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @lineStippleFactor@ is the repeat factor used in stippled line -- rasterization.@@ -85,24 +87,22 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -118,8 +118,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdSetLineStippleEXT :: CommandBuffer -> ("lineStippleFactor" ::: Word32) -> ("lineStipplePattern" ::: Word16) -> IO ()-cmdSetLineStippleEXT commandBuffer lineStippleFactor lineStipplePattern = do+cmdSetLineStippleEXT :: forall io . MonadIO io => CommandBuffer -> ("lineStippleFactor" ::: Word32) -> ("lineStipplePattern" ::: Word16) -> io ()+cmdSetLineStippleEXT commandBuffer lineStippleFactor lineStipplePattern = liftIO $ do let vkCmdSetLineStippleEXT' = mkVkCmdSetLineStippleEXT (pVkCmdSetLineStippleEXT (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdSetLineStippleEXT' (commandBufferHandle (commandBuffer)) (lineStippleFactor) (lineStipplePattern) pure $ ()
src/Graphics/Vulkan/Extensions/VK_EXT_metal_surface.hs view
@@ -11,6 +11,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -29,6 +30,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -77,8 +79,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance with which--- to associate the surface.+-- - @instance@ is the instance with which to associate the surface. -- -- - @pCreateInfo@ is a pointer to a 'MetalSurfaceCreateInfoEXT' -- structure specifying parameters affecting the creation of the@@ -95,7 +96,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -128,8 +129,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Instance', 'MetalSurfaceCreateInfoEXT', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-createMetalSurfaceEXT :: Instance -> MetalSurfaceCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SurfaceKHR)-createMetalSurfaceEXT instance' createInfo allocator = evalContT $ do+createMetalSurfaceEXT :: forall io . MonadIO io => Instance -> MetalSurfaceCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)+createMetalSurfaceEXT instance' createInfo allocator = liftIO . evalContT $ do let vkCreateMetalSurfaceEXT' = mkVkCreateMetalSurfaceEXT (pVkCreateMetalSurfaceEXT (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -153,7 +154,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createMetalSurfaceEXT' data MetalSurfaceCreateInfoEXT = MetalSurfaceCreateInfoEXT- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: MetalSurfaceCreateFlagsEXT , -- | @pLayer@ is a reference to a -- 'Graphics.Vulkan.Extensions.WSITypes.CAMetalLayer' object representing a
src/Graphics/Vulkan/Extensions/VK_EXT_pipeline_creation_feedback.hs view
@@ -52,9 +52,8 @@ -- -- = Description ----- If the 'PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT' is not set in--- 'Graphics.Vulkan.Core10.BaseType.Flags', an implementation /must/ not--- set any other bits in 'Graphics.Vulkan.Core10.BaseType.Flags', and all+-- If the 'PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT' is not set in @flags@,+-- an implementation /must/ not set any other bits in @flags@, and all -- other 'PipelineCreationFeedbackEXT' data members are undefined. -- -- = See Also@@ -63,9 +62,8 @@ -- 'PipelineCreationFeedbackFlagBitsEXT', -- 'PipelineCreationFeedbackFlagsEXT' data PipelineCreationFeedbackEXT = PipelineCreationFeedbackEXT- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of- -- 'PipelineCreationFeedbackFlagBitsEXT' providing feedback about the- -- creation of a pipeline or of a pipeline stage.+ { -- | @flags@ is a bitmask of 'PipelineCreationFeedbackFlagBitsEXT' providing+ -- feedback about the creation of a pipeline or of a pipeline stage. flags :: PipelineCreationFeedbackFlagsEXT , -- | @duration@ is the duration spent creating a pipeline or pipeline stage -- in nanoseconds.@@ -115,9 +113,8 @@ -- @pPipelineCreationFeedback@ and /may/ write pipeline stage creation -- feedback to @pPipelineStageCreationFeedbacks@. An implementation /must/ -- set or clear the 'PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT' in--- 'PipelineCreationFeedbackEXT'::'Graphics.Vulkan.Core10.BaseType.Flags'--- for @pPipelineCreationFeedback@ and every element of--- @pPipelineStageCreationFeedbacks@.+-- 'PipelineCreationFeedbackEXT'::@flags@ for @pPipelineCreationFeedback@+-- and every element of @pPipelineStageCreationFeedbacks@. -- -- Note --@@ -248,14 +245,13 @@ pattern PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT = PipelineCreationFeedbackFlagBitsEXT 0x00000001 -- | 'PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT' -- indicates that a readily usable pipeline or pipeline stage was found in--- the 'Graphics.Vulkan.Core10.Handles.PipelineCache' specified by the--- application in the pipeline creation command.+-- the @pipelineCache@ specified by the application in the pipeline+-- creation command. -- -- An implementation /should/ set the -- 'PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT' bit -- if it was able to avoid the large majority of pipeline or pipeline stage--- creation work by using the--- 'Graphics.Vulkan.Core10.Handles.PipelineCache' parameter of+-- creation work by using the @pipelineCache@ parameter of -- 'Graphics.Vulkan.Core10.Pipeline.createGraphicsPipelines', -- 'Graphics.Vulkan.Extensions.VK_NV_ray_tracing.createRayTracingPipelinesNV', -- or 'Graphics.Vulkan.Core10.Pipeline.createComputePipelines'. When an
src/Graphics/Vulkan/Extensions/VK_EXT_sample_locations.hs view
@@ -15,6 +15,7 @@ , pattern EXT_SAMPLE_LOCATIONS_EXTENSION_NAME ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Ptr (nullPtr) import Foreign.Ptr (plusPtr)@@ -23,6 +24,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.C.Types (CFloat)@@ -78,8 +80,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @pSampleLocationsInfo@ is the sample locations state to set. --@@ -102,27 +104,25 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pSampleLocationsInfo@ /must/ be a valid pointer to a valid -- 'SampleLocationsInfoEXT' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -138,8 +138,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'SampleLocationsInfoEXT'-cmdSetSampleLocationsEXT :: CommandBuffer -> SampleLocationsInfoEXT -> IO ()-cmdSetSampleLocationsEXT commandBuffer sampleLocationsInfo = evalContT $ do+cmdSetSampleLocationsEXT :: forall io . MonadIO io => CommandBuffer -> SampleLocationsInfoEXT -> io ()+cmdSetSampleLocationsEXT commandBuffer sampleLocationsInfo = liftIO . evalContT $ do let vkCmdSetSampleLocationsEXT' = mkVkCmdSetSampleLocationsEXT (pVkCmdSetSampleLocationsEXT (deviceCmds (commandBuffer :: CommandBuffer))) pSampleLocationsInfo <- ContT $ withCStruct (sampleLocationsInfo) lift $ vkCmdSetSampleLocationsEXT' (commandBufferHandle (commandBuffer)) pSampleLocationsInfo@@ -158,9 +158,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the additional multisampling--- capabilities.+-- - @physicalDevice@ is the physical device from which to query the+-- additional multisampling capabilities. -- -- - @samples@ is the sample count to query the capabilities for. --@@ -176,8 +175,8 @@ -- 'MultisamplePropertiesEXT', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'Graphics.Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits'-getPhysicalDeviceMultisamplePropertiesEXT :: PhysicalDevice -> ("samples" ::: SampleCountFlagBits) -> IO (MultisamplePropertiesEXT)-getPhysicalDeviceMultisamplePropertiesEXT physicalDevice samples = evalContT $ do+getPhysicalDeviceMultisamplePropertiesEXT :: forall io . MonadIO io => PhysicalDevice -> ("samples" ::: SampleCountFlagBits) -> io (MultisamplePropertiesEXT)+getPhysicalDeviceMultisamplePropertiesEXT physicalDevice samples = liftIO . evalContT $ do let vkGetPhysicalDeviceMultisamplePropertiesEXT' = mkVkGetPhysicalDeviceMultisamplePropertiesEXT (pVkGetPhysicalDeviceMultisamplePropertiesEXT (instanceCmds (physicalDevice :: PhysicalDevice))) pPMultisampleProperties <- ContT (withZeroCStruct @MultisamplePropertiesEXT) lift $ vkGetPhysicalDeviceMultisamplePropertiesEXT' (physicalDeviceHandle (physicalDevice)) (samples) (pPMultisampleProperties)@@ -372,7 +371,7 @@ { -- | @attachmentIndex@ /must/ be less than the @attachmentCount@ specified in -- 'Graphics.Vulkan.Core10.Pass.RenderPassCreateInfo' the render pass -- specified by- -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.RenderPassBeginInfo'::'Graphics.Vulkan.Core10.Handles.RenderPass'+ -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.RenderPassBeginInfo'::@renderPass@ -- was created with attachmentIndex :: Word32 , -- | @sampleLocationsInfo@ /must/ be a valid 'SampleLocationsInfoEXT'@@ -431,7 +430,7 @@ { -- | @subpassIndex@ /must/ be less than the @subpassCount@ specified in -- 'Graphics.Vulkan.Core10.Pass.RenderPassCreateInfo' the render pass -- specified by- -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.RenderPassBeginInfo'::'Graphics.Vulkan.Core10.Handles.RenderPass'+ -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.RenderPassBeginInfo'::@renderPass@ -- was created with subpassIndex :: Word32 , -- | @sampleLocationsInfo@ /must/ be a valid 'SampleLocationsInfoEXT'
src/Graphics/Vulkan/Extensions/VK_EXT_texel_buffer_alignment.hs view
@@ -118,9 +118,9 @@ -- 'Graphics.Vulkan.Core10.BaseType.TRUE', then the buffer view’s offset -- /must/ be aligned to the lesser of the corresponding byte alignment -- value or the size of a single texel, based on--- 'Graphics.Vulkan.Core10.BufferView.BufferViewCreateInfo'::'Graphics.Vulkan.Core10.Enums.Format.Format'.--- If the size of a single texel is a multiple of three bytes, then the--- size of a single component of the format is used instead.+-- 'Graphics.Vulkan.Core10.BufferView.BufferViewCreateInfo'::@format@. If+-- the size of a single texel is a multiple of three bytes, then the size+-- of a single component of the format is used instead. -- -- These limits /must/ not advertise a larger alignment than the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#limits-required required>
src/Graphics/Vulkan/Extensions/VK_EXT_tooling_info.hs view
@@ -18,6 +18,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -36,6 +37,7 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Data.Vector (generateM)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -87,11 +89,11 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the handle to the--- physical device to query for active tools.+-- - @physicalDevice@ is the handle to the physical device to query for+-- active tools. -- -- - @pToolCount@ is a pointer to an integer describing the number of--- tools active on 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'.+-- tools active on @physicalDevice@. -- -- - @pToolProperties@ is either @NULL@ or a pointer to an array of -- 'PhysicalDeviceToolPropertiesEXT' structures.@@ -99,13 +101,12 @@ -- = Description -- -- If @pToolProperties@ is @NULL@, then the number of tools currently--- active on 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is returned in--- @pToolCount@. Otherwise, @pToolCount@ /must/ point to a variable set by--- the user to the number of elements in the @pToolProperties@ array, and--- on return the variable is overwritten with the number of structures--- actually written to @pToolProperties@. If @pToolCount@ is less than the--- number of currently active tools, at most @pToolCount@ structures will--- be written.+-- active on @physicalDevice@ is returned in @pToolCount@. Otherwise,+-- @pToolCount@ /must/ point to a variable set by the user to the number of+-- elements in the @pToolProperties@ array, and on return the variable is+-- overwritten with the number of structures actually written to+-- @pToolProperties@. If @pToolCount@ is less than the number of currently+-- active tools, at most @pToolCount@ structures will be written. -- -- The count and properties of active tools /may/ change in response to -- events outside the scope of the specification. An application /should/@@ -113,7 +114,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pToolCount@ /must/ be a valid pointer to a @uint32_t@ value@@ -135,8 +136,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceToolPropertiesEXT'-getPhysicalDeviceToolPropertiesEXT :: PhysicalDevice -> IO (Result, ("toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))-getPhysicalDeviceToolPropertiesEXT physicalDevice = evalContT $ do+getPhysicalDeviceToolPropertiesEXT :: forall io . MonadIO io => PhysicalDevice -> io (Result, ("toolProperties" ::: Vector PhysicalDeviceToolPropertiesEXT))+getPhysicalDeviceToolPropertiesEXT physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceToolPropertiesEXT' = mkVkGetPhysicalDeviceToolPropertiesEXT (pVkGetPhysicalDeviceToolPropertiesEXT (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPToolCount <- ContT $ bracket (callocBytes @Word32 4) free
src/Graphics/Vulkan/Extensions/VK_EXT_transform_feedback.hs view
@@ -1,8 +1,10 @@ {-# language CPP #-} module Graphics.Vulkan.Extensions.VK_EXT_transform_feedback ( cmdBindTransformFeedbackBuffersEXT , cmdBeginTransformFeedbackEXT+ , cmdWithTransformFeedbackEXT , cmdEndTransformFeedbackEXT , cmdBeginQueryIndexedEXT+ , cmdWithQueryIndexedEXT , cmdEndQueryIndexedEXT , cmdDrawIndirectByteCountEXT , PhysicalDeviceTransformFeedbackFeaturesEXT(..)@@ -15,7 +17,9 @@ , pattern EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME ) where +import Control.Exception.Base (bracket_) import Control.Monad (unless)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import GHC.IO (throwIO) import Foreign.Ptr (nullPtr)@@ -34,6 +38,7 @@ import qualified Data.Vector (imapM_) import qualified Data.Vector (length) import qualified Data.Vector (null)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.Either (Either) import Data.String (IsString)@@ -71,9 +76,8 @@ import Graphics.Vulkan.Core10.BaseType (Flags) import Graphics.Vulkan.CStruct (FromCStruct) import Graphics.Vulkan.CStruct (FromCStruct(..))-import Graphics.Vulkan.Core10.Enums.QueryControlFlagBits (QueryControlFlags)-import Graphics.Vulkan.Core10.Enums.QueryControlFlagBits (QueryControlFlags) import Graphics.Vulkan.Core10.Enums.QueryControlFlagBits (QueryControlFlagBits(..))+import Graphics.Vulkan.Core10.Enums.QueryControlFlagBits (QueryControlFlags) import Graphics.Vulkan.Core10.Handles (QueryPool) import Graphics.Vulkan.Core10.Handles (QueryPool(..)) import Graphics.Vulkan.Core10.Enums.StructureType (StructureType)@@ -96,8 +100,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. -- -- - @firstBinding@ is the index of the first transform feedback binding -- whose state is updated by the command.@@ -167,7 +171,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pBuffers@ /must/ be a valid pointer to an array of @bindingCount@@@ -180,27 +184,25 @@ -- array of @bindingCount@ 'Graphics.Vulkan.Core10.BaseType.DeviceSize' -- values ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - If @pSizes@ is not @NULL@, @bindingCount@ /must/ be greater than @0@ ----- - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and the--- elements of @pBuffers@ /must/ have been created, allocated, or--- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Both of @commandBuffer@, and the elements of @pBuffers@ /must/ have+-- been created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -218,8 +220,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdBindTransformFeedbackBuffersEXT :: CommandBuffer -> ("firstBinding" ::: Word32) -> ("buffers" ::: Vector Buffer) -> ("offsets" ::: Vector DeviceSize) -> ("sizes" ::: Either Word32 (Vector DeviceSize)) -> IO ()-cmdBindTransformFeedbackBuffersEXT commandBuffer firstBinding buffers offsets sizes = evalContT $ do+cmdBindTransformFeedbackBuffersEXT :: forall io . MonadIO io => CommandBuffer -> ("firstBinding" ::: Word32) -> ("buffers" ::: Vector Buffer) -> ("offsets" ::: Vector DeviceSize) -> ("sizes" ::: Either Word32 (Vector DeviceSize)) -> io ()+cmdBindTransformFeedbackBuffersEXT commandBuffer firstBinding buffers offsets sizes = liftIO . evalContT $ do let vkCmdBindTransformFeedbackBuffersEXT' = mkVkCmdBindTransformFeedbackBuffersEXT (pVkCmdBindTransformFeedbackBuffersEXT (deviceCmds (commandBuffer :: CommandBuffer))) let pBuffersLength = Data.Vector.length $ (buffers) let pOffsetsLength = Data.Vector.length $ (offsets)@@ -254,8 +256,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. -- -- - @firstCounterBuffer@ is the index of the first transform feedback -- buffer corresponding to @pCounterBuffers@[0] and@@ -331,7 +333,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - If @counterBufferCount@ is not @0@, and @pCounterBufferOffsets@ is@@ -339,28 +341,26 @@ -- array of @counterBufferCount@ -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize' values ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - This command /must/ only be called inside of a render pass instance ----- - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and the--- elements of @pCounterBuffers@ that are valid handles of non-ignored--- parameters /must/ have been created, allocated, or retrieved from--- the same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Both of @commandBuffer@, and the elements of @pCounterBuffers@ that+-- are valid handles of non-ignored parameters /must/ have been+-- created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -378,8 +378,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdBeginTransformFeedbackEXT :: CommandBuffer -> ("firstCounterBuffer" ::: Word32) -> ("counterBuffers" ::: Vector Buffer) -> ("counterBufferOffsets" ::: Either Word32 (Vector DeviceSize)) -> IO ()-cmdBeginTransformFeedbackEXT commandBuffer firstCounterBuffer counterBuffers counterBufferOffsets = evalContT $ do+cmdBeginTransformFeedbackEXT :: forall io . MonadIO io => CommandBuffer -> ("firstCounterBuffer" ::: Word32) -> ("counterBuffers" ::: Vector Buffer) -> ("counterBufferOffsets" ::: Either Word32 (Vector DeviceSize)) -> io ()+cmdBeginTransformFeedbackEXT commandBuffer firstCounterBuffer counterBuffers counterBufferOffsets = liftIO . evalContT $ do let vkCmdBeginTransformFeedbackEXT' = mkVkCmdBeginTransformFeedbackEXT (pVkCmdBeginTransformFeedbackEXT (deviceCmds (commandBuffer :: CommandBuffer))) let pCounterBuffersLength = Data.Vector.length $ (counterBuffers) let pCounterBufferOffsetsLength = either id (fromIntegral . Data.Vector.length) (counterBufferOffsets)@@ -396,7 +396,15 @@ lift $ vkCmdBeginTransformFeedbackEXT' (commandBufferHandle (commandBuffer)) (firstCounterBuffer) ((fromIntegral pCounterBuffersLength :: Word32)) (pPCounterBuffers) pCounterBufferOffsets pure $ () +-- | A safe wrapper for 'cmdBeginTransformFeedbackEXT' and+-- 'cmdEndTransformFeedbackEXT' using 'bracket_'+cmdWithTransformFeedbackEXT :: forall r . CommandBuffer -> Word32 -> Vector Buffer -> Either Word32 (Vector DeviceSize) -> IO r -> IO r+cmdWithTransformFeedbackEXT commandBuffer firstCounterBuffer pCounterBuffers pCounterBufferOffsets =+ bracket_+ (cmdBeginTransformFeedbackEXT commandBuffer firstCounterBuffer pCounterBuffers pCounterBufferOffsets)+ (cmdEndTransformFeedbackEXT commandBuffer firstCounterBuffer pCounterBuffers pCounterBufferOffsets) + foreign import ccall #if !defined(SAFE_FOREIGN_CALLS) unsafe@@ -409,8 +417,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. -- -- - @firstCounterBuffer@ is the index of the first transform feedback -- buffer corresponding to @pCounterBuffers@[0] and@@ -472,7 +480,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - If @counterBufferCount@ is not @0@, and @pCounterBufferOffsets@ is@@ -480,28 +488,26 @@ -- array of @counterBufferCount@ -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize' values ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - This command /must/ only be called inside of a render pass instance ----- - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and the--- elements of @pCounterBuffers@ that are valid handles of non-ignored--- parameters /must/ have been created, allocated, or retrieved from--- the same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Both of @commandBuffer@, and the elements of @pCounterBuffers@ that+-- are valid handles of non-ignored parameters /must/ have been+-- created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -519,8 +525,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdEndTransformFeedbackEXT :: CommandBuffer -> ("firstCounterBuffer" ::: Word32) -> ("counterBuffers" ::: Vector Buffer) -> ("counterBufferOffsets" ::: Either Word32 (Vector DeviceSize)) -> IO ()-cmdEndTransformFeedbackEXT commandBuffer firstCounterBuffer counterBuffers counterBufferOffsets = evalContT $ do+cmdEndTransformFeedbackEXT :: forall io . MonadIO io => CommandBuffer -> ("firstCounterBuffer" ::: Word32) -> ("counterBuffers" ::: Vector Buffer) -> ("counterBufferOffsets" ::: Either Word32 (Vector DeviceSize)) -> io ()+cmdEndTransformFeedbackEXT commandBuffer firstCounterBuffer counterBuffers counterBufferOffsets = liftIO . evalContT $ do let vkCmdEndTransformFeedbackEXT' = mkVkCmdEndTransformFeedbackEXT (pVkCmdEndTransformFeedbackEXT (deviceCmds (commandBuffer :: CommandBuffer))) let pCounterBuffersLength = Data.Vector.length $ (counterBuffers) let pCounterBufferOffsetsLength = either id (fromIntegral . Data.Vector.length) (counterBufferOffsets)@@ -549,16 +555,16 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which this command will be recorded.+-- - @commandBuffer@ is the command buffer into which this command will+-- be recorded. ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' is the query pool that--- will manage the results of the query.+-- - @queryPool@ is the query pool that will manage the results of the+-- query. -- -- - @query@ is the query index within the query pool that will contain -- the results. ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+-- - @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QueryControlFlagBits' -- specifying constraints on the types of queries that /can/ be -- performed.@@ -575,128 +581,104 @@ -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been created--- with a 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' that--- differs from that of any queries that are+-- - @queryPool@ /must/ have been created with a @queryType@ that differs+-- from that of any queries that are -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active>--- within 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+-- within @commandBuffer@ -- -- - All queries used by the command /must/ be unavailable ----- - The 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ not be+-- - The @queryType@ used to create @queryPool@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TIMESTAMP' -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-occlusionQueryPrecise precise occlusion queries>--- feature is not enabled, or the--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to create--- 'Graphics.Vulkan.Core10.Handles.QueryPool' was not+-- feature is not enabled, or the @queryType@ used to create+-- @queryPool@ was not -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION',--- 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not contain+-- @flags@ /must/ not contain -- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QUERY_CONTROL_PRECISE_BIT' ----- - @query@ /must/ be less than the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'+-- - @query@ /must/ be less than the number of queries in @queryPool@ ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- - If the @queryType@ used to create @queryPool@ was -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_OCCLUSION', the--- 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- 'Graphics.Vulkan.Core10.Handles.CommandPool' that @commandBuffer@+-- was allocated from /must/ support graphics operations ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- - If the @queryType@ used to create @queryPool@ was -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PIPELINE_STATISTICS' -- and any of the @pipelineStatistics@ indicate graphics operations, -- the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- - If the @queryType@ used to create @queryPool@ was -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PIPELINE_STATISTICS' -- and any of the @pipelineStatistics@ indicate compute operations, the--- 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support compute operations+-- 'Graphics.Vulkan.Core10.Handles.CommandPool' that @commandBuffer@+-- was allocated from /must/ support compute operations ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be a--- protected command buffer+-- - @commandBuffer@ /must/ not be a protected command buffer -- -- - If called within a render pass instance, the sum of @query@ and the -- number of bits set in the current subpass’s view mask /must/ be less--- than or equal to the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'+-- than or equal to the number of queries in @queryPool@ ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- - If the @queryType@ used to create @queryPool@ was -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT' -- the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- - If the @queryType@ used to create @queryPool@ was -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT' -- the @index@ parameter /must/ be less than -- 'PhysicalDeviceTransformFeedbackPropertiesEXT'::@maxTransformFeedbackStreams@ ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was not+-- - If the @queryType@ used to create @queryPool@ was not -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT' -- the @index@ /must/ be zero ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- - If the @queryType@ used to create @queryPool@ was -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT' -- then -- 'PhysicalDeviceTransformFeedbackPropertiesEXT'::@transformFeedbackQueries@ -- /must/ be supported ----- - If 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of+-- - If @queryPool@ was created with a @queryType@ of -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR', -- the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#profiling-lock profiling lock> -- /must/ have been held before -- 'Graphics.Vulkan.Core10.CommandBuffer.beginCommandBuffer' was called--- on 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+-- on @commandBuffer@ ----- - If 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of+-- - If @queryPool@ was created with a @queryType@ of -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'--- and one of the counters used to create--- 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- and one of the counters used to create @queryPool@ was -- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR', -- the query begin /must/ be the first recorded command in--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'+-- @commandBuffer@ ----- - If 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of+-- - If @queryPool@ was created with a @queryType@ of -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'--- and one of the counters used to create--- 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- and one of the counters used to create @queryPool@ was -- 'Graphics.Vulkan.Extensions.VK_KHR_performance_query.PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR', -- the begin command /must/ not be recorded within a render pass -- instance ----- - If 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of+-- - If @queryPool@ was created with a @queryType@ of -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'--- and another query pool with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType'+-- and another query pool with a @queryType@ -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'--- has been used within 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- its parent primary command buffer or secondary command buffer--- recorded within the same parent primary command buffer as--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', the+-- has been used within @commandBuffer@, its parent primary command+-- buffer or secondary command buffer recorded within the same parent+-- primary command buffer as @commandBuffer@, the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-features-performanceCounterMultipleQueryPools performanceCounterMultipleQueryPools> -- feature /must/ be enabled ----- - If 'Graphics.Vulkan.Core10.Handles.QueryPool' was created with a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' of+-- - If @queryPool@ was created with a @queryType@ of -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR', -- this command /must/ not be recorded in a command buffer that, either -- directly or through secondary command buffers, also contains a@@ -705,37 +687,33 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ be a valid+-- - @queryPool@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QueryControlFlagBits' -- values ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations ----- - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been created,+-- - Both of @commandBuffer@, and @queryPool@ /must/ have been created, -- allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -753,13 +731,21 @@ -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.Enums.QueryControlFlagBits.QueryControlFlags', -- 'Graphics.Vulkan.Core10.Handles.QueryPool'-cmdBeginQueryIndexedEXT :: CommandBuffer -> QueryPool -> ("query" ::: Word32) -> QueryControlFlags -> ("index" ::: Word32) -> IO ()-cmdBeginQueryIndexedEXT commandBuffer queryPool query flags index = do+cmdBeginQueryIndexedEXT :: forall io . MonadIO io => CommandBuffer -> QueryPool -> ("query" ::: Word32) -> QueryControlFlags -> ("index" ::: Word32) -> io ()+cmdBeginQueryIndexedEXT commandBuffer queryPool query flags index = liftIO $ do let vkCmdBeginQueryIndexedEXT' = mkVkCmdBeginQueryIndexedEXT (pVkCmdBeginQueryIndexedEXT (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdBeginQueryIndexedEXT' (commandBufferHandle (commandBuffer)) (queryPool) (query) (flags) (index) pure $ () +-- | A safe wrapper for 'cmdBeginQueryIndexedEXT' and 'cmdEndQueryIndexedEXT'+-- using 'bracket_'+cmdWithQueryIndexedEXT :: forall r . CommandBuffer -> QueryPool -> Word32 -> QueryControlFlags -> Word32 -> IO r -> IO r+cmdWithQueryIndexedEXT commandBuffer queryPool query flags index =+ bracket_+ (cmdBeginQueryIndexedEXT commandBuffer queryPool query flags index)+ (cmdEndQueryIndexedEXT commandBuffer queryPool query index) + foreign import ccall #if !defined(SAFE_FOREIGN_CALLS) unsafe@@ -771,11 +757,11 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which this command will be recorded.+-- - @commandBuffer@ is the command buffer into which this command will+-- be recorded. ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' is the query pool that is--- managing the results of the query.+-- - @queryPool@ is the query pool that is managing the results of the+-- query. -- -- - @query@ is the query index within the query pool where the result is -- stored.@@ -793,61 +779,53 @@ -- - All queries used by the command /must/ be -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#queries-operation-active active> ----- - @query@ /must/ be less than the number of queries in--- 'Graphics.Vulkan.Core10.Handles.QueryPool'+-- - @query@ /must/ be less than the number of queries in @queryPool@ ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be a--- protected command buffer+-- - @commandBuffer@ /must/ not be a protected command buffer -- -- - If 'cmdEndQueryIndexedEXT' is called within a render pass instance, -- the sum of @query@ and the number of bits set in the current -- subpass’s view mask /must/ be less than or equal to the number of--- queries in 'Graphics.Vulkan.Core10.Handles.QueryPool'+-- queries in @queryPool@ ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- - If the @queryType@ used to create @queryPool@ was -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT' -- the @index@ parameter /must/ be less than -- 'PhysicalDeviceTransformFeedbackPropertiesEXT'::@maxTransformFeedbackStreams@ ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was not+-- - If the @queryType@ used to create @queryPool@ was not -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT' -- the @index@ /must/ be zero ----- - If the 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' used to--- create 'Graphics.Vulkan.Core10.Handles.QueryPool' was+-- - If the @queryType@ used to create @queryPool@ was -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT' -- @index@ /must/ equal the @index@ used to begin the query -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ be a valid+-- - @queryPool@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations ----- - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been created,+-- - Both of @commandBuffer@, and @queryPool@ /must/ have been created, -- allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -864,8 +842,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.Handles.QueryPool'-cmdEndQueryIndexedEXT :: CommandBuffer -> QueryPool -> ("query" ::: Word32) -> ("index" ::: Word32) -> IO ()-cmdEndQueryIndexedEXT commandBuffer queryPool query index = do+cmdEndQueryIndexedEXT :: forall io . MonadIO io => CommandBuffer -> QueryPool -> ("query" ::: Word32) -> ("index" ::: Word32) -> io ()+cmdEndQueryIndexedEXT commandBuffer queryPool query index = liftIO $ do let vkCmdEndQueryIndexedEXT' = mkVkCmdEndQueryIndexedEXT (pVkCmdEndQueryIndexedEXT (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdEndQueryIndexedEXT' (commandBufferHandle (commandBuffer)) (queryPool) (query) (index) pure $ ()@@ -883,8 +861,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. -- -- - @instanceCount@ is the number of instances to draw. --@@ -967,8 +945,7 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV' -- sampled as a result of this command /must/ only be sampled using a -- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'@@ -1006,9 +983,8 @@ -- -- - If the 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and done so after--- any previously bound pipeline with the corresponding state not+-- 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@@ -1065,15 +1041,14 @@ -- specified in the descriptor set bound to the same pipeline bind -- point ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource+-- - If @commandBuffer@ is an unprotected command buffer, any resource+-- accessed by the 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource -- -- - The current render pass /must/ be -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>--- with the 'Graphics.Vulkan.Core10.Handles.RenderPass' member of the+-- with the @renderPass@ member of the -- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' -- structure specified when creating the -- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to@@ -1127,38 +1102,35 @@ -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT' -- bit set ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be a--- protected command buffer+-- - @commandBuffer@ /must/ not be a protected command buffer -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @counterBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Buffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - This command /must/ only be called inside of a render pass instance ----- - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- @counterBuffer@ /must/ have been created, allocated, or retrieved--- from the same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Both of @commandBuffer@, and @counterBuffer@ /must/ have been+-- created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -1176,8 +1148,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdDrawIndirectByteCountEXT :: CommandBuffer -> ("instanceCount" ::: Word32) -> ("firstInstance" ::: Word32) -> ("counterBuffer" ::: Buffer) -> ("counterBufferOffset" ::: DeviceSize) -> ("counterOffset" ::: Word32) -> ("vertexStride" ::: Word32) -> IO ()-cmdDrawIndirectByteCountEXT commandBuffer instanceCount firstInstance counterBuffer counterBufferOffset counterOffset vertexStride = do+cmdDrawIndirectByteCountEXT :: forall io . MonadIO io => CommandBuffer -> ("instanceCount" ::: Word32) -> ("firstInstance" ::: Word32) -> ("counterBuffer" ::: Buffer) -> ("counterBufferOffset" ::: DeviceSize) -> ("counterOffset" ::: Word32) -> ("vertexStride" ::: Word32) -> io ()+cmdDrawIndirectByteCountEXT commandBuffer instanceCount firstInstance counterBuffer counterBufferOffset counterOffset vertexStride = liftIO $ do let vkCmdDrawIndirectByteCountEXT' = mkVkCmdDrawIndirectByteCountEXT (pVkCmdDrawIndirectByteCountEXT (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdDrawIndirectByteCountEXT' (commandBufferHandle (commandBuffer)) (instanceCount) (firstInstance) (counterBuffer) (counterBufferOffset) (counterOffset) (vertexStride) pure $ ()@@ -1413,7 +1385,7 @@ -- 'PipelineRasterizationStateStreamCreateFlagsEXT', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PipelineRasterizationStateStreamCreateInfoEXT = PipelineRasterizationStateStreamCreateInfoEXT- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: PipelineRasterizationStateStreamCreateFlagsEXT , -- | @rasterizationStream@ /must/ be zero if -- 'PhysicalDeviceTransformFeedbackPropertiesEXT'::@transformFeedbackRasterizationStreamSelect@
src/Graphics/Vulkan/Extensions/VK_EXT_validation_cache.hs view
@@ -18,6 +18,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -41,12 +42,13 @@ import Control.Monad.Trans.Cont (evalContT) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Foreign.C.Types (CSize(..))+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.C.Types (CChar) import Foreign.C.Types (CSize)-import Foreign.C.Types (CSize(..)) import Foreign.C.Types (CSize(CSize)) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -100,8 +102,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the validation cache object.+-- - @device@ is the logical device that creates the validation cache+-- object. -- -- - @pCreateInfo@ is a pointer to a 'ValidationCacheCreateInfoEXT' -- structure containing the initial parameters for the validation cache@@ -149,8 +151,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'ValidationCacheCreateInfoEXT' structure@@ -178,8 +180,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', 'ValidationCacheCreateInfoEXT', -- 'Graphics.Vulkan.Extensions.Handles.ValidationCacheEXT'-createValidationCacheEXT :: Device -> ValidationCacheCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (ValidationCacheEXT)-createValidationCacheEXT device createInfo allocator = evalContT $ do+createValidationCacheEXT :: forall io . MonadIO io => Device -> ValidationCacheCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io (ValidationCacheEXT)+createValidationCacheEXT device createInfo allocator = liftIO . evalContT $ do let vkCreateValidationCacheEXT' = mkVkCreateValidationCacheEXT (pVkCreateValidationCacheEXT (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -195,11 +197,11 @@ -- 'destroyValidationCacheEXT' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withValidationCacheEXT :: Device -> ValidationCacheCreateInfoEXT -> Maybe AllocationCallbacks -> (ValidationCacheEXT -> IO r) -> IO r-withValidationCacheEXT device validationCacheCreateInfoEXT allocationCallbacks =+withValidationCacheEXT :: forall r . Device -> ValidationCacheCreateInfoEXT -> Maybe AllocationCallbacks -> ((ValidationCacheEXT) -> IO r) -> IO r+withValidationCacheEXT device pCreateInfo pAllocator = bracket- (createValidationCacheEXT device validationCacheCreateInfoEXT allocationCallbacks)- (\o -> destroyValidationCacheEXT device o allocationCallbacks)+ (createValidationCacheEXT device pCreateInfo pAllocator)+ (\(o0) -> destroyValidationCacheEXT device o0 pAllocator) foreign import ccall@@ -213,8 +215,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the validation cache object.+-- - @device@ is the logical device that destroys the validation cache+-- object. -- -- - @validationCache@ is the handle of the validation cache to destroy. --@@ -235,8 +237,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - If @validationCache@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @validationCache@@@ -249,7 +251,7 @@ -- structure -- -- - If @validationCache@ is a valid handle, it /must/ have been created,--- allocated, or retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- allocated, or retrieved from @device@ -- -- == Host Synchronization --@@ -260,8 +262,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.Handles.ValidationCacheEXT'-destroyValidationCacheEXT :: Device -> ValidationCacheEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyValidationCacheEXT device validationCache allocator = evalContT $ do+destroyValidationCacheEXT :: forall io . MonadIO io => Device -> ValidationCacheEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyValidationCacheEXT device validationCache allocator = liftIO . evalContT $ do let vkDestroyValidationCacheEXT' = mkVkDestroyValidationCacheEXT (pVkDestroyValidationCacheEXT (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -281,8 +283,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the validation cache.+-- - @device@ is the logical device that owns the validation cache. -- -- - @validationCache@ is the validation cache to retrieve data from. --@@ -356,8 +357,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @validationCache@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.ValidationCacheEXT' handle@@ -369,7 +370,7 @@ -- @pDataSize@ bytes -- -- - @validationCache@ /must/ have been created, allocated, or retrieved--- from 'Graphics.Vulkan.Core10.Handles.Device'+-- from @device@ -- -- == Return Codes --@@ -389,8 +390,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.Handles.ValidationCacheEXT'-getValidationCacheDataEXT :: Device -> ValidationCacheEXT -> IO (Result, ("data" ::: ByteString))-getValidationCacheDataEXT device validationCache = evalContT $ do+getValidationCacheDataEXT :: forall io . MonadIO io => Device -> ValidationCacheEXT -> io (Result, ("data" ::: ByteString))+getValidationCacheDataEXT device validationCache = liftIO . evalContT $ do let vkGetValidationCacheDataEXT' = mkVkGetValidationCacheDataEXT (pVkGetValidationCacheDataEXT (deviceCmds (device :: Device))) let device' = deviceHandle (device) pPDataSize <- ContT $ bracket (callocBytes @CSize 8) free@@ -417,8 +418,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the validation cache objects.+-- - @device@ is the logical device that owns the validation cache+-- objects. -- -- - @dstCache@ is the handle of the validation cache to merge results -- into.@@ -443,8 +444,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @dstCache@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.ValidationCacheEXT' handle@@ -456,10 +457,10 @@ -- - @srcCacheCount@ /must/ be greater than @0@ -- -- - @dstCache@ /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- @device@ -- -- - Each element of @pSrcCaches@ /must/ have been created, allocated, or--- retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- retrieved from @device@ -- -- == Host Synchronization --@@ -481,8 +482,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.Handles.ValidationCacheEXT'-mergeValidationCachesEXT :: Device -> ("dstCache" ::: ValidationCacheEXT) -> ("srcCaches" ::: Vector ValidationCacheEXT) -> IO ()-mergeValidationCachesEXT device dstCache srcCaches = evalContT $ do+mergeValidationCachesEXT :: forall io . MonadIO io => Device -> ("dstCache" ::: ValidationCacheEXT) -> ("srcCaches" ::: Vector ValidationCacheEXT) -> io ()+mergeValidationCachesEXT device dstCache srcCaches = liftIO . evalContT $ do let vkMergeValidationCachesEXT' = mkVkMergeValidationCachesEXT (pVkMergeValidationCachesEXT (deviceCmds (device :: Device))) pPSrcCaches <- ContT $ allocaBytesAligned @ValidationCacheEXT ((Data.Vector.length (srcCaches)) * 8) 8 lift $ Data.Vector.imapM_ (\i e -> poke (pPSrcCaches `plusPtr` (8 * (i)) :: Ptr ValidationCacheEXT) (e)) (srcCaches)@@ -509,7 +510,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - If @initialDataSize@ is not @0@, @pInitialData@ /must/ be a valid -- pointer to an array of @initialDataSize@ bytes@@ -519,7 +520,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'ValidationCacheCreateFlagsEXT', 'createValidationCacheEXT' data ValidationCacheCreateInfoEXT = ValidationCacheCreateInfoEXT- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ { -- | @flags@ is reserved for future use. flags :: ValidationCacheCreateFlagsEXT , -- | @initialDataSize@ is the number of bytes in @pInitialData@. If -- @initialDataSize@ is zero, the validation cache will initially be empty.
src/Graphics/Vulkan/Extensions/VK_FUCHSIA_imagepipe_surface.hs view
@@ -11,6 +11,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -29,6 +30,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -79,8 +81,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance to--- associate with the surface.+-- - @instance@ is the instance to associate with the surface. -- -- - @pCreateInfo@ is a pointer to a 'ImagePipeSurfaceCreateInfoFUCHSIA' -- structure containing parameters affecting the creation of the@@ -97,7 +98,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -129,8 +130,8 @@ -- 'ImagePipeSurfaceCreateInfoFUCHSIA', -- 'Graphics.Vulkan.Core10.Handles.Instance', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-createImagePipeSurfaceFUCHSIA :: Instance -> ImagePipeSurfaceCreateInfoFUCHSIA -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SurfaceKHR)-createImagePipeSurfaceFUCHSIA instance' createInfo allocator = evalContT $ do+createImagePipeSurfaceFUCHSIA :: forall io . MonadIO io => Instance -> ImagePipeSurfaceCreateInfoFUCHSIA -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)+createImagePipeSurfaceFUCHSIA instance' createInfo allocator = liftIO . evalContT $ do let vkCreateImagePipeSurfaceFUCHSIA' = mkVkCreateImagePipeSurfaceFUCHSIA (pVkCreateImagePipeSurfaceFUCHSIA (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -154,10 +155,9 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createImagePipeSurfaceFUCHSIA' data ImagePipeSurfaceCreateInfoFUCHSIA = ImagePipeSurfaceCreateInfoFUCHSIA- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: ImagePipeSurfaceCreateFlagsFUCHSIA- , -- | @imagePipeHandle@ /must/ be a valid- -- 'Graphics.Vulkan.Extensions.WSITypes.Zx_handle_t'+ , -- | @imagePipeHandle@ /must/ be a valid @zx_handle_t@ imagePipeHandle :: Zx_handle_t } deriving (Typeable)
src/Graphics/Vulkan/Extensions/VK_GGP_stream_descriptor_surface.hs view
@@ -11,6 +11,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -29,6 +30,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -79,8 +81,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance to--- associate with the surface.+-- - @instance@ is the instance to associate with the surface. -- -- - @pCreateInfo@ is a pointer to a -- 'StreamDescriptorSurfaceCreateInfoGGP' structure containing@@ -97,7 +98,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -131,8 +132,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Instance', -- 'StreamDescriptorSurfaceCreateInfoGGP', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-createStreamDescriptorSurfaceGGP :: Instance -> StreamDescriptorSurfaceCreateInfoGGP -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SurfaceKHR)-createStreamDescriptorSurfaceGGP instance' createInfo allocator = evalContT $ do+createStreamDescriptorSurfaceGGP :: forall io . MonadIO io => Instance -> StreamDescriptorSurfaceCreateInfoGGP -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)+createStreamDescriptorSurfaceGGP instance' createInfo allocator = liftIO . evalContT $ do let vkCreateStreamDescriptorSurfaceGGP' = mkVkCreateStreamDescriptorSurfaceGGP (pVkCreateStreamDescriptorSurfaceGGP (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -156,7 +157,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createStreamDescriptorSurfaceGGP' data StreamDescriptorSurfaceCreateInfoGGP = StreamDescriptorSurfaceCreateInfoGGP- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: StreamDescriptorSurfaceCreateFlagsGGP , -- | @streamDescriptor@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.WSITypes.GgpStreamDescriptor'
src/Graphics/Vulkan/Extensions/VK_GOOGLE_display_timing.hs view
@@ -13,6 +13,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -26,6 +27,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Either (Either) import Data.String (IsString) import Data.Typeable (Typeable)@@ -73,8 +75,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device associated--- with @swapchain@.+-- - @device@ is the device associated with @swapchain@. -- -- - @swapchain@ is the swapchain to obtain the refresh duration for. --@@ -83,8 +84,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @swapchain@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR' handle@@ -92,8 +93,8 @@ -- - @pDisplayTimingProperties@ /must/ be a valid pointer to a -- 'RefreshCycleDurationGOOGLE' structure ----- - Both of 'Graphics.Vulkan.Core10.Handles.Device', and @swapchain@--- /must/ have been created, allocated, or retrieved from the same+-- - Both of @device@, and @swapchain@ /must/ have been created,+-- allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Host Synchronization@@ -116,8 +117,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'RefreshCycleDurationGOOGLE', -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR'-getRefreshCycleDurationGOOGLE :: Device -> SwapchainKHR -> IO (("displayTimingProperties" ::: RefreshCycleDurationGOOGLE))-getRefreshCycleDurationGOOGLE device swapchain = evalContT $ do+getRefreshCycleDurationGOOGLE :: forall io . MonadIO io => Device -> SwapchainKHR -> io (("displayTimingProperties" ::: RefreshCycleDurationGOOGLE))+getRefreshCycleDurationGOOGLE device swapchain = liftIO . evalContT $ do let vkGetRefreshCycleDurationGOOGLE' = mkVkGetRefreshCycleDurationGOOGLE (pVkGetRefreshCycleDurationGOOGLE (deviceCmds (device :: Device))) pPDisplayTimingProperties <- ContT (withZeroCStruct @RefreshCycleDurationGOOGLE) r <- lift $ vkGetRefreshCycleDurationGOOGLE' (deviceHandle (device)) (swapchain) (pPDisplayTimingProperties)@@ -138,8 +139,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device associated--- with @swapchain@.+-- - @device@ is the device associated with @swapchain@. -- -- - @swapchain@ is the swapchain to obtain presentation timing -- information duration for.@@ -170,8 +170,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @swapchain@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR' handle@@ -184,8 +184,8 @@ -- /must/ be a valid pointer to an array of @pPresentationTimingCount@ -- 'PastPresentationTimingGOOGLE' structures ----- - Both of 'Graphics.Vulkan.Core10.Handles.Device', and @swapchain@--- /must/ have been created, allocated, or retrieved from the same+-- - Both of @device@, and @swapchain@ /must/ have been created,+-- allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Host Synchronization@@ -212,8 +212,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'PastPresentationTimingGOOGLE', -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR'-getPastPresentationTimingGOOGLE :: Device -> SwapchainKHR -> IO (Result, ("presentationTimings" ::: Vector PastPresentationTimingGOOGLE))-getPastPresentationTimingGOOGLE device swapchain = evalContT $ do+getPastPresentationTimingGOOGLE :: forall io . MonadIO io => Device -> SwapchainKHR -> io (Result, ("presentationTimings" ::: Vector PastPresentationTimingGOOGLE))+getPastPresentationTimingGOOGLE device swapchain = liftIO . evalContT $ do let vkGetPastPresentationTimingGOOGLE' = mkVkGetPastPresentationTimingGOOGLE (pVkGetPastPresentationTimingGOOGLE (deviceCmds (device :: Device))) let device' = deviceHandle (device) pPPresentationTimingCount <- ContT $ bracket (callocBytes @Word32 4) free
src/Graphics/Vulkan/Extensions/VK_INTEL_performance_query.hs view
@@ -46,6 +46,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -68,6 +69,7 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Control.Monad.Trans.Cont (runContT)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.C.Types (CChar)@@ -141,8 +143,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device used--- for the queries.+-- - @device@ is the logical device used for the queries. -- -- - @pInitializeInfo@ is a pointer to a -- 'InitializePerformanceApiInfoINTEL' structure specifying@@ -164,8 +165,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'InitializePerformanceApiInfoINTEL'-initializePerformanceApiINTEL :: Device -> ("initializeInfo" ::: InitializePerformanceApiInfoINTEL) -> IO ()-initializePerformanceApiINTEL device initializeInfo = evalContT $ do+initializePerformanceApiINTEL :: forall io . MonadIO io => Device -> ("initializeInfo" ::: InitializePerformanceApiInfoINTEL) -> io ()+initializePerformanceApiINTEL device initializeInfo = liftIO . evalContT $ do let vkInitializePerformanceApiINTEL' = mkVkInitializePerformanceApiINTEL (pVkInitializePerformanceApiINTEL (deviceCmds (device :: Device))) pInitializeInfo <- ContT $ withCStruct (initializeInfo) r <- lift $ vkInitializePerformanceApiINTEL' (deviceHandle (device)) pInitializeInfo@@ -184,16 +185,15 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device used--- for the queries.+-- - @device@ is the logical device used for the queries. -- -- == Valid Usage (Implicit) -- -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device'-uninitializePerformanceApiINTEL :: Device -> IO ()-uninitializePerformanceApiINTEL device = do+uninitializePerformanceApiINTEL :: forall io . MonadIO io => Device -> io ()+uninitializePerformanceApiINTEL device = liftIO $ do let vkUninitializePerformanceApiINTEL' = mkVkUninitializePerformanceApiINTEL (pVkUninitializePerformanceApiINTEL (deviceCmds (device :: Device))) vkUninitializePerformanceApiINTEL' (deviceHandle (device)) pure $ ()@@ -215,24 +215,23 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pMarkerInfo@ /must/ be a valid pointer to a valid -- 'PerformanceMarkerInfoINTEL' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, compute, or transfer operations+-- @commandBuffer@ was allocated from /must/ support graphics, compute,+-- or transfer operations -- -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -262,8 +261,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'PerformanceMarkerInfoINTEL'-cmdSetPerformanceMarkerINTEL :: CommandBuffer -> PerformanceMarkerInfoINTEL -> IO ()-cmdSetPerformanceMarkerINTEL commandBuffer markerInfo = evalContT $ do+cmdSetPerformanceMarkerINTEL :: forall io . MonadIO io => CommandBuffer -> PerformanceMarkerInfoINTEL -> io ()+cmdSetPerformanceMarkerINTEL commandBuffer markerInfo = liftIO . evalContT $ do let vkCmdSetPerformanceMarkerINTEL' = mkVkCmdSetPerformanceMarkerINTEL (pVkCmdSetPerformanceMarkerINTEL (deviceCmds (commandBuffer :: CommandBuffer))) pMarkerInfo <- ContT $ withCStruct (markerInfo) r <- lift $ vkCmdSetPerformanceMarkerINTEL' (commandBufferHandle (commandBuffer)) pMarkerInfo@@ -281,24 +280,23 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pMarkerInfo@ /must/ be a valid pointer to a valid -- 'PerformanceStreamMarkerInfoINTEL' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, compute, or transfer operations+-- @commandBuffer@ was allocated from /must/ support graphics, compute,+-- or transfer operations -- -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -328,8 +326,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'PerformanceStreamMarkerInfoINTEL'-cmdSetPerformanceStreamMarkerINTEL :: CommandBuffer -> PerformanceStreamMarkerInfoINTEL -> IO ()-cmdSetPerformanceStreamMarkerINTEL commandBuffer markerInfo = evalContT $ do+cmdSetPerformanceStreamMarkerINTEL :: forall io . MonadIO io => CommandBuffer -> PerformanceStreamMarkerInfoINTEL -> io ()+cmdSetPerformanceStreamMarkerINTEL commandBuffer markerInfo = liftIO . evalContT $ do let vkCmdSetPerformanceStreamMarkerINTEL' = mkVkCmdSetPerformanceStreamMarkerINTEL (pVkCmdSetPerformanceStreamMarkerINTEL (deviceCmds (commandBuffer :: CommandBuffer))) pMarkerInfo <- ContT $ withCStruct (markerInfo) r <- lift $ vkCmdSetPerformanceStreamMarkerINTEL' (commandBufferHandle (commandBuffer)) pMarkerInfo@@ -347,8 +345,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- where the override takes place.+-- - @commandBuffer@ is the command buffer where the override takes+-- place. -- -- - @pOverrideInfo@ is a pointer to a 'PerformanceOverrideInfoINTEL' -- structure selecting the parameter to override.@@ -361,24 +359,23 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pOverrideInfo@ /must/ be a valid pointer to a valid -- 'PerformanceOverrideInfoINTEL' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, compute, or transfer operations+-- @commandBuffer@ was allocated from /must/ support graphics, compute,+-- or transfer operations -- -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -408,8 +405,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'PerformanceOverrideInfoINTEL'-cmdSetPerformanceOverrideINTEL :: CommandBuffer -> PerformanceOverrideInfoINTEL -> IO ()-cmdSetPerformanceOverrideINTEL commandBuffer overrideInfo = evalContT $ do+cmdSetPerformanceOverrideINTEL :: forall io . MonadIO io => CommandBuffer -> PerformanceOverrideInfoINTEL -> io ()+cmdSetPerformanceOverrideINTEL commandBuffer overrideInfo = liftIO . evalContT $ do let vkCmdSetPerformanceOverrideINTEL' = mkVkCmdSetPerformanceOverrideINTEL (pVkCmdSetPerformanceOverrideINTEL (deviceCmds (commandBuffer :: CommandBuffer))) pOverrideInfo <- ContT $ withCStruct (overrideInfo) r <- lift $ vkCmdSetPerformanceOverrideINTEL' (commandBufferHandle (commandBuffer)) pOverrideInfo@@ -428,8 +425,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- the performance query commands will be submitted to.+-- - @device@ is the logical device that the performance query commands+-- will be submitted to. -- -- - @pAcquireInfo@ is a pointer to a -- 'PerformanceConfigurationAcquireInfoINTEL' structure, specifying the@@ -456,8 +453,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'PerformanceConfigurationAcquireInfoINTEL', -- 'Graphics.Vulkan.Extensions.Handles.PerformanceConfigurationINTEL'-acquirePerformanceConfigurationINTEL :: Device -> PerformanceConfigurationAcquireInfoINTEL -> IO (PerformanceConfigurationINTEL)-acquirePerformanceConfigurationINTEL device acquireInfo = evalContT $ do+acquirePerformanceConfigurationINTEL :: forall io . MonadIO io => Device -> PerformanceConfigurationAcquireInfoINTEL -> io (PerformanceConfigurationINTEL)+acquirePerformanceConfigurationINTEL device acquireInfo = liftIO . evalContT $ do let vkAcquirePerformanceConfigurationINTEL' = mkVkAcquirePerformanceConfigurationINTEL (pVkAcquirePerformanceConfigurationINTEL (deviceCmds (device :: Device))) pAcquireInfo <- ContT $ withCStruct (acquireInfo) pPConfiguration <- ContT $ bracket (callocBytes @PerformanceConfigurationINTEL 8) free@@ -479,8 +476,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device associated to--- the configuration object to release.+-- - @device@ is the device associated to the configuration object to+-- release. -- -- - @configuration@ is the configuration object to release. --@@ -500,8 +497,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.Handles.PerformanceConfigurationINTEL'-releasePerformanceConfigurationINTEL :: Device -> PerformanceConfigurationINTEL -> IO ()-releasePerformanceConfigurationINTEL device configuration = do+releasePerformanceConfigurationINTEL :: forall io . MonadIO io => Device -> PerformanceConfigurationINTEL -> io ()+releasePerformanceConfigurationINTEL device configuration = liftIO $ do let vkReleasePerformanceConfigurationINTEL' = mkVkReleasePerformanceConfigurationINTEL (pVkReleasePerformanceConfigurationINTEL (deviceCmds (device :: Device))) r <- vkReleasePerformanceConfigurationINTEL' (deviceHandle (device)) (configuration) when (r < SUCCESS) (throwIO (VulkanException r))@@ -518,22 +515,21 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Queue' is the queue on which the--- configuration will be used.+-- - @queue@ is the queue on which the configuration will be used. -- -- - @configuration@ is the configuration to use. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Queue' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Queue' handle+-- - @queue@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Queue'+-- handle -- -- - @configuration@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.PerformanceConfigurationINTEL' -- handle ----- - Both of @configuration@, and 'Graphics.Vulkan.Core10.Handles.Queue'--- /must/ have been created, allocated, or retrieved from the same+-- - Both of @configuration@, and @queue@ /must/ have been created,+-- allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Command Properties@@ -562,8 +558,8 @@ -- -- 'Graphics.Vulkan.Extensions.Handles.PerformanceConfigurationINTEL', -- 'Graphics.Vulkan.Core10.Handles.Queue'-queueSetPerformanceConfigurationINTEL :: Queue -> PerformanceConfigurationINTEL -> IO ()-queueSetPerformanceConfigurationINTEL queue configuration = do+queueSetPerformanceConfigurationINTEL :: forall io . MonadIO io => Queue -> PerformanceConfigurationINTEL -> io ()+queueSetPerformanceConfigurationINTEL queue configuration = liftIO $ do let vkQueueSetPerformanceConfigurationINTEL' = mkVkQueueSetPerformanceConfigurationINTEL (pVkQueueSetPerformanceConfigurationINTEL (deviceCmds (queue :: Queue))) r <- vkQueueSetPerformanceConfigurationINTEL' (queueHandle (queue)) (configuration) when (r < SUCCESS) (throwIO (VulkanException r))@@ -581,8 +577,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device to--- query.+-- - @device@ is the logical device to query. -- -- - @parameter@ is the parameter to query. --@@ -605,8 +600,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'PerformanceParameterTypeINTEL', 'PerformanceValueINTEL'-getPerformanceParameterINTEL :: Device -> PerformanceParameterTypeINTEL -> IO (PerformanceValueINTEL)-getPerformanceParameterINTEL device parameter = evalContT $ do+getPerformanceParameterINTEL :: forall io . MonadIO io => Device -> PerformanceParameterTypeINTEL -> io (PerformanceValueINTEL)+getPerformanceParameterINTEL device parameter = liftIO . evalContT $ do let vkGetPerformanceParameterINTEL' = mkVkGetPerformanceParameterINTEL (pVkGetPerformanceParameterINTEL (deviceCmds (device :: Device))) pPValue <- ContT (withZeroCStruct @PerformanceValueINTEL) r <- lift $ vkGetPerformanceParameterINTEL' (deviceHandle (device)) (parameter) (pPValue)@@ -712,8 +707,7 @@ -- = Members -- -- To create a pool for Intel performance queries, set--- 'Graphics.Vulkan.Core10.Query.QueryPoolCreateInfo'::'Graphics.Vulkan.Core10.Enums.QueryType.QueryType'--- to+-- 'Graphics.Vulkan.Core10.Query.QueryPoolCreateInfo'::@queryType@ to -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_INTEL' -- and add a 'QueryPoolCreateInfoINTEL' structure to the @pNext@ chain of -- the 'Graphics.Vulkan.Core10.Query.QueryPoolCreateInfo' structure.
src/Graphics/Vulkan/Extensions/VK_KHR_android_surface.hs view
@@ -11,6 +11,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -29,6 +30,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -79,8 +81,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance to--- associate the surface with.+-- - @instance@ is the instance to associate the surface with. -- -- - @pCreateInfo@ is a pointer to a 'AndroidSurfaceCreateInfoKHR' -- structure containing parameters affecting the creation of the@@ -126,7 +127,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -160,8 +161,8 @@ -- 'AndroidSurfaceCreateInfoKHR', -- 'Graphics.Vulkan.Core10.Handles.Instance', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-createAndroidSurfaceKHR :: Instance -> AndroidSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SurfaceKHR)-createAndroidSurfaceKHR instance' createInfo allocator = evalContT $ do+createAndroidSurfaceKHR :: forall io . MonadIO io => Instance -> AndroidSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)+createAndroidSurfaceKHR instance' createInfo allocator = liftIO . evalContT $ do let vkCreateAndroidSurfaceKHR' = mkVkCreateAndroidSurfaceKHR (pVkCreateAndroidSurfaceKHR (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -185,10 +186,10 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createAndroidSurfaceKHR' data AndroidSurfaceCreateInfoKHR = AndroidSurfaceCreateInfoKHR- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: AndroidSurfaceCreateFlagsKHR- , -- | 'Graphics.Vulkan.Extensions.WSITypes.Window' /must/ point to a valid- -- Android 'Graphics.Vulkan.Extensions.WSITypes.ANativeWindow'.+ , -- | @window@ /must/ point to a valid Android+ -- 'Graphics.Vulkan.Extensions.WSITypes.ANativeWindow'. window :: Ptr ANativeWindow } deriving (Typeable)
src/Graphics/Vulkan/Extensions/VK_KHR_display.hs view
@@ -44,6 +44,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -65,6 +66,7 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Data.Vector (generateM)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -140,8 +142,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is a physical--- device.+-- - @physicalDevice@ is a physical device. -- -- - @pPropertyCount@ is a pointer to an integer related to the number of -- display devices available or queried, as described below.@@ -152,23 +153,21 @@ -- = Description -- -- If @pProperties@ is @NULL@, then the number of display devices available--- for 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is returned in--- @pPropertyCount@. Otherwise, @pPropertyCount@ /must/ point to a variable--- set by the user to the number of elements in the @pProperties@ array,--- and on return the variable is overwritten with the number of structures--- actually written to @pProperties@. If the value of @pPropertyCount@ is--- less than the number of display devices for--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', at most--- @pPropertyCount@ structures will be written. If @pPropertyCount@ is--- smaller than the number of display devices available for--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice',+-- for @physicalDevice@ is returned in @pPropertyCount@. Otherwise,+-- @pPropertyCount@ /must/ point to a variable set by the user to the+-- number of elements in the @pProperties@ array, and on return the+-- variable is overwritten with the number of structures actually written+-- to @pProperties@. If the value of @pPropertyCount@ is less than the+-- number of display devices for @physicalDevice@, at most @pPropertyCount@+-- structures will be written. If @pPropertyCount@ is smaller than the+-- number of display devices available for @physicalDevice@, -- 'Graphics.Vulkan.Core10.Enums.Result.INCOMPLETE' will be returned -- instead of 'Graphics.Vulkan.Core10.Enums.Result.SUCCESS' to indicate -- that not all the available values were returned. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pPropertyCount@ /must/ be a valid pointer to a @uint32_t@ value@@ -194,8 +193,8 @@ -- = See Also -- -- 'DisplayPropertiesKHR', 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceDisplayPropertiesKHR :: PhysicalDevice -> IO (Result, ("properties" ::: Vector DisplayPropertiesKHR))-getPhysicalDeviceDisplayPropertiesKHR physicalDevice = evalContT $ do+getPhysicalDeviceDisplayPropertiesKHR :: forall io . MonadIO io => PhysicalDevice -> io (Result, ("properties" ::: Vector DisplayPropertiesKHR))+getPhysicalDeviceDisplayPropertiesKHR physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceDisplayPropertiesKHR' = mkVkGetPhysicalDeviceDisplayPropertiesKHR (pVkGetPhysicalDeviceDisplayPropertiesKHR (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPPropertyCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -223,8 +222,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is a physical--- device.+-- - @physicalDevice@ is a physical device. -- -- - @pPropertyCount@ is a pointer to an integer related to the number of -- display planes available or queried, as described below.@@ -235,18 +233,17 @@ -- = Description -- -- If @pProperties@ is @NULL@, then the number of display planes available--- for 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is returned in--- @pPropertyCount@. Otherwise, @pPropertyCount@ /must/ point to a variable--- set by the user to the number of elements in the @pProperties@ array,--- and on return the variable is overwritten with the number of structures--- actually written to @pProperties@. If the value of @pPropertyCount@ is--- less than the number of display planes for--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', at most--- @pPropertyCount@ structures will be written.+-- for @physicalDevice@ is returned in @pPropertyCount@. Otherwise,+-- @pPropertyCount@ /must/ point to a variable set by the user to the+-- number of elements in the @pProperties@ array, and on return the+-- variable is overwritten with the number of structures actually written+-- to @pProperties@. If the value of @pPropertyCount@ is less than the+-- number of display planes for @physicalDevice@, at most @pPropertyCount@+-- structures will be written. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pPropertyCount@ /must/ be a valid pointer to a @uint32_t@ value@@ -274,8 +271,8 @@ -- -- 'DisplayPlanePropertiesKHR', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceDisplayPlanePropertiesKHR :: PhysicalDevice -> IO (Result, ("properties" ::: Vector DisplayPlanePropertiesKHR))-getPhysicalDeviceDisplayPlanePropertiesKHR physicalDevice = evalContT $ do+getPhysicalDeviceDisplayPlanePropertiesKHR :: forall io . MonadIO io => PhysicalDevice -> io (Result, ("properties" ::: Vector DisplayPlanePropertiesKHR))+getPhysicalDeviceDisplayPlanePropertiesKHR physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceDisplayPlanePropertiesKHR' = mkVkGetPhysicalDeviceDisplayPlanePropertiesKHR (pVkGetPhysicalDeviceDisplayPlanePropertiesKHR (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPPropertyCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -303,8 +300,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is a physical--- device.+-- - @physicalDevice@ is a physical device. -- -- - @planeIndex@ is the plane which the application wishes to use, and -- /must/ be in the range [0, physical device plane count - 1].@@ -318,20 +314,17 @@ -- = Description -- -- If @pDisplays@ is @NULL@, then the number of displays usable with the--- specified @planeIndex@ for--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is returned in+-- specified @planeIndex@ for @physicalDevice@ is returned in -- @pDisplayCount@. Otherwise, @pDisplayCount@ /must/ point to a variable -- set by the user to the number of elements in the @pDisplays@ array, and -- on return the variable is overwritten with the number of handles -- actually written to @pDisplays@. If the value of @pDisplayCount@ is less--- than the number of display planes for--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', at most @pDisplayCount@--- handles will be written. If @pDisplayCount@ is smaller than the number--- of displays usable with the specified @planeIndex@ for--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice',--- 'Graphics.Vulkan.Core10.Enums.Result.INCOMPLETE' will be returned--- instead of 'Graphics.Vulkan.Core10.Enums.Result.SUCCESS' to indicate--- that not all the available values were returned.+-- than the number of display planes for @physicalDevice@, at most+-- @pDisplayCount@ handles will be written. If @pDisplayCount@ is smaller+-- than the number of displays usable with the specified @planeIndex@ for+-- @physicalDevice@, 'Graphics.Vulkan.Core10.Enums.Result.INCOMPLETE' will+-- be returned instead of 'Graphics.Vulkan.Core10.Enums.Result.SUCCESS' to+-- indicate that not all the available values were returned. -- -- == Valid Usage --@@ -341,7 +334,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pDisplayCount@ /must/ be a valid pointer to a @uint32_t@ value@@ -369,8 +362,8 @@ -- -- 'Graphics.Vulkan.Extensions.Handles.DisplayKHR', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getDisplayPlaneSupportedDisplaysKHR :: PhysicalDevice -> ("planeIndex" ::: Word32) -> IO (Result, ("displays" ::: Vector DisplayKHR))-getDisplayPlaneSupportedDisplaysKHR physicalDevice planeIndex = evalContT $ do+getDisplayPlaneSupportedDisplaysKHR :: forall io . MonadIO io => PhysicalDevice -> ("planeIndex" ::: Word32) -> io (Result, ("displays" ::: Vector DisplayKHR))+getDisplayPlaneSupportedDisplaysKHR physicalDevice planeIndex = liftIO . evalContT $ do let vkGetDisplayPlaneSupportedDisplaysKHR' = mkVkGetDisplayPlaneSupportedDisplaysKHR (pVkGetDisplayPlaneSupportedDisplaysKHR (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPDisplayCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -397,12 +390,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device associated with--- 'Graphics.Vulkan.Extensions.WSITypes.Display'.+-- - @physicalDevice@ is the physical device associated with @display@. ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' is the display to--- query.+-- - @display@ is the display to query. -- -- - @pPropertyCount@ is a pointer to an integer related to the number of -- display modes available or queried, as described below.@@ -413,28 +403,25 @@ -- = Description -- -- If @pProperties@ is @NULL@, then the number of display modes available--- on the specified 'Graphics.Vulkan.Extensions.WSITypes.Display' for--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is returned in+-- on the specified @display@ for @physicalDevice@ is returned in -- @pPropertyCount@. Otherwise, @pPropertyCount@ /must/ point to a variable -- set by the user to the number of elements in the @pProperties@ array, -- and on return the variable is overwritten with the number of structures -- actually written to @pProperties@. If the value of @pPropertyCount@ is--- less than the number of display modes for--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', at most+-- less than the number of display modes for @physicalDevice@, at most -- @pPropertyCount@ structures will be written. If @pPropertyCount@ is -- smaller than the number of display modes available on the specified--- 'Graphics.Vulkan.Extensions.WSITypes.Display' for--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice',+-- @display@ for @physicalDevice@, -- 'Graphics.Vulkan.Core10.Enums.Result.INCOMPLETE' will be returned -- instead of 'Graphics.Vulkan.Core10.Enums.Result.SUCCESS' to indicate -- that not all the available values were returned. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' /must/ be a valid+-- - @display@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.DisplayKHR' handle -- -- - @pPropertyCount@ /must/ be a valid pointer to a @uint32_t@ value@@ -444,9 +431,8 @@ -- to an array of @pPropertyCount@ 'DisplayModePropertiesKHR' -- structures ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' /must/ have been--- created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'+-- - @display@ /must/ have been created, allocated, or retrieved from+-- @physicalDevice@ -- -- == Return Codes --@@ -467,8 +453,8 @@ -- 'Graphics.Vulkan.Extensions.Handles.DisplayKHR', -- 'DisplayModePropertiesKHR', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getDisplayModePropertiesKHR :: PhysicalDevice -> DisplayKHR -> IO (Result, ("properties" ::: Vector DisplayModePropertiesKHR))-getDisplayModePropertiesKHR physicalDevice display = evalContT $ do+getDisplayModePropertiesKHR :: forall io . MonadIO io => PhysicalDevice -> DisplayKHR -> io (Result, ("properties" ::: Vector DisplayModePropertiesKHR))+getDisplayModePropertiesKHR physicalDevice display = liftIO . evalContT $ do let vkGetDisplayModePropertiesKHR' = mkVkGetDisplayModePropertiesKHR (pVkGetDisplayModePropertiesKHR (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPPropertyCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -495,12 +481,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device associated with--- 'Graphics.Vulkan.Extensions.WSITypes.Display'.+-- - @physicalDevice@ is the physical device associated with @display@. ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' is the display to--- create an additional mode for.+-- - @display@ is the display to create an additional mode for. -- -- - @pCreateInfo@ is a 'DisplayModeCreateInfoKHR' structure describing -- the new mode to create.@@ -514,10 +497,10 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' /must/ be a valid+-- - @display@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.DisplayKHR' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -531,14 +514,12 @@ -- - @pMode@ /must/ be a valid pointer to a -- 'Graphics.Vulkan.Extensions.Handles.DisplayModeKHR' handle ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' /must/ have been--- created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'+-- - @display@ /must/ have been created, allocated, or retrieved from+-- @physicalDevice@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Extensions.WSITypes.Display' /must/--- be externally synchronized+-- - Host access to @display@ /must/ be externally synchronized -- -- == Return Codes --@@ -561,8 +542,8 @@ -- 'DisplayModeCreateInfoKHR', -- 'Graphics.Vulkan.Extensions.Handles.DisplayModeKHR', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-createDisplayModeKHR :: PhysicalDevice -> DisplayKHR -> DisplayModeCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (DisplayModeKHR)-createDisplayModeKHR physicalDevice display createInfo allocator = evalContT $ do+createDisplayModeKHR :: forall io . MonadIO io => PhysicalDevice -> DisplayKHR -> DisplayModeCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io (DisplayModeKHR)+createDisplayModeKHR physicalDevice display createInfo allocator = liftIO . evalContT $ do let vkCreateDisplayModeKHR' = mkVkCreateDisplayModeKHR (pVkCreateDisplayModeKHR (instanceCmds (physicalDevice :: PhysicalDevice))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -587,8 +568,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device associated with 'Graphics.Vulkan.Extensions.WSITypes.Display'+-- - @physicalDevice@ is the physical device associated with @display@ -- -- - @mode@ is the display mode the application intends to program when -- using the specified plane. Note this parameter also implicitly@@ -603,7 +583,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @mode@ /must/ be a valid@@ -633,8 +613,8 @@ -- 'Graphics.Vulkan.Extensions.Handles.DisplayModeKHR', -- 'DisplayPlaneCapabilitiesKHR', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getDisplayPlaneCapabilitiesKHR :: PhysicalDevice -> DisplayModeKHR -> ("planeIndex" ::: Word32) -> IO (DisplayPlaneCapabilitiesKHR)-getDisplayPlaneCapabilitiesKHR physicalDevice mode planeIndex = evalContT $ do+getDisplayPlaneCapabilitiesKHR :: forall io . MonadIO io => PhysicalDevice -> DisplayModeKHR -> ("planeIndex" ::: Word32) -> io (DisplayPlaneCapabilitiesKHR)+getDisplayPlaneCapabilitiesKHR physicalDevice mode planeIndex = liftIO . evalContT $ do let vkGetDisplayPlaneCapabilitiesKHR' = mkVkGetDisplayPlaneCapabilitiesKHR (pVkGetDisplayPlaneCapabilitiesKHR (instanceCmds (physicalDevice :: PhysicalDevice))) pPCapabilities <- ContT (withZeroCStruct @DisplayPlaneCapabilitiesKHR) r <- lift $ vkGetDisplayPlaneCapabilitiesKHR' (physicalDeviceHandle (physicalDevice)) (mode) (planeIndex) (pPCapabilities)@@ -656,8 +636,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance--- corresponding to the physical device the targeted display is on.+-- - @instance@ is the instance corresponding to the physical device the+-- targeted display is on. -- -- - @pCreateInfo@ is a pointer to a 'DisplaySurfaceCreateInfoKHR' -- structure specifying which mode, plane, and other parameters to use,@@ -674,7 +654,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -706,8 +686,8 @@ -- 'DisplaySurfaceCreateInfoKHR', -- 'Graphics.Vulkan.Core10.Handles.Instance', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-createDisplayPlaneSurfaceKHR :: Instance -> DisplaySurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SurfaceKHR)-createDisplayPlaneSurfaceKHR instance' createInfo allocator = evalContT $ do+createDisplayPlaneSurfaceKHR :: forall io . MonadIO io => Instance -> DisplaySurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)+createDisplayPlaneSurfaceKHR instance' createInfo allocator = liftIO . evalContT $ do let vkCreateDisplayPlaneSurfaceKHR' = mkVkCreateDisplayPlaneSurfaceKHR (pVkCreateDisplayPlaneSurfaceKHR (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -744,15 +724,14 @@ -- 'Graphics.Vulkan.Core10.SharedTypes.Extent2D', -- 'SurfaceTransformFlagsKHR', 'getPhysicalDeviceDisplayPropertiesKHR' data DisplayPropertiesKHR = DisplayPropertiesKHR- { -- | 'Graphics.Vulkan.Extensions.WSITypes.Display' is a handle that is used- -- to refer to the display described here. This handle will be valid for- -- the lifetime of the Vulkan instance.+ { -- | @display@ is a handle that is used to refer to the display described+ -- here. This handle will be valid for the lifetime of the Vulkan instance. display :: DisplayKHR , -- | @displayName@ is a pointer to a null-terminated UTF-8 string containing -- the name of the display. Generally, this will be the name provided by -- the display’s EDID. It /can/ be @NULL@ if no suitable name is available. -- If not @NULL@, the memory it points to /must/ remain accessible as long- -- as 'Graphics.Vulkan.Extensions.WSITypes.Display' is valid.+ -- as @display@ is valid. displayName :: ByteString , -- | @physicalDimensions@ describes the physical width and height of the -- visible portion of the display, in millimeters.@@ -992,7 +971,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createDisplayModeKHR' data DisplayModeCreateInfoKHR = DisplayModeCreateInfoKHR- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: DisplayModeCreateFlagsKHR , -- | @parameters@ /must/ be a valid 'DisplayModeParametersKHR' structure parameters :: DisplayModeParametersKHR@@ -1207,7 +1186,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - @displayMode@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.DisplayModeKHR' handle@@ -1224,8 +1203,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'SurfaceTransformFlagBitsKHR', 'createDisplayPlaneSurfaceKHR' data DisplaySurfaceCreateInfoKHR = DisplaySurfaceCreateInfoKHR- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use, and- -- /must/ be zero.+ { -- | @flags@ is reserved for future use, and /must/ be zero. flags :: DisplaySurfaceCreateFlagsKHR , -- | @displayMode@ is a 'Graphics.Vulkan.Extensions.Handles.DisplayModeKHR' -- handle specifying the mode to use when displaying this surface.
src/Graphics/Vulkan/Extensions/VK_KHR_display_swapchain.hs view
@@ -19,6 +19,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -31,6 +32,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable(peek))@@ -90,8 +92,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device to create the--- swapchains for.+-- - @device@ is the device to create the swapchains for. -- -- - @swapchainCount@ is the number of swapchains to create. --@@ -131,8 +132,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfos@ /must/ be a valid pointer to an array of -- @swapchainCount@ valid@@ -182,8 +183,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.VK_KHR_swapchain.SwapchainCreateInfoKHR', -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR'-createSharedSwapchainsKHR :: PokeChain a => Device -> ("createInfos" ::: Vector (SwapchainCreateInfoKHR a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (("swapchains" ::: Vector SwapchainKHR))-createSharedSwapchainsKHR device createInfos allocator = evalContT $ do+createSharedSwapchainsKHR :: forall a io . (PokeChain a, MonadIO io) => Device -> ("createInfos" ::: Vector (SwapchainCreateInfoKHR a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io (("swapchains" ::: Vector SwapchainKHR))+createSharedSwapchainsKHR device createInfos allocator = liftIO . evalContT $ do let vkCreateSharedSwapchainsKHR' = mkVkCreateSharedSwapchainsKHR (pVkCreateSharedSwapchainsKHR (deviceCmds (device :: Device))) pPCreateInfos <- ContT $ allocaBytesAligned @(SwapchainCreateInfoKHR _) ((Data.Vector.length (createInfos)) * 104) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPCreateInfos `plusPtr` (104 * (i)) :: Ptr (SwapchainCreateInfoKHR _)) (e) . ($ ())) (createInfos)
src/Graphics/Vulkan/Extensions/VK_KHR_external_fence_fd.hs view
@@ -10,6 +10,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -19,10 +20,11 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Foreign.C.Types (CInt(..))+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.C.Types (CInt)-import Foreign.C.Types (CInt(..)) import Foreign.C.Types (CInt(CInt)) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -65,8 +67,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- created the fence being exported.+-- - @device@ is the logical device that created the fence being+-- exported. -- -- - @pGetFdInfo@ is a pointer to a 'FenceGetFdInfoKHR' structure -- containing parameters of the export operation.@@ -116,8 +118,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'FenceGetFdInfoKHR'-getFenceFdKHR :: Device -> FenceGetFdInfoKHR -> IO (("fd" ::: Int32))-getFenceFdKHR device getFdInfo = evalContT $ do+getFenceFdKHR :: forall io . MonadIO io => Device -> FenceGetFdInfoKHR -> io (("fd" ::: Int32))+getFenceFdKHR device getFdInfo = liftIO . evalContT $ do let vkGetFenceFdKHR' = mkVkGetFenceFdKHR (pVkGetFenceFdKHR (deviceCmds (device :: Device))) pGetFdInfo <- ContT $ withCStruct (getFdInfo) pPFd <- ContT $ bracket (callocBytes @CInt 4) free@@ -138,8 +140,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- created the fence.+-- - @device@ is the logical device that created the fence. -- -- - @pImportFenceFdInfo@ is a pointer to a 'ImportFenceFdInfoKHR' -- structure specifying the fence and import parameters.@@ -170,8 +171,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'ImportFenceFdInfoKHR'-importFenceFdKHR :: Device -> ImportFenceFdInfoKHR -> IO ()-importFenceFdKHR device importFenceFdInfo = evalContT $ do+importFenceFdKHR :: forall io . MonadIO io => Device -> ImportFenceFdInfoKHR -> io ()+importFenceFdKHR device importFenceFdInfo = liftIO . evalContT $ do let vkImportFenceFdKHR' = mkVkImportFenceFdKHR (pVkImportFenceFdKHR (deviceCmds (device :: Device))) pImportFenceFdInfo <- ContT $ withCStruct (importFenceFdInfo) r <- lift $ vkImportFenceFdKHR' (deviceHandle (device)) pImportFenceFdInfo@@ -229,11 +230,10 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Fence' handle+-- - @fence@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Fence'+-- handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core11.Enums.FenceImportFlagBits.FenceImportFlagBits' -- values --@@ -243,8 +243,7 @@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be--- externally synchronized+-- - Host access to @fence@ /must/ be externally synchronized -- -- = See Also --@@ -254,10 +253,9 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'importFenceFdKHR' data ImportFenceFdInfoKHR = ImportFenceFdInfoKHR- { -- | 'Graphics.Vulkan.Core10.Handles.Fence' is the fence into which the- -- payload will be imported.+ { -- | @fence@ is the fence into which the payload will be imported. fence :: Fence- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core11.Enums.FenceImportFlagBits.FenceImportFlagBits' -- specifying additional parameters for the fence payload import operation. flags :: FenceImportFlags@@ -327,17 +325,16 @@ -- -- - @handleType@ /must/ have been included in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_fence.ExportFenceCreateInfo'::@handleTypes@--- when 'Graphics.Vulkan.Core10.Handles.Fence'’s current payload was--- created.+-- when @fence@’s current payload was created. -- -- - If @handleType@ refers to a handle type with copy payload--- transference semantics, 'Graphics.Vulkan.Core10.Handles.Fence'--- /must/ be signaled, or have an associated+-- transference semantics, @fence@ /must/ be signaled, or have an+-- associated -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-fences-signaling fence signal operation> -- pending execution. ----- - 'Graphics.Vulkan.Core10.Handles.Fence' /must/ not currently have its--- payload replaced by an imported payload as described below in+-- - @fence@ /must/ not currently have its payload replaced by an+-- imported payload as described below in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-fences-importing Importing Fence Payloads> -- unless that imported payload’s handle type was included in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_fence_capabilities.ExternalFenceProperties'::@exportFromImportedHandleTypes@@@ -352,8 +349,8 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Fence' handle+-- - @fence@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Fence'+-- handle -- -- - @handleType@ /must/ be a valid -- 'Graphics.Vulkan.Core11.Enums.ExternalFenceHandleTypeFlagBits.ExternalFenceHandleTypeFlagBits'@@ -366,8 +363,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'getFenceFdKHR' data FenceGetFdInfoKHR = FenceGetFdInfoKHR- { -- | 'Graphics.Vulkan.Core10.Handles.Fence' is the fence from which state- -- will be exported.+ { -- | @fence@ is the fence from which state will be exported. fence :: Fence , -- | @handleType@ is the type of handle requested. handleType :: ExternalFenceHandleTypeFlagBits
src/Graphics/Vulkan/Extensions/VK_KHR_external_fence_win32.hs view
@@ -15,6 +15,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -24,6 +25,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -74,8 +76,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- created the fence being exported.+-- - @device@ is the logical device that created the fence being+-- exported. -- -- - @pGetWin32HandleInfo@ is a pointer to a 'FenceGetWin32HandleInfoKHR' -- structure containing parameters of the export operation.@@ -110,8 +112,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'FenceGetWin32HandleInfoKHR'-getFenceWin32HandleKHR :: Device -> FenceGetWin32HandleInfoKHR -> IO (HANDLE)-getFenceWin32HandleKHR device getWin32HandleInfo = evalContT $ do+getFenceWin32HandleKHR :: forall io . MonadIO io => Device -> FenceGetWin32HandleInfoKHR -> io (HANDLE)+getFenceWin32HandleKHR device getWin32HandleInfo = liftIO . evalContT $ do let vkGetFenceWin32HandleKHR' = mkVkGetFenceWin32HandleKHR (pVkGetFenceWin32HandleKHR (deviceCmds (device :: Device))) pGetWin32HandleInfo <- ContT $ withCStruct (getWin32HandleInfo) pPHandle <- ContT $ bracket (callocBytes @HANDLE 8) free@@ -132,8 +134,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- created the fence.+-- - @device@ is the logical device that created the fence. -- -- - @pImportFenceWin32HandleInfo@ is a pointer to a -- 'ImportFenceWin32HandleInfoKHR' structure specifying the fence and@@ -165,8 +166,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'ImportFenceWin32HandleInfoKHR'-importFenceWin32HandleKHR :: Device -> ImportFenceWin32HandleInfoKHR -> IO ()-importFenceWin32HandleKHR device importFenceWin32HandleInfo = evalContT $ do+importFenceWin32HandleKHR :: forall io . MonadIO io => Device -> ImportFenceWin32HandleInfoKHR -> io ()+importFenceWin32HandleKHR device importFenceWin32HandleInfo = liftIO . evalContT $ do let vkImportFenceWin32HandleKHR' = mkVkImportFenceWin32HandleKHR (pVkImportFenceWin32HandleKHR (deviceCmds (device :: Device))) pImportFenceWin32HandleInfo <- ContT $ withCStruct (importFenceWin32HandleInfo) r <- lift $ vkImportFenceWin32HandleKHR' (deviceHandle (device)) pImportFenceWin32HandleInfo@@ -223,11 +224,10 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Fence' handle+-- - @fence@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Fence'+-- handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core11.Enums.FenceImportFlagBits.FenceImportFlagBits' -- values --@@ -237,8 +237,7 @@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be--- externally synchronized+-- - Host access to @fence@ /must/ be externally synchronized -- -- = See Also --@@ -248,10 +247,9 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'importFenceWin32HandleKHR' data ImportFenceWin32HandleInfoKHR = ImportFenceWin32HandleInfoKHR- { -- | 'Graphics.Vulkan.Core10.Handles.Fence' is the fence into which the state- -- will be imported.+ { -- | @fence@ is the fence into which the state will be imported. fence :: Fence- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core11.Enums.FenceImportFlagBits.FenceImportFlagBits' -- specifying additional parameters for the fence payload import operation. flags :: FenceImportFlags@@ -423,23 +421,22 @@ -- -- - @handleType@ /must/ have been included in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_fence.ExportFenceCreateInfo'::@handleTypes@--- when the 'Graphics.Vulkan.Core10.Handles.Fence'’s current payload--- was created.+-- when the @fence@’s current payload was created. -- -- - If @handleType@ is defined as an NT handle, 'getFenceWin32HandleKHR' -- /must/ be called no more than once for each valid unique combination--- of 'Graphics.Vulkan.Core10.Handles.Fence' and @handleType@.+-- of @fence@ and @handleType@. ----- - 'Graphics.Vulkan.Core10.Handles.Fence' /must/ not currently have its--- payload replaced by an imported payload as described below in+-- - @fence@ /must/ not currently have its payload replaced by an+-- imported payload as described below in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-fences-importing Importing Fence Payloads> -- unless that imported payload’s handle type was included in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_fence_capabilities.ExternalFenceProperties'::@exportFromImportedHandleTypes@ -- for @handleType@. -- -- - If @handleType@ refers to a handle type with copy payload--- transference semantics, 'Graphics.Vulkan.Core10.Handles.Fence'--- /must/ be signaled, or have an associated+-- transference semantics, @fence@ /must/ be signaled, or have an+-- associated -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-fences-signaling fence signal operation> -- pending execution. --@@ -453,8 +450,8 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Fence' handle+-- - @fence@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Fence'+-- handle -- -- - @handleType@ /must/ be a valid -- 'Graphics.Vulkan.Core11.Enums.ExternalFenceHandleTypeFlagBits.ExternalFenceHandleTypeFlagBits'@@ -467,8 +464,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'getFenceWin32HandleKHR' data FenceGetWin32HandleInfoKHR = FenceGetWin32HandleInfoKHR- { -- | 'Graphics.Vulkan.Core10.Handles.Fence' is the fence from which state- -- will be exported.+ { -- | @fence@ is the fence from which state will be exported. fence :: Fence , -- | @handleType@ is the type of handle requested. handleType :: ExternalFenceHandleTypeFlagBits
src/Graphics/Vulkan/Extensions/VK_KHR_external_memory_fd.hs view
@@ -11,6 +11,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -20,10 +21,11 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Foreign.C.Types (CInt(..))+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.C.Types (CInt)-import Foreign.C.Types (CInt(..)) import Foreign.C.Types (CInt(CInt)) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -68,8 +70,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- created the device memory being exported.+-- - @device@ is the logical device that created the device memory being+-- exported. -- -- - @pGetFdInfo@ is a pointer to a 'MemoryGetFdInfoKHR' structure -- containing parameters of the export operation.@@ -102,8 +104,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'MemoryGetFdInfoKHR'-getMemoryFdKHR :: Device -> MemoryGetFdInfoKHR -> IO (("fd" ::: Int32))-getMemoryFdKHR device getFdInfo = evalContT $ do+getMemoryFdKHR :: forall io . MonadIO io => Device -> MemoryGetFdInfoKHR -> io (("fd" ::: Int32))+getMemoryFdKHR device getFdInfo = liftIO . evalContT $ do let vkGetMemoryFdKHR' = mkVkGetMemoryFdKHR (pVkGetMemoryFdKHR (deviceCmds (device :: Device))) pGetFdInfo <- ContT $ withCStruct (getFdInfo) pPFd <- ContT $ bracket (callocBytes @CInt 4) free@@ -125,8 +127,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- will be importing @fd@.+-- - @device@ is the logical device that will be importing @fd@. -- -- - @handleType@ is the type of the handle @fd@. --@@ -150,8 +151,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.ExternalMemoryHandleTypeFlagBits', -- 'MemoryFdPropertiesKHR'-getMemoryFdPropertiesKHR :: Device -> ExternalMemoryHandleTypeFlagBits -> ("fd" ::: Int32) -> IO (MemoryFdPropertiesKHR)-getMemoryFdPropertiesKHR device handleType fd = evalContT $ do+getMemoryFdPropertiesKHR :: forall io . MonadIO io => Device -> ExternalMemoryHandleTypeFlagBits -> ("fd" ::: Int32) -> io (MemoryFdPropertiesKHR)+getMemoryFdPropertiesKHR device handleType fd = liftIO . evalContT $ do let vkGetMemoryFdPropertiesKHR' = mkVkGetMemoryFdPropertiesKHR (pVkGetMemoryFdPropertiesKHR (deviceCmds (device :: Device))) pPMemoryFdProperties <- ContT (withZeroCStruct @MemoryFdPropertiesKHR) r <- lift $ vkGetMemoryFdPropertiesKHR' (deviceHandle (device)) (handleType) (CInt (fd)) (pPMemoryFdProperties)@@ -185,8 +186,7 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.ExternalBufferProperties'. -- -- - The memory from which @fd@ was exported /must/ have been created on--- the same underlying physical device as--- 'Graphics.Vulkan.Core10.Handles.Device'.+-- the same underlying physical device as @device@. -- -- - If @handleType@ is not @0@, it /must/ be defined as a POSIX file -- descriptor handle.@@ -195,9 +195,8 @@ -- type specified by @handleType@. -- -- - The memory represented by @fd@ /must/ have been created from a--- physical device and driver that is compatible with--- 'Graphics.Vulkan.Core10.Handles.Device' and @handleType@, as--- described in+-- physical device and driver that is compatible with @device@ and+-- @handleType@, as described in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#external-memory-handle-types-compatibility>. -- -- - @fd@ /must/ obey any requirements listed for @handleType@ in
src/Graphics/Vulkan/Extensions/VK_KHR_external_memory_win32.hs view
@@ -16,6 +16,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -25,6 +26,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -77,8 +79,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- created the device memory being exported.+-- - @device@ is the logical device that created the device memory being+-- exported. -- -- - @pGetWin32HandleInfo@ is a pointer to a -- 'MemoryGetWin32HandleInfoKHR' structure containing parameters of the@@ -109,8 +111,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'MemoryGetWin32HandleInfoKHR'-getMemoryWin32HandleKHR :: Device -> MemoryGetWin32HandleInfoKHR -> IO (HANDLE)-getMemoryWin32HandleKHR device getWin32HandleInfo = evalContT $ do+getMemoryWin32HandleKHR :: forall io . MonadIO io => Device -> MemoryGetWin32HandleInfoKHR -> io (HANDLE)+getMemoryWin32HandleKHR device getWin32HandleInfo = liftIO . evalContT $ do let vkGetMemoryWin32HandleKHR' = mkVkGetMemoryWin32HandleKHR (pVkGetMemoryWin32HandleKHR (deviceCmds (device :: Device))) pGetWin32HandleInfo <- ContT $ withCStruct (getWin32HandleInfo) pPHandle <- ContT $ bracket (callocBytes @HANDLE 8) free@@ -132,8 +134,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- will be importing @handle@.+-- - @device@ is the logical device that will be importing @handle@. -- -- - @handleType@ is the type of the handle @handle@. --@@ -156,8 +157,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.ExternalMemoryHandleTypeFlagBits', -- 'MemoryWin32HandlePropertiesKHR'-getMemoryWin32HandlePropertiesKHR :: Device -> ExternalMemoryHandleTypeFlagBits -> HANDLE -> IO (MemoryWin32HandlePropertiesKHR)-getMemoryWin32HandlePropertiesKHR device handleType handle = evalContT $ do+getMemoryWin32HandlePropertiesKHR :: forall io . MonadIO io => Device -> ExternalMemoryHandleTypeFlagBits -> HANDLE -> io (MemoryWin32HandlePropertiesKHR)+getMemoryWin32HandlePropertiesKHR device handleType handle = liftIO . evalContT $ do let vkGetMemoryWin32HandlePropertiesKHR' = mkVkGetMemoryWin32HandlePropertiesKHR (pVkGetMemoryWin32HandlePropertiesKHR (deviceCmds (device :: Device))) pPMemoryWin32HandleProperties <- ContT (withZeroCStruct @MemoryWin32HandlePropertiesKHR) r <- lift $ vkGetMemoryWin32HandlePropertiesKHR' (deviceHandle (device)) (handleType) (handle) (pPMemoryWin32HandleProperties)@@ -192,7 +193,7 @@ -- -- - The memory from which @handle@ was exported, or the memory named by -- @name@ /must/ have been created on the same underlying physical--- device as 'Graphics.Vulkan.Core10.Handles.Device'.+-- device as @device@. -- -- - If @handleType@ is not @0@, it /must/ be defined as an NT handle or -- a global share handle.
src/Graphics/Vulkan/Extensions/VK_KHR_external_semaphore_fd.hs view
@@ -10,6 +10,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -19,10 +20,11 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Foreign.C.Types (CInt(..))+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.C.Types (CInt)-import Foreign.C.Types (CInt(..)) import Foreign.C.Types (CInt(CInt)) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -65,8 +67,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- created the semaphore being exported.+-- - @device@ is the logical device that created the semaphore being+-- exported. -- -- - @pGetFdInfo@ is a pointer to a 'SemaphoreGetFdInfoKHR' structure -- containing parameters of the export operation.@@ -111,8 +113,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'SemaphoreGetFdInfoKHR'-getSemaphoreFdKHR :: Device -> SemaphoreGetFdInfoKHR -> IO (("fd" ::: Int32))-getSemaphoreFdKHR device getFdInfo = evalContT $ do+getSemaphoreFdKHR :: forall io . MonadIO io => Device -> SemaphoreGetFdInfoKHR -> io (("fd" ::: Int32))+getSemaphoreFdKHR device getFdInfo = liftIO . evalContT $ do let vkGetSemaphoreFdKHR' = mkVkGetSemaphoreFdKHR (pVkGetSemaphoreFdKHR (deviceCmds (device :: Device))) pGetFdInfo <- ContT $ withCStruct (getFdInfo) pPFd <- ContT $ bracket (callocBytes @CInt 4) free@@ -133,8 +135,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- created the semaphore.+-- - @device@ is the logical device that created the semaphore. -- -- - @pImportSemaphoreFdInfo@ is a pointer to a -- 'ImportSemaphoreFdInfoKHR' structure specifying the semaphore and@@ -166,8 +167,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'ImportSemaphoreFdInfoKHR'-importSemaphoreFdKHR :: Device -> ImportSemaphoreFdInfoKHR -> IO ()-importSemaphoreFdKHR device importSemaphoreFdInfo = evalContT $ do+importSemaphoreFdKHR :: forall io . MonadIO io => Device -> ImportSemaphoreFdInfoKHR -> io ()+importSemaphoreFdKHR device importSemaphoreFdInfo = liftIO . evalContT $ do let vkImportSemaphoreFdKHR' = mkVkImportSemaphoreFdKHR (pVkImportSemaphoreFdKHR (deviceCmds (device :: Device))) pImportSemaphoreFdInfo <- ContT $ withCStruct (importSemaphoreFdInfo) r <- lift $ vkImportSemaphoreFdKHR' (deviceHandle (device)) pImportSemaphoreFdInfo@@ -203,21 +204,21 @@ -- - If @handleType@ is -- 'Graphics.Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT', -- the--- 'Graphics.Vulkan.Core10.QueueSemaphore.SemaphoreCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'+-- 'Graphics.Vulkan.Core10.QueueSemaphore.SemaphoreCreateInfo'::@flags@ -- field /must/ match that of the semaphore from which @fd@ was -- exported. -- -- - If @handleType@ is -- 'Graphics.Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT', -- the--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo'::'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType'+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo'::@semaphoreType@ -- field /must/ match that of the semaphore from which @fd@ was -- exported. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core11.Enums.SemaphoreImportFlagBits.SEMAPHORE_IMPORT_TEMPORARY_BIT', -- the--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo'::'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType'+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo'::@semaphoreType@ -- field of the semaphore from which @fd@ was exported /must/ not be -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SEMAPHORE_TYPE_TIMELINE'. --@@ -228,11 +229,10 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ be a valid+-- - @semaphore@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Semaphore' handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core11.Enums.SemaphoreImportFlagBits.SemaphoreImportFlagBits' -- values --@@ -242,8 +242,7 @@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ be--- externally synchronized+-- - Host access to @semaphore@ /must/ be externally synchronized -- -- = See Also --@@ -253,10 +252,9 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'importSemaphoreFdKHR' data ImportSemaphoreFdInfoKHR = ImportSemaphoreFdInfoKHR- { -- | 'Graphics.Vulkan.Core10.Handles.Semaphore' is the semaphore into which- -- the payload will be imported.+ { -- | @semaphore@ is the semaphore into which the payload will be imported. semaphore :: Semaphore- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core11.Enums.SemaphoreImportFlagBits.SemaphoreImportFlagBits' -- specifying additional parameters for the semaphore payload import -- operation.@@ -327,11 +325,10 @@ -- -- - @handleType@ /must/ have been included in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_semaphore.ExportSemaphoreCreateInfo'::@handleTypes@--- when 'Graphics.Vulkan.Core10.Handles.Semaphore'’s current payload--- was created.+-- when @semaphore@’s current payload was created. ----- - 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ not currently have--- its payload replaced by an imported payload as described below in+-- - @semaphore@ /must/ not currently have its payload replaced by an+-- imported payload as described below in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-semaphores-importing Importing Semaphore Payloads> -- unless that imported payload’s handle type was included in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_semaphore_capabilities.ExternalSemaphoreProperties'::@exportFromImportedHandleTypes@@@ -340,28 +337,26 @@ -- - If @handleType@ refers to a handle type with copy payload -- transference semantics, as defined below in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-semaphores-importing Importing Semaphore Payloads>,--- there /must/ be no queue waiting on--- 'Graphics.Vulkan.Core10.Handles.Semaphore'.+-- there /must/ be no queue waiting on @semaphore@. -- -- - If @handleType@ refers to a handle type with copy payload--- transference semantics, 'Graphics.Vulkan.Core10.Handles.Semaphore'--- /must/ be signaled, or have an associated+-- transference semantics, @semaphore@ /must/ be signaled, or have an+-- associated -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-semaphores-signaling semaphore signal operation> -- pending execution. -- -- - @handleType@ /must/ be defined as a POSIX file descriptor handle. -- -- - If @handleType@ refers to a handle type with copy payload--- transference semantics, 'Graphics.Vulkan.Core10.Handles.Semaphore'--- /must/ have been created with a+-- transference semantics, @semaphore@ /must/ have been created with a -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType' of -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SEMAPHORE_TYPE_BINARY'. -- -- - If @handleType@ refers to a handle type with copy payload--- transference semantics, 'Graphics.Vulkan.Core10.Handles.Semaphore'--- /must/ have an associated semaphore signal operation that has been--- submitted for execution and any semaphore signal operations on which--- it depends (if any) /must/ have also been submitted for execution.+-- transference semantics, @semaphore@ /must/ have an associated+-- semaphore signal operation that has been submitted for execution and+-- any semaphore signal operations on which it depends (if any) /must/+-- have also been submitted for execution. -- -- == Valid Usage (Implicit) --@@ -370,7 +365,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ be a valid+-- - @semaphore@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Semaphore' handle -- -- - @handleType@ /must/ be a valid@@ -384,8 +379,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'getSemaphoreFdKHR' data SemaphoreGetFdInfoKHR = SemaphoreGetFdInfoKHR- { -- | 'Graphics.Vulkan.Core10.Handles.Semaphore' is the semaphore from which- -- state will be exported.+ { -- | @semaphore@ is the semaphore from which state will be exported. semaphore :: Semaphore , -- | @handleType@ is the type of handle requested. handleType :: ExternalSemaphoreHandleTypeFlagBits
src/Graphics/Vulkan/Extensions/VK_KHR_external_semaphore_win32.hs view
@@ -16,6 +16,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -29,6 +30,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Either (Either) import Data.String (IsString) import Data.Typeable (Typeable)@@ -85,8 +87,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- created the semaphore being exported.+-- - @device@ is the logical device that created the semaphore being+-- exported. -- -- - @pGetWin32HandleInfo@ is a pointer to a -- 'SemaphoreGetWin32HandleInfoKHR' structure containing parameters of@@ -123,8 +125,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'SemaphoreGetWin32HandleInfoKHR'-getSemaphoreWin32HandleKHR :: Device -> SemaphoreGetWin32HandleInfoKHR -> IO (HANDLE)-getSemaphoreWin32HandleKHR device getWin32HandleInfo = evalContT $ do+getSemaphoreWin32HandleKHR :: forall io . MonadIO io => Device -> SemaphoreGetWin32HandleInfoKHR -> io (HANDLE)+getSemaphoreWin32HandleKHR device getWin32HandleInfo = liftIO . evalContT $ do let vkGetSemaphoreWin32HandleKHR' = mkVkGetSemaphoreWin32HandleKHR (pVkGetSemaphoreWin32HandleKHR (deviceCmds (device :: Device))) pGetWin32HandleInfo <- ContT $ withCStruct (getWin32HandleInfo) pPHandle <- ContT $ bracket (callocBytes @HANDLE 8) free@@ -146,8 +148,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- created the semaphore.+-- - @device@ is the logical device that created the semaphore. -- -- - @pImportSemaphoreWin32HandleInfo@ is a pointer to a -- 'ImportSemaphoreWin32HandleInfoKHR' structure specifying the@@ -180,8 +181,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'ImportSemaphoreWin32HandleInfoKHR'-importSemaphoreWin32HandleKHR :: Device -> ImportSemaphoreWin32HandleInfoKHR -> IO ()-importSemaphoreWin32HandleKHR device importSemaphoreWin32HandleInfo = evalContT $ do+importSemaphoreWin32HandleKHR :: forall io . MonadIO io => Device -> ImportSemaphoreWin32HandleInfoKHR -> io ()+importSemaphoreWin32HandleKHR device importSemaphoreWin32HandleInfo = liftIO . evalContT $ do let vkImportSemaphoreWin32HandleKHR' = mkVkImportSemaphoreWin32HandleKHR (pVkImportSemaphoreWin32HandleKHR (deviceCmds (device :: Device))) pImportSemaphoreWin32HandleInfo <- ContT $ withCStruct (importSemaphoreWin32HandleInfo) r <- lift $ vkImportSemaphoreWin32HandleKHR' (deviceHandle (device)) pImportSemaphoreWin32HandleInfo@@ -241,7 +242,7 @@ -- or -- 'Graphics.Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT', -- the--- 'Graphics.Vulkan.Core10.QueueSemaphore.SemaphoreCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'+-- 'Graphics.Vulkan.Core10.QueueSemaphore.SemaphoreCreateInfo'::@flags@ -- field /must/ match that of the semaphore from which @handle@ or -- @name@ was exported. --@@ -250,14 +251,14 @@ -- or -- 'Graphics.Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT', -- the--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo'::'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType'+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo'::@semaphoreType@ -- field /must/ match that of the semaphore from which @handle@ or -- @name@ was exported. ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains+-- - If @flags@ contains -- 'Graphics.Vulkan.Core11.Enums.SemaphoreImportFlagBits.SEMAPHORE_IMPORT_TEMPORARY_BIT', -- the--- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo'::'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType'+-- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo'::@semaphoreType@ -- field of the semaphore from which @handle@ or @name@ was exported -- /must/ not be -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SEMAPHORE_TYPE_TIMELINE'.@@ -269,11 +270,10 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ be a valid+-- - @semaphore@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Semaphore' handle ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core11.Enums.SemaphoreImportFlagBits.SemaphoreImportFlagBits' -- values --@@ -283,8 +283,7 @@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ be--- externally synchronized+-- - Host access to @semaphore@ /must/ be externally synchronized -- -- = See Also --@@ -294,10 +293,9 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'importSemaphoreWin32HandleKHR' data ImportSemaphoreWin32HandleInfoKHR = ImportSemaphoreWin32HandleInfoKHR- { -- | 'Graphics.Vulkan.Core10.Handles.Semaphore' is the semaphore into which- -- the payload will be imported.+ { -- | @semaphore@ is the semaphore into which the payload will be imported. semaphore :: Semaphore- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core11.Enums.SemaphoreImportFlagBits.SemaphoreImportFlagBits' -- specifying additional parameters for the semaphore payload import -- operation.@@ -604,16 +602,14 @@ -- -- - @handleType@ /must/ have been included in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_semaphore.ExportSemaphoreCreateInfo'::@handleTypes@--- when the 'Graphics.Vulkan.Core10.Handles.Semaphore'’s current--- payload was created.+-- when the @semaphore@’s current payload was created. -- -- - If @handleType@ is defined as an NT handle, -- 'getSemaphoreWin32HandleKHR' /must/ be called no more than once for--- each valid unique combination of--- 'Graphics.Vulkan.Core10.Handles.Semaphore' and @handleType@.+-- each valid unique combination of @semaphore@ and @handleType@. ----- - 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ not currently have--- its payload replaced by an imported payload as described below in+-- - @semaphore@ /must/ not currently have its payload replaced by an+-- imported payload as described below in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-semaphores-importing Importing Semaphore Payloads> -- unless that imported payload’s handle type was included in -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_external_semaphore_capabilities.ExternalSemaphoreProperties'::@exportFromImportedHandleTypes@@@ -622,12 +618,11 @@ -- - If @handleType@ refers to a handle type with copy payload -- transference semantics, as defined below in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-semaphores-importing Importing Semaphore Payloads>,--- there /must/ be no queue waiting on--- 'Graphics.Vulkan.Core10.Handles.Semaphore'.+-- there /must/ be no queue waiting on @semaphore@. -- -- - If @handleType@ refers to a handle type with copy payload--- transference semantics, 'Graphics.Vulkan.Core10.Handles.Semaphore'--- /must/ be signaled, or have an associated+-- transference semantics, @semaphore@ /must/ be signaled, or have an+-- associated -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-semaphores-signaling semaphore signal operation> -- pending execution. --@@ -641,7 +636,7 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ be a valid+-- - @semaphore@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Semaphore' handle -- -- - @handleType@ /must/ be a valid@@ -655,8 +650,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'getSemaphoreWin32HandleKHR' data SemaphoreGetWin32HandleInfoKHR = SemaphoreGetWin32HandleInfoKHR- { -- | 'Graphics.Vulkan.Core10.Handles.Semaphore' is the semaphore from which- -- state will be exported.+ { -- | @semaphore@ is the semaphore from which state will be exported. semaphore :: Semaphore , -- | @handleType@ is the type of handle requested. handleType :: ExternalSemaphoreHandleTypeFlagBits
src/Graphics/Vulkan/Extensions/VK_KHR_get_display_properties2.hs view
@@ -26,6 +26,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -36,6 +37,7 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Data.Vector (generateM)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -102,8 +104,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is a physical--- device.+-- - @physicalDevice@ is a physical device. -- -- - @pPropertyCount@ is a pointer to an integer related to the number of -- display devices available or queried, as described below.@@ -120,7 +121,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pPropertyCount@ /must/ be a valid pointer to a @uint32_t@ value@@ -146,8 +147,8 @@ -- = See Also -- -- 'DisplayProperties2KHR', 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceDisplayProperties2KHR :: PhysicalDevice -> IO (Result, ("properties" ::: Vector DisplayProperties2KHR))-getPhysicalDeviceDisplayProperties2KHR physicalDevice = evalContT $ do+getPhysicalDeviceDisplayProperties2KHR :: forall io . MonadIO io => PhysicalDevice -> io (Result, ("properties" ::: Vector DisplayProperties2KHR))+getPhysicalDeviceDisplayProperties2KHR physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceDisplayProperties2KHR' = mkVkGetPhysicalDeviceDisplayProperties2KHR (pVkGetPhysicalDeviceDisplayProperties2KHR (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPPropertyCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -175,8 +176,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is a physical--- device.+-- - @physicalDevice@ is a physical device. -- -- - @pPropertyCount@ is a pointer to an integer related to the number of -- display planes available or queried, as described below.@@ -193,7 +193,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pPropertyCount@ /must/ be a valid pointer to a @uint32_t@ value@@ -221,8 +221,8 @@ -- -- 'DisplayPlaneProperties2KHR', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceDisplayPlaneProperties2KHR :: PhysicalDevice -> IO (Result, ("properties" ::: Vector DisplayPlaneProperties2KHR))-getPhysicalDeviceDisplayPlaneProperties2KHR physicalDevice = evalContT $ do+getPhysicalDeviceDisplayPlaneProperties2KHR :: forall io . MonadIO io => PhysicalDevice -> io (Result, ("properties" ::: Vector DisplayPlaneProperties2KHR))+getPhysicalDeviceDisplayPlaneProperties2KHR physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceDisplayPlaneProperties2KHR' = mkVkGetPhysicalDeviceDisplayPlaneProperties2KHR (pVkGetPhysicalDeviceDisplayPlaneProperties2KHR (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPPropertyCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -250,12 +250,9 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device associated with--- 'Graphics.Vulkan.Extensions.WSITypes.Display'.+-- - @physicalDevice@ is the physical device associated with @display@. ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' is the display to--- query.+-- - @display@ is the display to query. -- -- - @pPropertyCount@ is a pointer to an integer related to the number of -- display modes available or queried, as described below.@@ -272,10 +269,10 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' /must/ be a valid+-- - @display@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.DisplayKHR' handle -- -- - @pPropertyCount@ /must/ be a valid pointer to a @uint32_t@ value@@ -285,9 +282,8 @@ -- to an array of @pPropertyCount@ 'DisplayModeProperties2KHR' -- structures ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' /must/ have been--- created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'+-- - @display@ /must/ have been created, allocated, or retrieved from+-- @physicalDevice@ -- -- == Return Codes --@@ -308,8 +304,8 @@ -- 'Graphics.Vulkan.Extensions.Handles.DisplayKHR', -- 'DisplayModeProperties2KHR', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getDisplayModeProperties2KHR :: PhysicalDevice -> DisplayKHR -> IO (Result, ("properties" ::: Vector DisplayModeProperties2KHR))-getDisplayModeProperties2KHR physicalDevice display = evalContT $ do+getDisplayModeProperties2KHR :: forall io . MonadIO io => PhysicalDevice -> DisplayKHR -> io (Result, ("properties" ::: Vector DisplayModeProperties2KHR))+getDisplayModeProperties2KHR physicalDevice display = liftIO . evalContT $ do let vkGetDisplayModeProperties2KHR' = mkVkGetDisplayModeProperties2KHR (pVkGetDisplayModeProperties2KHR (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPPropertyCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -337,8 +333,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device associated with @pDisplayPlaneInfo@.+-- - @physicalDevice@ is the physical device associated with+-- @pDisplayPlaneInfo@. -- -- - @pDisplayPlaneInfo@ is a pointer to a 'DisplayPlaneInfo2KHR' -- structure describing the plane and mode.@@ -370,8 +366,8 @@ -- -- 'DisplayPlaneCapabilities2KHR', 'DisplayPlaneInfo2KHR', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getDisplayPlaneCapabilities2KHR :: PhysicalDevice -> DisplayPlaneInfo2KHR -> IO (DisplayPlaneCapabilities2KHR)-getDisplayPlaneCapabilities2KHR physicalDevice displayPlaneInfo = evalContT $ do+getDisplayPlaneCapabilities2KHR :: forall io . MonadIO io => PhysicalDevice -> DisplayPlaneInfo2KHR -> io (DisplayPlaneCapabilities2KHR)+getDisplayPlaneCapabilities2KHR physicalDevice displayPlaneInfo = liftIO . evalContT $ do let vkGetDisplayPlaneCapabilities2KHR' = mkVkGetDisplayPlaneCapabilities2KHR (pVkGetDisplayPlaneCapabilities2KHR (instanceCmds (physicalDevice :: PhysicalDevice))) pDisplayPlaneInfo <- ContT $ withCStruct (displayPlaneInfo) pPCapabilities <- ContT (withZeroCStruct @DisplayPlaneCapabilities2KHR)
src/Graphics/Vulkan/Extensions/VK_KHR_get_surface_capabilities2.hs view
@@ -19,6 +19,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -31,6 +32,7 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Data.Vector (generateM)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable)@@ -98,9 +100,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device that will be associated with the swapchain to be created, as--- described for+-- - @physicalDevice@ is the physical device that will be associated with+-- the swapchain to be created, as described for -- 'Graphics.Vulkan.Extensions.VK_KHR_swapchain.createSwapchainKHR'. -- -- - @pSurfaceInfo@ is a pointer to a 'PhysicalDeviceSurfaceInfo2KHR'@@ -130,7 +131,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pSurfaceInfo@ /must/ be a valid pointer to a valid@@ -157,8 +158,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceSurfaceInfo2KHR', 'SurfaceCapabilities2KHR'-getPhysicalDeviceSurfaceCapabilities2KHR :: (PokeChain a, PokeChain b, PeekChain b) => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> IO (SurfaceCapabilities2KHR b)-getPhysicalDeviceSurfaceCapabilities2KHR physicalDevice surfaceInfo = evalContT $ do+getPhysicalDeviceSurfaceCapabilities2KHR :: forall a b io . (PokeChain a, PokeChain b, PeekChain b, MonadIO io) => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> io (SurfaceCapabilities2KHR b)+getPhysicalDeviceSurfaceCapabilities2KHR physicalDevice surfaceInfo = liftIO . evalContT $ do let vkGetPhysicalDeviceSurfaceCapabilities2KHR' = mkVkGetPhysicalDeviceSurfaceCapabilities2KHR (pVkGetPhysicalDeviceSurfaceCapabilities2KHR (instanceCmds (physicalDevice :: PhysicalDevice))) pSurfaceInfo <- ContT $ withCStruct (surfaceInfo) pPSurfaceCapabilities <- ContT (withZeroCStruct @(SurfaceCapabilities2KHR _))@@ -180,9 +181,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device that will be associated with the swapchain to be created, as--- described for+-- - @physicalDevice@ is the physical device that will be associated with+-- the swapchain to be created, as described for -- 'Graphics.Vulkan.Extensions.VK_KHR_swapchain.createSwapchainKHR'. -- -- - @pSurfaceInfo@ is a pointer to a 'PhysicalDeviceSurfaceInfo2KHR'@@ -218,14 +218,14 @@ -- -- == Valid Usage ----- - @pSurfaceInfo->surface@ must be supported by--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', as reported by+-- - @pSurfaceInfo->surface@ must be supported by @physicalDevice@, as+-- reported by -- 'Graphics.Vulkan.Extensions.VK_KHR_surface.getPhysicalDeviceSurfaceSupportKHR' -- or an equivalent platform-specific mechanism. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pSurfaceInfo@ /must/ be a valid pointer to a valid@@ -259,8 +259,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'PhysicalDeviceSurfaceInfo2KHR', 'SurfaceFormat2KHR'-getPhysicalDeviceSurfaceFormats2KHR :: PokeChain a => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> IO (Result, ("surfaceFormats" ::: Vector SurfaceFormat2KHR))-getPhysicalDeviceSurfaceFormats2KHR physicalDevice surfaceInfo = evalContT $ do+getPhysicalDeviceSurfaceFormats2KHR :: forall a io . (PokeChain a, MonadIO io) => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> io (Result, ("surfaceFormats" ::: Vector SurfaceFormat2KHR))+getPhysicalDeviceSurfaceFormats2KHR physicalDevice surfaceInfo = liftIO . evalContT $ do let vkGetPhysicalDeviceSurfaceFormats2KHR' = mkVkGetPhysicalDeviceSurfaceFormats2KHR (pVkGetPhysicalDeviceSurfaceFormats2KHR (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pSurfaceInfo <- ContT $ withCStruct (surfaceInfo)
src/Graphics/Vulkan/Extensions/VK_KHR_performance_query.hs view
@@ -51,6 +51,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -76,6 +77,7 @@ 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)@@ -155,9 +157,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the handle to the--- physical device whose queue family performance query counter--- properties will be queried.+-- - @physicalDevice@ is the handle to the physical device whose queue+-- family performance query counter properties will be queried. -- -- - @queueFamilyIndex@ is the index into the queue family of the -- physical device we want to get properties for.@@ -185,7 +186,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pCounterCount@ /must/ be a valid pointer to a @uint32_t@ value@@ -219,8 +220,8 @@ -- -- 'PerformanceCounterDescriptionKHR', 'PerformanceCounterKHR', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR :: PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> IO (Result, ("counters" ::: Vector PerformanceCounterKHR), ("counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))-enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR physicalDevice queueFamilyIndex = evalContT $ do+enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR :: forall io . MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> io (Result, ("counters" ::: Vector PerformanceCounterKHR), ("counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))+enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR physicalDevice queueFamilyIndex = liftIO . evalContT $ do let vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR' = mkVkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR (pVkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPCounterCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -252,9 +253,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the handle to the--- physical device whose queue family performance query counter--- properties will be queried.+-- - @physicalDevice@ is the handle to the physical device whose queue+-- family performance query counter properties will be queried. -- -- - @pPerformanceQueryCreateInfo@ is a pointer to a -- 'QueryPoolPerformanceCreateInfoKHR' of the performance query that is@@ -268,10 +268,9 @@ -- -- The @pPerformanceQueryCreateInfo@ member -- 'QueryPoolPerformanceCreateInfoKHR'::@queueFamilyIndex@ /must/ be a--- queue family of 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'. The--- number of passes required to capture the counters specified in the--- @pPerformanceQueryCreateInfo@ member--- 'QueryPoolPerformanceCreateInfoKHR'::@pCounters@ is returned in+-- queue family of @physicalDevice@. The number of passes required to+-- capture the counters specified in the @pPerformanceQueryCreateInfo@+-- member 'QueryPoolPerformanceCreateInfoKHR'::@pCounters@ is returned in -- @pNumPasses@. -- -- == Valid Usage (Implicit)@@ -280,8 +279,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'QueryPoolPerformanceCreateInfoKHR'-getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR :: PhysicalDevice -> ("performanceQueryCreateInfo" ::: QueryPoolPerformanceCreateInfoKHR) -> IO (("numPasses" ::: Word32))-getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR physicalDevice performanceQueryCreateInfo = evalContT $ do+getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR :: forall io . MonadIO io => PhysicalDevice -> ("performanceQueryCreateInfo" ::: QueryPoolPerformanceCreateInfoKHR) -> io (("numPasses" ::: Word32))+getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR physicalDevice performanceQueryCreateInfo = liftIO . evalContT $ do let vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR' = mkVkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR (pVkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR (instanceCmds (physicalDevice :: PhysicalDevice))) pPerformanceQueryCreateInfo <- ContT $ withCStruct (performanceQueryCreateInfo) pPNumPasses <- ContT $ bracket (callocBytes @Word32 4) free@@ -301,8 +300,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device to--- profile.+-- - @device@ is the logical device to profile. -- -- - @pInfo@ is a pointer to a 'AcquireProfilingLockInfoKHR' structure -- which contains information about how the profiling is to be@@ -326,8 +324,8 @@ -- = See Also -- -- 'AcquireProfilingLockInfoKHR', 'Graphics.Vulkan.Core10.Handles.Device'-acquireProfilingLockKHR :: Device -> AcquireProfilingLockInfoKHR -> IO ()-acquireProfilingLockKHR device info = evalContT $ do+acquireProfilingLockKHR :: forall io . MonadIO io => Device -> AcquireProfilingLockInfoKHR -> io ()+acquireProfilingLockKHR device info = liftIO . evalContT $ do let vkAcquireProfilingLockKHR' = mkVkAcquireProfilingLockKHR (pVkAcquireProfilingLockKHR (deviceCmds (device :: Device))) pInfo <- ContT $ withCStruct (info) r <- lift $ vkAcquireProfilingLockKHR' (deviceHandle (device)) pInfo@@ -345,25 +343,23 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device to--- cease profiling on.+-- - @device@ is the logical device to cease profiling on. -- -- == Valid Usage ----- - The profiling lock of 'Graphics.Vulkan.Core10.Handles.Device' /must/--- have been held via a previous successful call to--- 'acquireProfilingLockKHR'+-- - The profiling lock of @device@ /must/ have been held via a previous+-- successful call to 'acquireProfilingLockKHR' -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device'-releaseProfilingLockKHR :: Device -> IO ()-releaseProfilingLockKHR device = do+releaseProfilingLockKHR :: forall io . MonadIO io => Device -> io ()+releaseProfilingLockKHR device = liftIO $ do let vkReleaseProfilingLockKHR' = mkVkReleaseProfilingLockKHR (pVkReleaseProfilingLockKHR (deviceCmds (device :: Device))) vkReleaseProfilingLockKHR' (deviceHandle (device)) pure $ ()@@ -586,9 +582,8 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR' data PerformanceCounterDescriptionKHR = PerformanceCounterDescriptionKHR- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of- -- 'PerformanceCounterDescriptionFlagBitsKHR' indicating the usage behavior- -- for the counter.+ { -- | @flags@ is a bitmask of 'PerformanceCounterDescriptionFlagBitsKHR'+ -- indicating the usage behavior for the counter. flags :: PerformanceCounterDescriptionFlagsKHR , -- | @name@ is an array of size -- 'Graphics.Vulkan.Core10.APIConstants.MAX_DESCRIPTION_SIZE', containing a@@ -744,7 +739,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'acquireProfilingLockKHR' data AcquireProfilingLockInfoKHR = AcquireProfilingLockInfoKHR- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: AcquireProfilingLockFlagsKHR , -- | @timeout@ indicates how long the function waits, in nanoseconds, if the -- profiling lock is not available.
src/Graphics/Vulkan/Extensions/VK_KHR_pipeline_executable_properties.hs view
@@ -23,6 +23,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -45,6 +46,7 @@ import Control.Monad.Trans.Cont (evalContT) import Control.Monad.Trans.Cont (runContT) import Data.Vector (generateM)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.C.Types (CChar)@@ -114,8 +116,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device that created--- the pipeline.+-- - @device@ is the device that created the pipeline. -- -- - @pPipelineInfo@ describes the pipeline being queried. --@@ -142,14 +143,13 @@ -- - <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-pipelineExecutableInfo pipelineExecutableInfo> -- /must/ be enabled. ----- - 'Graphics.Vulkan.Core10.Handles.Pipeline' member of @pPipelineInfo@--- /must/ have been created with--- 'Graphics.Vulkan.Core10.Handles.Device'.+-- - @pipeline@ member of @pPipelineInfo@ /must/ have been created with+-- @device@. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pPipelineInfo@ /must/ be a valid pointer to a valid -- 'PipelineInfoKHR' structure@@ -179,8 +179,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'PipelineExecutablePropertiesKHR', 'PipelineInfoKHR'-getPipelineExecutablePropertiesKHR :: Device -> PipelineInfoKHR -> IO (Result, ("properties" ::: Vector PipelineExecutablePropertiesKHR))-getPipelineExecutablePropertiesKHR device pipelineInfo = evalContT $ do+getPipelineExecutablePropertiesKHR :: forall io . MonadIO io => Device -> PipelineInfoKHR -> io (Result, ("properties" ::: Vector PipelineExecutablePropertiesKHR))+getPipelineExecutablePropertiesKHR device pipelineInfo = liftIO . evalContT $ do let vkGetPipelineExecutablePropertiesKHR' = mkVkGetPipelineExecutablePropertiesKHR (pVkGetPipelineExecutablePropertiesKHR (deviceCmds (device :: Device))) let device' = deviceHandle (device) pPipelineInfo <- ContT $ withCStruct (pipelineInfo)@@ -209,8 +209,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device that created--- the pipeline.+-- - @device@ is the device that created the pipeline. -- -- - @pExecutableInfo@ describes the pipeline executable being queried. --@@ -238,21 +237,19 @@ -- - <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-pipelineExecutableInfo pipelineExecutableInfo> -- /must/ be enabled. ----- - 'Graphics.Vulkan.Core10.Handles.Pipeline' member of--- @pExecutableInfo@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Handles.Device'.+-- - @pipeline@ member of @pExecutableInfo@ /must/ have been created with+-- @device@. ----- - 'Graphics.Vulkan.Core10.Handles.Pipeline' member of--- @pExecutableInfo@ /must/ have been created with+-- - @pipeline@ member of @pExecutableInfo@ /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR'--- set in the 'Graphics.Vulkan.Core10.BaseType.Flags' field of+-- set in the @flags@ field of -- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' or -- 'Graphics.Vulkan.Core10.Pipeline.ComputePipelineCreateInfo'. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pExecutableInfo@ /must/ be a valid pointer to a valid -- 'PipelineExecutableInfoKHR' structure@@ -282,8 +279,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'PipelineExecutableInfoKHR', -- 'PipelineExecutableStatisticKHR'-getPipelineExecutableStatisticsKHR :: Device -> PipelineExecutableInfoKHR -> IO (Result, ("statistics" ::: Vector PipelineExecutableStatisticKHR))-getPipelineExecutableStatisticsKHR device executableInfo = evalContT $ do+getPipelineExecutableStatisticsKHR :: forall io . MonadIO io => Device -> PipelineExecutableInfoKHR -> io (Result, ("statistics" ::: Vector PipelineExecutableStatisticKHR))+getPipelineExecutableStatisticsKHR device executableInfo = liftIO . evalContT $ do let vkGetPipelineExecutableStatisticsKHR' = mkVkGetPipelineExecutableStatisticsKHR (pVkGetPipelineExecutableStatisticsKHR (deviceCmds (device :: Device))) let device' = deviceHandle (device) pExecutableInfo <- ContT $ withCStruct (executableInfo)@@ -312,8 +309,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device that created--- the pipeline.+-- - @device@ is the device that created the pipeline. -- -- - @pExecutableInfo@ describes the pipeline executable being queried. --@@ -349,21 +345,19 @@ -- - <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-pipelineExecutableInfo pipelineExecutableInfo> -- /must/ be enabled. ----- - 'Graphics.Vulkan.Core10.Handles.Pipeline' member of--- @pExecutableInfo@ /must/ have been created with--- 'Graphics.Vulkan.Core10.Handles.Device'.+-- - @pipeline@ member of @pExecutableInfo@ /must/ have been created with+-- @device@. ----- - 'Graphics.Vulkan.Core10.Handles.Pipeline' member of--- @pExecutableInfo@ /must/ have been created with+-- - @pipeline@ member of @pExecutableInfo@ /must/ have been created with -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR'--- set in the 'Graphics.Vulkan.Core10.BaseType.Flags' field of+-- set in the @flags@ field of -- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' or -- 'Graphics.Vulkan.Core10.Pipeline.ComputePipelineCreateInfo'. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pExecutableInfo@ /must/ be a valid pointer to a valid -- 'PipelineExecutableInfoKHR' structure@@ -395,8 +389,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'PipelineExecutableInfoKHR', -- 'PipelineExecutableInternalRepresentationKHR'-getPipelineExecutableInternalRepresentationsKHR :: Device -> PipelineExecutableInfoKHR -> IO (Result, ("internalRepresentations" ::: Vector PipelineExecutableInternalRepresentationKHR))-getPipelineExecutableInternalRepresentationsKHR device executableInfo = evalContT $ do+getPipelineExecutableInternalRepresentationsKHR :: forall io . MonadIO io => Device -> PipelineExecutableInfoKHR -> io (Result, ("internalRepresentations" ::: Vector PipelineExecutableInternalRepresentationKHR))+getPipelineExecutableInternalRepresentationsKHR device executableInfo = liftIO . evalContT $ do let vkGetPipelineExecutableInternalRepresentationsKHR' = mkVkGetPipelineExecutableInternalRepresentationsKHR (pVkGetPipelineExecutableInternalRepresentationsKHR (deviceCmds (device :: Device))) let device' = deviceHandle (device) pExecutableInfo <- ContT $ withCStruct (executableInfo)@@ -488,8 +482,8 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'getPipelineExecutablePropertiesKHR' data PipelineInfoKHR = PipelineInfoKHR- { -- | 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ be a valid- -- 'Graphics.Vulkan.Core10.Handles.Pipeline' handle+ { -- | @pipeline@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Pipeline'+ -- handle pipeline :: Pipeline } deriving (Typeable) deriving instance Show PipelineInfoKHR@@ -629,13 +623,12 @@ -- 'getPipelineExecutableInternalRepresentationsKHR', -- 'getPipelineExecutableStatisticsKHR' data PipelineExecutableInfoKHR = PipelineExecutableInfoKHR- { -- | 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ be a valid- -- 'Graphics.Vulkan.Core10.Handles.Pipeline' handle+ { -- | @pipeline@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Pipeline'+ -- handle pipeline :: Pipeline , -- | @executableIndex@ /must/ be less than the number of executables- -- associated with 'Graphics.Vulkan.Core10.Handles.Pipeline' as returned in- -- the @pExecutableCount@ parameter of- -- 'getPipelineExecutablePropertiesKHR'.+ -- associated with @pipeline@ as returned in the @pExecutableCount@+ -- parameter of 'getPipelineExecutablePropertiesKHR'. executableIndex :: Word32 } deriving (Typeable)@@ -699,9 +692,8 @@ -- containing a null-terminated UTF-8 string which is a human readable -- description for this statistic. description :: ByteString- , -- | 'Graphics.Vulkan.Core10.Enums.Format.Format' is a- -- 'PipelineExecutableStatisticFormatKHR' value specifying the format of- -- the data found in @value@.+ , -- | @format@ is a 'PipelineExecutableStatisticFormatKHR' value specifying+ -- the format of the data found in @value@. format :: PipelineExecutableStatisticFormatKHR , -- | @value@ is the value of this statistic. value :: PipelineExecutableStatisticValueKHR
src/Graphics/Vulkan/Extensions/VK_KHR_push_descriptor.hs view
@@ -8,6 +8,7 @@ , pattern KHR_PUSH_DESCRIPTOR_EXTENSION_NAME ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Ptr (nullPtr) import Foreign.Ptr (plusPtr)@@ -15,6 +16,7 @@ import Control.Monad.Trans.Cont (evalContT) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -60,11 +62,10 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- that the descriptors will be recorded in.+-- - @commandBuffer@ is the command buffer that the descriptors will be+-- recorded in. ----- - 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- is a+-- - @pipelineBindPoint@ is a -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' -- indicating whether the descriptors will be used by graphics -- pipelines or compute pipelines. There is a separate set of push@@ -95,10 +96,9 @@ -- When a command buffer begins recording, all push descriptors are -- undefined. Push descriptors /can/ be updated incrementally and cause -- shaders to use the updated descriptors for subsequent rendering commands--- (either compute or graphics, according to the--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint')--- until the descriptor is overwritten, or else until the set is disturbed--- as described in+-- (either compute or graphics, according to the @pipelineBindPoint@) until+-- the descriptor is overwritten, or else until the set is disturbed as+-- described in -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility Pipeline Layout Compatibility>. -- When the set is disturbed or push descriptors with a different -- descriptor set layout are set, all push descriptors are undefined.@@ -130,16 +130,14 @@ -- from the push descriptor set layout in the pipeline layout. If the -- descriptor type is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',--- the 'Graphics.Vulkan.Core10.Handles.Sampler' member of the @pImageInfo@--- parameter is ignored and the immutable sampler is taken from the push--- descriptor set layout in the pipeline layout.+-- the @sampler@ member of the @pImageInfo@ parameter is ignored and the+-- immutable sampler is taken from the push descriptor set layout in the+-- pipeline layout. -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- /must/ be supported by the--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'’s parent--- 'Graphics.Vulkan.Core10.Handles.CommandPool'’s queue family+-- - @pipelineBindPoint@ /must/ be supported by the @commandBuffer@’s+-- parent 'Graphics.Vulkan.Core10.Handles.CommandPool'’s queue family -- -- - @set@ /must/ be less than -- 'Graphics.Vulkan.Core10.PipelineLayout.PipelineLayoutCreateInfo'::@setLayoutCount@@@ -151,11 +149,10 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- /must/ be a valid+-- - @pipelineBindPoint@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' -- value --@@ -166,27 +163,25 @@ -- @descriptorWriteCount@ valid -- 'Graphics.Vulkan.Core10.DescriptorSet.WriteDescriptorSet' structures ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations -- -- - @descriptorWriteCount@ /must/ be greater than @0@ ----- - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and @layout@--- /must/ have been created, allocated, or retrieved from the same+-- - Both of @commandBuffer@, and @layout@ /must/ have been created,+-- allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -205,8 +200,8 @@ -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint', -- 'Graphics.Vulkan.Core10.Handles.PipelineLayout', -- 'Graphics.Vulkan.Core10.DescriptorSet.WriteDescriptorSet'-cmdPushDescriptorSetKHR :: PokeChain a => CommandBuffer -> PipelineBindPoint -> PipelineLayout -> ("set" ::: Word32) -> ("descriptorWrites" ::: Vector (WriteDescriptorSet a)) -> IO ()-cmdPushDescriptorSetKHR commandBuffer pipelineBindPoint layout set descriptorWrites = evalContT $ do+cmdPushDescriptorSetKHR :: forall a io . (PokeChain a, MonadIO io) => CommandBuffer -> PipelineBindPoint -> PipelineLayout -> ("set" ::: Word32) -> ("descriptorWrites" ::: Vector (WriteDescriptorSet a)) -> io ()+cmdPushDescriptorSetKHR commandBuffer pipelineBindPoint layout set descriptorWrites = liftIO . evalContT $ do let vkCmdPushDescriptorSetKHR' = mkVkCmdPushDescriptorSetKHR (pVkCmdPushDescriptorSetKHR (deviceCmds (commandBuffer :: CommandBuffer))) pPDescriptorWrites <- ContT $ allocaBytesAligned @(WriteDescriptorSet _) ((Data.Vector.length (descriptorWrites)) * 64) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPDescriptorWrites `plusPtr` (64 * (i)) :: Ptr (WriteDescriptorSet _)) (e) . ($ ())) (descriptorWrites)@@ -226,33 +221,28 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- that the descriptors will be recorded in.+-- - @commandBuffer@ is the command buffer that the descriptors will be+-- recorded in. ----- - 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' is a--- descriptor update template defining how to interpret the descriptor--- information in @pData@.+-- - @descriptorUpdateTemplate@ is a descriptor update template defining+-- how to interpret the descriptor information in @pData@. -- -- - @layout@ is a 'Graphics.Vulkan.Core10.Handles.PipelineLayout' object -- used to program the bindings. It /must/ be compatible with the--- layout used to create the--- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' handle.+-- layout used to create the @descriptorUpdateTemplate@ handle. -- -- - @set@ is the set number of the descriptor set in the pipeline layout -- that will be updated. This /must/ be the same number used to create--- the 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate'--- handle.+-- the @descriptorUpdateTemplate@ handle. -- -- - @pData@ is a pointer to memory containing descriptors for the -- templated update. -- -- == Valid Usage ----- - The--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- specified during the creation of the descriptor update template--- /must/ be supported by the--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'’s parent+-- - The @pipelineBindPoint@ specified during the creation of the+-- descriptor update template /must/ be supported by the+-- @commandBuffer@’s parent -- 'Graphics.Vulkan.Core10.Handles.CommandPool'’s queue family -- -- - @pData@ /must/ be a valid pointer to a memory containing one or more@@ -260,42 +250,37 @@ -- 'Graphics.Vulkan.Core10.DescriptorSet.DescriptorImageInfo', -- 'Graphics.Vulkan.Core10.DescriptorSet.DescriptorBufferInfo', or -- 'Graphics.Vulkan.Core10.Handles.BufferView' in a layout defined by--- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' when it--- was created with+-- @descriptorUpdateTemplate@ when it was created with -- 'Graphics.Vulkan.Extensions.VK_KHR_descriptor_update_template.createDescriptorUpdateTemplateKHR' -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' /must/ be--- a valid 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate'--- handle+-- - @descriptorUpdateTemplate@ /must/ be a valid+-- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate' handle -- -- - @layout@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations ----- - Each of 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate', and--- @layout@ /must/ have been created, allocated, or retrieved from the--- same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Each of @commandBuffer@, @descriptorUpdateTemplate@, and @layout@+-- /must/ have been created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -361,8 +346,8 @@ -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core11.Handles.DescriptorUpdateTemplate', -- 'Graphics.Vulkan.Core10.Handles.PipelineLayout'-cmdPushDescriptorSetWithTemplateKHR :: CommandBuffer -> DescriptorUpdateTemplate -> PipelineLayout -> ("set" ::: Word32) -> ("data" ::: Ptr ()) -> IO ()-cmdPushDescriptorSetWithTemplateKHR commandBuffer descriptorUpdateTemplate layout set data' = do+cmdPushDescriptorSetWithTemplateKHR :: forall io . MonadIO io => CommandBuffer -> DescriptorUpdateTemplate -> PipelineLayout -> ("set" ::: Word32) -> ("data" ::: Ptr ()) -> io ()+cmdPushDescriptorSetWithTemplateKHR commandBuffer descriptorUpdateTemplate layout set data' = liftIO $ do let vkCmdPushDescriptorSetWithTemplateKHR' = mkVkCmdPushDescriptorSetWithTemplateKHR (pVkCmdPushDescriptorSetWithTemplateKHR (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdPushDescriptorSetWithTemplateKHR' (commandBufferHandle (commandBuffer)) (descriptorUpdateTemplate) (layout) (set) (data') pure $ ()
@@ -16,6 +16,7 @@ , SwapchainKHR(..) ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import GHC.Base (when) import GHC.IO (throwIO)@@ -30,6 +31,7 @@ import Text.ParserCombinators.ReadPrec ((+++)) import Text.ParserCombinators.ReadPrec (prec) import Text.ParserCombinators.ReadPrec (step)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -73,21 +75,20 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device associated--- with @swapchain@.+-- - @device@ is the device associated with @swapchain@. -- -- - @swapchain@ is the swapchain to query. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @swapchain@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR' handle ----- - Both of 'Graphics.Vulkan.Core10.Handles.Device', and @swapchain@--- /must/ have been created, allocated, or retrieved from the same+-- - Both of @device@, and @swapchain@ /must/ have been created,+-- allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Host Synchronization@@ -120,8 +121,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR'-getSwapchainStatusKHR :: Device -> SwapchainKHR -> IO (Result)-getSwapchainStatusKHR device swapchain = do+getSwapchainStatusKHR :: forall io . MonadIO io => Device -> SwapchainKHR -> io (Result)+getSwapchainStatusKHR device swapchain = liftIO $ do let vkGetSwapchainStatusKHR' = mkVkGetSwapchainStatusKHR (pVkGetSwapchainStatusKHR (deviceCmds (device :: Device))) r <- vkGetSwapchainStatusKHR' (deviceHandle (device)) (swapchain) when (r < SUCCESS) (throwIO (VulkanException r))
src/Graphics/Vulkan/Extensions/VK_KHR_surface.hs view
@@ -20,6 +20,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -30,6 +31,7 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Data.Vector (generateM)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -97,8 +99,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance used to--- create the surface.+-- - @instance@ is the instance used to create the surface. -- -- - @surface@ is the surface to destroy. --@@ -131,7 +132,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - If @surface@ is not@@ -144,8 +145,7 @@ -- structure -- -- - If @surface@ is a valid handle, it /must/ have been created,--- allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Instance'+-- allocated, or retrieved from @instance@ -- -- == Host Synchronization --@@ -156,8 +156,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Instance', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-destroySurfaceKHR :: Instance -> SurfaceKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroySurfaceKHR instance' surface allocator = evalContT $ do+destroySurfaceKHR :: forall io . MonadIO io => Instance -> SurfaceKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroySurfaceKHR instance' surface allocator = liftIO . evalContT $ do let vkDestroySurfaceKHR' = mkVkDestroySurfaceKHR (pVkDestroySurfaceKHR (instanceCmds (instance' :: Instance))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -178,8 +178,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device.+-- - @physicalDevice@ is the physical device. -- -- - @queueFamilyIndex@ is the queue family. --@@ -195,11 +194,11 @@ -- - @queueFamilyIndex@ /must/ be less than @pQueueFamilyPropertyCount@ -- returned by -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceQueueFamilyProperties'--- for the given 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'+-- for the given @physicalDevice@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @surface@ /must/ be a valid@@ -208,9 +207,9 @@ -- - @pSupported@ /must/ be a valid pointer to a -- 'Graphics.Vulkan.Core10.BaseType.Bool32' value ----- - Both of 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', and--- @surface@ /must/ have been created, allocated, or retrieved from the--- same 'Graphics.Vulkan.Core10.Handles.Instance'+-- - Both of @physicalDevice@, and @surface@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Return Codes --@@ -231,8 +230,8 @@ -- 'Graphics.Vulkan.Core10.BaseType.Bool32', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-getPhysicalDeviceSurfaceSupportKHR :: PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> SurfaceKHR -> IO (("supported" ::: Bool))-getPhysicalDeviceSurfaceSupportKHR physicalDevice queueFamilyIndex surface = evalContT $ do+getPhysicalDeviceSurfaceSupportKHR :: forall io . MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> SurfaceKHR -> io (("supported" ::: Bool))+getPhysicalDeviceSurfaceSupportKHR physicalDevice queueFamilyIndex surface = liftIO . evalContT $ do let vkGetPhysicalDeviceSurfaceSupportKHR' = mkVkGetPhysicalDeviceSurfaceSupportKHR (pVkGetPhysicalDeviceSurfaceSupportKHR (instanceCmds (physicalDevice :: PhysicalDevice))) pPSupported <- ContT $ bracket (callocBytes @Bool32 4) free r <- lift $ vkGetPhysicalDeviceSurfaceSupportKHR' (physicalDeviceHandle (physicalDevice)) (queueFamilyIndex) (surface) (pPSupported)@@ -252,9 +251,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device that will be associated with the swapchain to be created, as--- described for+-- - @physicalDevice@ is the physical device that will be associated with+-- the swapchain to be created, as described for -- 'Graphics.Vulkan.Extensions.VK_KHR_swapchain.createSwapchainKHR'. -- -- - @surface@ is the surface that will be associated with the swapchain.@@ -264,7 +262,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @surface@ /must/ be a valid@@ -273,9 +271,9 @@ -- - @pSurfaceCapabilities@ /must/ be a valid pointer to a -- 'SurfaceCapabilitiesKHR' structure ----- - Both of 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', and--- @surface@ /must/ have been created, allocated, or retrieved from the--- same 'Graphics.Vulkan.Core10.Handles.Instance'+-- - Both of @physicalDevice@, and @surface@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Return Codes --@@ -296,8 +294,8 @@ -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'SurfaceCapabilitiesKHR', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-getPhysicalDeviceSurfaceCapabilitiesKHR :: PhysicalDevice -> SurfaceKHR -> IO (SurfaceCapabilitiesKHR)-getPhysicalDeviceSurfaceCapabilitiesKHR physicalDevice surface = evalContT $ do+getPhysicalDeviceSurfaceCapabilitiesKHR :: forall io . MonadIO io => PhysicalDevice -> SurfaceKHR -> io (SurfaceCapabilitiesKHR)+getPhysicalDeviceSurfaceCapabilitiesKHR physicalDevice surface = liftIO . evalContT $ do let vkGetPhysicalDeviceSurfaceCapabilitiesKHR' = mkVkGetPhysicalDeviceSurfaceCapabilitiesKHR (pVkGetPhysicalDeviceSurfaceCapabilitiesKHR (instanceCmds (physicalDevice :: PhysicalDevice))) pPSurfaceCapabilities <- ContT (withZeroCStruct @SurfaceCapabilitiesKHR) r <- lift $ vkGetPhysicalDeviceSurfaceCapabilitiesKHR' (physicalDeviceHandle (physicalDevice)) (surface) (pPSurfaceCapabilities)@@ -318,9 +316,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device that will be associated with the swapchain to be created, as--- described for+-- - @physicalDevice@ is the physical device that will be associated with+-- the swapchain to be created, as described for -- 'Graphics.Vulkan.Extensions.VK_KHR_swapchain.createSwapchainKHR'. -- -- - @surface@ is the surface that will be associated with the swapchain.@@ -349,29 +346,26 @@ -- -- The number of format pairs supported /must/ be greater than or equal to -- 1. @pSurfaceFormats@ /must/ not contain an entry whose value for--- 'Graphics.Vulkan.Core10.Enums.Format.Format' is--- 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED'.+-- @format@ is 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED'. -- -- If @pSurfaceFormats@ includes an entry whose value for @colorSpace@ is -- 'Graphics.Vulkan.Extensions.VK_EXT_swapchain_colorspace.COLOR_SPACE_SRGB_NONLINEAR_KHR'--- and whose value for 'Graphics.Vulkan.Core10.Enums.Format.Format' is a--- UNORM (or SRGB) format and the corresponding SRGB (or UNORM) format is a--- color renderable format for+-- and whose value for @format@ is a UNORM (or SRGB) format and the+-- corresponding SRGB (or UNORM) format is a color renderable format for -- 'Graphics.Vulkan.Core10.Enums.ImageTiling.IMAGE_TILING_OPTIMAL', then -- @pSurfaceFormats@ /must/ also contain an entry with the same value for--- @colorSpace@ and 'Graphics.Vulkan.Core10.Enums.Format.Format' equal to--- the corresponding SRGB (or UNORM) format.+-- @colorSpace@ and @format@ equal to the corresponding SRGB (or UNORM)+-- format. -- -- == Valid Usage ----- - @surface@ must be supported by--- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', as reported by+-- - @surface@ must be supported by @physicalDevice@, as reported by -- 'getPhysicalDeviceSurfaceSupportKHR' or an equivalent -- platform-specific mechanism. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @surface@ /must/ be a valid@@ -385,9 +379,9 @@ -- pointer to an array of @pSurfaceFormatCount@ 'SurfaceFormatKHR' -- structures ----- - Both of 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', and--- @surface@ /must/ have been created, allocated, or retrieved from the--- same 'Graphics.Vulkan.Core10.Handles.Instance'+-- - Both of @physicalDevice@, and @surface@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Return Codes --@@ -409,8 +403,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', 'SurfaceFormatKHR', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-getPhysicalDeviceSurfaceFormatsKHR :: PhysicalDevice -> SurfaceKHR -> IO (Result, ("surfaceFormats" ::: Vector SurfaceFormatKHR))-getPhysicalDeviceSurfaceFormatsKHR physicalDevice surface = evalContT $ do+getPhysicalDeviceSurfaceFormatsKHR :: forall io . MonadIO io => PhysicalDevice -> SurfaceKHR -> io (Result, ("surfaceFormats" ::: Vector SurfaceFormatKHR))+getPhysicalDeviceSurfaceFormatsKHR physicalDevice surface = liftIO . evalContT $ do let vkGetPhysicalDeviceSurfaceFormatsKHR' = mkVkGetPhysicalDeviceSurfaceFormatsKHR (pVkGetPhysicalDeviceSurfaceFormatsKHR (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPSurfaceFormatCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -438,9 +432,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device that will be associated with the swapchain to be created, as--- described for+-- - @physicalDevice@ is the physical device that will be associated with+-- the swapchain to be created, as described for -- 'Graphics.Vulkan.Extensions.VK_KHR_swapchain.createSwapchainKHR'. -- -- - @surface@ is the surface that will be associated with the swapchain.@@ -469,7 +462,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @surface@ /must/ be a valid@@ -483,9 +476,9 @@ -- 'Graphics.Vulkan.Extensions.VK_KHR_shared_presentable_image.PresentModeKHR' -- values ----- - Both of 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', and--- @surface@ /must/ have been created, allocated, or retrieved from the--- same 'Graphics.Vulkan.Core10.Handles.Instance'+-- - Both of @physicalDevice@, and @surface@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Return Codes --@@ -508,8 +501,8 @@ -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'Graphics.Vulkan.Extensions.VK_KHR_shared_presentable_image.PresentModeKHR', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-getPhysicalDeviceSurfacePresentModesKHR :: PhysicalDevice -> SurfaceKHR -> IO (Result, ("presentModes" ::: Vector PresentModeKHR))-getPhysicalDeviceSurfacePresentModesKHR physicalDevice surface = evalContT $ do+getPhysicalDeviceSurfacePresentModesKHR :: forall io . MonadIO io => PhysicalDevice -> SurfaceKHR -> io (Result, ("presentModes" ::: Vector PresentModeKHR))+getPhysicalDeviceSurfacePresentModesKHR physicalDevice surface = liftIO . evalContT $ do let vkGetPhysicalDeviceSurfacePresentModesKHR' = mkVkGetPhysicalDeviceSurfacePresentModesKHR (pVkGetPhysicalDeviceSurfacePresentModesKHR (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPPresentModeCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -689,9 +682,8 @@ -- 'Graphics.Vulkan.Extensions.VK_KHR_get_surface_capabilities2.SurfaceFormat2KHR', -- 'getPhysicalDeviceSurfaceFormatsKHR' data SurfaceFormatKHR = SurfaceFormatKHR- { -- | 'Graphics.Vulkan.Core10.Enums.Format.Format' is a- -- 'Graphics.Vulkan.Core10.Enums.Format.Format' that is compatible with the- -- specified surface.+ { -- | @format@ is a 'Graphics.Vulkan.Core10.Enums.Format.Format' that is+ -- compatible with the specified surface. format :: Format , -- | @colorSpace@ is a presentation -- 'Graphics.Vulkan.Extensions.VK_EXT_swapchain_colorspace.ColorSpaceKHR'
src/Graphics/Vulkan/Extensions/VK_KHR_swapchain.hs view
@@ -46,6 +46,7 @@ import Control.Exception.Base (bracket) import Control.Monad (unless)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -69,6 +70,7 @@ 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.Type.Equality ((:~:)(Refl))@@ -190,8 +192,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device to create the--- swapchain for.+-- - @device@ is the device to create the swapchain for. -- -- - @pCreateInfo@ is a pointer to a 'SwapchainCreateInfoKHR' structure -- specifying the parameters of the created swapchain.@@ -236,8 +237,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'SwapchainCreateInfoKHR' structure@@ -283,8 +284,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', 'SwapchainCreateInfoKHR', -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR'-createSwapchainKHR :: PokeChain a => Device -> SwapchainCreateInfoKHR a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SwapchainKHR)-createSwapchainKHR device createInfo allocator = evalContT $ do+createSwapchainKHR :: forall a io . (PokeChain a, MonadIO io) => Device -> SwapchainCreateInfoKHR a -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SwapchainKHR)+createSwapchainKHR device createInfo allocator = liftIO . evalContT $ do let vkCreateSwapchainKHR' = mkVkCreateSwapchainKHR (pVkCreateSwapchainKHR (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -300,11 +301,11 @@ -- 'bracket' -- -- The allocated value must not be returned from the provided computation-withSwapchainKHR :: PokeChain a => Device -> SwapchainCreateInfoKHR a -> Maybe AllocationCallbacks -> (SwapchainKHR -> IO r) -> IO r-withSwapchainKHR device swapchainCreateInfoKHR allocationCallbacks =+withSwapchainKHR :: forall a r . PokeChain a => Device -> SwapchainCreateInfoKHR a -> Maybe AllocationCallbacks -> ((SwapchainKHR) -> IO r) -> IO r+withSwapchainKHR device pCreateInfo pAllocator = bracket- (createSwapchainKHR device swapchainCreateInfoKHR allocationCallbacks)- (\o -> destroySwapchainKHR device o allocationCallbacks)+ (createSwapchainKHR device pCreateInfo pAllocator)+ (\(o0) -> destroySwapchainKHR device o0 pAllocator) foreign import ccall@@ -318,8 +319,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the--- 'Graphics.Vulkan.Core10.Handles.Device' associated with @swapchain@.+-- - @device@ is the 'Graphics.Vulkan.Core10.Handles.Device' associated+-- with @swapchain@. -- -- - @swapchain@ is the swapchain to destroy. --@@ -370,8 +371,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - If @swapchain@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @swapchain@@@ -383,10 +384,9 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' -- structure ----- - Both of 'Graphics.Vulkan.Core10.Handles.Device', and @swapchain@--- that are valid handles of non-ignored parameters /must/ have been--- created, allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Instance'+-- - Both of @device@, and @swapchain@ that are valid handles of+-- non-ignored parameters /must/ have been created, allocated, or+-- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Host Synchronization --@@ -397,8 +397,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR'-destroySwapchainKHR :: Device -> SwapchainKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroySwapchainKHR device swapchain allocator = evalContT $ do+destroySwapchainKHR :: forall io . MonadIO io => Device -> SwapchainKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroySwapchainKHR device swapchain allocator = liftIO . evalContT $ do let vkDestroySwapchainKHR' = mkVkDestroySwapchainKHR (pVkDestroySwapchainKHR (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -419,8 +419,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device associated--- with @swapchain@.+-- - @device@ is the device associated with @swapchain@. -- -- - @swapchain@ is the swapchain to query. --@@ -448,8 +447,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @swapchain@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR' handle@@ -462,8 +461,8 @@ -- valid pointer to an array of @pSwapchainImageCount@ -- 'Graphics.Vulkan.Core10.Handles.Image' handles ----- - Both of 'Graphics.Vulkan.Core10.Handles.Device', and @swapchain@--- /must/ have been created, allocated, or retrieved from the same+-- - Both of @device@, and @swapchain@ /must/ have been created,+-- allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Return Codes@@ -485,8 +484,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Image', -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR'-getSwapchainImagesKHR :: Device -> SwapchainKHR -> IO (Result, ("swapchainImages" ::: Vector Image))-getSwapchainImagesKHR device swapchain = evalContT $ do+getSwapchainImagesKHR :: forall io . MonadIO io => Device -> SwapchainKHR -> io (Result, ("swapchainImages" ::: Vector Image))+getSwapchainImagesKHR device swapchain = liftIO . evalContT $ do let vkGetSwapchainImagesKHR' = mkVkGetSwapchainImagesKHR (pVkGetSwapchainImagesKHR (deviceCmds (device :: Device))) let device' = deviceHandle (device) pPSwapchainImageCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -513,8 +512,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device associated--- with @swapchain@.+-- - @device@ is the device associated with @swapchain@. -- -- - @swapchain@ is the non-retired swapchain from which an image is -- being acquired.@@ -522,13 +520,11 @@ -- - @timeout@ specifies how long the function waits, in nanoseconds, if -- no image is available. ----- - 'Graphics.Vulkan.Core10.Handles.Semaphore' is--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a semaphore to--- signal.+-- - @semaphore@ is 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or+-- a semaphore to signal. ----- - 'Graphics.Vulkan.Core10.Handles.Fence' is--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a fence to--- signal.+-- - @fence@ is 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a+-- fence to signal. -- -- - @pImageIndex@ is a pointer to a @uint32_t@ in which the index of the -- next image to use (i.e. an index into the array of images returned@@ -538,21 +534,19 @@ -- -- - @swapchain@ /must/ not be in the retired state ----- - If 'Graphics.Vulkan.Core10.Handles.Semaphore' is not+-- - If @semaphore@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' it /must/ be -- unsignaled ----- - If 'Graphics.Vulkan.Core10.Handles.Semaphore' is not+-- - If @semaphore@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' it /must/ not have -- any uncompleted signal or wait operations pending ----- - If 'Graphics.Vulkan.Core10.Handles.Fence' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' it /must/ be--- unsignaled and /must/ not be associated with any other queue command--- that has not yet completed execution on that queue+-- - If @fence@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'+-- it /must/ be unsignaled and /must/ not be associated with any other+-- queue command that has not yet completed execution on that queue ----- - 'Graphics.Vulkan.Core10.Handles.Semaphore' and--- 'Graphics.Vulkan.Core10.Handles.Fence' /must/ not both be equal to+-- - @semaphore@ and @fence@ /must/ not both be equal to -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' -- -- - If the number of currently acquired images is greater than the@@ -564,52 +558,45 @@ -- with the @surface@ used to create @swapchain@, @timeout@ /must/ not -- be @UINT64_MAX@ ----- - 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ have a+-- - @semaphore@ /must/ have a -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType' of -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SEMAPHORE_TYPE_BINARY' -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @swapchain@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR' handle ----- - If 'Graphics.Vulkan.Core10.Handles.Semaphore' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Semaphore' handle+-- - If @semaphore@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @semaphore@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Semaphore' handle ----- - If 'Graphics.Vulkan.Core10.Handles.Fence' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Fence' handle+-- - If @fence@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @fence@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Fence'+-- handle -- -- - @pImageIndex@ /must/ be a valid pointer to a @uint32_t@ value ----- - If 'Graphics.Vulkan.Core10.Handles.Semaphore' is a valid handle, it--- /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @semaphore@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ ----- - If 'Graphics.Vulkan.Core10.Handles.Fence' is a valid handle, it--- /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @fence@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ ----- - Both of 'Graphics.Vulkan.Core10.Handles.Device', and @swapchain@--- that are valid handles of non-ignored parameters /must/ have been--- created, allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Instance'+-- - Both of @device@, and @swapchain@ that are valid handles of+-- non-ignored parameters /must/ have been created, allocated, or+-- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Host Synchronization -- -- - Host access to @swapchain@ /must/ be externally synchronized ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ be--- externally synchronized+-- - Host access to @semaphore@ /must/ be externally synchronized ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be--- externally synchronized+-- - Host access to @fence@ /must/ be externally synchronized -- -- == Return Codes --@@ -643,8 +630,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Fence', -- 'Graphics.Vulkan.Core10.Handles.Semaphore', -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR'-acquireNextImageKHR :: Device -> SwapchainKHR -> ("timeout" ::: Word64) -> Semaphore -> Fence -> IO (Result, ("imageIndex" ::: Word32))-acquireNextImageKHR device swapchain timeout semaphore fence = evalContT $ do+acquireNextImageKHR :: forall io . MonadIO io => Device -> SwapchainKHR -> ("timeout" ::: Word64) -> Semaphore -> Fence -> io (Result, ("imageIndex" ::: Word32))+acquireNextImageKHR device swapchain timeout semaphore fence = liftIO . evalContT $ do let vkAcquireNextImageKHR' = mkVkAcquireNextImageKHR (pVkAcquireNextImageKHR (deviceCmds (device :: Device))) pPImageIndex <- ContT $ bracket (callocBytes @Word32 4) free r <- lift $ vkAcquireNextImageKHR' (deviceHandle (device)) (swapchain) (timeout) (semaphore) (fence) (pPImageIndex)@@ -664,9 +651,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Queue' is a queue that is capable of--- presentation to the target surface’s platform on the same device as--- the image’s swapchain.+-- - @queue@ is a queue that is capable of presentation to the target+-- surface’s platform on the same device as the image’s swapchain. -- -- - @pPresentInfo@ is a pointer to a 'PresentInfoKHR' structure -- specifying parameters of the presentation.@@ -683,8 +669,7 @@ -- -- - Each element of @pSwapchains@ member of @pPresentInfo@ /must/ be a -- swapchain that is created for a surface for which presentation is--- supported from 'Graphics.Vulkan.Core10.Handles.Queue' as determined--- using a call to+-- supported from @queue@ as determined using a call to -- 'Graphics.Vulkan.Extensions.VK_KHR_surface.getPhysicalDeviceSurfaceSupportKHR' -- -- - If more than one member of @pSwapchains@ was created from a display@@ -693,8 +678,8 @@ -- -- - When a semaphore wait operation referring to a binary semaphore -- defined by the elements of the @pWaitSemaphores@ member of--- @pPresentInfo@ executes on 'Graphics.Vulkan.Core10.Handles.Queue',--- there /must/ be no other queues waiting on the same semaphore.+-- @pPresentInfo@ executes on @queue@, there /must/ be no other queues+-- waiting on the same semaphore. -- -- - All elements of the @pWaitSemaphores@ member of @pPresentInfo@ -- /must/ be semaphores that are signaled, or have@@ -754,16 +739,15 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Queue' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Queue' handle+-- - @queue@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Queue'+-- handle -- -- - @pPresentInfo@ /must/ be a valid pointer to a valid 'PresentInfoKHR' -- structure -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Queue' /must/ be--- externally synchronized+-- - Host access to @queue@ /must/ be externally synchronized -- -- - Host access to @pPresentInfo.pWaitSemaphores@[] /must/ be externally -- synchronized@@ -806,8 +790,8 @@ -- = See Also -- -- 'PresentInfoKHR', 'Graphics.Vulkan.Core10.Handles.Queue'-queuePresentKHR :: PokeChain a => Queue -> PresentInfoKHR a -> IO (Result)-queuePresentKHR queue presentInfo = evalContT $ do+queuePresentKHR :: forall a io . (PokeChain a, MonadIO io) => Queue -> PresentInfoKHR a -> io (Result)+queuePresentKHR queue presentInfo = liftIO . evalContT $ do let vkQueuePresentKHR' = mkVkQueuePresentKHR (pVkQueuePresentKHR (deviceCmds (queue :: Queue))) pPresentInfo <- ContT $ withCStruct (presentInfo) r <- lift $ vkQueuePresentKHR' (queueHandle (queue)) pPresentInfo@@ -827,7 +811,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device.+-- - @device@ is the logical device. -- -- - @pDeviceGroupPresentCapabilities@ is a pointer to a -- 'DeviceGroupPresentCapabilitiesKHR' structure in which the device’s@@ -849,8 +833,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'DeviceGroupPresentCapabilitiesKHR'-getDeviceGroupPresentCapabilitiesKHR :: Device -> IO (DeviceGroupPresentCapabilitiesKHR)-getDeviceGroupPresentCapabilitiesKHR device = evalContT $ do+getDeviceGroupPresentCapabilitiesKHR :: forall io . MonadIO io => Device -> io (DeviceGroupPresentCapabilitiesKHR)+getDeviceGroupPresentCapabilitiesKHR device = liftIO . evalContT $ do let vkGetDeviceGroupPresentCapabilitiesKHR' = mkVkGetDeviceGroupPresentCapabilitiesKHR (pVkGetDeviceGroupPresentCapabilitiesKHR (deviceCmds (device :: Device))) pPDeviceGroupPresentCapabilities <- ContT (withZeroCStruct @DeviceGroupPresentCapabilitiesKHR) r <- lift $ vkGetDeviceGroupPresentCapabilitiesKHR' (deviceHandle (device)) (pPDeviceGroupPresentCapabilities)@@ -871,7 +855,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device.+-- - @device@ is the logical device. -- -- - @surface@ is the surface. --@@ -888,8 +872,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @surface@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR' handle@@ -897,9 +881,8 @@ -- - @pModes@ /must/ be a valid pointer to a -- 'DeviceGroupPresentModeFlagsKHR' value ----- - Both of 'Graphics.Vulkan.Core10.Handles.Device', and @surface@--- /must/ have been created, allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Instance'+-- - Both of @device@, and @surface@ /must/ have been created, allocated,+-- or retrieved from the same 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Host Synchronization --@@ -924,8 +907,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'DeviceGroupPresentModeFlagsKHR', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-getDeviceGroupSurfacePresentModesKHR :: Device -> SurfaceKHR -> IO (("modes" ::: DeviceGroupPresentModeFlagsKHR))-getDeviceGroupSurfacePresentModesKHR device surface = evalContT $ do+getDeviceGroupSurfacePresentModesKHR :: forall io . MonadIO io => Device -> SurfaceKHR -> io (("modes" ::: DeviceGroupPresentModeFlagsKHR))+getDeviceGroupSurfacePresentModesKHR device surface = liftIO . evalContT $ do let vkGetDeviceGroupSurfacePresentModesKHR' = mkVkGetDeviceGroupSurfacePresentModesKHR (pVkGetDeviceGroupSurfacePresentModesKHR (deviceCmds (device :: Device))) pPModes <- ContT $ bracket (callocBytes @DeviceGroupPresentModeFlagsKHR 4) free r <- lift $ vkGetDeviceGroupSurfacePresentModesKHR' (deviceHandle (device)) (surface) (pPModes)@@ -946,8 +929,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the device associated--- with @swapchain@.+-- - @device@ is the device associated with @swapchain@. -- -- - @pAcquireInfo@ is a pointer to a 'AcquireNextImageInfoKHR' structure -- containing parameters of the acquire.@@ -968,8 +950,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pAcquireInfo@ /must/ be a valid pointer to a valid -- 'AcquireNextImageInfoKHR' structure@@ -1005,8 +987,8 @@ -- = See Also -- -- 'AcquireNextImageInfoKHR', 'Graphics.Vulkan.Core10.Handles.Device'-acquireNextImage2KHR :: Device -> ("acquireInfo" ::: AcquireNextImageInfoKHR) -> IO (Result, ("imageIndex" ::: Word32))-acquireNextImage2KHR device acquireInfo = evalContT $ do+acquireNextImage2KHR :: forall io . MonadIO io => Device -> ("acquireInfo" ::: AcquireNextImageInfoKHR) -> io (Result, ("imageIndex" ::: Word32))+acquireNextImage2KHR device acquireInfo = liftIO . evalContT $ do let vkAcquireNextImage2KHR' = mkVkAcquireNextImage2KHR (pVkAcquireNextImage2KHR (deviceCmds (device :: Device))) pAcquireInfo <- ContT $ withCStruct (acquireInfo) pPImageIndex <- ContT $ bracket (callocBytes @Word32 4) free@@ -1028,8 +1010,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device.+-- - @physicalDevice@ is the physical device. -- -- - @surface@ is the surface. --@@ -1060,7 +1041,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @surface@ /must/ be a valid@@ -1073,9 +1054,9 @@ -- @pRectCount@ 'Graphics.Vulkan.Core10.CommandBufferBuilding.Rect2D' -- structures ----- - Both of 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', and--- @surface@ /must/ have been created, allocated, or retrieved from the--- same 'Graphics.Vulkan.Core10.Handles.Instance'+-- - Both of @physicalDevice@, and @surface@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Host Synchronization --@@ -1100,8 +1081,8 @@ -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.Rect2D', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-getPhysicalDevicePresentRectanglesKHR :: PhysicalDevice -> SurfaceKHR -> IO (Result, ("rects" ::: Vector Rect2D))-getPhysicalDevicePresentRectanglesKHR physicalDevice surface = evalContT $ do+getPhysicalDevicePresentRectanglesKHR :: forall io . MonadIO io => PhysicalDevice -> SurfaceKHR -> io (Result, ("rects" ::: Vector Rect2D))+getPhysicalDevicePresentRectanglesKHR physicalDevice surface = liftIO . evalContT $ do let vkGetPhysicalDevicePresentRectanglesKHR' = mkVkGetPhysicalDevicePresentRectanglesKHR (pVkGetPhysicalDevicePresentRectanglesKHR (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPRectCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -1264,9 +1245,8 @@ -- or -- 'Graphics.Vulkan.Extensions.VK_KHR_shared_presentable_image.PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR' ----- - @imageFormat@ and @imageColorSpace@ /must/ match the--- 'Graphics.Vulkan.Core10.Enums.Format.Format' and @colorSpace@--- members, respectively, of one of the+-- - @imageFormat@ and @imageColorSpace@ /must/ match the @format@ and+-- @colorSpace@ members, respectively, of one of the -- 'Graphics.Vulkan.Extensions.VK_KHR_surface.SurfaceFormatKHR' -- structures returned by -- 'Graphics.Vulkan.Extensions.VK_KHR_surface.getPhysicalDeviceSurfaceFormatsKHR'@@ -1329,8 +1309,7 @@ -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceQueueFamilyProperties' -- or -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceQueueFamilyProperties2'--- for the 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' that was--- used to create 'Graphics.Vulkan.Core10.Handles.Device'+-- for the @physicalDevice@ that was used to create @device@ -- -- - @preTransform@ /must/ be one of the bits present in the -- @supportedTransforms@ member of the@@ -1354,8 +1333,8 @@ -- -- - If the logical device was created with -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_device_group_creation.DeviceGroupDeviceCreateInfo'::@physicalDeviceCount@--- equal to 1, 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not--- contain 'SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR'+-- equal to 1, @flags@ /must/ not contain+-- 'SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR' -- -- - If @oldSwapchain@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @oldSwapchain@@@ -1367,15 +1346,13 @@ -- of the swapchain /must/ be supported as reported by -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceImageFormatProperties' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains--- 'SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR' then the @pNext@ chain--- /must/ include a+-- - If @flags@ contains 'SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR' then+-- the @pNext@ chain /must/ include a -- 'Graphics.Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo' -- structure with a @viewFormatCount@ greater than zero and -- @pViewFormats@ /must/ have an element equal to @imageFormat@ ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains--- 'SWAPCHAIN_CREATE_PROTECTED_BIT_KHR', then+-- - If @flags@ contains 'SWAPCHAIN_CREATE_PROTECTED_BIT_KHR', then -- 'Graphics.Vulkan.Extensions.VK_KHR_surface_protected_capabilities.SurfaceProtectedCapabilitiesKHR'::@supportsProtected@ -- /must/ be 'Graphics.Vulkan.Core10.BaseType.TRUE' in the -- 'Graphics.Vulkan.Extensions.VK_KHR_surface_protected_capabilities.SurfaceProtectedCapabilitiesKHR'@@ -1411,8 +1388,8 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of 'SwapchainCreateFlagBitsKHR' values+-- - @flags@ /must/ be a valid combination of+-- 'SwapchainCreateFlagBitsKHR' values -- -- - @surface@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR' handle@@ -1477,9 +1454,8 @@ data SwapchainCreateInfoKHR (es :: [Type]) = SwapchainCreateInfoKHR { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of- -- 'SwapchainCreateFlagBitsKHR' indicating parameters of the swapchain- -- creation.+ , -- | @flags@ is a bitmask of 'SwapchainCreateFlagBitsKHR' indicating+ -- parameters of the swapchain creation. flags :: SwapchainCreateFlagsKHR , -- | @surface@ is the surface onto which the swapchain will present images. -- If the creation succeeds, the swapchain becomes associated with@@ -2064,28 +2040,26 @@ -- -- - @swapchain@ /must/ not be in the retired state ----- - If 'Graphics.Vulkan.Core10.Handles.Semaphore' is not+-- - If @semaphore@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' it /must/ be -- unsignaled ----- - If 'Graphics.Vulkan.Core10.Handles.Semaphore' is not+-- - If @semaphore@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' it /must/ not have -- any uncompleted signal or wait operations pending ----- - If 'Graphics.Vulkan.Core10.Handles.Fence' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' it /must/ be--- unsignaled and /must/ not be associated with any other queue command--- that has not yet completed execution on that queue+-- - If @fence@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'+-- it /must/ be unsignaled and /must/ not be associated with any other+-- queue command that has not yet completed execution on that queue ----- - 'Graphics.Vulkan.Core10.Handles.Semaphore' and--- 'Graphics.Vulkan.Core10.Handles.Fence' /must/ not both be equal to+-- - @semaphore@ and @fence@ /must/ not both be equal to -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' -- -- - @deviceMask@ /must/ be a valid device mask -- -- - @deviceMask@ /must/ not be zero ----- - 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ have a+-- - @semaphore@ /must/ have a -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SemaphoreType' of -- 'Graphics.Vulkan.Core12.Enums.SemaphoreType.SEMAPHORE_TYPE_BINARY' --@@ -2099,31 +2073,25 @@ -- - @swapchain@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.SwapchainKHR' handle ----- - If 'Graphics.Vulkan.Core10.Handles.Semaphore' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Semaphore' handle+-- - If @semaphore@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @semaphore@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Semaphore' handle ----- - If 'Graphics.Vulkan.Core10.Handles.Fence' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Fence' handle+-- - If @fence@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @fence@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Fence'+-- handle ----- - Each of 'Graphics.Vulkan.Core10.Handles.Fence',--- 'Graphics.Vulkan.Core10.Handles.Semaphore', and @swapchain@ that are--- valid handles of non-ignored parameters /must/ have been created,--- allocated, or retrieved from the same--- 'Graphics.Vulkan.Core10.Handles.Instance'+-- - Each of @fence@, @semaphore@, and @swapchain@ that are valid handles+-- of non-ignored parameters /must/ have been created, allocated, or+-- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Instance' -- -- == Host Synchronization -- -- - Host access to @swapchain@ /must/ be externally synchronized ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Semaphore' /must/ be--- externally synchronized+-- - Host access to @semaphore@ /must/ be externally synchronized ----- - Host access to 'Graphics.Vulkan.Core10.Handles.Fence' /must/ be--- externally synchronized+-- - Host access to @fence@ /must/ be externally synchronized -- -- = See Also --@@ -2138,12 +2106,11 @@ , -- | @timeout@ specifies how long the function waits, in nanoseconds, if no -- image is available. timeout :: Word64- , -- | 'Graphics.Vulkan.Core10.Handles.Semaphore' is- -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a semaphore to- -- signal.+ , -- | @semaphore@ is 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a+ -- semaphore to signal. semaphore :: Semaphore- , -- | 'Graphics.Vulkan.Core10.Handles.Fence' is- -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a fence to signal.+ , -- | @fence@ is 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a fence+ -- to signal. fence :: Fence , -- | @deviceMask@ is a mask of physical devices for which the swapchain image -- will be ready to use when the semaphore or fence is signaled.
src/Graphics/Vulkan/Extensions/VK_KHR_wayland_surface.hs view
@@ -13,6 +13,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -31,6 +32,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -91,8 +93,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance to--- associate the surface with.+-- - @instance@ is the instance to associate the surface with. -- -- - @pCreateInfo@ is a pointer to a 'WaylandSurfaceCreateInfoKHR' -- structure containing parameters affecting the creation of the@@ -109,7 +110,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -141,8 +142,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Instance', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR', -- 'WaylandSurfaceCreateInfoKHR'-createWaylandSurfaceKHR :: Instance -> WaylandSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SurfaceKHR)-createWaylandSurfaceKHR instance' createInfo allocator = evalContT $ do+createWaylandSurfaceKHR :: forall io . MonadIO io => Instance -> WaylandSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)+createWaylandSurfaceKHR instance' createInfo allocator = liftIO . evalContT $ do let vkCreateWaylandSurfaceKHR' = mkVkCreateWaylandSurfaceKHR (pVkCreateWaylandSurfaceKHR (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -167,14 +168,12 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device.+-- - @physicalDevice@ is the physical device. -- -- - @queueFamilyIndex@ is the queue family index. ----- - 'Graphics.Vulkan.Extensions.WSITypes.Display' is a pointer to the--- 'Graphics.Vulkan.Extensions.WSITypes.Wl_display' associated with a--- Wayland compositor.+-- - @display@ is a pointer to the @wl_display@ associated with a Wayland+-- compositor. -- -- = Description --@@ -186,8 +185,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceWaylandPresentationSupportKHR :: PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> Ptr Wl_display -> IO (Bool)-getPhysicalDeviceWaylandPresentationSupportKHR physicalDevice queueFamilyIndex display = do+getPhysicalDeviceWaylandPresentationSupportKHR :: forall io . MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> Ptr Wl_display -> io (Bool)+getPhysicalDeviceWaylandPresentationSupportKHR physicalDevice queueFamilyIndex display = liftIO $ do let vkGetPhysicalDeviceWaylandPresentationSupportKHR' = mkVkGetPhysicalDeviceWaylandPresentationSupportKHR (pVkGetPhysicalDeviceWaylandPresentationSupportKHR (instanceCmds (physicalDevice :: PhysicalDevice))) r <- vkGetPhysicalDeviceWaylandPresentationSupportKHR' (physicalDeviceHandle (physicalDevice)) (queueFamilyIndex) (display) pure $ ((bool32ToBool r))@@ -203,13 +202,11 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'WaylandSurfaceCreateFlagsKHR', 'createWaylandSurfaceKHR' data WaylandSurfaceCreateInfoKHR = WaylandSurfaceCreateInfoKHR- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: WaylandSurfaceCreateFlagsKHR- , -- | 'Graphics.Vulkan.Extensions.WSITypes.Display' /must/ point to a valid- -- Wayland 'Graphics.Vulkan.Extensions.WSITypes.Wl_display'.+ , -- | @display@ /must/ point to a valid Wayland @wl_display@. display :: Ptr Wl_display- , -- | @surface@ /must/ point to a valid Wayland- -- 'Graphics.Vulkan.Extensions.WSITypes.Wl_surface'.+ , -- | @surface@ /must/ point to a valid Wayland @wl_surface@. surface :: Ptr Wl_surface } deriving (Typeable)
src/Graphics/Vulkan/Extensions/VK_KHR_win32_surface.hs view
@@ -13,6 +13,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -31,6 +32,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -91,8 +93,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance to--- associate the surface with.+-- - @instance@ is the instance to associate the surface with. -- -- - @pCreateInfo@ is a pointer to a 'Win32SurfaceCreateInfoKHR' -- structure containing parameters affecting the creation of the@@ -109,7 +110,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -141,8 +142,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Instance', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR', -- 'Win32SurfaceCreateInfoKHR'-createWin32SurfaceKHR :: Instance -> Win32SurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SurfaceKHR)-createWin32SurfaceKHR instance' createInfo allocator = evalContT $ do+createWin32SurfaceKHR :: forall io . MonadIO io => Instance -> Win32SurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)+createWin32SurfaceKHR instance' createInfo allocator = liftIO . evalContT $ do let vkCreateWin32SurfaceKHR' = mkVkCreateWin32SurfaceKHR (pVkCreateWin32SurfaceKHR (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -167,8 +168,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device.+-- - @physicalDevice@ is the physical device. -- -- - @queueFamilyIndex@ is the queue family index. --@@ -182,8 +182,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceWin32PresentationSupportKHR :: PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> IO (Bool)-getPhysicalDeviceWin32PresentationSupportKHR physicalDevice queueFamilyIndex = do+getPhysicalDeviceWin32PresentationSupportKHR :: forall io . MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> io (Bool)+getPhysicalDeviceWin32PresentationSupportKHR physicalDevice queueFamilyIndex = liftIO $ do let vkGetPhysicalDeviceWin32PresentationSupportKHR' = mkVkGetPhysicalDeviceWin32PresentationSupportKHR (pVkGetPhysicalDeviceWin32PresentationSupportKHR (instanceCmds (physicalDevice :: PhysicalDevice))) r <- vkGetPhysicalDeviceWin32PresentationSupportKHR' (physicalDeviceHandle (physicalDevice)) (queueFamilyIndex) pure $ ((bool32ToBool r))@@ -199,7 +199,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'Win32SurfaceCreateFlagsKHR', 'createWin32SurfaceKHR' data Win32SurfaceCreateInfoKHR = Win32SurfaceCreateInfoKHR- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: Win32SurfaceCreateFlagsKHR , -- | @hinstance@ /must/ be a valid Win32 -- 'Graphics.Vulkan.Extensions.WSITypes.HINSTANCE'.
src/Graphics/Vulkan/Extensions/VK_KHR_xcb_surface.hs view
@@ -14,6 +14,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -32,6 +33,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -94,8 +96,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance to--- associate the surface with.+-- - @instance@ is the instance to associate the surface with. -- -- - @pCreateInfo@ is a pointer to a 'XcbSurfaceCreateInfoKHR' structure -- containing parameters affecting the creation of the surface object.@@ -111,7 +112,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -143,8 +144,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Instance', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR', -- 'XcbSurfaceCreateInfoKHR'-createXcbSurfaceKHR :: Instance -> XcbSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SurfaceKHR)-createXcbSurfaceKHR instance' createInfo allocator = evalContT $ do+createXcbSurfaceKHR :: forall io . MonadIO io => Instance -> XcbSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)+createXcbSurfaceKHR instance' createInfo allocator = liftIO . evalContT $ do let vkCreateXcbSurfaceKHR' = mkVkCreateXcbSurfaceKHR (pVkCreateXcbSurfaceKHR (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -169,15 +170,12 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device.+-- - @physicalDevice@ is the physical device. -- -- - @queueFamilyIndex@ is the queue family index. ----- - @connection@ is a pointer to an--- 'Graphics.Vulkan.Extensions.WSITypes.Xcb_connection_t' to the X--- server. @visual_id@ is an X11 visual--- ('Graphics.Vulkan.Extensions.WSITypes.Xcb_visualid_t').+-- - @connection@ is a pointer to an @xcb_connection_t@ to the X server.+-- @visual_id@ is an X11 visual (@xcb_visualid_t@). -- -- = Description --@@ -189,8 +187,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceXcbPresentationSupportKHR :: PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> Ptr Xcb_connection_t -> ("visual_id" ::: Xcb_visualid_t) -> IO (Bool)-getPhysicalDeviceXcbPresentationSupportKHR physicalDevice queueFamilyIndex connection visual_id = do+getPhysicalDeviceXcbPresentationSupportKHR :: forall io . MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> Ptr Xcb_connection_t -> ("visual_id" ::: Xcb_visualid_t) -> io (Bool)+getPhysicalDeviceXcbPresentationSupportKHR physicalDevice queueFamilyIndex connection visual_id = liftIO $ do let vkGetPhysicalDeviceXcbPresentationSupportKHR' = mkVkGetPhysicalDeviceXcbPresentationSupportKHR (pVkGetPhysicalDeviceXcbPresentationSupportKHR (instanceCmds (physicalDevice :: PhysicalDevice))) r <- vkGetPhysicalDeviceXcbPresentationSupportKHR' (physicalDeviceHandle (physicalDevice)) (queueFamilyIndex) (connection) (visual_id) pure $ ((bool32ToBool r))@@ -206,13 +204,11 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'XcbSurfaceCreateFlagsKHR', 'createXcbSurfaceKHR' data XcbSurfaceCreateInfoKHR = XcbSurfaceCreateInfoKHR- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: XcbSurfaceCreateFlagsKHR- , -- | @connection@ /must/ point to a valid X11- -- 'Graphics.Vulkan.Extensions.WSITypes.Xcb_connection_t'.+ , -- | @connection@ /must/ point to a valid X11 @xcb_connection_t@. connection :: Ptr Xcb_connection_t- , -- | 'Graphics.Vulkan.Extensions.WSITypes.Window' /must/ be a valid X11- -- 'Graphics.Vulkan.Extensions.WSITypes.Xcb_window_t'.+ , -- | @window@ /must/ be a valid X11 @xcb_window_t@. window :: Xcb_window_t } deriving (Typeable)
src/Graphics/Vulkan/Extensions/VK_KHR_xlib_surface.hs view
@@ -14,6 +14,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -32,6 +33,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -94,8 +96,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance to--- associate the surface with.+-- - @instance@ is the instance to associate the surface with. -- -- - @pCreateInfo@ is a pointer to a 'XlibSurfaceCreateInfoKHR' structure -- containing the parameters affecting the creation of the surface@@ -112,7 +113,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -144,8 +145,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Instance', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR', -- 'XlibSurfaceCreateInfoKHR'-createXlibSurfaceKHR :: Instance -> XlibSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SurfaceKHR)-createXlibSurfaceKHR instance' createInfo allocator = evalContT $ do+createXlibSurfaceKHR :: forall io . MonadIO io => Instance -> XlibSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)+createXlibSurfaceKHR instance' createInfo allocator = liftIO . evalContT $ do let vkCreateXlibSurfaceKHR' = mkVkCreateXlibSurfaceKHR (pVkCreateXlibSurfaceKHR (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -170,8 +171,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device.+-- - @physicalDevice@ is the physical device. -- -- - @queueFamilyIndex@ is the queue family index. --@@ -192,8 +192,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceXlibPresentationSupportKHR :: PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> ("dpy" ::: Ptr Display) -> VisualID -> IO (Bool)-getPhysicalDeviceXlibPresentationSupportKHR physicalDevice queueFamilyIndex dpy visualID = do+getPhysicalDeviceXlibPresentationSupportKHR :: forall io . MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> ("dpy" ::: Ptr Display) -> VisualID -> io (Bool)+getPhysicalDeviceXlibPresentationSupportKHR physicalDevice queueFamilyIndex dpy visualID = liftIO $ do let vkGetPhysicalDeviceXlibPresentationSupportKHR' = mkVkGetPhysicalDeviceXlibPresentationSupportKHR (pVkGetPhysicalDeviceXlibPresentationSupportKHR (instanceCmds (physicalDevice :: PhysicalDevice))) r <- vkGetPhysicalDeviceXlibPresentationSupportKHR' (physicalDeviceHandle (physicalDevice)) (queueFamilyIndex) (dpy) (visualID) pure $ ((bool32ToBool r))@@ -209,12 +209,12 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'XlibSurfaceCreateFlagsKHR', 'createXlibSurfaceKHR' data XlibSurfaceCreateInfoKHR = XlibSurfaceCreateInfoKHR- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: XlibSurfaceCreateFlagsKHR , -- | @dpy@ /must/ point to a valid Xlib -- 'Graphics.Vulkan.Extensions.WSITypes.Display'. dpy :: Ptr Display- , -- | 'Graphics.Vulkan.Extensions.WSITypes.Window' /must/ be a valid Xlib+ , -- | @window@ /must/ be a valid Xlib -- 'Graphics.Vulkan.Extensions.WSITypes.Window'. window :: Window }
src/Graphics/Vulkan/Extensions/VK_MVK_ios_surface.hs view
@@ -10,6 +10,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -28,6 +29,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -74,8 +76,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance with which--- to associate the surface.+-- - @instance@ is the instance with which to associate the surface. -- -- - @pCreateInfo@ is a pointer to a 'IOSSurfaceCreateInfoMVK' structure -- containing parameters affecting the creation of the surface object.@@ -91,7 +92,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -124,8 +125,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'IOSSurfaceCreateInfoMVK', 'Graphics.Vulkan.Core10.Handles.Instance', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-createIOSSurfaceMVK :: Instance -> IOSSurfaceCreateInfoMVK -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SurfaceKHR)-createIOSSurfaceMVK instance' createInfo allocator = evalContT $ do+createIOSSurfaceMVK :: forall io . MonadIO io => Instance -> IOSSurfaceCreateInfoMVK -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)+createIOSSurfaceMVK instance' createInfo allocator = liftIO . evalContT $ do let vkCreateIOSSurfaceMVK' = mkVkCreateIOSSurfaceMVK (pVkCreateIOSSurfaceMVK (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -149,7 +150,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createIOSSurfaceMVK' data IOSSurfaceCreateInfoMVK = IOSSurfaceCreateInfoMVK- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: IOSSurfaceCreateFlagsMVK , -- | @pView@ /must/ be a valid @UIView@ and /must/ be backed by a @CALayer@ -- instance of type 'Graphics.Vulkan.Extensions.WSITypes.CAMetalLayer'.
src/Graphics/Vulkan/Extensions/VK_MVK_macos_surface.hs view
@@ -10,6 +10,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -28,6 +29,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -75,8 +77,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance with which--- to associate the surface.+-- - @instance@ is the instance with which to associate the surface. -- -- - @pCreateInfo@ is a pointer to a 'MacOSSurfaceCreateInfoMVK' -- structure containing parameters affecting the creation of the@@ -93,7 +94,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -126,8 +127,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Instance', 'MacOSSurfaceCreateInfoMVK', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR'-createMacOSSurfaceMVK :: Instance -> MacOSSurfaceCreateInfoMVK -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SurfaceKHR)-createMacOSSurfaceMVK instance' createInfo allocator = evalContT $ do+createMacOSSurfaceMVK :: forall io . MonadIO io => Instance -> MacOSSurfaceCreateInfoMVK -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)+createMacOSSurfaceMVK instance' createInfo allocator = liftIO . evalContT $ do let vkCreateMacOSSurfaceMVK' = mkVkCreateMacOSSurfaceMVK (pVkCreateMacOSSurfaceMVK (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -151,7 +152,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createMacOSSurfaceMVK' data MacOSSurfaceCreateInfoMVK = MacOSSurfaceCreateInfoMVK- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: MacOSSurfaceCreateFlagsMVK , -- | @pView@ /must/ be a valid @NSView@ and /must/ be backed by a @CALayer@ -- instance of type 'Graphics.Vulkan.Extensions.WSITypes.CAMetalLayer'.
src/Graphics/Vulkan/Extensions/VK_NN_vi_surface.hs view
@@ -10,6 +10,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -28,6 +29,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -75,8 +77,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Instance' is the instance with which--- to associate the surface.+-- - @instance@ is the instance with which to associate the surface. -- -- - @pCreateInfo@ is a pointer to a 'ViSurfaceCreateInfoNN' structure -- containing parameters affecting the creation of the surface object.@@ -108,7 +109,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Instance' /must/ be a valid+-- - @instance@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Instance' handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid@@ -141,8 +142,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Instance', -- 'Graphics.Vulkan.Extensions.Handles.SurfaceKHR', 'ViSurfaceCreateInfoNN'-createViSurfaceNN :: Instance -> ViSurfaceCreateInfoNN -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (SurfaceKHR)-createViSurfaceNN instance' createInfo allocator = evalContT $ do+createViSurfaceNN :: forall io . MonadIO io => Instance -> ViSurfaceCreateInfoNN -> ("allocator" ::: Maybe AllocationCallbacks) -> io (SurfaceKHR)+createViSurfaceNN instance' createInfo allocator = liftIO . evalContT $ do let vkCreateViSurfaceNN' = mkVkCreateViSurfaceNN (pVkCreateViSurfaceNN (instanceCmds (instance' :: Instance))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -165,10 +166,9 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'ViSurfaceCreateFlagsNN', 'createViSurfaceNN' data ViSurfaceCreateInfoNN = ViSurfaceCreateInfoNN- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: ViSurfaceCreateFlagsNN- , -- | 'Graphics.Vulkan.Extensions.WSITypes.Window' /must/ be a valid- -- @nn@::@vi@::@NativeWindowHandle@+ , -- | @window@ /must/ be a valid @nn@::@vi@::@NativeWindowHandle@ window :: Ptr () } deriving (Typeable)
src/Graphics/Vulkan/Extensions/VK_NVX_device_generated_commands.hs view
@@ -65,6 +65,7 @@ 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)@@ -87,6 +88,7 @@ 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)@@ -173,8 +175,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the primary--- command buffer in which the generation process takes space.+-- - @commandBuffer@ is the primary command buffer in which the+-- generation process takes space. -- -- - @pProcessCommandsInfo@ is a pointer to a 'CmdProcessCommandsInfoNVX' -- structure containing parameters affecting the processing of@@ -182,29 +184,27 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pProcessCommandsInfo@ /must/ be a valid pointer to a valid -- 'CmdProcessCommandsInfoNVX' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations -- -- - This command /must/ only be called inside of a render pass instance -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -221,8 +221,8 @@ -- -- 'CmdProcessCommandsInfoNVX', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdProcessCommandsNVX :: CommandBuffer -> CmdProcessCommandsInfoNVX -> IO ()-cmdProcessCommandsNVX commandBuffer processCommandsInfo = evalContT $ do+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@@ -241,9 +241,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the secondary--- command buffer in which the space for device-generated commands is--- reserved.+-- - @commandBuffer@ is the secondary command buffer in which the space+-- for device-generated commands is reserved. -- -- - @pProcessCommandsInfo@ is a pointer to a -- 'CmdReserveSpaceForCommandsInfoNVX' structure containing parameters@@ -251,42 +250,39 @@ -- -- == Valid Usage ----- - The provided 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- not have had a prior space reservation since its creation or the--- last reset.+-- - The provided @commandBuffer@ /must/ not have had a prior space+-- reservation since its creation or the last reset. ----- - The state of the 'Graphics.Vulkan.Core10.Handles.CommandBuffer'--- /must/ be legal to execute all commands within the sequence provided--- by the @indirectCommandsLayout@ member of @pProcessCommandsInfo@.+-- - The state of the @commandBuffer@ /must/ be legal to execute all+-- commands within the sequence provided by the+-- @indirectCommandsLayout@ member of @pProcessCommandsInfo@. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pReserveSpaceInfo@ /must/ be a valid pointer to a valid -- 'CmdReserveSpaceForCommandsInfoNVX' structure ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, or compute operations+-- @commandBuffer@ was allocated from /must/ support graphics, or+-- compute operations -- -- - This command /must/ only be called inside of a render pass instance ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a secondary+-- - @commandBuffer@ /must/ be a secondary -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -303,8 +299,8 @@ -- -- 'CmdReserveSpaceForCommandsInfoNVX', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdReserveSpaceForCommandsNVX :: CommandBuffer -> ("reserveSpaceInfo" ::: CmdReserveSpaceForCommandsInfoNVX) -> IO ()-cmdReserveSpaceForCommandsNVX commandBuffer reserveSpaceInfo = evalContT $ do+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@@ -323,8 +319,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the indirect command layout.+-- - @device@ is the logical device that creates the indirect command+-- layout. -- -- - @pCreateInfo@ is a pointer to a -- 'IndirectCommandsLayoutCreateInfoNVX' structure containing@@ -340,8 +336,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'IndirectCommandsLayoutCreateInfoNVX' structure@@ -373,8 +369,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'IndirectCommandsLayoutCreateInfoNVX', -- 'Graphics.Vulkan.Extensions.Handles.IndirectCommandsLayoutNVX'-createIndirectCommandsLayoutNVX :: Device -> IndirectCommandsLayoutCreateInfoNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (IndirectCommandsLayoutNVX)-createIndirectCommandsLayoutNVX device createInfo allocator = evalContT $ do+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@@ -390,11 +386,11 @@ -- 'destroyIndirectCommandsLayoutNVX' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withIndirectCommandsLayoutNVX :: Device -> IndirectCommandsLayoutCreateInfoNVX -> Maybe AllocationCallbacks -> (IndirectCommandsLayoutNVX -> IO r) -> IO r-withIndirectCommandsLayoutNVX device indirectCommandsLayoutCreateInfoNVX allocationCallbacks =+withIndirectCommandsLayoutNVX :: forall r . Device -> IndirectCommandsLayoutCreateInfoNVX -> Maybe AllocationCallbacks -> ((IndirectCommandsLayoutNVX) -> IO r) -> IO r+withIndirectCommandsLayoutNVX device pCreateInfo pAllocator = bracket- (createIndirectCommandsLayoutNVX device indirectCommandsLayoutCreateInfoNVX allocationCallbacks)- (\o -> destroyIndirectCommandsLayoutNVX device o allocationCallbacks)+ (createIndirectCommandsLayoutNVX device pCreateInfo pAllocator)+ (\(o0) -> destroyIndirectCommandsLayoutNVX device o0 pAllocator) foreign import ccall@@ -408,8 +404,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the layout.+-- - @device@ is the logical device that destroys the layout. -- -- - @indirectCommandsLayout@ is the table to destroy. --@@ -433,8 +428,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @indirectCommandsLayout@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.IndirectCommandsLayoutNVX'@@ -446,15 +441,15 @@ -- structure -- -- - @indirectCommandsLayout@ /must/ have been created, allocated, or--- retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- retrieved from @device@ -- -- = See Also -- -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.Handles.IndirectCommandsLayoutNVX'-destroyIndirectCommandsLayoutNVX :: Device -> IndirectCommandsLayoutNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyIndirectCommandsLayoutNVX device indirectCommandsLayout allocator = evalContT $ do+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@@ -474,8 +469,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the object table.+-- - @device@ is the logical device that creates the object table. -- -- - @pCreateInfo@ is a pointer to a 'ObjectTableCreateInfoNVX' structure -- containing parameters affecting creation of the table.@@ -490,8 +484,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'ObjectTableCreateInfoNVX' structure@@ -521,8 +515,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', 'ObjectTableCreateInfoNVX', -- 'Graphics.Vulkan.Extensions.Handles.ObjectTableNVX'-createObjectTableNVX :: Device -> ObjectTableCreateInfoNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (ObjectTableNVX)-createObjectTableNVX device createInfo allocator = evalContT $ do+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@@ -538,11 +532,11 @@ -- using 'bracket' -- -- The allocated value must not be returned from the provided computation-withObjectTableNVX :: Device -> ObjectTableCreateInfoNVX -> Maybe AllocationCallbacks -> (ObjectTableNVX -> IO r) -> IO r-withObjectTableNVX device objectTableCreateInfoNVX allocationCallbacks =+withObjectTableNVX :: forall r . Device -> ObjectTableCreateInfoNVX -> Maybe AllocationCallbacks -> ((ObjectTableNVX) -> IO r) -> IO r+withObjectTableNVX device pCreateInfo pAllocator = bracket- (createObjectTableNVX device objectTableCreateInfoNVX allocationCallbacks)- (\o -> destroyObjectTableNVX device o allocationCallbacks)+ (createObjectTableNVX device pCreateInfo pAllocator)+ (\(o0) -> destroyObjectTableNVX device o0 pAllocator) foreign import ccall@@ -556,8 +550,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the table.+-- - @device@ is the logical device that destroys the table. -- -- - @objectTable@ is the table to destroy. --@@ -581,8 +574,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @objectTable@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.ObjectTableNVX' handle@@ -593,7 +586,7 @@ -- structure -- -- - @objectTable@ /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- @device@ -- -- == Host Synchronization --@@ -604,8 +597,8 @@ -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Extensions.Handles.ObjectTableNVX'-destroyObjectTableNVX :: Device -> ObjectTableNVX -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyObjectTableNVX device objectTable allocator = evalContT $ do+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@@ -625,8 +618,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the object table.+-- - @device@ is the logical device that creates the object table. -- -- - @objectTable@ is the table for which the resources are registered. --@@ -655,8 +647,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @objectTable@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.ObjectTableNVX' handle@@ -670,7 +662,7 @@ -- - @objectCount@ /must/ be greater than @0@ -- -- - @objectTable@ /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- @device@ -- -- == Host Synchronization --@@ -692,8 +684,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'ObjectTableEntryNVX', -- 'Graphics.Vulkan.Extensions.Handles.ObjectTableNVX'-registerObjectsNVX :: Device -> ObjectTableNVX -> ("objectTableEntries" ::: Vector ObjectTableEntryNVX) -> ("objectIndices" ::: Vector Word32) -> IO ()-registerObjectsNVX device objectTable objectTableEntries objectIndices = evalContT $ do+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)@@ -710,13 +702,11 @@ -- | A safe wrapper for 'registerObjectsNVX' and 'unregisterObjectsNVX' using -- 'bracket_'------ The allocated value must not be returned from the provided computation-withRegisteredObjectsNVX :: Device -> ObjectTableNVX -> Vector ObjectTableEntryNVX -> Vector Word32 -> Vector ObjectEntryTypeNVX -> IO r -> IO r-withRegisteredObjectsNVX device objectTableNVX objectTableEntryNVX objectIndices objectEntryTypeNVX =+withRegisteredObjectsNVX :: forall r . Device -> ObjectTableNVX -> Vector ObjectTableEntryNVX -> Vector Word32 -> Vector ObjectEntryTypeNVX -> IO r -> IO r+withRegisteredObjectsNVX device objectTable ppObjectTableEntries pObjectIndices pObjectEntryTypes = bracket_- (registerObjectsNVX device objectTableNVX objectTableEntryNVX objectIndices)- ( unregisterObjectsNVX device objectTableNVX objectEntryTypeNVX objectIndices)+ (registerObjectsNVX device objectTable ppObjectTableEntries pObjectIndices)+ (unregisterObjectsNVX device objectTable pObjectEntryTypes pObjectIndices) foreign import ccall@@ -730,8 +720,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the object table.+-- - @device@ is the logical device that creates the object table. -- -- - @objectTable@ is the table from which the resources are -- unregistered.@@ -757,8 +746,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @objectTable@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.ObjectTableNVX' handle@@ -772,7 +761,7 @@ -- - @objectCount@ /must/ be greater than @0@ -- -- - @objectTable@ /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- @device@ -- -- == Host Synchronization --@@ -794,8 +783,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'ObjectEntryTypeNVX', -- 'Graphics.Vulkan.Extensions.Handles.ObjectTableNVX'-unregisterObjectsNVX :: Device -> ObjectTableNVX -> ("objectEntryTypes" ::: Vector ObjectEntryTypeNVX) -> ("objectIndices" ::: Vector Word32) -> IO ()-unregisterObjectsNVX device objectTable objectEntryTypes objectIndices = evalContT $ do+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)@@ -821,8 +810,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the handle to the--- physical device whose properties will be queried.+-- - @physicalDevice@ is the handle to the physical device whose+-- properties will be queried. -- -- - @pFeatures@ is a pointer to a 'DeviceGeneratedCommandsFeaturesNVX' -- structure in which features are returned.@@ -837,8 +826,8 @@ -- 'DeviceGeneratedCommandsFeaturesNVX', -- 'DeviceGeneratedCommandsLimitsNVX', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceGeneratedCommandsPropertiesNVX :: PhysicalDevice -> IO (DeviceGeneratedCommandsFeaturesNVX, DeviceGeneratedCommandsLimitsNVX)-getPhysicalDeviceGeneratedCommandsPropertiesNVX physicalDevice = evalContT $ do+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)@@ -982,8 +971,7 @@ -- -- == Valid Usage ----- - The 'Graphics.Vulkan.Core10.Handles.Buffer'’s usage flag /must/ have--- the+-- - The @buffer@’s usage flag /must/ have the -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT' -- bit set. --@@ -994,8 +982,8 @@ -- -- - @tokenType@ /must/ be a valid 'IndirectCommandsTokenTypeNVX' value ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle -- -- = See Also --@@ -1005,12 +993,11 @@ data IndirectCommandsTokenNVX = IndirectCommandsTokenNVX { -- | @tokenType@ specifies the token command type. tokenType :: IndirectCommandsTokenTypeNVX- , -- | 'Graphics.Vulkan.Core10.Handles.Buffer' specifies the- -- 'Graphics.Vulkan.Core10.Handles.Buffer' storing the functional arguments- -- for each squence. These argumetns can be written by the device.+ , -- | @buffer@ specifies the 'Graphics.Vulkan.Core10.Handles.Buffer' storing+ -- the functional arguments for each squence. These argumetns can be+ -- written by the device. buffer :: Buffer- , -- | @offset@ specified an offset into- -- 'Graphics.Vulkan.Core10.Handles.Buffer' where the arguments start.+ , -- | @offset@ specified an offset into @buffer@ where the arguments start. offset :: DeviceSize } deriving (Typeable)@@ -1146,9 +1133,7 @@ -- -- - If the -- 'DeviceGeneratedCommandsFeaturesNVX'::@computeBindingPointSupport@--- feature is not enabled, then--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- /must/ not be+-- feature is not enabled, then @pipelineBindPoint@ /must/ not be -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PIPELINE_BIND_POINT_COMPUTE' -- -- - If @pTokens@ contains an entry of@@ -1162,8 +1147,7 @@ -- 'INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX'). -- -- - The content of @pTokens@ /must/ include one single work provoking--- token that is compatible with the--- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'.+-- token that is compatible with the @pipelineBindPoint@. -- -- == Valid Usage (Implicit) --@@ -1172,15 +1156,14 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'--- /must/ be a valid+-- - @pipelineBindPoint@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' -- value ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of 'IndirectCommandsLayoutUsageFlagBitsNVX' values+-- - @flags@ /must/ be a valid combination of+-- 'IndirectCommandsLayoutUsageFlagBitsNVX' values ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not be @0@+-- - @flags@ /must/ not be @0@ -- -- - @pTokens@ /must/ be a valid pointer to an array of @tokenCount@ -- valid 'IndirectCommandsLayoutTokenNVX' structures@@ -1194,13 +1177,12 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'createIndirectCommandsLayoutNVX' data IndirectCommandsLayoutCreateInfoNVX = IndirectCommandsLayoutCreateInfoNVX- { -- | 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' is- -- the 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint'- -- that this layout targets.+ { -- | @pipelineBindPoint@ is the+ -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' that+ -- this layout targets. pipelineBindPoint :: PipelineBindPoint- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of- -- 'IndirectCommandsLayoutUsageFlagBitsNVX' specifying usage hints of this- -- layout.+ , -- | @flags@ is a bitmask of 'IndirectCommandsLayoutUsageFlagBitsNVX'+ -- specifying usage hints of this layout. flags :: IndirectCommandsLayoutUsageFlagsNVX , -- | @pTokens@ is an array describing each command token in detail. See -- 'IndirectCommandsTokenTypeNVX' and 'IndirectCommandsLayoutTokenNVX'@@ -1728,17 +1710,17 @@ -- -- - If the -- 'DeviceGeneratedCommandsFeaturesNVX'::@computeBindingPointSupport@--- feature is not enabled, 'Graphics.Vulkan.Core10.BaseType.Flags'--- /must/ not contain 'OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX'+-- feature is not enabled, @flags@ /must/ not contain+-- 'OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX' -- -- == Valid Usage (Implicit) -- -- - @type@ /must/ be a valid 'ObjectEntryTypeNVX' value ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of 'ObjectEntryUsageFlagBitsNVX' values+-- - @flags@ /must/ be a valid combination of+-- 'ObjectEntryUsageFlagBitsNVX' values ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not be @0@+-- - @flags@ /must/ not be @0@ -- -- = See Also --@@ -1746,7 +1728,7 @@ data ObjectTableEntryNVX = ObjectTableEntryNVX { -- | @type@ defines the entry type type' :: ObjectEntryTypeNVX- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' defines which+ , -- | @flags@ defines which -- 'Graphics.Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' the -- resource can be used with. Some entry types allow only a single flag to -- be set.@@ -1799,10 +1781,10 @@ data ObjectTablePipelineEntryNVX = ObjectTablePipelineEntryNVX { -- | @type@ /must/ be a valid 'ObjectEntryTypeNVX' value type' :: ObjectEntryTypeNVX- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not be @0@+ , -- | @flags@ /must/ not be @0@ flags :: ObjectEntryUsageFlagsNVX- , -- | 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ be a valid- -- 'Graphics.Vulkan.Core10.Handles.Pipeline' handle+ , -- | @pipeline@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Pipeline'+ -- handle pipeline :: Pipeline } deriving (Typeable)@@ -1855,19 +1837,18 @@ -- -- - @type@ /must/ be a valid 'ObjectEntryTypeNVX' value ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of 'ObjectEntryUsageFlagBitsNVX' values+-- - @flags@ /must/ be a valid combination of+-- 'ObjectEntryUsageFlagBitsNVX' values ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not be @0@+-- - @flags@ /must/ not be @0@ ----- - 'Graphics.Vulkan.Core10.Handles.PipelineLayout' /must/ be a valid+-- - @pipelineLayout@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' handle ----- - 'Graphics.Vulkan.Core10.Handles.DescriptorSet' /must/ be a valid+-- - @descriptorSet@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.DescriptorSet' handle ----- - Both of 'Graphics.Vulkan.Core10.Handles.DescriptorSet', and--- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' /must/ have been+-- - Both of @descriptorSet@, and @pipelineLayout@ /must/ have been -- created, allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Device' --@@ -1881,11 +1862,11 @@ type' :: ObjectEntryTypeNVX , -- No documentation found for Nested "VkObjectTableDescriptorSetEntryNVX" "flags" flags :: ObjectEntryUsageFlagsNVX- , -- | 'Graphics.Vulkan.Core10.Handles.PipelineLayout' specifies the- -- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that the- -- 'Graphics.Vulkan.Core10.Handles.DescriptorSet' is used with.+ , -- | @pipelineLayout@ specifies the+ -- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' that the @descriptorSet@+ -- is used with. pipelineLayout :: PipelineLayout- , -- | 'Graphics.Vulkan.Core10.Handles.DescriptorSet' specifies the+ , -- | @descriptorSet@ specifies the -- 'Graphics.Vulkan.Core10.Handles.DescriptorSet' that can be bound with -- this entry. descriptorSet :: DescriptorSet@@ -1945,10 +1926,10 @@ data ObjectTableVertexBufferEntryNVX = ObjectTableVertexBufferEntryNVX { -- | @type@ /must/ be a valid 'ObjectEntryTypeNVX' value type' :: ObjectEntryTypeNVX- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not be @0@+ , -- | @flags@ /must/ not be @0@ flags :: ObjectEntryUsageFlagsNVX- , -- | 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid- -- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+ , -- | @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+ -- handle buffer :: Buffer } deriving (Typeable)@@ -2003,12 +1984,12 @@ data ObjectTableIndexBufferEntryNVX = ObjectTableIndexBufferEntryNVX { -- | @type@ /must/ be a valid 'ObjectEntryTypeNVX' value type' :: ObjectEntryTypeNVX- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not be @0@+ , -- | @flags@ /must/ not be @0@ flags :: ObjectEntryUsageFlagsNVX- , -- | 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid- -- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+ , -- | @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+ -- handle buffer :: Buffer- , -- | 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' /must/ be a valid+ , -- | @indexType@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' value indexType :: IndexType }@@ -2068,9 +2049,9 @@ data ObjectTablePushConstantEntryNVX = ObjectTablePushConstantEntryNVX { -- | @type@ /must/ be a valid 'ObjectEntryTypeNVX' value type' :: ObjectEntryTypeNVX- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ not be @0@+ , -- | @flags@ /must/ not be @0@ flags :: ObjectEntryUsageFlagsNVX- , -- | 'Graphics.Vulkan.Core10.Handles.PipelineLayout' /must/ be a valid+ , -- | @pipelineLayout@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PipelineLayout' handle pipelineLayout :: PipelineLayout , -- | @stageFlags@ /must/ not be @0@
src/Graphics/Vulkan/Extensions/VK_NVX_image_view_handle.hs view
@@ -7,11 +7,13 @@ , pattern NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Ptr (nullPtr) import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -49,8 +51,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the image view.+-- - @device@ is the logical device that owns the image view. -- -- - @pInfo@ describes the image view to query and type of handle. --@@ -59,8 +60,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.Device', 'ImageViewHandleInfoNVX'-getImageViewHandleNVX :: Device -> ImageViewHandleInfoNVX -> IO (Word32)-getImageViewHandleNVX device info = evalContT $ do+getImageViewHandleNVX :: forall io . MonadIO io => Device -> ImageViewHandleInfoNVX -> io (Word32)+getImageViewHandleNVX device info = liftIO . evalContT $ do let vkGetImageViewHandleNVX' = mkVkGetImageViewHandleNVX (pVkGetImageViewHandleNVX (deviceCmds (device :: Device))) pInfo <- ContT $ withCStruct (info) r <- lift $ vkGetImageViewHandleNVX' (deviceHandle (device)) pInfo@@ -72,31 +73,29 @@ -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' /must/--- be+-- - @descriptorType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE', -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE', -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER' ----- - 'Graphics.Vulkan.Core10.Handles.Sampler' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Sampler' if--- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is+-- - @sampler@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Sampler'+-- if @descriptorType@ is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER' -- -- - If descriptorType is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE' -- or -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',--- the image that 'Graphics.Vulkan.Core10.Handles.ImageView' was--- created from /must/ have been created with the+-- the image that @imageView@ was created from /must/ have been created+-- with the -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT' -- usage bit set -- -- - If descriptorType is -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE',--- the image that 'Graphics.Vulkan.Core10.Handles.ImageView' was--- created from /must/ have been created with the+-- the image that @imageView@ was created from /must/ have been created+-- with the -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_STORAGE_BIT' -- usage bit set --@@ -107,20 +106,17 @@ -- -- - @pNext@ /must/ be @NULL@ ----- - 'Graphics.Vulkan.Core10.Handles.ImageView' /must/ be a valid+-- - @imageView@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.ImageView' handle ----- - 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' /must/--- be a valid+-- - @descriptorType@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' value ----- - If 'Graphics.Vulkan.Core10.Handles.Sampler' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Sampler' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Sampler' handle+-- - If @sampler@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @sampler@ /must/+-- be a valid 'Graphics.Vulkan.Core10.Handles.Sampler' handle ----- - Both of 'Graphics.Vulkan.Core10.Handles.ImageView', and--- 'Graphics.Vulkan.Core10.Handles.Sampler' that are valid handles of+-- - Both of @imageView@, and @sampler@ that are valid handles of -- non-ignored parameters /must/ have been created, allocated, or -- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device' --@@ -132,13 +128,12 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'getImageViewHandleNVX' data ImageViewHandleInfoNVX = ImageViewHandleInfoNVX- { -- | 'Graphics.Vulkan.Core10.Handles.ImageView' is the image view to query.+ { -- | @imageView@ is the image view to query. imageView :: ImageView- , -- | 'Graphics.Vulkan.Core10.Enums.DescriptorType.DescriptorType' is the type- -- of descriptor for which to query a handle.+ , -- | @descriptorType@ is the type of descriptor for which to query a handle. descriptorType :: DescriptorType- , -- | 'Graphics.Vulkan.Core10.Handles.Sampler' is the sampler to combine with- -- the image view when generating the handle.+ , -- | @sampler@ is the sampler to combine with the image view when generating+ -- the handle. sampler :: Sampler } deriving (Typeable)
src/Graphics/Vulkan/Extensions/VK_NV_clip_space_w_scaling.hs view
@@ -8,6 +8,7 @@ , pattern NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Utils (maybePeek) import Foreign.Ptr (nullPtr)@@ -17,6 +18,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Either (Either) import Data.String (IsString) import Data.Typeable (Typeable)@@ -60,8 +62,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @firstViewport@ is the index of the first viewport whose parameters -- are updated by the command.@@ -90,29 +92,27 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pViewportWScalings@ /must/ be a valid pointer to an array of -- @viewportCount@ 'ViewportWScalingNV' structures ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - @viewportCount@ /must/ be greater than @0@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -128,8 +128,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'ViewportWScalingNV'-cmdSetViewportWScalingNV :: CommandBuffer -> ("firstViewport" ::: Word32) -> ("viewportWScalings" ::: Vector ViewportWScalingNV) -> IO ()-cmdSetViewportWScalingNV commandBuffer firstViewport viewportWScalings = evalContT $ do+cmdSetViewportWScalingNV :: forall io . MonadIO io => CommandBuffer -> ("firstViewport" ::: Word32) -> ("viewportWScalings" ::: Vector ViewportWScalingNV) -> io ()+cmdSetViewportWScalingNV commandBuffer firstViewport viewportWScalings = liftIO . evalContT $ do let vkCmdSetViewportWScalingNV' = mkVkCmdSetViewportWScalingNV (pVkCmdSetViewportWScalingNV (deviceCmds (commandBuffer :: CommandBuffer))) pPViewportWScalings <- ContT $ allocaBytesAligned @ViewportWScalingNV ((Data.Vector.length (viewportWScalings)) * 8) 4 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPViewportWScalings `plusPtr` (8 * (i)) :: Ptr ViewportWScalingNV) (e) . ($ ())) (viewportWScalings)
src/Graphics/Vulkan/Extensions/VK_NV_cooperative_matrix.hs view
@@ -29,6 +29,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -48,6 +49,7 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Data.Vector (generateM)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -99,8 +101,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device.+-- - @physicalDevice@ is the physical device. -- -- - @pPropertyCount@ is a pointer to an integer related to the number of -- cooperative matrix properties available or queried.@@ -125,7 +126,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pPropertyCount@ /must/ be a valid pointer to a @uint32_t@ value@@ -153,8 +154,8 @@ -- -- 'CooperativeMatrixPropertiesNV', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceCooperativeMatrixPropertiesNV :: PhysicalDevice -> IO (Result, ("properties" ::: Vector CooperativeMatrixPropertiesNV))-getPhysicalDeviceCooperativeMatrixPropertiesNV physicalDevice = evalContT $ do+getPhysicalDeviceCooperativeMatrixPropertiesNV :: forall io . MonadIO io => PhysicalDevice -> io (Result, ("properties" ::: Vector CooperativeMatrixPropertiesNV))+getPhysicalDeviceCooperativeMatrixPropertiesNV physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceCooperativeMatrixPropertiesNV' = mkVkGetPhysicalDeviceCooperativeMatrixPropertiesNV (pVkGetPhysicalDeviceCooperativeMatrixPropertiesNV (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPPropertyCount <- ContT $ bracket (callocBytes @Word32 4) free
src/Graphics/Vulkan/Extensions/VK_NV_corner_sampled_image.hs view
@@ -53,8 +53,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PhysicalDeviceCornerSampledImageFeaturesNV = PhysicalDeviceCornerSampledImageFeaturesNV { -- | @cornerSampledImage@ specifies whether images can be created with a- -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'- -- containing+ -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'. -- See -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-images-corner-sampled Corner-Sampled Images>.
src/Graphics/Vulkan/Extensions/VK_NV_coverage_reduction_mode.hs view
@@ -15,6 +15,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -35,6 +36,7 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Data.Vector (generateM)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -89,8 +91,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the set of combinations.+-- - @physicalDevice@ is the physical device from which to query the set+-- of combinations. -- -- - @pCombinationCount@ is a pointer to an integer related to the number -- of combinations available or queried, as described below.@@ -103,21 +105,21 @@ -- = Description -- -- If @pCombinations@ is @NULL@, then the number of supported combinations--- for the given 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is--- returned in @pCombinationCount@. Otherwise, @pCombinationCount@ /must/--- point to a variable set by the user to the number of elements in the--- @pCombinations@ array, and on return the variable is overwritten with--- the number of values actually written to @pCombinations@. If the value--- of @pCombinationCount@ is less than the number of combinations supported--- for the given 'Graphics.Vulkan.Core10.Handles.PhysicalDevice', at most--- @pCombinationCount@ values will be written @pCombinations@ and--- 'Graphics.Vulkan.Core10.Enums.Result.INCOMPLETE' will be returned--- instead of 'Graphics.Vulkan.Core10.Enums.Result.SUCCESS' to indicate--- that not all the supported values were returned.+-- for the given @physicalDevice@ is returned in @pCombinationCount@.+-- Otherwise, @pCombinationCount@ /must/ point to a variable set by the+-- user to the number of elements in the @pCombinations@ array, and on+-- return the variable is overwritten with the number of values actually+-- written to @pCombinations@. If the value of @pCombinationCount@ is less+-- than the number of combinations supported for the given+-- @physicalDevice@, at most @pCombinationCount@ values will be written+-- @pCombinations@ and 'Graphics.Vulkan.Core10.Enums.Result.INCOMPLETE'+-- will be returned instead of+-- 'Graphics.Vulkan.Core10.Enums.Result.SUCCESS' to indicate that not all+-- the supported values were returned. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' /must/ be a valid+-- - @physicalDevice@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' handle -- -- - @pCombinationCount@ /must/ be a valid pointer to a @uint32_t@ value@@ -145,8 +147,8 @@ -- -- 'FramebufferMixedSamplesCombinationNV', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV :: PhysicalDevice -> IO (Result, ("combinations" ::: Vector FramebufferMixedSamplesCombinationNV))-getPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV physicalDevice = evalContT $ do+getPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV :: forall io . MonadIO io => PhysicalDevice -> io (Result, ("combinations" ::: Vector FramebufferMixedSamplesCombinationNV))+getPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV physicalDevice = liftIO . evalContT $ do let vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV' = mkVkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV (pVkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV (instanceCmds (physicalDevice :: PhysicalDevice))) let physicalDevice' = physicalDeviceHandle (physicalDevice) pPCombinationCount <- ContT $ bracket (callocBytes @Word32 4) free@@ -252,7 +254,7 @@ -- - @sType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV' ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - @coverageReductionMode@ /must/ be a valid 'CoverageReductionModeNV' -- value@@ -263,7 +265,7 @@ -- 'PipelineCoverageReductionStateCreateFlagsNV', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PipelineCoverageReductionStateCreateInfoNV = PipelineCoverageReductionStateCreateInfoNV- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ { -- | @flags@ is reserved for future use. flags :: PipelineCoverageReductionStateCreateFlagsNV , -- | @coverageReductionMode@ is a 'CoverageReductionModeNV' value controlling -- how the /color sample mask/ is generated from the coverage mask.
src/Graphics/Vulkan/Extensions/VK_NV_dedicated_allocation.hs view
@@ -46,8 +46,8 @@ -- == Valid Usage -- -- - If @dedicatedAllocation@ is 'Graphics.Vulkan.Core10.BaseType.TRUE',--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- /must/ not include+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ /must/ not+-- include -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_BINDING_BIT', -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SPARSE_RESIDENCY_BIT', -- or@@ -154,50 +154,43 @@ -- -- == Valid Usage ----- - At least one of 'Graphics.Vulkan.Core10.Handles.Image' and--- 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be+-- - At least one of @image@ and @buffer@ /must/ be -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', the image /must/--- have been created with+-- - If @image@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- the image /must/ have been created with -- 'DedicatedAllocationImageCreateInfoNV'::@dedicatedAllocation@ equal -- to 'Graphics.Vulkan.Core10.BaseType.TRUE' ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is not+-- - If @buffer@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', the buffer /must/ -- have been created with -- 'DedicatedAllocationBufferCreateInfoNV'::@dedicatedAllocation@ equal -- to 'Graphics.Vulkan.Core10.BaseType.TRUE' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- - If @image@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', -- 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo'::@allocationSize@ -- /must/ equal the -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements'::@size@ -- of the image ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is not+-- - If @buffer@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', -- 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo'::@allocationSize@ -- /must/ equal the -- 'Graphics.Vulkan.Core10.MemoryManagement.MemoryRequirements'::@size@ -- of the buffer ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' and--- 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' defines a memory--- import operation, the memory being imported /must/ also be a--- dedicated image allocation and--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ be identical to the+-- - If @image@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'+-- and 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' defines a+-- memory import operation, the memory being imported /must/ also be a+-- dedicated image allocation and @image@ /must/ be identical to the -- image associated with the imported memory. ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' and--- 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' defines a memory--- import operation, the memory being imported /must/ also be a--- dedicated buffer allocation and--- 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be identical to the+-- - If @buffer@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE'+-- and 'Graphics.Vulkan.Core10.Memory.MemoryAllocateInfo' defines a+-- memory import operation, the memory being imported /must/ also be a+-- dedicated buffer allocation and @buffer@ /must/ be identical to the -- buffer associated with the imported memory. -- -- == Valid Usage (Implicit)@@ -205,20 +198,17 @@ -- - @sType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV' ----- - If 'Graphics.Vulkan.Core10.Handles.Image' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Image' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Image' handle+-- - If @image@ is not 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',+-- @image@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Image'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - If @buffer@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @buffer@ /must/+-- be a valid 'Graphics.Vulkan.Core10.Handles.Buffer' handle ----- - Both of 'Graphics.Vulkan.Core10.Handles.Buffer', and--- 'Graphics.Vulkan.Core10.Handles.Image' that are valid handles of--- non-ignored parameters /must/ have been created, allocated, or--- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Both of @buffer@, and @image@ that are valid handles of non-ignored+-- parameters /must/ have been created, allocated, or retrieved from+-- the same 'Graphics.Vulkan.Core10.Handles.Device' -- -- = See Also --@@ -226,13 +216,11 @@ -- 'Graphics.Vulkan.Core10.Handles.Image', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data DedicatedAllocationMemoryAllocateInfoNV = DedicatedAllocationMemoryAllocateInfoNV- { -- | 'Graphics.Vulkan.Core10.Handles.Image' is- -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a handle of an- -- image which this memory will be bound to.+ { -- | @image@ is 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a handle+ -- of an image which this memory will be bound to. image :: Image- , -- | 'Graphics.Vulkan.Core10.Handles.Buffer' is- -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a handle of a- -- buffer which this memory will be bound to.+ , -- | @buffer@ is 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' or a+ -- handle of a buffer which this memory will be bound to. buffer :: Buffer } deriving (Typeable)
src/Graphics/Vulkan/Extensions/VK_NV_device_diagnostic_checkpoints.hs view
@@ -10,6 +10,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -18,6 +19,7 @@ import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT) import Data.Vector (generateM)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -61,29 +63,27 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- that will receive the marker+-- - @commandBuffer@ is the command buffer that will receive the marker -- -- - @pCheckpointMarker@ is an opaque application-provided value that -- will be associated with the checkpoint. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics, compute, or transfer operations+-- @commandBuffer@ was allocated from /must/ support graphics, compute,+-- or transfer operations -- -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -100,8 +100,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdSetCheckpointNV :: CommandBuffer -> ("checkpointMarker" ::: Ptr ()) -> IO ()-cmdSetCheckpointNV commandBuffer checkpointMarker = do+cmdSetCheckpointNV :: forall io . MonadIO io => CommandBuffer -> ("checkpointMarker" ::: Ptr ()) -> io ()+cmdSetCheckpointNV commandBuffer checkpointMarker = liftIO $ do let vkCmdSetCheckpointNV' = mkVkCmdSetCheckpointNV (pVkCmdSetCheckpointNV (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdSetCheckpointNV' (commandBufferHandle (commandBuffer)) (checkpointMarker) pure $ ()@@ -118,9 +118,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Queue' is the--- 'Graphics.Vulkan.Core10.Handles.Queue' object the caller would like--- to retrieve checkpoint data for+-- - @queue@ is the 'Graphics.Vulkan.Core10.Handles.Queue' object the+-- caller would like to retrieve checkpoint data for -- -- - @pCheckpointDataCount@ is a pointer to an integer related to the -- number of checkpoint markers available or queried, as described@@ -144,13 +143,12 @@ -- -- == Valid Usage ----- - The device that 'Graphics.Vulkan.Core10.Handles.Queue' belongs to--- /must/ be in the lost state+-- - The device that @queue@ belongs to /must/ be in the lost state -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Queue' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Queue' handle+-- - @queue@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Queue'+-- handle -- -- - @pCheckpointDataCount@ /must/ be a valid pointer to a @uint32_t@ -- value@@ -163,8 +161,8 @@ -- = See Also -- -- 'CheckpointDataNV', 'Graphics.Vulkan.Core10.Handles.Queue'-getQueueCheckpointDataNV :: Queue -> IO (("checkpointData" ::: Vector CheckpointDataNV))-getQueueCheckpointDataNV queue = evalContT $ do+getQueueCheckpointDataNV :: forall io . MonadIO io => Queue -> io (("checkpointData" ::: Vector CheckpointDataNV))+getQueueCheckpointDataNV queue = liftIO . evalContT $ do let vkGetQueueCheckpointDataNV' = mkVkGetQueueCheckpointDataNV (pVkGetQueueCheckpointDataNV (deviceCmds (queue :: Queue))) let queue' = queueHandle (queue) pPCheckpointDataCount <- ContT $ bracket (callocBytes @Word32 4) free
src/Graphics/Vulkan/Extensions/VK_NV_external_memory_capabilities.hs view
@@ -20,6 +20,7 @@ , pattern NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import GHC.Base (when) import GHC.IO (throwIO)@@ -35,6 +36,7 @@ import Text.ParserCombinators.ReadPrec (step) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Typeable (Typeable)@@ -53,17 +55,15 @@ import Graphics.Vulkan.Core10.Enums.Format (Format(..)) import Graphics.Vulkan.CStruct (FromCStruct) import Graphics.Vulkan.CStruct (FromCStruct(..))-import Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlags)-import Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlags) import Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlagBits(..))+import Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlags) import Graphics.Vulkan.Core10.DeviceInitialization (ImageFormatProperties) import Graphics.Vulkan.Core10.Enums.ImageTiling (ImageTiling) import Graphics.Vulkan.Core10.Enums.ImageTiling (ImageTiling(..)) import Graphics.Vulkan.Core10.Enums.ImageType (ImageType) import Graphics.Vulkan.Core10.Enums.ImageType (ImageType(..))-import Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags)-import Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags) import Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlagBits(..))+import Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits (ImageUsageFlags) import Graphics.Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceExternalImageFormatPropertiesNV)) import Graphics.Vulkan.Core10.Handles (PhysicalDevice) import Graphics.Vulkan.Core10.Handles (PhysicalDevice(..))@@ -88,15 +88,14 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.PhysicalDevice' is the physical--- device from which to query the image capabilities+-- - @physicalDevice@ is the physical device from which to query the+-- image capabilities ----- - 'Graphics.Vulkan.Core10.Enums.Format.Format' is the image format,--- corresponding to--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.Enums.Format.Format'.+-- - @format@ is the image format, corresponding to+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@format@. -- -- - @type@ is the image type, corresponding to--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.Enums.ImageType.ImageType'.+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@imageType@. -- -- - @tiling@ is the image tiling, corresponding to -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@tiling@.@@ -104,9 +103,9 @@ -- - @usage@ is the intended usage of the image, corresponding to -- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@usage@. ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask describing--- additional parameters of the image, corresponding to--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'.+-- - @flags@ is a bitmask describing additional parameters of the image,+-- corresponding to+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@. -- -- - @externalHandleType@ is either one of the bits from -- 'ExternalMemoryHandleTypeFlagBitsNV', or 0.@@ -148,8 +147,8 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageType.ImageType', -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.ImageUsageFlags', -- 'Graphics.Vulkan.Core10.Handles.PhysicalDevice'-getPhysicalDeviceExternalImageFormatPropertiesNV :: PhysicalDevice -> Format -> ImageType -> ImageTiling -> ImageUsageFlags -> ImageCreateFlags -> ("externalHandleType" ::: ExternalMemoryHandleTypeFlagsNV) -> IO (ExternalImageFormatPropertiesNV)-getPhysicalDeviceExternalImageFormatPropertiesNV physicalDevice format type' tiling usage flags externalHandleType = evalContT $ do+getPhysicalDeviceExternalImageFormatPropertiesNV :: forall io . MonadIO io => PhysicalDevice -> Format -> ImageType -> ImageTiling -> ImageUsageFlags -> ImageCreateFlags -> ("externalHandleType" ::: ExternalMemoryHandleTypeFlagsNV) -> io (ExternalImageFormatPropertiesNV)+getPhysicalDeviceExternalImageFormatPropertiesNV physicalDevice format type' tiling usage flags externalHandleType = liftIO . evalContT $ do let vkGetPhysicalDeviceExternalImageFormatPropertiesNV' = mkVkGetPhysicalDeviceExternalImageFormatPropertiesNV (pVkGetPhysicalDeviceExternalImageFormatPropertiesNV (instanceCmds (physicalDevice :: PhysicalDevice))) pPExternalImageFormatProperties <- ContT (withZeroCStruct @ExternalImageFormatPropertiesNV) r <- lift $ vkGetPhysicalDeviceExternalImageFormatPropertiesNV' (physicalDeviceHandle (physicalDevice)) (format) (type') (tiling) (usage) (flags) (externalHandleType) (pPExternalImageFormatProperties)@@ -167,8 +166,7 @@ -- 'Graphics.Vulkan.Core10.DeviceInitialization.ImageFormatProperties', -- 'getPhysicalDeviceExternalImageFormatPropertiesNV' data ExternalImageFormatPropertiesNV = ExternalImageFormatPropertiesNV- { -- | 'Graphics.Vulkan.Core10.DeviceInitialization.ImageFormatProperties' will- -- be filled in as when calling+ { -- | @imageFormatProperties@ will be filled in as when calling -- 'Graphics.Vulkan.Core10.DeviceInitialization.getPhysicalDeviceImageFormatProperties', -- but the values returned /may/ vary depending on the external handle type -- requested.
src/Graphics/Vulkan/Extensions/VK_NV_external_memory_win32.hs view
@@ -14,6 +14,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes) import Foreign.Marshal.Alloc (free)@@ -23,6 +24,7 @@ import Foreign.Ptr (plusPtr) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Cont (evalContT)+import Control.Monad.IO.Class (MonadIO) import Data.String (IsString) import Data.Typeable (Typeable) import Foreign.Storable (Storable)@@ -40,9 +42,8 @@ import Graphics.Vulkan.Core10.Handles (DeviceMemory) import Graphics.Vulkan.Core10.Handles (DeviceMemory(..)) import Graphics.Vulkan.Core10.Handles (Device_T)-import Graphics.Vulkan.Extensions.VK_NV_external_memory_capabilities (ExternalMemoryHandleTypeFlagsNV)-import Graphics.Vulkan.Extensions.VK_NV_external_memory_capabilities (ExternalMemoryHandleTypeFlagsNV) import Graphics.Vulkan.Extensions.VK_NV_external_memory_capabilities (ExternalMemoryHandleTypeFlagBitsNV(..))+import Graphics.Vulkan.Extensions.VK_NV_external_memory_capabilities (ExternalMemoryHandleTypeFlagsNV) import Graphics.Vulkan.CStruct (FromCStruct) import Graphics.Vulkan.CStruct (FromCStruct(..)) import Graphics.Vulkan.Extensions.WSITypes (HANDLE)@@ -74,8 +75,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the memory.+-- - @device@ is the logical device that owns the memory. -- -- - @memory@ is the 'Graphics.Vulkan.Core10.Handles.DeviceMemory' -- object.@@ -105,8 +105,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory', -- 'Graphics.Vulkan.Extensions.VK_NV_external_memory_capabilities.ExternalMemoryHandleTypeFlagsNV'-getMemoryWin32HandleNV :: Device -> DeviceMemory -> ExternalMemoryHandleTypeFlagsNV -> IO (HANDLE)-getMemoryWin32HandleNV device memory handleType = evalContT $ do+getMemoryWin32HandleNV :: forall io . MonadIO io => Device -> DeviceMemory -> ExternalMemoryHandleTypeFlagsNV -> io (HANDLE)+getMemoryWin32HandleNV device memory handleType = liftIO . evalContT $ do let vkGetMemoryWin32HandleNV' = mkVkGetMemoryWin32HandleNV (pVkGetMemoryWin32HandleNV (deviceCmds (device :: Device))) pPHandle <- ContT $ bracket (callocBytes @HANDLE 8) free r <- lift $ vkGetMemoryWin32HandleNV' (deviceHandle (device)) (memory) (handleType) (pPHandle)
src/Graphics/Vulkan/Extensions/VK_NV_fragment_coverage_to_color.hs view
@@ -79,7 +79,7 @@ -- - If @coverageToColorEnable@ is -- 'Graphics.Vulkan.Core10.BaseType.TRUE', then the render pass subpass -- indicated by--- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'::'Graphics.Vulkan.Core10.Handles.RenderPass'+-- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'::@renderPass@ -- and -- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'::@subpass@ -- /must/ have a color attachment at the location selected by@@ -97,7 +97,7 @@ -- - @sType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV' ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- = See Also --@@ -105,7 +105,7 @@ -- 'PipelineCoverageToColorStateCreateFlagsNV', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PipelineCoverageToColorStateCreateInfoNV = PipelineCoverageToColorStateCreateInfoNV- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ { -- | @flags@ is reserved for future use. flags :: PipelineCoverageToColorStateCreateFlagsNV , -- | @coverageToColorEnable@ controls whether the fragment coverage value -- replaces a fragment color output.
src/Graphics/Vulkan/Extensions/VK_NV_framebuffer_mixed_samples.hs view
@@ -126,7 +126,7 @@ -- - @sType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV' ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+-- - @flags@ /must/ be @0@ -- -- - @coverageModulationMode@ /must/ be a valid -- 'CoverageModulationModeNV' value@@ -137,7 +137,7 @@ -- 'PipelineCoverageModulationStateCreateFlagsNV', -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType' data PipelineCoverageModulationStateCreateInfoNV = PipelineCoverageModulationStateCreateInfoNV- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is reserved for future use.+ { -- | @flags@ is reserved for future use. flags :: PipelineCoverageModulationStateCreateFlagsNV , -- | @coverageModulationMode@ is a 'CoverageModulationModeNV' value -- controlling which color components are modulated.
src/Graphics/Vulkan/Extensions/VK_NV_mesh_shader.hs view
@@ -11,9 +11,11 @@ , pattern NV_MESH_SHADER_EXTENSION_NAME ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) 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)@@ -59,8 +61,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @taskCount@ is the number of local workgroups to dispatch in the X -- dimension. Y and Z dimension are implicitly set to one.@@ -118,8 +120,7 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV' -- sampled as a result of this command /must/ only be sampled using a -- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'@@ -157,9 +158,8 @@ -- -- - If the 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and done so after--- any previously bound pipeline with the corresponding state not+-- 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@@ -216,15 +216,14 @@ -- specified in the descriptor set bound to the same pipeline bind -- point ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource+-- - If @commandBuffer@ is an unprotected command buffer, any resource+-- accessed by the 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource -- -- - The current render pass /must/ be -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>--- with the 'Graphics.Vulkan.Core10.Handles.RenderPass' member of the+-- with the @renderPass@ member of the -- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' -- structure specified when creating the -- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to@@ -261,26 +260,24 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @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 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -296,8 +293,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdDrawMeshTasksNV :: CommandBuffer -> ("taskCount" ::: Word32) -> ("firstTask" ::: Word32) -> IO ()-cmdDrawMeshTasksNV commandBuffer taskCount firstTask = do+cmdDrawMeshTasksNV :: forall io . MonadIO io => CommandBuffer -> ("taskCount" ::: Word32) -> ("firstTask" ::: Word32) -> io ()+cmdDrawMeshTasksNV commandBuffer taskCount firstTask = liftIO $ do let vkCmdDrawMeshTasksNV' = mkVkCmdDrawMeshTasksNV (pVkCmdDrawMeshTasksNV (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdDrawMeshTasksNV' (commandBufferHandle (commandBuffer)) (taskCount) (firstTask) pure $ ()@@ -315,14 +312,12 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' is the buffer containing--- draw parameters.+-- - @buffer@ is the buffer containing draw parameters. ----- - @offset@ is the byte offset into--- 'Graphics.Vulkan.Core10.Handles.Buffer' where parameters begin.+-- - @offset@ is the byte offset into @buffer@ where parameters begin. -- -- - @drawCount@ is the number of draws to execute, and /can/ be zero. --@@ -334,11 +329,10 @@ -- '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 'Graphics.Vulkan.Core10.Handles.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.+-- 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 --@@ -386,8 +380,7 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV' -- sampled as a result of this command /must/ only be sampled using a -- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'@@ -425,9 +418,8 @@ -- -- - If the 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and done so after--- any previously bound pipeline with the corresponding state not+-- 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@@ -484,15 +476,14 @@ -- specified in the descriptor set bound to the same pipeline bind -- point ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource+-- - If @commandBuffer@ is an unprotected command buffer, any resource+-- accessed by the 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource -- -- - The current render pass /must/ be -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>--- with the 'Graphics.Vulkan.Core10.Handles.RenderPass' member of the+-- with the @renderPass@ member of the -- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' -- structure specified when creating the -- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to@@ -524,19 +515,17 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT' -- bit set ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is non-sparse then it--- /must/ be bound completely and contiguously to a single+-- - If @buffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ have been created--- with the+-- - @buffer@ /must/ have been created with the -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT' -- bit set -- -- - @offset@ /must/ be a multiple of @4@ ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be a--- protected command buffer+-- - @commandBuffer@ /must/ not be a protected command buffer -- -- - If the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-multiDrawIndirect multi-draw indirect>@@ -551,43 +540,39 @@ -- -- - If @drawCount@ is equal to @1@, (@offset@ + -- @sizeof@('DrawMeshTasksIndirectCommandNV')) /must/ be less than or--- equal to the size of 'Graphics.Vulkan.Core10.Handles.Buffer'+-- 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--- 'Graphics.Vulkan.Core10.Handles.Buffer'+-- less than or equal to the size of @buffer@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - This command /must/ only be called inside of a render pass instance ----- - Both of 'Graphics.Vulkan.Core10.Handles.Buffer', and--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ have been--- created, allocated, or retrieved from the same+-- - Both of @buffer@, and @commandBuffer@ /must/ have been created,+-- allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -605,8 +590,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdDrawMeshTasksIndirectNV :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()-cmdDrawMeshTasksIndirectNV commandBuffer buffer offset drawCount stride = do+cmdDrawMeshTasksIndirectNV :: forall io . MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()+cmdDrawMeshTasksIndirectNV commandBuffer buffer offset drawCount stride = liftIO $ do let vkCmdDrawMeshTasksIndirectNV' = mkVkCmdDrawMeshTasksIndirectNV (pVkCmdDrawMeshTasksIndirectNV (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdDrawMeshTasksIndirectNV' (commandBufferHandle (commandBuffer)) (buffer) (offset) (drawCount) (stride) pure $ ()@@ -624,14 +609,12 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command is recorded.+-- - @commandBuffer@ is the command buffer into which the command is+-- recorded. ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' is the buffer containing--- draw parameters.+-- - @buffer@ is the buffer containing draw parameters. ----- - @offset@ is the byte offset into--- 'Graphics.Vulkan.Core10.Handles.Buffer' where parameters begin.+-- - @offset@ is the byte offset into @buffer@ where parameters begin. -- -- - @countBuffer@ is the buffer containing the draw count. --@@ -699,8 +682,7 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV' -- sampled as a result of this command /must/ only be sampled using a -- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'@@ -738,9 +720,8 @@ -- -- - If the 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and done so after--- any previously bound pipeline with the corresponding state not+-- 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@@ -797,15 +778,14 @@ -- specified in the descriptor set bound to the same pipeline bind -- point ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource+-- - If @commandBuffer@ is an unprotected command buffer, any resource+-- accessed by the 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource -- -- - The current render pass /must/ be -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#renderpass-compatibility compatible>--- with the 'Graphics.Vulkan.Core10.Handles.RenderPass' member of the+-- with the @renderPass@ member of the -- 'Graphics.Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' -- structure specified when creating the -- 'Graphics.Vulkan.Core10.Handles.Pipeline' bound to@@ -837,19 +817,17 @@ -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT' -- bit set ----- - If 'Graphics.Vulkan.Core10.Handles.Buffer' is non-sparse then it--- /must/ be bound completely and contiguously to a single+-- - If @buffer@ is non-sparse then it /must/ be bound completely and+-- contiguously to a single -- 'Graphics.Vulkan.Core10.Handles.DeviceMemory' object ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ have been created--- with the+-- - @buffer@ /must/ have been created with the -- 'Graphics.Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_INDIRECT_BUFFER_BIT' -- bit set -- -- - @offset@ /must/ be a multiple of @4@ ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ not be a--- protected command buffer+-- - @commandBuffer@ /must/ not be a protected command buffer -- -- - If @countBuffer@ is non-sparse then it /must/ be bound completely -- and contiguously to a single@@ -870,50 +848,47 @@ -- - 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 'Graphics.Vulkan.Core10.Handles.Buffer'+-- 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 'Graphics.Vulkan.Core10.Handles.Buffer'+-- 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 'Graphics.Vulkan.Core10.Handles.Buffer'+-- equal to the size of @buffer@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.Buffer' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle+-- - @buffer@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer'+-- handle -- -- - @countBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Buffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - This command /must/ only be called inside of a render pass instance ----- - Each of 'Graphics.Vulkan.Core10.Handles.Buffer',--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and @countBuffer@--- /must/ have been created, allocated, or retrieved from the same+-- - Each of @buffer@, @commandBuffer@, and @countBuffer@ /must/ have+-- been created, allocated, or retrieved from the same -- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -931,8 +906,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdDrawMeshTasksIndirectCountNV :: CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()-cmdDrawMeshTasksIndirectCountNV commandBuffer buffer offset countBuffer countBufferOffset maxDrawCount stride = do+cmdDrawMeshTasksIndirectCountNV :: forall io . MonadIO io => CommandBuffer -> Buffer -> ("offset" ::: DeviceSize) -> ("countBuffer" ::: Buffer) -> ("countBufferOffset" ::: DeviceSize) -> ("maxDrawCount" ::: Word32) -> ("stride" ::: Word32) -> io ()+cmdDrawMeshTasksIndirectCountNV commandBuffer buffer offset countBuffer countBufferOffset maxDrawCount stride = liftIO $ do let vkCmdDrawMeshTasksIndirectCountNV' = mkVkCmdDrawMeshTasksIndirectCountNV (pVkCmdDrawMeshTasksIndirectCountNV (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdDrawMeshTasksIndirectCountNV' (commandBufferHandle (commandBuffer)) (buffer) (offset) (countBuffer) (countBufferOffset) (maxDrawCount) (stride) pure $ ()
src/Graphics/Vulkan/Extensions/VK_NV_ray_tracing.hs view
@@ -77,6 +77,7 @@ ) where import Control.Exception.Base (bracket)+import Control.Monad.IO.Class (liftIO) import Data.Typeable (eqT) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Alloc (callocBytes)@@ -101,12 +102,13 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Foreign.C.Types (CSize(..))+import Control.Monad.IO.Class (MonadIO) import Data.Bits (Bits) import Data.String (IsString) import Data.Type.Equality ((:~:)(Refl)) import Data.Typeable (Typeable) import Foreign.C.Types (CSize)-import Foreign.C.Types (CSize(..)) import Foreign.C.Types (CSize(CSize)) import Foreign.Storable (Storable) import Foreign.Storable (Storable(peek))@@ -216,11 +218,10 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device--- containing the ray tracing pipeline.+-- - @device@ is the logical device containing the ray tracing pipeline. ----- - 'Graphics.Vulkan.Core10.Handles.Pipeline' is the ray tracing--- pipeline object containing the shaders.+-- - @pipeline@ is the ray tracing pipeline object containing the+-- shaders. -- -- - @shader@ is the index of the shader to compile. --@@ -240,8 +241,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Pipeline'-compileDeferredNV :: Device -> Pipeline -> ("shader" ::: Word32) -> IO ()-compileDeferredNV device pipeline shader = do+compileDeferredNV :: forall io . MonadIO io => Device -> Pipeline -> ("shader" ::: Word32) -> io ()+compileDeferredNV device pipeline shader = liftIO $ do let vkCompileDeferredNV' = mkVkCompileDeferredNV (pVkCompileDeferredNV (deviceCmds (device :: Device))) r <- vkCompileDeferredNV' (deviceHandle (device)) (pipeline) (shader) when (r < SUCCESS) (throwIO (VulkanException r))@@ -259,8 +260,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the buffer object.+-- - @device@ is the logical device that creates the buffer object. -- -- - @pCreateInfo@ is a pointer to a 'AccelerationStructureCreateInfoNV' -- structure containing parameters affecting creation of the@@ -288,8 +288,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @pCreateInfo@ /must/ be a valid pointer to a valid -- 'AccelerationStructureCreateInfoNV' structure@@ -318,8 +318,8 @@ -- 'Graphics.Vulkan.Extensions.Handles.AccelerationStructureNV', -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device'-createAccelerationStructureNV :: Device -> AccelerationStructureCreateInfoNV -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (AccelerationStructureNV)-createAccelerationStructureNV device createInfo allocator = evalContT $ do+createAccelerationStructureNV :: forall io . MonadIO io => Device -> AccelerationStructureCreateInfoNV -> ("allocator" ::: Maybe AllocationCallbacks) -> io (AccelerationStructureNV)+createAccelerationStructureNV device createInfo allocator = liftIO . evalContT $ do let vkCreateAccelerationStructureNV' = mkVkCreateAccelerationStructureNV (pVkCreateAccelerationStructureNV (deviceCmds (device :: Device))) pCreateInfo <- ContT $ withCStruct (createInfo) pAllocator <- case (allocator) of@@ -335,11 +335,11 @@ -- 'destroyAccelerationStructureNV' using 'bracket' -- -- The allocated value must not be returned from the provided computation-withAccelerationStructureNV :: Device -> AccelerationStructureCreateInfoNV -> Maybe AllocationCallbacks -> (AccelerationStructureNV -> IO r) -> IO r-withAccelerationStructureNV device accelerationStructureCreateInfoNV allocationCallbacks =+withAccelerationStructureNV :: forall r . Device -> AccelerationStructureCreateInfoNV -> Maybe AllocationCallbacks -> ((AccelerationStructureNV) -> IO r) -> IO r+withAccelerationStructureNV device pCreateInfo pAllocator = bracket- (createAccelerationStructureNV device accelerationStructureCreateInfoNV allocationCallbacks)- (\o -> destroyAccelerationStructureNV device o allocationCallbacks)+ (createAccelerationStructureNV device pCreateInfo pAllocator)+ (\(o0) -> destroyAccelerationStructureNV device o0 pAllocator) foreign import ccall@@ -354,8 +354,7 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- destroys the buffer.+-- - @device@ is the logical device that destroys the buffer. -- -- - @accelerationStructure@ is the acceleration structure to destroy. --@@ -379,8 +378,8 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle -- -- - @accelerationStructure@ /must/ be a valid -- 'Graphics.Vulkan.Extensions.Handles.AccelerationStructureNV' handle@@ -391,15 +390,15 @@ -- structure -- -- - @accelerationStructure@ /must/ have been created, allocated, or--- retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- retrieved from @device@ -- -- = See Also -- -- 'Graphics.Vulkan.Extensions.Handles.AccelerationStructureNV', -- 'Graphics.Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', -- 'Graphics.Vulkan.Core10.Handles.Device'-destroyAccelerationStructureNV :: Device -> AccelerationStructureNV -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()-destroyAccelerationStructureNV device accelerationStructure allocator = evalContT $ do+destroyAccelerationStructureNV :: forall io . MonadIO io => Device -> AccelerationStructureNV -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()+destroyAccelerationStructureNV device accelerationStructure allocator = liftIO . evalContT $ do let vkDestroyAccelerationStructureNV' = mkVkDestroyAccelerationStructureNV (pVkDestroyAccelerationStructureNV (deviceCmds (device :: Device))) pAllocator <- case (allocator) of Nothing -> pure nullPtr@@ -420,8 +419,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device on--- which the acceleration structure was created.+-- - @device@ is the logical device on which the acceleration structure+-- was created. -- -- - @pInfo@ specifies the acceleration structure to get memory -- requirements for.@@ -436,8 +435,8 @@ -- 'AccelerationStructureMemoryRequirementsInfoNV', -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.MemoryRequirements2KHR'-getAccelerationStructureMemoryRequirementsNV :: (PokeChain a, PeekChain a) => Device -> AccelerationStructureMemoryRequirementsInfoNV -> IO (MemoryRequirements2KHR a)-getAccelerationStructureMemoryRequirementsNV device info = evalContT $ do+getAccelerationStructureMemoryRequirementsNV :: forall a io . (PokeChain a, PeekChain a, MonadIO io) => Device -> AccelerationStructureMemoryRequirementsInfoNV -> io (MemoryRequirements2KHR a)+getAccelerationStructureMemoryRequirementsNV device info = liftIO . evalContT $ do let vkGetAccelerationStructureMemoryRequirementsNV' = mkVkGetAccelerationStructureMemoryRequirementsNV (pVkGetAccelerationStructureMemoryRequirementsNV (deviceCmds (device :: Device))) pInfo <- ContT $ withCStruct (info) pPMemoryRequirements <- ContT (withZeroCStruct @(MemoryRequirements2KHR _))@@ -457,8 +456,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the acceleration structures and memory.+-- - @device@ is the logical device that owns the acceleration structures+-- and memory. -- -- - @bindInfoCount@ is the number of elements in @pBindInfos@. --@@ -482,8 +481,8 @@ -- -- 'BindAccelerationStructureMemoryInfoNV', -- 'Graphics.Vulkan.Core10.Handles.Device'-bindAccelerationStructureMemoryNV :: Device -> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV) -> IO ()-bindAccelerationStructureMemoryNV device bindInfos = evalContT $ do+bindAccelerationStructureMemoryNV :: forall io . MonadIO io => Device -> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV) -> io ()+bindAccelerationStructureMemoryNV device bindInfos = liftIO . evalContT $ do let vkBindAccelerationStructureMemoryNV' = mkVkBindAccelerationStructureMemoryNV (pVkBindAccelerationStructureMemoryNV (deviceCmds (device :: Device))) pPBindInfos <- ContT $ allocaBytesAligned @BindAccelerationStructureMemoryInfoNV ((Data.Vector.length (bindInfos)) * 56) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPBindInfos `plusPtr` (56 * (i)) :: Ptr BindAccelerationStructureMemoryInfoNV) (e) . ($ ())) (bindInfos)@@ -502,8 +501,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @dst@ is a pointer to the target acceleration structure for the -- copy.@@ -525,7 +524,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @dst@ /must/ be a valid@@ -536,24 +535,22 @@ -- -- - @mode@ /must/ be a valid 'CopyAccelerationStructureModeNV' value ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support compute operations+-- @commandBuffer@ was allocated from /must/ support compute operations -- -- - This command /must/ only be called outside of a render pass instance ----- - Each of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', @dst@, and--- @src@ /must/ have been created, allocated, or retrieved from the--- same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Each of @commandBuffer@, @dst@, and @src@ /must/ have been created,+-- allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -571,8 +568,8 @@ -- 'Graphics.Vulkan.Extensions.Handles.AccelerationStructureNV', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'CopyAccelerationStructureModeNV'-cmdCopyAccelerationStructureNV :: CommandBuffer -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> CopyAccelerationStructureModeNV -> IO ()-cmdCopyAccelerationStructureNV commandBuffer dst src mode = do+cmdCopyAccelerationStructureNV :: forall io . MonadIO io => CommandBuffer -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> CopyAccelerationStructureModeNV -> io ()+cmdCopyAccelerationStructureNV commandBuffer dst src mode = liftIO $ do let vkCmdCopyAccelerationStructureNV' = mkVkCmdCopyAccelerationStructureNV (pVkCmdCopyAccelerationStructureNV (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdCopyAccelerationStructureNV' (commandBufferHandle (commandBuffer)) (dst) (src) (mode) pure $ ()@@ -590,8 +587,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @accelerationStructureCount@ is the count of acceleration structures -- for which to query the property.@@ -599,70 +596,65 @@ -- - @pAccelerationStructures@ is a pointer to an array of existing -- previously built acceleration structures. ----- - 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' is a--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' value specifying--- the type of queries managed by the pool.+-- - @queryType@ is a 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType'+-- value specifying the type of queries managed by the pool. ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' is the query pool that--- will manage the results of the query.+-- - @queryPool@ is the query pool that will manage the results of the+-- query. -- -- - @firstQuery@ is the first query index within the query pool that -- will contain the @accelerationStructureCount@ number of results. -- -- == Valid Usage ----- - 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' /must/ be+-- - @queryType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV' ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ have been created--- with a 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' matching--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType'+-- - @queryPool@ /must/ have been created with a @queryType@ matching+-- @queryType@ ----- - The queries identified by 'Graphics.Vulkan.Core10.Handles.QueryPool'--- and @firstQuery@ /must/ be /unavailable/+-- - The queries identified by @queryPool@ and @firstQuery@ /must/ be+-- /unavailable/ -- -- - All acceleration structures in @accelerationStructures@ /must/ have -- been built with -- 'BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV' if--- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' is+-- @queryType@ is -- 'Graphics.Vulkan.Core10.Enums.QueryType.QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV' -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pAccelerationStructures@ /must/ be a valid pointer to an array of -- @accelerationStructureCount@ valid -- 'Graphics.Vulkan.Extensions.Handles.AccelerationStructureNV' handles ----- - 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' /must/ be a valid+-- - @queryType@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType' value ----- - 'Graphics.Vulkan.Core10.Handles.QueryPool' /must/ be a valid+-- - @queryPool@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.QueryPool' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support compute operations+-- @commandBuffer@ was allocated from /must/ support compute operations -- -- - This command /must/ only be called outside of a render pass instance -- -- - @accelerationStructureCount@ /must/ be greater than @0@ ----- - Each of 'Graphics.Vulkan.Core10.Handles.CommandBuffer',--- 'Graphics.Vulkan.Core10.Handles.QueryPool', and the elements of+-- - Each of @commandBuffer@, @queryPool@, and the elements of -- @pAccelerationStructures@ /must/ have been created, allocated, or -- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -681,8 +673,8 @@ -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.Handles.QueryPool', -- 'Graphics.Vulkan.Core10.Enums.QueryType.QueryType'-cmdWriteAccelerationStructuresPropertiesNV :: CommandBuffer -> ("accelerationStructures" ::: Vector AccelerationStructureNV) -> QueryType -> QueryPool -> ("firstQuery" ::: Word32) -> IO ()-cmdWriteAccelerationStructuresPropertiesNV commandBuffer accelerationStructures queryType queryPool firstQuery = evalContT $ do+cmdWriteAccelerationStructuresPropertiesNV :: forall io . MonadIO io => CommandBuffer -> ("accelerationStructures" ::: Vector AccelerationStructureNV) -> QueryType -> QueryPool -> ("firstQuery" ::: Word32) -> io ()+cmdWriteAccelerationStructuresPropertiesNV commandBuffer accelerationStructures queryType queryPool firstQuery = liftIO . evalContT $ do let vkCmdWriteAccelerationStructuresPropertiesNV' = mkVkCmdWriteAccelerationStructuresPropertiesNV (pVkCmdWriteAccelerationStructuresPropertiesNV (deviceCmds (commandBuffer :: CommandBuffer))) pPAccelerationStructures <- ContT $ allocaBytesAligned @AccelerationStructureNV ((Data.Vector.length (accelerationStructures)) * 8) 8 lift $ Data.Vector.imapM_ (\i e -> poke (pPAccelerationStructures `plusPtr` (8 * (i)) :: Ptr AccelerationStructureNV) (e)) (accelerationStructures)@@ -701,8 +693,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @pInfo@ contains the shared information for the acceleration -- structure’s structure.@@ -739,8 +731,8 @@ -- - @dst@ /must/ have been created with compatible -- 'AccelerationStructureInfoNV' where -- 'AccelerationStructureInfoNV'::@type@ and--- 'AccelerationStructureInfoNV'::'Graphics.Vulkan.Core10.BaseType.Flags'--- are identical, 'AccelerationStructureInfoNV'::@instanceCount@ and+-- 'AccelerationStructureInfoNV'::@flags@ are identical,+-- 'AccelerationStructureInfoNV'::@instanceCount@ and -- 'AccelerationStructureInfoNV'::@geometryCount@ for @dst@ are greater -- than or equal to the build size and each geometry in -- 'AccelerationStructureInfoNV'::@pGeometries@ for @dst@ has greater@@ -752,7 +744,7 @@ -- - If @update@ is 'Graphics.Vulkan.Core10.BaseType.TRUE', @src@ /must/ -- have been built before with -- 'BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV' set in--- 'AccelerationStructureInfoNV'::'Graphics.Vulkan.Core10.BaseType.Flags'+-- 'AccelerationStructureInfoNV'::@flags@ -- -- - If @update@ is 'Graphics.Vulkan.Core10.BaseType.FALSE', The @size@ -- member of the@@ -780,7 +772,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pInfo@ /must/ be a valid pointer to a valid@@ -800,25 +792,23 @@ -- - @scratch@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer' -- handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support compute operations+-- @commandBuffer@ was allocated from /must/ support compute operations -- -- - This command /must/ only be called outside of a render pass instance ----- - Each of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', @dst@,--- @instanceData@, @scratch@, and @src@ that are valid handles of--- non-ignored parameters /must/ have been created, allocated, or--- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device'+-- - Each of @commandBuffer@, @dst@, @instanceData@, @scratch@, and @src@+-- that are valid handles of non-ignored parameters /must/ have been+-- created, allocated, or retrieved from the same+-- 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -839,8 +829,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdBuildAccelerationStructureNV :: CommandBuffer -> AccelerationStructureInfoNV -> ("instanceData" ::: Buffer) -> ("instanceOffset" ::: DeviceSize) -> ("update" ::: Bool) -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> ("scratch" ::: Buffer) -> ("scratchOffset" ::: DeviceSize) -> IO ()-cmdBuildAccelerationStructureNV commandBuffer info instanceData instanceOffset update dst src scratch scratchOffset = evalContT $ do+cmdBuildAccelerationStructureNV :: forall io . MonadIO io => CommandBuffer -> AccelerationStructureInfoNV -> ("instanceData" ::: Buffer) -> ("instanceOffset" ::: DeviceSize) -> ("update" ::: Bool) -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> ("scratch" ::: Buffer) -> ("scratchOffset" ::: DeviceSize) -> io ()+cmdBuildAccelerationStructureNV commandBuffer info instanceData instanceOffset update dst src scratch scratchOffset = liftIO . evalContT $ do let vkCmdBuildAccelerationStructureNV' = mkVkCmdBuildAccelerationStructureNV (pVkCmdBuildAccelerationStructureNV (deviceCmds (commandBuffer :: CommandBuffer))) pInfo <- ContT $ withCStruct (info) lift $ vkCmdBuildAccelerationStructureNV' (commandBufferHandle (commandBuffer)) pInfo (instanceData) (instanceOffset) (boolToBool32 (update)) (dst) (src) (scratch) (scratchOffset)@@ -858,8 +848,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @raygenShaderBindingTableBuffer@ is the buffer object that holds the -- shader binding table data for the ray generation shader stage.@@ -955,8 +945,7 @@ -- 'Graphics.Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2' -- -- - Any 'Graphics.Vulkan.Core10.Handles.Image' created with a--- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'--- containing+-- 'Graphics.Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing -- 'Graphics.Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV' -- sampled as a result of this command /must/ only be sampled using a -- 'Graphics.Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode'@@ -994,9 +983,8 @@ -- -- - If the 'Graphics.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--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and done so after--- any previously bound pipeline with the corresponding state not+-- 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@@ -1053,23 +1041,20 @@ -- specified in the descriptor set bound to the same pipeline bind -- point ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is an unprotected--- command buffer, any resource accessed by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be a protected--- resource+-- - If @commandBuffer@ is an unprotected command buffer, any resource+-- accessed by the 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- a protected resource ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, any resource written to by the--- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the--- pipeline bind point used by this command /must/ not be an--- unprotected resource+-- - If @commandBuffer@ is a protected command buffer, any resource+-- written to by the 'Graphics.Vulkan.Core10.Handles.Pipeline' object+-- bound to the pipeline bind point used by this command /must/ not be+-- an unprotected resource ----- - If 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is a protected--- command buffer, pipeline stages other than the framebuffer-space and--- compute stages in the 'Graphics.Vulkan.Core10.Handles.Pipeline'--- object bound to the pipeline bind point /must/ not write to any--- resource+-- - If @commandBuffer@ is a protected command buffer, pipeline stages+-- other than the framebuffer-space and compute stages in the+-- 'Graphics.Vulkan.Core10.Handles.Pipeline' object bound to the+-- pipeline bind point /must/ not write to any resource -- -- - @raygenShaderBindingOffset@ /must/ be less than the size of -- @raygenShaderBindingTableBuffer@@@ -1124,7 +1109,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @raygenShaderBindingTableBuffer@ /must/ be a valid@@ -1145,17 +1130,15 @@ -- @callableShaderBindingTableBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Buffer' handle ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support compute operations+-- @commandBuffer@ was allocated from /must/ support compute operations -- -- - This command /must/ only be called outside of a render pass instance ----- - Each of @callableShaderBindingTableBuffer@,--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer',+-- - Each of @callableShaderBindingTableBuffer@, @commandBuffer@, -- @hitShaderBindingTableBuffer@, @missShaderBindingTableBuffer@, and -- @raygenShaderBindingTableBuffer@ that are valid handles of -- non-ignored parameters /must/ have been created, allocated, or@@ -1164,8 +1147,7 @@ -- == Host Synchronization -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -1183,8 +1165,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Buffer', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.BaseType.DeviceSize'-cmdTraceRaysNV :: CommandBuffer -> ("raygenShaderBindingTableBuffer" ::: Buffer) -> ("raygenShaderBindingOffset" ::: DeviceSize) -> ("missShaderBindingTableBuffer" ::: Buffer) -> ("missShaderBindingOffset" ::: DeviceSize) -> ("missShaderBindingStride" ::: DeviceSize) -> ("hitShaderBindingTableBuffer" ::: Buffer) -> ("hitShaderBindingOffset" ::: DeviceSize) -> ("hitShaderBindingStride" ::: DeviceSize) -> ("callableShaderBindingTableBuffer" ::: Buffer) -> ("callableShaderBindingOffset" ::: DeviceSize) -> ("callableShaderBindingStride" ::: DeviceSize) -> ("width" ::: Word32) -> ("height" ::: Word32) -> ("depth" ::: Word32) -> IO ()-cmdTraceRaysNV commandBuffer raygenShaderBindingTableBuffer raygenShaderBindingOffset missShaderBindingTableBuffer missShaderBindingOffset missShaderBindingStride hitShaderBindingTableBuffer hitShaderBindingOffset hitShaderBindingStride callableShaderBindingTableBuffer callableShaderBindingOffset callableShaderBindingStride width height depth = do+cmdTraceRaysNV :: forall io . MonadIO io => CommandBuffer -> ("raygenShaderBindingTableBuffer" ::: Buffer) -> ("raygenShaderBindingOffset" ::: DeviceSize) -> ("missShaderBindingTableBuffer" ::: Buffer) -> ("missShaderBindingOffset" ::: DeviceSize) -> ("missShaderBindingStride" ::: DeviceSize) -> ("hitShaderBindingTableBuffer" ::: Buffer) -> ("hitShaderBindingOffset" ::: DeviceSize) -> ("hitShaderBindingStride" ::: DeviceSize) -> ("callableShaderBindingTableBuffer" ::: Buffer) -> ("callableShaderBindingOffset" ::: DeviceSize) -> ("callableShaderBindingStride" ::: DeviceSize) -> ("width" ::: Word32) -> ("height" ::: Word32) -> ("depth" ::: Word32) -> io ()+cmdTraceRaysNV commandBuffer raygenShaderBindingTableBuffer raygenShaderBindingOffset missShaderBindingTableBuffer missShaderBindingOffset missShaderBindingStride hitShaderBindingTableBuffer hitShaderBindingOffset hitShaderBindingStride callableShaderBindingTableBuffer callableShaderBindingOffset callableShaderBindingStride width height depth = liftIO $ do let vkCmdTraceRaysNV' = mkVkCmdTraceRaysNV (pVkCmdTraceRaysNV (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdTraceRaysNV' (commandBufferHandle (commandBuffer)) (raygenShaderBindingTableBuffer) (raygenShaderBindingOffset) (missShaderBindingTableBuffer) (missShaderBindingOffset) (missShaderBindingStride) (hitShaderBindingTableBuffer) (hitShaderBindingOffset) (hitShaderBindingStride) (callableShaderBindingTableBuffer) (callableShaderBindingOffset) (callableShaderBindingStride) (width) (height) (depth) pure $ ()@@ -1202,11 +1184,10 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device--- containing the ray tracing pipeline.+-- - @device@ is the logical device containing the ray tracing pipeline. ----- - 'Graphics.Vulkan.Core10.Handles.Pipeline' is the ray tracing--- pipeline object containing the shaders.+-- - @pipeline@ is the ray tracing pipeline object containing the+-- shaders. -- -- - @firstGroup@ is the index of the first group to retrieve a handle -- for from the 'RayTracingShaderGroupCreateInfoNV'::@pGroups@ array.@@ -1221,8 +1202,7 @@ -- == Valid Usage -- -- - The sum of @firstGroup@ and @groupCount@ /must/ be less than the--- number of shader groups in--- 'Graphics.Vulkan.Core10.Handles.Pipeline'.+-- number of shader groups in @pipeline@. -- -- - @dataSize@ /must/ be at least -- 'PhysicalDeviceRayTracingPropertiesNV'::@shaderGroupHandleSize@ ×@@ -1230,18 +1210,18 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ be a valid+-- - @pipeline@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.Pipeline' handle -- -- - @pData@ /must/ be a valid pointer to an array of @dataSize@ bytes -- -- - @dataSize@ /must/ be greater than @0@ ----- - 'Graphics.Vulkan.Core10.Handles.Pipeline' /must/ have been created,--- allocated, or retrieved from 'Graphics.Vulkan.Core10.Handles.Device'+-- - @pipeline@ /must/ have been created, allocated, or retrieved from+-- @device@ -- -- == Return Codes --@@ -1259,8 +1239,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.Device', -- 'Graphics.Vulkan.Core10.Handles.Pipeline'-getRayTracingShaderGroupHandlesNV :: Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> IO ()-getRayTracingShaderGroupHandlesNV device pipeline firstGroup groupCount dataSize data' = do+getRayTracingShaderGroupHandlesNV :: forall io . MonadIO io => Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()+getRayTracingShaderGroupHandlesNV device pipeline firstGroup groupCount dataSize data' = liftIO $ do let vkGetRayTracingShaderGroupHandlesNV' = mkVkGetRayTracingShaderGroupHandlesNV (pVkGetRayTracingShaderGroupHandlesNV (deviceCmds (device :: Device))) r <- vkGetRayTracingShaderGroupHandlesNV' (deviceHandle (device)) (pipeline) (firstGroup) (groupCount) (CSize (dataSize)) (data') when (r < SUCCESS) (throwIO (VulkanException r))@@ -1278,8 +1258,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- owns the acceleration structures.+-- - @device@ is the logical device that owns the acceleration+-- structures. -- -- - @accelerationStructure@ is the acceleration structure. --@@ -1304,8 +1284,8 @@ -- -- 'Graphics.Vulkan.Extensions.Handles.AccelerationStructureNV', -- 'Graphics.Vulkan.Core10.Handles.Device'-getAccelerationStructureHandleNV :: Device -> AccelerationStructureNV -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> IO ()-getAccelerationStructureHandleNV device accelerationStructure dataSize data' = do+getAccelerationStructureHandleNV :: forall io . MonadIO io => Device -> AccelerationStructureNV -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()+getAccelerationStructureHandleNV device accelerationStructure dataSize data' = liftIO $ do let vkGetAccelerationStructureHandleNV' = mkVkGetAccelerationStructureHandleNV (pVkGetAccelerationStructureHandleNV (deviceCmds (device :: Device))) r <- vkGetAccelerationStructureHandleNV' (deviceHandle (device)) (accelerationStructure) (CSize (dataSize)) (data') when (r < SUCCESS) (throwIO (VulkanException r))@@ -1323,10 +1303,10 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.Device' is the logical device that--- creates the ray tracing pipelines.+-- - @device@ is the logical device that creates the ray tracing+-- pipelines. ----- - 'Graphics.Vulkan.Core10.Handles.PipelineCache' is either+-- - @pipelineCache@ is either -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', indicating that -- pipeline caching is disabled, or the handle of a valid -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#pipelines-cache pipeline cache>@@ -1348,15 +1328,13 @@ -- -- == Valid Usage ----- - If the 'Graphics.Vulkan.Core10.BaseType.Flags' member of any element--- of @pCreateInfos@ contains the+-- - If the @flags@ member of any element of @pCreateInfos@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and the @basePipelineIndex@ member of that same element is not -- @-1@, @basePipelineIndex@ /must/ be less than the index into -- @pCreateInfos@ that corresponds to that element ----- - If the 'Graphics.Vulkan.Core10.BaseType.Flags' member of any element--- of @pCreateInfos@ contains the+-- - If the @flags@ member of any element of @pCreateInfos@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, the base pipeline /must/ have been created with the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT'@@ -1364,13 +1342,13 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.Device' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Device' handle+-- - @device@ /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Device'+-- handle ----- - If 'Graphics.Vulkan.Core10.Handles.PipelineCache' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.PipelineCache' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.PipelineCache' handle+-- - If @pipelineCache@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @pipelineCache@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.PipelineCache'+-- handle -- -- - @pCreateInfos@ /must/ be a valid pointer to an array of -- @createInfoCount@ valid 'RayTracingPipelineCreateInfoNV' structures@@ -1385,9 +1363,8 @@ -- -- - @createInfoCount@ /must/ be greater than @0@ ----- - If 'Graphics.Vulkan.Core10.Handles.PipelineCache' is a valid handle,--- it /must/ have been created, allocated, or retrieved from--- 'Graphics.Vulkan.Core10.Handles.Device'+-- - If @pipelineCache@ is a valid handle, it /must/ have been created,+-- allocated, or retrieved from @device@ -- -- == Return Codes --@@ -1410,8 +1387,8 @@ -- 'Graphics.Vulkan.Core10.Handles.Pipeline', -- 'Graphics.Vulkan.Core10.Handles.PipelineCache', -- 'RayTracingPipelineCreateInfoNV'-createRayTracingPipelinesNV :: PokeChain a => Device -> PipelineCache -> ("createInfos" ::: Vector (RayTracingPipelineCreateInfoNV a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> IO (("pipelines" ::: Vector Pipeline))-createRayTracingPipelinesNV device pipelineCache createInfos allocator = evalContT $ do+createRayTracingPipelinesNV :: forall a io . (PokeChain a, MonadIO io) => Device -> PipelineCache -> ("createInfos" ::: Vector (RayTracingPipelineCreateInfoNV a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io (("pipelines" ::: Vector Pipeline))+createRayTracingPipelinesNV device pipelineCache createInfos allocator = liftIO . evalContT $ do let vkCreateRayTracingPipelinesNV' = mkVkCreateRayTracingPipelinesNV (pVkCreateRayTracingPipelinesNV (deviceCmds (device :: Device))) pPCreateInfos <- ContT $ allocaBytesAligned @(RayTracingPipelineCreateInfoNV _) ((Data.Vector.length (createInfos)) * 80) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPCreateInfos `plusPtr` (80 * (i)) :: Ptr (RayTracingPipelineCreateInfoNV _)) (e) . ($ ())) (createInfos)@@ -1566,25 +1543,25 @@ -- -- == Valid Usage ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains the+-- - If @flags@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and @basePipelineIndex@ is @-1@, @basePipelineHandle@ /must/ -- be a valid handle to a ray tracing -- 'Graphics.Vulkan.Core10.Handles.Pipeline' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains the+-- - If @flags@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and @basePipelineHandle@ is -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', -- @basePipelineIndex@ /must/ be a valid index into the calling -- command’s @pCreateInfos@ parameter ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains the+-- - If @flags@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and @basePipelineIndex@ is not @-1@, @basePipelineHandle@ -- /must/ be 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' contains the+-- - If @flags@ contains the -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT' -- flag, and @basePipelineHandle@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',@@ -1621,8 +1598,7 @@ -- - The @sType@ value of each struct in the @pNext@ chain /must/ be -- unique ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of+-- - @flags@ /must/ be a valid combination of -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits' -- values --@@ -1657,7 +1633,7 @@ data RayTracingPipelineCreateInfoNV (es :: [Type]) = RayTracingPipelineCreateInfoNV { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure. next :: Chain es- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of+ , -- | @flags@ is a bitmask of -- 'Graphics.Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits' -- specifying how the pipeline will be generated. flags :: PipelineCreateFlags@@ -1767,7 +1743,7 @@ -- -- = Description ----- If 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' is+-- If @indexType@ is -- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_NONE_NV', then this -- structure describes a set of triangles determined by @vertexCount@. -- Otherwise, this structure describes a set of indexed triangles@@ -1791,25 +1767,22 @@ -- - @indexOffset@ /must/ be less than the size of @indexData@ -- -- - @indexOffset@ /must/ be a multiple of the element size of--- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType'+-- @indexType@ ----- - 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' /must/ be+-- - @indexType@ /must/ be -- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT16', -- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT32', or -- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_NONE_NV' -- -- - @indexData@ /must/ be--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' if--- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' is+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE' if @indexType@ is -- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_NONE_NV' -- -- - @indexData@ /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.Buffer' handle if--- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' is not+-- 'Graphics.Vulkan.Core10.Handles.Buffer' handle if @indexType@ is not -- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_NONE_NV' ----- - @indexCount@ /must/ be @0@ if--- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' is+-- - @indexCount@ /must/ be @0@ if @indexType@ is -- 'Graphics.Vulkan.Core10.Enums.IndexType.INDEX_TYPE_NONE_NV' -- -- - @transformOffset@ /must/ be less than the size of @transformData@@@ -1834,7 +1807,7 @@ -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @indexData@ -- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.Buffer' handle ----- - 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' /must/ be a valid+-- - @indexType@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' value -- -- - If @transformData@ is not@@ -1872,8 +1845,7 @@ indexOffset :: DeviceSize , -- | @indexCount@ is the number of indices to include in this geometry. indexCount :: Word32- , -- | 'Graphics.Vulkan.Core10.Enums.IndexType.IndexType' is the format of each- -- index.+ , -- | @indexType@ is the format of each index. indexType :: IndexType , -- | @transformData@ is a buffer containing optional reference to an array of -- 32-bit floats representing a 3x4 row major affine transformation matrix@@ -2101,8 +2073,7 @@ geometryType :: GeometryTypeNV , -- | @geometry@ /must/ be a valid 'GeometryDataNV' structure geometry :: GeometryDataNV- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid combination of- -- 'GeometryFlagBitsNV' values+ , -- | @flags@ /must/ be a valid combination of 'GeometryFlagBitsNV' values flags :: GeometryFlagsNV } deriving (Typeable)@@ -2173,7 +2144,7 @@ -- @geometryType@ member of each geometry in @pGeometries@ /must/ be -- the same ----- - If 'Graphics.Vulkan.Core10.BaseType.Flags' has the+-- - If @flags@ has the -- 'BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV' bit set, -- then it /must/ not have the -- 'BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV' bit set@@ -2197,8 +2168,8 @@ -- -- - @type@ /must/ be a valid 'AccelerationStructureTypeNV' value ----- - 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be a valid--- combination of 'BuildAccelerationStructureFlagBitsNV' values+-- - @flags@ /must/ be a valid combination of+-- 'BuildAccelerationStructureFlagBitsNV' values -- -- - If @geometryCount@ is not @0@, @pGeometries@ /must/ be a valid -- pointer to an array of @geometryCount@ valid 'GeometryNV' structures@@ -2213,9 +2184,8 @@ { -- | @type@ is a 'AccelerationStructureTypeNV' value specifying the type of -- acceleration structure that will be created. type' :: AccelerationStructureTypeNV- , -- | 'Graphics.Vulkan.Core10.BaseType.Flags' is a bitmask of- -- 'BuildAccelerationStructureFlagBitsNV' specifying additional parameters- -- of the acceleration structure.+ , -- | @flags@ is a bitmask of 'BuildAccelerationStructureFlagBitsNV'+ -- specifying additional parameters of the acceleration structure. flags :: BuildAccelerationStructureFlagsNV , -- | @instanceCount@ specifies the number of instances that will be in the -- new acceleration structure.
src/Graphics/Vulkan/Extensions/VK_NV_scissor_exclusive.hs view
@@ -8,6 +8,7 @@ , pattern NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Utils (maybePeek) import Foreign.Ptr (nullPtr)@@ -17,6 +18,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Either (Either) import Data.String (IsString) import Data.Typeable (Typeable)@@ -60,8 +62,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @firstExclusiveScissor@ is the index of the first exclusive scissor -- rectangle whose state is updated by the command.@@ -120,30 +122,28 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pExclusiveScissors@ /must/ be a valid pointer to an array of -- @exclusiveScissorCount@ -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.Rect2D' structures ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - @exclusiveScissorCount@ /must/ be greater than @0@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -160,8 +160,8 @@ -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.CommandBufferBuilding.Rect2D'-cmdSetExclusiveScissorNV :: CommandBuffer -> ("firstExclusiveScissor" ::: Word32) -> ("exclusiveScissors" ::: Vector Rect2D) -> IO ()-cmdSetExclusiveScissorNV commandBuffer firstExclusiveScissor exclusiveScissors = evalContT $ do+cmdSetExclusiveScissorNV :: forall io . MonadIO io => CommandBuffer -> ("firstExclusiveScissor" ::: Word32) -> ("exclusiveScissors" ::: Vector Rect2D) -> io ()+cmdSetExclusiveScissorNV commandBuffer firstExclusiveScissor exclusiveScissors = liftIO . evalContT $ do let vkCmdSetExclusiveScissorNV' = mkVkCmdSetExclusiveScissorNV (pVkCmdSetExclusiveScissorNV (deviceCmds (commandBuffer :: CommandBuffer))) pPExclusiveScissors <- ContT $ allocaBytesAligned @Rect2D ((Data.Vector.length (exclusiveScissors)) * 16) 4 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPExclusiveScissors `plusPtr` (16 * (i)) :: Ptr Rect2D) (e) . ($ ())) (exclusiveScissors)
src/Graphics/Vulkan/Extensions/VK_NV_shading_rate_image.hs view
@@ -35,6 +35,7 @@ , pattern NV_SHADING_RATE_IMAGE_EXTENSION_NAME ) where +import Control.Monad.IO.Class (liftIO) import Foreign.Marshal.Alloc (allocaBytesAligned) import Foreign.Marshal.Utils (maybePeek) import Foreign.Ptr (nullPtr)@@ -53,6 +54,7 @@ import Data.Vector (generateM) import qualified Data.Vector (imapM_) import qualified Data.Vector (length)+import Control.Monad.IO.Class (MonadIO) import Data.Either (Either) import Data.String (IsString) import Data.Typeable (Typeable)@@ -108,19 +110,16 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. ----- - 'Graphics.Vulkan.Core10.Handles.ImageView' is an image view handle--- specifying the shading rate image.--- 'Graphics.Vulkan.Core10.Handles.ImageView' /may/ be set to+-- - @imageView@ is an image view handle specifying the shading rate+-- image. @imageView@ /may/ be set to -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', which is -- equivalent to specifying a view of an image filled with zero values. ----- - 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' is the layout--- that the image subresources accessible from--- 'Graphics.Vulkan.Core10.Handles.ImageView' will be in when the--- shading rate image is accessed.+-- - @imageLayout@ is the layout that the image subresources accessible+-- from @imageView@ will be in when the shading rate image is accessed. -- -- == Valid Usage --@@ -128,68 +127,63 @@ -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-shadingRateImage shading rate image> -- feature /must/ be enabled. ----- - If 'Graphics.Vulkan.Core10.Handles.ImageView' is not+-- - If @imageView@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', it /must/ be a -- valid 'Graphics.Vulkan.Core10.Handles.ImageView' handle of type -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D' or -- 'Graphics.Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY'. ----- - If 'Graphics.Vulkan.Core10.Handles.ImageView' is not+-- - If @imageView@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', it /must/ have a -- format of 'Graphics.Vulkan.Core10.Enums.Format.FORMAT_R8_UINT'. ----- - If 'Graphics.Vulkan.Core10.Handles.ImageView' is not+-- - If @imageView@ is not -- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', it /must/ have -- been created with a @usage@ value including -- 'Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV' ----- - If 'Graphics.Vulkan.Core10.Handles.ImageView' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' /must/ match--- the actual 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' of--- each subresource accessible from--- 'Graphics.Vulkan.Core10.Handles.ImageView' at the time the--- subresource is accessed.+-- - If @imageView@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @imageLayout@+-- /must/ match the actual+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' of each+-- subresource accessible from @imageView@ at the time the subresource+-- is accessed. ----- - If 'Graphics.Vulkan.Core10.Handles.ImageView' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' /must/ be+-- - If @imageView@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @imageLayout@+-- /must/ be -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV' -- or 'Graphics.Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_GENERAL'. -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle ----- - If 'Graphics.Vulkan.Core10.Handles.ImageView' is not--- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE',--- 'Graphics.Vulkan.Core10.Handles.ImageView' /must/ be a valid--- 'Graphics.Vulkan.Core10.Handles.ImageView' handle+-- - If @imageView@ is not+-- 'Graphics.Vulkan.Core10.APIConstants.NULL_HANDLE', @imageView@+-- /must/ be a valid 'Graphics.Vulkan.Core10.Handles.ImageView' handle ----- - 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' /must/ be a--- valid 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value+-- - @imageLayout@ /must/ be a valid+-- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout' value ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations ----- - Both of 'Graphics.Vulkan.Core10.Handles.CommandBuffer', and--- 'Graphics.Vulkan.Core10.Handles.ImageView' that are valid handles of+-- - Both of @commandBuffer@, and @imageView@ that are valid handles of -- non-ignored parameters /must/ have been created, allocated, or -- retrieved from the same 'Graphics.Vulkan.Core10.Handles.Device' -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -207,8 +201,8 @@ -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', -- 'Graphics.Vulkan.Core10.Enums.ImageLayout.ImageLayout', -- 'Graphics.Vulkan.Core10.Handles.ImageView'-cmdBindShadingRateImageNV :: CommandBuffer -> ImageView -> ImageLayout -> IO ()-cmdBindShadingRateImageNV commandBuffer imageView imageLayout = do+cmdBindShadingRateImageNV :: forall io . MonadIO io => CommandBuffer -> ImageView -> ImageLayout -> io ()+cmdBindShadingRateImageNV commandBuffer imageView imageLayout = liftIO $ do let vkCmdBindShadingRateImageNV' = mkVkCmdBindShadingRateImageNV (pVkCmdBindShadingRateImageNV (deviceCmds (commandBuffer :: CommandBuffer))) vkCmdBindShadingRateImageNV' (commandBufferHandle (commandBuffer)) (imageView) (imageLayout) pure $ ()@@ -226,8 +220,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @firstViewport@ is the index of the first viewport whose shading -- rate palette is updated by the command.@@ -263,29 +257,27 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @pShadingRatePalettes@ /must/ be a valid pointer to an array of -- @viewportCount@ valid 'ShadingRatePaletteNV' structures ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- - @viewportCount@ /must/ be greater than @0@ -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -301,8 +293,8 @@ -- = See Also -- -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer', 'ShadingRatePaletteNV'-cmdSetViewportShadingRatePaletteNV :: CommandBuffer -> ("firstViewport" ::: Word32) -> ("shadingRatePalettes" ::: Vector ShadingRatePaletteNV) -> IO ()-cmdSetViewportShadingRatePaletteNV commandBuffer firstViewport shadingRatePalettes = evalContT $ do+cmdSetViewportShadingRatePaletteNV :: forall io . MonadIO io => CommandBuffer -> ("firstViewport" ::: Word32) -> ("shadingRatePalettes" ::: Vector ShadingRatePaletteNV) -> io ()+cmdSetViewportShadingRatePaletteNV commandBuffer firstViewport shadingRatePalettes = liftIO . evalContT $ do let vkCmdSetViewportShadingRatePaletteNV' = mkVkCmdSetViewportShadingRatePaletteNV (pVkCmdSetViewportShadingRatePaletteNV (deviceCmds (commandBuffer :: CommandBuffer))) pPShadingRatePalettes <- ContT $ allocaBytesAligned @ShadingRatePaletteNV ((Data.Vector.length (shadingRatePalettes)) * 16) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPShadingRatePalettes `plusPtr` (16 * (i)) :: Ptr ShadingRatePaletteNV) (e) . ($ ())) (shadingRatePalettes)@@ -322,8 +314,8 @@ -- -- = Parameters ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' is the command buffer--- into which the command will be recorded.+-- - @commandBuffer@ is the command buffer into which the command will be+-- recorded. -- -- - @sampleOrderType@ specifies the mechanism used to order coverage -- samples in fragments larger than one pixel.@@ -354,7 +346,7 @@ -- -- == Valid Usage (Implicit) ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be a valid+-- - @commandBuffer@ /must/ be a valid -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' handle -- -- - @sampleOrderType@ /must/ be a valid 'CoarseSampleOrderTypeNV' value@@ -363,21 +355,19 @@ -- be a valid pointer to an array of @customSampleOrderCount@ valid -- 'CoarseSampleOrderCustomNV' structures ----- - 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/ be in the+-- - @commandBuffer@ /must/ be in the -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state> -- -- - The 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ support graphics operations+-- @commandBuffer@ was allocated from /must/ support graphics+-- operations -- -- == Host Synchronization ----- - Host access to 'Graphics.Vulkan.Core10.Handles.CommandBuffer' /must/--- be externally synchronized+-- - Host access to @commandBuffer@ /must/ be externally synchronized -- -- - Host access to the 'Graphics.Vulkan.Core10.Handles.CommandPool' that--- 'Graphics.Vulkan.Core10.Handles.CommandBuffer' was allocated from--- /must/ be externally synchronized+-- @commandBuffer@ was allocated from /must/ be externally synchronized -- -- == Command Properties --@@ -394,8 +384,8 @@ -- -- 'CoarseSampleOrderCustomNV', 'CoarseSampleOrderTypeNV', -- 'Graphics.Vulkan.Core10.Handles.CommandBuffer'-cmdSetCoarseSampleOrderNV :: CommandBuffer -> CoarseSampleOrderTypeNV -> ("customSampleOrders" ::: Vector CoarseSampleOrderCustomNV) -> IO ()-cmdSetCoarseSampleOrderNV commandBuffer sampleOrderType customSampleOrders = evalContT $ do+cmdSetCoarseSampleOrderNV :: forall io . MonadIO io => CommandBuffer -> CoarseSampleOrderTypeNV -> ("customSampleOrders" ::: Vector CoarseSampleOrderCustomNV) -> io ()+cmdSetCoarseSampleOrderNV commandBuffer sampleOrderType customSampleOrders = liftIO . evalContT $ do let vkCmdSetCoarseSampleOrderNV' = mkVkCmdSetCoarseSampleOrderNV (pVkCmdSetCoarseSampleOrderNV (deviceCmds (commandBuffer :: CommandBuffer))) pPCustomSampleOrders <- ContT $ allocaBytesAligned @CoarseSampleOrderCustomNV ((Data.Vector.length (customSampleOrders)) * 24) 8 Data.Vector.imapM_ (\i e -> ContT $ pokeCStruct (pPCustomSampleOrders `plusPtr` (24 * (i)) :: Ptr CoarseSampleOrderCustomNV) (e) . ($ ())) (customSampleOrders)
src/Graphics/Vulkan/Extensions/VK_NV_viewport_swizzle.hs view
@@ -133,7 +133,7 @@ -- 'Graphics.Vulkan.Core10.Enums.StructureType.StructureType', -- 'ViewportSwizzleNV' data PipelineViewportSwizzleStateCreateInfoNV = PipelineViewportSwizzleStateCreateInfoNV- { -- | 'Graphics.Vulkan.Core10.BaseType.Flags' /must/ be @0@+ { -- | @flags@ /must/ be @0@ flags :: PipelineViewportSwizzleStateCreateFlagsNV , -- | @pViewportSwizzles@ /must/ be a valid pointer to an array of -- @viewportCount@ valid 'ViewportSwizzleNV' structures
src/Graphics/Vulkan/Extensions/VK_QCOM_render_pass_transform.hs view
@@ -46,7 +46,7 @@ -- VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR. -- -- - The renderpass must have been created with--- 'Graphics.Vulkan.Core10.Pass.RenderPassCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'+-- 'Graphics.Vulkan.Core10.Pass.RenderPassCreateInfo'::@flags@ -- containing VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM. -- -- == Valid Usage (Implicit)
vulkan.cabal view
@@ -4,24 +4,22 @@ -- -- see: https://github.com/sol/hpack ----- hash: 114c0fde74e474e875021865600ff7eb6f54ffb28ef52a9fd385840b8e68d414+-- hash: 7a4b71d18fa3aad08655db1fe0509bcdf84c82ee475ee3f205cfda3ddc5dc2ba -name: vulkan-version: 3.0.0.0-synopsis: Bindings to the Vulkan graphics API.-homepage: https://github.com/expipiplus1/vulkan#readme-bug-reports: https://github.com/expipiplus1/vulkan/issues-license: BSD3-license-file: LICENSE-maintainer: Joe Hermaszewski <live.long.and.prosper@monoid.al>-category: Graphics-build-type: Simple+name: vulkan+version: 3.1.0.0+synopsis: Bindings to the Vulkan graphics API.+category: Graphics+homepage: https://github.com/expipiplus1/vulkan#readme+bug-reports: https://github.com/expipiplus1/vulkan/issues+maintainer: Joe Hermaszewski <live.long.and.prosper@monoid.al>+license: BSD3+license-file: LICENSE+build-type: Simple extra-source-files: readme.md changelog.md default.nix- examples/sdl-triangle/shader.frag- examples/sdl-triangle/shader.vert source-repository head type: git@@ -35,27 +33,9 @@ flag safe-foreign-calls description: Do not mark foreign imports as 'unsafe'. This means that callbacks from Vulkan to Haskell will work. If you are using these then make sure this flag is enabled. manual: True- default: True+ default: False library- hs-source-dirs:- src- default-extensions: AllowAmbiguousTypes CPP DataKinds DefaultSignatures DeriveAnyClass DerivingStrategies DuplicateRecordFields FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving InstanceSigs LambdaCase MagicHash NoMonomorphismRestriction OverloadedStrings PartialTypeSignatures PatternSynonyms PolyKinds QuantifiedConstraints RankNTypes RecordWildCards RoleAnnotations ScopedTypeVariables StandaloneDeriving Strict TypeApplications TypeFamilyDependencies TypeOperators TypeSynonymInstances UndecidableInstances ViewPatterns- ghc-options: -Wall -Wno-unticked-promoted-constructors -Wno-missing-pattern-synonym-signatures -Wno-unused-imports -Wno-missing-signatures -Wno-partial-type-signatures- build-depends:- base <4.14- , bytestring- , transformers- , vector- , vector-sized- if os(windows)- extra-libraries:- vulkan-1- else- extra-libraries:- vulkan- if flag(safe-foreign-calls)- cpp-options: -DSAFE_FOREIGN_CALLS exposed-modules: Graphics.Vulkan Graphics.Vulkan.Core10@@ -473,6 +453,24 @@ Graphics.Vulkan.Zero other-modules: Paths_vulkan+ hs-source-dirs:+ src+ default-extensions: AllowAmbiguousTypes CPP DataKinds DefaultSignatures DeriveAnyClass DerivingStrategies DuplicateRecordFields FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving InstanceSigs LambdaCase MagicHash NoMonomorphismRestriction OverloadedStrings PartialTypeSignatures PatternSynonyms PolyKinds QuantifiedConstraints RankNTypes RecordWildCards RoleAnnotations ScopedTypeVariables StandaloneDeriving Strict TypeApplications TypeFamilyDependencies TypeOperators TypeSynonymInstances UndecidableInstances ViewPatterns+ ghc-options: -Wall -Wno-unticked-promoted-constructors -Wno-missing-pattern-synonym-signatures -Wno-unused-imports -Wno-missing-signatures -Wno-partial-type-signatures+ build-depends:+ base <4.14+ , bytestring+ , transformers+ , vector+ , vector-sized+ if os(windows)+ extra-libraries:+ vulkan-1+ else+ extra-libraries:+ vulkan+ if flag(safe-foreign-calls)+ cpp-options: -DSAFE_FOREIGN_CALLS default-language: Haskell2010 executable info@@ -485,6 +483,7 @@ if flag(build-examples) build-depends: base <4.14+ , bytestring , pretty-simple , vulkan buildable: True@@ -495,6 +494,7 @@ executable sdl-triangle main-is: Main.hs other-modules:+ ShaderQQ Paths_vulkan hs-source-dirs: examples/sdl-triangle@@ -506,12 +506,16 @@ base <4.14 , bytestring , extra+ , file-embed , managed , pretty-show , say , sdl2+ , template-haskell+ , temporary , text , transformers+ , typed-process , vector , vulkan buildable: True