{-# 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__]
--     Not 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>
--     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_KHR_synchronization2 VK_KHR_synchronization2>
--     and
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_descriptor_indexing VK_EXT_descriptor_indexing>
--
-- [__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.
--
-- == 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':
--
--     -   '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':
--
--     -   'Vulkan.Core10.Enums.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
--
-- 'BufferCaptureDescriptorDataInfoEXT', 'DescriptorAddressInfoEXT',
-- 'DescriptorBufferBindingInfoEXT',
-- 'DescriptorBufferBindingPushDescriptorBufferHandleEXT',
-- 'DescriptorDataEXT', 'DescriptorGetInfoEXT',
-- 'ImageCaptureDescriptorDataInfoEXT',
-- 'ImageViewCaptureDescriptorDataInfoEXT',
-- 'OpaqueCaptureDescriptorDataCreateInfoEXT',
-- 'PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT',
-- 'PhysicalDeviceDescriptorBufferFeaturesEXT',
-- 'PhysicalDeviceDescriptorBufferPropertiesEXT',
-- 'SamplerCaptureDescriptorDataInfoEXT',
-- 'cmdBindDescriptorBufferEmbeddedSamplersEXT',
-- 'cmdBindDescriptorBuffersEXT', 'cmdSetDescriptorBufferOffsetsEXT',
-- 'getBufferOpaqueCaptureDescriptorDataEXT', 'getDescriptorEXT',
-- 'getDescriptorSetLayoutBindingOffsetEXT',
-- 'getDescriptorSetLayoutSizeEXT',
-- 'getImageOpaqueCaptureDescriptorDataEXT',
-- 'getImageViewOpaqueCaptureDescriptorDataEXT',
-- 'getSamplerOpaqueCaptureDescriptorDataEXT'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/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
                                                   , 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.Extensions.VK_KHR_maintenance5 (BufferUsageFlags2CreateInfoKHR)
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 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.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/1.3-extensions/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
--
-- == 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 = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkGetDescriptorSetLayoutSizeEXTPtr :: FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
   -> IO ())
vkGetDescriptorSetLayoutSizeEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> DescriptorSetLayout
      -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
      -> IO ())
pVkGetDescriptorSetLayoutSizeEXT (case Device
device of Device{DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
   -> IO ())
vkGetDescriptorSetLayoutSizeEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetDescriptorSetLayoutSizeEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkGetDescriptorSetLayoutSizeEXT' :: Ptr Device_T
-> DescriptorSetLayout
-> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
-> IO ()
vkGetDescriptorSetLayoutSizeEXT' = FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
   -> IO ())
-> Ptr Device_T
-> DescriptorSetLayout
-> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
-> IO ()
mkVkGetDescriptorSetLayoutSizeEXT FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
   -> IO ())
vkGetDescriptorSetLayoutSizeEXTPtr
  "pLayoutSizeInBytes" ::: Ptr DeviceAddress
pPLayoutSizeInBytes <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ 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) forall a. Ptr a -> IO ()
free
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDescriptorSetLayoutSizeEXT" (Ptr Device_T
-> DescriptorSetLayout
-> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
-> IO ()
vkGetDescriptorSetLayoutSizeEXT'
                                                               (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                               (DescriptorSetLayout
layout)
                                                               ("pLayoutSizeInBytes" ::: Ptr DeviceAddress
pPLayoutSizeInBytes))
  DeviceAddress
pLayoutSizeInBytes <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @DeviceSize "pLayoutSizeInBytes" ::: Ptr DeviceAddress
pPLayoutSizeInBytes
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (DeviceAddress
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.Extensions.VK_VALVE_mutable_descriptor_type.DESCRIPTOR_TYPE_MUTABLE_VALVE'
-- /can/ be used. Any potential types in
-- 'Vulkan.Extensions.VK_VALVE_mutable_descriptor_type.MutableDescriptorTypeCreateInfoVALVE'::@pDescriptorTypes@
-- for @binding@ share the same offset. If the size of the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/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/1.3-extensions/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
--
-- == 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 = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkGetDescriptorSetLayoutBindingOffsetEXTPtr :: FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("binding" ::: Word32)
   -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
   -> IO ())
vkGetDescriptorSetLayoutBindingOffsetEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> DescriptorSetLayout
      -> ("binding" ::: Word32)
      -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
      -> IO ())
pVkGetDescriptorSetLayoutBindingOffsetEXT (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("binding" ::: Word32)
   -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
   -> IO ())
vkGetDescriptorSetLayoutBindingOffsetEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetDescriptorSetLayoutBindingOffsetEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkGetDescriptorSetLayoutBindingOffsetEXT' :: Ptr Device_T
-> DescriptorSetLayout
-> ("binding" ::: Word32)
-> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
-> IO ()
vkGetDescriptorSetLayoutBindingOffsetEXT' = FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("binding" ::: Word32)
   -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
   -> IO ())
-> Ptr Device_T
-> DescriptorSetLayout
-> ("binding" ::: Word32)
-> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
-> IO ()
mkVkGetDescriptorSetLayoutBindingOffsetEXT FunPtr
  (Ptr Device_T
   -> DescriptorSetLayout
   -> ("binding" ::: Word32)
   -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
   -> IO ())
vkGetDescriptorSetLayoutBindingOffsetEXTPtr
  "pLayoutSizeInBytes" ::: Ptr DeviceAddress
pPOffset <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ 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) forall a. Ptr a -> IO ()
free
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDescriptorSetLayoutBindingOffsetEXT" (Ptr Device_T
-> DescriptorSetLayout
-> ("binding" ::: Word32)
-> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
-> IO ()
vkGetDescriptorSetLayoutBindingOffsetEXT'
                                                                        (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                                        (DescriptorSetLayout
layout)
                                                                        ("binding" ::: Word32
binding)
                                                                        ("pLayoutSizeInBytes" ::: Ptr DeviceAddress
pPOffset))
  DeviceAddress
pOffset <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @DeviceSize "pLayoutSizeInBytes" ::: Ptr DeviceAddress
pPOffset
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (DeviceAddress
pOffset)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetDescriptorEXT
  :: FunPtr (Ptr Device_T -> Ptr DescriptorGetInfoEXT -> CSize -> Ptr () -> IO ()) -> Ptr Device_T -> Ptr 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/1.3-extensions/html/vkspec.html#features-descriptorBuffer descriptorBuffer>
--     feature /must/ be enabled
--
-- -   #VUID-vkGetDescriptorEXT-dataSize-08125# @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-pDescriptor-08016# @pDescriptor@ /must/ be
--     a valid pointer to an array of at least @dataSize@ bytes
--
-- == 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 io
                  . (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)
                 -> -- | @dataSize@ is the amount of the descriptor data to get in bytes.
                    ("dataSize" ::: Word64)
                 -> -- | @pDescriptor@ is a pointer to a user-allocated buffer where the
                    -- descriptor will be written.
                    ("descriptor" ::: Ptr ())
                 -> io ()
getDescriptorEXT :: forall (io :: * -> *).
MonadIO io =>
Device
-> DescriptorGetInfoEXT
-> DeviceAddress
-> ("descriptor" ::: Ptr ())
-> io ()
getDescriptorEXT Device
device
                   DescriptorGetInfoEXT
descriptorInfo
                   DeviceAddress
dataSize
                   "descriptor" ::: Ptr ()
descriptor = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkGetDescriptorEXTPtr :: FunPtr
  (Ptr Device_T
   -> ("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT)
   -> ("dataSize" ::: CSize)
   -> ("descriptor" ::: Ptr ())
   -> IO ())
vkGetDescriptorEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> ("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT)
      -> ("dataSize" ::: CSize)
      -> ("descriptor" ::: Ptr ())
      -> IO ())
pVkGetDescriptorEXT (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT)
   -> ("dataSize" ::: CSize)
   -> ("descriptor" ::: Ptr ())
   -> IO ())
vkGetDescriptorEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetDescriptorEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkGetDescriptorEXT' :: Ptr Device_T
-> ("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT)
-> ("dataSize" ::: CSize)
-> ("descriptor" ::: Ptr ())
-> IO ()
vkGetDescriptorEXT' = FunPtr
  (Ptr Device_T
   -> ("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT)
   -> ("dataSize" ::: CSize)
   -> ("descriptor" ::: Ptr ())
   -> IO ())
-> Ptr Device_T
-> ("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT)
-> ("dataSize" ::: CSize)
-> ("descriptor" ::: Ptr ())
-> IO ()
mkVkGetDescriptorEXT FunPtr
  (Ptr Device_T
   -> ("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT)
   -> ("dataSize" ::: CSize)
   -> ("descriptor" ::: Ptr ())
   -> IO ())
vkGetDescriptorEXTPtr
  "pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
pDescriptorInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DescriptorGetInfoEXT
descriptorInfo)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDescriptorEXT" (Ptr Device_T
-> ("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT)
-> ("dataSize" ::: CSize)
-> ("descriptor" ::: Ptr ())
-> IO ()
vkGetDescriptorEXT'
                                                  (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                  "pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
pDescriptorInfo
                                                  (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
dataSize))
                                                  ("descriptor" ::: Ptr ()
descriptor))
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()


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-None-08047# The
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-descriptorBuffer descriptorBuffer>
--     feature /must/ be enabled
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-maxSamplerDescriptorBufferBindings-08048#
--     There /must/ be no more than
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@maxSamplerDescriptorBufferBindings@
--     descriptor buffers containing sampler descriptor data bound
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-maxResourceDescriptorBufferBindings-08049#
--     There /must/ be no more than
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@maxResourceDescriptorBufferBindings@
--     descriptor buffers containing resource descriptor data bound
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-None-08050# There /must/ be no
--     more than @1@ descriptor buffer bound that was created with the
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT'
--     bit set
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-bufferCount-08051# @bufferCount@
--     /must/ be less than or equal to
--     'PhysicalDeviceDescriptorBufferPropertiesEXT'::@maxDescriptorBufferBindings@
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08052# For any
--     element of @pBindingInfos@, if the buffer from which @address@ was
--     queried is non-sparse then it /must/ be bound completely and
--     contiguously to a single 'Vulkan.Core10.Handles.DeviceMemory' object
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08053# For any
--     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'
--     bit set if it contains sampler descriptor data
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08054# For any
--     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'
--     bit set if it contains resource descriptor data
--
-- -   #VUID-vkCmdBindDescriptorBuffersEXT-pBindingInfos-08055# For any
--     element of @pBindingInfos@, @usage@ /must/ match the buffer from
--     which @address@ was queried
--
-- == 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 graphics, or compute 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                                                                                                                     | Graphics                                                                                                              | State                                                                                                                                  |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             | Compute                                                                                                               |                                                                                                                                        |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- = 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 = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkCmdBindDescriptorBuffersEXTPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> ("binding" ::: Word32)
   -> ("pBindingInfos"
       ::: Ptr (SomeStruct DescriptorBufferBindingInfoEXT))
   -> IO ())
vkCmdBindDescriptorBuffersEXTPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> ("binding" ::: Word32)
      -> ("pBindingInfos"
          ::: Ptr (SomeStruct DescriptorBufferBindingInfoEXT))
      -> IO ())
pVkCmdBindDescriptorBuffersEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> ("binding" ::: Word32)
   -> ("pBindingInfos"
       ::: Ptr (SomeStruct DescriptorBufferBindingInfoEXT))
   -> IO ())
vkCmdBindDescriptorBuffersEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdBindDescriptorBuffersEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkCmdBindDescriptorBuffersEXT' :: Ptr CommandBuffer_T
-> ("binding" ::: Word32)
-> ("pBindingInfos"
    ::: Ptr (SomeStruct DescriptorBufferBindingInfoEXT))
-> IO ()
vkCmdBindDescriptorBuffersEXT' = FunPtr
  (Ptr CommandBuffer_T
   -> ("binding" ::: Word32)
   -> ("pBindingInfos"
       ::: Ptr (SomeStruct DescriptorBufferBindingInfoEXT))
   -> IO ())
-> Ptr CommandBuffer_T
-> ("binding" ::: Word32)
-> ("pBindingInfos"
    ::: Ptr (SomeStruct DescriptorBufferBindingInfoEXT))
-> IO ()
mkVkCmdBindDescriptorBuffersEXT FunPtr
  (Ptr CommandBuffer_T
   -> ("binding" ::: Word32)
   -> ("pBindingInfos"
       ::: Ptr (SomeStruct DescriptorBufferBindingInfoEXT))
   -> IO ())
vkCmdBindDescriptorBuffersEXTPtr
  Ptr (DescriptorBufferBindingInfoEXT Any)
pPBindingInfos <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @(DescriptorBufferBindingInfoEXT _) ((forall a. Vector a -> Int
Data.Vector.length ("bindingInfos"
::: Vector (SomeStruct DescriptorBufferBindingInfoEXT)
bindingInfos)) forall a. Num a => a -> a -> a
* Int
32)
  forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i SomeStruct DescriptorBufferBindingInfoEXT
e -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (DescriptorBufferBindingInfoEXT Any)
pPBindingInfos forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
32 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (DescriptorBufferBindingInfoEXT _))) (SomeStruct DescriptorBufferBindingInfoEXT
e) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) ("bindingInfos"
::: Vector (SomeStruct DescriptorBufferBindingInfoEXT)
bindingInfos)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdBindDescriptorBuffersEXT" (Ptr CommandBuffer_T
-> ("binding" ::: Word32)
-> ("pBindingInfos"
    ::: Ptr (SomeStruct DescriptorBufferBindingInfoEXT))
-> IO ()
vkCmdBindDescriptorBuffersEXT'
                                                             (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
                                                             ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("bindingInfos"
::: Vector (SomeStruct DescriptorBufferBindingInfoEXT)
bindingInfos)) :: Word32))
                                                             (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (DescriptorBufferBindingInfoEXT Any)
pPBindingInfos)))
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()


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@+@descriptorSetCount@-1] for subsequent
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/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/1.3-extensions/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.
--
-- Note
--
-- 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/1.3-extensions/html/vkspec.html#sparsememory-partially-resident-buffers sparse partially-resident buffer>
-- will result in invalid descriptor data being read, and therefore
-- undefined behavior.
--
-- Note
--
-- 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.
--
-- Note
--
-- 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-None-08060# The
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-descriptorBuffer descriptorBuffer>
--     feature /must/ be enabled
--
-- -   #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-pipelineBindPoint-08067#
--     @pipelineBindPoint@ /must/ be supported by the @commandBuffer@’s
--     parent 'Vulkan.Core10.Handles.CommandPool'’s queue family
--
-- -   #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
--
-- == 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 graphics, or compute 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                                                                                                                     | Graphics                                                                                                              | State                                                                                                                                  |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             | Compute                                                                                                               |                                                                                                                                        |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- = 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 = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkCmdSetDescriptorBufferOffsetsEXTPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> ("binding" ::: Word32)
   -> ("pBufferIndices" ::: Ptr ("binding" ::: Word32))
   -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
   -> IO ())
vkCmdSetDescriptorBufferOffsetsEXTPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> PipelineBindPoint
      -> PipelineLayout
      -> ("binding" ::: Word32)
      -> ("binding" ::: Word32)
      -> ("pBufferIndices" ::: Ptr ("binding" ::: Word32))
      -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
      -> IO ())
pVkCmdSetDescriptorBufferOffsetsEXT (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> ("binding" ::: Word32)
   -> ("pBufferIndices" ::: Ptr ("binding" ::: Word32))
   -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
   -> IO ())
vkCmdSetDescriptorBufferOffsetsEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetDescriptorBufferOffsetsEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkCmdSetDescriptorBufferOffsetsEXT' :: Ptr CommandBuffer_T
-> PipelineBindPoint
-> PipelineLayout
-> ("binding" ::: Word32)
-> ("binding" ::: Word32)
-> ("pBufferIndices" ::: Ptr ("binding" ::: Word32))
-> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
-> IO ()
vkCmdSetDescriptorBufferOffsetsEXT' = FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> ("binding" ::: Word32)
   -> ("pBufferIndices" ::: Ptr ("binding" ::: Word32))
   -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
   -> IO ())
-> Ptr CommandBuffer_T
-> PipelineBindPoint
-> PipelineLayout
-> ("binding" ::: Word32)
-> ("binding" ::: Word32)
-> ("pBufferIndices" ::: Ptr ("binding" ::: Word32))
-> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
-> IO ()
mkVkCmdSetDescriptorBufferOffsetsEXT FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> ("binding" ::: Word32)
   -> ("pBufferIndices" ::: Ptr ("binding" ::: Word32))
   -> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
   -> IO ())
vkCmdSetDescriptorBufferOffsetsEXTPtr
  let pBufferIndicesLength :: Int
pBufferIndicesLength = forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("bufferIndices" ::: Vector ("binding" ::: Word32)
bufferIndices)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless ((forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("offsets" ::: Vector DeviceAddress
offsets)) forall a. Eq a => a -> a -> Bool
== Int
pBufferIndicesLength) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"pOffsets and pBufferIndices must have the same length" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  "pBufferIndices" ::: Ptr ("binding" ::: Word32)
pPBufferIndices <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Word32 ((forall a. Vector a -> Int
Data.Vector.length ("bufferIndices" ::: Vector ("binding" ::: Word32)
bufferIndices)) forall a. Num a => a -> a -> a
* Int
4)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i "binding" ::: Word32
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ("pBufferIndices" ::: Ptr ("binding" ::: Word32)
pPBufferIndices forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) ("binding" ::: Word32
e)) ("bufferIndices" ::: Vector ("binding" ::: Word32)
bufferIndices)
  "pLayoutSizeInBytes" ::: Ptr DeviceAddress
pPOffsets <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @DeviceSize ((forall a. Vector a -> Int
Data.Vector.length ("offsets" ::: Vector DeviceAddress
offsets)) forall a. Num a => a -> a -> a
* Int
8)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i DeviceAddress
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ("pLayoutSizeInBytes" ::: Ptr DeviceAddress
pPOffsets forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr DeviceSize) (DeviceAddress
e)) ("offsets" ::: Vector DeviceAddress
offsets)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdSetDescriptorBufferOffsetsEXT" (Ptr CommandBuffer_T
-> PipelineBindPoint
-> PipelineLayout
-> ("binding" ::: Word32)
-> ("binding" ::: Word32)
-> ("pBufferIndices" ::: Ptr ("binding" ::: Word32))
-> ("pLayoutSizeInBytes" ::: Ptr DeviceAddress)
-> IO ()
vkCmdSetDescriptorBufferOffsetsEXT'
                                                                  (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
                                                                  (PipelineBindPoint
pipelineBindPoint)
                                                                  (PipelineLayout
layout)
                                                                  ("binding" ::: Word32
firstSet)
                                                                  ((forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pBufferIndicesLength :: Word32))
                                                                  ("pBufferIndices" ::: Ptr ("binding" ::: Word32)
pPBufferIndices)
                                                                  ("pLayoutSizeInBytes" ::: Ptr DeviceAddress
pPOffsets))
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()


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/1.3-extensions/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/1.3-extensions/html/vkspec.html#descriptorsets-compatibility Pipeline Layout Compatibility>.
--
-- == Valid Usage
--
-- -   #VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-None-08068# The
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/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
--
-- -   #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
--
-- == 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 graphics, or compute 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                                                                                                                     | Graphics                                                                                                              | State                                                                                                                                  |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             | Compute                                                                                                               |                                                                                                                                        |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- = 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 = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO 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 :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> PipelineBindPoint
   -> PipelineLayout
   -> ("binding" ::: Word32)
   -> IO ())
vkCmdBindDescriptorBufferEmbeddedSamplersEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdBindDescriptorBufferEmbeddedSamplersEXT is null" forall a. Maybe a
Nothing 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
  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))
  forall (f :: * -> *) a. Applicative f => a -> f a
pure 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/1.3-extensions/html/vkspec.html#features-descriptorBuffer 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/1.3-extensions/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_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
-- = 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 a user-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' = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkGetBufferOpaqueCaptureDescriptorDataEXTPtr :: FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetBufferOpaqueCaptureDescriptorDataEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> ("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT)
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
pVkGetBufferOpaqueCaptureDescriptorDataEXT (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetBufferOpaqueCaptureDescriptorDataEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetBufferOpaqueCaptureDescriptorDataEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkGetBufferOpaqueCaptureDescriptorDataEXT' :: Ptr Device_T
-> ("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetBufferOpaqueCaptureDescriptorDataEXT' = FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> Ptr Device_T
-> ("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
mkVkGetBufferOpaqueCaptureDescriptorDataEXT FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetBufferOpaqueCaptureDescriptorDataEXTPtr
  "pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT
pInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (BufferCaptureDescriptorDataInfoEXT
info)
  Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetBufferOpaqueCaptureDescriptorDataEXT" (Ptr Device_T
-> ("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetBufferOpaqueCaptureDescriptorDataEXT'
                                                                              (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                                              "pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT
pInfo
                                                                              ("descriptor" ::: Ptr ()
data'))
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
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/1.3-extensions/html/vkspec.html#features-descriptorBuffer 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/1.3-extensions/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_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
-- = 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 a user-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' = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkGetImageOpaqueCaptureDescriptorDataEXTPtr :: FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetImageOpaqueCaptureDescriptorDataEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> ("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT)
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
pVkGetImageOpaqueCaptureDescriptorDataEXT (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetImageOpaqueCaptureDescriptorDataEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetImageOpaqueCaptureDescriptorDataEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkGetImageOpaqueCaptureDescriptorDataEXT' :: Ptr Device_T
-> ("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetImageOpaqueCaptureDescriptorDataEXT' = FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> Ptr Device_T
-> ("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
mkVkGetImageOpaqueCaptureDescriptorDataEXT FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetImageOpaqueCaptureDescriptorDataEXTPtr
  "pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT
pInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (ImageCaptureDescriptorDataInfoEXT
info)
  Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetImageOpaqueCaptureDescriptorDataEXT" (Ptr Device_T
-> ("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetImageOpaqueCaptureDescriptorDataEXT'
                                                                             (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                                             "pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT
pInfo
                                                                             ("descriptor" ::: Ptr ()
data'))
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
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/1.3-extensions/html/vkspec.html#features-descriptorBuffer 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/1.3-extensions/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_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
-- = 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 a user-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' = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkGetImageViewOpaqueCaptureDescriptorDataEXTPtr :: FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetImageViewOpaqueCaptureDescriptorDataEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> ("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT)
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
pVkGetImageViewOpaqueCaptureDescriptorDataEXT (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetImageViewOpaqueCaptureDescriptorDataEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetImageViewOpaqueCaptureDescriptorDataEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkGetImageViewOpaqueCaptureDescriptorDataEXT' :: Ptr Device_T
-> ("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetImageViewOpaqueCaptureDescriptorDataEXT' = FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> Ptr Device_T
-> ("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
mkVkGetImageViewOpaqueCaptureDescriptorDataEXT FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetImageViewOpaqueCaptureDescriptorDataEXTPtr
  "pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT
pInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (ImageViewCaptureDescriptorDataInfoEXT
info)
  Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetImageViewOpaqueCaptureDescriptorDataEXT" (Ptr Device_T
-> ("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetImageViewOpaqueCaptureDescriptorDataEXT'
                                                                                 (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                                                 "pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT
pInfo
                                                                                 ("descriptor" ::: Ptr ()
data'))
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
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/1.3-extensions/html/vkspec.html#features-descriptorBuffer 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/1.3-extensions/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_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
-- = 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 a user-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' = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkGetSamplerOpaqueCaptureDescriptorDataEXTPtr :: FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetSamplerOpaqueCaptureDescriptorDataEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> ("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT)
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
pVkGetSamplerOpaqueCaptureDescriptorDataEXT (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetSamplerOpaqueCaptureDescriptorDataEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetSamplerOpaqueCaptureDescriptorDataEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkGetSamplerOpaqueCaptureDescriptorDataEXT' :: Ptr Device_T
-> ("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetSamplerOpaqueCaptureDescriptorDataEXT' = FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> Ptr Device_T
-> ("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
mkVkGetSamplerOpaqueCaptureDescriptorDataEXT FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetSamplerOpaqueCaptureDescriptorDataEXTPtr
  "pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT
pInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (SamplerCaptureDescriptorDataInfoEXT
info)
  Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetSamplerOpaqueCaptureDescriptorDataEXT" (Ptr Device_T
-> ("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetSamplerOpaqueCaptureDescriptorDataEXT'
                                                                               (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                                               "pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT
pInfo
                                                                               ("descriptor" ::: Ptr ()
data'))
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
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/1.3-extensions/html/vkspec.html#features-descriptorBuffer 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/1.3-extensions/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_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
-- = 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 a user-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' = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXTPtr :: FunPtr
  (Ptr Device_T
   -> ("pInfo"
       ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXTPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> ("pInfo"
          ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
      -> ("descriptor" ::: Ptr ())
      -> IO Result)
pVkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ("pInfo"
       ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXTPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT' :: Ptr Device_T
-> ("pInfo"
    ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT' = FunPtr
  (Ptr Device_T
   -> ("pInfo"
       ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
-> Ptr Device_T
-> ("pInfo"
    ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
mkVkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT FunPtr
  (Ptr Device_T
   -> ("pInfo"
       ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
   -> ("descriptor" ::: Ptr ())
   -> IO Result)
vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXTPtr
  "pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
pInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureCaptureDescriptorDataInfoEXT
info)
  Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT" (Ptr Device_T
-> ("pInfo"
    ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
-> ("descriptor" ::: Ptr ())
-> IO Result
vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT'
                                                                                             (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                                                             "pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
pInfo
                                                                                             ("descriptor" ::: Ptr ()
data'))
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))


-- | 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. 'PhysicalDeviceDescriptorBufferFeaturesEXT' /can/ also be
-- used in the @pNext@ chain of 'Vulkan.Core10.Device.DeviceCreateInfo' to
-- selectively enable these features.
--
-- == 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',
    -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT',
    -- 'Vulkan.Core10.Enums.ImageViewCreateFlagBits.IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT',
    -- '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
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
$c/= :: PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
== :: PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
$c== :: 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 = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p -> 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
descriptorBufferPushDescriptors :: Bool
descriptorBufferImageLayoutIgnored :: Bool
descriptorBufferCaptureReplay :: Bool
descriptorBuffer :: Bool
$sel:descriptorBufferPushDescriptors:PhysicalDeviceDescriptorBufferFeaturesEXT :: PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
$sel:descriptorBufferImageLayoutIgnored:PhysicalDeviceDescriptorBufferFeaturesEXT :: PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
$sel:descriptorBufferCaptureReplay:PhysicalDeviceDescriptorBufferFeaturesEXT :: PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
$sel:descriptorBuffer:PhysicalDeviceDescriptorBufferFeaturesEXT :: PhysicalDeviceDescriptorBufferFeaturesEXT -> Bool
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
descriptorBuffer))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
descriptorBufferCaptureReplay))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
descriptorBufferImageLayoutIgnored))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p 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
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceDescriptorBufferFeaturesEXT where
  peekCStruct :: Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> IO PhysicalDeviceDescriptorBufferFeaturesEXT
peekCStruct Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p = do
    Bool32
descriptorBuffer <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    Bool32
descriptorBufferCaptureReplay <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
    Bool32
descriptorBufferImageLayoutIgnored <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
    Bool32
descriptorBufferPushDescriptors <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceDescriptorBufferFeaturesEXT
PhysicalDeviceDescriptorBufferFeaturesEXT
             (Bool32 -> Bool
bool32ToBool Bool32
descriptorBuffer)
             (Bool32 -> Bool
bool32ToBool Bool32
descriptorBufferCaptureReplay)
             (Bool32 -> Bool
bool32ToBool Bool32
descriptorBufferImageLayoutIgnored)
             (Bool32 -> Bool
bool32ToBool Bool32
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 = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
-> PhysicalDeviceDescriptorBufferFeaturesEXT -> IO ()
poke Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
ptr PhysicalDeviceDescriptorBufferFeaturesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDescriptorBufferFeaturesEXT
ptr PhysicalDeviceDescriptorBufferFeaturesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

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


-- | VkPhysicalDeviceDescriptorBufferPropertiesEXT - Structure describing
-- descriptor buffer properties supported by an implementation
--
-- = Description
--
-- A descriptor binding with type
-- 'Vulkan.Extensions.VK_VALVE_mutable_descriptor_type.DESCRIPTOR_TYPE_MUTABLE_VALVE'
-- has a descriptor size which is implied by the descriptor types included
-- in the
-- 'Vulkan.Extensions.VK_VALVE_mutable_descriptor_type.MutableDescriptorTypeCreateInfoVALVE'::@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
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-robustBufferAccess robustBufferAccess>
-- 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
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT'
    -- 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 sum total number of descriptor buffers and
    -- embedded immutable sampler sets that /can/ be bound.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
maxDescriptorBufferBindings :: Word32
  , -- | #limits-maxResourceDescriptorBufferBindings#
    -- @maxResourceDescriptorBufferBindings@ indicates the maximum number of
    -- resource descriptor buffers that /can/ be bound.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
maxResourceDescriptorBufferBindings :: Word32
  , -- | #limits-maxSamplerDescriptorBufferBindings#
    -- @maxSamplerDescriptorBufferBindings@ indicates the maximum number of
    -- sampler descriptor buffers that /can/ be bound.
    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-samplerDescriptorSize# @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/1.3-extensions/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/1.3-extensions/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/1.3-extensions/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/1.3-extensions/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/1.3-extensions/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/1.3-extensions/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
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT'.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
samplerDescriptorBufferAddressSpaceSize :: DeviceSize
  , -- | #limits-resourceDescriptorBufferAddressSpaceSize#
    -- @resourceDescriptorBufferAddressSpaceSize@ indicates the total size in
    -- bytes of the address space available for descriptor buffers created with
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT'.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
resourceDescriptorBufferAddressSpaceSize :: DeviceSize
  , -- | #limits-descriptorBufferAddressSpaceSize#
    -- @descriptorBufferAddressSpaceSize@ indicates the total size in bytes of
    -- the address space available for descriptor buffers created with both
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT'
    -- and
    -- 'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT'.
    PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
descriptorBufferAddressSpaceSize :: DeviceSize
  }
  deriving (Typeable, PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
$c/= :: PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
== :: PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
$c== :: 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 = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
256 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p -> 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
descriptorBufferAddressSpaceSize :: DeviceAddress
resourceDescriptorBufferAddressSpaceSize :: DeviceAddress
samplerDescriptorBufferAddressSpaceSize :: DeviceAddress
maxResourceDescriptorBufferRange :: DeviceAddress
maxSamplerDescriptorBufferRange :: DeviceAddress
accelerationStructureDescriptorSize :: DeviceAddress
inputAttachmentDescriptorSize :: DeviceAddress
robustStorageBufferDescriptorSize :: DeviceAddress
storageBufferDescriptorSize :: DeviceAddress
robustUniformBufferDescriptorSize :: DeviceAddress
uniformBufferDescriptorSize :: DeviceAddress
robustStorageTexelBufferDescriptorSize :: DeviceAddress
storageTexelBufferDescriptorSize :: DeviceAddress
robustUniformTexelBufferDescriptorSize :: DeviceAddress
uniformTexelBufferDescriptorSize :: DeviceAddress
storageImageDescriptorSize :: DeviceAddress
sampledImageDescriptorSize :: DeviceAddress
combinedImageSamplerDescriptorSize :: DeviceAddress
samplerDescriptorSize :: DeviceAddress
accelerationStructureCaptureReplayDescriptorDataSize :: DeviceAddress
samplerCaptureReplayDescriptorDataSize :: DeviceAddress
imageViewCaptureReplayDescriptorDataSize :: DeviceAddress
imageCaptureReplayDescriptorDataSize :: DeviceAddress
bufferCaptureReplayDescriptorDataSize :: DeviceAddress
maxEmbeddedImmutableSamplers :: "binding" ::: Word32
maxEmbeddedImmutableSamplerBindings :: "binding" ::: Word32
maxSamplerDescriptorBufferBindings :: "binding" ::: Word32
maxResourceDescriptorBufferBindings :: "binding" ::: Word32
maxDescriptorBufferBindings :: "binding" ::: Word32
descriptorBufferOffsetAlignment :: DeviceAddress
allowSamplerImageViewPostSubmitCreation :: Bool
bufferlessPushDescriptors :: Bool
combinedImageSamplerDescriptorSingleArray :: Bool
$sel:descriptorBufferAddressSpaceSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:resourceDescriptorBufferAddressSpaceSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:samplerDescriptorBufferAddressSpaceSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:maxResourceDescriptorBufferRange:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:maxSamplerDescriptorBufferRange:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:accelerationStructureDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:inputAttachmentDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:robustStorageBufferDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:storageBufferDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:robustUniformBufferDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:uniformBufferDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:robustStorageTexelBufferDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:storageTexelBufferDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:robustUniformTexelBufferDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:uniformTexelBufferDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:storageImageDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:sampledImageDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:combinedImageSamplerDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:samplerDescriptorSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:accelerationStructureCaptureReplayDescriptorDataSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:samplerCaptureReplayDescriptorDataSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:imageViewCaptureReplayDescriptorDataSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:imageCaptureReplayDescriptorDataSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:bufferCaptureReplayDescriptorDataSize:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:maxEmbeddedImmutableSamplers:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
$sel:maxEmbeddedImmutableSamplerBindings:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
$sel:maxSamplerDescriptorBufferBindings:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
$sel:maxResourceDescriptorBufferBindings:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
$sel:maxDescriptorBufferBindings:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> "binding" ::: Word32
$sel:descriptorBufferOffsetAlignment:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> DeviceAddress
$sel:allowSamplerImageViewPostSubmitCreation:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
$sel:bufferlessPushDescriptors:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
$sel:combinedImageSamplerDescriptorSingleArray:PhysicalDeviceDescriptorBufferPropertiesEXT :: PhysicalDeviceDescriptorBufferPropertiesEXT -> Bool
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
combinedImageSamplerDescriptorSingleArray))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
bufferlessPushDescriptors))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
allowSamplerImageViewPostSubmitCreation))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) (DeviceAddress
descriptorBufferOffsetAlignment)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) ("binding" ::: Word32
maxDescriptorBufferBindings)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) ("binding" ::: Word32
maxResourceDescriptorBufferBindings)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) ("binding" ::: Word32
maxSamplerDescriptorBufferBindings)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) ("binding" ::: Word32
maxEmbeddedImmutableSamplerBindings)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) ("binding" ::: Word32
maxEmbeddedImmutableSamplers)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
bufferCaptureReplayDescriptorDataSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
imageCaptureReplayDescriptorDataSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
imageViewCaptureReplayDescriptorDataSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
samplerCaptureReplayDescriptorDataSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
accelerationStructureCaptureReplayDescriptorDataSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
samplerDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
combinedImageSamplerDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
120 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
sampledImageDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
storageImageDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
uniformTexelBufferDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
robustUniformTexelBufferDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
152 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
storageTexelBufferDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
robustStorageTexelBufferDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
168 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
uniformBufferDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
176 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
robustUniformBufferDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
184 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
storageBufferDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
192 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
robustStorageBufferDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
200 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
inputAttachmentDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
208 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (DeviceAddress
accelerationStructureDescriptorSize))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
216 :: Ptr DeviceSize)) (DeviceAddress
maxSamplerDescriptorBufferRange)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
224 :: Ptr DeviceSize)) (DeviceAddress
maxResourceDescriptorBufferRange)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
232 :: Ptr DeviceSize)) (DeviceAddress
samplerDescriptorBufferAddressSpaceSize)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
240 :: Ptr DeviceSize)) (DeviceAddress
resourceDescriptorBufferAddressSpaceSize)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p 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
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
120 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
152 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
168 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
176 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
184 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
192 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
200 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
208 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
216 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
224 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
232 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
240 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
248 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PhysicalDeviceDescriptorBufferPropertiesEXT where
  peekCStruct :: Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> IO PhysicalDeviceDescriptorBufferPropertiesEXT
peekCStruct Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p = do
    Bool32
combinedImageSamplerDescriptorSingleArray <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    Bool32
bufferlessPushDescriptors <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
    Bool32
allowSamplerImageViewPostSubmitCreation <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
    DeviceAddress
descriptorBufferOffsetAlignment <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize))
    "binding" ::: Word32
maxDescriptorBufferBindings <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32))
    "binding" ::: Word32
maxResourceDescriptorBufferBindings <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32))
    "binding" ::: Word32
maxSamplerDescriptorBufferBindings <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32))
    "binding" ::: Word32
maxEmbeddedImmutableSamplerBindings <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32))
    "binding" ::: Word32
maxEmbeddedImmutableSamplers <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32))
    "dataSize" ::: CSize
bufferCaptureReplayDescriptorDataSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr CSize))
    "dataSize" ::: CSize
imageCaptureReplayDescriptorDataSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr CSize))
    "dataSize" ::: CSize
imageViewCaptureReplayDescriptorDataSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr CSize))
    "dataSize" ::: CSize
samplerCaptureReplayDescriptorDataSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr CSize))
    "dataSize" ::: CSize
accelerationStructureCaptureReplayDescriptorDataSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr CSize))
    "dataSize" ::: CSize
samplerDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr CSize))
    "dataSize" ::: CSize
combinedImageSamplerDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr CSize))
    "dataSize" ::: CSize
sampledImageDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
120 :: Ptr CSize))
    "dataSize" ::: CSize
storageImageDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr CSize))
    "dataSize" ::: CSize
uniformTexelBufferDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr CSize))
    "dataSize" ::: CSize
robustUniformTexelBufferDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144 :: Ptr CSize))
    "dataSize" ::: CSize
storageTexelBufferDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
152 :: Ptr CSize))
    "dataSize" ::: CSize
robustStorageTexelBufferDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160 :: Ptr CSize))
    "dataSize" ::: CSize
uniformBufferDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
168 :: Ptr CSize))
    "dataSize" ::: CSize
robustUniformBufferDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
176 :: Ptr CSize))
    "dataSize" ::: CSize
storageBufferDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
184 :: Ptr CSize))
    "dataSize" ::: CSize
robustStorageBufferDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
192 :: Ptr CSize))
    "dataSize" ::: CSize
inputAttachmentDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
200 :: Ptr CSize))
    "dataSize" ::: CSize
accelerationStructureDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
208 :: Ptr CSize))
    DeviceAddress
maxSamplerDescriptorBufferRange <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
216 :: Ptr DeviceSize))
    DeviceAddress
maxResourceDescriptorBufferRange <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
224 :: Ptr DeviceSize))
    DeviceAddress
samplerDescriptorBufferAddressSpaceSize <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
232 :: Ptr DeviceSize))
    DeviceAddress
resourceDescriptorBufferAddressSpaceSize <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
240 :: Ptr DeviceSize))
    DeviceAddress
descriptorBufferAddressSpaceSize <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
248 :: Ptr DeviceSize))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ 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
             (Bool32 -> Bool
bool32ToBool Bool32
combinedImageSamplerDescriptorSingleArray)
             (Bool32 -> Bool
bool32ToBool Bool32
bufferlessPushDescriptors)
             (Bool32 -> Bool
bool32ToBool Bool32
allowSamplerImageViewPostSubmitCreation)
             DeviceAddress
descriptorBufferOffsetAlignment
             "binding" ::: Word32
maxDescriptorBufferBindings
             "binding" ::: Word32
maxResourceDescriptorBufferBindings
             "binding" ::: Word32
maxSamplerDescriptorBufferBindings
             "binding" ::: Word32
maxEmbeddedImmutableSamplerBindings
             "binding" ::: Word32
maxEmbeddedImmutableSamplers
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
bufferCaptureReplayDescriptorDataSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
imageCaptureReplayDescriptorDataSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
imageViewCaptureReplayDescriptorDataSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
samplerCaptureReplayDescriptorDataSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
accelerationStructureCaptureReplayDescriptorDataSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
samplerDescriptorSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
combinedImageSamplerDescriptorSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
sampledImageDescriptorSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
storageImageDescriptorSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
uniformTexelBufferDescriptorSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
robustUniformTexelBufferDescriptorSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
storageTexelBufferDescriptorSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
robustStorageTexelBufferDescriptorSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
uniformBufferDescriptorSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
robustUniformBufferDescriptorSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
storageBufferDescriptorSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
robustStorageBufferDescriptorSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
inputAttachmentDescriptorSize)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
accelerationStructureDescriptorSize)
             DeviceAddress
maxSamplerDescriptorBufferRange
             DeviceAddress
maxResourceDescriptorBufferRange
             DeviceAddress
samplerDescriptorBufferAddressSpaceSize
             DeviceAddress
resourceDescriptorBufferAddressSpaceSize
             DeviceAddress
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 = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
-> PhysicalDeviceDescriptorBufferPropertiesEXT -> IO ()
poke Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
ptr PhysicalDeviceDescriptorBufferPropertiesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDescriptorBufferPropertiesEXT
ptr PhysicalDeviceDescriptorBufferPropertiesEXT
poked (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
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           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
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> Bool
$c/= :: PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> Bool
== :: PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> Bool
$c== :: 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 = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p -> 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 :: DeviceAddress
$sel:combinedImageSamplerDensityMapDescriptorSize:PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT :: PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> DeviceAddress
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: 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
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CSize)) (DeviceAddress -> "dataSize" ::: CSize
CSize (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT where
  peekCStruct :: Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> IO PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
peekCStruct Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p = do
    "dataSize" ::: CSize
combinedImageSamplerDensityMapDescriptorSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CSize))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ DeviceAddress
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 "dataSize" ::: CSize
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 = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
-> PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT -> IO ()
poke Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
ptr PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

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


-- | VkDescriptorAddressInfoEXT - Structure specifying descriptor buffer
-- address info
--
-- == Valid Usage
--
-- -   #VUID-VkDescriptorAddressInfoEXT-address-08043# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/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-None-08044# If @address@ is not
--     zero, @address@ /must/ be a valid device address at an offset within
--     a 'Vulkan.Core10.Handles.Buffer'
--
-- -   #VUID-VkDescriptorAddressInfoEXT-range-08045# @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
--
-- == 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-format-parameter# @format@ /must/
--     be a valid 'Vulkan.Core10.Enums.Format.Format' value
--
-- If the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/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
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescriptorAddressInfoEXT -> DescriptorAddressInfoEXT -> Bool
$c/= :: DescriptorAddressInfoEXT -> DescriptorAddressInfoEXT -> Bool
== :: DescriptorAddressInfoEXT -> DescriptorAddressInfoEXT -> Bool
$c== :: 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 = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \Ptr DescriptorAddressInfoEXT
p -> 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
format :: Format
range :: DeviceAddress
address :: DeviceAddress
$sel:format:DescriptorAddressInfoEXT :: DescriptorAddressInfoEXT -> Format
$sel:range:DescriptorAddressInfoEXT :: DescriptorAddressInfoEXT -> DeviceAddress
$sel:address:DescriptorAddressInfoEXT :: DescriptorAddressInfoEXT -> DeviceAddress
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceAddress)) (DeviceAddress
address)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) (DeviceAddress
range)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p 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
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceAddress)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Format)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct DescriptorAddressInfoEXT where
  peekCStruct :: Ptr DescriptorAddressInfoEXT -> IO DescriptorAddressInfoEXT
peekCStruct Ptr DescriptorAddressInfoEXT
p = do
    DeviceAddress
address <- forall a. Storable a => Ptr a -> IO a
peek @DeviceAddress ((Ptr DescriptorAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceAddress))
    DeviceAddress
range <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr DescriptorAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize))
    Format
format <- forall a. Storable a => Ptr a -> IO a
peek @Format ((Ptr DescriptorAddressInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Format))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ DeviceAddress
-> DeviceAddress -> Format -> DescriptorAddressInfoEXT
DescriptorAddressInfoEXT
             DeviceAddress
address DeviceAddress
range Format
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 = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr DescriptorAddressInfoEXT -> DescriptorAddressInfoEXT -> IO ()
poke Ptr DescriptorAddressInfoEXT
ptr DescriptorAddressInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DescriptorAddressInfoEXT
ptr DescriptorAddressInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

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


-- | VkDescriptorBufferBindingInfoEXT - Structure specifying descriptor
-- buffer binding information
--
-- = Description
--
-- If a
-- 'Vulkan.Extensions.VK_KHR_maintenance5.PipelineCreateFlags2CreateInfoKHR'
-- structure is present in the @pNext@ chain,
-- 'Vulkan.Extensions.VK_KHR_maintenance5.PipelineCreateFlags2CreateInfoKHR'::@flags@
-- from that structure is used instead of @flags@ from this structure.
--
-- == Valid Usage
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-bufferlessPushDescriptors-08056#
--     If
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/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 an address within a valid buffer that was
--     created with
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT'
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-usage-08123# If @usage@
--     includes
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT',
--     @address@ /must/ be an address within a valid buffer that was
--     created with
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT'
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-usage-08124# If @usage@
--     includes
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT',
--     @address@ /must/ be an address within a valid buffer that was
--     created with
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT'
--
-- == 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.Extensions.VK_KHR_maintenance5.BufferUsageFlags2CreateInfoKHR'
--     or 'DescriptorBufferBindingPushDescriptorBufferHandleEXT'
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-sType-unique# The @sType@
--     value of each struct in the @pNext@ chain /must/ be unique
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-usage-parameter# @usage@
--     /must/ be a valid combination of
--     'Vulkan.Core10.Enums.BufferUsageFlagBits.BufferUsageFlagBits' values
--
-- -   #VUID-VkDescriptorBufferBindingInfoEXT-usage-requiredbitmask#
--     @usage@ /must/ not be @0@
--
-- = 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.
    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
Chain ds
BufferUsageFlags
usage :: BufferUsageFlags
address :: DeviceAddress
next :: Chain ds
$sel:usage:DescriptorBufferBindingInfoEXT :: forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> BufferUsageFlags
$sel:address:DescriptorBufferBindingInfoEXT :: forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> DeviceAddress
$sel:next:DescriptorBufferBindingInfoEXT :: forall (es :: [*]). DescriptorBufferBindingInfoEXT es -> Chain es
..} Chain es
next' = DescriptorBufferBindingInfoEXT{$sel:next:DescriptorBufferBindingInfoEXT :: Chain es
next = Chain es
next', DeviceAddress
BufferUsageFlags
usage :: BufferUsageFlags
address :: DeviceAddress
$sel:usage:DescriptorBufferBindingInfoEXT :: BufferUsageFlags
$sel:address:DescriptorBufferBindingInfoEXT :: DeviceAddress
..}
  getNext :: forall (es :: [*]). DescriptorBufferBindingInfoEXT es -> Chain es
getNext DescriptorBufferBindingInfoEXT{DeviceAddress
Chain es
BufferUsageFlags
usage :: BufferUsageFlags
address :: DeviceAddress
next :: Chain es
$sel:usage:DescriptorBufferBindingInfoEXT :: forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> BufferUsageFlags
$sel:address:DescriptorBufferBindingInfoEXT :: forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> DeviceAddress
$sel:next:DescriptorBufferBindingInfoEXT :: forall (es :: [*]). DescriptorBufferBindingInfoEXT es -> Chain es
..} = 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)
eqT @e @DescriptorBufferBindingPushDescriptorBufferHandleEXT = forall a. a -> Maybe a
Just Extends DescriptorBufferBindingInfoEXT e => b
f
    | Just e :~: BufferUsageFlags2CreateInfoKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @BufferUsageFlags2CreateInfoKHR = forall a. a -> Maybe a
Just Extends DescriptorBufferBindingInfoEXT e => b
f
    | Bool
otherwise = 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 = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr (DescriptorBufferBindingInfoEXT es)
p -> 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
Chain es
BufferUsageFlags
usage :: BufferUsageFlags
address :: DeviceAddress
next :: Chain es
$sel:usage:DescriptorBufferBindingInfoEXT :: forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> BufferUsageFlags
$sel:address:DescriptorBufferBindingInfoEXT :: forall (es :: [*]).
DescriptorBufferBindingInfoEXT es -> DeviceAddress
$sel:next:DescriptorBufferBindingInfoEXT :: forall (es :: [*]). DescriptorBufferBindingInfoEXT es -> Chain es
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DescriptorBufferBindingInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT)
    "descriptor" ::: Ptr ()
pNext'' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DescriptorBufferBindingInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) "descriptor" ::: Ptr ()
pNext''
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DescriptorBufferBindingInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceAddress)) (DeviceAddress
address)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DescriptorBufferBindingInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr BufferUsageFlags)) (BufferUsageFlags
usage)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
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 = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DescriptorBufferBindingInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT)
    "descriptor" ::: Ptr ()
pNext' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DescriptorBufferBindingInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) "descriptor" ::: Ptr ()
pNext'
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DescriptorBufferBindingInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceAddress)) (forall a. Zero a => a
zero)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DescriptorBufferBindingInfoEXT es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr BufferUsageFlags)) (forall a. Zero a => a
zero)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f

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

instance es ~ '[] => Zero (DescriptorBufferBindingInfoEXT es) where
  zero :: DescriptorBufferBindingInfoEXT es
zero = forall (es :: [*]).
Chain es
-> DeviceAddress
-> BufferUsageFlags
-> DescriptorBufferBindingInfoEXT es
DescriptorBufferBindingInfoEXT
           ()
           forall a. Zero a => a
zero
           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/1.3-extensions/html/vkspec.html#limits-bufferlessPushDescriptors ::bufferlessPushDescriptors>
--     /must/ be 'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- == 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'
data DescriptorBufferBindingPushDescriptorBufferHandleEXT = DescriptorBufferBindingPushDescriptorBufferHandleEXT
  { -- | #VUID-VkDescriptorBufferBindingPushDescriptorBufferHandleEXT-buffer-parameter#
    -- @buffer@ /must/ be a valid 'Vulkan.Core10.Handles.Buffer' handle
    DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Buffer
buffer :: Buffer }
  deriving (Typeable, DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Bool
$c/= :: DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Bool
== :: DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Bool
$c== :: 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 = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p -> 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 :: Buffer
$sel:buffer:DescriptorBufferBindingPushDescriptorBufferHandleEXT :: DescriptorBufferBindingPushDescriptorBufferHandleEXT -> Buffer
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p 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
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr 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
buffer <- forall a. Storable a => Ptr a -> IO a
peek @Buffer ((Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Buffer -> DescriptorBufferBindingPushDescriptorBufferHandleEXT
DescriptorBufferBindingPushDescriptorBufferHandleEXT
             Buffer
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 = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
-> DescriptorBufferBindingPushDescriptorBufferHandleEXT -> IO ()
poke Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
ptr DescriptorBufferBindingPushDescriptorBufferHandleEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero DescriptorBufferBindingPushDescriptorBufferHandleEXT where
  zero :: DescriptorBufferBindingPushDescriptorBufferHandleEXT
zero = Buffer -> DescriptorBufferBindingPushDescriptorBufferHandleEXT
DescriptorBufferBindingPushDescriptorBufferHandleEXT
           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-08024# 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 an address within a
--     'Vulkan.Core10.Handles.Buffer' created on @device@
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-08025# 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 an address within a
--     'Vulkan.Core10.Handles.Buffer' created on @device@
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-08026# 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 an address within a
--     'Vulkan.Core10.Handles.Buffer' created on @device@
--
-- -   #VUID-VkDescriptorGetInfoEXT-type-08027# 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 an address within a
--     'Vulkan.Core10.Handles.Buffer' created on @device@
--
-- -   #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'
--
-- == 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@
--
-- -   #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
--
-- = 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 = DescriptorGetInfoEXT
  { -- | @type@ is the type of descriptor to get.
    DescriptorGetInfoEXT -> DescriptorType
type' :: DescriptorType
  , -- | @data@ is a structure containing the information needed to get the
    -- descriptor.
    DescriptorGetInfoEXT -> DescriptorDataEXT
data' :: DescriptorDataEXT
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DescriptorGetInfoEXT)
#endif
deriving instance Show DescriptorGetInfoEXT

instance ToCStruct DescriptorGetInfoEXT where
  withCStruct :: forall b.
DescriptorGetInfoEXT
-> (("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT) -> IO b)
-> IO b
withCStruct DescriptorGetInfoEXT
x ("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \"pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p DescriptorGetInfoEXT
x (("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT) -> IO b
f "pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p)
  pokeCStruct :: forall b.
("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT)
-> DescriptorGetInfoEXT -> IO b -> IO b
pokeCStruct "pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p DescriptorGetInfoEXT{DescriptorType
DescriptorDataEXT
data' :: DescriptorDataEXT
type' :: DescriptorType
$sel:data':DescriptorGetInfoEXT :: DescriptorGetInfoEXT -> DescriptorDataEXT
$sel:type':DescriptorGetInfoEXT :: DescriptorGetInfoEXT -> DescriptorType
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DescriptorType)) (DescriptorType
type')
    forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DescriptorDataEXT)) (DescriptorDataEXT
data') forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT) -> IO b -> IO b
pokeZeroCStruct "pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DescriptorType)) (forall a. Zero a => a
zero)
    forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DescriptorDataEXT)) (forall a. Zero a => a
zero) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f

instance FromCStruct DescriptorGetInfoEXT where
  peekCStruct :: ("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT)
-> IO DescriptorGetInfoEXT
peekCStruct "pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p = do
    DescriptorType
type' <- forall a. Storable a => Ptr a -> IO a
peek @DescriptorType (("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DescriptorType))
    DescriptorDataEXT
data' <- DescriptorType -> Ptr DescriptorDataEXT -> IO DescriptorDataEXT
peekDescriptorDataEXT DescriptorType
type' (("pDescriptorInfo" ::: Ptr DescriptorGetInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DescriptorDataEXT))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ DescriptorType -> DescriptorDataEXT -> DescriptorGetInfoEXT
DescriptorGetInfoEXT
             DescriptorType
type' DescriptorDataEXT
data'

instance Zero DescriptorGetInfoEXT where
  zero :: DescriptorGetInfoEXT
zero = DescriptorType -> DescriptorDataEXT -> DescriptorGetInfoEXT
DescriptorGetInfoEXT
           forall a. Zero a => a
zero
           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
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> Bool
$c/= :: BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> Bool
== :: BufferCaptureDescriptorDataInfoEXT
-> BufferCaptureDescriptorDataInfoEXT -> Bool
$c== :: 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
-> (("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT) -> IO b)
-> IO b
withCStruct BufferCaptureDescriptorDataInfoEXT
x ("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT
p BufferCaptureDescriptorDataInfoEXT
x (("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT) -> IO b
f "pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT
p)
  pokeCStruct :: forall b.
("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT)
-> BufferCaptureDescriptorDataInfoEXT -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT
p BufferCaptureDescriptorDataInfoEXT{Buffer
buffer :: Buffer
$sel:buffer:BufferCaptureDescriptorDataInfoEXT :: BufferCaptureDescriptorDataInfoEXT -> Buffer
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT
p 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.
("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT)
-> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr BufferCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer)) (forall a. Zero a => a
zero)
    IO b
f

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

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

instance Zero BufferCaptureDescriptorDataInfoEXT where
  zero :: BufferCaptureDescriptorDataInfoEXT
zero = Buffer -> BufferCaptureDescriptorDataInfoEXT
BufferCaptureDescriptorDataInfoEXT
           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
    -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.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
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> Bool
$c/= :: ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> Bool
== :: ImageCaptureDescriptorDataInfoEXT
-> ImageCaptureDescriptorDataInfoEXT -> Bool
$c== :: 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
-> (("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT) -> IO b)
-> IO b
withCStruct ImageCaptureDescriptorDataInfoEXT
x ("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT
p ImageCaptureDescriptorDataInfoEXT
x (("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT) -> IO b
f "pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT
p)
  pokeCStruct :: forall b.
("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT)
-> ImageCaptureDescriptorDataInfoEXT -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT
p ImageCaptureDescriptorDataInfoEXT{Image
image :: Image
$sel:image:ImageCaptureDescriptorDataInfoEXT :: ImageCaptureDescriptorDataInfoEXT -> Image
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT
p 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.
("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT) -> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ImageCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Image)) (forall a. Zero a => a
zero)
    IO b
f

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

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

instance Zero ImageCaptureDescriptorDataInfoEXT where
  zero :: ImageCaptureDescriptorDataInfoEXT
zero = Image -> ImageCaptureDescriptorDataInfoEXT
ImageCaptureDescriptorDataInfoEXT
           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
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> Bool
$c/= :: ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> Bool
== :: ImageViewCaptureDescriptorDataInfoEXT
-> ImageViewCaptureDescriptorDataInfoEXT -> Bool
$c== :: 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
-> (("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT)
    -> IO b)
-> IO b
withCStruct ImageViewCaptureDescriptorDataInfoEXT
x ("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT
p ImageViewCaptureDescriptorDataInfoEXT
x (("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT) -> IO b
f "pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT
p)
  pokeCStruct :: forall b.
("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT)
-> ImageViewCaptureDescriptorDataInfoEXT -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT
p ImageViewCaptureDescriptorDataInfoEXT{ImageView
imageView :: ImageView
$sel:imageView:ImageViewCaptureDescriptorDataInfoEXT :: ImageViewCaptureDescriptorDataInfoEXT -> ImageView
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT
p 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.
("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT)
-> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr ImageViewCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ImageView)) (forall a. Zero a => a
zero)
    IO b
f

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

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

instance Zero ImageViewCaptureDescriptorDataInfoEXT where
  zero :: ImageViewCaptureDescriptorDataInfoEXT
zero = ImageView -> ImageViewCaptureDescriptorDataInfoEXT
ImageViewCaptureDescriptorDataInfoEXT
           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
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> Bool
$c/= :: SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> Bool
== :: SamplerCaptureDescriptorDataInfoEXT
-> SamplerCaptureDescriptorDataInfoEXT -> Bool
$c== :: 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
-> (("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT) -> IO b)
-> IO b
withCStruct SamplerCaptureDescriptorDataInfoEXT
x ("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT
p SamplerCaptureDescriptorDataInfoEXT
x (("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT) -> IO b
f "pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT
p)
  pokeCStruct :: forall b.
("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT)
-> SamplerCaptureDescriptorDataInfoEXT -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT
p SamplerCaptureDescriptorDataInfoEXT{Sampler
sampler :: Sampler
$sel:sampler:SamplerCaptureDescriptorDataInfoEXT :: SamplerCaptureDescriptorDataInfoEXT -> Sampler
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT
p 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.
("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT)
-> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr SamplerCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Sampler)) (forall a. Zero a => a
zero)
    IO b
f

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

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

instance Zero SamplerCaptureDescriptorDataInfoEXT where
  zero :: SamplerCaptureDescriptorDataInfoEXT
zero = Sampler -> SamplerCaptureDescriptorDataInfoEXT
SamplerCaptureDescriptorDataInfoEXT
           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
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT -> Bool
$c/= :: AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT -> Bool
== :: AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureCaptureDescriptorDataInfoEXT -> Bool
$c== :: 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
-> (("pInfo"
     ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
    -> IO b)
-> IO b
withCStruct AccelerationStructureCaptureDescriptorDataInfoEXT
x ("pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
-> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p AccelerationStructureCaptureDescriptorDataInfoEXT
x (("pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
-> IO b
f "pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p)
  pokeCStruct :: forall b.
("pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
-> AccelerationStructureCaptureDescriptorDataInfoEXT
-> IO b
-> IO b
pokeCStruct "pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p AccelerationStructureCaptureDescriptorDataInfoEXT{AccelerationStructureNV
AccelerationStructureKHR
accelerationStructureNV :: AccelerationStructureNV
accelerationStructure :: AccelerationStructureKHR
$sel:accelerationStructureNV:AccelerationStructureCaptureDescriptorDataInfoEXT :: AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureNV
$sel:accelerationStructure:AccelerationStructureCaptureDescriptorDataInfoEXT :: AccelerationStructureCaptureDescriptorDataInfoEXT
-> AccelerationStructureKHR
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
accelerationStructure)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p 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.
("pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT)
-> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureCaptureDescriptorDataInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    IO b
f

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

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

instance Zero AccelerationStructureCaptureDescriptorDataInfoEXT where
  zero :: AccelerationStructureCaptureDescriptorDataInfoEXT
zero = AccelerationStructureKHR
-> AccelerationStructureNV
-> AccelerationStructureCaptureDescriptorDataInfoEXT
AccelerationStructureCaptureDescriptorDataInfoEXT
           forall a. Zero a => a
zero
           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_NV_ray_tracing.AccelerationStructureCreateInfoNV'
-- or
-- 'Vulkan.Extensions.VK_KHR_acceleration_structure.AccelerationStructureCreateInfoKHR'
-- structure.
--
-- == 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 a user-allocated buffer
    -- containing opaque capture data retrieved using
    -- 'getBufferOpaqueCaptureDescriptorDataEXT',
    -- 'getImageOpaqueCaptureDescriptorDataEXT',
    -- 'getImageViewOpaqueCaptureDescriptorDataEXT',
    -- '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 = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p -> 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 :: "descriptor" ::: Ptr ()
$sel:opaqueCaptureDescriptorData:OpaqueCaptureDescriptorDataCreateInfoEXT :: OpaqueCaptureDescriptorDataCreateInfoEXT -> "descriptor" ::: Ptr ()
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p 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
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr ()))) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct OpaqueCaptureDescriptorDataCreateInfoEXT where
  peekCStruct :: Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> IO OpaqueCaptureDescriptorDataCreateInfoEXT
peekCStruct Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p = do
    "descriptor" ::: Ptr ()
opaqueCaptureDescriptorData <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr ())))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("descriptor" ::: Ptr ())
-> OpaqueCaptureDescriptorDataCreateInfoEXT
OpaqueCaptureDescriptorDataCreateInfoEXT
             "descriptor" ::: Ptr ()
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 = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
-> OpaqueCaptureDescriptorDataCreateInfoEXT -> IO ()
poke Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
ptr OpaqueCaptureDescriptorDataCreateInfoEXT
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr OpaqueCaptureDescriptorDataCreateInfoEXT
ptr OpaqueCaptureDescriptorDataCreateInfoEXT
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero OpaqueCaptureDescriptorDataCreateInfoEXT where
  zero :: OpaqueCaptureDescriptorDataCreateInfoEXT
zero = ("descriptor" ::: Ptr ())
-> OpaqueCaptureDescriptorDataCreateInfoEXT
OpaqueCaptureDescriptorDataCreateInfoEXT
           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
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescriptorDataEXT] -> ShowS
$cshowList :: [DescriptorDataEXT] -> ShowS
show :: DescriptorDataEXT -> String
$cshow :: DescriptorDataEXT -> String
showsPrec :: Int -> DescriptorDataEXT -> ShowS
$cshowsPrec :: Int -> 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 = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
8 forall a b. (a -> b) -> a -> b
$ \Ptr DescriptorDataEXT
p -> 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 = (forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. a -> b -> a
const) forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
ContT r m a -> (a -> m r) -> m r
runContT forall b c a. (b -> c) -> (a -> b) -> a -> c
.  \case
    ASampler Sampler
v -> do
      Ptr Sampler
pSampler <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with (Sampler
v)
      forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr Sampler) Ptr DescriptorDataEXT
p) Ptr Sampler
pSampler
    ACombinedImageSampler DescriptorImageInfo
v -> do
      Ptr DescriptorImageInfo
pCombinedImageSampler <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DescriptorImageInfo
v)
      forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorImageInfo) Ptr DescriptorDataEXT
p) Ptr DescriptorImageInfo
pCombinedImageSampler
    AnInputAttachmentImage DescriptorImageInfo
v -> do
      Ptr DescriptorImageInfo
pInputAttachmentImage <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DescriptorImageInfo
v)
      forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorImageInfo) Ptr DescriptorDataEXT
p) Ptr DescriptorImageInfo
pInputAttachmentImage
    ASampledImage Maybe DescriptorImageInfo
v -> do
      Ptr DescriptorImageInfo
pSampledImage <- case (Maybe DescriptorImageInfo
v) of
        Maybe DescriptorImageInfo
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
        Just DescriptorImageInfo
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DescriptorImageInfo
j)
      forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorImageInfo) Ptr DescriptorDataEXT
p) Ptr DescriptorImageInfo
pSampledImage
    AStorageImage Maybe DescriptorImageInfo
v -> do
      Ptr DescriptorImageInfo
pStorageImage <- case (Maybe DescriptorImageInfo
v) of
        Maybe DescriptorImageInfo
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
        Just DescriptorImageInfo
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DescriptorImageInfo
j)
      forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorImageInfo) Ptr DescriptorDataEXT
p) Ptr DescriptorImageInfo
pStorageImage
    AnUniformTexelBuffer Maybe DescriptorAddressInfoEXT
v -> do
      Ptr DescriptorAddressInfoEXT
pUniformTexelBuffer <- case (Maybe DescriptorAddressInfoEXT
v) of
        Maybe DescriptorAddressInfoEXT
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
        Just DescriptorAddressInfoEXT
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DescriptorAddressInfoEXT
j)
      forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorAddressInfoEXT) Ptr DescriptorDataEXT
p) Ptr DescriptorAddressInfoEXT
pUniformTexelBuffer
    AStorageTexelBuffer Maybe DescriptorAddressInfoEXT
v -> do
      Ptr DescriptorAddressInfoEXT
pStorageTexelBuffer <- case (Maybe DescriptorAddressInfoEXT
v) of
        Maybe DescriptorAddressInfoEXT
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
        Just DescriptorAddressInfoEXT
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DescriptorAddressInfoEXT
j)
      forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorAddressInfoEXT) Ptr DescriptorDataEXT
p) Ptr DescriptorAddressInfoEXT
pStorageTexelBuffer
    AnUniformBuffer Maybe DescriptorAddressInfoEXT
v -> do
      Ptr DescriptorAddressInfoEXT
pUniformBuffer <- case (Maybe DescriptorAddressInfoEXT
v) of
        Maybe DescriptorAddressInfoEXT
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
        Just DescriptorAddressInfoEXT
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DescriptorAddressInfoEXT
j)
      forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorAddressInfoEXT) Ptr DescriptorDataEXT
p) Ptr DescriptorAddressInfoEXT
pUniformBuffer
    AStorageBuffer Maybe DescriptorAddressInfoEXT
v -> do
      Ptr DescriptorAddressInfoEXT
pStorageBuffer <- case (Maybe DescriptorAddressInfoEXT
v) of
        Maybe DescriptorAddressInfoEXT
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
        Just DescriptorAddressInfoEXT
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DescriptorAddressInfoEXT
j)
      forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr DescriptorAddressInfoEXT) Ptr DescriptorDataEXT
p) Ptr DescriptorAddressInfoEXT
pStorageBuffer
    AnAccelerationStructure DeviceAddress
v -> forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ 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 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 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (forall a. Storable a => Ptr a -> IO a
peek @Sampler forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< 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 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorImageInfo forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< 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 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorImageInfo forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< 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 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
    Ptr DescriptorImageInfo
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)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr DescriptorImageInfo
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorImageInfo (Ptr DescriptorImageInfo
j)) Ptr DescriptorImageInfo
pSampledImage)
  DescriptorType
DESCRIPTOR_TYPE_STORAGE_IMAGE -> Maybe DescriptorImageInfo -> DescriptorDataEXT
AStorageImage forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
    Ptr DescriptorImageInfo
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)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr DescriptorImageInfo
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorImageInfo (Ptr DescriptorImageInfo
j)) Ptr DescriptorImageInfo
pStorageImage)
  DescriptorType
DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER -> Maybe DescriptorAddressInfoEXT -> DescriptorDataEXT
AnUniformTexelBuffer forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
    Ptr DescriptorAddressInfoEXT
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)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr DescriptorAddressInfoEXT
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorAddressInfoEXT (Ptr DescriptorAddressInfoEXT
j)) Ptr DescriptorAddressInfoEXT
pUniformTexelBuffer)
  DescriptorType
DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER -> Maybe DescriptorAddressInfoEXT -> DescriptorDataEXT
AStorageTexelBuffer forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
    Ptr DescriptorAddressInfoEXT
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)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr DescriptorAddressInfoEXT
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorAddressInfoEXT (Ptr DescriptorAddressInfoEXT
j)) Ptr DescriptorAddressInfoEXT
pStorageTexelBuffer)
  DescriptorType
DESCRIPTOR_TYPE_UNIFORM_BUFFER -> Maybe DescriptorAddressInfoEXT -> DescriptorDataEXT
AnUniformBuffer forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
    Ptr DescriptorAddressInfoEXT
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)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr DescriptorAddressInfoEXT
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorAddressInfoEXT (Ptr DescriptorAddressInfoEXT
j)) Ptr DescriptorAddressInfoEXT
pUniformBuffer)
  DescriptorType
DESCRIPTOR_TYPE_STORAGE_BUFFER -> Maybe DescriptorAddressInfoEXT -> DescriptorDataEXT
AStorageBuffer forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
    Ptr DescriptorAddressInfoEXT
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)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr DescriptorAddressInfoEXT
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @DescriptorAddressInfoEXT (Ptr DescriptorAddressInfoEXT
j)) Ptr DescriptorAddressInfoEXT
pStorageBuffer)
  DescriptorType
DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR -> DeviceAddress -> DescriptorDataEXT
AnAccelerationStructure 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 $bEXT_DESCRIPTOR_BUFFER_SPEC_VERSION :: forall a. Integral a => a
$mEXT_DESCRIPTOR_BUFFER_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
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 $bEXT_DESCRIPTOR_BUFFER_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_DESCRIPTOR_BUFFER_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME = "VK_EXT_descriptor_buffer"