{-# language CPP #-}
-- | = Name
--
-- VK_EXT_descriptor_buffer - device extension
--
-- = VK_EXT_descriptor_buffer
--
-- [__Name String__]
--     @VK_EXT_descriptor_buffer@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     317
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Ratified
--
-- [__Extension and Version Dependencies__]
--                     
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_get_physical_device_properties2 VK_KHR_get_physical_device_properties2>
--                      or
--                     
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#versions-1.1 Vulkan Version 1.1>
--                  and
--                 
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_buffer_device_address VK_KHR_buffer_device_address>
--                  and
--                 
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_indexing VK_EXT_descriptor_indexing>
--              or
--             
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#versions-1.2 Vulkan Version 1.2>
--          and
--         
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_synchronization2 VK_KHR_synchronization2>
--     or
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#versions-1.3 Vulkan Version 1.3>
--
-- [__API Interactions__]
--
--     -   Interacts with VK_KHR_acceleration_structure
--
--     -   Interacts with VK_NV_ray_tracing
--
-- [__Deprecation State__]
--
--     -   /Deprecated/ by
--         <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_heap VK_EXT_descriptor_heap>
--         extension
--
-- [__Contact__]
--
--     -   Tobias Hector
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_EXT_descriptor_buffer] @tobski%0A*Here describe the issue or question you have about the VK_EXT_descriptor_buffer extension* >
--
-- [__Extension Proposal__]
--     <https://github.com/KhronosGroup/Vulkan-Docs/tree/main/proposals/VK_EXT_descriptor_buffer.adoc VK_EXT_descriptor_buffer>
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2021-06-07
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Contributors__]
--
--     -   Tobias Hector, AMD
--
--     -   Stu Smith, AMD
--
--     -   Maciej Jesionowski, AMD
--
--     -   Boris Zanin, AMD
--
--     -   Hans-Kristian Arntzen, Valve
--
--     -   Connor Abbott, Valve
--
--     -   Baldur Karlsson, Valve
--
--     -   Mike Blumenkrantz, Valve
--
--     -   Graeme Leese, Broadcom
--
--     -   Jan-Harald Fredriksen, Arm
--
--     -   Rodrigo Locatti, NVIDIA
--
--     -   Jeff Bolz, NVIDIA
--
--     -   Piers Daniell, NVIDIA
--
--     -   Jeff Leger, QUALCOMM
--
--     -   Lionel Landwerlin, Intel
--
--     -   Slawomir Grajewski, Intel
--
-- == Description
--
-- This extension introduces new commands to put shader-accessible
-- descriptors directly in memory, making the management of descriptor data
-- more explicit.
--
-- == Deprecation by @VK_EXT_descriptor_heap@
--
-- Functionality in this extension is deprecated by the
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_heap VK_EXT_descriptor_heap>
-- extension. See
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#legacy-descriptor-sets Descriptor Management: Replaced by Descriptor Heaps>.
--
-- == New Commands
--
-- -   'cmdBindDescriptorBufferEmbeddedSamplersEXT'
--
-- -   'cmdBindDescriptorBuffersEXT'
--
-- -   'cmdSetDescriptorBufferOffsetsEXT'
--
-- -   'getBufferOpaqueCaptureDescriptorDataEXT'
--
-- -   'getDescriptorEXT'
--
-- -   'getDescriptorSetLayoutBindingOffsetEXT'
--
-- -   'getDescriptorSetLayoutSizeEXT'
--
-- -   'getImageOpaqueCaptureDescriptorDataEXT'
--
-- -   'getImageViewOpaqueCaptureDescriptorDataEXT'
--
-- -   'getSamplerOpaqueCaptureDescriptorDataEXT'
--
-- If
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_acceleration_structure VK_KHR_acceleration_structure>
-- or
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing VK_NV_ray_tracing>
-- is supported:
--
-- -   'getAccelerationStructureOpaqueCaptureDescriptorDataEXT'
--
-- == New Structures
--
-- -   'BufferCaptureDescriptorDataInfoEXT'
--
-- -   'DescriptorAddressInfoEXT'
--
-- -   'DescriptorBufferBindingInfoEXT'
--
-- -   'DescriptorGetInfoEXT'
--
-- -   'ImageCaptureDescriptorDataInfoEXT'
--
-- -   'ImageViewCaptureDescriptorDataInfoEXT'
--
-- -   'SamplerCaptureDescriptorDataInfoEXT'
--
-- -   Extending 'Vulkan.Core10.Buffer.BufferCreateInfo',
--     'Vulkan.Core10.Image.ImageCreateInfo',
--     'Vulkan.Core10.ImageView.ImageViewCreateInfo',
--     'Vulkan.Core10.Sampler.SamplerCreateInfo',
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.AccelerationStructureCreateInfoKHR',
--     'Vulkan.Extensions.VK_NV_ray_tracing.AccelerationStructureCreateInfoNV',
--     'Vulkan.Extensions.VK_ARM_tensors.TensorCreateInfoARM',
--     'Vulkan.Extensions.VK_ARM_tensors.TensorViewCreateInfoARM':
--
--     -   'OpaqueCaptureDescriptorDataCreateInfoEXT'
--
-- -   Extending 'DescriptorBufferBindingInfoEXT':
--
--     -   'DescriptorBufferBindingPushDescriptorBufferHandleEXT'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceDescriptorBufferFeaturesEXT'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2':
--
--     -   'PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT'
--
--     -   'PhysicalDeviceDescriptorBufferPropertiesEXT'
--
-- If
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_acceleration_structure VK_KHR_acceleration_structure>
-- or
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing VK_NV_ray_tracing>
-- is supported:
--
-- -   'AccelerationStructureCaptureDescriptorDataInfoEXT'
--
-- == New Unions
--
-- -   'DescriptorDataEXT'
--
-- == New Enum Constants
--
-- -   'EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME'
--
-- -   'EXT_DESCRIPTOR_BUFFER_SPEC_VERSION'
--
-- -   Extending
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.AccelerationStructureCreateFlagBitsKHR':
--
--     -   'Vulkan.Extensions.VK_KHR_acceleration_structure.ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT'
--
-- -   Extending 'Vulkan.Core13.Enums.AccessFlags2.AccessFlagBits2':
--
--     -   'Vulkan.Core13.Enums.AccessFlags2.ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT'
--
-- -   Extending
--     'Vulkan.Core10.Enums.BufferCreateFlagBits.BufferCreateFlagBits':
--
--     -   'Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT'
--
-- -   Extending
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BufferUsageFlagBits':
--
--     -   'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT'
--
--     -   'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT'
--
--     -   'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT'
--
-- -   Extending
--     'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DescriptorSetLayoutCreateFlagBits':
--
--     -   'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT'
--
--     -   'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT'
--
-- -   Extending
--     'Vulkan.Core10.Enums.ImageCreateFlagBits.ImageCreateFlagBits':
--
--     -   'IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT'
--
-- -   Extending
--     'Vulkan.Core10.Enums.ImageViewCreateFlagBits.ImageViewCreateFlagBits':
--
--     -   'Vulkan.Core10.Enums.ImageViewCreateFlagBits.IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT'
--
-- -   Extending
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits':
--
--     -   'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT'
--
-- -   Extending
--     'Vulkan.Core10.Enums.SamplerCreateFlagBits.SamplerCreateFlagBits':
--
--     -   'Vulkan.Core10.Enums.SamplerCreateFlagBits.SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT'
--
-- If
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_acceleration_structure VK_KHR_acceleration_structure>
-- or
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing VK_NV_ray_tracing>
-- is supported:
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT'
--
-- == Version History
--
-- -   Revision 1, 2021-06-07 (Stu Smith)
--
--     -   Initial revision
--
-- == See Also
--
-- No cross-references are available
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#VK_EXT_descriptor_buffer Vulkan Specification>.
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_EXT_descriptor_buffer  ( getDescriptorSetLayoutSizeEXT
                                                   , getDescriptorSetLayoutBindingOffsetEXT
                                                   , getDescriptorEXT
                                                   , cmdBindDescriptorBuffersEXT
                                                   , cmdSetDescriptorBufferOffsetsEXT
                                                   , cmdBindDescriptorBufferEmbeddedSamplersEXT
                                                   , getBufferOpaqueCaptureDescriptorDataEXT
                                                   , getImageOpaqueCaptureDescriptorDataEXT
                                                   , getImageViewOpaqueCaptureDescriptorDataEXT
                                                   , getSamplerOpaqueCaptureDescriptorDataEXT
                                                   , getAccelerationStructureOpaqueCaptureDescriptorDataEXT
                                                   , pattern IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
                                                   , PhysicalDeviceDescriptorBufferFeaturesEXT(..)
                                                   , PhysicalDeviceDescriptorBufferPropertiesEXT(..)
                                                   , PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT(..)
                                                   , DescriptorAddressInfoEXT(..)
                                                   , DescriptorBufferBindingInfoEXT(..)
                                                   , DescriptorBufferBindingPushDescriptorBufferHandleEXT(..)
                                                   , DescriptorGetInfoEXT(..)
                                                   , BufferCaptureDescriptorDataInfoEXT(..)
                                                   , ImageCaptureDescriptorDataInfoEXT(..)
                                                   , ImageViewCaptureDescriptorDataInfoEXT(..)
                                                   , SamplerCaptureDescriptorDataInfoEXT(..)
                                                   , AccelerationStructureCaptureDescriptorDataInfoEXT(..)
                                                   , OpaqueCaptureDescriptorDataCreateInfoEXT(..)
                                                   , DescriptorDataEXT(..)
                                                   , peekDescriptorDataEXT
                                                   , EXT_DESCRIPTOR_BUFFER_SPEC_VERSION
                                                   , pattern EXT_DESCRIPTOR_BUFFER_SPEC_VERSION
                                                   , EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME
                                                   , pattern EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME
                                                   , AccelerationStructureKHR(..)
                                                   , AccelerationStructureNV(..)
                                                   , AccelerationStructureCreateFlagBitsKHR(..)
                                                   , AccelerationStructureCreateFlagsKHR
                                                   ) where

import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import Foreign.Marshal.Utils (maybePeek)
import Foreign.Marshal.Utils (with)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Data.Coerce (coerce)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Control.Monad.Trans.Cont (runContT)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import Foreign.C.Types (CSize(..))
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.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))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import Data.Word (Word32)
import Data.Word (Word64)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.CStruct.Extends (pokeSomeCStruct)
import Vulkan.NamedType ((:::))
import Vulkan.Extensions.Handles (AccelerationStructureKHR)
import Vulkan.Extensions.Handles (AccelerationStructureNV)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Handles (Buffer)
import Vulkan.Core10.Enums.BufferUsageFlagBits (BufferUsageFlags)
import {-# SOURCE #-} Vulkan.Core14.Promoted_From_VK_KHR_maintenance5Roadmap (BufferUsageFlags2CreateInfo)
import Vulkan.CStruct.Extends (Chain)
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer))
import Vulkan.Core10.Handles (CommandBuffer_T)
import {-# SOURCE #-} Vulkan.Extensions.VK_ARM_tensors (DescriptorGetTensorInfoARM)
import Vulkan.Core10.DescriptorSet (DescriptorImageInfo)
import Vulkan.Core10.Handles (DescriptorSetLayout)
import Vulkan.Core10.Handles (DescriptorSetLayout(..))
import Vulkan.Core10.Enums.DescriptorType (DescriptorType)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Core10.FundamentalTypes (DeviceAddress)
import Vulkan.Dynamic (DeviceCmds(pVkCmdBindDescriptorBufferEmbeddedSamplersEXT))
import Vulkan.Dynamic (DeviceCmds(pVkCmdBindDescriptorBuffersEXT))
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetDescriptorBufferOffsetsEXT))
import Vulkan.Dynamic (DeviceCmds(pVkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT))
import Vulkan.Dynamic (DeviceCmds(pVkGetBufferOpaqueCaptureDescriptorDataEXT))
import Vulkan.Dynamic (DeviceCmds(pVkGetDescriptorEXT))
import Vulkan.Dynamic (DeviceCmds(pVkGetDescriptorSetLayoutBindingOffsetEXT))
import Vulkan.Dynamic (DeviceCmds(pVkGetDescriptorSetLayoutSizeEXT))
import Vulkan.Dynamic (DeviceCmds(pVkGetImageOpaqueCaptureDescriptorDataEXT))
import Vulkan.Dynamic (DeviceCmds(pVkGetImageViewOpaqueCaptureDescriptorDataEXT))
import Vulkan.Dynamic (DeviceCmds(pVkGetSamplerOpaqueCaptureDescriptorDataEXT))
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.Core10.Handles (Device_T)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.Core10.Handles (Image)
import Vulkan.Core10.Handles (ImageView)
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PeekChain(..))
import Vulkan.Core10.Enums.PipelineBindPoint (PipelineBindPoint)
import Vulkan.Core10.Enums.PipelineBindPoint (PipelineBindPoint(..))
import Vulkan.Core10.Handles (PipelineLayout)
import Vulkan.Core10.Handles (PipelineLayout(..))
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Handles (Sampler)
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.DescriptorType (DescriptorType(DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR))
import Vulkan.Core10.Enums.DescriptorType (DescriptorType(DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER))
import Vulkan.Core10.Enums.DescriptorType (DescriptorType(DESCRIPTOR_TYPE_INPUT_ATTACHMENT))
import Vulkan.Core10.Enums.DescriptorType (DescriptorType(DESCRIPTOR_TYPE_SAMPLED_IMAGE))
import Vulkan.Core10.Enums.DescriptorType (DescriptorType(DESCRIPTOR_TYPE_SAMPLER))
import Vulkan.Core10.Enums.DescriptorType (DescriptorType(DESCRIPTOR_TYPE_STORAGE_BUFFER))
import Vulkan.Core10.Enums.DescriptorType (DescriptorType(DESCRIPTOR_TYPE_STORAGE_IMAGE))
import Vulkan.Core10.Enums.DescriptorType (DescriptorType(DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER))
import Vulkan.Core10.Enums.DescriptorType (DescriptorType(DESCRIPTOR_TYPE_UNIFORM_BUFFER))
import Vulkan.Core10.Enums.DescriptorType (DescriptorType(DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER))
import Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlags)
import Vulkan.Core10.Enums.ImageCreateFlagBits (ImageCreateFlagBits(IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.VK_KHR_acceleration_structure (AccelerationStructureCreateFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (AccelerationStructureCreateFlagsKHR)
import Vulkan.Extensions.Handles (AccelerationStructureKHR(..))
import Vulkan.Extensions.Handles (AccelerationStructureNV(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetDescriptorSetLayoutSizeEXT
  :: FunPtr (Ptr Device_T -> DescriptorSetLayout -> Ptr DeviceSize -> IO ()) -> Ptr Device_T -> DescriptorSetLayout -> Ptr DeviceSize -> IO ()

-- | vkGetDescriptorSetLayoutSizeEXT - Get the size of a descriptor set
-- layout in memory
--
-- = Description
--
-- The size of a descriptor set layout will be at least as large as the sum
-- total of the size of all descriptors in the layout, and /may/ be larger.
-- This size represents the amount of memory that will be required to store
-- all of the descriptors for this layout in memory, when placed according
-- to the layout’s offsets as obtained by
-- 'getDescriptorSetLayoutBindingOffsetEXT'.
--
-- If any @binding@ in @layout@ is
-- 'Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT',
-- the returned size includes space for the maximum @descriptorCount@
-- descriptors as declared for that @binding@. To compute the required size
-- of a descriptor set with a
-- 'Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT':
--
-- -   size = offset + descriptorSize × variableDescriptorCount
--
-- where offset is obtained by 'getDescriptorSetLayoutBindingOffsetEXT' and
-- descriptorSize is the size of the relevant descriptor as obtained from
-- 'PhysicalDeviceDescriptorBufferPropertiesEXT', and
-- variableDescriptorCount is the equivalent of
-- 'Vulkan.Core12.Promoted_From_VK_EXT_descriptor_indexing.DescriptorSetVariableDescriptorCountAllocateInfo'::@pDescriptorCounts@.
-- For
-- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK',
-- variableDescriptorCount is the size in bytes for the inline uniform
-- block, and descriptorSize is 1.
--
-- If
-- 'PhysicalDeviceDescriptorBufferPropertiesEXT'::@combinedImageSamplerDescriptorSingleArray@
-- is 'Vulkan.Core10.FundamentalTypes.FALSE' and the variable descriptor
-- type is
-- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',
-- variableDescriptorCount is always considered to be the upper bound.
--
-- == Valid Usage
--
-- -   #VUID-vkGetDescriptorSetLayoutSizeEXT-None-08011# The
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-descriptorBuffer descriptorBuffer>
--     feature /must/ be enabled
--
-- -   #VUID-vkGetDescriptorSetLayoutSizeEXT-layout-08012# @layout@ /must/
--     have been created with the
--     'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT'
--     flag set
--
-- -   #VUID-vkGetDescriptorSetLayoutSizeEXT-layout-11811# @layout@ /must/
--     have not been created with the
--     'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT'
--     flag set
--
-- -   #VUID-vkGetDescriptorSetLayoutSizeEXT-layout-11812# @layout@ /must/
--     have not been created with the
--     'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT'
--     flag set
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetDescriptorSetLayoutSizeEXT-device-parameter# @device@
--     /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkGetDescriptorSetLayoutSizeEXT-layout-parameter# @layout@
--     /must/ be a valid 'Vulkan.Core10.Handles.DescriptorSetLayout' handle
--
-- -   #VUID-vkGetDescriptorSetLayoutSizeEXT-pLayoutSizeInBytes-parameter#
--     @pLayoutSizeInBytes@ /must/ be a valid pointer to a
--     'Vulkan.Core10.FundamentalTypes.DeviceSize' value
--
-- -   #VUID-vkGetDescriptorSetLayoutSizeEXT-layout-parent# @layout@ /must/
--     have been created, allocated, or retrieved from @device@
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Handles.DescriptorSetLayout',
-- 'Vulkan.Core10.Handles.Device',
-- 'Vulkan.Core10.FundamentalTypes.DeviceSize'
getDescriptorSetLayoutSizeEXT :: forall io
                               . (MonadIO io)
                              => -- | @device@ is the logical device that gets the size.
                                 Device
                              -> -- | @layout@ is the descriptor set layout being queried.
                                 DescriptorSetLayout
                              -> io (("layoutSizeInBytes" ::: DeviceSize))
getDescriptorSetLayoutSizeEXT :: forall (io :: * -> *).
MonadIO io =>
Device -> DescriptorSetLayout -> io DeviceAddress
getDescriptorSetLayoutSizeEXT Device
device DescriptorSetLayout
layout = IO DeviceAddress -> io DeviceAddress
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DeviceAddress -> io DeviceAddress)
-> (ContT DeviceAddress IO DeviceAddress -> IO DeviceAddress)
-> ContT DeviceAddress IO DeviceAddress
-> io DeviceAddress
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT DeviceAddress IO DeviceAddress -> IO DeviceAddress
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT DeviceAddress IO DeviceAddress -> io DeviceAddress)
-> ContT DeviceAddress IO DeviceAddress -> io DeviceAddress
forall a b. (a -> b) -> a -> b
$ do
  let vkGetDescriptorSetLayoutSizeEXTPtr :: FunPtr
  (Ptr Device_T -> DescriptorSetLayout -> Ptr DeviceAddress -> IO ())
vkGetDescriptorSetLayoutSizeEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T -> DescriptorSetLayout -> Ptr DeviceAddress -> IO ())
pVkGetDescriptorSetLayoutSizeEXT (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  IO () -> ContT DeviceAddress IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT DeviceAddress m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT DeviceAddress IO ())
-> IO () -> ContT DeviceAddress IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T -> DescriptorSetLayout -> Ptr DeviceAddress -> IO ())
vkGetDescriptorSetLayoutSizeEXTPtr FunPtr
  (Ptr Device_T -> DescriptorSetLayout -> Ptr DeviceAddress -> IO ())
-> FunPtr
     (Ptr Device_T -> DescriptorSetLayout -> Ptr DeviceAddress -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T -> DescriptorSetLayout -> Ptr DeviceAddress -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetDescriptorSetLayoutSizeEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetDescriptorSetLayoutSizeEXT' :: Ptr Device_T -> DescriptorSetLayout -> Ptr DeviceAddress -> IO ()
vkGetDescriptorSetLayoutSizeEXT' = FunPtr
  (Ptr Device_T -> DescriptorSetLayout -> Ptr DeviceAddress -> IO ())
-> Ptr Device_T
-> DescriptorSetLayout
-> Ptr DeviceAddress
-> IO ()
mkVkGetDescriptorSetLayoutSizeEXT FunPtr
  (Ptr Device_T -> DescriptorSetLayout -> Ptr DeviceAddress -> IO ())
vkGetDescriptorSetLayoutSizeEXTPtr
  pPLayoutSizeInBytes <- ((Ptr DeviceAddress -> IO DeviceAddress) -> IO DeviceAddress)
-> ContT DeviceAddress IO (Ptr DeviceAddress)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr DeviceAddress -> IO DeviceAddress) -> IO DeviceAddress)
 -> ContT DeviceAddress IO (Ptr DeviceAddress))
-> ((Ptr DeviceAddress -> IO DeviceAddress) -> IO DeviceAddress)
-> ContT DeviceAddress IO (Ptr DeviceAddress)
forall a b. (a -> b) -> a -> b
$ IO (Ptr DeviceAddress)
-> (Ptr DeviceAddress -> IO ())
-> (Ptr DeviceAddress -> IO DeviceAddress)
-> IO DeviceAddress
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @DeviceSize Int
8) Ptr DeviceAddress -> IO ()
forall a. Ptr a -> IO ()
free
  lift $ traceAroundEvent "vkGetDescriptorSetLayoutSizeEXT" (vkGetDescriptorSetLayoutSizeEXT'
                                                               (deviceHandle (device))
                                                               (layout)
                                                               (pPLayoutSizeInBytes))
  pLayoutSizeInBytes <- lift $ peek @DeviceSize pPLayoutSizeInBytes
  pure $ (pLayoutSizeInBytes)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetDescriptorSetLayoutBindingOffsetEXT
  :: FunPtr (Ptr Device_T -> DescriptorSetLayout -> Word32 -> Ptr DeviceSize -> IO ()) -> Ptr Device_T -> DescriptorSetLayout -> Word32 -> Ptr DeviceSize -> IO ()

-- | vkGetDescriptorSetLayoutBindingOffsetEXT - Get the offset of a binding
-- within a descriptor set layout
--
-- = Description
--
-- Each binding in a descriptor set layout is assigned an offset in memory
-- by the implementation. When a shader accesses a resource with that
-- binding, it will access the bound descriptor buffer from that offset to
-- look for its descriptor. This command provides an application with that
-- offset, so that descriptors can be placed in the correct locations. The
-- precise location accessed by a shader for a given descriptor is as
-- follows:
--
-- -   location = bufferAddress + setOffset + descriptorOffset +
--     (arrayElement × descriptorSize)
--
-- where bufferAddress and setOffset are the base address and offset for
-- the identified descriptor set as specified by
-- 'cmdBindDescriptorBuffersEXT' and 'cmdSetDescriptorBufferOffsetsEXT',
-- descriptorOffset is the offset for the binding returned by this command,
-- arrayElement is the index into the array specified in the shader, and
-- descriptorSize is the size of the relevant descriptor as obtained from
-- 'PhysicalDeviceDescriptorBufferPropertiesEXT'. Applications are
-- responsible for placing valid descriptors at the expected location in
-- order for a shader to access it. The overall offset added to
-- bufferAddress to calculate location /must/ be less than
-- 'PhysicalDeviceDescriptorBufferPropertiesEXT'::@maxSamplerDescriptorBufferRange@
-- for samplers and
-- 'PhysicalDeviceDescriptorBufferPropertiesEXT'::@maxResourceDescriptorBufferRange@
-- for resources.
--
-- If any @binding@ in @layout@ is
-- 'Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT',
-- that @binding@ /must/ have the largest offset of any @binding@.
--
-- A descriptor @binding@ with type
-- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_MUTABLE_EXT' /can/
-- be used. Any potential types in
-- 'Vulkan.Extensions.VK_EXT_mutable_descriptor_type.MutableDescriptorTypeCreateInfoEXT'::@pDescriptorTypes@
-- for @binding@ share the same offset. If the size of the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-mutable mutable descriptor>
-- is larger than the size of a concrete descriptor type being accessed,
-- the padding area is ignored by the implementation.
--
-- == Valid Usage
--
-- -   #VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-None-08013# The
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-descriptorBuffer descriptorBuffer>
--     feature /must/ be enabled
--
-- -   #VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-layout-08014#
--     @layout@ /must/ have been created with the
--     'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT'
--     flag set
--
-- -   #VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-layout-11813#
--     @layout@ /must/ have not been created with the
--     'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT'
--     flag set
--
-- -   #VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-layout-11814#
--     @layout@ /must/ have not been created with the
--     'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT'
--     flag set
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-device-parameter#
--     @device@ /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-layout-parameter#
--     @layout@ /must/ be a valid
--     'Vulkan.Core10.Handles.DescriptorSetLayout' handle
--
-- -   #VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-pOffset-parameter#
--     @pOffset@ /must/ be a valid pointer to a
--     'Vulkan.Core10.FundamentalTypes.DeviceSize' value
--
-- -   #VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-layout-parent#
--     @layout@ /must/ have been created, allocated, or retrieved from
--     @device@
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Handles.DescriptorSetLayout',
-- 'Vulkan.Core10.Handles.Device',
-- 'Vulkan.Core10.FundamentalTypes.DeviceSize'
getDescriptorSetLayoutBindingOffsetEXT :: forall io
                                        . (MonadIO io)
                                       => -- | @device@ is the logical device that gets the offset.
                                          Device
                                       -> -- | @layout@ is the descriptor set layout being queried.
                                          DescriptorSetLayout
                                       -> -- | @binding@ is the binding number being queried.
                                          ("binding" ::: Word32)
                                       -> io (("offset" ::: DeviceSize))
getDescriptorSetLayoutBindingOffsetEXT :: forall (io :: * -> *).
MonadIO io =>
Device
-> DescriptorSetLayout
-> ("binding" ::: Word32)
-> io DeviceAddress
getDescriptorSetLayoutBindingOffsetEXT Device
device
                                         DescriptorSetLayout
layout
                                         "binding" ::: Word32
binding = IO DeviceAddress -> io DeviceAddress
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DeviceAddress -> io DeviceAddress)
-> (ContT DeviceAddress IO DeviceAddress -> IO DeviceAddress)
-> ContT DeviceAddress IO DeviceAddress
-> io DeviceAddress
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT DeviceAddress IO DeviceAddress -> IO DeviceAddress
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT DeviceAddress IO DeviceAddress -> io DeviceAddress)
-> ContT DeviceAddress IO DeviceAddress -> io DeviceAddress
forall a b. (a -> b) -> a -> b
$ do
  let vkGetDescriptorSetLayoutBindingOffsetEXTPtr :: FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("binding" ::: Word32)
   -> Ptr DeviceAddress
   -> IO ())
vkGetDescriptorSetLayoutBindingOffsetEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> DescriptorSetLayout
      -> ("binding" ::: Word32)
      -> Ptr DeviceAddress
      -> IO ())
pVkGetDescriptorSetLayoutBindingOffsetEXT (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  IO () -> ContT DeviceAddress IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT DeviceAddress m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT DeviceAddress IO ())
-> IO () -> ContT DeviceAddress IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("binding" ::: Word32)
   -> Ptr DeviceAddress
   -> IO ())
vkGetDescriptorSetLayoutBindingOffsetEXTPtr FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("binding" ::: Word32)
   -> Ptr DeviceAddress
   -> IO ())
-> FunPtr
     (Ptr Device_T
      -> DescriptorSetLayout
      -> ("binding" ::: Word32)
      -> Ptr DeviceAddress
      -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("binding" ::: Word32)
   -> Ptr DeviceAddress
   -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetDescriptorSetLayoutBindingOffsetEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetDescriptorSetLayoutBindingOffsetEXT' :: Ptr Device_T
-> DescriptorSetLayout
-> ("binding" ::: Word32)
-> Ptr DeviceAddress
-> IO ()
vkGetDescriptorSetLayoutBindingOffsetEXT' = FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("binding" ::: Word32)
   -> Ptr DeviceAddress
   -> IO ())
-> Ptr Device_T
-> DescriptorSetLayout
-> ("binding" ::: Word32)
-> Ptr DeviceAddress
-> IO ()
mkVkGetDescriptorSetLayoutBindingOffsetEXT FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("binding" ::: Word32)
   -> Ptr DeviceAddress
   -> IO ())
vkGetDescriptorSetLayoutBindingOffsetEXTPtr
  pPOffset <- ((Ptr DeviceAddress -> IO DeviceAddress) -> IO DeviceAddress)
-> ContT DeviceAddress IO (Ptr DeviceAddress)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr DeviceAddress -> IO DeviceAddress) -> IO DeviceAddress)
 -> ContT DeviceAddress IO (Ptr DeviceAddress))
-> ((Ptr DeviceAddress -> IO DeviceAddress) -> IO DeviceAddress)
-> ContT DeviceAddress IO (Ptr DeviceAddress)
forall a b. (a -> b) -> a -> b
$ IO (Ptr DeviceAddress)
-> (Ptr DeviceAddress -> IO ())
-> (Ptr DeviceAddress -> IO DeviceAddress)
-> IO DeviceAddress
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @DeviceSize Int
8) Ptr DeviceAddress -> IO ()
forall a. Ptr a -> IO ()
free
  lift $ traceAroundEvent "vkGetDescriptorSetLayoutBindingOffsetEXT" (vkGetDescriptorSetLayoutBindingOffsetEXT'
                                                                        (deviceHandle (device))
                                                                        (layout)
                                                                        (binding)
                                                                        (pPOffset))
  pOffset <- lift $ peek @DeviceSize pPOffset
  pure $ (pOffset)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetDescriptorEXT
  :: FunPtr (Ptr Device_T -> Ptr (SomeStruct DescriptorGetInfoEXT) -> CSize -> Ptr () -> IO ()) -> Ptr Device_T -> Ptr (SomeStruct DescriptorGetInfoEXT) -> CSize -> Ptr () -> IO ()

-- | vkGetDescriptorEXT - To get a descriptor to place in a buffer
--
-- = Description
--
-- The size of the data for each descriptor type is determined by the value
-- in 'PhysicalDeviceDescriptorBufferPropertiesEXT'. This value also
-- defines the stride in bytes for arrays of that descriptor type.
--
-- If the
-- 'PhysicalDeviceDescriptorBufferPropertiesEXT'::@combinedImageSamplerDescriptorSingleArray@
-- property is 'Vulkan.Core10.FundamentalTypes.FALSE' the implementation
-- requires an array of
-- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'
-- descriptors to be written into a descriptor buffer as an array of image
-- descriptors, immediately followed by an array of sampler descriptors.
-- Applications /must/ write the first
-- 'PhysicalDeviceDescriptorBufferPropertiesEXT'::@sampledImageDescriptorSize@
-- bytes of the data returned through @pDescriptor@ to the first array, and
-- the remaining
-- 'PhysicalDeviceDescriptorBufferPropertiesEXT'::@samplerDescriptorSize@
-- bytes of the data to the second array. For variable-sized descriptor
-- bindings of
-- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'
-- descriptors, the two arrays each have a size equal to the upper bound
-- @descriptorCount@ of that binding.
--
-- A descriptor obtained by this command references the underlying
-- 'Vulkan.Core10.Handles.ImageView' or 'Vulkan.Core10.Handles.Sampler',
-- and these objects /must/ not be destroyed before the last time a
-- descriptor is dynamically accessed. For descriptor types which consume
-- an address instead of an object, the underlying
-- 'Vulkan.Core10.Handles.Buffer' is referenced instead.
--
-- == Valid Usage
--
-- -   #VUID-vkGetDescriptorEXT-None-08015# The
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-descriptorBuffer descriptorBuffer>
--     feature /must/ be enabled
--
-- -   #VUID-vkGetDescriptorEXT-dataSize-08125# If @pDescriptorInfo->type@
--     is not
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'
--     or @pDescriptorInfo->data.pCombinedImageSampler@ has an @imageView@
--     member that was not created with a
--     'Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionInfo'
--     structure in its @pNext@ chain, @dataSize@ /must/ equal the size of
--     a descriptor of type 'DescriptorGetInfoEXT'::@type@ determined by
--     the value in 'PhysicalDeviceDescriptorBufferPropertiesEXT' , or
--     determined by
--     'PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT'::@combinedImageSamplerDensityMapDescriptorSize@
--     if @pDescriptorInfo@ specifies a
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'
--     whose 'Vulkan.Core10.Handles.Sampler' was created with
--     'Vulkan.Core10.Enums.SamplerCreateFlagBits.SAMPLER_CREATE_SUBSAMPLED_BIT_EXT'
--     set
--
-- -   #VUID-vkGetDescriptorEXT-descriptorType-09469# If
--     @pDescriptorInfo->type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'
--     and @pDescriptorInfo->data.pCombinedImageSampler@ has an @imageView@
--     member that was created with a
--     'Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionInfo'
--     structure in its @pNext@ chain, @dataSize@ /must/ equal the size of
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@combinedImageSamplerDescriptorSize@
--     times
--     'Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionImageFormatProperties'::@combinedImageSamplerDescriptorCount@
--
-- -   #VUID-vkGetDescriptorEXT-pDescriptorInfo-09507# If
--     @pDescriptorInfo->type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'
--     and it has a @imageView@ that is
--     'Vulkan.Core10.APIConstants.NULL_HANDLE' then @dataSize@ /must/ be
--     equal to the size of
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@combinedImageSamplerDescriptorSize@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetDescriptorEXT-device-parameter# @device@ /must/ be a
--     valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkGetDescriptorEXT-pDescriptorInfo-parameter#
--     @pDescriptorInfo@ /must/ be a valid pointer to a valid
--     'DescriptorGetInfoEXT' structure
--
-- -   #VUID-vkGetDescriptorEXT-pDescriptor-parameter# @pDescriptor@ /must/
--     be a valid pointer to an array of @dataSize@ bytes
--
-- -   #VUID-vkGetDescriptorEXT-dataSize-arraylength# @dataSize@ /must/ be
--     greater than @0@
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'DescriptorGetInfoEXT', 'Vulkan.Core10.Handles.Device'
getDescriptorEXT :: forall a io
                  . (Extendss DescriptorGetInfoEXT a, PokeChain a, MonadIO io)
                 => -- | @device@ is the logical device that gets the descriptor.
                    Device
                 -> -- | @pDescriptorInfo@ is a pointer to a 'DescriptorGetInfoEXT' structure
                    -- specifying the parameters of the descriptor to get.
                    ("descriptorInfo" ::: DescriptorGetInfoEXT a)
                 -> -- | @dataSize@ is the amount of the descriptor data to get in bytes.
                    ("dataSize" ::: Word64)
                 -> -- | @pDescriptor@ is a pointer to an application-allocated buffer where the
                    -- descriptor will be written.
                    ("descriptor" ::: Ptr ())
                 -> io ()
getDescriptorEXT :: forall (a :: [*]) (io :: * -> *).
(Extendss DescriptorGetInfoEXT a, PokeChain a, MonadIO io) =>
Device
-> ("descriptorInfo" ::: DescriptorGetInfoEXT a)
-> DeviceAddress
-> ("descriptor" ::: Ptr ())
-> io ()
getDescriptorEXT Device
device
                   DescriptorGetInfoEXT a
descriptorInfo
                   DeviceAddress
dataSize
                   "descriptor" ::: Ptr ()
descriptor = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkGetDescriptorEXTPtr :: FunPtr
  (Ptr Device_T
   -> Ptr (SomeStruct DescriptorGetInfoEXT)
   -> CSize
   -> ("descriptor" ::: Ptr ())
   -> IO ())
vkGetDescriptorEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> Ptr (SomeStruct DescriptorGetInfoEXT)
      -> CSize
      -> ("descriptor" ::: Ptr ())
      -> IO ())
pVkGetDescriptorEXT (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> Ptr (SomeStruct DescriptorGetInfoEXT)
   -> CSize
   -> ("descriptor" ::: Ptr ())
   -> IO ())
vkGetDescriptorEXTPtr FunPtr
  (Ptr Device_T
   -> Ptr (SomeStruct DescriptorGetInfoEXT)
   -> CSize
   -> ("descriptor" ::: Ptr ())
   -> IO ())
-> FunPtr
     (Ptr Device_T
      -> Ptr (SomeStruct DescriptorGetInfoEXT)
      -> CSize
      -> ("descriptor" ::: Ptr ())
      -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> Ptr (SomeStruct DescriptorGetInfoEXT)
   -> CSize
   -> ("descriptor" ::: Ptr ())
   -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetDescriptorEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetDescriptorEXT' :: Ptr Device_T
-> Ptr (SomeStruct DescriptorGetInfoEXT)
-> CSize
-> ("descriptor" ::: Ptr ())
-> IO ()
vkGetDescriptorEXT' = FunPtr
  (Ptr Device_T
   -> Ptr (SomeStruct DescriptorGetInfoEXT)
   -> CSize
   -> ("descriptor" ::: Ptr ())
   -> IO ())
-> Ptr Device_T
-> Ptr (SomeStruct DescriptorGetInfoEXT)
-> CSize
-> ("descriptor" ::: Ptr ())
-> IO ()
mkVkGetDescriptorEXT FunPtr
  (Ptr Device_T
   -> Ptr (SomeStruct DescriptorGetInfoEXT)
   -> CSize
   -> ("descriptor" ::: Ptr ())
   -> IO ())
vkGetDescriptorEXTPtr
  pDescriptorInfo <- ((Ptr (DescriptorGetInfoEXT a) -> IO ()) -> IO ())
-> ContT () IO (Ptr (DescriptorGetInfoEXT a))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (DescriptorGetInfoEXT a) -> IO ()) -> IO ())
 -> ContT () IO (Ptr (DescriptorGetInfoEXT a)))
-> ((Ptr (DescriptorGetInfoEXT a) -> IO ()) -> IO ())
-> ContT () IO (Ptr (DescriptorGetInfoEXT a))
forall a b. (a -> b) -> a -> b
$ DescriptorGetInfoEXT a
-> (Ptr (DescriptorGetInfoEXT a) -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
DescriptorGetInfoEXT a
-> (Ptr (DescriptorGetInfoEXT a) -> IO b) -> IO b
withCStruct (DescriptorGetInfoEXT a
descriptorInfo)
  lift $ traceAroundEvent "vkGetDescriptorEXT" (vkGetDescriptorEXT'
                                                  (deviceHandle (device))
                                                  (forgetExtensions pDescriptorInfo)
                                                  (CSize (dataSize))
                                                  (descriptor))
  pure $ ()


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdBindDescriptorBuffersEXT
  :: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr (SomeStruct DescriptorBufferBindingInfoEXT) -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr (SomeStruct DescriptorBufferBindingInfoEXT) -> IO ()

-- | vkCmdBindDescriptorBuffersEXT - Binding descriptor buffers to a command
-- buffer
--
-- = Description
--
-- 'cmdBindDescriptorBuffersEXT' causes any offsets previously set by
-- 'cmdSetDescriptorBufferOffsetsEXT' that use the bindings numbered [@0@..
-- @bufferCount@-1] to be no longer valid for subsequent bound pipeline
-- commands. Any previously bound buffers at binding points greater than or
-- equal to @bufferCount@ are unbound.
--
-- == Valid Usage
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-11295# If
--     @commandBuffer@ is a secondary command buffer, it /must/ have begun
--     with
--     'Vulkan.Extensions.VK_EXT_descriptor_heap.CommandBufferInheritanceDescriptorHeapInfoEXT'::@pSamplerHeapBindInfo@
--     equal to @NULL@
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-11296# If
--     @commandBuffer@ is a secondary command buffer, it /must/ have begun
--     with
--     'Vulkan.Extensions.VK_EXT_descriptor_heap.CommandBufferInheritanceDescriptorHeapInfoEXT'::@pResourceHeapBindInfo@
--     equal to @NULL@
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-None-08047# The
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-descriptorBuffer descriptorBuffer>
--     feature /must/ be enabled
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-maxSamplerDescriptorBufferBindings-08048#
--     There /must/ be no more than
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@maxSamplerDescriptorBufferBindings@
--     elements in @pBindingInfos@ with
--     'DescriptorBufferBindingInfoEXT'::@usage@ containing
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT'
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049#
--     There /must/ be no more than
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@maxResourceDescriptorBufferBindings@
--     elements in @pBindingInfos@ with
--     'DescriptorBufferBindingInfoEXT'::@usage@ containing
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT'
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-None-08050# There /must/ be no
--     more than @1@ element in @pBindingInfos@ with
--     'DescriptorBufferBindingInfoEXT'::@usage@ containing
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT'
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-bufferCount-08051# @bufferCount@
--     /must/ be less than or equal to
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@maxDescriptorBufferBindings@
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08053# For each
--     element of @pBindingInfos@, the buffer from which @address@ was
--     queried /must/ have been created with the
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT'
--     usage flag set if it contains sampler descriptor data
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08054# For each
--     element of @pBindingInfos@, the buffer from which @address@ was
--     queried /must/ have been created with the
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT'
--     usage flag set if it contains resource descriptor data
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08055# For each
--     element of @pBindingInfos@, at least one buffer from which @address@
--     was queried must contain @usage@
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-09947# For all
--     elements of @pBindingInfos@, the buffer from which @address@ was
--     queried /must/ have been created with the
--     'Vulkan.Core14.Enums.BufferUsageFlags2.BUFFER_USAGE_2_DATA_GRAPH_FOREIGN_DESCRIPTOR_BIT_ARM'
--     usage flag set if the command pool from which @commandBuffer@ was
--     allocated from was created with any element of
--     'Vulkan.Extensions.VK_ARM_data_graph.DataGraphProcessingEngineCreateInfoARM'::pProcessingEngines
--     with @isForeign@ set to 'Vulkan.Core10.FundamentalTypes.TRUE'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-parameter#
--     @pBindingInfos@ /must/ be a valid pointer to an array of
--     @bufferCount@ valid 'DescriptorBufferBindingInfoEXT' structures
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-recording#
--     @commandBuffer@ /must/ be in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-cmdpool# The
--     'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support
--     'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_COMPUTE_BIT',
--     'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_DATA_GRAPH_BIT_ARM', or
--     'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_GRAPHICS_BIT' operations
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-videocoding# This command /must/
--     only be called outside of a video coding scope
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-bufferCount-arraylength#
--     @bufferCount@ /must/ be greater than @0@
--
-- == Host Synchronization
--
-- -   Host access to @commandBuffer@ /must/ be externally synchronized
--
-- -   Host access to the 'Vulkan.Core10.Handles.CommandPool' that
--     @commandBuffer@ was allocated from /must/ be externally synchronized
--
-- == Command Properties
--
-- \'
--
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
-- | <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#vkCmdBeginVideoCodingKHR Video Coding 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#fundamentals-queueoperation-command-types Command Type> |
-- +============================================================================================================================+========================================================================================================================+=============================================================================================================================+=======================================================================================================================+========================================================================================================================================+
-- | Primary                                                                                                                    | Both                                                                                                                   | Outside                                                                                                                     | VK_QUEUE_COMPUTE_BIT                                                                                                  | State                                                                                                                                  |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             | VK_QUEUE_DATA_GRAPH_BIT_ARM                                                                                           |                                                                                                                                        |
-- |                                                                                                                            |                                                                                                                        |                                                                                                                             | VK_QUEUE_GRAPHICS_BIT                                                                                                 |                                                                                                                                        |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- == Conditional Rendering
--
-- vkCmdBindDescriptorBuffersEXT is not affected by
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#drawing-conditional-rendering conditional rendering>
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Handles.CommandBuffer', 'DescriptorBufferBindingInfoEXT'
cmdBindDescriptorBuffersEXT :: forall io
                             . (MonadIO io)
                            => -- | @commandBuffer@ is the command buffer that the descriptor buffers will
                               -- be bound to.
                               CommandBuffer
                            -> -- | @pBindingInfos@ is a pointer to an array of
                               -- 'DescriptorBufferBindingInfoEXT' structures.
                               ("bindingInfos" ::: Vector (SomeStruct DescriptorBufferBindingInfoEXT))
                            -> io ()
cmdBindDescriptorBuffersEXT :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("bindingInfos"
    ::: Vector (SomeStruct DescriptorBufferBindingInfoEXT))
-> io ()
cmdBindDescriptorBuffersEXT CommandBuffer
commandBuffer "bindingInfos"
::: Vector (SomeStruct DescriptorBufferBindingInfoEXT)
bindingInfos = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkCmdBindDescriptorBuffersEXTPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> ("binding" ::: Word32)
   -> Ptr (SomeStruct DescriptorBufferBindingInfoEXT)
   -> IO ())
vkCmdBindDescriptorBuffersEXTPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> ("binding" ::: Word32)
      -> Ptr (SomeStruct DescriptorBufferBindingInfoEXT)
      -> IO ())
pVkCmdBindDescriptorBuffersEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> ("binding" ::: Word32)
   -> Ptr (SomeStruct DescriptorBufferBindingInfoEXT)
   -> IO ())
vkCmdBindDescriptorBuffersEXTPtr FunPtr
  (Ptr CommandBuffer_T
   -> ("binding" ::: Word32)
   -> Ptr (SomeStruct DescriptorBufferBindingInfoEXT)
   -> IO ())
-> FunPtr
     (Ptr CommandBuffer_T
      -> ("binding" ::: Word32)
      -> Ptr (SomeStruct DescriptorBufferBindingInfoEXT)
      -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr CommandBuffer_T
   -> ("binding" ::: Word32)
   -> Ptr (SomeStruct DescriptorBufferBindingInfoEXT)
   -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdBindDescriptorBuffersEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCmdBindDescriptorBuffersEXT' :: Ptr CommandBuffer_T
-> ("binding" ::: Word32)
-> Ptr (SomeStruct DescriptorBufferBindingInfoEXT)
-> IO ()
vkCmdBindDescriptorBuffersEXT' = FunPtr
  (Ptr CommandBuffer_T
   -> ("binding" ::: Word32)
   -> Ptr (SomeStruct DescriptorBufferBindingInfoEXT)
   -> IO ())
-> Ptr CommandBuffer_T
-> ("binding" ::: Word32)
-> Ptr (SomeStruct DescriptorBufferBindingInfoEXT)
-> IO ()
mkVkCmdBindDescriptorBuffersEXT FunPtr
  (Ptr CommandBuffer_T
   -> ("binding" ::: Word32)
   -> Ptr (SomeStruct DescriptorBufferBindingInfoEXT)
   -> IO ())
vkCmdBindDescriptorBuffersEXTPtr
  pPBindingInfos <- ((Ptr (DescriptorBufferBindingInfoEXT (ZonkAny 0)) -> IO ())
 -> IO ())
-> ContT () IO (Ptr (DescriptorBufferBindingInfoEXT (ZonkAny 0)))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (DescriptorBufferBindingInfoEXT (ZonkAny 0)) -> IO ())
  -> IO ())
 -> ContT () IO (Ptr (DescriptorBufferBindingInfoEXT (ZonkAny 0))))
-> ((Ptr (DescriptorBufferBindingInfoEXT (ZonkAny 0)) -> IO ())
    -> IO ())
-> ContT () IO (Ptr (DescriptorBufferBindingInfoEXT (ZonkAny 0)))
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @(DescriptorBufferBindingInfoEXT _) ((("bindingInfos"
 ::: Vector (SomeStruct DescriptorBufferBindingInfoEXT))
-> Int
forall a. Vector a -> Int
Data.Vector.length ("bindingInfos"
::: Vector (SomeStruct DescriptorBufferBindingInfoEXT)
bindingInfos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
32)
  Data.Vector.imapM_ (\Int
i SomeStruct DescriptorBufferBindingInfoEXT
e -> ((() -> IO ()) -> IO ()) -> ContT () IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO ()) -> IO ()) -> ContT () IO ())
-> ((() -> IO ()) -> IO ()) -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (SomeStruct DescriptorBufferBindingInfoEXT)
-> SomeStruct DescriptorBufferBindingInfoEXT -> IO () -> IO ()
forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (Ptr (DescriptorBufferBindingInfoEXT (ZonkAny 1))
-> Ptr (SomeStruct DescriptorBufferBindingInfoEXT)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (DescriptorBufferBindingInfoEXT (ZonkAny 0))
pPBindingInfos Ptr (DescriptorBufferBindingInfoEXT (ZonkAny 0))
-> Int -> Ptr (DescriptorBufferBindingInfoEXT w)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
32 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (DescriptorBufferBindingInfoEXT _))) (SomeStruct DescriptorBufferBindingInfoEXT
e) (IO () -> IO ())
-> ((() -> IO ()) -> IO ()) -> (() -> IO ()) -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ())) (bindingInfos)
  lift $ traceAroundEvent "vkCmdBindDescriptorBuffersEXT" (vkCmdBindDescriptorBuffersEXT'
                                                             (commandBufferHandle (commandBuffer))
                                                             ((fromIntegral (Data.Vector.length $ (bindingInfos)) :: Word32))
                                                             (forgetExtensions (pPBindingInfos)))
  pure $ ()


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdSetDescriptorBufferOffsetsEXT
  :: FunPtr (Ptr CommandBuffer_T -> PipelineBindPoint -> PipelineLayout -> Word32 -> Word32 -> Ptr Word32 -> Ptr DeviceSize -> IO ()) -> Ptr CommandBuffer_T -> PipelineBindPoint -> PipelineLayout -> Word32 -> Word32 -> Ptr Word32 -> Ptr DeviceSize -> IO ()

-- | vkCmdSetDescriptorBufferOffsetsEXT - Setting descriptor buffer offsets
-- in a command buffer
--
-- = Description
--
-- 'cmdSetDescriptorBufferOffsetsEXT' binds @setCount@ pairs of descriptor
-- buffers, specified by indices into the binding points bound using
-- 'cmdBindDescriptorBuffersEXT', and buffer offsets to set numbers
-- [@firstSet@..@firstSet@+@setCount@-1] for subsequent
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-bindpoint-commands bound pipeline commands>
-- set by @pipelineBindPoint@. Set [@firstSet@ + i] is bound to the
-- descriptor buffer at binding @pBufferIndices@[i] at an offset of
-- @pOffsets@[i]. Any bindings that were previously applied via these sets,
-- or calls to 'Vulkan.Core10.CommandBufferBuilding.cmdBindDescriptorSets',
-- are no longer valid. Other sets will also be invalidated upon calling
-- this command if @layout@ differs from the pipeline layout used to bind
-- those other sets, as described in
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-compatibility Pipeline Layout Compatibility>.
--
-- After binding descriptors, applications /can/ modify descriptor memory
-- either by performing writes on the host or with device commands. When
-- descriptor memory is updated with device commands, visibility for the
-- shader stage accessing a descriptor is ensured with the
-- 'Vulkan.Core13.Enums.AccessFlags2.ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT'
-- access flag. Implementations /must/ not access resources referenced by
-- these descriptors unless they are dynamically accessed by shaders.
-- Descriptors bound with this call /can/ be undefined if they are not
-- dynamically accessed by shaders.
--
-- Implementations /may/ read descriptor data for any statically accessed
-- descriptor if the @binding@ in @layout@ is not declared with the
-- 'Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT'
-- flag. If the @binding@ in @layout@ is declared with
-- 'Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT',
-- implementations /must/ not read descriptor data that is not dynamically
-- accessed.
--
-- Applications /must/ ensure that any descriptor which the implementation
-- /may/ read /must/ be in-bounds of the underlying descriptor buffer
-- binding.
--
-- Applications can freely decide how large a variable descriptor buffer
-- binding is, so it may not be safe to read such descriptor payloads
-- statically. The intention of these rules is to allow implementations to
-- speculatively prefetch descriptor payloads where feasible.
--
-- Dynamically accessing a resource through descriptor data from an unbound
-- region of a
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#sparsememory-partially-resident-buffers sparse partially-resident buffer>
-- will result in invalid descriptor data being read, and therefore
-- undefined behavior.
--
-- For descriptors written by the host, visibility is implied through the
-- automatic visibility operation on queue submit, and there is no need to
-- consider @VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT@. Explicit
-- synchronization for descriptors is only required when descriptors are
-- updated on the device.
--
-- The requirements above imply that all descriptor bindings have been
-- defined with the equivalent of
-- 'Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT',
-- 'Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT'
-- and
-- 'Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT',
-- but enabling those features is not required to get this behavior.
--
-- == Valid Usage
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-commandBuffer-11295# If
--     @commandBuffer@ is a secondary command buffer, it /must/ have begun
--     with
--     'Vulkan.Extensions.VK_EXT_descriptor_heap.CommandBufferInheritanceDescriptorHeapInfoEXT'::@pSamplerHeapBindInfo@
--     equal to @NULL@
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-commandBuffer-11296# If
--     @commandBuffer@ is a secondary command buffer, it /must/ have begun
--     with
--     'Vulkan.Extensions.VK_EXT_descriptor_heap.CommandBufferInheritanceDescriptorHeapInfoEXT'::@pResourceHeapBindInfo@
--     equal to @NULL@
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-pOffsets-08061# The offsets
--     in @pOffsets@ /must/ be aligned to
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@descriptorBufferOffsetAlignment@
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-pOffsets-08063# The offsets
--     in @pOffsets@ /must/ be small enough such that any descriptor
--     binding referenced by @layout@ without the
--     'Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT'
--     flag computes a valid address inside the underlying
--     'Vulkan.Core10.Handles.Buffer'
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-pOffsets-08126# The offsets
--     in @pOffsets@ /must/ be small enough such that any location accessed
--     by a shader as a sampler descriptor /must/ be within
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@maxSamplerDescriptorBufferRange@
--     of the sampler descriptor buffer binding
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-pOffsets-08127# The offsets
--     in @pOffsets@ /must/ be small enough such that any location accessed
--     by a shader as a resource descriptor /must/ be within
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@maxResourceDescriptorBufferRange@
--     of the resource descriptor buffer binding
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-pBufferIndices-08064# Each
--     element of @pBufferIndices@ /must/ be less than
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@maxDescriptorBufferBindings@
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-pBufferIndices-08065# Each
--     element of @pBufferIndices@ /must/ reference a valid descriptor
--     buffer binding set by a previous call to
--     'cmdBindDescriptorBuffersEXT' in @commandBuffer@
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-firstSet-08066# The sum of
--     @firstSet@ and @setCount@ /must/ be less than or equal to
--     'Vulkan.Core10.PipelineLayout.PipelineLayoutCreateInfo'::@setLayoutCount@
--     provided when @layout@ was created
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-firstSet-09006# The
--     'Vulkan.Core10.Handles.DescriptorSetLayout' for each set from
--     @firstSet@ to @firstSet@ + @setCount@ when @layout@ was created
--     /must/ have been created with the
--     'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT'
--     bit set
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-firstSet-11803# The
--     'Vulkan.Core10.Handles.DescriptorSetLayout' for each set from
--     @firstSet@ to @firstSet@ + @setCount@ when @layout@ was created
--     /must/ not have been created with the
--     'Vulkan.Extensions.VK_KHR_push_descriptor.DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR'
--     bit set
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-firstSet-11804# The
--     'Vulkan.Core10.Handles.DescriptorSetLayout' for each set from
--     @firstSet@ to @firstSet@ + @setCount@ when @layout@ was created
--     /must/ not have been created with the
--     'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT'
--     bit set
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-None-08060# The
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-descriptorBuffer descriptorBuffer>
--     feature /must/ be enabled
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-pipelineBindPoint-08067#
--     @pipelineBindPoint@ /must/ be supported by the @commandBuffer@’s
--     parent 'Vulkan.Core10.Handles.CommandPool'’s queue family
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-pipelineBindPoint-parameter#
--     @pipelineBindPoint@ /must/ be a valid
--     'Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' value
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-layout-parameter# @layout@
--     /must/ be a valid 'Vulkan.Core10.Handles.PipelineLayout' handle
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-pBufferIndices-parameter#
--     @pBufferIndices@ /must/ be a valid pointer to an array of @setCount@
--     @uint32_t@ values
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-pOffsets-parameter#
--     @pOffsets@ /must/ be a valid pointer to an array of @setCount@
--     'Vulkan.Core10.FundamentalTypes.DeviceSize' values
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-commandBuffer-recording#
--     @commandBuffer@ /must/ be in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-commandBuffer-cmdpool# The
--     'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support
--     'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_COMPUTE_BIT',
--     'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_DATA_GRAPH_BIT_ARM', or
--     'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_GRAPHICS_BIT' operations
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-videocoding# This command
--     /must/ only be called outside of a video coding scope
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-setCount-arraylength#
--     @setCount@ /must/ be greater than @0@
--
-- -   #VUID-vkCmdSetDescriptorBufferOffsetsEXT-commonparent# Both of
--     @commandBuffer@, and @layout@ /must/ have been created, allocated,
--     or retrieved from the same 'Vulkan.Core10.Handles.Device'
--
-- == Host Synchronization
--
-- -   Host access to @commandBuffer@ /must/ be externally synchronized
--
-- -   Host access to the 'Vulkan.Core10.Handles.CommandPool' that
--     @commandBuffer@ was allocated from /must/ be externally synchronized
--
-- == Command Properties
--
-- \'
--
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
-- | <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#vkCmdBeginVideoCodingKHR Video Coding 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#fundamentals-queueoperation-command-types Command Type> |
-- +============================================================================================================================+========================================================================================================================+=============================================================================================================================+=======================================================================================================================+========================================================================================================================================+
-- | Primary                                                                                                                    | Both                                                                                                                   | Outside                                                                                                                     | VK_QUEUE_COMPUTE_BIT                                                                                                  | State                                                                                                                                  |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             | VK_QUEUE_DATA_GRAPH_BIT_ARM                                                                                           |                                                                                                                                        |
-- |                                                                                                                            |                                                                                                                        |                                                                                                                             | VK_QUEUE_GRAPHICS_BIT                                                                                                 |                                                                                                                                        |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- == Conditional Rendering
--
-- vkCmdSetDescriptorBufferOffsetsEXT is not affected by
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#drawing-conditional-rendering conditional rendering>
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Handles.CommandBuffer',
-- 'Vulkan.Core10.FundamentalTypes.DeviceSize',
-- 'Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint',
-- 'Vulkan.Core10.Handles.PipelineLayout'
cmdSetDescriptorBufferOffsetsEXT :: forall io
                                  . (MonadIO io)
                                 => -- | @commandBuffer@ is the command buffer in which the descriptor buffer
                                    -- offsets will be set.
                                    CommandBuffer
                                 -> -- | @pipelineBindPoint@ is a
                                    -- 'Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' indicating the
                                    -- type of the pipeline that will use the descriptors.
                                    PipelineBindPoint
                                 -> -- | @layout@ is a 'Vulkan.Core10.Handles.PipelineLayout' object used to
                                    -- program the bindings.
                                    PipelineLayout
                                 -> -- | @firstSet@ is the number of the first set to be bound.
                                    ("firstSet" ::: Word32)
                                 -> -- | @pBufferIndices@ is a pointer to an array of indices into the descriptor
                                    -- buffer binding points set by 'cmdBindDescriptorBuffersEXT'.
                                    ("bufferIndices" ::: Vector Word32)
                                 -> -- | @pOffsets@ is a pointer to an array of
                                    -- 'Vulkan.Core10.FundamentalTypes.DeviceSize' offsets to apply to the
                                    -- bound descriptor buffers.
                                    ("offsets" ::: Vector DeviceSize)
                                 -> io ()
cmdSetDescriptorBufferOffsetsEXT :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> PipelineBindPoint
-> PipelineLayout
-> ("binding" ::: Word32)
-> ("bufferIndices" ::: Vector ("binding" ::: Word32))
-> ("offsets" ::: Vector DeviceAddress)
-> io ()
cmdSetDescriptorBufferOffsetsEXT CommandBuffer
commandBuffer
                                   PipelineBindPoint
pipelineBindPoint
                                   PipelineLayout
layout
                                   "binding" ::: Word32
firstSet
                                   "bufferIndices" ::: Vector ("binding" ::: Word32)
bufferIndices
                                   "offsets" ::: Vector DeviceAddress
offsets = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkCmdSetDescriptorBufferOffsetsEXTPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> ("binding" ::: Word32)
   -> Ptr ("binding" ::: Word32)
   -> Ptr DeviceAddress
   -> IO ())
vkCmdSetDescriptorBufferOffsetsEXTPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> PipelineBindPoint
      -> PipelineLayout
      -> ("binding" ::: Word32)
      -> ("binding" ::: Word32)
      -> Ptr ("binding" ::: Word32)
      -> Ptr DeviceAddress
      -> IO ())
pVkCmdSetDescriptorBufferOffsetsEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> ("binding" ::: Word32)
   -> Ptr ("binding" ::: Word32)
   -> Ptr DeviceAddress
   -> IO ())
vkCmdSetDescriptorBufferOffsetsEXTPtr FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> ("binding" ::: Word32)
   -> Ptr ("binding" ::: Word32)
   -> Ptr DeviceAddress
   -> IO ())
-> FunPtr
     (Ptr CommandBuffer_T
      -> PipelineBindPoint
      -> PipelineLayout
      -> ("binding" ::: Word32)
      -> ("binding" ::: Word32)
      -> Ptr ("binding" ::: Word32)
      -> Ptr DeviceAddress
      -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> ("binding" ::: Word32)
   -> Ptr ("binding" ::: Word32)
   -> Ptr DeviceAddress
   -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetDescriptorBufferOffsetsEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCmdSetDescriptorBufferOffsetsEXT' :: Ptr CommandBuffer_T
-> PipelineBindPoint
-> PipelineLayout
-> ("binding" ::: Word32)
-> ("binding" ::: Word32)
-> Ptr ("binding" ::: Word32)
-> Ptr DeviceAddress
-> IO ()
vkCmdSetDescriptorBufferOffsetsEXT' = FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> ("binding" ::: Word32)
   -> Ptr ("binding" ::: Word32)
   -> Ptr DeviceAddress
   -> IO ())
-> Ptr CommandBuffer_T
-> PipelineBindPoint
-> PipelineLayout
-> ("binding" ::: Word32)
-> ("binding" ::: Word32)
-> Ptr ("binding" ::: Word32)
-> Ptr DeviceAddress
-> IO ()
mkVkCmdSetDescriptorBufferOffsetsEXT FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> ("binding" ::: Word32)
   -> Ptr ("binding" ::: Word32)
   -> Ptr DeviceAddress
   -> IO ())
vkCmdSetDescriptorBufferOffsetsEXTPtr
  let pBufferIndicesLength :: Int
pBufferIndicesLength = ("bufferIndices" ::: Vector ("binding" ::: Word32)) -> Int
forall a. Vector a -> Int
Data.Vector.length (("bufferIndices" ::: Vector ("binding" ::: Word32)) -> Int)
-> ("bufferIndices" ::: Vector ("binding" ::: Word32)) -> Int
forall a b. (a -> b) -> a -> b
$ ("bufferIndices" ::: Vector ("binding" ::: Word32)
bufferIndices)
  IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless ((("offsets" ::: Vector DeviceAddress) -> Int
forall a. Vector a -> Int
Data.Vector.length (("offsets" ::: Vector DeviceAddress) -> Int)
-> ("offsets" ::: Vector DeviceAddress) -> Int
forall a b. (a -> b) -> a -> b
$ ("offsets" ::: Vector DeviceAddress
offsets)) Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Int
pBufferIndicesLength) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"pOffsets and pBufferIndices must have the same length" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  pPBufferIndices <- ((Ptr ("binding" ::: Word32) -> IO ()) -> IO ())
-> ContT () IO (Ptr ("binding" ::: Word32))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ("binding" ::: Word32) -> IO ()) -> IO ())
 -> ContT () IO (Ptr ("binding" ::: Word32)))
-> ((Ptr ("binding" ::: Word32) -> IO ()) -> IO ())
-> ContT () IO (Ptr ("binding" ::: Word32))
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Word32 ((("bufferIndices" ::: Vector ("binding" ::: Word32)) -> Int
forall a. Vector a -> Int
Data.Vector.length ("bufferIndices" ::: Vector ("binding" ::: Word32)
bufferIndices)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
4)
  lift $ Data.Vector.imapM_ (\Int
i "binding" ::: Word32
e -> Ptr ("binding" ::: Word32) -> ("binding" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ("binding" ::: Word32)
pPBufferIndices Ptr ("binding" ::: Word32) -> Int -> Ptr ("binding" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) ("binding" ::: Word32
e)) (bufferIndices)
  pPOffsets <- ContT $ allocaBytes @DeviceSize ((Data.Vector.length (offsets)) * 8)
  lift $ Data.Vector.imapM_ (\Int
i DeviceAddress
e -> Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DeviceAddress
pPOffsets Ptr DeviceAddress -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr DeviceSize) (DeviceAddress
e)) (offsets)
  lift $ traceAroundEvent "vkCmdSetDescriptorBufferOffsetsEXT" (vkCmdSetDescriptorBufferOffsetsEXT'
                                                                  (commandBufferHandle (commandBuffer))
                                                                  (pipelineBindPoint)
                                                                  (layout)
                                                                  (firstSet)
                                                                  ((fromIntegral pBufferIndicesLength :: Word32))
                                                                  (pPBufferIndices)
                                                                  (pPOffsets))
  pure $ ()


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdBindDescriptorBufferEmbeddedSamplersEXT
  :: FunPtr (Ptr CommandBuffer_T -> PipelineBindPoint -> PipelineLayout -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> PipelineBindPoint -> PipelineLayout -> Word32 -> IO ()

-- | vkCmdBindDescriptorBufferEmbeddedSamplersEXT - Setting embedded
-- immutable samplers offsets in a command buffer
--
-- = Description
--
-- 'cmdBindDescriptorBufferEmbeddedSamplersEXT' binds the embedded
-- immutable samplers in @set@ of @layout@ to @set@ for the command buffer
-- for subsequent
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-bindpoint-commands bound pipeline commands>
-- set by @pipelineBindPoint@. Any previous binding to this set by
-- 'cmdSetDescriptorBufferOffsetsEXT' or this command is overwritten. Any
-- sets that were last bound by a call to
-- 'Vulkan.Core10.CommandBufferBuilding.cmdBindDescriptorSets' are
-- invalidated upon calling this command. Other sets will also be
-- invalidated upon calling this command if @layout@ differs from the
-- pipeline layout used to bind those other sets, as described in
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-compatibility Pipeline Layout Compatibility>.
--
-- == Valid Usage
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commandBuffer-11295#
--     If @commandBuffer@ is a secondary command buffer, it /must/ have
--     begun with
--     'Vulkan.Extensions.VK_EXT_descriptor_heap.CommandBufferInheritanceDescriptorHeapInfoEXT'::@pSamplerHeapBindInfo@
--     equal to @NULL@
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commandBuffer-11296#
--     If @commandBuffer@ is a secondary command buffer, it /must/ have
--     begun with
--     'Vulkan.Extensions.VK_EXT_descriptor_heap.CommandBufferInheritanceDescriptorHeapInfoEXT'::@pResourceHeapBindInfo@
--     equal to @NULL@
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-set-08070# The
--     'Vulkan.Core10.Handles.DescriptorSetLayout' at index @set@ when
--     @layout@ was created /must/ have been created with the
--     'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT'
--     bit set
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-set-08071# @set@
--     /must/ be less than or equal to
--     'Vulkan.Core10.PipelineLayout.PipelineLayoutCreateInfo'::@setLayoutCount@
--     provided when @layout@ was created
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-None-08068# The
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-descriptorBuffer descriptorBuffer>
--     feature /must/ be enabled
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-pipelineBindPoint-08069#
--     @pipelineBindPoint@ /must/ be supported by the @commandBuffer@’s
--     parent 'Vulkan.Core10.Handles.CommandPool'’s queue family
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-pipelineBindPoint-parameter#
--     @pipelineBindPoint@ /must/ be a valid
--     'Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' value
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-layout-parameter#
--     @layout@ /must/ be a valid 'Vulkan.Core10.Handles.PipelineLayout'
--     handle
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commandBuffer-recording#
--     @commandBuffer@ /must/ be in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commandBuffer-cmdpool#
--     The 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support
--     'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_COMPUTE_BIT', or
--     'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_GRAPHICS_BIT' operations
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-videocoding# This
--     command /must/ only be called outside of a video coding scope
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commonparent#
--     Both of @commandBuffer@, and @layout@ /must/ have been created,
--     allocated, or retrieved from the same 'Vulkan.Core10.Handles.Device'
--
-- == Host Synchronization
--
-- -   Host access to @commandBuffer@ /must/ be externally synchronized
--
-- -   Host access to the 'Vulkan.Core10.Handles.CommandPool' that
--     @commandBuffer@ was allocated from /must/ be externally synchronized
--
-- == Command Properties
--
-- \'
--
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
-- | <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#vkCmdBeginVideoCodingKHR Video Coding 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#fundamentals-queueoperation-command-types Command Type> |
-- +============================================================================================================================+========================================================================================================================+=============================================================================================================================+=======================================================================================================================+========================================================================================================================================+
-- | Primary                                                                                                                    | Both                                                                                                                   | Outside                                                                                                                     | VK_QUEUE_COMPUTE_BIT                                                                                                  | State                                                                                                                                  |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             | VK_QUEUE_GRAPHICS_BIT                                                                                                 |                                                                                                                                        |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- == Conditional Rendering
--
-- vkCmdBindDescriptorBufferEmbeddedSamplersEXT is not affected by
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#drawing-conditional-rendering conditional rendering>
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Handles.CommandBuffer',
-- 'Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint',
-- 'Vulkan.Core10.Handles.PipelineLayout'
cmdBindDescriptorBufferEmbeddedSamplersEXT :: forall io
                                            . (MonadIO io)
                                           => -- | @commandBuffer@ is the command buffer that the embedded immutable
                                              -- samplers will be bound to.
                                              CommandBuffer
                                           -> -- | @pipelineBindPoint@ is a
                                              -- 'Vulkan.Core10.Enums.PipelineBindPoint.PipelineBindPoint' indicating the
                                              -- type of the pipeline that will use the embedded immutable samplers.
                                              PipelineBindPoint
                                           -> -- | @layout@ is a 'Vulkan.Core10.Handles.PipelineLayout' object used to
                                              -- program the bindings.
                                              PipelineLayout
                                           -> -- | @set@ is the number of the set to be bound.
                                              ("set" ::: Word32)
                                           -> io ()
cmdBindDescriptorBufferEmbeddedSamplersEXT :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> PipelineBindPoint
-> PipelineLayout
-> ("binding" ::: Word32)
-> io ()
cmdBindDescriptorBufferEmbeddedSamplersEXT CommandBuffer
commandBuffer
                                             PipelineBindPoint
pipelineBindPoint
                                             PipelineLayout
layout
                                             "binding" ::: Word32
set = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkCmdBindDescriptorBufferEmbeddedSamplersEXTPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> IO ())
vkCmdBindDescriptorBufferEmbeddedSamplersEXTPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> PipelineBindPoint
      -> PipelineLayout
      -> ("binding" ::: Word32)
      -> IO ())
pVkCmdBindDescriptorBufferEmbeddedSamplersEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> IO ())
vkCmdBindDescriptorBufferEmbeddedSamplersEXTPtr FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> IO ())
-> FunPtr
     (Ptr CommandBuffer_T
      -> PipelineBindPoint
      -> PipelineLayout
      -> ("binding" ::: Word32)
      -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdBindDescriptorBufferEmbeddedSamplersEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCmdBindDescriptorBufferEmbeddedSamplersEXT' :: Ptr CommandBuffer_T
-> PipelineBindPoint
-> PipelineLayout
-> ("binding" ::: Word32)
-> IO ()
vkCmdBindDescriptorBufferEmbeddedSamplersEXT' = FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> IO ())
-> Ptr CommandBuffer_T
-> PipelineBindPoint
-> PipelineLayout
-> ("binding" ::: Word32)
-> IO ()
mkVkCmdBindDescriptorBufferEmbeddedSamplersEXT FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> IO ())
vkCmdBindDescriptorBufferEmbeddedSamplersEXTPtr
  String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdBindDescriptorBufferEmbeddedSamplersEXT" (Ptr CommandBuffer_T
-> PipelineBindPoint
-> PipelineLayout
-> ("binding" ::: Word32)
-> IO ()
vkCmdBindDescriptorBufferEmbeddedSamplersEXT'
                                                                     (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
                                                                     (PipelineBindPoint
pipelineBindPoint)
                                                                     (PipelineLayout
layout)
                                                                     ("binding" ::: Word32
set))
  () -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ()


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetBufferOpaqueCaptureDescriptorDataEXT
  :: FunPtr (Ptr Device_T -> Ptr BufferCaptureDescriptorDataInfoEXT -> Ptr () -> IO Result) -> Ptr Device_T -> Ptr BufferCaptureDescriptorDataInfoEXT -> Ptr () -> IO Result

-- | vkGetBufferOpaqueCaptureDescriptorDataEXT - Get buffer opaque capture
-- descriptor data
--
-- == Valid Usage
--
-- -   #VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-None-08072# The
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-descriptorBufferCaptureReplay descriptorBufferCaptureReplay>
--     feature /must/ be enabled
--
-- -   #VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-pData-08073# @pData@
--     /must/ point to a buffer that is at least
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@bufferCaptureReplayDescriptorDataSize@
--     bytes in size
--
-- -   #VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-device-08074# If
--     @device@ was created with multiple physical devices, then the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-bufferDeviceAddressMultiDevice bufferDeviceAddressMultiDevice>
--     feature /must/ be enabled
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-device-parameter#
--     @device@ /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-pInfo-parameter#
--     @pInfo@ /must/ be a valid pointer to a valid
--     'BufferCaptureDescriptorDataInfoEXT' structure
--
-- -   #VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-pData-parameter#
--     @pData@ /must/ be a pointer value
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_UNKNOWN'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_VALIDATION_FAILED'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'BufferCaptureDescriptorDataInfoEXT', 'Vulkan.Core10.Handles.Device'
getBufferOpaqueCaptureDescriptorDataEXT :: forall io
                                         . (MonadIO io)
                                        => -- | @device@ is the logical device that gets the data.
                                           Device
                                        -> -- | @pInfo@ is a pointer to a 'BufferCaptureDescriptorDataInfoEXT' structure
                                           -- specifying the buffer.
                                           BufferCaptureDescriptorDataInfoEXT
                                        -> -- | @pData@ is a pointer to an application-allocated buffer where the data
                                           -- will be written.
                                           ("data" ::: Ptr ())
                                        -> io ()
getBufferOpaqueCaptureDescriptorDataEXT :: forall (io :: * -> *).
MonadIO io =>
Device
-> BufferCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> io ()
getBufferOpaqueCaptureDescriptorDataEXT Device
device
                                          BufferCaptureDescriptorDataInfoEXT
info
                                          "descriptor" ::: Ptr ()
data' = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkGetBufferOpaqueCaptureDescriptorDataEXTPtr :: FunPtr
  (Ptr Device_T
   -> Ptr BufferCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetBufferOpaqueCaptureDescriptorDataEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> Ptr BufferCaptureDescriptorDataInfoEXT
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
pVkGetBufferOpaqueCaptureDescriptorDataEXT (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> Ptr BufferCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetBufferOpaqueCaptureDescriptorDataEXTPtr FunPtr
  (Ptr Device_T
   -> Ptr BufferCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> FunPtr
     (Ptr Device_T
      -> Ptr BufferCaptureDescriptorDataInfoEXT
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> Ptr BufferCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetBufferOpaqueCaptureDescriptorDataEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetBufferOpaqueCaptureDescriptorDataEXT' :: Ptr Device_T
-> Ptr BufferCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetBufferOpaqueCaptureDescriptorDataEXT' = FunPtr
  (Ptr Device_T
   -> Ptr BufferCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> Ptr Device_T
-> Ptr BufferCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> IO Result
mkVkGetBufferOpaqueCaptureDescriptorDataEXT FunPtr
  (Ptr Device_T
   -> Ptr BufferCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetBufferOpaqueCaptureDescriptorDataEXTPtr
  pInfo <- ((Ptr BufferCaptureDescriptorDataInfoEXT -> IO ()) -> IO ())
-> ContT () IO (Ptr BufferCaptureDescriptorDataInfoEXT)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr BufferCaptureDescriptorDataInfoEXT -> IO ()) -> IO ())
 -> ContT () IO (Ptr BufferCaptureDescriptorDataInfoEXT))
-> ((Ptr BufferCaptureDescriptorDataInfoEXT -> IO ()) -> IO ())
-> ContT () IO (Ptr BufferCaptureDescriptorDataInfoEXT)
forall a b. (a -> b) -> a -> b
$ BufferCaptureDescriptorDataInfoEXT
-> (Ptr BufferCaptureDescriptorDataInfoEXT -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
BufferCaptureDescriptorDataInfoEXT
-> (Ptr BufferCaptureDescriptorDataInfoEXT -> IO b) -> IO b
withCStruct (BufferCaptureDescriptorDataInfoEXT
info)
  r <- lift $ traceAroundEvent "vkGetBufferOpaqueCaptureDescriptorDataEXT" (vkGetBufferOpaqueCaptureDescriptorDataEXT'
                                                                              (deviceHandle (device))
                                                                              pInfo
                                                                              (data'))
  lift $ when (r < SUCCESS) (throwIO (VulkanException r))


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetImageOpaqueCaptureDescriptorDataEXT
  :: FunPtr (Ptr Device_T -> Ptr ImageCaptureDescriptorDataInfoEXT -> Ptr () -> IO Result) -> Ptr Device_T -> Ptr ImageCaptureDescriptorDataInfoEXT -> Ptr () -> IO Result

-- | vkGetImageOpaqueCaptureDescriptorDataEXT - Get image opaque capture
-- descriptor data
--
-- == Valid Usage
--
-- -   #VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-None-08076# The
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-descriptorBufferCaptureReplay descriptorBufferCaptureReplay>
--     feature /must/ be enabled
--
-- -   #VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-pData-08077# @pData@
--     /must/ point to a buffer that is at least
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@imageCaptureReplayDescriptorDataSize@
--     bytes in size
--
-- -   #VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-device-08078# If
--     @device@ was created with multiple physical devices, then the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-bufferDeviceAddressMultiDevice bufferDeviceAddressMultiDevice>
--     feature /must/ be enabled
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-device-parameter#
--     @device@ /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-pInfo-parameter#
--     @pInfo@ /must/ be a valid pointer to a valid
--     'ImageCaptureDescriptorDataInfoEXT' structure
--
-- -   #VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-pData-parameter#
--     @pData@ /must/ be a pointer value
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_UNKNOWN'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_VALIDATION_FAILED'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Handles.Device', 'ImageCaptureDescriptorDataInfoEXT'
getImageOpaqueCaptureDescriptorDataEXT :: forall io
                                        . (MonadIO io)
                                       => -- | @device@ is the logical device that gets the data.
                                          Device
                                       -> -- | @pInfo@ is a pointer to a 'ImageCaptureDescriptorDataInfoEXT' structure
                                          -- specifying the image.
                                          ImageCaptureDescriptorDataInfoEXT
                                       -> -- | @pData@ is a pointer to an application-allocated buffer where the data
                                          -- will be written.
                                          ("data" ::: Ptr ())
                                       -> io ()
getImageOpaqueCaptureDescriptorDataEXT :: forall (io :: * -> *).
MonadIO io =>
Device
-> ImageCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> io ()
getImageOpaqueCaptureDescriptorDataEXT Device
device
                                         ImageCaptureDescriptorDataInfoEXT
info
                                         "descriptor" ::: Ptr ()
data' = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkGetImageOpaqueCaptureDescriptorDataEXTPtr :: FunPtr
  (Ptr Device_T
   -> Ptr ImageCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetImageOpaqueCaptureDescriptorDataEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> Ptr ImageCaptureDescriptorDataInfoEXT
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
pVkGetImageOpaqueCaptureDescriptorDataEXT (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> Ptr ImageCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetImageOpaqueCaptureDescriptorDataEXTPtr FunPtr
  (Ptr Device_T
   -> Ptr ImageCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> FunPtr
     (Ptr Device_T
      -> Ptr ImageCaptureDescriptorDataInfoEXT
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> Ptr ImageCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetImageOpaqueCaptureDescriptorDataEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetImageOpaqueCaptureDescriptorDataEXT' :: Ptr Device_T
-> Ptr ImageCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetImageOpaqueCaptureDescriptorDataEXT' = FunPtr
  (Ptr Device_T
   -> Ptr ImageCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> Ptr Device_T
-> Ptr ImageCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> IO Result
mkVkGetImageOpaqueCaptureDescriptorDataEXT FunPtr
  (Ptr Device_T
   -> Ptr ImageCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetImageOpaqueCaptureDescriptorDataEXTPtr
  pInfo <- ((Ptr ImageCaptureDescriptorDataInfoEXT -> IO ()) -> IO ())
-> ContT () IO (Ptr ImageCaptureDescriptorDataInfoEXT)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ImageCaptureDescriptorDataInfoEXT -> IO ()) -> IO ())
 -> ContT () IO (Ptr ImageCaptureDescriptorDataInfoEXT))
-> ((Ptr ImageCaptureDescriptorDataInfoEXT -> IO ()) -> IO ())
-> ContT () IO (Ptr ImageCaptureDescriptorDataInfoEXT)
forall a b. (a -> b) -> a -> b
$ ImageCaptureDescriptorDataInfoEXT
-> (Ptr ImageCaptureDescriptorDataInfoEXT -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
ImageCaptureDescriptorDataInfoEXT
-> (Ptr ImageCaptureDescriptorDataInfoEXT -> IO b) -> IO b
withCStruct (ImageCaptureDescriptorDataInfoEXT
info)
  r <- lift $ traceAroundEvent "vkGetImageOpaqueCaptureDescriptorDataEXT" (vkGetImageOpaqueCaptureDescriptorDataEXT'
                                                                             (deviceHandle (device))
                                                                             pInfo
                                                                             (data'))
  lift $ when (r < SUCCESS) (throwIO (VulkanException r))


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetImageViewOpaqueCaptureDescriptorDataEXT
  :: FunPtr (Ptr Device_T -> Ptr ImageViewCaptureDescriptorDataInfoEXT -> Ptr () -> IO Result) -> Ptr Device_T -> Ptr ImageViewCaptureDescriptorDataInfoEXT -> Ptr () -> IO Result

-- | vkGetImageViewOpaqueCaptureDescriptorDataEXT - Get image view opaque
-- capture descriptor data
--
-- == Valid Usage
--
-- -   #VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-None-08080# The
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-descriptorBufferCaptureReplay descriptorBufferCaptureReplay>
--     feature /must/ be enabled
--
-- -   #VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-pData-08081#
--     @pData@ /must/ point to a buffer that is at least
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@imageViewCaptureReplayDescriptorDataSize@
--     bytes in size
--
-- -   #VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-device-08082# If
--     @device@ was created with multiple physical devices, then the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-bufferDeviceAddressMultiDevice bufferDeviceAddressMultiDevice>
--     feature /must/ be enabled
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-device-parameter#
--     @device@ /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-pInfo-parameter#
--     @pInfo@ /must/ be a valid pointer to a valid
--     'ImageViewCaptureDescriptorDataInfoEXT' structure
--
-- -   #VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-pData-parameter#
--     @pData@ /must/ be a pointer value
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_UNKNOWN'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_VALIDATION_FAILED'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Handles.Device', 'ImageViewCaptureDescriptorDataInfoEXT'
getImageViewOpaqueCaptureDescriptorDataEXT :: forall io
                                            . (MonadIO io)
                                           => -- | @device@ is the logical device that gets the data.
                                              Device
                                           -> -- | @pInfo@ is a pointer to a 'ImageViewCaptureDescriptorDataInfoEXT'
                                              -- structure specifying the image view.
                                              ImageViewCaptureDescriptorDataInfoEXT
                                           -> -- | @pData@ is a pointer to an application-allocated buffer where the data
                                              -- will be written.
                                              ("data" ::: Ptr ())
                                           -> io ()
getImageViewOpaqueCaptureDescriptorDataEXT :: forall (io :: * -> *).
MonadIO io =>
Device
-> ImageViewCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> io ()
getImageViewOpaqueCaptureDescriptorDataEXT Device
device
                                             ImageViewCaptureDescriptorDataInfoEXT
info
                                             "descriptor" ::: Ptr ()
data' = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkGetImageViewOpaqueCaptureDescriptorDataEXTPtr :: FunPtr
  (Ptr Device_T
   -> Ptr ImageViewCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetImageViewOpaqueCaptureDescriptorDataEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> Ptr ImageViewCaptureDescriptorDataInfoEXT
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
pVkGetImageViewOpaqueCaptureDescriptorDataEXT (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> Ptr ImageViewCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetImageViewOpaqueCaptureDescriptorDataEXTPtr FunPtr
  (Ptr Device_T
   -> Ptr ImageViewCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> FunPtr
     (Ptr Device_T
      -> Ptr ImageViewCaptureDescriptorDataInfoEXT
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> Ptr ImageViewCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetImageViewOpaqueCaptureDescriptorDataEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetImageViewOpaqueCaptureDescriptorDataEXT' :: Ptr Device_T
-> Ptr ImageViewCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetImageViewOpaqueCaptureDescriptorDataEXT' = FunPtr
  (Ptr Device_T
   -> Ptr ImageViewCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> Ptr Device_T
-> Ptr ImageViewCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> IO Result
mkVkGetImageViewOpaqueCaptureDescriptorDataEXT FunPtr
  (Ptr Device_T
   -> Ptr ImageViewCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetImageViewOpaqueCaptureDescriptorDataEXTPtr
  pInfo <- ((Ptr ImageViewCaptureDescriptorDataInfoEXT -> IO ()) -> IO ())
-> ContT () IO (Ptr ImageViewCaptureDescriptorDataInfoEXT)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ImageViewCaptureDescriptorDataInfoEXT -> IO ()) -> IO ())
 -> ContT () IO (Ptr ImageViewCaptureDescriptorDataInfoEXT))
-> ((Ptr ImageViewCaptureDescriptorDataInfoEXT -> IO ()) -> IO ())
-> ContT () IO (Ptr ImageViewCaptureDescriptorDataInfoEXT)
forall a b. (a -> b) -> a -> b
$ ImageViewCaptureDescriptorDataInfoEXT
-> (Ptr ImageViewCaptureDescriptorDataInfoEXT -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
ImageViewCaptureDescriptorDataInfoEXT
-> (Ptr ImageViewCaptureDescriptorDataInfoEXT -> IO b) -> IO b
withCStruct (ImageViewCaptureDescriptorDataInfoEXT
info)
  r <- lift $ traceAroundEvent "vkGetImageViewOpaqueCaptureDescriptorDataEXT" (vkGetImageViewOpaqueCaptureDescriptorDataEXT'
                                                                                 (deviceHandle (device))
                                                                                 pInfo
                                                                                 (data'))
  lift $ when (r < SUCCESS) (throwIO (VulkanException r))


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetSamplerOpaqueCaptureDescriptorDataEXT
  :: FunPtr (Ptr Device_T -> Ptr SamplerCaptureDescriptorDataInfoEXT -> Ptr () -> IO Result) -> Ptr Device_T -> Ptr SamplerCaptureDescriptorDataInfoEXT -> Ptr () -> IO Result

-- | vkGetSamplerOpaqueCaptureDescriptorDataEXT - Get sampler opaque capture
-- descriptor data
--
-- == Valid Usage
--
-- -   #VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-None-08084# The
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-descriptorBufferCaptureReplay descriptorBufferCaptureReplay>
--     feature /must/ be enabled
--
-- -   #VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-pData-08085#
--     @pData@ /must/ point to a buffer that is at least
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@samplerCaptureReplayDescriptorDataSize@
--     bytes in size
--
-- -   #VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-device-08086# If
--     @device@ was created with multiple physical devices, then the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-bufferDeviceAddressMultiDevice bufferDeviceAddressMultiDevice>
--     feature /must/ be enabled
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-device-parameter#
--     @device@ /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-pInfo-parameter#
--     @pInfo@ /must/ be a valid pointer to a valid
--     'SamplerCaptureDescriptorDataInfoEXT' structure
--
-- -   #VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-pData-parameter#
--     @pData@ /must/ be a pointer value
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_UNKNOWN'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_VALIDATION_FAILED'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Handles.Device', 'SamplerCaptureDescriptorDataInfoEXT'
getSamplerOpaqueCaptureDescriptorDataEXT :: forall io
                                          . (MonadIO io)
                                         => -- | @device@ is the logical device that gets the data.
                                            Device
                                         -> -- | @pInfo@ is a pointer to a 'SamplerCaptureDescriptorDataInfoEXT'
                                            -- structure specifying the sampler.
                                            SamplerCaptureDescriptorDataInfoEXT
                                         -> -- | @pData@ is a pointer to an application-allocated buffer where the data
                                            -- will be written.
                                            ("data" ::: Ptr ())
                                         -> io ()
getSamplerOpaqueCaptureDescriptorDataEXT :: forall (io :: * -> *).
MonadIO io =>
Device
-> SamplerCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> io ()
getSamplerOpaqueCaptureDescriptorDataEXT Device
device
                                           SamplerCaptureDescriptorDataInfoEXT
info
                                           "descriptor" ::: Ptr ()
data' = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkGetSamplerOpaqueCaptureDescriptorDataEXTPtr :: FunPtr
  (Ptr Device_T
   -> Ptr SamplerCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetSamplerOpaqueCaptureDescriptorDataEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> Ptr SamplerCaptureDescriptorDataInfoEXT
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
pVkGetSamplerOpaqueCaptureDescriptorDataEXT (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> Ptr SamplerCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetSamplerOpaqueCaptureDescriptorDataEXTPtr FunPtr
  (Ptr Device_T
   -> Ptr SamplerCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> FunPtr
     (Ptr Device_T
      -> Ptr SamplerCaptureDescriptorDataInfoEXT
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> Ptr SamplerCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetSamplerOpaqueCaptureDescriptorDataEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetSamplerOpaqueCaptureDescriptorDataEXT' :: Ptr Device_T
-> Ptr SamplerCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetSamplerOpaqueCaptureDescriptorDataEXT' = FunPtr
  (Ptr Device_T
   -> Ptr SamplerCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> Ptr Device_T
-> Ptr SamplerCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> IO Result
mkVkGetSamplerOpaqueCaptureDescriptorDataEXT FunPtr
  (Ptr Device_T
   -> Ptr SamplerCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetSamplerOpaqueCaptureDescriptorDataEXTPtr
  pInfo <- ((Ptr SamplerCaptureDescriptorDataInfoEXT -> IO ()) -> IO ())
-> ContT () IO (Ptr SamplerCaptureDescriptorDataInfoEXT)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr SamplerCaptureDescriptorDataInfoEXT -> IO ()) -> IO ())
 -> ContT () IO (Ptr SamplerCaptureDescriptorDataInfoEXT))
-> ((Ptr SamplerCaptureDescriptorDataInfoEXT -> IO ()) -> IO ())
-> ContT () IO (Ptr SamplerCaptureDescriptorDataInfoEXT)
forall a b. (a -> b) -> a -> b
$ SamplerCaptureDescriptorDataInfoEXT
-> (Ptr SamplerCaptureDescriptorDataInfoEXT -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
SamplerCaptureDescriptorDataInfoEXT
-> (Ptr SamplerCaptureDescriptorDataInfoEXT -> IO b) -> IO b
withCStruct (SamplerCaptureDescriptorDataInfoEXT
info)
  r <- lift $ traceAroundEvent "vkGetSamplerOpaqueCaptureDescriptorDataEXT" (vkGetSamplerOpaqueCaptureDescriptorDataEXT'
                                                                               (deviceHandle (device))
                                                                               pInfo
                                                                               (data'))
  lift $ when (r < SUCCESS) (throwIO (VulkanException r))


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT
  :: FunPtr (Ptr Device_T -> Ptr AccelerationStructureCaptureDescriptorDataInfoEXT -> Ptr () -> IO Result) -> Ptr Device_T -> Ptr AccelerationStructureCaptureDescriptorDataInfoEXT -> Ptr () -> IO Result

-- | vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT - Get
-- acceleration structure opaque capture descriptor data
--
-- == Valid Usage
--
-- -   #VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-None-08088#
--     The
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-descriptorBufferCaptureReplay descriptorBufferCaptureReplay>
--     feature /must/ be enabled
--
-- -   #VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-pData-08089#
--     @pData@ /must/ point to a buffer that is at least
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@accelerationStructureCaptureReplayDescriptorDataSize@
--     bytes in size
--
-- -   #VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-device-08090#
--     If @device@ was created with multiple physical devices, then the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-bufferDeviceAddressMultiDevice bufferDeviceAddressMultiDevice>
--     feature /must/ be enabled
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-device-parameter#
--     @device@ /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-pInfo-parameter#
--     @pInfo@ /must/ be a valid pointer to a valid
--     'AccelerationStructureCaptureDescriptorDataInfoEXT' structure
--
-- -   #VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-pData-parameter#
--     @pData@ /must/ be a pointer value
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_UNKNOWN'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_VALIDATION_FAILED'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_acceleration_structure VK_KHR_acceleration_structure>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing VK_NV_ray_tracing>,
-- 'AccelerationStructureCaptureDescriptorDataInfoEXT',
-- 'Vulkan.Core10.Handles.Device'
getAccelerationStructureOpaqueCaptureDescriptorDataEXT :: forall io
                                                        . (MonadIO io)
                                                       => -- | @device@ is the logical device that gets the data.
                                                          Device
                                                       -> -- | @pInfo@ is a pointer to a
                                                          -- 'AccelerationStructureCaptureDescriptorDataInfoEXT' structure specifying
                                                          -- the acceleration structure.
                                                          AccelerationStructureCaptureDescriptorDataInfoEXT
                                                       -> -- | @pData@ is a pointer to an application-allocated buffer where the data
                                                          -- will be written.
                                                          ("data" ::: Ptr ())
                                                       -> io ()
getAccelerationStructureOpaqueCaptureDescriptorDataEXT :: forall (io :: * -> *).
MonadIO io =>
Device
-> AccelerationStructureCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> io ()
getAccelerationStructureOpaqueCaptureDescriptorDataEXT Device
device
                                                         AccelerationStructureCaptureDescriptorDataInfoEXT
info
                                                         "descriptor" ::: Ptr ()
data' = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXTPtr :: FunPtr
  (Ptr Device_T
   -> Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
pVkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT (case Device
device of Device{DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXTPtr FunPtr
  (Ptr Device_T
   -> Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> FunPtr
     (Ptr Device_T
      -> Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT' :: Ptr Device_T
-> Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT' = FunPtr
  (Ptr Device_T
   -> Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> Ptr Device_T
-> Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> ("descriptor" ::: Ptr ())
-> IO Result
mkVkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT FunPtr
  (Ptr Device_T
   -> Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXTPtr
  pInfo <- ((Ptr AccelerationStructureCaptureDescriptorDataInfoEXT -> IO ())
 -> IO ())
-> ContT
     () IO (Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AccelerationStructureCaptureDescriptorDataInfoEXT -> IO ())
  -> IO ())
 -> ContT
      () IO (Ptr AccelerationStructureCaptureDescriptorDataInfoEXT))
-> ((Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
     -> IO ())
    -> IO ())
-> ContT
     () IO (Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
forall a b. (a -> b) -> a -> b
$ AccelerationStructureCaptureDescriptorDataInfoEXT
-> (Ptr AccelerationStructureCaptureDescriptorDataInfoEXT -> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
AccelerationStructureCaptureDescriptorDataInfoEXT
-> (Ptr AccelerationStructureCaptureDescriptorDataInfoEXT -> IO b)
-> IO b
withCStruct (AccelerationStructureCaptureDescriptorDataInfoEXT
info)
  r <- lift $ traceAroundEvent "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT" (vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT'
                                                                                             (deviceHandle (device))
                                                                                             pInfo
                                                                                             (data'))
  lift $ when (r < SUCCESS) (throwIO (VulkanException r))


-- No documentation found for TopLevel "VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT"
pattern $mIMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT :: forall {r}.
ImageCreateFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
$bIMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT :: ImageCreateFlagBits
IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = IMAGE_CREATE_DESCRIPTOR_HEAP_CAPTURE_REPLAY_BIT_EXT


-- | VkPhysicalDeviceDescriptorBufferFeaturesEXT - Structure describing the
-- descriptor buffer features that can be supported by an implementation
--
-- = Members
--
-- This structure describes the following feature:
--
-- = Description
--
-- If the 'PhysicalDeviceDescriptorBufferFeaturesEXT' structure is included
-- in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceFeatures2',
-- it is filled in to indicate whether each corresponding feature is
-- supported. If the application wishes to use a
-- 'Vulkan.Core10.Handles.Device' with any features described by
-- 'PhysicalDeviceDescriptorBufferFeaturesEXT', it /must/ add an instance
-- of the structure, with the desired feature members set to
-- 'Vulkan.Core10.FundamentalTypes.TRUE', to the @pNext@ chain of
-- 'Vulkan.Core10.Device.DeviceCreateInfo' when creating the
-- 'Vulkan.Core10.Handles.Device'.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceDescriptorBufferFeaturesEXT = PhysicalDeviceDescriptorBufferFeaturesEXT
  { -- | #features-descriptorBuffer# @descriptorBuffer@ indicates that the
    -- implementation supports putting shader-accessible descriptors directly
    -- in memory.
    PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
descriptorBuffer :: Bool
  , -- | #features-descriptorBufferCaptureReplay# @descriptorBufferCaptureReplay@
    -- indicates that the implementation supports capture and replay when using
    -- descriptor buffers. If this is 'Vulkan.Core10.FundamentalTypes.TRUE',
    -- all resources created with
    -- 'Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT',
    -- 'IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT',
    -- 'Vulkan.Core10.Enums.ImageViewCreateFlagBits.IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT',
    -- 'Vulkan.Extensions.VK_ARM_tensors.TENSOR_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM',
    -- 'Vulkan.Extensions.VK_ARM_tensors.TENSOR_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_ARM',
    -- 'Vulkan.Core10.Enums.SamplerCreateFlagBits.SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT',
    -- or
    -- 'Vulkan.Extensions.VK_KHR_acceleration_structure.ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT'
    -- /must/ be created before resources of the same types without those
    -- flags.
    PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
descriptorBufferCaptureReplay :: Bool
  , -- | #features-descriptorBufferImageLayoutIgnored#
    -- @descriptorBufferImageLayoutIgnored@ indicates that the implementation
    -- will ignore @imageLayout@ in
    -- 'Vulkan.Core10.DescriptorSet.DescriptorImageInfo' when calling
    -- 'getDescriptorEXT'.
    PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
descriptorBufferImageLayoutIgnored :: Bool
  , -- | #features-descriptorBufferPushDescriptors#
    -- @descriptorBufferPushDescriptors@ indicates that the implementation
    -- supports using push descriptors with descriptor buffers.
    PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
descriptorBufferPushDescriptors :: Bool
  }
  deriving (Typeable, PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
(PhysicalDeviceDescriptorBufferFeaturesEXT
 -> PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool)
-> (PhysicalDeviceDescriptorBufferFeaturesEXT
    -> PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool)
-> Eq PhysicalDeviceDescriptorBufferFeaturesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
== :: PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
$c/= :: PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
/= :: PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceDescriptorBufferFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceDescriptorBufferFeaturesEXT

instance ToCStruct PhysicalDeviceDescriptorBufferFeaturesEXT where
  withCStruct :: forall b.
PhysicalDeviceDescriptorBufferFeaturesEXT
-> (Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> IO b) -> IO b
withCStruct PhysicalDeviceDescriptorBufferFeaturesEXT
x Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> IO b
f = Int
-> (Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> IO b) -> IO b)
-> (Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p -> Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> IO b -> IO b
forall b.
Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p PhysicalDeviceDescriptorBufferFeaturesEXT
x (Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> IO b
f Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p PhysicalDeviceDescriptorBufferFeaturesEXT{Bool
descriptorBuffer :: PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
descriptorBufferCaptureReplay :: PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
descriptorBufferImageLayoutIgnored :: PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
descriptorBufferPushDescriptors :: PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
descriptorBuffer :: Bool
descriptorBufferCaptureReplay :: Bool
descriptorBufferImageLayoutIgnored :: Bool
descriptorBufferPushDescriptors :: Bool
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
descriptorBuffer))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
descriptorBufferCaptureReplay))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
descriptorBufferImageLayoutIgnored))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
descriptorBufferPushDescriptors))
    IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceDescriptorBufferFeaturesEXT where
  peekCStruct :: Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> IO PhysicalDeviceDescriptorBufferFeaturesEXT
peekCStruct Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p = do
    descriptorBuffer <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p Ptr PhysicalDeviceDescriptorBufferFeaturesEXT -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    descriptorBufferCaptureReplay <- peek @Bool32 ((p `plusPtr` 20 :: Ptr Bool32))
    descriptorBufferImageLayoutIgnored <- peek @Bool32 ((p `plusPtr` 24 :: Ptr Bool32))
    descriptorBufferPushDescriptors <- peek @Bool32 ((p `plusPtr` 28 :: Ptr Bool32))
    pure $ PhysicalDeviceDescriptorBufferFeaturesEXT
             (bool32ToBool descriptorBuffer)
             (bool32ToBool descriptorBufferCaptureReplay)
             (bool32ToBool descriptorBufferImageLayoutIgnored)
             (bool32ToBool descriptorBufferPushDescriptors)

instance Storable PhysicalDeviceDescriptorBufferFeaturesEXT where
  sizeOf :: PhysicalDeviceDescriptorBufferFeaturesEXT -> Int
sizeOf ~PhysicalDeviceDescriptorBufferFeaturesEXT
_ = Int
32
  alignment :: PhysicalDeviceDescriptorBufferFeaturesEXT -> Int
alignment ~PhysicalDeviceDescriptorBufferFeaturesEXT
_ = Int
8
  peek :: Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> IO PhysicalDeviceDescriptorBufferFeaturesEXT
peek = Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> IO PhysicalDeviceDescriptorBufferFeaturesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
ptr PhysicalDeviceDescriptorBufferFeaturesEXT
poked = Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> IO () -> IO ()
forall b.
Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
ptr PhysicalDeviceDescriptorBufferFeaturesEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceDescriptorBufferFeaturesEXT where
  zero :: PhysicalDeviceDescriptorBufferFeaturesEXT
zero = Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceDescriptorBufferFeaturesEXT
PhysicalDeviceDescriptorBufferFeaturesEXT
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero


-- | VkPhysicalDeviceDescriptorBufferPropertiesEXT - Structure describing
-- descriptor buffer properties supported by an implementation
--
-- = Description
--
-- A descriptor binding with type
-- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_MUTABLE_EXT' has a
-- descriptor size which is implied by the descriptor types included in the
-- 'Vulkan.Extensions.VK_EXT_mutable_descriptor_type.MutableDescriptorTypeCreateInfoEXT'::@pDescriptorTypes@
-- list. The descriptor size is equal to the maximum size of any descriptor
-- type included in the @pDescriptorTypes@ list.
--
-- As there is no way to request robust and non-robust descriptors
-- separately, or specify robust\/non-robust descriptors in the set layout,
-- if the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-robustBufferAccess robustBufferAccess>
-- feature is enabled then robust descriptors are always used.
--
-- If the 'PhysicalDeviceDescriptorBufferPropertiesEXT' structure is
-- included in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceProperties2',
-- it is filled in with each corresponding implementation-dependent
-- property.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.FundamentalTypes.DeviceSize',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceDescriptorBufferPropertiesEXT = PhysicalDeviceDescriptorBufferPropertiesEXT
  { -- | #limits-combinedImageSamplerDescriptorSingleArray#
    -- @combinedImageSamplerDescriptorSingleArray@ indicates that the
    -- implementation does not require an array of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'
    -- descriptors to be written into a descriptor buffer as an array of image
    -- descriptors, immediately followed by an array of sampler descriptors.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
combinedImageSamplerDescriptorSingleArray :: Bool
  , -- | #limits-bufferlessPushDescriptors# @bufferlessPushDescriptors@ indicates
    -- that the implementation does not require a buffer created with the
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT'
    -- usage flag set to be bound when using push descriptors.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
bufferlessPushDescriptors :: Bool
  , -- | #limits-allowSamplerImageViewPostSubmitCreation#
    -- @allowSamplerImageViewPostSubmitCreation@ indicates that the
    -- implementation does not restrict when the
    -- 'Vulkan.Core10.Handles.Sampler' or 'Vulkan.Core10.Handles.ImageView'
    -- objects used to retrieve descriptor data /can/ be created in relation to
    -- command buffer submission. If this value is
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', then the application /must/
    -- create any 'Vulkan.Core10.Handles.Sampler' or
    -- 'Vulkan.Core10.Handles.ImageView' objects whose descriptor data is
    -- accessed during the execution of a command buffer, before the
    -- 'Vulkan.Core10.Queue.queueSubmit' , or
    -- 'Vulkan.Core13.Promoted_From_VK_KHR_synchronization2.queueSubmit2', call
    -- that submits that command buffer.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
allowSamplerImageViewPostSubmitCreation :: Bool
  , -- | #limits-descriptorBufferOffsetAlignment#
    -- @descriptorBufferOffsetAlignment@ indicates the /required/ alignment in
    -- bytes when setting offsets into the descriptor buffer.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
descriptorBufferOffsetAlignment :: DeviceSize
  , -- | #limits-maxDescriptorBufferBindings# @maxDescriptorBufferBindings@
    -- indicates the maximum number of descriptor buffer bindings.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
maxDescriptorBufferBindings :: Word32
  , -- | #limits-maxResourceDescriptorBufferBindings#
    -- @maxResourceDescriptorBufferBindings@ indicates the maximum number of
    -- descriptor buffer bindings with
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT'
    -- that /can/ be used.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
maxResourceDescriptorBufferBindings :: Word32
  , -- | #limits-maxSamplerDescriptorBufferBindings#
    -- @maxSamplerDescriptorBufferBindings@ indicates the maximum number of
    -- descriptor buffer bindings with
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT'
    -- that /can/ be used.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
maxSamplerDescriptorBufferBindings :: Word32
  , -- | #limits-maxEmbeddedImmutableSamplerBindings#
    -- @maxEmbeddedImmutableSamplerBindings@ indicates the maximum number of
    -- embedded immutable sampler sets that /can/ be bound.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
maxEmbeddedImmutableSamplerBindings :: Word32
  , -- | #limits-maxEmbeddedImmutableSamplers# @maxEmbeddedImmutableSamplers@
    -- indicates the maximum number of unique immutable samplers in descriptor
    -- set layouts created with
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT',
    -- and pipeline layouts created from them, which /can/ simultaneously exist
    -- on a device.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
maxEmbeddedImmutableSamplers :: Word32
  , -- | #limits-bufferCaptureReplayDescriptorDataSize#
    -- @bufferCaptureReplayDescriptorDataSize@ indicates the maximum size in
    -- bytes of the opaque data used for capture and replay with buffers.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
bufferCaptureReplayDescriptorDataSize :: Word64
  , -- | #limits-imageCaptureReplayDescriptorDataSize#
    -- @imageCaptureReplayDescriptorDataSize@ indicates the maximum size in
    -- bytes of the opaque data used for capture and replay with images.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
imageCaptureReplayDescriptorDataSize :: Word64
  , -- | #limits-imageViewCaptureReplayDescriptorDataSize#
    -- @imageViewCaptureReplayDescriptorDataSize@ indicates the maximum size in
    -- bytes of the opaque data used for capture and replay with image views.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
imageViewCaptureReplayDescriptorDataSize :: Word64
  , -- | #limits-samplerCaptureReplayDescriptorDataSize#
    -- @samplerCaptureReplayDescriptorDataSize@ indicates the maximum size in
    -- bytes of the opaque data used for capture and replay with samplers.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
samplerCaptureReplayDescriptorDataSize :: Word64
  , -- | #limits-accelerationStructureCaptureReplayDescriptorDataSize#
    -- @accelerationStructureCaptureReplayDescriptorDataSize@ indicates the
    -- maximum size in bytes of the opaque data used for capture and replay
    -- with acceleration structures.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
accelerationStructureCaptureReplayDescriptorDataSize :: Word64
  , -- | #limits-samplerDescriptorSizeEXT# @samplerDescriptorSize@ indicates the
    -- size in bytes of a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER' descriptor.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
samplerDescriptorSize :: Word64
  , -- | #limits-combinedImageSamplerDescriptorSize#
    -- @combinedImageSamplerDescriptorSize@ indicates the size in bytes of a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'
    -- descriptor.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
combinedImageSamplerDescriptorSize :: Word64
  , -- | #limits-sampledImageDescriptorSize# @sampledImageDescriptorSize@
    -- indicates the size in bytes of a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE'
    -- descriptor.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
sampledImageDescriptorSize :: Word64
  , -- | #limits-storageImageDescriptorSize# @storageImageDescriptorSize@
    -- indicates the size in bytes of a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE'
    -- descriptor.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
storageImageDescriptorSize :: Word64
  , -- | #limits-uniformTexelBufferDescriptorSize#
    -- @uniformTexelBufferDescriptorSize@ indicates the size in bytes of a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER'
    -- descriptor if the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-robustBufferAccess robustBufferAccess>
    -- feature is not enabled.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
uniformTexelBufferDescriptorSize :: Word64
  , -- | #limits-robustUniformTexelBufferDescriptorSize#
    -- @robustUniformTexelBufferDescriptorSize@ indicates the size in bytes of
    -- a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER'
    -- descriptor if the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-robustBufferAccess robustBufferAccess>
    -- feature is enabled.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
robustUniformTexelBufferDescriptorSize :: Word64
  , -- | #limits-storageTexelBufferDescriptorSize#
    -- @storageTexelBufferDescriptorSize@ indicates the size in bytes of a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER'
    -- descriptor if the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-robustBufferAccess robustBufferAccess>
    -- feature is not enabled.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
storageTexelBufferDescriptorSize :: Word64
  , -- | #limits-robustStorageTexelBufferDescriptorSize#
    -- @robustStorageTexelBufferDescriptorSize@ indicates the size in bytes of
    -- a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER'
    -- descriptor if the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-robustBufferAccess robustBufferAccess>
    -- feature is enabled.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
robustStorageTexelBufferDescriptorSize :: Word64
  , -- | #limits-uniformBufferDescriptorSize# @uniformBufferDescriptorSize@
    -- indicates the size in bytes of a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER'
    -- descriptor.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
uniformBufferDescriptorSize :: Word64
  , -- | #limits-robustUniformBufferDescriptorSize#
    -- @robustUniformBufferDescriptorSize@ indicates the size in bytes of a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER'
    -- descriptor if the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-robustBufferAccess robustBufferAccess>
    -- feature is enabled.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
robustUniformBufferDescriptorSize :: Word64
  , -- | #limits-storageBufferDescriptorSize# @storageBufferDescriptorSize@
    -- indicates the size in bytes of a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER'
    -- descriptor.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
storageBufferDescriptorSize :: Word64
  , -- | #limits-robustStorageBufferDescriptorSize#
    -- @robustStorageBufferDescriptorSize@ indicates the size in bytes of a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER'
    -- descriptor if the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-robustBufferAccess robustBufferAccess>
    -- feature is enabled.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
robustStorageBufferDescriptorSize :: Word64
  , -- | #limits-inputAttachmentDescriptorSize# @inputAttachmentDescriptorSize@
    -- indicates the size in bytes of a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT'
    -- descriptor.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
inputAttachmentDescriptorSize :: Word64
  , -- | #limits-accelerationStructureDescriptorSize#
    -- @accelerationStructureDescriptorSize@ indicates the size in bytes of a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR'
    -- or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV'
    -- descriptor.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
accelerationStructureDescriptorSize :: Word64
  , -- | #limits-maxSamplerDescriptorBufferRange#
    -- @maxSamplerDescriptorBufferRange@ indicates the maximum range in bytes
    -- from the address of a sampler descriptor buffer binding that is
    -- accessible to a shader.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
maxSamplerDescriptorBufferRange :: DeviceSize
  , -- | #limits-maxResourceDescriptorBufferRange#
    -- @maxResourceDescriptorBufferRange@ indicates the maximum range in bytes
    -- from the address of a resource descriptor buffer binding that is
    -- accessible to a shader.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
maxResourceDescriptorBufferRange :: DeviceSize
  , -- | #limits-samplerDescriptorBufferAddressSpaceSize#
    -- @samplerDescriptorBufferAddressSpaceSize@ indicates the total size in
    -- bytes of the address space available for descriptor buffers created with
    -- the
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT'
    -- usage flag set.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
samplerDescriptorBufferAddressSpaceSize :: DeviceSize
  , -- | #limits-resourceDescriptorBufferAddressSpaceSize#
    -- @resourceDescriptorBufferAddressSpaceSize@ indicates the total size in
    -- bytes of the address space available for descriptor buffers created with
    -- the
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT'
    -- usage flag set.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
resourceDescriptorBufferAddressSpaceSize :: DeviceSize
  , -- | #limits-descriptorBufferAddressSpaceSize#
    -- @descriptorBufferAddressSpaceSize@ indicates the total size in bytes of
    -- the address space available for descriptor buffers created with both the
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT'
    -- and
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT'
    -- usage flags set.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
descriptorBufferAddressSpaceSize :: DeviceSize
  }
  deriving (Typeable, PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
(PhysicalDeviceDescriptorBufferPropertiesEXT
 -> PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool)
-> (PhysicalDeviceDescriptorBufferPropertiesEXT
    -> PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool)
-> Eq PhysicalDeviceDescriptorBufferPropertiesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
== :: PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
$c/= :: PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
/= :: PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceDescriptorBufferPropertiesEXT)
#endif
deriving instance Show PhysicalDeviceDescriptorBufferPropertiesEXT

instance ToCStruct PhysicalDeviceDescriptorBufferPropertiesEXT where
  withCStruct :: forall b.
PhysicalDeviceDescriptorBufferPropertiesEXT
-> (Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> IO b)
-> IO b
withCStruct PhysicalDeviceDescriptorBufferPropertiesEXT
x Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> IO b
f = Int
-> (Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
256 ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> IO b) -> IO b)
-> (Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p -> Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> IO b -> IO b
forall b.
Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p PhysicalDeviceDescriptorBufferPropertiesEXT
x (Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> IO b
f Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p PhysicalDeviceDescriptorBufferPropertiesEXT{Bool
"binding" ::: Word32
DeviceAddress
combinedImageSamplerDescriptorSingleArray :: PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
bufferlessPushDescriptors :: PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
allowSamplerImageViewPostSubmitCreation :: PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
descriptorBufferOffsetAlignment :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
maxDescriptorBufferBindings :: PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
maxResourceDescriptorBufferBindings :: PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
maxSamplerDescriptorBufferBindings :: PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
maxEmbeddedImmutableSamplerBindings :: PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
maxEmbeddedImmutableSamplers :: PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
bufferCaptureReplayDescriptorDataSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
imageCaptureReplayDescriptorDataSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
imageViewCaptureReplayDescriptorDataSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
samplerCaptureReplayDescriptorDataSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
accelerationStructureCaptureReplayDescriptorDataSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
samplerDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
combinedImageSamplerDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
sampledImageDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
storageImageDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
uniformTexelBufferDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
robustUniformTexelBufferDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
storageTexelBufferDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
robustStorageTexelBufferDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
uniformBufferDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
robustUniformBufferDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
storageBufferDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
robustStorageBufferDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
inputAttachmentDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
accelerationStructureDescriptorSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
maxSamplerDescriptorBufferRange :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
maxResourceDescriptorBufferRange :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
samplerDescriptorBufferAddressSpaceSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
resourceDescriptorBufferAddressSpaceSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
descriptorBufferAddressSpaceSize :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
combinedImageSamplerDescriptorSingleArray :: Bool
bufferlessPushDescriptors :: Bool
allowSamplerImageViewPostSubmitCreation :: Bool
descriptorBufferOffsetAlignment :: DeviceAddress
maxDescriptorBufferBindings :: "binding" ::: Word32
maxResourceDescriptorBufferBindings :: "binding" ::: Word32
maxSamplerDescriptorBufferBindings :: "binding" ::: Word32
maxEmbeddedImmutableSamplerBindings :: "binding" ::: Word32
maxEmbeddedImmutableSamplers :: "binding" ::: Word32
bufferCaptureReplayDescriptorDataSize :: DeviceAddress
imageCaptureReplayDescriptorDataSize :: DeviceAddress
imageViewCaptureReplayDescriptorDataSize :: DeviceAddress
samplerCaptureReplayDescriptorDataSize :: DeviceAddress
accelerationStructureCaptureReplayDescriptorDataSize :: DeviceAddress
samplerDescriptorSize :: DeviceAddress
combinedImageSamplerDescriptorSize :: DeviceAddress
sampledImageDescriptorSize :: DeviceAddress
storageImageDescriptorSize :: DeviceAddress
uniformTexelBufferDescriptorSize :: DeviceAddress
robustUniformTexelBufferDescriptorSize :: DeviceAddress
storageTexelBufferDescriptorSize :: DeviceAddress
robustStorageTexelBufferDescriptorSize :: DeviceAddress
uniformBufferDescriptorSize :: DeviceAddress
robustUniformBufferDescriptorSize :: DeviceAddress
storageBufferDescriptorSize :: DeviceAddress
robustStorageBufferDescriptorSize :: DeviceAddress
inputAttachmentDescriptorSize :: DeviceAddress
accelerationStructureDescriptorSize :: DeviceAddress
maxSamplerDescriptorBufferRange :: DeviceAddress
maxResourceDescriptorBufferRange :: DeviceAddress
samplerDescriptorBufferAddressSpaceSize :: DeviceAddress
resourceDescriptorBufferAddressSpaceSize :: DeviceAddress
descriptorBufferAddressSpaceSize :: DeviceAddress
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
combinedImageSamplerDescriptorSingleArray))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
bufferlessPushDescriptors))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
allowSamplerImageViewPostSubmitCreation))
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) (DeviceAddress
descriptorBufferOffsetAlignment)
    Ptr ("binding" ::: Word32) -> ("binding" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr ("binding" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) ("binding" ::: Word32
maxDescriptorBufferBindings)
    Ptr ("binding" ::: Word32) -> ("binding" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr ("binding" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) ("binding" ::: Word32
maxResourceDescriptorBufferBindings)
    Ptr ("binding" ::: Word32) -> ("binding" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr ("binding" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) ("binding" ::: Word32
maxSamplerDescriptorBufferBindings)
    Ptr ("binding" ::: Word32) -> ("binding" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr ("binding" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) ("binding" ::: Word32
maxEmbeddedImmutableSamplerBindings)
    Ptr ("binding" ::: Word32) -> ("binding" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr ("binding" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) ("binding" ::: Word32
maxEmbeddedImmutableSamplers)
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
bufferCaptureReplayDescriptorDataSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
imageCaptureReplayDescriptorDataSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
imageViewCaptureReplayDescriptorDataSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
samplerCaptureReplayDescriptorDataSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
accelerationStructureCaptureReplayDescriptorDataSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
samplerDescriptorSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
combinedImageSamplerDescriptorSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
120 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
sampledImageDescriptorSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
storageImageDescriptorSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
uniformTexelBufferDescriptorSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
robustUniformTexelBufferDescriptorSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
152 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
storageTexelBufferDescriptorSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
robustStorageTexelBufferDescriptorSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
168 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
uniformBufferDescriptorSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
176 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
robustUniformBufferDescriptorSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
184 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
storageBufferDescriptorSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
192 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
robustStorageBufferDescriptorSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
200 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
inputAttachmentDescriptorSize))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
208 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
accelerationStructureDescriptorSize))
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
216 :: Ptr DeviceSize)) (DeviceAddress
maxSamplerDescriptorBufferRange)
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
224 :: Ptr DeviceSize)) (DeviceAddress
maxResourceDescriptorBufferRange)
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
232 :: Ptr DeviceSize)) (DeviceAddress
samplerDescriptorBufferAddressSpaceSize)
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
240 :: Ptr DeviceSize)) (DeviceAddress
resourceDescriptorBufferAddressSpaceSize)
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
248 :: Ptr DeviceSize)) (DeviceAddress
descriptorBufferAddressSpaceSize)
    IO b
f
  cStructSize :: Int
cStructSize = Int
256
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) (DeviceAddress
forall a. Zero a => a
zero)
    Ptr ("binding" ::: Word32) -> ("binding" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr ("binding" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) ("binding" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("binding" ::: Word32) -> ("binding" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr ("binding" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) ("binding" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("binding" ::: Word32) -> ("binding" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr ("binding" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) ("binding" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("binding" ::: Word32) -> ("binding" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr ("binding" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) ("binding" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("binding" ::: Word32) -> ("binding" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr ("binding" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) ("binding" ::: Word32
forall a. Zero a => a
zero)
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
120 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
152 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
168 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
176 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
184 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
192 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
200 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
208 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
216 :: Ptr DeviceSize)) (DeviceAddress
forall a. Zero a => a
zero)
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
224 :: Ptr DeviceSize)) (DeviceAddress
forall a. Zero a => a
zero)
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
232 :: Ptr DeviceSize)) (DeviceAddress
forall a. Zero a => a
zero)
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
240 :: Ptr DeviceSize)) (DeviceAddress
forall a. Zero a => a
zero)
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
248 :: Ptr DeviceSize)) (DeviceAddress
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PhysicalDeviceDescriptorBufferPropertiesEXT where
  peekCStruct :: Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> IO PhysicalDeviceDescriptorBufferPropertiesEXT
peekCStruct Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p = do
    combinedImageSamplerDescriptorSingleArray <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    bufferlessPushDescriptors <- peek @Bool32 ((p `plusPtr` 20 :: Ptr Bool32))
    allowSamplerImageViewPostSubmitCreation <- peek @Bool32 ((p `plusPtr` 24 :: Ptr Bool32))
    descriptorBufferOffsetAlignment <- peek @DeviceSize ((p `plusPtr` 32 :: Ptr DeviceSize))
    maxDescriptorBufferBindings <- peek @Word32 ((p `plusPtr` 40 :: Ptr Word32))
    maxResourceDescriptorBufferBindings <- peek @Word32 ((p `plusPtr` 44 :: Ptr Word32))
    maxSamplerDescriptorBufferBindings <- peek @Word32 ((p `plusPtr` 48 :: Ptr Word32))
    maxEmbeddedImmutableSamplerBindings <- peek @Word32 ((p `plusPtr` 52 :: Ptr Word32))
    maxEmbeddedImmutableSamplers <- peek @Word32 ((p `plusPtr` 56 :: Ptr Word32))
    bufferCaptureReplayDescriptorDataSize <- peek @CSize ((p `plusPtr` 64 :: Ptr CSize))
    imageCaptureReplayDescriptorDataSize <- peek @CSize ((p `plusPtr` 72 :: Ptr CSize))
    imageViewCaptureReplayDescriptorDataSize <- peek @CSize ((p `plusPtr` 80 :: Ptr CSize))
    samplerCaptureReplayDescriptorDataSize <- peek @CSize ((p `plusPtr` 88 :: Ptr CSize))
    accelerationStructureCaptureReplayDescriptorDataSize <- peek @CSize ((p `plusPtr` 96 :: Ptr CSize))
    samplerDescriptorSize <- peek @CSize ((p `plusPtr` 104 :: Ptr CSize))
    combinedImageSamplerDescriptorSize <- peek @CSize ((p `plusPtr` 112 :: Ptr CSize))
    sampledImageDescriptorSize <- peek @CSize ((p `plusPtr` 120 :: Ptr CSize))
    storageImageDescriptorSize <- peek @CSize ((p `plusPtr` 128 :: Ptr CSize))
    uniformTexelBufferDescriptorSize <- peek @CSize ((p `plusPtr` 136 :: Ptr CSize))
    robustUniformTexelBufferDescriptorSize <- peek @CSize ((p `plusPtr` 144 :: Ptr CSize))
    storageTexelBufferDescriptorSize <- peek @CSize ((p `plusPtr` 152 :: Ptr CSize))
    robustStorageTexelBufferDescriptorSize <- peek @CSize ((p `plusPtr` 160 :: Ptr CSize))
    uniformBufferDescriptorSize <- peek @CSize ((p `plusPtr` 168 :: Ptr CSize))
    robustUniformBufferDescriptorSize <- peek @CSize ((p `plusPtr` 176 :: Ptr CSize))
    storageBufferDescriptorSize <- peek @CSize ((p `plusPtr` 184 :: Ptr CSize))
    robustStorageBufferDescriptorSize <- peek @CSize ((p `plusPtr` 192 :: Ptr CSize))
    inputAttachmentDescriptorSize <- peek @CSize ((p `plusPtr` 200 :: Ptr CSize))
    accelerationStructureDescriptorSize <- peek @CSize ((p `plusPtr` 208 :: Ptr CSize))
    maxSamplerDescriptorBufferRange <- peek @DeviceSize ((p `plusPtr` 216 :: Ptr DeviceSize))
    maxResourceDescriptorBufferRange <- peek @DeviceSize ((p `plusPtr` 224 :: Ptr DeviceSize))
    samplerDescriptorBufferAddressSpaceSize <- peek @DeviceSize ((p `plusPtr` 232 :: Ptr DeviceSize))
    resourceDescriptorBufferAddressSpaceSize <- peek @DeviceSize ((p `plusPtr` 240 :: Ptr DeviceSize))
    descriptorBufferAddressSpaceSize <- peek @DeviceSize ((p `plusPtr` 248 :: Ptr DeviceSize))
    pure $ PhysicalDeviceDescriptorBufferPropertiesEXT
             (bool32ToBool combinedImageSamplerDescriptorSingleArray)
             (bool32ToBool bufferlessPushDescriptors)
             (bool32ToBool allowSamplerImageViewPostSubmitCreation)
             descriptorBufferOffsetAlignment
             maxDescriptorBufferBindings
             maxResourceDescriptorBufferBindings
             maxSamplerDescriptorBufferBindings
             maxEmbeddedImmutableSamplerBindings
             maxEmbeddedImmutableSamplers
             (coerce @CSize @Word64 bufferCaptureReplayDescriptorDataSize)
             (coerce @CSize @Word64 imageCaptureReplayDescriptorDataSize)
             (coerce @CSize @Word64 imageViewCaptureReplayDescriptorDataSize)
             (coerce @CSize @Word64 samplerCaptureReplayDescriptorDataSize)
             (coerce @CSize @Word64 accelerationStructureCaptureReplayDescriptorDataSize)
             (coerce @CSize @Word64 samplerDescriptorSize)
             (coerce @CSize @Word64 combinedImageSamplerDescriptorSize)
             (coerce @CSize @Word64 sampledImageDescriptorSize)
             (coerce @CSize @Word64 storageImageDescriptorSize)
             (coerce @CSize @Word64 uniformTexelBufferDescriptorSize)
             (coerce @CSize @Word64 robustUniformTexelBufferDescriptorSize)
             (coerce @CSize @Word64 storageTexelBufferDescriptorSize)
             (coerce @CSize @Word64 robustStorageTexelBufferDescriptorSize)
             (coerce @CSize @Word64 uniformBufferDescriptorSize)
             (coerce @CSize @Word64 robustUniformBufferDescriptorSize)
             (coerce @CSize @Word64 storageBufferDescriptorSize)
             (coerce @CSize @Word64 robustStorageBufferDescriptorSize)
             (coerce @CSize @Word64 inputAttachmentDescriptorSize)
             (coerce @CSize @Word64 accelerationStructureDescriptorSize)
             maxSamplerDescriptorBufferRange
             maxResourceDescriptorBufferRange
             samplerDescriptorBufferAddressSpaceSize
             resourceDescriptorBufferAddressSpaceSize
             descriptorBufferAddressSpaceSize

instance Storable PhysicalDeviceDescriptorBufferPropertiesEXT where
  sizeOf :: PhysicalDeviceDescriptorBufferPropertiesEXT -> Int
sizeOf ~PhysicalDeviceDescriptorBufferPropertiesEXT
_ = Int
256
  alignment :: PhysicalDeviceDescriptorBufferPropertiesEXT -> Int
alignment ~PhysicalDeviceDescriptorBufferPropertiesEXT
_ = Int
8
  peek :: Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> IO PhysicalDeviceDescriptorBufferPropertiesEXT
peek = Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> IO PhysicalDeviceDescriptorBufferPropertiesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> IO ()
poke Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
ptr PhysicalDeviceDescriptorBufferPropertiesEXT
poked = Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> IO () -> IO ()
forall b.
Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
ptr PhysicalDeviceDescriptorBufferPropertiesEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceDescriptorBufferPropertiesEXT where
  zero :: PhysicalDeviceDescriptorBufferPropertiesEXT
zero = Bool
-> Bool
-> Bool
-> DeviceAddress
-> ("binding" ::: Word32)
-> ("binding" ::: Word32)
-> ("binding" ::: Word32)
-> ("binding" ::: Word32)
-> ("binding" ::: Word32)
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> DeviceAddress
-> PhysicalDeviceDescriptorBufferPropertiesEXT
PhysicalDeviceDescriptorBufferPropertiesEXT
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           "binding" ::: Word32
forall a. Zero a => a
zero
           "binding" ::: Word32
forall a. Zero a => a
zero
           "binding" ::: Word32
forall a. Zero a => a
zero
           "binding" ::: Word32
forall a. Zero a => a
zero
           "binding" ::: Word32
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero


-- | VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT - Structure
-- describing descriptor buffer density map properties supported by an
-- implementation
--
-- = Description
--
-- If the 'PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT' structure
-- is included in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceProperties2',
-- it is filled in with each corresponding implementation-dependent
-- property.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT = PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
  { -- | #limits-combinedImageSamplerDensityMapDescriptorSize#
    -- @combinedImageSamplerDensityMapDescriptorSize@ indicates the size in
    -- bytes of a
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'
    -- descriptor when creating the descriptor with
    -- 'Vulkan.Core10.Enums.SamplerCreateFlagBits.SAMPLER_CREATE_SUBSAMPLED_BIT_EXT'
    -- set.
    PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> DeviceAddress
combinedImageSamplerDensityMapDescriptorSize :: Word64 }
  deriving (Typeable, PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> Bool
(PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
 -> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> Bool)
-> (PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
    -> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> Bool)
-> Eq PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> Bool
== :: PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> Bool
$c/= :: PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> Bool
/= :: PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT)
#endif
deriving instance Show PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT

instance ToCStruct PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT where
  withCStruct :: forall b.
PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> (Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
    -> IO b)
-> IO b
withCStruct PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
x Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> IO b
f = Int
-> (Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
    -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
  -> IO b)
 -> IO b)
-> (Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
    -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p -> Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> IO b
-> IO b
forall b.
Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
x (Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> IO b
f Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT{DeviceAddress
combinedImageSamplerDensityMapDescriptorSize :: PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> DeviceAddress
combinedImageSamplerDensityMapDescriptorSize :: DeviceAddress
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
combinedImageSamplerDensityMapDescriptorSize))
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CSize)) (DeviceAddress -> CSize
CSize (DeviceAddress
forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT where
  peekCStruct :: Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> IO PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
peekCStruct Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p = do
    combinedImageSamplerDensityMapDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CSize))
    pure $ PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
             (coerce @CSize @Word64 combinedImageSamplerDensityMapDescriptorSize)

instance Storable PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT where
  sizeOf :: PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> Int
sizeOf ~PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
_ = Int
24
  alignment :: PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> Int
alignment ~PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
_ = Int
8
  peek :: Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> IO PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
peek = Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> IO PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> IO ()
poke Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
poked = Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> IO ()
-> IO ()
forall b.
Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT where
  zero :: PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
zero = DeviceAddress
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
           DeviceAddress
forall a. Zero a => a
zero


-- | VkDescriptorAddressInfoEXT - Structure specifying descriptor buffer
-- address info
--
-- == Valid Usage
--
-- -   #VUID-VkDescriptorAddressInfoEXT-None-09508# If @address@ is not
--     zero, and the descriptor is of type
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER'
--     or
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER',
--     then @format@ /must/ not be
--     'Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED'
--
-- -   #VUID-VkDescriptorAddressInfoEXT-address-08043# If the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-nullDescriptor nullDescriptor>
--     feature is not enabled, @address@ /must/ not be zero
--
-- -   #VUID-VkDescriptorAddressInfoEXT-nullDescriptor-08938# If @address@
--     is zero, @range@ /must/ be 'Vulkan.Core10.APIConstants.WHOLE_SIZE'
--
-- -   #VUID-VkDescriptorAddressInfoEXT-nullDescriptor-08939# If @address@
--     is not zero, @range@ /must/ not be
--     'Vulkan.Core10.APIConstants.WHOLE_SIZE'
--
-- -   #VUID-VkDescriptorAddressInfoEXT-range-08045# If @address@ is not
--     zero, then @range@ /must/ be less than or equal to the size of the
--     buffer containing @address@ minus the offset of @address@ from the
--     base address of the buffer
--
-- -   #VUID-VkDescriptorAddressInfoEXT-range-08940# @range@ /must/ not be
--     zero
--
-- -   #VUID-VkDescriptorAddressInfoEXT-None-12271# If Vulkan 1.3 is not
--     supported and the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-ycbcr2plane444Formats ycbcr2plane444Formats>
--     feature is not enabled, @format@ /must/ not be
--     'Vulkan.Core10.Enums.Format.FORMAT_G8_B8R8_2PLANE_444_UNORM',
--     'Vulkan.Core10.Enums.Format.FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16',
--     'Vulkan.Core10.Enums.Format.FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16',
--     or 'Vulkan.Core10.Enums.Format.FORMAT_G16_B16R16_2PLANE_444_UNORM'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkDescriptorAddressInfoEXT-sType-sType# @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT'
--
-- -   #VUID-VkDescriptorAddressInfoEXT-pNext-pNext# @pNext@ /must/ be
--     @NULL@
--
-- -   #VUID-VkDescriptorAddressInfoEXT-address-parameter# If @address@ is
--     not @0@, @address@ /must/ be a valid
--     'Vulkan.Core10.FundamentalTypes.DeviceAddress' value
--
-- -   #VUID-VkDescriptorAddressInfoEXT-format-parameter# @format@ /must/
--     be a valid 'Vulkan.Core10.Enums.Format.Format' value
--
-- If the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-nullDescriptor nullDescriptor>
-- feature is enabled, @address@ /can/ be zero. Loads from a null
-- descriptor return zero values and stores and atomics to a null
-- descriptor are discarded.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'DescriptorDataEXT', 'Vulkan.Core10.FundamentalTypes.DeviceAddress',
-- 'Vulkan.Core10.FundamentalTypes.DeviceSize',
-- 'Vulkan.Core10.Enums.Format.Format',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data DescriptorAddressInfoEXT = DescriptorAddressInfoEXT
  { -- | @address@ is either @0@ or a device address at an offset in a buffer,
    -- where the base address can be queried from
    -- 'Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address.getBufferDeviceAddress'.
    DescriptorAddressInfoEXT -> DeviceAddress
address :: DeviceAddress
  , -- | @range@ is the size in bytes of the buffer or buffer view used by the
    -- descriptor.
    DescriptorAddressInfoEXT -> DeviceAddress
range :: DeviceSize
  , -- | @format@ is the format of the data elements in the buffer view and is
    -- ignored for buffers.
    DescriptorAddressInfoEXT -> Format
format :: Format
  }
  deriving (Typeable, DescriptorAddressInfoEXT -> DescriptorAddressInfoEXT -> Bool
(DescriptorAddressInfoEXT -> DescriptorAddressInfoEXT -> Bool)
-> (DescriptorAddressInfoEXT -> DescriptorAddressInfoEXT -> Bool)
-> Eq DescriptorAddressInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DescriptorAddressInfoEXT -> DescriptorAddressInfoEXT -> Bool
== :: DescriptorAddressInfoEXT -> DescriptorAddressInfoEXT -> Bool
$c/= :: DescriptorAddressInfoEXT -> DescriptorAddressInfoEXT -> Bool
/= :: DescriptorAddressInfoEXT -> DescriptorAddressInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DescriptorAddressInfoEXT)
#endif
deriving instance Show DescriptorAddressInfoEXT

instance ToCStruct DescriptorAddressInfoEXT where
  withCStruct :: forall b.
DescriptorAddressInfoEXT
-> (Ptr DescriptorAddressInfoEXT -> IO b) -> IO b
withCStruct DescriptorAddressInfoEXT
x Ptr DescriptorAddressInfoEXT -> IO b
f = Int -> (Ptr DescriptorAddressInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((Ptr DescriptorAddressInfoEXT -> IO b) -> IO b)
-> (Ptr DescriptorAddressInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr DescriptorAddressInfoEXT
p -> Ptr DescriptorAddressInfoEXT
-> DescriptorAddressInfoEXT -> IO b -> IO b
forall b.
Ptr DescriptorAddressInfoEXT
-> DescriptorAddressInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DescriptorAddressInfoEXT
p DescriptorAddressInfoEXT
x (Ptr DescriptorAddressInfoEXT -> IO b
f Ptr DescriptorAddressInfoEXT
p)
  pokeCStruct :: forall b.
Ptr DescriptorAddressInfoEXT
-> DescriptorAddressInfoEXT -> IO b -> IO b
pokeCStruct Ptr DescriptorAddressInfoEXT
p DescriptorAddressInfoEXT{DeviceAddress
Format
address :: DescriptorAddressInfoEXT -> DeviceAddress
range :: DescriptorAddressInfoEXT -> DeviceAddress
format :: DescriptorAddressInfoEXT -> Format
address :: DeviceAddress
range :: DeviceAddress
format :: Format
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p Ptr DescriptorAddressInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p Ptr DescriptorAddressInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p Ptr DescriptorAddressInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceAddress)) (DeviceAddress
address)
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p Ptr DescriptorAddressInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) (DeviceAddress
range)
    Ptr Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p Ptr DescriptorAddressInfoEXT -> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Format)) (Format
format)
    IO b
f
  cStructSize :: Int
cStructSize = Int
40
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr DescriptorAddressInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr DescriptorAddressInfoEXT
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p Ptr DescriptorAddressInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p Ptr DescriptorAddressInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p Ptr DescriptorAddressInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) (DeviceAddress
forall a. Zero a => a
zero)
    Ptr Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p Ptr DescriptorAddressInfoEXT -> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Format)) (Format
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct DescriptorAddressInfoEXT where
  peekCStruct :: Ptr DescriptorAddressInfoEXT -> IO DescriptorAddressInfoEXT
peekCStruct Ptr DescriptorAddressInfoEXT
p = do
    address <- forall a. Storable a => Ptr a -> IO a
peek @DeviceAddress ((Ptr DescriptorAddressInfoEXT
p Ptr DescriptorAddressInfoEXT -> Int -> Ptr DeviceAddress
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceAddress))
    range <- peek @DeviceSize ((p `plusPtr` 24 :: Ptr DeviceSize))
    format <- peek @Format ((p `plusPtr` 32 :: Ptr Format))
    pure $ DescriptorAddressInfoEXT
             address range format

instance Storable DescriptorAddressInfoEXT where
  sizeOf :: DescriptorAddressInfoEXT -> Int
sizeOf ~DescriptorAddressInfoEXT
_ = Int
40
  alignment :: DescriptorAddressInfoEXT -> Int
alignment ~DescriptorAddressInfoEXT
_ = Int
8
  peek :: Ptr DescriptorAddressInfoEXT -> IO DescriptorAddressInfoEXT
peek = Ptr DescriptorAddressInfoEXT -> IO DescriptorAddressInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr DescriptorAddressInfoEXT -> DescriptorAddressInfoEXT -> IO ()
poke Ptr DescriptorAddressInfoEXT
ptr DescriptorAddressInfoEXT
poked = Ptr DescriptorAddressInfoEXT
-> DescriptorAddressInfoEXT -> IO () -> IO ()
forall b.
Ptr DescriptorAddressInfoEXT
-> DescriptorAddressInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DescriptorAddressInfoEXT
ptr DescriptorAddressInfoEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero DescriptorAddressInfoEXT where
  zero :: DescriptorAddressInfoEXT
zero = DeviceAddress
-> DeviceAddress -> Format -> DescriptorAddressInfoEXT
DescriptorAddressInfoEXT
           DeviceAddress
forall a. Zero a => a
zero
           DeviceAddress
forall a. Zero a => a
zero
           Format
forall a. Zero a => a
zero


-- | VkDescriptorBufferBindingInfoEXT - Structure specifying descriptor
-- buffer binding information
--
-- = Description
--
-- If the @pNext@ chain includes a
-- 'Vulkan.Core14.Promoted_From_VK_KHR_maintenance5Roadmap.BufferUsageFlags2CreateInfo'
-- structure,
-- 'Vulkan.Core14.Promoted_From_VK_KHR_maintenance5Roadmap.BufferUsageFlags2CreateInfo'::@usage@
-- from that structure is used instead of @usage@ from this structure.
--
-- == Valid Usage
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-None-09499# If the @pNext@
--     chain does not include a
--     'Vulkan.Core14.Promoted_From_VK_KHR_maintenance5Roadmap.BufferUsageFlags2CreateInfo'
--     structure, @usage@ /must/ be a valid combination of
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BufferUsageFlagBits' values
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-None-09500# If the @pNext@
--     chain does not include a
--     'Vulkan.Core14.Promoted_From_VK_KHR_maintenance5Roadmap.BufferUsageFlags2CreateInfo'
--     structure, @usage@ /must/ not be 0
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-usage-10998# The @usage@ must
--     include at least one of
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT',
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT',
--     or
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT'
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-bufferlessPushDescriptors-08056#
--     If
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-bufferlessPushDescriptors ::bufferlessPushDescriptors>
--     is 'Vulkan.Core10.FundamentalTypes.FALSE', and @usage@ contains
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT',
--     then the @pNext@ chain /must/ include a
--     'DescriptorBufferBindingPushDescriptorBufferHandleEXT' structure
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-address-08057# @address@
--     /must/ be aligned to
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@descriptorBufferOffsetAlignment@
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-usage-08122# If @usage@
--     includes
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT',
--     @address@ /must/ be a device address allocated to the application
--     from a buffer created with the
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT'
--     usage flag set
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-usage-08123# If @usage@
--     includes
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT',
--     @address@ /must/ be a device address allocated to the application
--     from a buffer created with the
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT'
--     usage flag set
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-usage-08124# If @usage@
--     includes
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT',
--     @address@ /must/ be a device address allocated to the application
--     from a buffer created with the
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT'
--     usage flag set
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-sType-sType# @sType@ /must/
--     be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT'
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-pNext-pNext# 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
--     'Vulkan.Core14.Promoted_From_VK_KHR_maintenance5Roadmap.BufferUsageFlags2CreateInfo'
--     or 'DescriptorBufferBindingPushDescriptorBufferHandleEXT'
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-sType-unique# The @sType@
--     value of each structure in the @pNext@ chain /must/ be unique
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-address-parameter# @address@
--     /must/ be a valid 'Vulkan.Core10.FundamentalTypes.DeviceAddress'
--     value
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BufferUsageFlags',
-- 'Vulkan.Core10.FundamentalTypes.DeviceAddress',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'cmdBindDescriptorBuffersEXT'
data DescriptorBufferBindingInfoEXT (es :: [Type]) = DescriptorBufferBindingInfoEXT
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]). DescriptorBufferBindingInfoEXT es -> Chain es
next :: Chain es
  , -- | @address@ is a 'Vulkan.Core10.FundamentalTypes.DeviceAddress' specifying
    -- the device address defining the descriptor buffer to be bound.
    forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> DeviceAddress
address :: DeviceAddress
  , -- | @usage@ is a bitmask of
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BufferUsageFlagBits' specifying
    -- the 'Vulkan.Core10.Buffer.BufferCreateInfo'::@usage@ for the buffer from
    -- which @address@ was queried. Usage flags other than
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT',
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT',
    -- and
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT'
    -- are ignored.
    forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> BufferUsageFlags
usage :: BufferUsageFlags
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DescriptorBufferBindingInfoEXT (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (DescriptorBufferBindingInfoEXT es)

instance Extensible DescriptorBufferBindingInfoEXT where
  extensibleTypeName :: String
extensibleTypeName = String
"DescriptorBufferBindingInfoEXT"
  setNext :: forall (ds :: [*]) (es :: [*]).
DescriptorBufferBindingInfoEXT ds
-> Chain es -> DescriptorBufferBindingInfoEXT es
setNext DescriptorBufferBindingInfoEXT{DeviceAddress
BufferUsageFlags
Chain ds
next :: forall (es :: [*]). DescriptorBufferBindingInfoEXT es -> Chain es
address :: forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> DeviceAddress
usage :: forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> BufferUsageFlags
next :: Chain ds
address :: DeviceAddress
usage :: BufferUsageFlags
..} Chain es
next' = DescriptorBufferBindingInfoEXT{next :: Chain es
next = Chain es
next', DeviceAddress
BufferUsageFlags
address :: DeviceAddress
usage :: BufferUsageFlags
address :: DeviceAddress
usage :: BufferUsageFlags
..}
  getNext :: forall (es :: [*]). DescriptorBufferBindingInfoEXT es -> Chain es
getNext DescriptorBufferBindingInfoEXT{DeviceAddress
BufferUsageFlags
Chain es
next :: forall (es :: [*]). DescriptorBufferBindingInfoEXT es -> Chain es
address :: forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> DeviceAddress
usage :: forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> BufferUsageFlags
next :: Chain es
address :: DeviceAddress
usage :: BufferUsageFlags
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends DescriptorBufferBindingInfoEXT e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends DescriptorBufferBindingInfoEXT e => b) -> Maybe b
extends proxy e
_ Extends DescriptorBufferBindingInfoEXT e => b
f
    | Just e :~: DescriptorBufferBindingPushDescriptorBufferHandleEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @DescriptorBufferBindingPushDescriptorBufferHandleEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DescriptorBufferBindingInfoEXT e => b
f
    | Just e :~: BufferUsageFlags2CreateInfo
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @BufferUsageFlags2CreateInfo = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DescriptorBufferBindingInfoEXT e => b
f
    | Bool
otherwise = Maybe b
forall a. Maybe a
Nothing

instance ( Extendss DescriptorBufferBindingInfoEXT es
         , PokeChain es ) => ToCStruct (DescriptorBufferBindingInfoEXT es) where
  withCStruct :: forall b.
DescriptorBufferBindingInfoEXT es
-> (Ptr (DescriptorBufferBindingInfoEXT es) -> IO b) -> IO b
withCStruct DescriptorBufferBindingInfoEXT es
x Ptr (DescriptorBufferBindingInfoEXT es) -> IO b
f = Int -> (Ptr (DescriptorBufferBindingInfoEXT es) -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr (DescriptorBufferBindingInfoEXT es) -> IO b) -> IO b)
-> (Ptr (DescriptorBufferBindingInfoEXT es) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr (DescriptorBufferBindingInfoEXT es)
p -> Ptr (DescriptorBufferBindingInfoEXT es)
-> DescriptorBufferBindingInfoEXT es -> IO b -> IO b
forall b.
Ptr (DescriptorBufferBindingInfoEXT es)
-> DescriptorBufferBindingInfoEXT es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (DescriptorBufferBindingInfoEXT es)
p DescriptorBufferBindingInfoEXT es
x (Ptr (DescriptorBufferBindingInfoEXT es) -> IO b
f Ptr (DescriptorBufferBindingInfoEXT es)
p)
  pokeCStruct :: forall b.
Ptr (DescriptorBufferBindingInfoEXT es)
-> DescriptorBufferBindingInfoEXT es -> IO b -> IO b
pokeCStruct Ptr (DescriptorBufferBindingInfoEXT es)
p DescriptorBufferBindingInfoEXT{DeviceAddress
BufferUsageFlags
Chain es
next :: forall (es :: [*]). DescriptorBufferBindingInfoEXT es -> Chain es
address :: forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> DeviceAddress
usage :: forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> BufferUsageFlags
next :: Chain es
address :: DeviceAddress
usage :: BufferUsageFlags
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DescriptorBufferBindingInfoEXT es)
p Ptr (DescriptorBufferBindingInfoEXT es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT)
    pNext'' <- (Ptr (Chain es) -> "descriptor" ::: Ptr ())
-> ContT b IO (Ptr (Chain es))
-> ContT b IO ("descriptor" ::: Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> "descriptor" ::: Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es))
 -> ContT b IO ("descriptor" ::: Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
    -> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("descriptor" ::: Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b)
 -> ContT b IO ("descriptor" ::: Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("descriptor" ::: Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
forall a. Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
    lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext''
    lift $ poke ((p `plusPtr` 16 :: Ptr DeviceAddress)) (address)
    lift $ poke ((p `plusPtr` 24 :: Ptr BufferUsageFlags)) (usage)
    lift $ f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr (DescriptorBufferBindingInfoEXT es) -> IO b -> IO b
pokeZeroCStruct Ptr (DescriptorBufferBindingInfoEXT es)
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DescriptorBufferBindingInfoEXT es)
p Ptr (DescriptorBufferBindingInfoEXT es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT)
    pNext' <- (Ptr (Chain es) -> "descriptor" ::: Ptr ())
-> ContT b IO (Ptr (Chain es))
-> ContT b IO ("descriptor" ::: Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> "descriptor" ::: Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es))
 -> ContT b IO ("descriptor" ::: Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
    -> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("descriptor" ::: Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b)
 -> ContT b IO ("descriptor" ::: Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("descriptor" ::: Ptr ())
forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
    lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext'
    lift $ poke ((p `plusPtr` 16 :: Ptr DeviceAddress)) (zero)
    lift $ f

instance ( Extendss DescriptorBufferBindingInfoEXT es
         , PeekChain es ) => FromCStruct (DescriptorBufferBindingInfoEXT es) where
  peekCStruct :: Ptr (DescriptorBufferBindingInfoEXT es)
-> IO (DescriptorBufferBindingInfoEXT es)
peekCStruct Ptr (DescriptorBufferBindingInfoEXT es)
p = do
    pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (DescriptorBufferBindingInfoEXT es)
p Ptr (DescriptorBufferBindingInfoEXT es)
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
    next <- peekChain (castPtr pNext)
    address <- peek @DeviceAddress ((p `plusPtr` 16 :: Ptr DeviceAddress))
    usage <- peek @BufferUsageFlags ((p `plusPtr` 24 :: Ptr BufferUsageFlags))
    pure $ DescriptorBufferBindingInfoEXT
             next address usage

instance es ~ '[] => Zero (DescriptorBufferBindingInfoEXT es) where
  zero :: DescriptorBufferBindingInfoEXT es
zero = Chain es
-> DeviceAddress
-> BufferUsageFlags
-> DescriptorBufferBindingInfoEXT es
forall (es :: [*]).
Chain es
-> DeviceAddress
-> BufferUsageFlags
-> DescriptorBufferBindingInfoEXT es
DescriptorBufferBindingInfoEXT
           ()
           DeviceAddress
forall a. Zero a => a
zero
           BufferUsageFlags
forall a. Zero a => a
zero


-- | VkDescriptorBufferBindingPushDescriptorBufferHandleEXT - Structure
-- specifying push descriptor buffer binding information
--
-- == Valid Usage
--
-- -   #VUID-VkDescriptorBufferBindingPushDescriptorBufferHandleEXT-bufferlessPushDescriptors-08059#
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-bufferlessPushDescriptors ::bufferlessPushDescriptors>
--     /must/ be 'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkDescriptorBufferBindingPushDescriptorBufferHandleEXT-sType-sType#
--     @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT'
--
-- -   #VUID-VkDescriptorBufferBindingPushDescriptorBufferHandleEXT-buffer-parameter#
--     @buffer@ /must/ be a valid 'Vulkan.Core10.Handles.Buffer' handle
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Handles.Buffer',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data DescriptorBufferBindingPushDescriptorBufferHandleEXT = DescriptorBufferBindingPushDescriptorBufferHandleEXT
  { -- | @buffer@ is the 'Vulkan.Core10.Handles.Buffer' handle of the buffer for
    -- push descriptors.
    DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Buffer
buffer :: Buffer }
  deriving (Typeable, DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Bool
(DescriptorBufferBindingPushDescriptorBufferHandleEXT
 -> DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Bool)
-> (DescriptorBufferBindingPushDescriptorBufferHandleEXT
    -> DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Bool)
-> Eq DescriptorBufferBindingPushDescriptorBufferHandleEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Bool
== :: DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Bool
$c/= :: DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Bool
/= :: DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DescriptorBufferBindingPushDescriptorBufferHandleEXT)
#endif
deriving instance Show DescriptorBufferBindingPushDescriptorBufferHandleEXT

instance ToCStruct DescriptorBufferBindingPushDescriptorBufferHandleEXT where
  withCStruct :: forall b.
DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> (Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
    -> IO b)
-> IO b
withCStruct DescriptorBufferBindingPushDescriptorBufferHandleEXT
x Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT -> IO b
f = Int
-> (Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
    -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT -> IO b)
 -> IO b)
-> (Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
    -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p -> Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> IO b
-> IO b
forall b.
Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p DescriptorBufferBindingPushDescriptorBufferHandleEXT
x (Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT -> IO b
f Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p)
  pokeCStruct :: forall b.
Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> IO b
-> IO b
pokeCStruct Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p DescriptorBufferBindingPushDescriptorBufferHandleEXT{Buffer
buffer :: DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Buffer
buffer :: Buffer
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer)) (Buffer
buffer)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> IO b -> IO b
pokeZeroCStruct Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer)) (Buffer
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct DescriptorBufferBindingPushDescriptorBufferHandleEXT where
  peekCStruct :: Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> IO DescriptorBufferBindingPushDescriptorBufferHandleEXT
peekCStruct Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p = do
    buffer <- forall a. Storable a => Ptr a -> IO a
peek @Buffer ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer))
    pure $ DescriptorBufferBindingPushDescriptorBufferHandleEXT
             buffer

instance Storable DescriptorBufferBindingPushDescriptorBufferHandleEXT where
  sizeOf :: DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Int
sizeOf ~DescriptorBufferBindingPushDescriptorBufferHandleEXT
_ = Int
24
  alignment :: DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Int
alignment ~DescriptorBufferBindingPushDescriptorBufferHandleEXT
_ = Int
8
  peek :: Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> IO DescriptorBufferBindingPushDescriptorBufferHandleEXT
peek = Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> IO DescriptorBufferBindingPushDescriptorBufferHandleEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT -> IO ()
poke Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
poked = Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> IO ()
-> IO ()
forall b.
Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero DescriptorBufferBindingPushDescriptorBufferHandleEXT where
  zero :: DescriptorBufferBindingPushDescriptorBufferHandleEXT
zero = Buffer -> DescriptorBufferBindingPushDescriptorBufferHandleEXT
DescriptorBufferBindingPushDescriptorBufferHandleEXT
           Buffer
forall a. Zero a => a
zero


-- | VkDescriptorGetInfoEXT - Structure specifying parameters of descriptor
-- to get
--
-- == Valid Usage
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-08018# @type@ /must/ not be
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC',
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'
--     or
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK'
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-08019# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',
--     the @pCombinedImageSampler->sampler@ member of @data@ /must/ be a
--     'Vulkan.Core10.Handles.Sampler' created on @device@
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-08020# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',
--     the @pCombinedImageSampler->imageView@ member of @data@ /must/ be a
--     'Vulkan.Core10.Handles.ImageView' created on @device@, or
--     'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-08021# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT',
--     the @pInputAttachmentImage->imageView@ member of @data@ /must/ be a
--     'Vulkan.Core10.Handles.ImageView' created on @device@
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-08022# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE',
--     and if @pSampledImage@ is not @NULL@, the @pSampledImage->imageView@
--     member of @data@ /must/ be a 'Vulkan.Core10.Handles.ImageView'
--     created on @device@, or 'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-08023# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE',
--     and if @pStorageImage@ is not @NULL@, the @pStorageImage->imageView@
--     member of @data@ /must/ be a 'Vulkan.Core10.Handles.ImageView'
--     created on @device@, or 'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-09427# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER',
--     @pUniformBuffer@ is not @NULL@ , the number of texel buffer elements
--     given by (⌊@pUniformBuffer->range@ \/ (texel block size)⌋ × (texels
--     per block)) where texel block size and texels per block are as
--     defined in the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#formats-compatibility Compatible Formats>
--     table for @pUniformBuffer->format@, /must/ be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxTexelBufferElements@
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-09428# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER',
--     @pStorageBuffer@ is not @NULL@ , the number of texel buffer elements
--     given by (⌊@pStorageBuffer->range@ \/ (texel block size)⌋ × (texels
--     per block)) where texel block size and texels per block are as
--     defined in the
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#formats-compatibility Compatible Formats>
--     table for @pStorageBuffer->format@, /must/ be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxTexelBufferElements@
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-08028# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR'
--     and @accelerationStructure@ is not @0@, @accelerationStructure@
--     /must/ contain the address of a
--     'Vulkan.Extensions.Handles.AccelerationStructureKHR' created on
--     @device@
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-08029# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV'
--     and @accelerationStructure@ is not @0@, @accelerationStructure@
--     /must/ contain the handle of a
--     'Vulkan.Extensions.Handles.AccelerationStructureNV' created on
--     @device@, returned by
--     'Vulkan.Extensions.VK_NV_ray_tracing.getAccelerationStructureHandleNV'
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-09701# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_TENSOR_ARM', a
--     'Vulkan.Extensions.VK_ARM_tensors.DescriptorGetTensorInfoARM'
--     structure /must/ be included in the @pNext@ chain and @data@ is
--     ignored
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-12216# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'
--     and @pCombinedImageSampler->imageView@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', the
--     @pCombinedImageSampler->imageView@ member of @data@ /must/ have been
--     created with
--     'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT' set
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-12217# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE',
--     @pSampledImage@ is not @NULL@, and @pSampledImage->imageView@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', the
--     @pSampledImage->imageView@ member of @data@ /must/ have been created
--     with
--     'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_SAMPLED_BIT' set
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-12218# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE',
--     @pStorageImage@ is not @NULL@, and @pStorageImage->imageView@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', the
--     @pStorageImage->imageView@ member of @data@ /must/ have been created
--     with
--     'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_STORAGE_BIT' set
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-12219# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT',
--     the @pInputAttachmentImage->imageView@ member of @data@ /must/ have
--     been created with
--     'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_INPUT_ATTACHMENT_BIT'
--     set
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-12220# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER',
--     @pUniformBuffer@ is not @NULL@ and @pUniformBuffer->address@ is not
--     zero, @pUniformBuffer->address@ /must/ be a device address allocated
--     to the application from a buffer created with the
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_UNIFORM_BUFFER_BIT'
--     usage flag set
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-12221# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER',
--     @pStorageBuffer@ is not @NULL@ and @pStorageBuffer->address@ is not
--     zero, @pStorageBuffer->address@ /must/ be a device address allocated
--     to the application from a buffer created with the
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_STORAGE_BUFFER_BIT'
--     usage flag set
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-12222# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER',
--     @pUniformTexelBuffer@ is not @NULL@ and
--     @pUniformTexelBuffer->address@ is not zero,
--     @pUniformTexelBuffer->address@ /must/ be a device address allocated
--     to the application from a buffer created with the
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT'
--     usage flag set
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-12223# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER',
--     @pStorageTexelBuffer@ is not @NULL@ and
--     @pStorageTexelBuffer->address@ is not zero,
--     @pStorageTexelBuffer->address@ /must/ be a device address allocated
--     to the application from a buffer created with the
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT'
--     usage flag set
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-12265# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER'
--     and @pUniformBuffer@ is not @NULL@, @pUniformBuffer->address@ /must/
--     be aligned to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@minUniformBufferOffsetAlignment@
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-12266# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER'
--     and @pStorageBuffer@ is not @NULL@, @pStorageBuffer->address@ /must/
--     be aligned to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@minStorageBufferOffsetAlignment@
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-12269# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER',
--     and @pUniformTexelBuffer@ is not @NULL@,
--     @pUniformTexelBuffer->address@ /must/ be a multiple of the effective
--     alignment requirement as determined by
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-minTexelBufferOffsetAlignment minTexelBufferOffsetAlignment>
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-12270# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER',
--     the and @pStorageTexelBuffer@ is not @NULL@,
--     @pStorageTexelBuffer->address@ /must/ be a multiple of the effective
--     alignment requirement as determined by
--     <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#limits-minTexelBufferOffsetAlignment minTexelBufferOffsetAlignment>
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkDescriptorGetInfoEXT-sType-sType# @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT'
--
-- -   #VUID-VkDescriptorGetInfoEXT-pNext-pNext# @pNext@ /must/ be @NULL@
--     or a pointer to a valid instance of
--     'Vulkan.Extensions.VK_ARM_tensors.DescriptorGetTensorInfoARM'
--
-- -   #VUID-VkDescriptorGetInfoEXT-sType-unique# The @sType@ value of each
--     structure in the @pNext@ chain /must/ be unique
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-parameter# @type@ /must/ be a
--     valid 'Vulkan.Core10.Enums.DescriptorType.DescriptorType' value
--
-- -   #VUID-VkDescriptorGetInfoEXT-pSampler-parameter# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLER', the
--     @pSampler@ member of @data@ /must/ be a valid pointer to a valid
--     'Vulkan.Core10.Handles.Sampler' handle
--
-- -   #VUID-VkDescriptorGetInfoEXT-pCombinedImageSampler-parameter# If
--     @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER',
--     the @pCombinedImageSampler@ member of @data@ /must/ be a valid
--     pointer to a valid 'Vulkan.Core10.DescriptorSet.DescriptorImageInfo'
--     structure
--
-- -   #VUID-VkDescriptorGetInfoEXT-pInputAttachmentImage-parameter# If
--     @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_INPUT_ATTACHMENT',
--     the @pInputAttachmentImage@ member of @data@ /must/ be a valid
--     pointer to a valid 'Vulkan.Core10.DescriptorSet.DescriptorImageInfo'
--     structure
--
-- -   #VUID-VkDescriptorGetInfoEXT-pSampledImage-parameter# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_SAMPLED_IMAGE',
--     and if @pSampledImage@ is not @NULL@, the @pSampledImage@ member of
--     @data@ /must/ be a valid pointer to a valid
--     'Vulkan.Core10.DescriptorSet.DescriptorImageInfo' structure
--
-- -   #VUID-VkDescriptorGetInfoEXT-pStorageImage-parameter# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_IMAGE',
--     and if @pStorageImage@ is not @NULL@, the @pStorageImage@ member of
--     @data@ /must/ be a valid pointer to a valid
--     'Vulkan.Core10.DescriptorSet.DescriptorImageInfo' structure
--
-- -   #VUID-VkDescriptorGetInfoEXT-pUniformTexelBuffer-parameter# If
--     @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER',
--     and if @pUniformTexelBuffer@ is not @NULL@, the
--     @pUniformTexelBuffer@ member of @data@ /must/ be a valid pointer to
--     a valid 'DescriptorAddressInfoEXT' structure
--
-- -   #VUID-VkDescriptorGetInfoEXT-pStorageTexelBuffer-parameter# If
--     @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER',
--     and if @pStorageTexelBuffer@ is not @NULL@, the
--     @pStorageTexelBuffer@ member of @data@ /must/ be a valid pointer to
--     a valid 'DescriptorAddressInfoEXT' structure
--
-- -   #VUID-VkDescriptorGetInfoEXT-pUniformBuffer-parameter# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER',
--     and if @pUniformBuffer@ is not @NULL@, the @pUniformBuffer@ member
--     of @data@ /must/ be a valid pointer to a valid
--     'DescriptorAddressInfoEXT' structure
--
-- -   #VUID-VkDescriptorGetInfoEXT-pStorageBuffer-parameter# If @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER',
--     and if @pStorageBuffer@ is not @NULL@, the @pStorageBuffer@ member
--     of @data@ /must/ be a valid pointer to a valid
--     'DescriptorAddressInfoEXT' structure
--
-- -   #VUID-VkDescriptorGetInfoEXT-accelerationStructure-parameter# If
--     @type@ is
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR'
--     or
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV',
--     the @accelerationStructure@ member of @data@ /must/ be a valid
--     'Vulkan.Core10.FundamentalTypes.DeviceAddress' value
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'DescriptorDataEXT',
-- 'Vulkan.Core10.Enums.DescriptorType.DescriptorType',
-- 'Vulkan.Core10.Enums.StructureType.StructureType', 'getDescriptorEXT'
data DescriptorGetInfoEXT (es :: [Type]) = DescriptorGetInfoEXT
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]). DescriptorGetInfoEXT es -> Chain es
next :: Chain es
  , -- | @type@ is the type of descriptor to get.
    forall (es :: [*]). DescriptorGetInfoEXT es -> DescriptorType
type' :: DescriptorType
  , -- | @data@ is a 'DescriptorDataEXT' union containing the information needed
    -- to get the descriptor.
    forall (es :: [*]). DescriptorGetInfoEXT es -> DescriptorDataEXT
data' :: DescriptorDataEXT
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DescriptorGetInfoEXT (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (DescriptorGetInfoEXT es)

instance Extensible DescriptorGetInfoEXT where
  extensibleTypeName :: String
extensibleTypeName = String
"DescriptorGetInfoEXT"
  setNext :: forall (ds :: [*]) (es :: [*]).
DescriptorGetInfoEXT ds -> Chain es -> DescriptorGetInfoEXT es
setNext DescriptorGetInfoEXT{DescriptorType
Chain ds
DescriptorDataEXT
next :: forall (es :: [*]). DescriptorGetInfoEXT es -> Chain es
type' :: forall (es :: [*]). DescriptorGetInfoEXT es -> DescriptorType
data' :: forall (es :: [*]). DescriptorGetInfoEXT es -> DescriptorDataEXT
next :: Chain ds
type' :: DescriptorType
data' :: DescriptorDataEXT
..} Chain es
next' = DescriptorGetInfoEXT{next :: Chain es
next = Chain es
next', DescriptorType
DescriptorDataEXT
type' :: DescriptorType
data' :: DescriptorDataEXT
type' :: DescriptorType
data' :: DescriptorDataEXT
..}
  getNext :: forall (es :: [*]). DescriptorGetInfoEXT es -> Chain es
getNext DescriptorGetInfoEXT{DescriptorType
Chain es
DescriptorDataEXT
next :: forall (es :: [*]). DescriptorGetInfoEXT es -> Chain es
type' :: forall (es :: [*]). DescriptorGetInfoEXT es -> DescriptorType
data' :: forall (es :: [*]). DescriptorGetInfoEXT es -> DescriptorDataEXT
next :: Chain es
type' :: DescriptorType
data' :: DescriptorDataEXT
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends DescriptorGetInfoEXT e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e -> (Extends DescriptorGetInfoEXT e => b) -> Maybe b
extends proxy e
_ Extends DescriptorGetInfoEXT e => b
f
    | Just e :~: DescriptorGetTensorInfoARM
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @DescriptorGetTensorInfoARM = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DescriptorGetInfoEXT e => b
f
    | Bool
otherwise = Maybe b
forall a. Maybe a
Nothing

instance ( Extendss DescriptorGetInfoEXT es
         , PokeChain es ) => ToCStruct (DescriptorGetInfoEXT es) where
  withCStruct :: forall b.
DescriptorGetInfoEXT es
-> (Ptr (DescriptorGetInfoEXT es) -> IO b) -> IO b
withCStruct DescriptorGetInfoEXT es
x Ptr (DescriptorGetInfoEXT es) -> IO b
f = Int -> (Ptr (DescriptorGetInfoEXT es) -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr (DescriptorGetInfoEXT es) -> IO b) -> IO b)
-> (Ptr (DescriptorGetInfoEXT es) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr (DescriptorGetInfoEXT es)
p -> Ptr (DescriptorGetInfoEXT es)
-> DescriptorGetInfoEXT es -> IO b -> IO b
forall b.
Ptr (DescriptorGetInfoEXT es)
-> DescriptorGetInfoEXT es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (DescriptorGetInfoEXT es)
p DescriptorGetInfoEXT es
x (Ptr (DescriptorGetInfoEXT es) -> IO b
f Ptr (DescriptorGetInfoEXT es)
p)
  pokeCStruct :: forall b.
Ptr (DescriptorGetInfoEXT es)
-> DescriptorGetInfoEXT es -> IO b -> IO b
pokeCStruct Ptr (DescriptorGetInfoEXT es)
p DescriptorGetInfoEXT{DescriptorType
Chain es
DescriptorDataEXT
next :: forall (es :: [*]). DescriptorGetInfoEXT es -> Chain es
type' :: forall (es :: [*]). DescriptorGetInfoEXT es -> DescriptorType
data' :: forall (es :: [*]). DescriptorGetInfoEXT es -> DescriptorDataEXT
next :: Chain es
type' :: DescriptorType
data' :: DescriptorDataEXT
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DescriptorGetInfoEXT es)
p Ptr (DescriptorGetInfoEXT es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT)
    pNext'' <- (Ptr (Chain es) -> "descriptor" ::: Ptr ())
-> ContT b IO (Ptr (Chain es))
-> ContT b IO ("descriptor" ::: Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> "descriptor" ::: Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es))
 -> ContT b IO ("descriptor" ::: Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
    -> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("descriptor" ::: Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b)
 -> ContT b IO ("descriptor" ::: Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("descriptor" ::: Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
forall a. Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
    lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext''
    lift $ poke ((p `plusPtr` 16 :: Ptr DescriptorType)) (type')
    ContT $ pokeCStruct ((p `plusPtr` 24 :: Ptr DescriptorDataEXT)) (data') . ($ ())
    lift $ f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr (DescriptorGetInfoEXT es) -> IO b -> IO b
pokeZeroCStruct Ptr (DescriptorGetInfoEXT es)
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DescriptorGetInfoEXT es)
p Ptr (DescriptorGetInfoEXT es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT)
    pNext' <- (Ptr (Chain es) -> "descriptor" ::: Ptr ())
-> ContT b IO (Ptr (Chain es))
-> ContT b IO ("descriptor" ::: Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> "descriptor" ::: Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es))
 -> ContT b IO ("descriptor" ::: Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
    -> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("descriptor" ::: Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b)
 -> ContT b IO ("descriptor" ::: Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("descriptor" ::: Ptr ())
forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
    lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext'
    lift $ poke ((p `plusPtr` 16 :: Ptr DescriptorType)) (zero)
    ContT $ pokeCStruct ((p `plusPtr` 24 :: Ptr DescriptorDataEXT)) (zero) . ($ ())
    lift $ f

instance ( Extendss DescriptorGetInfoEXT es
         , PeekChain es ) => FromCStruct (DescriptorGetInfoEXT es) where
  peekCStruct :: Ptr (DescriptorGetInfoEXT es) -> IO (DescriptorGetInfoEXT es)
peekCStruct Ptr (DescriptorGetInfoEXT es)
p = do
    pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (DescriptorGetInfoEXT es)
p Ptr (DescriptorGetInfoEXT es)
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
    next <- peekChain (castPtr pNext)
    type' <- peek @DescriptorType ((p `plusPtr` 16 :: Ptr DescriptorType))
    data' <- peekDescriptorDataEXT type' ((p `plusPtr` 24 :: Ptr DescriptorDataEXT))
    pure $ DescriptorGetInfoEXT
             next type' data'

instance es ~ '[] => Zero (DescriptorGetInfoEXT es) where
  zero :: DescriptorGetInfoEXT es
zero = Chain es
-> DescriptorType -> DescriptorDataEXT -> DescriptorGetInfoEXT es
forall (es :: [*]).
Chain es
-> DescriptorType -> DescriptorDataEXT -> DescriptorGetInfoEXT es
DescriptorGetInfoEXT
           ()
           DescriptorType
forall a. Zero a => a
zero
           DescriptorDataEXT
forall a. Zero a => a
zero


-- | VkBufferCaptureDescriptorDataInfoEXT - Structure specifying a buffer for
-- descriptor capture
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Handles.Buffer',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'getBufferOpaqueCaptureDescriptorDataEXT'
data BufferCaptureDescriptorDataInfoEXT = BufferCaptureDescriptorDataInfoEXT
  { -- | @buffer@ is the 'Vulkan.Core10.Handles.Buffer' handle of the buffer to
    -- get opaque capture data for.
    --
    -- #VUID-VkBufferCaptureDescriptorDataInfoEXT-buffer-08075# @buffer@ /must/
    -- have been created with
    -- 'Vulkan.Core10.Enums.BufferCreateFlagBits.BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT'
    -- set in 'Vulkan.Core10.Buffer.BufferCreateInfo'::@flags@
    --
    -- #VUID-VkBufferCaptureDescriptorDataInfoEXT-buffer-parameter# @buffer@
    -- /must/ be a valid 'Vulkan.Core10.Handles.Buffer' handle
    BufferCaptureDescriptorDataInfoEXT -> Buffer
buffer :: Buffer }
  deriving (Typeable, BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> Bool
(BufferCaptureDescriptorDataInfoEXT
 -> BufferCaptureDescriptorDataInfoEXT -> Bool)
-> (BufferCaptureDescriptorDataInfoEXT
    -> BufferCaptureDescriptorDataInfoEXT -> Bool)
-> Eq BufferCaptureDescriptorDataInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> Bool
== :: BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> Bool
$c/= :: BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> Bool
/= :: BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (BufferCaptureDescriptorDataInfoEXT)
#endif
deriving instance Show BufferCaptureDescriptorDataInfoEXT

instance ToCStruct BufferCaptureDescriptorDataInfoEXT where
  withCStruct :: forall b.
BufferCaptureDescriptorDataInfoEXT
-> (Ptr BufferCaptureDescriptorDataInfoEXT -> IO b) -> IO b
withCStruct BufferCaptureDescriptorDataInfoEXT
x Ptr BufferCaptureDescriptorDataInfoEXT -> IO b
f = Int -> (Ptr BufferCaptureDescriptorDataInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr BufferCaptureDescriptorDataInfoEXT -> IO b) -> IO b)
-> (Ptr BufferCaptureDescriptorDataInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr BufferCaptureDescriptorDataInfoEXT
p -> Ptr BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> IO b -> IO b
forall b.
Ptr BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BufferCaptureDescriptorDataInfoEXT
p BufferCaptureDescriptorDataInfoEXT
x (Ptr BufferCaptureDescriptorDataInfoEXT -> IO b
f Ptr BufferCaptureDescriptorDataInfoEXT
p)
  pokeCStruct :: forall b.
Ptr BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> IO b -> IO b
pokeCStruct Ptr BufferCaptureDescriptorDataInfoEXT
p BufferCaptureDescriptorDataInfoEXT{Buffer
buffer :: BufferCaptureDescriptorDataInfoEXT -> Buffer
buffer :: Buffer
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferCaptureDescriptorDataInfoEXT
p Ptr BufferCaptureDescriptorDataInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferCaptureDescriptorDataInfoEXT
p Ptr BufferCaptureDescriptorDataInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferCaptureDescriptorDataInfoEXT
p Ptr BufferCaptureDescriptorDataInfoEXT -> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer)) (Buffer
buffer)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr BufferCaptureDescriptorDataInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr BufferCaptureDescriptorDataInfoEXT
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferCaptureDescriptorDataInfoEXT
p Ptr BufferCaptureDescriptorDataInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferCaptureDescriptorDataInfoEXT
p Ptr BufferCaptureDescriptorDataInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr BufferCaptureDescriptorDataInfoEXT
p Ptr BufferCaptureDescriptorDataInfoEXT -> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer)) (Buffer
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct BufferCaptureDescriptorDataInfoEXT where
  peekCStruct :: Ptr BufferCaptureDescriptorDataInfoEXT
-> IO BufferCaptureDescriptorDataInfoEXT
peekCStruct Ptr BufferCaptureDescriptorDataInfoEXT
p = do
    buffer <- forall a. Storable a => Ptr a -> IO a
peek @Buffer ((Ptr BufferCaptureDescriptorDataInfoEXT
p Ptr BufferCaptureDescriptorDataInfoEXT -> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer))
    pure $ BufferCaptureDescriptorDataInfoEXT
             buffer

instance Storable BufferCaptureDescriptorDataInfoEXT where
  sizeOf :: BufferCaptureDescriptorDataInfoEXT -> Int
sizeOf ~BufferCaptureDescriptorDataInfoEXT
_ = Int
24
  alignment :: BufferCaptureDescriptorDataInfoEXT -> Int
alignment ~BufferCaptureDescriptorDataInfoEXT
_ = Int
8
  peek :: Ptr BufferCaptureDescriptorDataInfoEXT
-> IO BufferCaptureDescriptorDataInfoEXT
peek = Ptr BufferCaptureDescriptorDataInfoEXT
-> IO BufferCaptureDescriptorDataInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> IO ()
poke Ptr BufferCaptureDescriptorDataInfoEXT
ptr BufferCaptureDescriptorDataInfoEXT
poked = Ptr BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> IO () -> IO ()
forall b.
Ptr BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr BufferCaptureDescriptorDataInfoEXT
ptr BufferCaptureDescriptorDataInfoEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero BufferCaptureDescriptorDataInfoEXT where
  zero :: BufferCaptureDescriptorDataInfoEXT
zero = Buffer -> BufferCaptureDescriptorDataInfoEXT
BufferCaptureDescriptorDataInfoEXT
           Buffer
forall a. Zero a => a
zero


-- | VkImageCaptureDescriptorDataInfoEXT - Structure specifying an image for
-- descriptor capture
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Handles.Image',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'getImageOpaqueCaptureDescriptorDataEXT'
data ImageCaptureDescriptorDataInfoEXT = ImageCaptureDescriptorDataInfoEXT
  { -- | @image@ is the 'Vulkan.Core10.Handles.Image' handle of the image to get
    -- opaque capture data for.
    --
    -- #VUID-VkImageCaptureDescriptorDataInfoEXT-image-08079# @image@ /must/
    -- have been created with
    -- 'IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT' set in
    -- 'Vulkan.Core10.Image.ImageCreateInfo'::@flags@
    --
    -- #VUID-VkImageCaptureDescriptorDataInfoEXT-image-parameter# @image@
    -- /must/ be a valid 'Vulkan.Core10.Handles.Image' handle
    ImageCaptureDescriptorDataInfoEXT -> Image
image :: Image }
  deriving (Typeable, ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> Bool
(ImageCaptureDescriptorDataInfoEXT
 -> ImageCaptureDescriptorDataInfoEXT -> Bool)
-> (ImageCaptureDescriptorDataInfoEXT
    -> ImageCaptureDescriptorDataInfoEXT -> Bool)
-> Eq ImageCaptureDescriptorDataInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> Bool
== :: ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> Bool
$c/= :: ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> Bool
/= :: ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ImageCaptureDescriptorDataInfoEXT)
#endif
deriving instance Show ImageCaptureDescriptorDataInfoEXT

instance ToCStruct ImageCaptureDescriptorDataInfoEXT where
  withCStruct :: forall b.
ImageCaptureDescriptorDataInfoEXT
-> (Ptr ImageCaptureDescriptorDataInfoEXT -> IO b) -> IO b
withCStruct ImageCaptureDescriptorDataInfoEXT
x Ptr ImageCaptureDescriptorDataInfoEXT -> IO b
f = Int -> (Ptr ImageCaptureDescriptorDataInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr ImageCaptureDescriptorDataInfoEXT -> IO b) -> IO b)
-> (Ptr ImageCaptureDescriptorDataInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr ImageCaptureDescriptorDataInfoEXT
p -> Ptr ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> IO b -> IO b
forall b.
Ptr ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImageCaptureDescriptorDataInfoEXT
p ImageCaptureDescriptorDataInfoEXT
x (Ptr ImageCaptureDescriptorDataInfoEXT -> IO b
f Ptr ImageCaptureDescriptorDataInfoEXT
p)
  pokeCStruct :: forall b.
Ptr ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> IO b -> IO b
pokeCStruct Ptr ImageCaptureDescriptorDataInfoEXT
p ImageCaptureDescriptorDataInfoEXT{Image
image :: ImageCaptureDescriptorDataInfoEXT -> Image
image :: Image
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageCaptureDescriptorDataInfoEXT
p Ptr ImageCaptureDescriptorDataInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageCaptureDescriptorDataInfoEXT
p Ptr ImageCaptureDescriptorDataInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Image -> Image -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageCaptureDescriptorDataInfoEXT
p Ptr ImageCaptureDescriptorDataInfoEXT -> Int -> Ptr Image
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Image)) (Image
image)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr ImageCaptureDescriptorDataInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr ImageCaptureDescriptorDataInfoEXT
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageCaptureDescriptorDataInfoEXT
p Ptr ImageCaptureDescriptorDataInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageCaptureDescriptorDataInfoEXT
p Ptr ImageCaptureDescriptorDataInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Image -> Image -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageCaptureDescriptorDataInfoEXT
p Ptr ImageCaptureDescriptorDataInfoEXT -> Int -> Ptr Image
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Image)) (Image
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct ImageCaptureDescriptorDataInfoEXT where
  peekCStruct :: Ptr ImageCaptureDescriptorDataInfoEXT
-> IO ImageCaptureDescriptorDataInfoEXT
peekCStruct Ptr ImageCaptureDescriptorDataInfoEXT
p = do
    image <- forall a. Storable a => Ptr a -> IO a
peek @Image ((Ptr ImageCaptureDescriptorDataInfoEXT
p Ptr ImageCaptureDescriptorDataInfoEXT -> Int -> Ptr Image
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Image))
    pure $ ImageCaptureDescriptorDataInfoEXT
             image

instance Storable ImageCaptureDescriptorDataInfoEXT where
  sizeOf :: ImageCaptureDescriptorDataInfoEXT -> Int
sizeOf ~ImageCaptureDescriptorDataInfoEXT
_ = Int
24
  alignment :: ImageCaptureDescriptorDataInfoEXT -> Int
alignment ~ImageCaptureDescriptorDataInfoEXT
_ = Int
8
  peek :: Ptr ImageCaptureDescriptorDataInfoEXT
-> IO ImageCaptureDescriptorDataInfoEXT
peek = Ptr ImageCaptureDescriptorDataInfoEXT
-> IO ImageCaptureDescriptorDataInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> IO ()
poke Ptr ImageCaptureDescriptorDataInfoEXT
ptr ImageCaptureDescriptorDataInfoEXT
poked = Ptr ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> IO () -> IO ()
forall b.
Ptr ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImageCaptureDescriptorDataInfoEXT
ptr ImageCaptureDescriptorDataInfoEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero ImageCaptureDescriptorDataInfoEXT where
  zero :: ImageCaptureDescriptorDataInfoEXT
zero = Image -> ImageCaptureDescriptorDataInfoEXT
ImageCaptureDescriptorDataInfoEXT
           Image
forall a. Zero a => a
zero


-- | VkImageViewCaptureDescriptorDataInfoEXT - Structure specifying an image
-- view for descriptor capture
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Handles.ImageView',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'getImageViewOpaqueCaptureDescriptorDataEXT'
data ImageViewCaptureDescriptorDataInfoEXT = ImageViewCaptureDescriptorDataInfoEXT
  { -- | @imageView@ is the 'Vulkan.Core10.Handles.ImageView' handle of the image
    -- view to get opaque capture data for.
    --
    -- #VUID-VkImageViewCaptureDescriptorDataInfoEXT-imageView-08083#
    -- @imageView@ /must/ have been created with
    -- 'Vulkan.Core10.Enums.ImageViewCreateFlagBits.IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT'
    -- set in 'Vulkan.Core10.ImageView.ImageViewCreateInfo'::@flags@
    --
    -- #VUID-VkImageViewCaptureDescriptorDataInfoEXT-imageView-parameter#
    -- @imageView@ /must/ be a valid 'Vulkan.Core10.Handles.ImageView' handle
    ImageViewCaptureDescriptorDataInfoEXT -> ImageView
imageView :: ImageView }
  deriving (Typeable, ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> Bool
(ImageViewCaptureDescriptorDataInfoEXT
 -> ImageViewCaptureDescriptorDataInfoEXT -> Bool)
-> (ImageViewCaptureDescriptorDataInfoEXT
    -> ImageViewCaptureDescriptorDataInfoEXT -> Bool)
-> Eq ImageViewCaptureDescriptorDataInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> Bool
== :: ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> Bool
$c/= :: ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> Bool
/= :: ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ImageViewCaptureDescriptorDataInfoEXT)
#endif
deriving instance Show ImageViewCaptureDescriptorDataInfoEXT

instance ToCStruct ImageViewCaptureDescriptorDataInfoEXT where
  withCStruct :: forall b.
ImageViewCaptureDescriptorDataInfoEXT
-> (Ptr ImageViewCaptureDescriptorDataInfoEXT -> IO b) -> IO b
withCStruct ImageViewCaptureDescriptorDataInfoEXT
x Ptr ImageViewCaptureDescriptorDataInfoEXT -> IO b
f = Int -> (Ptr ImageViewCaptureDescriptorDataInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr ImageViewCaptureDescriptorDataInfoEXT -> IO b) -> IO b)
-> (Ptr ImageViewCaptureDescriptorDataInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr ImageViewCaptureDescriptorDataInfoEXT
p -> Ptr ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> IO b -> IO b
forall b.
Ptr ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImageViewCaptureDescriptorDataInfoEXT
p ImageViewCaptureDescriptorDataInfoEXT
x (Ptr ImageViewCaptureDescriptorDataInfoEXT -> IO b
f Ptr ImageViewCaptureDescriptorDataInfoEXT
p)
  pokeCStruct :: forall b.
Ptr ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> IO b -> IO b
pokeCStruct Ptr ImageViewCaptureDescriptorDataInfoEXT
p ImageViewCaptureDescriptorDataInfoEXT{ImageView
imageView :: ImageViewCaptureDescriptorDataInfoEXT -> ImageView
imageView :: ImageView
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageViewCaptureDescriptorDataInfoEXT
p Ptr ImageViewCaptureDescriptorDataInfoEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageViewCaptureDescriptorDataInfoEXT
p Ptr ImageViewCaptureDescriptorDataInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ImageView -> ImageView -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageViewCaptureDescriptorDataInfoEXT
p Ptr ImageViewCaptureDescriptorDataInfoEXT -> Int -> Ptr ImageView
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ImageView)) (ImageView
imageView)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr ImageViewCaptureDescriptorDataInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr ImageViewCaptureDescriptorDataInfoEXT
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageViewCaptureDescriptorDataInfoEXT
p Ptr ImageViewCaptureDescriptorDataInfoEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageViewCaptureDescriptorDataInfoEXT
p Ptr ImageViewCaptureDescriptorDataInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ImageView -> ImageView -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ImageViewCaptureDescriptorDataInfoEXT
p Ptr ImageViewCaptureDescriptorDataInfoEXT -> Int -> Ptr ImageView
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ImageView)) (ImageView
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct ImageViewCaptureDescriptorDataInfoEXT where
  peekCStruct :: Ptr ImageViewCaptureDescriptorDataInfoEXT
-> IO ImageViewCaptureDescriptorDataInfoEXT
peekCStruct Ptr ImageViewCaptureDescriptorDataInfoEXT
p = do
    imageView <- forall a. Storable a => Ptr a -> IO a
peek @ImageView ((Ptr ImageViewCaptureDescriptorDataInfoEXT
p Ptr ImageViewCaptureDescriptorDataInfoEXT -> Int -> Ptr ImageView
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ImageView))
    pure $ ImageViewCaptureDescriptorDataInfoEXT
             imageView

instance Storable ImageViewCaptureDescriptorDataInfoEXT where
  sizeOf :: ImageViewCaptureDescriptorDataInfoEXT -> Int
sizeOf ~ImageViewCaptureDescriptorDataInfoEXT
_ = Int
24
  alignment :: ImageViewCaptureDescriptorDataInfoEXT -> Int
alignment ~ImageViewCaptureDescriptorDataInfoEXT
_ = Int
8
  peek :: Ptr ImageViewCaptureDescriptorDataInfoEXT
-> IO ImageViewCaptureDescriptorDataInfoEXT
peek = Ptr ImageViewCaptureDescriptorDataInfoEXT
-> IO ImageViewCaptureDescriptorDataInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> IO ()
poke Ptr ImageViewCaptureDescriptorDataInfoEXT
ptr ImageViewCaptureDescriptorDataInfoEXT
poked = Ptr ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> IO () -> IO ()
forall b.
Ptr ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ImageViewCaptureDescriptorDataInfoEXT
ptr ImageViewCaptureDescriptorDataInfoEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero ImageViewCaptureDescriptorDataInfoEXT where
  zero :: ImageViewCaptureDescriptorDataInfoEXT
zero = ImageView -> ImageViewCaptureDescriptorDataInfoEXT
ImageViewCaptureDescriptorDataInfoEXT
           ImageView
forall a. Zero a => a
zero


-- | VkSamplerCaptureDescriptorDataInfoEXT - Structure specifying a sampler
-- for descriptor capture
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Handles.Sampler',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'getSamplerOpaqueCaptureDescriptorDataEXT'
data SamplerCaptureDescriptorDataInfoEXT = SamplerCaptureDescriptorDataInfoEXT
  { -- | @sampler@ is the 'Vulkan.Core10.Handles.Sampler' handle of the sampler
    -- to get opaque capture data for.
    --
    -- #VUID-VkSamplerCaptureDescriptorDataInfoEXT-sampler-08087# @sampler@
    -- /must/ have been created with
    -- 'Vulkan.Core10.Enums.SamplerCreateFlagBits.SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT'
    -- set in 'Vulkan.Core10.Sampler.SamplerCreateInfo'::@flags@
    --
    -- #VUID-VkSamplerCaptureDescriptorDataInfoEXT-sampler-parameter# @sampler@
    -- /must/ be a valid 'Vulkan.Core10.Handles.Sampler' handle
    SamplerCaptureDescriptorDataInfoEXT -> Sampler
sampler :: Sampler }
  deriving (Typeable, SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> Bool
(SamplerCaptureDescriptorDataInfoEXT
 -> SamplerCaptureDescriptorDataInfoEXT -> Bool)
-> (SamplerCaptureDescriptorDataInfoEXT
    -> SamplerCaptureDescriptorDataInfoEXT -> Bool)
-> Eq SamplerCaptureDescriptorDataInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> Bool
== :: SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> Bool
$c/= :: SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> Bool
/= :: SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SamplerCaptureDescriptorDataInfoEXT)
#endif
deriving instance Show SamplerCaptureDescriptorDataInfoEXT

instance ToCStruct SamplerCaptureDescriptorDataInfoEXT where
  withCStruct :: forall b.
SamplerCaptureDescriptorDataInfoEXT
-> (Ptr SamplerCaptureDescriptorDataInfoEXT -> IO b) -> IO b
withCStruct SamplerCaptureDescriptorDataInfoEXT
x Ptr SamplerCaptureDescriptorDataInfoEXT -> IO b
f = Int -> (Ptr SamplerCaptureDescriptorDataInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr SamplerCaptureDescriptorDataInfoEXT -> IO b) -> IO b)
-> (Ptr SamplerCaptureDescriptorDataInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr SamplerCaptureDescriptorDataInfoEXT
p -> Ptr SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> IO b -> IO b
forall b.
Ptr SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SamplerCaptureDescriptorDataInfoEXT
p SamplerCaptureDescriptorDataInfoEXT
x (Ptr SamplerCaptureDescriptorDataInfoEXT -> IO b
f Ptr SamplerCaptureDescriptorDataInfoEXT
p)
  pokeCStruct :: forall b.
Ptr SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> IO b -> IO b
pokeCStruct Ptr SamplerCaptureDescriptorDataInfoEXT
p SamplerCaptureDescriptorDataInfoEXT{Sampler
sampler :: SamplerCaptureDescriptorDataInfoEXT -> Sampler
sampler :: Sampler
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SamplerCaptureDescriptorDataInfoEXT
p Ptr SamplerCaptureDescriptorDataInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SamplerCaptureDescriptorDataInfoEXT
p Ptr SamplerCaptureDescriptorDataInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Sampler -> Sampler -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SamplerCaptureDescriptorDataInfoEXT
p Ptr SamplerCaptureDescriptorDataInfoEXT -> Int -> Ptr Sampler
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Sampler)) (Sampler
sampler)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr SamplerCaptureDescriptorDataInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr SamplerCaptureDescriptorDataInfoEXT
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SamplerCaptureDescriptorDataInfoEXT
p Ptr SamplerCaptureDescriptorDataInfoEXT -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SamplerCaptureDescriptorDataInfoEXT
p Ptr SamplerCaptureDescriptorDataInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Sampler -> Sampler -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SamplerCaptureDescriptorDataInfoEXT
p Ptr SamplerCaptureDescriptorDataInfoEXT -> Int -> Ptr Sampler
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Sampler)) (Sampler
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct SamplerCaptureDescriptorDataInfoEXT where
  peekCStruct :: Ptr SamplerCaptureDescriptorDataInfoEXT
-> IO SamplerCaptureDescriptorDataInfoEXT
peekCStruct Ptr SamplerCaptureDescriptorDataInfoEXT
p = do
    sampler <- forall a. Storable a => Ptr a -> IO a
peek @Sampler ((Ptr SamplerCaptureDescriptorDataInfoEXT
p Ptr SamplerCaptureDescriptorDataInfoEXT -> Int -> Ptr Sampler
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Sampler))
    pure $ SamplerCaptureDescriptorDataInfoEXT
             sampler

instance Storable SamplerCaptureDescriptorDataInfoEXT where
  sizeOf :: SamplerCaptureDescriptorDataInfoEXT -> Int
sizeOf ~SamplerCaptureDescriptorDataInfoEXT
_ = Int
24
  alignment :: SamplerCaptureDescriptorDataInfoEXT -> Int
alignment ~SamplerCaptureDescriptorDataInfoEXT
_ = Int
8
  peek :: Ptr SamplerCaptureDescriptorDataInfoEXT
-> IO SamplerCaptureDescriptorDataInfoEXT
peek = Ptr SamplerCaptureDescriptorDataInfoEXT
-> IO SamplerCaptureDescriptorDataInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> IO ()
poke Ptr SamplerCaptureDescriptorDataInfoEXT
ptr SamplerCaptureDescriptorDataInfoEXT
poked = Ptr SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> IO () -> IO ()
forall b.
Ptr SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SamplerCaptureDescriptorDataInfoEXT
ptr SamplerCaptureDescriptorDataInfoEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero SamplerCaptureDescriptorDataInfoEXT where
  zero :: SamplerCaptureDescriptorDataInfoEXT
zero = Sampler -> SamplerCaptureDescriptorDataInfoEXT
SamplerCaptureDescriptorDataInfoEXT
           Sampler
forall a. Zero a => a
zero


-- | VkAccelerationStructureCaptureDescriptorDataInfoEXT - Structure
-- specifying an acceleration structure for descriptor capture
--
-- == Valid Usage
--
-- -   #VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructure-08091#
--     If @accelerationStructure@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE' then
--     @accelerationStructure@ /must/ have been created with
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT'
--     set in
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.AccelerationStructureCreateInfoKHR'::@createFlags@
--
-- -   #VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructureNV-08092#
--     If @accelerationStructureNV@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE' then
--     @accelerationStructureNV@ /must/ have been created with
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT'
--     set in
--     'Vulkan.Extensions.VK_NV_ray_tracing.AccelerationStructureCreateInfoNV'::@info.flags@
--
-- -   #VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructure-08093#
--     If @accelerationStructure@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE' then
--     @accelerationStructureNV@ /must/ be
--     'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructureNV-08094#
--     If @accelerationStructureNV@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE' then
--     @accelerationStructure@ /must/ be
--     'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-sType-sType#
--     @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT'
--
-- -   #VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-pNext-pNext#
--     @pNext@ /must/ be @NULL@
--
-- -   #VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructure-parameter#
--     If @accelerationStructure@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', @accelerationStructure@
--     /must/ be a valid
--     'Vulkan.Extensions.Handles.AccelerationStructureKHR' handle
--
-- -   #VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-accelerationStructureNV-parameter#
--     If @accelerationStructureNV@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', @accelerationStructureNV@
--     /must/ be a valid
--     'Vulkan.Extensions.Handles.AccelerationStructureNV' handle
--
-- -   #VUID-VkAccelerationStructureCaptureDescriptorDataInfoEXT-commonparent#
--     Both of @accelerationStructure@, and @accelerationStructureNV@ that
--     are valid handles of non-ignored parameters /must/ have been
--     created, allocated, or retrieved from the same
--     'Vulkan.Core10.Handles.Device'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_acceleration_structure VK_KHR_acceleration_structure>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing VK_NV_ray_tracing>,
-- 'Vulkan.Extensions.Handles.AccelerationStructureKHR',
-- 'Vulkan.Extensions.Handles.AccelerationStructureNV',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'getAccelerationStructureOpaqueCaptureDescriptorDataEXT'
data AccelerationStructureCaptureDescriptorDataInfoEXT = AccelerationStructureCaptureDescriptorDataInfoEXT
  { -- | @accelerationStructure@ is the
    -- 'Vulkan.Extensions.Handles.AccelerationStructureKHR' handle of the
    -- acceleration structure to get opaque capture data for.
    AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureKHR
accelerationStructure :: AccelerationStructureKHR
  , -- | @accelerationStructureNV@ is the
    -- 'Vulkan.Extensions.Handles.AccelerationStructureNV' handle of the
    -- acceleration structure to get opaque capture data for.
    AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureNV
accelerationStructureNV :: AccelerationStructureNV
  }
  deriving (Typeable, AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT -> Bool
(AccelerationStructureCaptureDescriptorDataInfoEXT
 -> AccelerationStructureCaptureDescriptorDataInfoEXT -> Bool)
-> (AccelerationStructureCaptureDescriptorDataInfoEXT
    -> AccelerationStructureCaptureDescriptorDataInfoEXT -> Bool)
-> Eq AccelerationStructureCaptureDescriptorDataInfoEXT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT -> Bool
== :: AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT -> Bool
$c/= :: AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT -> Bool
/= :: AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureCaptureDescriptorDataInfoEXT)
#endif
deriving instance Show AccelerationStructureCaptureDescriptorDataInfoEXT

instance ToCStruct AccelerationStructureCaptureDescriptorDataInfoEXT where
  withCStruct :: forall b.
AccelerationStructureCaptureDescriptorDataInfoEXT
-> (Ptr AccelerationStructureCaptureDescriptorDataInfoEXT -> IO b)
-> IO b
withCStruct AccelerationStructureCaptureDescriptorDataInfoEXT
x Ptr AccelerationStructureCaptureDescriptorDataInfoEXT -> IO b
f = Int
-> (Ptr AccelerationStructureCaptureDescriptorDataInfoEXT -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr AccelerationStructureCaptureDescriptorDataInfoEXT -> IO b)
 -> IO b)
-> (Ptr AccelerationStructureCaptureDescriptorDataInfoEXT -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p -> Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT
-> IO b
-> IO b
forall b.
Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p AccelerationStructureCaptureDescriptorDataInfoEXT
x (Ptr AccelerationStructureCaptureDescriptorDataInfoEXT -> IO b
f Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p)
  pokeCStruct :: forall b.
Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT
-> IO b
-> IO b
pokeCStruct Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p AccelerationStructureCaptureDescriptorDataInfoEXT{AccelerationStructureNV
AccelerationStructureKHR
accelerationStructure :: AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureKHR
accelerationStructureNV :: AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureNV
accelerationStructure :: AccelerationStructureKHR
accelerationStructureNV :: AccelerationStructureNV
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr AccelerationStructureKHR -> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> Int -> Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
accelerationStructure)
    Ptr AccelerationStructureNV -> AccelerationStructureNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> Int -> Ptr AccelerationStructureNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureNV)) (AccelerationStructureNV
accelerationStructureNV)
    IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    IO b
f

instance FromCStruct AccelerationStructureCaptureDescriptorDataInfoEXT where
  peekCStruct :: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> IO AccelerationStructureCaptureDescriptorDataInfoEXT
peekCStruct Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p = do
    accelerationStructure <- forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureKHR ((Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> Int -> Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureKHR))
    accelerationStructureNV <- peek @AccelerationStructureNV ((p `plusPtr` 24 :: Ptr AccelerationStructureNV))
    pure $ AccelerationStructureCaptureDescriptorDataInfoEXT
             accelerationStructure accelerationStructureNV

instance Storable AccelerationStructureCaptureDescriptorDataInfoEXT where
  sizeOf :: AccelerationStructureCaptureDescriptorDataInfoEXT -> Int
sizeOf ~AccelerationStructureCaptureDescriptorDataInfoEXT
_ = Int
32
  alignment :: AccelerationStructureCaptureDescriptorDataInfoEXT -> Int
alignment ~AccelerationStructureCaptureDescriptorDataInfoEXT
_ = Int
8
  peek :: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> IO AccelerationStructureCaptureDescriptorDataInfoEXT
peek = Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> IO AccelerationStructureCaptureDescriptorDataInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT -> IO ()
poke Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
ptr AccelerationStructureCaptureDescriptorDataInfoEXT
poked = Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT
-> IO ()
-> IO ()
forall b.
Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
ptr AccelerationStructureCaptureDescriptorDataInfoEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero AccelerationStructureCaptureDescriptorDataInfoEXT where
  zero :: AccelerationStructureCaptureDescriptorDataInfoEXT
zero = AccelerationStructureKHR
-> AccelerationStructureNV
-> AccelerationStructureCaptureDescriptorDataInfoEXT
AccelerationStructureCaptureDescriptorDataInfoEXT
           AccelerationStructureKHR
forall a. Zero a => a
zero
           AccelerationStructureNV
forall a. Zero a => a
zero


-- | VkOpaqueCaptureDescriptorDataCreateInfoEXT - Structure specifying opaque
-- capture descriptor data
--
-- = Description
--
-- During replay, opaque descriptor capture data /can/ be specified by
-- adding a 'OpaqueCaptureDescriptorDataCreateInfoEXT' structure to the
-- relevant @pNext@ chain of a 'Vulkan.Core10.Buffer.BufferCreateInfo',
-- 'Vulkan.Core10.Image.ImageCreateInfo',
-- 'Vulkan.Core10.ImageView.ImageViewCreateInfo',
-- 'Vulkan.Core10.Sampler.SamplerCreateInfo',
-- 'Vulkan.Extensions.VK_ARM_tensors.TensorCreateInfoARM',
-- 'Vulkan.Extensions.VK_ARM_tensors.TensorViewCreateInfoARM',
-- 'Vulkan.Extensions.VK_NV_ray_tracing.AccelerationStructureCreateInfoNV'
-- or
-- 'Vulkan.Extensions.VK_KHR_acceleration_structure.AccelerationStructureCreateInfoKHR'
-- structure.
--
-- When providing opaque capture data for an image, if the @pNext@ chain of
-- 'Vulkan.Core10.Image.ImageCreateInfo' or
-- 'Vulkan.Extensions.VK_ARM_tensors.TensorCreateInfoARM' contains an
-- instance of both this structure and
-- 'Vulkan.Extensions.VK_EXT_descriptor_heap.OpaqueCaptureDataCreateInfoEXT',
-- they /should/ both specify data from the same original resource. If they
-- have capture data from different original resources, resource creation
-- is much more likely to fail.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_buffer VK_EXT_descriptor_buffer>,
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data OpaqueCaptureDescriptorDataCreateInfoEXT = OpaqueCaptureDescriptorDataCreateInfoEXT
  { -- | @opaqueCaptureDescriptorData@ is a pointer to an application-allocated
    -- buffer containing opaque capture data retrieved using
    -- 'getBufferOpaqueCaptureDescriptorDataEXT',
    -- 'getImageOpaqueCaptureDescriptorDataEXT',
    -- 'getImageViewOpaqueCaptureDescriptorDataEXT',
    -- 'Vulkan.Extensions.VK_ARM_tensors.getTensorOpaqueCaptureDescriptorDataARM',
    -- 'Vulkan.Extensions.VK_ARM_tensors.getTensorViewOpaqueCaptureDescriptorDataARM',
    -- 'getSamplerOpaqueCaptureDescriptorDataEXT', or
    -- 'getAccelerationStructureOpaqueCaptureDescriptorDataEXT'.
    --
    -- #VUID-VkOpaqueCaptureDescriptorDataCreateInfoEXT-opaqueCaptureDescriptorData-parameter#
    -- @opaqueCaptureDescriptorData@ /must/ be a pointer value
    OpaqueCaptureDescriptorDataCreateInfoEXT -> "descriptor" ::: Ptr ()
opaqueCaptureDescriptorData :: Ptr () }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (OpaqueCaptureDescriptorDataCreateInfoEXT)
#endif
deriving instance Show OpaqueCaptureDescriptorDataCreateInfoEXT

instance ToCStruct OpaqueCaptureDescriptorDataCreateInfoEXT where
  withCStruct :: forall b.
OpaqueCaptureDescriptorDataCreateInfoEXT
-> (Ptr OpaqueCaptureDescriptorDataCreateInfoEXT -> IO b) -> IO b
withCStruct OpaqueCaptureDescriptorDataCreateInfoEXT
x Ptr OpaqueCaptureDescriptorDataCreateInfoEXT -> IO b
f = Int
-> (Ptr OpaqueCaptureDescriptorDataCreateInfoEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT -> IO b) -> IO b)
-> (Ptr OpaqueCaptureDescriptorDataCreateInfoEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p -> Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> OpaqueCaptureDescriptorDataCreateInfoEXT -> IO b -> IO b
forall b.
Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> OpaqueCaptureDescriptorDataCreateInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p OpaqueCaptureDescriptorDataCreateInfoEXT
x (Ptr OpaqueCaptureDescriptorDataCreateInfoEXT -> IO b
f Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p)
  pokeCStruct :: forall b.
Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> OpaqueCaptureDescriptorDataCreateInfoEXT -> IO b -> IO b
pokeCStruct Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p OpaqueCaptureDescriptorDataCreateInfoEXT{"descriptor" ::: Ptr ()
opaqueCaptureDescriptorData :: OpaqueCaptureDescriptorDataCreateInfoEXT -> "descriptor" ::: Ptr ()
opaqueCaptureDescriptorData :: "descriptor" ::: Ptr ()
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
opaqueCaptureDescriptorData)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr OpaqueCaptureDescriptorDataCreateInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ("descriptor" ::: Ptr ()) -> ("descriptor" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr ()))) ("descriptor" ::: Ptr ()
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct OpaqueCaptureDescriptorDataCreateInfoEXT where
  peekCStruct :: Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> IO OpaqueCaptureDescriptorDataCreateInfoEXT
peekCStruct Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p = do
    opaqueCaptureDescriptorData <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> Int -> Ptr ("descriptor" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr ())))
    pure $ OpaqueCaptureDescriptorDataCreateInfoEXT
             opaqueCaptureDescriptorData

instance Storable OpaqueCaptureDescriptorDataCreateInfoEXT where
  sizeOf :: OpaqueCaptureDescriptorDataCreateInfoEXT -> Int
sizeOf ~OpaqueCaptureDescriptorDataCreateInfoEXT
_ = Int
24
  alignment :: OpaqueCaptureDescriptorDataCreateInfoEXT -> Int
alignment ~OpaqueCaptureDescriptorDataCreateInfoEXT
_ = Int
8
  peek :: Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> IO OpaqueCaptureDescriptorDataCreateInfoEXT
peek = Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> IO OpaqueCaptureDescriptorDataCreateInfoEXT
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> OpaqueCaptureDescriptorDataCreateInfoEXT -> IO ()
poke Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
ptr OpaqueCaptureDescriptorDataCreateInfoEXT
poked = Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> OpaqueCaptureDescriptorDataCreateInfoEXT -> IO () -> IO ()
forall b.
Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> OpaqueCaptureDescriptorDataCreateInfoEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
ptr OpaqueCaptureDescriptorDataCreateInfoEXT
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero OpaqueCaptureDescriptorDataCreateInfoEXT where
  zero :: OpaqueCaptureDescriptorDataCreateInfoEXT
zero = ("descriptor" ::: Ptr ())
-> OpaqueCaptureDescriptorDataCreateInfoEXT
OpaqueCaptureDescriptorDataCreateInfoEXT
           "descriptor" ::: Ptr ()
forall a. Zero a => a
zero


data DescriptorDataEXT
  = ASampler Sampler
  | ACombinedImageSampler DescriptorImageInfo
  | AnInputAttachmentImage DescriptorImageInfo
  | ASampledImage (Maybe DescriptorImageInfo)
  | AStorageImage (Maybe DescriptorImageInfo)
  | AnUniformTexelBuffer (Maybe DescriptorAddressInfoEXT)
  | AStorageTexelBuffer (Maybe DescriptorAddressInfoEXT)
  | AnUniformBuffer (Maybe DescriptorAddressInfoEXT)
  | AStorageBuffer (Maybe DescriptorAddressInfoEXT)
  | AnAccelerationStructure DeviceAddress
  deriving (Int -> DescriptorDataEXT -> ShowS
[DescriptorDataEXT] -> ShowS
DescriptorDataEXT -> String
(Int -> DescriptorDataEXT -> ShowS)
-> (DescriptorDataEXT -> String)
-> ([DescriptorDataEXT] -> ShowS)
-> Show DescriptorDataEXT
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DescriptorDataEXT -> ShowS
showsPrec :: Int -> DescriptorDataEXT -> ShowS
$cshow :: DescriptorDataEXT -> String
show :: DescriptorDataEXT -> String
$cshowList :: [DescriptorDataEXT] -> ShowS
showList :: [DescriptorDataEXT] -> ShowS
Show)

instance ToCStruct DescriptorDataEXT where
  withCStruct :: forall b.
DescriptorDataEXT -> (Ptr DescriptorDataEXT -> IO b) -> IO b
withCStruct DescriptorDataEXT
x Ptr DescriptorDataEXT -> IO b
f = Int -> (Ptr DescriptorDataEXT -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
8 ((Ptr DescriptorDataEXT -> IO b) -> IO b)
-> (Ptr DescriptorDataEXT -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr DescriptorDataEXT
p -> Ptr DescriptorDataEXT -> DescriptorDataEXT -> IO b -> IO b
forall b.
Ptr DescriptorDataEXT -> DescriptorDataEXT -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DescriptorDataEXT
p DescriptorDataEXT
x (Ptr DescriptorDataEXT -> IO b
f Ptr DescriptorDataEXT
p)
  pokeCStruct :: Ptr DescriptorDataEXT -> DescriptorDataEXT -> IO a -> IO a
  pokeCStruct :: forall b.
Ptr DescriptorDataEXT -> DescriptorDataEXT -> IO b -> IO b
pokeCStruct Ptr DescriptorDataEXT
p = (((() -> IO a) -> IO a) -> (IO a -> () -> IO a) -> IO a -> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. IO a -> () -> IO a
forall a b. a -> b -> a
const) (((() -> IO a) -> IO a) -> IO a -> IO a)
-> (DescriptorDataEXT -> (() -> IO a) -> IO a)
-> DescriptorDataEXT
-> IO a
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT a IO () -> (() -> IO a) -> IO a
forall {k} (r :: k) (m :: k -> *) a.
ContT r m a -> (a -> m r) -> m r
runContT (ContT a IO () -> (() -> IO a) -> IO a)
-> (DescriptorDataEXT -> ContT a IO ())
-> DescriptorDataEXT
-> (() -> IO a)
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
.  \case
    ASampler Sampler
v -> do
      pSampler <- ((Ptr Sampler -> IO a) -> IO a) -> ContT a IO (Ptr Sampler)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Sampler -> IO a) -> IO a) -> ContT a IO (Ptr Sampler))
-> ((Ptr Sampler -> IO a) -> IO a) -> ContT a IO (Ptr Sampler)
forall a b. (a -> b) -> a -> b
$ Sampler -> (Ptr Sampler -> IO a) -> IO a
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with (Sampler
v)
      lift $ poke (castPtr @_ @(Ptr Sampler) p) pSampler
    ACombinedImageSampler DescriptorImageInfo
v -> do
      pCombinedImageSampler <- ((Ptr DescriptorImageInfo -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorImageInfo)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr DescriptorImageInfo -> IO a) -> IO a)
 -> ContT a IO (Ptr DescriptorImageInfo))
-> ((Ptr DescriptorImageInfo -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorImageInfo)
forall a b. (a -> b) -> a -> b
$ DescriptorImageInfo -> (Ptr DescriptorImageInfo -> IO a) -> IO a
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
DescriptorImageInfo -> (Ptr DescriptorImageInfo -> IO b) -> IO b
withCStruct (DescriptorImageInfo
v)
      lift $ poke (castPtr @_ @(Ptr DescriptorImageInfo) p) pCombinedImageSampler
    AnInputAttachmentImage DescriptorImageInfo
v -> do
      pInputAttachmentImage <- ((Ptr DescriptorImageInfo -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorImageInfo)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr DescriptorImageInfo -> IO a) -> IO a)
 -> ContT a IO (Ptr DescriptorImageInfo))
-> ((Ptr DescriptorImageInfo -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorImageInfo)
forall a b. (a -> b) -> a -> b
$ DescriptorImageInfo -> (Ptr DescriptorImageInfo -> IO a) -> IO a
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
DescriptorImageInfo -> (Ptr DescriptorImageInfo -> IO b) -> IO b
withCStruct (DescriptorImageInfo
v)
      lift $ poke (castPtr @_ @(Ptr DescriptorImageInfo) p) pInputAttachmentImage
    ASampledImage Maybe DescriptorImageInfo
v -> do
      pSampledImage <- case (Maybe DescriptorImageInfo
v) of
        Maybe DescriptorImageInfo
Nothing -> Ptr DescriptorImageInfo -> ContT a IO (Ptr DescriptorImageInfo)
forall a. a -> ContT a IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr DescriptorImageInfo
forall a. Ptr a
nullPtr
        Just DescriptorImageInfo
j -> ((Ptr DescriptorImageInfo -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorImageInfo)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr DescriptorImageInfo -> IO a) -> IO a)
 -> ContT a IO (Ptr DescriptorImageInfo))
-> ((Ptr DescriptorImageInfo -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorImageInfo)
forall a b. (a -> b) -> a -> b
$ DescriptorImageInfo -> (Ptr DescriptorImageInfo -> IO a) -> IO a
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
DescriptorImageInfo -> (Ptr DescriptorImageInfo -> IO b) -> IO b
withCStruct (DescriptorImageInfo
j)
      lift $ poke (castPtr @_ @(Ptr DescriptorImageInfo) p) pSampledImage
    AStorageImage Maybe DescriptorImageInfo
v -> do
      pStorageImage <- case (Maybe DescriptorImageInfo
v) of
        Maybe DescriptorImageInfo
Nothing -> Ptr DescriptorImageInfo -> ContT a IO (Ptr DescriptorImageInfo)
forall a. a -> ContT a IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr DescriptorImageInfo
forall a. Ptr a
nullPtr
        Just DescriptorImageInfo
j -> ((Ptr DescriptorImageInfo -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorImageInfo)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr DescriptorImageInfo -> IO a) -> IO a)
 -> ContT a IO (Ptr DescriptorImageInfo))
-> ((Ptr DescriptorImageInfo -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorImageInfo)
forall a b. (a -> b) -> a -> b
$ DescriptorImageInfo -> (Ptr DescriptorImageInfo -> IO a) -> IO a
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
DescriptorImageInfo -> (Ptr DescriptorImageInfo -> IO b) -> IO b
withCStruct (DescriptorImageInfo
j)
      lift $ poke (castPtr @_ @(Ptr DescriptorImageInfo) p) pStorageImage
    AnUniformTexelBuffer Maybe DescriptorAddressInfoEXT
v -> do
      pUniformTexelBuffer <- case (Maybe DescriptorAddressInfoEXT
v) of
        Maybe DescriptorAddressInfoEXT
Nothing -> Ptr DescriptorAddressInfoEXT
-> ContT a IO (Ptr DescriptorAddressInfoEXT)
forall a. a -> ContT a IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr DescriptorAddressInfoEXT
forall a. Ptr a
nullPtr
        Just DescriptorAddressInfoEXT
j -> ((Ptr DescriptorAddressInfoEXT -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorAddressInfoEXT)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr DescriptorAddressInfoEXT -> IO a) -> IO a)
 -> ContT a IO (Ptr DescriptorAddressInfoEXT))
-> ((Ptr DescriptorAddressInfoEXT -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorAddressInfoEXT)
forall a b. (a -> b) -> a -> b
$ DescriptorAddressInfoEXT
-> (Ptr DescriptorAddressInfoEXT -> IO a) -> IO a
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
DescriptorAddressInfoEXT
-> (Ptr DescriptorAddressInfoEXT -> IO b) -> IO b
withCStruct (DescriptorAddressInfoEXT
j)
      lift $ poke (castPtr @_ @(Ptr DescriptorAddressInfoEXT) p) pUniformTexelBuffer
    AStorageTexelBuffer Maybe DescriptorAddressInfoEXT
v -> do
      pStorageTexelBuffer <- case (Maybe DescriptorAddressInfoEXT
v) of
        Maybe DescriptorAddressInfoEXT
Nothing -> Ptr DescriptorAddressInfoEXT
-> ContT a IO (Ptr DescriptorAddressInfoEXT)
forall a. a -> ContT a IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr DescriptorAddressInfoEXT
forall a. Ptr a
nullPtr
        Just DescriptorAddressInfoEXT
j -> ((Ptr DescriptorAddressInfoEXT -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorAddressInfoEXT)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr DescriptorAddressInfoEXT -> IO a) -> IO a)
 -> ContT a IO (Ptr DescriptorAddressInfoEXT))
-> ((Ptr DescriptorAddressInfoEXT -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorAddressInfoEXT)
forall a b. (a -> b) -> a -> b
$ DescriptorAddressInfoEXT
-> (Ptr DescriptorAddressInfoEXT -> IO a) -> IO a
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
DescriptorAddressInfoEXT
-> (Ptr DescriptorAddressInfoEXT -> IO b) -> IO b
withCStruct (DescriptorAddressInfoEXT
j)
      lift $ poke (castPtr @_ @(Ptr DescriptorAddressInfoEXT) p) pStorageTexelBuffer
    AnUniformBuffer Maybe DescriptorAddressInfoEXT
v -> do
      pUniformBuffer <- case (Maybe DescriptorAddressInfoEXT
v) of
        Maybe DescriptorAddressInfoEXT
Nothing -> Ptr DescriptorAddressInfoEXT
-> ContT a IO (Ptr DescriptorAddressInfoEXT)
forall a. a -> ContT a IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr DescriptorAddressInfoEXT
forall a. Ptr a
nullPtr
        Just DescriptorAddressInfoEXT
j -> ((Ptr DescriptorAddressInfoEXT -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorAddressInfoEXT)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr DescriptorAddressInfoEXT -> IO a) -> IO a)
 -> ContT a IO (Ptr DescriptorAddressInfoEXT))
-> ((Ptr DescriptorAddressInfoEXT -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorAddressInfoEXT)
forall a b. (a -> b) -> a -> b
$ DescriptorAddressInfoEXT
-> (Ptr DescriptorAddressInfoEXT -> IO a) -> IO a
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
DescriptorAddressInfoEXT
-> (Ptr DescriptorAddressInfoEXT -> IO b) -> IO b
withCStruct (DescriptorAddressInfoEXT
j)
      lift $ poke (castPtr @_ @(Ptr DescriptorAddressInfoEXT) p) pUniformBuffer
    AStorageBuffer Maybe DescriptorAddressInfoEXT
v -> do
      pStorageBuffer <- case (Maybe DescriptorAddressInfoEXT
v) of
        Maybe DescriptorAddressInfoEXT
Nothing -> Ptr DescriptorAddressInfoEXT
-> ContT a IO (Ptr DescriptorAddressInfoEXT)
forall a. a -> ContT a IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr DescriptorAddressInfoEXT
forall a. Ptr a
nullPtr
        Just DescriptorAddressInfoEXT
j -> ((Ptr DescriptorAddressInfoEXT -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorAddressInfoEXT)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr DescriptorAddressInfoEXT -> IO a) -> IO a)
 -> ContT a IO (Ptr DescriptorAddressInfoEXT))
-> ((Ptr DescriptorAddressInfoEXT -> IO a) -> IO a)
-> ContT a IO (Ptr DescriptorAddressInfoEXT)
forall a b. (a -> b) -> a -> b
$ DescriptorAddressInfoEXT
-> (Ptr DescriptorAddressInfoEXT -> IO a) -> IO a
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
DescriptorAddressInfoEXT
-> (Ptr DescriptorAddressInfoEXT -> IO b) -> IO b
withCStruct (DescriptorAddressInfoEXT
j)
      lift $ poke (castPtr @_ @(Ptr DescriptorAddressInfoEXT) p) pStorageBuffer
    AnAccelerationStructure DeviceAddress
v -> IO () -> ContT a IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT a m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT a IO ()) -> IO () -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceAddress -> DeviceAddress -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @DeviceAddress Ptr DescriptorDataEXT
p) (DeviceAddress
v)
  pokeZeroCStruct :: Ptr DescriptorDataEXT -> IO b -> IO b
  pokeZeroCStruct :: forall b. Ptr DescriptorDataEXT -> IO b -> IO b
pokeZeroCStruct Ptr DescriptorDataEXT
_ IO b
f = IO b
f
  cStructSize :: Int
cStructSize = Int
8
  cStructAlignment :: Int
cStructAlignment = Int
8

instance Zero DescriptorDataEXT where
  zero :: DescriptorDataEXT
zero = Sampler -> DescriptorDataEXT
ASampler Sampler
forall a. Zero a => a
zero

peekDescriptorDataEXT :: DescriptorType -> Ptr DescriptorDataEXT -> IO DescriptorDataEXT
peekDescriptorDataEXT :: DescriptorType -> Ptr DescriptorDataEXT -> IO DescriptorDataEXT
peekDescriptorDataEXT DescriptorType
tag Ptr DescriptorDataEXT
p = case DescriptorType
tag of
  DescriptorType
DESCRIPTOR_TYPE_SAMPLER -> Sampler -> DescriptorDataEXT
ASampler (Sampler -> DescriptorDataEXT)
-> IO Sampler -> IO DescriptorDataEXT
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (forall a. Storable a => Ptr a -> IO a
peek @Sampler (Ptr Sampler -> IO Sampler) -> IO (Ptr Sampler) -> IO Sampler
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr (Ptr Sampler) -> IO (Ptr Sampler)
forall a. Storable a => Ptr a -> IO a
peek (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr Sampler) Ptr DescriptorDataEXT
p))
  DescriptorType
DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER -> DescriptorImageInfo -> DescriptorDataEXT
ACombinedImageSampler (DescriptorImageInfo -> DescriptorDataEXT)
-> IO DescriptorImageInfo -> IO DescriptorDataEXT
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorImageInfo (Ptr DescriptorImageInfo -> IO DescriptorImageInfo)
-> IO (Ptr DescriptorImageInfo) -> IO DescriptorImageInfo
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr (Ptr DescriptorImageInfo) -> IO (Ptr DescriptorImageInfo)
forall a. Storable a => Ptr a -> IO a
peek (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorImageInfo) Ptr DescriptorDataEXT
p))
  DescriptorType
DESCRIPTOR_TYPE_INPUT_ATTACHMENT -> DescriptorImageInfo -> DescriptorDataEXT
AnInputAttachmentImage (DescriptorImageInfo -> DescriptorDataEXT)
-> IO DescriptorImageInfo -> IO DescriptorDataEXT
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorImageInfo (Ptr DescriptorImageInfo -> IO DescriptorImageInfo)
-> IO (Ptr DescriptorImageInfo) -> IO DescriptorImageInfo
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr (Ptr DescriptorImageInfo) -> IO (Ptr DescriptorImageInfo)
forall a. Storable a => Ptr a -> IO a
peek (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorImageInfo) Ptr DescriptorDataEXT
p))
  DescriptorType
DESCRIPTOR_TYPE_SAMPLED_IMAGE -> Maybe DescriptorImageInfo -> DescriptorDataEXT
ASampledImage (Maybe DescriptorImageInfo -> DescriptorDataEXT)
-> IO (Maybe DescriptorImageInfo) -> IO DescriptorDataEXT
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
    pSampledImage <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr DescriptorImageInfo) (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorImageInfo) Ptr DescriptorDataEXT
p)
    maybePeek (\Ptr DescriptorImageInfo
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorImageInfo (Ptr DescriptorImageInfo
j)) pSampledImage)
  DescriptorType
DESCRIPTOR_TYPE_STORAGE_IMAGE -> Maybe DescriptorImageInfo -> DescriptorDataEXT
AStorageImage (Maybe DescriptorImageInfo -> DescriptorDataEXT)
-> IO (Maybe DescriptorImageInfo) -> IO DescriptorDataEXT
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
    pStorageImage <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr DescriptorImageInfo) (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorImageInfo) Ptr DescriptorDataEXT
p)
    maybePeek (\Ptr DescriptorImageInfo
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorImageInfo (Ptr DescriptorImageInfo
j)) pStorageImage)
  DescriptorType
DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER -> Maybe DescriptorAddressInfoEXT -> DescriptorDataEXT
AnUniformTexelBuffer (Maybe DescriptorAddressInfoEXT -> DescriptorDataEXT)
-> IO (Maybe DescriptorAddressInfoEXT) -> IO DescriptorDataEXT
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
    pUniformTexelBuffer <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr DescriptorAddressInfoEXT) (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorAddressInfoEXT) Ptr DescriptorDataEXT
p)
    maybePeek (\Ptr DescriptorAddressInfoEXT
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorAddressInfoEXT (Ptr DescriptorAddressInfoEXT
j)) pUniformTexelBuffer)
  DescriptorType
DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER -> Maybe DescriptorAddressInfoEXT -> DescriptorDataEXT
AStorageTexelBuffer (Maybe DescriptorAddressInfoEXT -> DescriptorDataEXT)
-> IO (Maybe DescriptorAddressInfoEXT) -> IO DescriptorDataEXT
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
    pStorageTexelBuffer <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr DescriptorAddressInfoEXT) (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorAddressInfoEXT) Ptr DescriptorDataEXT
p)
    maybePeek (\Ptr DescriptorAddressInfoEXT
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorAddressInfoEXT (Ptr DescriptorAddressInfoEXT
j)) pStorageTexelBuffer)
  DescriptorType
DESCRIPTOR_TYPE_UNIFORM_BUFFER -> Maybe DescriptorAddressInfoEXT -> DescriptorDataEXT
AnUniformBuffer (Maybe DescriptorAddressInfoEXT -> DescriptorDataEXT)
-> IO (Maybe DescriptorAddressInfoEXT) -> IO DescriptorDataEXT
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
    pUniformBuffer <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr DescriptorAddressInfoEXT) (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorAddressInfoEXT) Ptr DescriptorDataEXT
p)
    maybePeek (\Ptr DescriptorAddressInfoEXT
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorAddressInfoEXT (Ptr DescriptorAddressInfoEXT
j)) pUniformBuffer)
  DescriptorType
DESCRIPTOR_TYPE_STORAGE_BUFFER -> Maybe DescriptorAddressInfoEXT -> DescriptorDataEXT
AStorageBuffer (Maybe DescriptorAddressInfoEXT -> DescriptorDataEXT)
-> IO (Maybe DescriptorAddressInfoEXT) -> IO DescriptorDataEXT
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
    pStorageBuffer <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr DescriptorAddressInfoEXT) (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorAddressInfoEXT) Ptr DescriptorDataEXT
p)
    maybePeek (\Ptr DescriptorAddressInfoEXT
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorAddressInfoEXT (Ptr DescriptorAddressInfoEXT
j)) pStorageBuffer)
  DescriptorType
DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR -> DeviceAddress -> DescriptorDataEXT
AnAccelerationStructure (DeviceAddress -> DescriptorDataEXT)
-> IO DeviceAddress -> IO DescriptorDataEXT
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (forall a. Storable a => Ptr a -> IO a
peek @DeviceAddress (forall a b. Ptr a -> Ptr b
castPtr @_ @DeviceAddress Ptr DescriptorDataEXT
p))


type EXT_DESCRIPTOR_BUFFER_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_EXT_DESCRIPTOR_BUFFER_SPEC_VERSION"
pattern EXT_DESCRIPTOR_BUFFER_SPEC_VERSION :: forall a . Integral a => a
pattern $mEXT_DESCRIPTOR_BUFFER_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bEXT_DESCRIPTOR_BUFFER_SPEC_VERSION :: forall a. Integral a => a
EXT_DESCRIPTOR_BUFFER_SPEC_VERSION = 1


type EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME = "VK_EXT_descriptor_buffer"

-- No documentation found for TopLevel "VK_EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME"
pattern EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mEXT_DESCRIPTOR_BUFFER_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bEXT_DESCRIPTOR_BUFFER_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME = "VK_EXT_descriptor_buffer"