{-# language CPP #-}
-- No documentation found for Chapter "Pipeline"
module Vulkan.Core10.Pipeline  ( createGraphicsPipelines
                               , withGraphicsPipelines
                               , createComputePipelines
                               , withComputePipelines
                               , destroyPipeline
                               , Viewport(..)
                               , SpecializationMapEntry(..)
                               , SpecializationInfo(..)
                               , PipelineShaderStageCreateInfo(..)
                               , ComputePipelineCreateInfo(..)
                               , VertexInputBindingDescription(..)
                               , VertexInputAttributeDescription(..)
                               , PipelineVertexInputStateCreateInfo(..)
                               , PipelineInputAssemblyStateCreateInfo(..)
                               , PipelineTessellationStateCreateInfo(..)
                               , PipelineViewportStateCreateInfo(..)
                               , PipelineRasterizationStateCreateInfo(..)
                               , PipelineMultisampleStateCreateInfo(..)
                               , PipelineColorBlendAttachmentState(..)
                               , PipelineColorBlendStateCreateInfo(..)
                               , PipelineDynamicStateCreateInfo(..)
                               , StencilOpState(..)
                               , PipelineDepthStencilStateCreateInfo(..)
                               , GraphicsPipelineCreateInfo(..)
                               , Pipeline(..)
                               , PipelineDynamicStateCreateFlags(..)
                               , PipelineMultisampleStateCreateFlags(..)
                               , PipelineRasterizationStateCreateFlags(..)
                               , PipelineViewportStateCreateFlags(..)
                               , PipelineTessellationStateCreateFlags(..)
                               , PipelineInputAssemblyStateCreateFlags(..)
                               , PipelineVertexInputStateCreateFlags(..)
                               , PrimitiveTopology(..)
                               , CompareOp(..)
                               , PolygonMode(..)
                               , FrontFace(..)
                               , BlendFactor(..)
                               , BlendOp(..)
                               , StencilOp(..)
                               , LogicOp(..)
                               , VertexInputRate(..)
                               , DynamicState(..)
                               , CullModeFlagBits(..)
                               , CullModeFlags
                               , ShaderStageFlagBits(..)
                               , ShaderStageFlags
                               , PipelineCreateFlagBits(..)
                               , PipelineCreateFlags
                               , PipelineShaderStageCreateFlagBits(..)
                               , PipelineShaderStageCreateFlags
                               , ColorComponentFlagBits(..)
                               , ColorComponentFlags
                               , PipelineLayoutCreateFlagBits(..)
                               , PipelineLayoutCreateFlags
                               , PipelineColorBlendStateCreateFlagBits(..)
                               , PipelineColorBlendStateCreateFlags
                               , PipelineDepthStencilStateCreateFlagBits(..)
                               , PipelineDepthStencilStateCreateFlags
                               , SampleMask
                               ) where

import Vulkan.CStruct.Utils (FixedArray)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Foldable (traverse_)
import Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import Foreign.Marshal.Utils (maybePeek)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import qualified Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Data.ByteString (packCString)
import Data.ByteString (useAsCString)
import Data.Coerce (coerce)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import qualified Data.Vector (null)
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.Type.Equality ((:~:)(Refl))
import Data.Typeable (Typeable)
import Foreign.C.Types (CChar)
import Foreign.C.Types (CFloat)
import Foreign.C.Types (CFloat(..))
import Foreign.C.Types (CFloat(CFloat))
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 Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import Data.Word (Word32)
import Data.Word (Word64)
import Data.ByteString (ByteString)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.CStruct.Utils (lowerArrayPtr)
import Vulkan.CStruct.Extends (peekSomeCStruct)
import Vulkan.CStruct.Extends (pokeSomeCStruct)
import Vulkan.CStruct.Extends (withSomeCStruct)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_dynamic_rendering (AttachmentSampleCountInfoAMD)
import Vulkan.Core10.Enums.BlendFactor (BlendFactor)
import Vulkan.Core10.Enums.BlendOp (BlendOp)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.CStruct.Extends (Chain)
import Vulkan.Core10.Enums.ColorComponentFlagBits (ColorComponentFlags)
import Vulkan.Core10.Enums.CompareOp (CompareOp)
import Vulkan.Core10.Enums.CullModeFlagBits (CullModeFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_debug_utils (DebugUtilsObjectNameInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_depth_bias_control (DepthBiasRepresentationInfoEXT)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Dynamic (DeviceCmds(pVkCreateComputePipelines))
import Vulkan.Dynamic (DeviceCmds(pVkCreateGraphicsPipelines))
import Vulkan.Dynamic (DeviceCmds(pVkDestroyPipeline))
import Vulkan.Core10.Handles (Device_T)
import Vulkan.Core10.Enums.DynamicState (DynamicState)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import {-# SOURCE #-} Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer (ExternalFormatANDROID)
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.Core10.Enums.FrontFace (FrontFace)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_graphics_pipeline_library (GraphicsPipelineLibraryCreateInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_device_generated_commands (GraphicsPipelineShaderGroupsCreateInfoNV)
import Vulkan.Core10.Enums.LogicOp (LogicOp)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_dynamic_rendering (MultiviewPerViewAttributesInfoNVX)
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PeekChain(..))
import Vulkan.Core10.Handles (Pipeline)
import Vulkan.Core10.Handles (Pipeline(..))
import Vulkan.Core10.Handles (PipelineCache)
import Vulkan.Core10.Handles (PipelineCache(..))
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_blend_operation_advanced (PipelineColorBlendAdvancedStateCreateInfoEXT)
import Vulkan.Core10.Enums.PipelineColorBlendStateCreateFlagBits (PipelineColorBlendStateCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_color_write_enable (PipelineColorWriteCreateInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_AMD_pipeline_compiler_control (PipelineCompilerControlCreateInfoAMD)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_framebuffer_mixed_samples (PipelineCoverageModulationStateCreateInfoNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_coverage_reduction_mode (PipelineCoverageReductionStateCreateInfoNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_fragment_coverage_to_color (PipelineCoverageToColorStateCreateInfoNV)
import Vulkan.Core10.Enums.PipelineCreateFlagBits (PipelineCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_maintenance5 (PipelineCreateFlags2CreateInfoKHR)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_EXT_pipeline_creation_feedback (PipelineCreationFeedbackCreateInfo)
import Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits (PipelineDepthStencilStateCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_discard_rectangles (PipelineDiscardRectangleStateCreateInfoEXT)
import Vulkan.Core10.Enums.PipelineDynamicStateCreateFlags (PipelineDynamicStateCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_fragment_shading_rate_enums (PipelineFragmentShadingRateEnumStateCreateInfoNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_fragment_shading_rate (PipelineFragmentShadingRateStateCreateInfoKHR)
import Vulkan.Core10.Enums.PipelineInputAssemblyStateCreateFlags (PipelineInputAssemblyStateCreateFlags)
import Vulkan.Core10.Handles (PipelineLayout)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_pipeline_library (PipelineLibraryCreateInfoKHR)
import Vulkan.Core10.Enums.PipelineMultisampleStateCreateFlags (PipelineMultisampleStateCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_conservative_rasterization (PipelineRasterizationConservativeStateCreateInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_depth_clip_enable (PipelineRasterizationDepthClipStateCreateInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_line_rasterization (PipelineRasterizationLineStateCreateInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_provoking_vertex (PipelineRasterizationProvokingVertexStateCreateInfoEXT)
import Vulkan.Core10.Enums.PipelineRasterizationStateCreateFlags (PipelineRasterizationStateCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_AMD_rasterization_order (PipelineRasterizationStateRasterizationOrderAMD)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_transform_feedback (PipelineRasterizationStateStreamCreateInfoEXT)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering (PipelineRenderingCreateInfo)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_representative_fragment_test (PipelineRepresentativeFragmentTestStateCreateInfoNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_pipeline_robustness (PipelineRobustnessCreateInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_sample_locations (PipelineSampleLocationsStateCreateInfoEXT)
import Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits (PipelineShaderStageCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_shader_module_identifier (PipelineShaderStageModuleIdentifierCreateInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_AMDX_shader_enqueue (PipelineShaderStageNodeCreateInfoAMDX)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_EXT_subgroup_size_control (PipelineShaderStageRequiredSubgroupSizeCreateInfo)
import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_maintenance2 (PipelineTessellationDomainOriginStateCreateInfo)
import Vulkan.Core10.Enums.PipelineTessellationStateCreateFlags (PipelineTessellationStateCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_vertex_attribute_divisor (PipelineVertexInputDivisorStateCreateInfoEXT)
import Vulkan.Core10.Enums.PipelineVertexInputStateCreateFlags (PipelineVertexInputStateCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_shading_rate_image (PipelineViewportCoarseSampleOrderStateCreateInfoNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_depth_clip_control (PipelineViewportDepthClipControlCreateInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_scissor_exclusive (PipelineViewportExclusiveScissorStateCreateInfoNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_shading_rate_image (PipelineViewportShadingRateImageStateCreateInfoNV)
import Vulkan.Core10.Enums.PipelineViewportStateCreateFlags (PipelineViewportStateCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_viewport_swizzle (PipelineViewportSwizzleStateCreateInfoNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_clip_space_w_scaling (PipelineViewportWScalingStateCreateInfoNV)
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import Vulkan.Core10.Enums.PolygonMode (PolygonMode)
import Vulkan.Core10.Enums.PrimitiveTopology (PrimitiveTopology)
import Vulkan.Core10.FundamentalTypes (Rect2D)
import Vulkan.Core10.Handles (RenderPass)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.SampleCountFlagBits (SampleCountFlagBits)
import Vulkan.Core10.Enums.SampleCountFlagBits (SampleCountFlagBits(SampleCountFlagBits))
import Vulkan.Core10.FundamentalTypes (SampleMask)
import Vulkan.Core10.Handles (ShaderModule)
import {-# SOURCE #-} Vulkan.Core10.Shader (ShaderModuleCreateInfo)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_validation_cache (ShaderModuleValidationCacheCreateInfoEXT)
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlagBits)
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.CStruct.Extends (SomeStruct(..))
import Vulkan.Core10.Enums.StencilOp (StencilOp)
import Vulkan.Core10.Enums.StructureType (StructureType)
import {-# SOURCE #-} Vulkan.Extensions.VK_HUAWEI_subpass_shading (SubpassShadingPipelineCreateInfoHUAWEI)
import Vulkan.Core10.Enums.VertexInputRate (VertexInputRate)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Core10.Enums.BlendFactor (BlendFactor(..))
import Vulkan.Core10.Enums.BlendOp (BlendOp(..))
import Vulkan.Core10.Enums.ColorComponentFlagBits (ColorComponentFlagBits(..))
import Vulkan.Core10.Enums.ColorComponentFlagBits (ColorComponentFlags)
import Vulkan.Core10.Enums.CompareOp (CompareOp(..))
import Vulkan.Core10.Enums.CullModeFlagBits (CullModeFlagBits(..))
import Vulkan.Core10.Enums.CullModeFlagBits (CullModeFlags)
import Vulkan.Core10.Enums.DynamicState (DynamicState(..))
import Vulkan.Core10.Enums.FrontFace (FrontFace(..))
import Vulkan.Core10.Enums.LogicOp (LogicOp(..))
import Vulkan.Core10.Handles (Pipeline(..))
import Vulkan.Core10.Enums.PipelineColorBlendStateCreateFlagBits (PipelineColorBlendStateCreateFlagBits(..))
import Vulkan.Core10.Enums.PipelineColorBlendStateCreateFlagBits (PipelineColorBlendStateCreateFlags)
import Vulkan.Core10.Enums.PipelineCreateFlagBits (PipelineCreateFlagBits(..))
import Vulkan.Core10.Enums.PipelineCreateFlagBits (PipelineCreateFlags)
import Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits (PipelineDepthStencilStateCreateFlagBits(..))
import Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits (PipelineDepthStencilStateCreateFlags)
import Vulkan.Core10.Enums.PipelineDynamicStateCreateFlags (PipelineDynamicStateCreateFlags(..))
import Vulkan.Core10.Enums.PipelineInputAssemblyStateCreateFlags (PipelineInputAssemblyStateCreateFlags(..))
import Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits (PipelineLayoutCreateFlagBits(..))
import Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits (PipelineLayoutCreateFlags)
import Vulkan.Core10.Enums.PipelineMultisampleStateCreateFlags (PipelineMultisampleStateCreateFlags(..))
import Vulkan.Core10.Enums.PipelineRasterizationStateCreateFlags (PipelineRasterizationStateCreateFlags(..))
import Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits (PipelineShaderStageCreateFlagBits(..))
import Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits (PipelineShaderStageCreateFlags)
import Vulkan.Core10.Enums.PipelineTessellationStateCreateFlags (PipelineTessellationStateCreateFlags(..))
import Vulkan.Core10.Enums.PipelineVertexInputStateCreateFlags (PipelineVertexInputStateCreateFlags(..))
import Vulkan.Core10.Enums.PipelineViewportStateCreateFlags (PipelineViewportStateCreateFlags(..))
import Vulkan.Core10.Enums.PolygonMode (PolygonMode(..))
import Vulkan.Core10.Enums.PrimitiveTopology (PrimitiveTopology(..))
import Vulkan.Core10.FundamentalTypes (SampleMask)
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlagBits(..))
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)
import Vulkan.Core10.Enums.StencilOp (StencilOp(..))
import Vulkan.Core10.Enums.VertexInputRate (VertexInputRate(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCreateGraphicsPipelines
  :: FunPtr (Ptr Device_T -> PipelineCache -> Word32 -> Ptr (SomeStruct GraphicsPipelineCreateInfo) -> Ptr AllocationCallbacks -> Ptr Pipeline -> IO Result) -> Ptr Device_T -> PipelineCache -> Word32 -> Ptr (SomeStruct GraphicsPipelineCreateInfo) -> Ptr AllocationCallbacks -> Ptr Pipeline -> IO Result

-- | vkCreateGraphicsPipelines - Create graphics pipelines
--
-- = Description
--
-- The 'GraphicsPipelineCreateInfo' structure includes an array of
-- 'PipelineShaderStageCreateInfo' structures for each of the desired
-- active shader stages, as well as creation information for all relevant
-- fixed-function stages, and a pipeline layout.
--
-- == Valid Usage
--
-- -   #VUID-vkCreateGraphicsPipelines-flags-00720# If the @flags@ member
--     of any element of @pCreateInfos@ contains the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, and the @basePipelineIndex@ member of that same element is not
--     @-1@, @basePipelineIndex@ /must/ be less than the index into
--     @pCreateInfos@ that corresponds to that element
--
-- -   #VUID-vkCreateGraphicsPipelines-flags-00721# If the @flags@ member
--     of any element of @pCreateInfos@ contains the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, the base pipeline /must/ have been created with the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT'
--     flag set
--
-- -   #VUID-vkCreateGraphicsPipelines-pipelineCache-02876# If
--     @pipelineCache@ was created with
--     'Vulkan.Core10.Enums.PipelineCacheCreateFlagBits.PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT',
--     host access to @pipelineCache@ /must/ be
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fundamentals-threadingbehavior externally synchronized>
--
-- Note
--
-- An implicit cache may be provided by the implementation or a layer. For
-- this reason, it is still valid to set
-- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT'
-- on @flags@ for any element of @pCreateInfos@ while passing
-- 'Vulkan.Core10.APIConstants.NULL_HANDLE' for @pipelineCache@.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCreateGraphicsPipelines-device-parameter# @device@ /must/ be
--     a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkCreateGraphicsPipelines-pipelineCache-parameter# If
--     @pipelineCache@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @pipelineCache@ /must/ be a valid
--     'Vulkan.Core10.Handles.PipelineCache' handle
--
-- -   #VUID-vkCreateGraphicsPipelines-pCreateInfos-parameter#
--     @pCreateInfos@ /must/ be a valid pointer to an array of
--     @createInfoCount@ valid 'GraphicsPipelineCreateInfo' structures
--
-- -   #VUID-vkCreateGraphicsPipelines-pAllocator-parameter# If
--     @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid pointer
--     to a valid 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'
--     structure
--
-- -   #VUID-vkCreateGraphicsPipelines-pPipelines-parameter# @pPipelines@
--     /must/ be a valid pointer to an array of @createInfoCount@
--     'Vulkan.Core10.Handles.Pipeline' handles
--
-- -   #VUID-vkCreateGraphicsPipelines-createInfoCount-arraylength#
--     @createInfoCount@ /must/ be greater than @0@
--
-- -   #VUID-vkCreateGraphicsPipelines-pipelineCache-parent# If
--     @pipelineCache@ is a valid handle, it /must/ have been created,
--     allocated, or retrieved from @device@
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
--     -   'Vulkan.Extensions.VK_EXT_pipeline_creation_cache_control.PIPELINE_COMPILE_REQUIRED_EXT'
--
-- [<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'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_INVALID_SHADER_NV'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'Vulkan.Core10.Handles.Device', 'GraphicsPipelineCreateInfo',
-- 'Vulkan.Core10.Handles.Pipeline', 'Vulkan.Core10.Handles.PipelineCache'
createGraphicsPipelines :: forall io
                         . (MonadIO io)
                        => -- | @device@ is the logical device that creates the graphics pipelines.
                           Device
                        -> -- | @pipelineCache@ is either 'Vulkan.Core10.APIConstants.NULL_HANDLE',
                           -- indicating that pipeline caching is disabled; or the handle of a valid
                           -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-cache pipeline cache>
                           -- object, in which case use of that cache is enabled for the duration of
                           -- the command.
                           PipelineCache
                        -> -- | @pCreateInfos@ is a pointer to an array of 'GraphicsPipelineCreateInfo'
                           -- structures.
                           ("createInfos" ::: Vector (SomeStruct GraphicsPipelineCreateInfo))
                        -> -- | @pAllocator@ controls host memory allocation as described in the
                           -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#memory-allocation Memory Allocation>
                           -- chapter.
                           ("allocator" ::: Maybe AllocationCallbacks)
                        -> io (Result, ("pipelines" ::: Vector Pipeline))
createGraphicsPipelines :: forall (io :: * -> *).
MonadIO io =>
Device
-> PipelineCache
-> ("createInfos"
    ::: Vector (SomeStruct GraphicsPipelineCreateInfo))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, "pipelines" ::: Vector Pipeline)
createGraphicsPipelines Device
device
                          PipelineCache
pipelineCache
                          "createInfos" ::: Vector (SomeStruct GraphicsPipelineCreateInfo)
createInfos
                          "allocator" ::: Maybe AllocationCallbacks
allocator = 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 vkCreateGraphicsPipelinesPtr :: FunPtr
  (Ptr Device_T
   -> PipelineCache
   -> ("createInfoCount" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (SomeStruct GraphicsPipelineCreateInfo))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
vkCreateGraphicsPipelinesPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> PipelineCache
      -> ("createInfoCount" ::: Word32)
      -> ("pCreateInfos" ::: Ptr (SomeStruct GraphicsPipelineCreateInfo))
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pPipelines" ::: Ptr Pipeline)
      -> IO Result)
pVkCreateGraphicsPipelines (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
   -> PipelineCache
   -> ("createInfoCount" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (SomeStruct GraphicsPipelineCreateInfo))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
vkCreateGraphicsPipelinesPtr 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 vkCreateGraphicsPipelines is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkCreateGraphicsPipelines' :: Ptr Device_T
-> PipelineCache
-> ("createInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (SomeStruct GraphicsPipelineCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
vkCreateGraphicsPipelines' = FunPtr
  (Ptr Device_T
   -> PipelineCache
   -> ("createInfoCount" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (SomeStruct GraphicsPipelineCreateInfo))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
-> Ptr Device_T
-> PipelineCache
-> ("createInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (SomeStruct GraphicsPipelineCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
mkVkCreateGraphicsPipelines FunPtr
  (Ptr Device_T
   -> PipelineCache
   -> ("createInfoCount" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (SomeStruct GraphicsPipelineCreateInfo))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
vkCreateGraphicsPipelinesPtr
  Ptr (GraphicsPipelineCreateInfo Any)
pPCreateInfos <- 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 @(GraphicsPipelineCreateInfo _) ((forall a. Vector a -> Int
Data.Vector.length ("createInfos" ::: Vector (SomeStruct GraphicsPipelineCreateInfo)
createInfos)) forall a. Num a => a -> a -> a
* Int
144)
  forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i SomeStruct GraphicsPipelineCreateInfo
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 (GraphicsPipelineCreateInfo Any)
pPCreateInfos forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
144 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (GraphicsPipelineCreateInfo _))) (SomeStruct GraphicsPipelineCreateInfo
e) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) ("createInfos" ::: Vector (SomeStruct GraphicsPipelineCreateInfo)
createInfos)
  "pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
    "allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
    Just AllocationCallbacks
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 (AllocationCallbacks
j)
  "pPipelines" ::: Ptr Pipeline
pPPipelines <- 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 @Pipeline ((forall a b. (Integral a, Num b) => a -> b
fromIntegral ((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
$ ("createInfos" ::: Vector (SomeStruct GraphicsPipelineCreateInfo)
createInfos)) :: Word32))) forall a. Num a => a -> a -> a
* Int
8)) forall a. Ptr a -> IO ()
free
  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
"vkCreateGraphicsPipelines" (Ptr Device_T
-> PipelineCache
-> ("createInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (SomeStruct GraphicsPipelineCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
vkCreateGraphicsPipelines'
                                                              (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                              (PipelineCache
pipelineCache)
                                                              ((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
$ ("createInfos" ::: Vector (SomeStruct GraphicsPipelineCreateInfo)
createInfos)) :: Word32))
                                                              (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (GraphicsPipelineCreateInfo Any)
pPCreateInfos))
                                                              "pAllocator" ::: Ptr AllocationCallbacks
pAllocator
                                                              ("pPipelines" ::: Ptr Pipeline
pPPipelines))
  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))
  "pipelines" ::: Vector Pipeline
pPipelines <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral ((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
$ ("createInfos" ::: Vector (SomeStruct GraphicsPipelineCreateInfo)
createInfos)) :: Word32))) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Pipeline (("pPipelines" ::: Ptr Pipeline
pPPipelines forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Pipeline)))
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (Result
r, "pipelines" ::: Vector Pipeline
pPipelines)

-- | A convenience wrapper to make a compatible pair of calls to
-- 'createGraphicsPipelines' and 'destroyPipeline'
--
-- To ensure that 'destroyPipeline' is always called: pass
-- 'Control.Exception.bracket' (or the allocate function from your
-- favourite resource management library) as the last argument.
-- To just extract the pair pass '(,)' as the last argument.
--
withGraphicsPipelines :: forall io r . MonadIO io => Device -> PipelineCache -> Vector (SomeStruct GraphicsPipelineCreateInfo) -> Maybe AllocationCallbacks -> (io (Result, Vector Pipeline) -> ((Result, Vector Pipeline) -> io ()) -> r) -> r
withGraphicsPipelines :: forall (io :: * -> *) r.
MonadIO io =>
Device
-> PipelineCache
-> ("createInfos"
    ::: Vector (SomeStruct GraphicsPipelineCreateInfo))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io (Result, "pipelines" ::: Vector Pipeline)
    -> ((Result, "pipelines" ::: Vector Pipeline) -> io ()) -> r)
-> r
withGraphicsPipelines Device
device PipelineCache
pipelineCache "createInfos" ::: Vector (SomeStruct GraphicsPipelineCreateInfo)
pCreateInfos "allocator" ::: Maybe AllocationCallbacks
pAllocator io (Result, "pipelines" ::: Vector Pipeline)
-> ((Result, "pipelines" ::: Vector Pipeline) -> io ()) -> r
b =
  io (Result, "pipelines" ::: Vector Pipeline)
-> ((Result, "pipelines" ::: Vector Pipeline) -> io ()) -> r
b (forall (io :: * -> *).
MonadIO io =>
Device
-> PipelineCache
-> ("createInfos"
    ::: Vector (SomeStruct GraphicsPipelineCreateInfo))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, "pipelines" ::: Vector Pipeline)
createGraphicsPipelines Device
device PipelineCache
pipelineCache "createInfos" ::: Vector (SomeStruct GraphicsPipelineCreateInfo)
pCreateInfos "allocator" ::: Maybe AllocationCallbacks
pAllocator)
    (\(Result
_, "pipelines" ::: Vector Pipeline
o1) -> forall (t :: * -> *) (f :: * -> *) a b.
(Foldable t, Applicative f) =>
(a -> f b) -> t a -> f ()
traverse_ (\Pipeline
o1Elem -> forall (io :: * -> *).
MonadIO io =>
Device
-> Pipeline -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
destroyPipeline Device
device
                                                         Pipeline
o1Elem
                                                         "allocator" ::: Maybe AllocationCallbacks
pAllocator) "pipelines" ::: Vector Pipeline
o1)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCreateComputePipelines
  :: FunPtr (Ptr Device_T -> PipelineCache -> Word32 -> Ptr (SomeStruct ComputePipelineCreateInfo) -> Ptr AllocationCallbacks -> Ptr Pipeline -> IO Result) -> Ptr Device_T -> PipelineCache -> Word32 -> Ptr (SomeStruct ComputePipelineCreateInfo) -> Ptr AllocationCallbacks -> Ptr Pipeline -> IO Result

-- | vkCreateComputePipelines - Creates a new compute pipeline object
--
-- == Valid Usage
--
-- -   #VUID-vkCreateComputePipelines-flags-00695# If the @flags@ member of
--     any element of @pCreateInfos@ contains the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, and the @basePipelineIndex@ member of that same element is not
--     @-1@, @basePipelineIndex@ /must/ be less than the index into
--     @pCreateInfos@ that corresponds to that element
--
-- -   #VUID-vkCreateComputePipelines-flags-00696# If the @flags@ member of
--     any element of @pCreateInfos@ contains the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, the base pipeline /must/ have been created with the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT'
--     flag set
--
-- -   #VUID-vkCreateComputePipelines-pipelineCache-02873# If
--     @pipelineCache@ was created with
--     'Vulkan.Core10.Enums.PipelineCacheCreateFlagBits.PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT',
--     host access to @pipelineCache@ /must/ be
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fundamentals-threadingbehavior externally synchronized>
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCreateComputePipelines-device-parameter# @device@ /must/ be
--     a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkCreateComputePipelines-pipelineCache-parameter# If
--     @pipelineCache@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @pipelineCache@ /must/ be a valid
--     'Vulkan.Core10.Handles.PipelineCache' handle
--
-- -   #VUID-vkCreateComputePipelines-pCreateInfos-parameter#
--     @pCreateInfos@ /must/ be a valid pointer to an array of
--     @createInfoCount@ valid 'ComputePipelineCreateInfo' structures
--
-- -   #VUID-vkCreateComputePipelines-pAllocator-parameter# If @pAllocator@
--     is not @NULL@, @pAllocator@ /must/ be a valid pointer to a valid
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' structure
--
-- -   #VUID-vkCreateComputePipelines-pPipelines-parameter# @pPipelines@
--     /must/ be a valid pointer to an array of @createInfoCount@
--     'Vulkan.Core10.Handles.Pipeline' handles
--
-- -   #VUID-vkCreateComputePipelines-createInfoCount-arraylength#
--     @createInfoCount@ /must/ be greater than @0@
--
-- -   #VUID-vkCreateComputePipelines-pipelineCache-parent# If
--     @pipelineCache@ is a valid handle, it /must/ have been created,
--     allocated, or retrieved from @device@
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
--     -   'Vulkan.Extensions.VK_EXT_pipeline_creation_cache_control.PIPELINE_COMPILE_REQUIRED_EXT'
--
-- [<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'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_INVALID_SHADER_NV'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'ComputePipelineCreateInfo', 'Vulkan.Core10.Handles.Device',
-- 'Vulkan.Core10.Handles.Pipeline', 'Vulkan.Core10.Handles.PipelineCache'
createComputePipelines :: forall io
                        . (MonadIO io)
                       => -- | @device@ is the logical device that creates the compute pipelines.
                          Device
                       -> -- | @pipelineCache@ is either 'Vulkan.Core10.APIConstants.NULL_HANDLE',
                          -- indicating that pipeline caching is disabled; or the handle of a valid
                          -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-cache pipeline cache>
                          -- object, in which case use of that cache is enabled for the duration of
                          -- the command.
                          PipelineCache
                       -> -- | @pCreateInfos@ is a pointer to an array of 'ComputePipelineCreateInfo'
                          -- structures.
                          ("createInfos" ::: Vector (SomeStruct ComputePipelineCreateInfo))
                       -> -- | @pAllocator@ controls host memory allocation as described in the
                          -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#memory-allocation Memory Allocation>
                          -- chapter.
                          ("allocator" ::: Maybe AllocationCallbacks)
                       -> io (Result, ("pipelines" ::: Vector Pipeline))
createComputePipelines :: forall (io :: * -> *).
MonadIO io =>
Device
-> PipelineCache
-> ("createInfos"
    ::: Vector (SomeStruct ComputePipelineCreateInfo))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, "pipelines" ::: Vector Pipeline)
createComputePipelines Device
device
                         PipelineCache
pipelineCache
                         "createInfos" ::: Vector (SomeStruct ComputePipelineCreateInfo)
createInfos
                         "allocator" ::: Maybe AllocationCallbacks
allocator = 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 vkCreateComputePipelinesPtr :: FunPtr
  (Ptr Device_T
   -> PipelineCache
   -> ("createInfoCount" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (SomeStruct ComputePipelineCreateInfo))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
vkCreateComputePipelinesPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> PipelineCache
      -> ("createInfoCount" ::: Word32)
      -> ("pCreateInfos" ::: Ptr (SomeStruct ComputePipelineCreateInfo))
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pPipelines" ::: Ptr Pipeline)
      -> IO Result)
pVkCreateComputePipelines (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
   -> PipelineCache
   -> ("createInfoCount" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (SomeStruct ComputePipelineCreateInfo))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
vkCreateComputePipelinesPtr 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 vkCreateComputePipelines is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkCreateComputePipelines' :: Ptr Device_T
-> PipelineCache
-> ("createInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (SomeStruct ComputePipelineCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
vkCreateComputePipelines' = FunPtr
  (Ptr Device_T
   -> PipelineCache
   -> ("createInfoCount" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (SomeStruct ComputePipelineCreateInfo))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
-> Ptr Device_T
-> PipelineCache
-> ("createInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (SomeStruct ComputePipelineCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
mkVkCreateComputePipelines FunPtr
  (Ptr Device_T
   -> PipelineCache
   -> ("createInfoCount" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (SomeStruct ComputePipelineCreateInfo))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
vkCreateComputePipelinesPtr
  Ptr (ComputePipelineCreateInfo Any)
pPCreateInfos <- 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 @(ComputePipelineCreateInfo _) ((forall a. Vector a -> Int
Data.Vector.length ("createInfos" ::: Vector (SomeStruct ComputePipelineCreateInfo)
createInfos)) forall a. Num a => a -> a -> a
* Int
96)
  forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i SomeStruct ComputePipelineCreateInfo
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 (ComputePipelineCreateInfo Any)
pPCreateInfos forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
96 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (ComputePipelineCreateInfo _))) (SomeStruct ComputePipelineCreateInfo
e) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) ("createInfos" ::: Vector (SomeStruct ComputePipelineCreateInfo)
createInfos)
  "pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
    "allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
    Just AllocationCallbacks
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 (AllocationCallbacks
j)
  "pPipelines" ::: Ptr Pipeline
pPPipelines <- 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 @Pipeline ((forall a b. (Integral a, Num b) => a -> b
fromIntegral ((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
$ ("createInfos" ::: Vector (SomeStruct ComputePipelineCreateInfo)
createInfos)) :: Word32))) forall a. Num a => a -> a -> a
* Int
8)) forall a. Ptr a -> IO ()
free
  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
"vkCreateComputePipelines" (Ptr Device_T
-> PipelineCache
-> ("createInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (SomeStruct ComputePipelineCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
vkCreateComputePipelines'
                                                             (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                             (PipelineCache
pipelineCache)
                                                             ((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
$ ("createInfos" ::: Vector (SomeStruct ComputePipelineCreateInfo)
createInfos)) :: Word32))
                                                             (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (ComputePipelineCreateInfo Any)
pPCreateInfos))
                                                             "pAllocator" ::: Ptr AllocationCallbacks
pAllocator
                                                             ("pPipelines" ::: Ptr Pipeline
pPPipelines))
  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))
  "pipelines" ::: Vector Pipeline
pPipelines <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral ((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
$ ("createInfos" ::: Vector (SomeStruct ComputePipelineCreateInfo)
createInfos)) :: Word32))) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Pipeline (("pPipelines" ::: Ptr Pipeline
pPPipelines forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Pipeline)))
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (Result
r, "pipelines" ::: Vector Pipeline
pPipelines)

-- | A convenience wrapper to make a compatible pair of calls to
-- 'createComputePipelines' and 'destroyPipeline'
--
-- To ensure that 'destroyPipeline' is always called: pass
-- 'Control.Exception.bracket' (or the allocate function from your
-- favourite resource management library) as the last argument.
-- To just extract the pair pass '(,)' as the last argument.
--
withComputePipelines :: forall io r . MonadIO io => Device -> PipelineCache -> Vector (SomeStruct ComputePipelineCreateInfo) -> Maybe AllocationCallbacks -> (io (Result, Vector Pipeline) -> ((Result, Vector Pipeline) -> io ()) -> r) -> r
withComputePipelines :: forall (io :: * -> *) r.
MonadIO io =>
Device
-> PipelineCache
-> ("createInfos"
    ::: Vector (SomeStruct ComputePipelineCreateInfo))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io (Result, "pipelines" ::: Vector Pipeline)
    -> ((Result, "pipelines" ::: Vector Pipeline) -> io ()) -> r)
-> r
withComputePipelines Device
device PipelineCache
pipelineCache "createInfos" ::: Vector (SomeStruct ComputePipelineCreateInfo)
pCreateInfos "allocator" ::: Maybe AllocationCallbacks
pAllocator io (Result, "pipelines" ::: Vector Pipeline)
-> ((Result, "pipelines" ::: Vector Pipeline) -> io ()) -> r
b =
  io (Result, "pipelines" ::: Vector Pipeline)
-> ((Result, "pipelines" ::: Vector Pipeline) -> io ()) -> r
b (forall (io :: * -> *).
MonadIO io =>
Device
-> PipelineCache
-> ("createInfos"
    ::: Vector (SomeStruct ComputePipelineCreateInfo))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, "pipelines" ::: Vector Pipeline)
createComputePipelines Device
device PipelineCache
pipelineCache "createInfos" ::: Vector (SomeStruct ComputePipelineCreateInfo)
pCreateInfos "allocator" ::: Maybe AllocationCallbacks
pAllocator)
    (\(Result
_, "pipelines" ::: Vector Pipeline
o1) -> forall (t :: * -> *) (f :: * -> *) a b.
(Foldable t, Applicative f) =>
(a -> f b) -> t a -> f ()
traverse_ (\Pipeline
o1Elem -> forall (io :: * -> *).
MonadIO io =>
Device
-> Pipeline -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
destroyPipeline Device
device
                                                         Pipeline
o1Elem
                                                         "allocator" ::: Maybe AllocationCallbacks
pAllocator) "pipelines" ::: Vector Pipeline
o1)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkDestroyPipeline
  :: FunPtr (Ptr Device_T -> Pipeline -> Ptr AllocationCallbacks -> IO ()) -> Ptr Device_T -> Pipeline -> Ptr AllocationCallbacks -> IO ()

-- | vkDestroyPipeline - Destroy a pipeline object
--
-- == Valid Usage
--
-- -   #VUID-vkDestroyPipeline-pipeline-00765# All submitted commands that
--     refer to @pipeline@ /must/ have completed execution
--
-- -   #VUID-vkDestroyPipeline-pipeline-00766# If
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' were
--     provided when @pipeline@ was created, a compatible set of callbacks
--     /must/ be provided here
--
-- -   #VUID-vkDestroyPipeline-pipeline-00767# If no
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' were
--     provided when @pipeline@ was created, @pAllocator@ /must/ be @NULL@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkDestroyPipeline-device-parameter# @device@ /must/ be a valid
--     'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkDestroyPipeline-pipeline-parameter# If @pipeline@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', @pipeline@ /must/ be a
--     valid 'Vulkan.Core10.Handles.Pipeline' handle
--
-- -   #VUID-vkDestroyPipeline-pAllocator-parameter# If @pAllocator@ is not
--     @NULL@, @pAllocator@ /must/ be a valid pointer to a valid
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' structure
--
-- -   #VUID-vkDestroyPipeline-pipeline-parent# If @pipeline@ is a valid
--     handle, it /must/ have been created, allocated, or retrieved from
--     @device@
--
-- == Host Synchronization
--
-- -   Host access to @pipeline@ /must/ be externally synchronized
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'Vulkan.Core10.Handles.Device', 'Vulkan.Core10.Handles.Pipeline'
destroyPipeline :: forall io
                 . (MonadIO io)
                => -- | @device@ is the logical device that destroys the pipeline.
                   Device
                -> -- | @pipeline@ is the handle of the pipeline to destroy.
                   Pipeline
                -> -- | @pAllocator@ controls host memory allocation as described in the
                   -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#memory-allocation Memory Allocation>
                   -- chapter.
                   ("allocator" ::: Maybe AllocationCallbacks)
                -> io ()
destroyPipeline :: forall (io :: * -> *).
MonadIO io =>
Device
-> Pipeline -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
destroyPipeline Device
device Pipeline
pipeline "allocator" ::: Maybe AllocationCallbacks
allocator = 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 vkDestroyPipelinePtr :: FunPtr
  (Ptr Device_T
   -> Pipeline -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ())
vkDestroyPipelinePtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> Pipeline -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ())
pVkDestroyPipeline (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
   -> Pipeline -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ())
vkDestroyPipelinePtr 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 vkDestroyPipeline is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkDestroyPipeline' :: Ptr Device_T
-> Pipeline -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()
vkDestroyPipeline' = FunPtr
  (Ptr Device_T
   -> Pipeline -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ())
-> Ptr Device_T
-> Pipeline
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
mkVkDestroyPipeline FunPtr
  (Ptr Device_T
   -> Pipeline -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ())
vkDestroyPipelinePtr
  "pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
    "allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
    Just AllocationCallbacks
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 (AllocationCallbacks
j)
  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
"vkDestroyPipeline" (Ptr Device_T
-> Pipeline -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()
vkDestroyPipeline'
                                                 (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                 (Pipeline
pipeline)
                                                 "pAllocator" ::: Ptr AllocationCallbacks
pAllocator)
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()


-- | VkViewport - Structure specifying a viewport
--
-- = Description
--
-- Note
--
-- Despite their names, @minDepth@ /can/ be less than, equal to, or greater
-- than @maxDepth@.
--
-- The framebuffer depth coordinate @z@f /may/ be represented using either
-- a fixed-point or floating-point representation. However, a
-- floating-point representation /must/ be used if the depth\/stencil
-- attachment has a floating-point depth component. If an m-bit fixed-point
-- representation is used, we assume that it represents each value
-- \(\frac{k}{2^m - 1}\), where k ∈ { 0, 1, …​, 2m-1 }, as k (e.g. 1.0 is
-- represented in binary as a string of all ones).
--
-- The viewport parameters shown in the above equations are found from
-- these values as
--
-- -   ox = @x@ + @width@ \/ 2
--
-- -   oy = @y@ + @height@ \/ 2
--
-- -   oz = @minDepth@ (or (@maxDepth@ + @minDepth@) \/ 2 if
--     'Vulkan.Extensions.VK_EXT_depth_clip_control.PipelineViewportDepthClipControlCreateInfoEXT'::@negativeOneToOne@
--     is 'Vulkan.Core10.FundamentalTypes.TRUE')
--
-- -   px = @width@
--
-- -   py = @height@
--
-- -   pz = @maxDepth@ - @minDepth@ (or (@maxDepth@ - @minDepth@) \/ 2 if
--     'Vulkan.Extensions.VK_EXT_depth_clip_control.PipelineViewportDepthClipControlCreateInfoEXT'::@negativeOneToOne@
--     is 'Vulkan.Core10.FundamentalTypes.TRUE')
--
-- If a render pass transform is enabled, the values (px,py) and (ox, oy)
-- defining the viewport are transformed as described in
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vertexpostproc-renderpass-transform render pass transform>
-- before participating in the viewport transform.
--
-- The application /can/ specify a negative term for @height@, which has
-- the effect of negating the y coordinate in clip space before performing
-- the transform. When using a negative @height@, the application /should/
-- also adjust the @y@ value to point to the lower left corner of the
-- viewport instead of the upper left corner. Using the negative @height@
-- allows the application to avoid having to negate the y component of the
-- @Position@ output from the last
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader stage>.
--
-- The width and height of the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxViewportDimensions implementation-dependent maximum viewport dimensions>
-- /must/ be greater than or equal to the width and height of the largest
-- image which /can/ be created and attached to a framebuffer.
--
-- The floating-point viewport bounds are represented with an
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-viewportSubPixelBits implementation-dependent precision>.
--
-- == Valid Usage
--
-- -   #VUID-VkViewport-width-01770# @width@ /must/ be greater than @0.0@
--
-- -   #VUID-VkViewport-width-01771# @width@ /must/ be less than or equal
--     to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewportDimensions@[0]
--
-- -   #VUID-VkViewport-apiVersion-07917# If the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_maintenance1 VK_KHR_maintenance1>
--     extension is not enabled, the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_AMD_negative_viewport_height VK_AMD_negative_viewport_height>
--     extension is not enabled, and
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceProperties'::@apiVersion@
--     is less than Vulkan 1.1, @height@ /must/ be greater than @0.0@
--
-- -   #VUID-VkViewport-height-01773# The absolute value of @height@ /must/
--     be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewportDimensions@[1]
--
-- -   #VUID-VkViewport-x-01774# @x@ /must/ be greater than or equal to
--     @viewportBoundsRange@[0]
--
-- -   #VUID-VkViewport-x-01232# (@x@ + @width@) /must/ be less than or
--     equal to @viewportBoundsRange@[1]
--
-- -   #VUID-VkViewport-y-01775# @y@ /must/ be greater than or equal to
--     @viewportBoundsRange@[0]
--
-- -   #VUID-VkViewport-y-01776# @y@ /must/ be less than or equal to
--     @viewportBoundsRange@[1]
--
-- -   #VUID-VkViewport-y-01777# (@y@ + @height@) /must/ be greater than or
--     equal to @viewportBoundsRange@[0]
--
-- -   #VUID-VkViewport-y-01233# (@y@ + @height@) /must/ be less than or
--     equal to @viewportBoundsRange@[1]
--
-- -   #VUID-VkViewport-minDepth-01234# If the
--     @VK_EXT_depth_range_unrestricted@ extension is not enabled,
--     @minDepth@ /must/ be between @0.0@ and @1.0@, inclusive
--
-- -   #VUID-VkViewport-maxDepth-01235# If the
--     @VK_EXT_depth_range_unrestricted@ extension is not enabled,
--     @maxDepth@ /must/ be between @0.0@ and @1.0@, inclusive
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Extensions.VK_NV_inherited_viewport_scissor.CommandBufferInheritanceViewportScissorInfoNV',
-- 'PipelineViewportStateCreateInfo',
-- 'Vulkan.Core10.CommandBufferBuilding.cmdSetViewport',
-- 'Vulkan.Core13.Promoted_From_VK_EXT_extended_dynamic_state.cmdSetViewportWithCount',
-- 'Vulkan.Extensions.VK_EXT_extended_dynamic_state.cmdSetViewportWithCountEXT'
data Viewport = Viewport
  { -- | @x@ and @y@ are the viewport’s upper left corner (x,y).
    Viewport -> Float
x :: Float
  , -- No documentation found for Nested "VkViewport" "y"
    Viewport -> Float
y :: Float
  , -- | @width@ and @height@ are the viewport’s width and height, respectively.
    Viewport -> Float
width :: Float
  , -- No documentation found for Nested "VkViewport" "height"
    Viewport -> Float
height :: Float
  , -- | @minDepth@ and @maxDepth@ are the depth range for the viewport.
    Viewport -> Float
minDepth :: Float
  , -- No documentation found for Nested "VkViewport" "maxDepth"
    Viewport -> Float
maxDepth :: Float
  }
  deriving (Typeable, Viewport -> Viewport -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Viewport -> Viewport -> Bool
$c/= :: Viewport -> Viewport -> Bool
== :: Viewport -> Viewport -> Bool
$c== :: Viewport -> Viewport -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (Viewport)
#endif
deriving instance Show Viewport

instance ToCStruct Viewport where
  withCStruct :: forall b. Viewport -> (Ptr Viewport -> IO b) -> IO b
withCStruct Viewport
x Ptr Viewport -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr Viewport
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr Viewport
p Viewport
x (Ptr Viewport -> IO b
f Ptr Viewport
p)
  pokeCStruct :: forall b. Ptr Viewport -> Viewport -> IO b -> IO b
pokeCStruct Ptr Viewport
p Viewport{Float
maxDepth :: Float
minDepth :: Float
height :: Float
width :: Float
y :: Float
x :: Float
$sel:maxDepth:Viewport :: Viewport -> Float
$sel:minDepth:Viewport :: Viewport -> Float
$sel:height:Viewport :: Viewport -> Float
$sel:width:Viewport :: Viewport -> Float
$sel:y:Viewport :: Viewport -> Float
$sel:x:Viewport :: Viewport -> Float
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
x))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
y))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
width))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
height))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
minDepth))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
maxDepth))
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
4
  pokeZeroCStruct :: forall b. Ptr Viewport -> IO b -> IO b
pokeZeroCStruct Ptr Viewport
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct Viewport where
  peekCStruct :: Ptr Viewport -> IO Viewport
peekCStruct Ptr Viewport
p = do
    CFloat
x <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr CFloat))
    CFloat
y <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat))
    CFloat
width <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat))
    CFloat
height <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat))
    CFloat
minDepth <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CFloat))
    CFloat
maxDepth <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr Viewport
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr CFloat))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Float -> Float -> Float -> Float -> Float -> Float -> Viewport
Viewport
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
x)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
y)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
width)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
height)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
minDepth)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
maxDepth)

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

instance Zero Viewport where
  zero :: Viewport
zero = Float -> Float -> Float -> Float -> Float -> Float -> Viewport
Viewport
           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


-- | VkSpecializationMapEntry - Structure specifying a specialization map
-- entry
--
-- = Description
--
-- If a @constantID@ value is not a specialization constant ID used in the
-- shader, that map entry does not affect the behavior of the pipeline.
--
-- == Valid Usage
--
-- -   #VUID-VkSpecializationMapEntry-constantID-00776# For a @constantID@
--     specialization constant declared in a shader, @size@ /must/ match
--     the byte size of the @constantID@. If the specialization constant is
--     of type @boolean@, @size@ /must/ be the byte size of
--     'Vulkan.Core10.FundamentalTypes.Bool32'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'SpecializationInfo'
data SpecializationMapEntry = SpecializationMapEntry
  { -- | @constantID@ is the ID of the specialization constant in SPIR-V.
    SpecializationMapEntry -> "createInfoCount" ::: Word32
constantID :: Word32
  , -- | @offset@ is the byte offset of the specialization constant value within
    -- the supplied data buffer.
    SpecializationMapEntry -> "createInfoCount" ::: Word32
offset :: Word32
  , -- | @size@ is the byte size of the specialization constant value within the
    -- supplied data buffer.
    SpecializationMapEntry -> Word64
size :: Word64
  }
  deriving (Typeable, SpecializationMapEntry -> SpecializationMapEntry -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SpecializationMapEntry -> SpecializationMapEntry -> Bool
$c/= :: SpecializationMapEntry -> SpecializationMapEntry -> Bool
== :: SpecializationMapEntry -> SpecializationMapEntry -> Bool
$c== :: SpecializationMapEntry -> SpecializationMapEntry -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SpecializationMapEntry)
#endif
deriving instance Show SpecializationMapEntry

instance ToCStruct SpecializationMapEntry where
  withCStruct :: forall b.
SpecializationMapEntry
-> (Ptr SpecializationMapEntry -> IO b) -> IO b
withCStruct SpecializationMapEntry
x Ptr SpecializationMapEntry -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
16 forall a b. (a -> b) -> a -> b
$ \Ptr SpecializationMapEntry
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SpecializationMapEntry
p SpecializationMapEntry
x (Ptr SpecializationMapEntry -> IO b
f Ptr SpecializationMapEntry
p)
  pokeCStruct :: forall b.
Ptr SpecializationMapEntry
-> SpecializationMapEntry -> IO b -> IO b
pokeCStruct Ptr SpecializationMapEntry
p SpecializationMapEntry{"createInfoCount" ::: Word32
Word64
size :: Word64
offset :: "createInfoCount" ::: Word32
constantID :: "createInfoCount" ::: Word32
$sel:size:SpecializationMapEntry :: SpecializationMapEntry -> Word64
$sel:offset:SpecializationMapEntry :: SpecializationMapEntry -> "createInfoCount" ::: Word32
$sel:constantID:SpecializationMapEntry :: SpecializationMapEntry -> "createInfoCount" ::: Word32
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SpecializationMapEntry
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) ("createInfoCount" ::: Word32
constantID)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SpecializationMapEntry
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) ("createInfoCount" ::: Word32
offset)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SpecializationMapEntry
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CSize)) (Word64 -> CSize
CSize (Word64
size))
    IO b
f
  cStructSize :: Int
cStructSize = Int
16
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr SpecializationMapEntry -> IO b -> IO b
pokeZeroCStruct Ptr SpecializationMapEntry
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SpecializationMapEntry
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SpecializationMapEntry
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SpecializationMapEntry
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CSize)) (Word64 -> CSize
CSize (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct SpecializationMapEntry where
  peekCStruct :: Ptr SpecializationMapEntry -> IO SpecializationMapEntry
peekCStruct Ptr SpecializationMapEntry
p = do
    "createInfoCount" ::: Word32
constantID <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr SpecializationMapEntry
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
    "createInfoCount" ::: Word32
offset <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr SpecializationMapEntry
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32))
    CSize
size <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr SpecializationMapEntry
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CSize))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("createInfoCount" ::: Word32)
-> ("createInfoCount" ::: Word32)
-> Word64
-> SpecializationMapEntry
SpecializationMapEntry
             "createInfoCount" ::: Word32
constantID "createInfoCount" ::: Word32
offset (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 CSize
size)

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

instance Zero SpecializationMapEntry where
  zero :: SpecializationMapEntry
zero = ("createInfoCount" ::: Word32)
-> ("createInfoCount" ::: Word32)
-> Word64
-> SpecializationMapEntry
SpecializationMapEntry
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkSpecializationInfo - Structure specifying specialization information
--
-- == Valid Usage
--
-- -   #VUID-VkSpecializationInfo-offset-00773# The @offset@ member of each
--     element of @pMapEntries@ /must/ be less than @dataSize@
--
-- -   #VUID-VkSpecializationInfo-pMapEntries-00774# The @size@ member of
--     each element of @pMapEntries@ /must/ be less than or equal to
--     @dataSize@ minus @offset@
--
-- -   #VUID-VkSpecializationInfo-constantID-04911# The @constantID@ value
--     of each element of @pMapEntries@ /must/ be unique within
--     @pMapEntries@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkSpecializationInfo-pMapEntries-parameter# If @mapEntryCount@
--     is not @0@, @pMapEntries@ /must/ be a valid pointer to an array of
--     @mapEntryCount@ valid 'SpecializationMapEntry' structures
--
-- -   #VUID-VkSpecializationInfo-pData-parameter# If @dataSize@ is not
--     @0@, @pData@ /must/ be a valid pointer to an array of @dataSize@
--     bytes
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'PipelineShaderStageCreateInfo',
-- 'Vulkan.Extensions.VK_EXT_shader_object.ShaderCreateInfoEXT',
-- 'SpecializationMapEntry'
data SpecializationInfo = SpecializationInfo
  { -- | @pMapEntries@ is a pointer to an array of 'SpecializationMapEntry'
    -- structures, which map constant IDs to offsets in @pData@.
    SpecializationInfo -> Vector SpecializationMapEntry
mapEntries :: Vector SpecializationMapEntry
  , -- | @dataSize@ is the byte size of the @pData@ buffer.
    SpecializationInfo -> Word64
dataSize :: Word64
  , -- | @pData@ contains the actual constant values to specialize with.
    SpecializationInfo -> Ptr ()
data' :: Ptr ()
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SpecializationInfo)
#endif
deriving instance Show SpecializationInfo

instance ToCStruct SpecializationInfo where
  withCStruct :: forall b.
SpecializationInfo -> (Ptr SpecializationInfo -> IO b) -> IO b
withCStruct SpecializationInfo
x Ptr SpecializationInfo -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr SpecializationInfo
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SpecializationInfo
p SpecializationInfo
x (Ptr SpecializationInfo -> IO b
f Ptr SpecializationInfo
p)
  pokeCStruct :: forall b.
Ptr SpecializationInfo -> SpecializationInfo -> IO b -> IO b
pokeCStruct Ptr SpecializationInfo
p SpecializationInfo{Word64
Ptr ()
Vector SpecializationMapEntry
data' :: Ptr ()
dataSize :: Word64
mapEntries :: Vector SpecializationMapEntry
$sel:data':SpecializationInfo :: SpecializationInfo -> Ptr ()
$sel:dataSize:SpecializationInfo :: SpecializationInfo -> Word64
$sel:mapEntries:SpecializationInfo :: SpecializationInfo -> Vector SpecializationMapEntry
..} 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 SpecializationInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) ((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
$ (Vector SpecializationMapEntry
mapEntries)) :: Word32))
    Ptr SpecializationMapEntry
pPMapEntries' <- 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 @SpecializationMapEntry ((forall a. Vector a -> Int
Data.Vector.length (Vector SpecializationMapEntry
mapEntries)) forall a. Num a => a -> a -> a
* Int
16)
    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 SpecializationMapEntry
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr SpecializationMapEntry
pPMapEntries' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
16 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr SpecializationMapEntry) (SpecializationMapEntry
e)) (Vector SpecializationMapEntry
mapEntries)
    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 SpecializationInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr SpecializationMapEntry))) (Ptr SpecializationMapEntry
pPMapEntries')
    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 SpecializationInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CSize)) (Word64 -> CSize
CSize (Word64
dataSize))
    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 SpecializationInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ()))) (Ptr ()
data')
    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 SpecializationInfo -> IO b -> IO b
pokeZeroCStruct Ptr SpecializationInfo
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SpecializationInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ()))) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct SpecializationInfo where
  peekCStruct :: Ptr SpecializationInfo -> IO SpecializationInfo
peekCStruct Ptr SpecializationInfo
p = do
    "createInfoCount" ::: Word32
mapEntryCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr SpecializationInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
    Ptr SpecializationMapEntry
pMapEntries <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr SpecializationMapEntry) ((Ptr SpecializationInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr SpecializationMapEntry)))
    Vector SpecializationMapEntry
pMapEntries' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral "createInfoCount" ::: Word32
mapEntryCount) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @SpecializationMapEntry ((Ptr SpecializationMapEntry
pMapEntries forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
16 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr SpecializationMapEntry)))
    CSize
dataSize <- forall a. Storable a => Ptr a -> IO a
peek @CSize ((Ptr SpecializationInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CSize))
    Ptr ()
pData <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr SpecializationInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ())))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Vector SpecializationMapEntry
-> Word64 -> Ptr () -> SpecializationInfo
SpecializationInfo
             Vector SpecializationMapEntry
pMapEntries' (coerce :: forall a b. Coercible a b => a -> b
coerce @CSize @Word64 CSize
dataSize) Ptr ()
pData

instance Zero SpecializationInfo where
  zero :: SpecializationInfo
zero = Vector SpecializationMapEntry
-> Word64 -> Ptr () -> SpecializationInfo
SpecializationInfo
           forall a. Monoid a => a
mempty
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkPipelineShaderStageCreateInfo - Structure specifying parameters of a
-- newly created pipeline shader stage
--
-- = Description
--
-- If @module@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', the shader
-- code used by the pipeline is defined by @module@. If @module@ is
-- 'Vulkan.Core10.APIConstants.NULL_HANDLE', the shader code is defined by
-- the chained 'Vulkan.Core10.Shader.ShaderModuleCreateInfo' if present.
--
-- If the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-shaderModuleIdentifier shaderModuleIdentifier>
-- feature is enabled, applications /can/ omit shader code for @stage@ and
-- instead provide a module identifier. This is done by including a
-- 'Vulkan.Extensions.VK_EXT_shader_module_identifier.PipelineShaderStageModuleIdentifierCreateInfoEXT'
-- struct with @identifierSize@ not equal to 0 in the @pNext@ chain. A
-- shader stage created in this way is equivalent to one created using a
-- shader module with the same identifier. The identifier allows an
-- implementation to look up a pipeline without consuming a valid SPIR-V
-- module. If a pipeline is not found, pipeline compilation is not possible
-- and the implementation /must/ fail as specified by
-- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT'.
--
-- When an identifier is used in lieu of a shader module, implementations
-- /may/ fail pipeline compilation with
-- 'Vulkan.Core10.Enums.Result.PIPELINE_COMPILE_REQUIRED' for any reason.
--
-- Note
--
-- The rationale for the relaxed requirement on implementations to return a
-- pipeline with
-- 'Vulkan.Extensions.VK_EXT_shader_module_identifier.PipelineShaderStageModuleIdentifierCreateInfoEXT'
-- is that layers or tools may intercept pipeline creation calls and
-- require the full SPIR-V context to operate correctly. ICDs are not
-- expected to fail pipeline compilation if the pipeline exists in a cache
-- somewhere.
--
-- Applications /can/ use identifiers when creating pipelines with
-- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LIBRARY_BIT_KHR'.
-- When creating such pipelines, 'Vulkan.Core10.Enums.Result.SUCCESS' /may/
-- be returned, but subsequently fail when referencing the pipeline in a
-- 'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'
-- struct. Applications /must/ allow pipeline compilation to fail during
-- link steps with
-- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT'
-- as it /may/ not be possible to determine if a pipeline /can/ be created
-- from identifiers until the link step.
--
-- == Valid Usage
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-00704# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-geometryShader geometryShader>
--     feature is not enabled, @stage@ /must/ not be
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_GEOMETRY_BIT'
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-00705# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-tessellationShader tessellationShader>
--     feature is not enabled, @stage@ /must/ not be
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TESSELLATION_CONTROL_BIT'
--     or
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TESSELLATION_EVALUATION_BIT'
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-02091# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-meshShader meshShaders>
--     feature is not enabled, @stage@ /must/ not be
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_MESH_BIT_EXT'
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-02092# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-taskShader taskShaders>
--     feature is not enabled, @stage@ /must/ not be
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TASK_BIT_EXT'
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-clustercullingShader-07813# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-clustercullingShader clustercullingShader>
--     feature is not enabled, @stage@ /must/ not be
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI'
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-00706# @stage@ /must/
--     not be
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_ALL_GRAPHICS',
--     or 'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_ALL'
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-pName-00707# @pName@ /must/ be
--     the name of an @OpEntryPoint@ in @module@ with an execution model
--     that matches @stage@
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-maxClipDistances-00708# If the
--     identified entry point includes any variable in its interface that
--     is declared with the @ClipDistance@ @BuiltIn@ decoration, that
--     variable /must/ not have an array size greater than
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxClipDistances@
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-maxCullDistances-00709# If the
--     identified entry point includes any variable in its interface that
--     is declared with the @CullDistance@ @BuiltIn@ decoration, that
--     variable /must/ not have an array size greater than
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxCullDistances@
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-maxCombinedClipAndCullDistances-00710#
--     If the identified entry point includes any variables in its
--     interface that are declared with the @ClipDistance@ or
--     @CullDistance@ @BuiltIn@ decoration, those variables /must/ not have
--     array sizes which sum to more than
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxCombinedClipAndCullDistances@
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-maxSampleMaskWords-00711# If
--     the identified entry point includes any variable in its interface
--     that is declared with the
--     'Vulkan.Core10.FundamentalTypes.SampleMask' @BuiltIn@ decoration,
--     that variable /must/ not have an array size greater than
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxSampleMaskWords@
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-00713# If @stage@ is
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TESSELLATION_CONTROL_BIT'
--     or
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TESSELLATION_EVALUATION_BIT',
--     and the identified entry point has an @OpExecutionMode@ instruction
--     specifying a patch size with @OutputVertices@, the patch size /must/
--     be greater than @0@ and less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxTessellationPatchSize@
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-00714# If @stage@ is
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_GEOMETRY_BIT',
--     the identified entry point /must/ have an @OpExecutionMode@
--     instruction specifying a maximum output vertex count that is greater
--     than @0@ and less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxGeometryOutputVertices@
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-00715# If @stage@ is
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_GEOMETRY_BIT',
--     the identified entry point /must/ have an @OpExecutionMode@
--     instruction specifying an invocation count that is greater than @0@
--     and less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxGeometryShaderInvocations@
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-02596# If @stage@ is
--     either
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_VERTEX_BIT',
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TESSELLATION_CONTROL_BIT',
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TESSELLATION_EVALUATION_BIT',
--     or
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_GEOMETRY_BIT',
--     and the identified entry point writes to @Layer@ for any primitive,
--     it /must/ write the same value to @Layer@ for all vertices of a
--     given primitive
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-02597# If @stage@ is
--     either
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_VERTEX_BIT',
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TESSELLATION_CONTROL_BIT',
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TESSELLATION_EVALUATION_BIT',
--     or
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_GEOMETRY_BIT',
--     and the identified entry point writes to @ViewportIndex@ for any
--     primitive, it /must/ write the same value to @ViewportIndex@ for all
--     vertices of a given primitive
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-06685# If @stage@ is
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_FRAGMENT_BIT',
--     and the identified entry point writes to @FragDepth@ in any
--     execution path, all execution paths that are not exclusive to helper
--     invocations /must/ either discard the fragment, or write or
--     initialize the value of @FragDepth@
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-06686# If @stage@ is
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_FRAGMENT_BIT',
--     and the identified entry point writes to @FragStencilRefEXT@ in any
--     execution path, all execution paths that are not exclusive to helper
--     invocations /must/ either discard the fragment, or write or
--     initialize the value of @FragStencilRefEXT@
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-flags-02784# If @flags@ has
--     the
--     'Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT'
--     flag set, the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-subgroupSizeControl subgroupSizeControl>
--     feature /must/ be enabled
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-flags-02785# If @flags@ has
--     the
--     'Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT'
--     flag set, the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-computeFullSubgroups computeFullSubgroups>
--     feature /must/ be enabled
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-flags-08988# If @flags@
--     includes
--     'Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT',
--     @stage@ /must/ be one of
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_MESH_BIT_EXT',
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TASK_BIT_EXT',
--     or
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_COMPUTE_BIT'
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-pNext-02754# If a
--     'Vulkan.Core13.Promoted_From_VK_EXT_subgroup_size_control.PipelineShaderStageRequiredSubgroupSizeCreateInfo'
--     structure is included in the @pNext@ chain, @flags@ /must/ not have
--     the
--     'Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT'
--     flag set
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-pNext-02755# If a
--     'Vulkan.Core13.Promoted_From_VK_EXT_subgroup_size_control.PipelineShaderStageRequiredSubgroupSizeCreateInfo'
--     structure is included in the @pNext@ chain, the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-subgroupSizeControl subgroupSizeControl>
--     feature /must/ be enabled, and @stage@ /must/ be a valid bit
--     specified in
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-requiredSubgroupSizeStages requiredSubgroupSizeStages>
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-pNext-02756# If a
--     'Vulkan.Core13.Promoted_From_VK_EXT_subgroup_size_control.PipelineShaderStageRequiredSubgroupSizeCreateInfo'
--     structure is included in the @pNext@ chain and @stage@ is
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_COMPUTE_BIT',
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_MESH_BIT_EXT',
--     or
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TASK_BIT_EXT',
--     the local workgroup size of the shader /must/ be less than or equal
--     to the product of
--     'Vulkan.Core13.Promoted_From_VK_EXT_subgroup_size_control.PipelineShaderStageRequiredSubgroupSizeCreateInfo'::@requiredSubgroupSize@
--     and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxComputeWorkgroupSubgroups maxComputeWorkgroupSubgroups>
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-pNext-02757# If a
--     'Vulkan.Core13.Promoted_From_VK_EXT_subgroup_size_control.PipelineShaderStageRequiredSubgroupSizeCreateInfo'
--     structure is included in the @pNext@ chain, and @flags@ has the
--     'Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT'
--     flag set, the local workgroup size in the X dimension of the
--     pipeline /must/ be a multiple of
--     'Vulkan.Core13.Promoted_From_VK_EXT_subgroup_size_control.PipelineShaderStageRequiredSubgroupSizeCreateInfo'::@requiredSubgroupSize@
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-flags-02758# If @flags@ has
--     both the
--     'Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT'
--     and
--     'Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT'
--     flags set, the local workgroup size in the X dimension of the
--     pipeline /must/ be a multiple of
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxSubgroupSize maxSubgroupSize>
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-flags-02759# If @flags@ has
--     the
--     'Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT'
--     flag set and @flags@ does not have the
--     'Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT'
--     flag set and no
--     'Vulkan.Core13.Promoted_From_VK_EXT_subgroup_size_control.PipelineShaderStageRequiredSubgroupSizeCreateInfo'
--     structure is included in the @pNext@ chain, the local workgroup size
--     in the X dimension of the pipeline /must/ be a multiple of
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-subgroup-size subgroupSize>
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-module-08987# If @module@ uses
--     the @OpTypeCooperativeMatrixKHR@ instruction with a @Scope@ equal to
--     @Subgroup@, then the local workgroup size in the X dimension of the
--     pipeline /must/ be a multiple of
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-subgroup-size subgroupSize>.
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-08771# If a shader
--     module identifier is not specified for this @stage@, @module@ /must/
--     be a valid 'Vulkan.Core10.Handles.ShaderModule' if none of the
--     following features are enabled:
--
--     -   <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-graphicsPipelineLibrary graphicsPipelineLibrary>
--
--     -   <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-maintenance5 maintenance5>
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-06845# If a shader
--     module identifier is not specified for this @stage@, @module@ /must/
--     be a valid 'Vulkan.Core10.Handles.ShaderModule', or there /must/ be
--     a valid 'Vulkan.Core10.Shader.ShaderModuleCreateInfo' structure in
--     the @pNext@ chain
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-06844# If a shader
--     module identifier is specified for this @stage@, a
--     'Vulkan.Core10.Shader.ShaderModuleCreateInfo' structure /must/ not
--     be present in the @pNext@ chain
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-06848# If a shader
--     module identifier is specified for this @stage@, @module@ /must/ be
--     'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849# If
--     a shader module identifier is not specified, the shader code used by
--     the pipeline /must/ be valid as described by the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#spirv-spec Khronos SPIR-V Specification>
--     after applying the specializations provided in
--     @pSpecializationInfo@, if any, and then converting all
--     specialization constants into fixed constants
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-sType-sType# @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO'
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-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_EXT_debug_utils.DebugUtilsObjectNameInfoEXT',
--     'Vulkan.Extensions.VK_EXT_pipeline_robustness.PipelineRobustnessCreateInfoEXT',
--     'Vulkan.Extensions.VK_EXT_shader_module_identifier.PipelineShaderStageModuleIdentifierCreateInfoEXT',
--     'Vulkan.Extensions.VK_AMDX_shader_enqueue.PipelineShaderStageNodeCreateInfoAMDX',
--     'Vulkan.Core13.Promoted_From_VK_EXT_subgroup_size_control.PipelineShaderStageRequiredSubgroupSizeCreateInfo',
--     'Vulkan.Core10.Shader.ShaderModuleCreateInfo', or
--     'Vulkan.Extensions.VK_EXT_validation_cache.ShaderModuleValidationCacheCreateInfoEXT'
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-sType-unique# The @sType@
--     value of each struct in the @pNext@ chain /must/ be unique
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-flags-parameter# @flags@
--     /must/ be a valid combination of
--     'Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PipelineShaderStageCreateFlagBits'
--     values
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-stage-parameter# @stage@
--     /must/ be a valid
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.ShaderStageFlagBits' value
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-module-parameter# If @module@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', @module@ /must/ be
--     a valid 'Vulkan.Core10.Handles.ShaderModule' handle
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-pName-parameter# @pName@
--     /must/ be a null-terminated UTF-8 string
--
-- -   #VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-parameter#
--     If @pSpecializationInfo@ is not @NULL@, @pSpecializationInfo@ /must/
--     be a valid pointer to a valid 'SpecializationInfo' structure
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'ComputePipelineCreateInfo',
-- 'Vulkan.Extensions.VK_AMDX_shader_enqueue.ExecutionGraphPipelineCreateInfoAMDX',
-- 'GraphicsPipelineCreateInfo',
-- 'Vulkan.Extensions.VK_NV_device_generated_commands.GraphicsShaderGroupCreateInfoNV',
-- 'Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PipelineShaderStageCreateFlags',
-- 'Vulkan.Extensions.VK_KHR_ray_tracing_pipeline.RayTracingPipelineCreateInfoKHR',
-- 'Vulkan.Extensions.VK_NV_ray_tracing.RayTracingPipelineCreateInfoNV',
-- 'Vulkan.Core10.Handles.ShaderModule',
-- 'Vulkan.Core10.Enums.ShaderStageFlagBits.ShaderStageFlagBits',
-- 'SpecializationInfo', 'Vulkan.Core10.Enums.StructureType.StructureType'
data PipelineShaderStageCreateInfo (es :: [Type]) = PipelineShaderStageCreateInfo
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]). PipelineShaderStageCreateInfo es -> Chain es
next :: Chain es
  , -- | @flags@ is a bitmask of
    -- 'Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits.PipelineShaderStageCreateFlagBits'
    -- specifying how the pipeline shader stage will be generated.
    forall (es :: [*]).
PipelineShaderStageCreateInfo es -> PipelineShaderStageCreateFlags
flags :: PipelineShaderStageCreateFlags
  , -- | @stage@ is a
    -- 'Vulkan.Core10.Enums.ShaderStageFlagBits.ShaderStageFlagBits' value
    -- specifying a single pipeline stage.
    forall (es :: [*]).
PipelineShaderStageCreateInfo es -> ShaderStageFlagBits
stage :: ShaderStageFlagBits
  , -- | @module@ is optionally a 'Vulkan.Core10.Handles.ShaderModule' object
    -- containing the shader code for this stage.
    forall (es :: [*]).
PipelineShaderStageCreateInfo es -> ShaderModule
module' :: ShaderModule
  , -- | @pName@ is a pointer to a null-terminated UTF-8 string specifying the
    -- entry point name of the shader for this stage.
    forall (es :: [*]). PipelineShaderStageCreateInfo es -> ByteString
name :: ByteString
  , -- | @pSpecializationInfo@ is a pointer to a 'SpecializationInfo' structure,
    -- as described in
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-specialization-constants Specialization Constants>,
    -- or @NULL@.
    forall (es :: [*]).
PipelineShaderStageCreateInfo es -> Maybe SpecializationInfo
specializationInfo :: Maybe SpecializationInfo
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineShaderStageCreateInfo (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (PipelineShaderStageCreateInfo es)

instance Extensible PipelineShaderStageCreateInfo where
  extensibleTypeName :: String
extensibleTypeName = String
"PipelineShaderStageCreateInfo"
  setNext :: forall (ds :: [*]) (es :: [*]).
PipelineShaderStageCreateInfo ds
-> Chain es -> PipelineShaderStageCreateInfo es
setNext PipelineShaderStageCreateInfo{Maybe SpecializationInfo
ByteString
Chain ds
ShaderStageFlagBits
ShaderModule
PipelineShaderStageCreateFlags
specializationInfo :: Maybe SpecializationInfo
name :: ByteString
module' :: ShaderModule
stage :: ShaderStageFlagBits
flags :: PipelineShaderStageCreateFlags
next :: Chain ds
$sel:specializationInfo:PipelineShaderStageCreateInfo :: forall (es :: [*]).
PipelineShaderStageCreateInfo es -> Maybe SpecializationInfo
$sel:name:PipelineShaderStageCreateInfo :: forall (es :: [*]). PipelineShaderStageCreateInfo es -> ByteString
$sel:module':PipelineShaderStageCreateInfo :: forall (es :: [*]).
PipelineShaderStageCreateInfo es -> ShaderModule
$sel:stage:PipelineShaderStageCreateInfo :: forall (es :: [*]).
PipelineShaderStageCreateInfo es -> ShaderStageFlagBits
$sel:flags:PipelineShaderStageCreateInfo :: forall (es :: [*]).
PipelineShaderStageCreateInfo es -> PipelineShaderStageCreateFlags
$sel:next:PipelineShaderStageCreateInfo :: forall (es :: [*]). PipelineShaderStageCreateInfo es -> Chain es
..} Chain es
next' = PipelineShaderStageCreateInfo{$sel:next:PipelineShaderStageCreateInfo :: Chain es
next = Chain es
next', Maybe SpecializationInfo
ByteString
ShaderStageFlagBits
ShaderModule
PipelineShaderStageCreateFlags
specializationInfo :: Maybe SpecializationInfo
name :: ByteString
module' :: ShaderModule
stage :: ShaderStageFlagBits
flags :: PipelineShaderStageCreateFlags
$sel:specializationInfo:PipelineShaderStageCreateInfo :: Maybe SpecializationInfo
$sel:name:PipelineShaderStageCreateInfo :: ByteString
$sel:module':PipelineShaderStageCreateInfo :: ShaderModule
$sel:stage:PipelineShaderStageCreateInfo :: ShaderStageFlagBits
$sel:flags:PipelineShaderStageCreateInfo :: PipelineShaderStageCreateFlags
..}
  getNext :: forall (es :: [*]). PipelineShaderStageCreateInfo es -> Chain es
getNext PipelineShaderStageCreateInfo{Maybe SpecializationInfo
ByteString
Chain es
ShaderStageFlagBits
ShaderModule
PipelineShaderStageCreateFlags
specializationInfo :: Maybe SpecializationInfo
name :: ByteString
module' :: ShaderModule
stage :: ShaderStageFlagBits
flags :: PipelineShaderStageCreateFlags
next :: Chain es
$sel:specializationInfo:PipelineShaderStageCreateInfo :: forall (es :: [*]).
PipelineShaderStageCreateInfo es -> Maybe SpecializationInfo
$sel:name:PipelineShaderStageCreateInfo :: forall (es :: [*]). PipelineShaderStageCreateInfo es -> ByteString
$sel:module':PipelineShaderStageCreateInfo :: forall (es :: [*]).
PipelineShaderStageCreateInfo es -> ShaderModule
$sel:stage:PipelineShaderStageCreateInfo :: forall (es :: [*]).
PipelineShaderStageCreateInfo es -> ShaderStageFlagBits
$sel:flags:PipelineShaderStageCreateInfo :: forall (es :: [*]).
PipelineShaderStageCreateInfo es -> PipelineShaderStageCreateFlags
$sel:next:PipelineShaderStageCreateInfo :: forall (es :: [*]). PipelineShaderStageCreateInfo es -> Chain es
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends PipelineShaderStageCreateInfo e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends PipelineShaderStageCreateInfo e => b) -> Maybe b
extends proxy e
_ Extends PipelineShaderStageCreateInfo e => b
f
    | Just e :~: PipelineShaderStageNodeCreateInfoAMDX
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineShaderStageNodeCreateInfoAMDX = forall a. a -> Maybe a
Just Extends PipelineShaderStageCreateInfo e => b
f
    | Just e :~: PipelineRobustnessCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineRobustnessCreateInfoEXT = forall a. a -> Maybe a
Just Extends PipelineShaderStageCreateInfo e => b
f
    | Just e :~: PipelineShaderStageModuleIdentifierCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineShaderStageModuleIdentifierCreateInfoEXT = forall a. a -> Maybe a
Just Extends PipelineShaderStageCreateInfo e => b
f
    | Just e :~: PipelineShaderStageRequiredSubgroupSizeCreateInfo
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineShaderStageRequiredSubgroupSizeCreateInfo = forall a. a -> Maybe a
Just Extends PipelineShaderStageCreateInfo e => b
f
    | Just e :~: DebugUtilsObjectNameInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @DebugUtilsObjectNameInfoEXT = forall a. a -> Maybe a
Just Extends PipelineShaderStageCreateInfo e => b
f
    | Just e :~: ShaderModuleValidationCacheCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @ShaderModuleValidationCacheCreateInfoEXT = forall a. a -> Maybe a
Just Extends PipelineShaderStageCreateInfo e => b
f
    | Just e :~: ShaderModuleCreateInfo '[]
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @(ShaderModuleCreateInfo '[]) = forall a. a -> Maybe a
Just Extends PipelineShaderStageCreateInfo e => b
f
    | Bool
otherwise = forall a. Maybe a
Nothing

instance ( Extendss PipelineShaderStageCreateInfo es
         , PokeChain es ) => ToCStruct (PipelineShaderStageCreateInfo es) where
  withCStruct :: forall b.
PipelineShaderStageCreateInfo es
-> (Ptr (PipelineShaderStageCreateInfo es) -> IO b) -> IO b
withCStruct PipelineShaderStageCreateInfo es
x Ptr (PipelineShaderStageCreateInfo es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineShaderStageCreateInfo es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (PipelineShaderStageCreateInfo es)
p PipelineShaderStageCreateInfo es
x (Ptr (PipelineShaderStageCreateInfo es) -> IO b
f Ptr (PipelineShaderStageCreateInfo es)
p)
  pokeCStruct :: forall b.
Ptr (PipelineShaderStageCreateInfo es)
-> PipelineShaderStageCreateInfo es -> IO b -> IO b
pokeCStruct Ptr (PipelineShaderStageCreateInfo es)
p PipelineShaderStageCreateInfo{Maybe SpecializationInfo
ByteString
Chain es
ShaderStageFlagBits
ShaderModule
PipelineShaderStageCreateFlags
specializationInfo :: Maybe SpecializationInfo
name :: ByteString
module' :: ShaderModule
stage :: ShaderStageFlagBits
flags :: PipelineShaderStageCreateFlags
next :: Chain es
$sel:specializationInfo:PipelineShaderStageCreateInfo :: forall (es :: [*]).
PipelineShaderStageCreateInfo es -> Maybe SpecializationInfo
$sel:name:PipelineShaderStageCreateInfo :: forall (es :: [*]). PipelineShaderStageCreateInfo es -> ByteString
$sel:module':PipelineShaderStageCreateInfo :: forall (es :: [*]).
PipelineShaderStageCreateInfo es -> ShaderModule
$sel:stage:PipelineShaderStageCreateInfo :: forall (es :: [*]).
PipelineShaderStageCreateInfo es -> ShaderStageFlagBits
$sel:flags:PipelineShaderStageCreateInfo :: forall (es :: [*]).
PipelineShaderStageCreateInfo es -> PipelineShaderStageCreateFlags
$sel:next:PipelineShaderStageCreateInfo :: forall (es :: [*]). PipelineShaderStageCreateInfo 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 (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO)
    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 (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineShaderStageCreateFlags)) (PipelineShaderStageCreateFlags
flags)
    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 (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ShaderStageFlagBits)) (ShaderStageFlagBits
stage)
    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 (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ShaderModule)) (ShaderModule
module')
    Ptr CChar
pName'' <- 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. ByteString -> (Ptr CChar -> IO a) -> IO a
useAsCString (ByteString
name)
    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 (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr CChar))) Ptr CChar
pName''
    Ptr SpecializationInfo
pSpecializationInfo'' <- case (Maybe SpecializationInfo
specializationInfo) of
      Maybe SpecializationInfo
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      Just SpecializationInfo
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 (SpecializationInfo
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 ((Ptr (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr SpecializationInfo))) Ptr SpecializationInfo
pSpecializationInfo''
    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
48
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr (PipelineShaderStageCreateInfo es) -> IO b -> IO b
pokeZeroCStruct Ptr (PipelineShaderStageCreateInfo 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 (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO)
    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 (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ShaderStageFlagBits)) (forall a. Zero a => a
zero)
    Ptr CChar
pName'' <- 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. ByteString -> (Ptr CChar -> IO a) -> IO a
useAsCString (forall a. Monoid a => a
mempty)
    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 (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr CChar))) Ptr CChar
pName''
    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 PipelineShaderStageCreateInfo es
         , PeekChain es ) => FromCStruct (PipelineShaderStageCreateInfo es) where
  peekCStruct :: Ptr (PipelineShaderStageCreateInfo es)
-> IO (PipelineShaderStageCreateInfo es)
peekCStruct Ptr (PipelineShaderStageCreateInfo es)
p = do
    Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (PipelineShaderStageCreateInfo 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 Ptr ()
pNext)
    PipelineShaderStageCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineShaderStageCreateFlags ((Ptr (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineShaderStageCreateFlags))
    ShaderStageFlagBits
stage <- forall a. Storable a => Ptr a -> IO a
peek @ShaderStageFlagBits ((Ptr (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ShaderStageFlagBits))
    ShaderModule
module' <- forall a. Storable a => Ptr a -> IO a
peek @ShaderModule ((Ptr (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ShaderModule))
    ByteString
pName <- Ptr CChar -> IO ByteString
packCString forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< forall a. Storable a => Ptr a -> IO a
peek ((Ptr (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr CChar)))
    Ptr SpecializationInfo
pSpecializationInfo <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr SpecializationInfo) ((Ptr (PipelineShaderStageCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr SpecializationInfo)))
    Maybe SpecializationInfo
pSpecializationInfo' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr SpecializationInfo
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @SpecializationInfo (Ptr SpecializationInfo
j)) Ptr SpecializationInfo
pSpecializationInfo
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> PipelineShaderStageCreateFlags
-> ShaderStageFlagBits
-> ShaderModule
-> ByteString
-> Maybe SpecializationInfo
-> PipelineShaderStageCreateInfo es
PipelineShaderStageCreateInfo
             Chain es
next PipelineShaderStageCreateFlags
flags ShaderStageFlagBits
stage ShaderModule
module' ByteString
pName Maybe SpecializationInfo
pSpecializationInfo'

instance es ~ '[] => Zero (PipelineShaderStageCreateInfo es) where
  zero :: PipelineShaderStageCreateInfo es
zero = forall (es :: [*]).
Chain es
-> PipelineShaderStageCreateFlags
-> ShaderStageFlagBits
-> ShaderModule
-> ByteString
-> Maybe SpecializationInfo
-> PipelineShaderStageCreateInfo es
PipelineShaderStageCreateInfo
           ()
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Monoid a => a
mempty
           forall a. Maybe a
Nothing


-- | VkComputePipelineCreateInfo - Structure specifying parameters of a newly
-- created compute pipeline
--
-- = Description
--
-- The parameters @basePipelineHandle@ and @basePipelineIndex@ are
-- described in more detail in
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-pipeline-derivatives Pipeline Derivatives>.
--
-- 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-VkComputePipelineCreateInfo-flags-07984# If @flags@ contains
--     the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, and @basePipelineIndex@ is -1, @basePipelineHandle@ /must/ be
--     a valid compute 'Vulkan.Core10.Handles.Pipeline' handle
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-07985# If @flags@ contains
--     the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, and @basePipelineHandle@ is
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', @basePipelineIndex@ /must/
--     be a valid index into the calling command’s @pCreateInfos@ parameter
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-07986# If @flags@ contains
--     the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, @basePipelineIndex@ /must/ be -1 or @basePipelineHandle@
--     /must/ be 'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkComputePipelineCreateInfo-layout-07987# If a push constant
--     block is declared in a shader, a push constant range in @layout@
--     /must/ match both the shader stage and range
--
-- -   #VUID-VkComputePipelineCreateInfo-layout-07988# If a
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#interfaces-resources resource variables>
--     is declared in a shader, a descriptor slot in @layout@ /must/ match
--     the shader stage
--
-- -   #VUID-VkComputePipelineCreateInfo-layout-07990# If a
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#interfaces-resources resource variables>
--     is declared in a shader, and the descriptor type is not
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_MUTABLE_EXT', a
--     descriptor slot in @layout@ /must/ match the descriptor type
--
-- -   #VUID-VkComputePipelineCreateInfo-layout-07991# If a
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#interfaces-resources resource variables>
--     is declared in a shader as an array, a descriptor slot in @layout@
--     /must/ match the descriptor count
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-03365# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR'
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-03366# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR'
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-03367# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR'
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-03368# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR'
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-03369# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR'
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-03370# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR'
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-03576# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR'
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-04945# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV'
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-09007# If @flags@ includes
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV',
--     then the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-deviceGeneratedComputePipelines ::deviceGeneratedComputePipelines>
--     feature /must/ be enabled
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-09008# If @flags@ includes
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV',
--     then the @pNext@ chain /must/ include a pointer to a valid instance
--     of
--     'Vulkan.Extensions.VK_NV_device_generated_commands_compute.ComputePipelineIndirectBufferInfoNV'
--     specifying the address where the pipeline’s metadata will be saved
--
-- -   #VUID-VkComputePipelineCreateInfo-pipelineCreationCacheControl-02875#
--     If the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-pipelineCreationCacheControl pipelineCreationCacheControl>
--     feature is not enabled, @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT'
--     or
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT'
--
-- -   #VUID-VkComputePipelineCreateInfo-stage-00701# The @stage@ member of
--     @stage@ /must/ be
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_COMPUTE_BIT'
--
-- -   #VUID-VkComputePipelineCreateInfo-stage-00702# The shader code for
--     the entry point identified by @stage@ and the rest of the state
--     identified by this structure /must/ adhere to the pipeline linking
--     rules described in the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#interfaces Shader Interfaces>
--     chapter
--
-- -   #VUID-VkComputePipelineCreateInfo-layout-01687# The number of
--     resources in @layout@ accessible to the compute shader stage /must/
--     be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxPerStageResources@
--
-- -   #VUID-VkComputePipelineCreateInfo-shaderEnqueue-09177# If
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-shaderEnqueue shaderEnqueue>
--     is not enabled, @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LIBRARY_BIT_KHR'
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-09178# If @flags@ does not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LIBRARY_BIT_KHR',
--     the shader specified by @stage@ /must/ not declare the
--     @ShaderEnqueueAMDX@ capability
--
-- -   #VUID-VkComputePipelineCreateInfo-pipelineStageCreationFeedbackCount-06566#
--     If
--     'Vulkan.Core13.Promoted_From_VK_EXT_pipeline_creation_feedback.PipelineCreationFeedbackCreateInfo'::@pipelineStageCreationFeedbackCount@
--     is not @0@, it /must/ be @1@
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-07367# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT'
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-07996# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkComputePipelineCreateInfo-sType-sType# @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO'
--
-- -   #VUID-VkComputePipelineCreateInfo-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_AMD_pipeline_compiler_control.PipelineCompilerControlCreateInfoAMD',
--     'Vulkan.Extensions.VK_KHR_maintenance5.PipelineCreateFlags2CreateInfoKHR',
--     'Vulkan.Core13.Promoted_From_VK_EXT_pipeline_creation_feedback.PipelineCreationFeedbackCreateInfo',
--     'Vulkan.Extensions.VK_EXT_pipeline_robustness.PipelineRobustnessCreateInfoEXT',
--     or
--     'Vulkan.Extensions.VK_HUAWEI_subpass_shading.SubpassShadingPipelineCreateInfoHUAWEI'
--
-- -   #VUID-VkComputePipelineCreateInfo-sType-unique# The @sType@ value of
--     each struct in the @pNext@ chain /must/ be unique
--
-- -   #VUID-VkComputePipelineCreateInfo-flags-parameter# @flags@ /must/ be
--     a valid combination of
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits'
--     values
--
-- -   #VUID-VkComputePipelineCreateInfo-stage-parameter# @stage@ /must/ be
--     a valid 'PipelineShaderStageCreateInfo' structure
--
-- -   #VUID-VkComputePipelineCreateInfo-layout-parameter# @layout@ /must/
--     be a valid 'Vulkan.Core10.Handles.PipelineLayout' handle
--
-- -   #VUID-VkComputePipelineCreateInfo-commonparent# Both of
--     @basePipelineHandle@, and @layout@ 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_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Handles.Pipeline',
-- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlags',
-- 'Vulkan.Core10.Handles.PipelineLayout', 'PipelineShaderStageCreateInfo',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'createComputePipelines',
-- 'Vulkan.Extensions.VK_NV_device_generated_commands_compute.getPipelineIndirectMemoryRequirementsNV'
data ComputePipelineCreateInfo (es :: [Type]) = ComputePipelineCreateInfo
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]). ComputePipelineCreateInfo es -> Chain es
next :: Chain es
  , -- | @flags@ is a bitmask of
    -- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits'
    -- specifying how the pipeline will be generated.
    forall (es :: [*]).
ComputePipelineCreateInfo es -> PipelineCreateFlags
flags :: PipelineCreateFlags
  , -- | @stage@ is a 'PipelineShaderStageCreateInfo' structure describing the
    -- compute shader.
    forall (es :: [*]).
ComputePipelineCreateInfo es
-> SomeStruct PipelineShaderStageCreateInfo
stage :: SomeStruct PipelineShaderStageCreateInfo
  , -- | @layout@ is the description of binding locations used by both the
    -- pipeline and descriptor sets used with the pipeline.
    forall (es :: [*]). ComputePipelineCreateInfo es -> PipelineLayout
layout :: PipelineLayout
  , -- | @basePipelineHandle@ is a pipeline to derive from.
    forall (es :: [*]). ComputePipelineCreateInfo es -> Pipeline
basePipelineHandle :: Pipeline
  , -- | @basePipelineIndex@ is an index into the @pCreateInfos@ parameter to use
    -- as a pipeline to derive from.
    forall (es :: [*]). ComputePipelineCreateInfo es -> Int32
basePipelineIndex :: Int32
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ComputePipelineCreateInfo (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (ComputePipelineCreateInfo es)

instance Extensible ComputePipelineCreateInfo where
  extensibleTypeName :: String
extensibleTypeName = String
"ComputePipelineCreateInfo"
  setNext :: forall (ds :: [*]) (es :: [*]).
ComputePipelineCreateInfo ds
-> Chain es -> ComputePipelineCreateInfo es
setNext ComputePipelineCreateInfo{Int32
Chain ds
PipelineLayout
Pipeline
PipelineCreateFlags
SomeStruct PipelineShaderStageCreateInfo
basePipelineIndex :: Int32
basePipelineHandle :: Pipeline
layout :: PipelineLayout
stage :: SomeStruct PipelineShaderStageCreateInfo
flags :: PipelineCreateFlags
next :: Chain ds
$sel:basePipelineIndex:ComputePipelineCreateInfo :: forall (es :: [*]). ComputePipelineCreateInfo es -> Int32
$sel:basePipelineHandle:ComputePipelineCreateInfo :: forall (es :: [*]). ComputePipelineCreateInfo es -> Pipeline
$sel:layout:ComputePipelineCreateInfo :: forall (es :: [*]). ComputePipelineCreateInfo es -> PipelineLayout
$sel:stage:ComputePipelineCreateInfo :: forall (es :: [*]).
ComputePipelineCreateInfo es
-> SomeStruct PipelineShaderStageCreateInfo
$sel:flags:ComputePipelineCreateInfo :: forall (es :: [*]).
ComputePipelineCreateInfo es -> PipelineCreateFlags
$sel:next:ComputePipelineCreateInfo :: forall (es :: [*]). ComputePipelineCreateInfo es -> Chain es
..} Chain es
next' = ComputePipelineCreateInfo{$sel:next:ComputePipelineCreateInfo :: Chain es
next = Chain es
next', Int32
PipelineLayout
Pipeline
PipelineCreateFlags
SomeStruct PipelineShaderStageCreateInfo
basePipelineIndex :: Int32
basePipelineHandle :: Pipeline
layout :: PipelineLayout
stage :: SomeStruct PipelineShaderStageCreateInfo
flags :: PipelineCreateFlags
$sel:basePipelineIndex:ComputePipelineCreateInfo :: Int32
$sel:basePipelineHandle:ComputePipelineCreateInfo :: Pipeline
$sel:layout:ComputePipelineCreateInfo :: PipelineLayout
$sel:stage:ComputePipelineCreateInfo :: SomeStruct PipelineShaderStageCreateInfo
$sel:flags:ComputePipelineCreateInfo :: PipelineCreateFlags
..}
  getNext :: forall (es :: [*]). ComputePipelineCreateInfo es -> Chain es
getNext ComputePipelineCreateInfo{Int32
Chain es
PipelineLayout
Pipeline
PipelineCreateFlags
SomeStruct PipelineShaderStageCreateInfo
basePipelineIndex :: Int32
basePipelineHandle :: Pipeline
layout :: PipelineLayout
stage :: SomeStruct PipelineShaderStageCreateInfo
flags :: PipelineCreateFlags
next :: Chain es
$sel:basePipelineIndex:ComputePipelineCreateInfo :: forall (es :: [*]). ComputePipelineCreateInfo es -> Int32
$sel:basePipelineHandle:ComputePipelineCreateInfo :: forall (es :: [*]). ComputePipelineCreateInfo es -> Pipeline
$sel:layout:ComputePipelineCreateInfo :: forall (es :: [*]). ComputePipelineCreateInfo es -> PipelineLayout
$sel:stage:ComputePipelineCreateInfo :: forall (es :: [*]).
ComputePipelineCreateInfo es
-> SomeStruct PipelineShaderStageCreateInfo
$sel:flags:ComputePipelineCreateInfo :: forall (es :: [*]).
ComputePipelineCreateInfo es -> PipelineCreateFlags
$sel:next:ComputePipelineCreateInfo :: forall (es :: [*]). ComputePipelineCreateInfo es -> Chain es
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends ComputePipelineCreateInfo e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e -> (Extends ComputePipelineCreateInfo e => b) -> Maybe b
extends proxy e
_ Extends ComputePipelineCreateInfo e => b
f
    | Just e :~: PipelineRobustnessCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineRobustnessCreateInfoEXT = forall a. a -> Maybe a
Just Extends ComputePipelineCreateInfo e => b
f
    | Just e :~: PipelineCompilerControlCreateInfoAMD
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineCompilerControlCreateInfoAMD = forall a. a -> Maybe a
Just Extends ComputePipelineCreateInfo e => b
f
    | Just e :~: SubpassShadingPipelineCreateInfoHUAWEI
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @SubpassShadingPipelineCreateInfoHUAWEI = forall a. a -> Maybe a
Just Extends ComputePipelineCreateInfo e => b
f
    | Just e :~: PipelineCreationFeedbackCreateInfo
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineCreationFeedbackCreateInfo = forall a. a -> Maybe a
Just Extends ComputePipelineCreateInfo e => b
f
    | Just e :~: PipelineCreateFlags2CreateInfoKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineCreateFlags2CreateInfoKHR = forall a. a -> Maybe a
Just Extends ComputePipelineCreateInfo e => b
f
    | Bool
otherwise = forall a. Maybe a
Nothing

instance ( Extendss ComputePipelineCreateInfo es
         , PokeChain es ) => ToCStruct (ComputePipelineCreateInfo es) where
  withCStruct :: forall b.
ComputePipelineCreateInfo es
-> (Ptr (ComputePipelineCreateInfo es) -> IO b) -> IO b
withCStruct ComputePipelineCreateInfo es
x Ptr (ComputePipelineCreateInfo es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
96 forall a b. (a -> b) -> a -> b
$ \Ptr (ComputePipelineCreateInfo es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (ComputePipelineCreateInfo es)
p ComputePipelineCreateInfo es
x (Ptr (ComputePipelineCreateInfo es) -> IO b
f Ptr (ComputePipelineCreateInfo es)
p)
  pokeCStruct :: forall b.
Ptr (ComputePipelineCreateInfo es)
-> ComputePipelineCreateInfo es -> IO b -> IO b
pokeCStruct Ptr (ComputePipelineCreateInfo es)
p ComputePipelineCreateInfo{Int32
Chain es
PipelineLayout
Pipeline
PipelineCreateFlags
SomeStruct PipelineShaderStageCreateInfo
basePipelineIndex :: Int32
basePipelineHandle :: Pipeline
layout :: PipelineLayout
stage :: SomeStruct PipelineShaderStageCreateInfo
flags :: PipelineCreateFlags
next :: Chain es
$sel:basePipelineIndex:ComputePipelineCreateInfo :: forall (es :: [*]). ComputePipelineCreateInfo es -> Int32
$sel:basePipelineHandle:ComputePipelineCreateInfo :: forall (es :: [*]). ComputePipelineCreateInfo es -> Pipeline
$sel:layout:ComputePipelineCreateInfo :: forall (es :: [*]). ComputePipelineCreateInfo es -> PipelineLayout
$sel:stage:ComputePipelineCreateInfo :: forall (es :: [*]).
ComputePipelineCreateInfo es
-> SomeStruct PipelineShaderStageCreateInfo
$sel:flags:ComputePipelineCreateInfo :: forall (es :: [*]).
ComputePipelineCreateInfo es -> PipelineCreateFlags
$sel:next:ComputePipelineCreateInfo :: forall (es :: [*]). ComputePipelineCreateInfo 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 (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO)
    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 (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineCreateFlags)) (PipelineCreateFlags
flags)
    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 (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (PipelineShaderStageCreateInfo _)))) (SomeStruct PipelineShaderStageCreateInfo
stage) 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
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr PipelineLayout)) (PipelineLayout
layout)
    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 (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Pipeline)) (Pipeline
basePipelineHandle)
    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 (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Int32)) (Int32
basePipelineIndex)
    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
96
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr (ComputePipelineCreateInfo es) -> IO b -> IO b
pokeZeroCStruct Ptr (ComputePipelineCreateInfo 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 (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO)
    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 (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext'
    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 (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (PipelineShaderStageCreateInfo _)))) ((forall (a :: [*] -> *) (es :: [*]).
(Extendss a es, PokeChain es, Show (Chain es)) =>
a es -> SomeStruct a
SomeStruct 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
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr PipelineLayout)) (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 (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Int32)) (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 ComputePipelineCreateInfo es
         , PeekChain es ) => FromCStruct (ComputePipelineCreateInfo es) where
  peekCStruct :: Ptr (ComputePipelineCreateInfo es)
-> IO (ComputePipelineCreateInfo es)
peekCStruct Ptr (ComputePipelineCreateInfo es)
p = do
    Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (ComputePipelineCreateInfo 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 Ptr ()
pNext)
    PipelineCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineCreateFlags ((Ptr (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineCreateFlags))
    SomeStruct PipelineShaderStageCreateInfo
stage <- forall (a :: [*] -> *).
(Extensible a,
 forall (es :: [*]).
 (Extendss a es, PeekChain es) =>
 FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ((Ptr (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (PipelineShaderStageCreateInfo _))))
    PipelineLayout
layout <- forall a. Storable a => Ptr a -> IO a
peek @PipelineLayout ((Ptr (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr PipelineLayout))
    Pipeline
basePipelineHandle <- forall a. Storable a => Ptr a -> IO a
peek @Pipeline ((Ptr (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Pipeline))
    Int32
basePipelineIndex <- forall a. Storable a => Ptr a -> IO a
peek @Int32 ((Ptr (ComputePipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr Int32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> PipelineCreateFlags
-> SomeStruct PipelineShaderStageCreateInfo
-> PipelineLayout
-> Pipeline
-> Int32
-> ComputePipelineCreateInfo es
ComputePipelineCreateInfo
             Chain es
next PipelineCreateFlags
flags SomeStruct PipelineShaderStageCreateInfo
stage PipelineLayout
layout Pipeline
basePipelineHandle Int32
basePipelineIndex

instance es ~ '[] => Zero (ComputePipelineCreateInfo es) where
  zero :: ComputePipelineCreateInfo es
zero = forall (es :: [*]).
Chain es
-> PipelineCreateFlags
-> SomeStruct PipelineShaderStageCreateInfo
-> PipelineLayout
-> Pipeline
-> Int32
-> ComputePipelineCreateInfo es
ComputePipelineCreateInfo
           ()
           forall a. Zero a => a
zero
           (forall (a :: [*] -> *) (es :: [*]).
(Extendss a es, PokeChain es, Show (Chain es)) =>
a es -> SomeStruct a
SomeStruct forall a. Zero a => a
zero)
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkVertexInputBindingDescription - Structure specifying vertex input
-- binding description
--
-- == Valid Usage
--
-- -   #VUID-VkVertexInputBindingDescription-binding-00618# @binding@
--     /must/ be less than
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxVertexInputBindings@
--
-- -   #VUID-VkVertexInputBindingDescription-stride-00619# @stride@ /must/
--     be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxVertexInputBindingStride@
--
-- -   #VUID-VkVertexInputBindingDescription-stride-04456# If the
--     @VK_KHR_portability_subset@ extension is enabled, @stride@ /must/ be
--     a multiple of, and at least as large as,
--     'Vulkan.Extensions.VK_KHR_portability_subset.PhysicalDevicePortabilitySubsetPropertiesKHR'::@minVertexInputBindingStrideAlignment@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkVertexInputBindingDescription-inputRate-parameter#
--     @inputRate@ /must/ be a valid
--     'Vulkan.Core10.Enums.VertexInputRate.VertexInputRate' value
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'PipelineVertexInputStateCreateInfo',
-- 'Vulkan.Core10.Enums.VertexInputRate.VertexInputRate'
data VertexInputBindingDescription = VertexInputBindingDescription
  { -- | @binding@ is the binding number that this structure describes.
    VertexInputBindingDescription -> "createInfoCount" ::: Word32
binding :: Word32
  , -- | @stride@ is the byte stride between consecutive elements within the
    -- buffer.
    VertexInputBindingDescription -> "createInfoCount" ::: Word32
stride :: Word32
  , -- | @inputRate@ is a 'Vulkan.Core10.Enums.VertexInputRate.VertexInputRate'
    -- value specifying whether vertex attribute addressing is a function of
    -- the vertex index or of the instance index.
    VertexInputBindingDescription -> VertexInputRate
inputRate :: VertexInputRate
  }
  deriving (Typeable, VertexInputBindingDescription
-> VertexInputBindingDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VertexInputBindingDescription
-> VertexInputBindingDescription -> Bool
$c/= :: VertexInputBindingDescription
-> VertexInputBindingDescription -> Bool
== :: VertexInputBindingDescription
-> VertexInputBindingDescription -> Bool
$c== :: VertexInputBindingDescription
-> VertexInputBindingDescription -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (VertexInputBindingDescription)
#endif
deriving instance Show VertexInputBindingDescription

instance ToCStruct VertexInputBindingDescription where
  withCStruct :: forall b.
VertexInputBindingDescription
-> (Ptr VertexInputBindingDescription -> IO b) -> IO b
withCStruct VertexInputBindingDescription
x Ptr VertexInputBindingDescription -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
12 forall a b. (a -> b) -> a -> b
$ \Ptr VertexInputBindingDescription
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr VertexInputBindingDescription
p VertexInputBindingDescription
x (Ptr VertexInputBindingDescription -> IO b
f Ptr VertexInputBindingDescription
p)
  pokeCStruct :: forall b.
Ptr VertexInputBindingDescription
-> VertexInputBindingDescription -> IO b -> IO b
pokeCStruct Ptr VertexInputBindingDescription
p VertexInputBindingDescription{"createInfoCount" ::: Word32
VertexInputRate
inputRate :: VertexInputRate
stride :: "createInfoCount" ::: Word32
binding :: "createInfoCount" ::: Word32
$sel:inputRate:VertexInputBindingDescription :: VertexInputBindingDescription -> VertexInputRate
$sel:stride:VertexInputBindingDescription :: VertexInputBindingDescription -> "createInfoCount" ::: Word32
$sel:binding:VertexInputBindingDescription :: VertexInputBindingDescription -> "createInfoCount" ::: Word32
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputBindingDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) ("createInfoCount" ::: Word32
binding)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputBindingDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) ("createInfoCount" ::: Word32
stride)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputBindingDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr VertexInputRate)) (VertexInputRate
inputRate)
    IO b
f
  cStructSize :: Int
cStructSize = Int
12
  cStructAlignment :: Int
cStructAlignment = Int
4
  pokeZeroCStruct :: forall b. Ptr VertexInputBindingDescription -> IO b -> IO b
pokeZeroCStruct Ptr VertexInputBindingDescription
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputBindingDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputBindingDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputBindingDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr VertexInputRate)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct VertexInputBindingDescription where
  peekCStruct :: Ptr VertexInputBindingDescription
-> IO VertexInputBindingDescription
peekCStruct Ptr VertexInputBindingDescription
p = do
    "createInfoCount" ::: Word32
binding <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr VertexInputBindingDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
    "createInfoCount" ::: Word32
stride <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr VertexInputBindingDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32))
    VertexInputRate
inputRate <- forall a. Storable a => Ptr a -> IO a
peek @VertexInputRate ((Ptr VertexInputBindingDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr VertexInputRate))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("createInfoCount" ::: Word32)
-> ("createInfoCount" ::: Word32)
-> VertexInputRate
-> VertexInputBindingDescription
VertexInputBindingDescription
             "createInfoCount" ::: Word32
binding "createInfoCount" ::: Word32
stride VertexInputRate
inputRate

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

instance Zero VertexInputBindingDescription where
  zero :: VertexInputBindingDescription
zero = ("createInfoCount" ::: Word32)
-> ("createInfoCount" ::: Word32)
-> VertexInputRate
-> VertexInputBindingDescription
VertexInputBindingDescription
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkVertexInputAttributeDescription - Structure specifying vertex input
-- attribute description
--
-- == Valid Usage
--
-- -   #VUID-VkVertexInputAttributeDescription-location-00620# @location@
--     /must/ be less than
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxVertexInputAttributes@
--
-- -   #VUID-VkVertexInputAttributeDescription-binding-00621# @binding@
--     /must/ be less than
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxVertexInputBindings@
--
-- -   #VUID-VkVertexInputAttributeDescription-offset-00622# @offset@
--     /must/ be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxVertexInputAttributeOffset@
--
-- -   #VUID-VkVertexInputAttributeDescription-format-00623# The
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#resources-buffer-view-format-features format features>
--     of @format@ /must/ contain
--     'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_VERTEX_BUFFER_BIT'
--
-- -   #VUID-VkVertexInputAttributeDescription-vertexAttributeAccessBeyondStride-04457#
--     If the @VK_KHR_portability_subset@ extension is enabled, and
--     'Vulkan.Extensions.VK_KHR_portability_subset.PhysicalDevicePortabilitySubsetFeaturesKHR'::@vertexAttributeAccessBeyondStride@
--     is 'Vulkan.Core10.FundamentalTypes.FALSE', the sum of @offset@ plus
--     the size of the vertex attribute data described by @format@ /must/
--     not be greater than @stride@ in the 'VertexInputBindingDescription'
--     referenced in @binding@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkVertexInputAttributeDescription-format-parameter# @format@
--     /must/ be a valid 'Vulkan.Core10.Enums.Format.Format' value
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Enums.Format.Format',
-- 'PipelineVertexInputStateCreateInfo'
data VertexInputAttributeDescription = VertexInputAttributeDescription
  { -- | @location@ is the shader input location number for this attribute.
    VertexInputAttributeDescription -> "createInfoCount" ::: Word32
location :: Word32
  , -- | @binding@ is the binding number which this attribute takes its data
    -- from.
    VertexInputAttributeDescription -> "createInfoCount" ::: Word32
binding :: Word32
  , -- | @format@ is the size and type of the vertex attribute data.
    VertexInputAttributeDescription -> Format
format :: Format
  , -- | @offset@ is a byte offset of this attribute relative to the start of an
    -- element in the vertex input binding.
    VertexInputAttributeDescription -> "createInfoCount" ::: Word32
offset :: Word32
  }
  deriving (Typeable, VertexInputAttributeDescription
-> VertexInputAttributeDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VertexInputAttributeDescription
-> VertexInputAttributeDescription -> Bool
$c/= :: VertexInputAttributeDescription
-> VertexInputAttributeDescription -> Bool
== :: VertexInputAttributeDescription
-> VertexInputAttributeDescription -> Bool
$c== :: VertexInputAttributeDescription
-> VertexInputAttributeDescription -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (VertexInputAttributeDescription)
#endif
deriving instance Show VertexInputAttributeDescription

instance ToCStruct VertexInputAttributeDescription where
  withCStruct :: forall b.
VertexInputAttributeDescription
-> (Ptr VertexInputAttributeDescription -> IO b) -> IO b
withCStruct VertexInputAttributeDescription
x Ptr VertexInputAttributeDescription -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
16 forall a b. (a -> b) -> a -> b
$ \Ptr VertexInputAttributeDescription
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr VertexInputAttributeDescription
p VertexInputAttributeDescription
x (Ptr VertexInputAttributeDescription -> IO b
f Ptr VertexInputAttributeDescription
p)
  pokeCStruct :: forall b.
Ptr VertexInputAttributeDescription
-> VertexInputAttributeDescription -> IO b -> IO b
pokeCStruct Ptr VertexInputAttributeDescription
p VertexInputAttributeDescription{"createInfoCount" ::: Word32
Format
offset :: "createInfoCount" ::: Word32
format :: Format
binding :: "createInfoCount" ::: Word32
location :: "createInfoCount" ::: Word32
$sel:offset:VertexInputAttributeDescription :: VertexInputAttributeDescription -> "createInfoCount" ::: Word32
$sel:format:VertexInputAttributeDescription :: VertexInputAttributeDescription -> Format
$sel:binding:VertexInputAttributeDescription :: VertexInputAttributeDescription -> "createInfoCount" ::: Word32
$sel:location:VertexInputAttributeDescription :: VertexInputAttributeDescription -> "createInfoCount" ::: Word32
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputAttributeDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) ("createInfoCount" ::: Word32
location)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputAttributeDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) ("createInfoCount" ::: Word32
binding)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputAttributeDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Format)) (Format
format)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputAttributeDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) ("createInfoCount" ::: Word32
offset)
    IO b
f
  cStructSize :: Int
cStructSize = Int
16
  cStructAlignment :: Int
cStructAlignment = Int
4
  pokeZeroCStruct :: forall b. Ptr VertexInputAttributeDescription -> IO b -> IO b
pokeZeroCStruct Ptr VertexInputAttributeDescription
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputAttributeDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputAttributeDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputAttributeDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Format)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr VertexInputAttributeDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct VertexInputAttributeDescription where
  peekCStruct :: Ptr VertexInputAttributeDescription
-> IO VertexInputAttributeDescription
peekCStruct Ptr VertexInputAttributeDescription
p = do
    "createInfoCount" ::: Word32
location <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr VertexInputAttributeDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
    "createInfoCount" ::: Word32
binding <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr VertexInputAttributeDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32))
    Format
format <- forall a. Storable a => Ptr a -> IO a
peek @Format ((Ptr VertexInputAttributeDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Format))
    "createInfoCount" ::: Word32
offset <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr VertexInputAttributeDescription
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("createInfoCount" ::: Word32)
-> ("createInfoCount" ::: Word32)
-> Format
-> ("createInfoCount" ::: Word32)
-> VertexInputAttributeDescription
VertexInputAttributeDescription
             "createInfoCount" ::: Word32
location "createInfoCount" ::: Word32
binding Format
format "createInfoCount" ::: Word32
offset

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

instance Zero VertexInputAttributeDescription where
  zero :: VertexInputAttributeDescription
zero = ("createInfoCount" ::: Word32)
-> ("createInfoCount" ::: Word32)
-> Format
-> ("createInfoCount" ::: Word32)
-> VertexInputAttributeDescription
VertexInputAttributeDescription
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkPipelineVertexInputStateCreateInfo - Structure specifying parameters
-- of a newly created pipeline vertex input state
--
-- == Valid Usage
--
-- -   #VUID-VkPipelineVertexInputStateCreateInfo-vertexBindingDescriptionCount-00613#
--     @vertexBindingDescriptionCount@ /must/ be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxVertexInputBindings@
--
-- -   #VUID-VkPipelineVertexInputStateCreateInfo-vertexAttributeDescriptionCount-00614#
--     @vertexAttributeDescriptionCount@ /must/ be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxVertexInputAttributes@
--
-- -   #VUID-VkPipelineVertexInputStateCreateInfo-binding-00615# For every
--     @binding@ specified by each element of
--     @pVertexAttributeDescriptions@, a 'VertexInputBindingDescription'
--     /must/ exist in @pVertexBindingDescriptions@ with the same value of
--     @binding@
--
-- -   #VUID-VkPipelineVertexInputStateCreateInfo-pVertexBindingDescriptions-00616#
--     All elements of @pVertexBindingDescriptions@ /must/ describe
--     distinct binding numbers
--
-- -   #VUID-VkPipelineVertexInputStateCreateInfo-pVertexAttributeDescriptions-00617#
--     All elements of @pVertexAttributeDescriptions@ /must/ describe
--     distinct attribute locations
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPipelineVertexInputStateCreateInfo-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO'
--
-- -   #VUID-VkPipelineVertexInputStateCreateInfo-pNext-pNext# @pNext@
--     /must/ be @NULL@ or a pointer to a valid instance of
--     'Vulkan.Extensions.VK_EXT_vertex_attribute_divisor.PipelineVertexInputDivisorStateCreateInfoEXT'
--
-- -   #VUID-VkPipelineVertexInputStateCreateInfo-sType-unique# The @sType@
--     value of each struct in the @pNext@ chain /must/ be unique
--
-- -   #VUID-VkPipelineVertexInputStateCreateInfo-flags-zerobitmask#
--     @flags@ /must/ be @0@
--
-- -   #VUID-VkPipelineVertexInputStateCreateInfo-pVertexBindingDescriptions-parameter#
--     If @vertexBindingDescriptionCount@ is not @0@,
--     @pVertexBindingDescriptions@ /must/ be a valid pointer to an array
--     of @vertexBindingDescriptionCount@ valid
--     'VertexInputBindingDescription' structures
--
-- -   #VUID-VkPipelineVertexInputStateCreateInfo-pVertexAttributeDescriptions-parameter#
--     If @vertexAttributeDescriptionCount@ is not @0@,
--     @pVertexAttributeDescriptions@ /must/ be a valid pointer to an array
--     of @vertexAttributeDescriptionCount@ valid
--     'VertexInputAttributeDescription' structures
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'GraphicsPipelineCreateInfo',
-- 'Vulkan.Extensions.VK_NV_device_generated_commands.GraphicsShaderGroupCreateInfoNV',
-- 'Vulkan.Core10.Enums.PipelineVertexInputStateCreateFlags.PipelineVertexInputStateCreateFlags',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'VertexInputAttributeDescription', 'VertexInputBindingDescription'
data PipelineVertexInputStateCreateInfo (es :: [Type]) = PipelineVertexInputStateCreateInfo
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]).
PipelineVertexInputStateCreateInfo es -> Chain es
next :: Chain es
  , -- | @flags@ is reserved for future use.
    forall (es :: [*]).
PipelineVertexInputStateCreateInfo es
-> PipelineVertexInputStateCreateFlags
flags :: PipelineVertexInputStateCreateFlags
  , -- | @pVertexBindingDescriptions@ is a pointer to an array of
    -- 'VertexInputBindingDescription' structures.
    forall (es :: [*]).
PipelineVertexInputStateCreateInfo es
-> Vector VertexInputBindingDescription
vertexBindingDescriptions :: Vector VertexInputBindingDescription
  , -- | @pVertexAttributeDescriptions@ is a pointer to an array of
    -- 'VertexInputAttributeDescription' structures.
    forall (es :: [*]).
PipelineVertexInputStateCreateInfo es
-> Vector VertexInputAttributeDescription
vertexAttributeDescriptions :: Vector VertexInputAttributeDescription
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineVertexInputStateCreateInfo (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (PipelineVertexInputStateCreateInfo es)

instance Extensible PipelineVertexInputStateCreateInfo where
  extensibleTypeName :: String
extensibleTypeName = String
"PipelineVertexInputStateCreateInfo"
  setNext :: forall (ds :: [*]) (es :: [*]).
PipelineVertexInputStateCreateInfo ds
-> Chain es -> PipelineVertexInputStateCreateInfo es
setNext PipelineVertexInputStateCreateInfo{Vector VertexInputBindingDescription
Vector VertexInputAttributeDescription
Chain ds
PipelineVertexInputStateCreateFlags
vertexAttributeDescriptions :: Vector VertexInputAttributeDescription
vertexBindingDescriptions :: Vector VertexInputBindingDescription
flags :: PipelineVertexInputStateCreateFlags
next :: Chain ds
$sel:vertexAttributeDescriptions:PipelineVertexInputStateCreateInfo :: forall (es :: [*]).
PipelineVertexInputStateCreateInfo es
-> Vector VertexInputAttributeDescription
$sel:vertexBindingDescriptions:PipelineVertexInputStateCreateInfo :: forall (es :: [*]).
PipelineVertexInputStateCreateInfo es
-> Vector VertexInputBindingDescription
$sel:flags:PipelineVertexInputStateCreateInfo :: forall (es :: [*]).
PipelineVertexInputStateCreateInfo es
-> PipelineVertexInputStateCreateFlags
$sel:next:PipelineVertexInputStateCreateInfo :: forall (es :: [*]).
PipelineVertexInputStateCreateInfo es -> Chain es
..} Chain es
next' = PipelineVertexInputStateCreateInfo{$sel:next:PipelineVertexInputStateCreateInfo :: Chain es
next = Chain es
next', Vector VertexInputBindingDescription
Vector VertexInputAttributeDescription
PipelineVertexInputStateCreateFlags
vertexAttributeDescriptions :: Vector VertexInputAttributeDescription
vertexBindingDescriptions :: Vector VertexInputBindingDescription
flags :: PipelineVertexInputStateCreateFlags
$sel:vertexAttributeDescriptions:PipelineVertexInputStateCreateInfo :: Vector VertexInputAttributeDescription
$sel:vertexBindingDescriptions:PipelineVertexInputStateCreateInfo :: Vector VertexInputBindingDescription
$sel:flags:PipelineVertexInputStateCreateInfo :: PipelineVertexInputStateCreateFlags
..}
  getNext :: forall (es :: [*]).
PipelineVertexInputStateCreateInfo es -> Chain es
getNext PipelineVertexInputStateCreateInfo{Vector VertexInputBindingDescription
Vector VertexInputAttributeDescription
Chain es
PipelineVertexInputStateCreateFlags
vertexAttributeDescriptions :: Vector VertexInputAttributeDescription
vertexBindingDescriptions :: Vector VertexInputBindingDescription
flags :: PipelineVertexInputStateCreateFlags
next :: Chain es
$sel:vertexAttributeDescriptions:PipelineVertexInputStateCreateInfo :: forall (es :: [*]).
PipelineVertexInputStateCreateInfo es
-> Vector VertexInputAttributeDescription
$sel:vertexBindingDescriptions:PipelineVertexInputStateCreateInfo :: forall (es :: [*]).
PipelineVertexInputStateCreateInfo es
-> Vector VertexInputBindingDescription
$sel:flags:PipelineVertexInputStateCreateInfo :: forall (es :: [*]).
PipelineVertexInputStateCreateInfo es
-> PipelineVertexInputStateCreateFlags
$sel:next:PipelineVertexInputStateCreateInfo :: forall (es :: [*]).
PipelineVertexInputStateCreateInfo es -> Chain es
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends PipelineVertexInputStateCreateInfo e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends PipelineVertexInputStateCreateInfo e => b) -> Maybe b
extends proxy e
_ Extends PipelineVertexInputStateCreateInfo e => b
f
    | Just e :~: PipelineVertexInputDivisorStateCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineVertexInputDivisorStateCreateInfoEXT = forall a. a -> Maybe a
Just Extends PipelineVertexInputStateCreateInfo e => b
f
    | Bool
otherwise = forall a. Maybe a
Nothing

instance ( Extendss PipelineVertexInputStateCreateInfo es
         , PokeChain es ) => ToCStruct (PipelineVertexInputStateCreateInfo es) where
  withCStruct :: forall b.
PipelineVertexInputStateCreateInfo es
-> (Ptr (PipelineVertexInputStateCreateInfo es) -> IO b) -> IO b
withCStruct PipelineVertexInputStateCreateInfo es
x Ptr (PipelineVertexInputStateCreateInfo es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineVertexInputStateCreateInfo es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (PipelineVertexInputStateCreateInfo es)
p PipelineVertexInputStateCreateInfo es
x (Ptr (PipelineVertexInputStateCreateInfo es) -> IO b
f Ptr (PipelineVertexInputStateCreateInfo es)
p)
  pokeCStruct :: forall b.
Ptr (PipelineVertexInputStateCreateInfo es)
-> PipelineVertexInputStateCreateInfo es -> IO b -> IO b
pokeCStruct Ptr (PipelineVertexInputStateCreateInfo es)
p PipelineVertexInputStateCreateInfo{Vector VertexInputBindingDescription
Vector VertexInputAttributeDescription
Chain es
PipelineVertexInputStateCreateFlags
vertexAttributeDescriptions :: Vector VertexInputAttributeDescription
vertexBindingDescriptions :: Vector VertexInputBindingDescription
flags :: PipelineVertexInputStateCreateFlags
next :: Chain es
$sel:vertexAttributeDescriptions:PipelineVertexInputStateCreateInfo :: forall (es :: [*]).
PipelineVertexInputStateCreateInfo es
-> Vector VertexInputAttributeDescription
$sel:vertexBindingDescriptions:PipelineVertexInputStateCreateInfo :: forall (es :: [*]).
PipelineVertexInputStateCreateInfo es
-> Vector VertexInputBindingDescription
$sel:flags:PipelineVertexInputStateCreateInfo :: forall (es :: [*]).
PipelineVertexInputStateCreateInfo es
-> PipelineVertexInputStateCreateFlags
$sel:next:PipelineVertexInputStateCreateInfo :: forall (es :: [*]).
PipelineVertexInputStateCreateInfo 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 (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO)
    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 (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineVertexInputStateCreateFlags)) (PipelineVertexInputStateCreateFlags
flags)
    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 (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) ((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
$ (Vector VertexInputBindingDescription
vertexBindingDescriptions)) :: Word32))
    Ptr VertexInputBindingDescription
pPVertexBindingDescriptions' <- 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 @VertexInputBindingDescription ((forall a. Vector a -> Int
Data.Vector.length (Vector VertexInputBindingDescription
vertexBindingDescriptions)) forall a. Num a => a -> a -> a
* Int
12)
    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 VertexInputBindingDescription
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr VertexInputBindingDescription
pPVertexBindingDescriptions' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
12 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr VertexInputBindingDescription) (VertexInputBindingDescription
e)) (Vector VertexInputBindingDescription
vertexBindingDescriptions)
    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 (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr VertexInputBindingDescription))) (Ptr VertexInputBindingDescription
pPVertexBindingDescriptions')
    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 (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) ((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
$ (Vector VertexInputAttributeDescription
vertexAttributeDescriptions)) :: Word32))
    Ptr VertexInputAttributeDescription
pPVertexAttributeDescriptions' <- 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 @VertexInputAttributeDescription ((forall a. Vector a -> Int
Data.Vector.length (Vector VertexInputAttributeDescription
vertexAttributeDescriptions)) forall a. Num a => a -> a -> a
* Int
16)
    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 VertexInputAttributeDescription
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr VertexInputAttributeDescription
pPVertexAttributeDescriptions' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
16 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr VertexInputAttributeDescription) (VertexInputAttributeDescription
e)) (Vector VertexInputAttributeDescription
vertexAttributeDescriptions)
    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 (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr VertexInputAttributeDescription))) (Ptr VertexInputAttributeDescription
pPVertexAttributeDescriptions')
    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
48
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr (PipelineVertexInputStateCreateInfo es) -> IO b -> IO b
pokeZeroCStruct Ptr (PipelineVertexInputStateCreateInfo 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 (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO)
    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 (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext'
    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 PipelineVertexInputStateCreateInfo es
         , PeekChain es ) => FromCStruct (PipelineVertexInputStateCreateInfo es) where
  peekCStruct :: Ptr (PipelineVertexInputStateCreateInfo es)
-> IO (PipelineVertexInputStateCreateInfo es)
peekCStruct Ptr (PipelineVertexInputStateCreateInfo es)
p = do
    Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (PipelineVertexInputStateCreateInfo 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 Ptr ()
pNext)
    PipelineVertexInputStateCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineVertexInputStateCreateFlags ((Ptr (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineVertexInputStateCreateFlags))
    "createInfoCount" ::: Word32
vertexBindingDescriptionCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
    Ptr VertexInputBindingDescription
pVertexBindingDescriptions <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr VertexInputBindingDescription) ((Ptr (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr VertexInputBindingDescription)))
    Vector VertexInputBindingDescription
pVertexBindingDescriptions' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral "createInfoCount" ::: Word32
vertexBindingDescriptionCount) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @VertexInputBindingDescription ((Ptr VertexInputBindingDescription
pVertexBindingDescriptions forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
12 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr VertexInputBindingDescription)))
    "createInfoCount" ::: Word32
vertexAttributeDescriptionCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
    Ptr VertexInputAttributeDescription
pVertexAttributeDescriptions <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr VertexInputAttributeDescription) ((Ptr (PipelineVertexInputStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr VertexInputAttributeDescription)))
    Vector VertexInputAttributeDescription
pVertexAttributeDescriptions' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral "createInfoCount" ::: Word32
vertexAttributeDescriptionCount) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @VertexInputAttributeDescription ((Ptr VertexInputAttributeDescription
pVertexAttributeDescriptions forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
16 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr VertexInputAttributeDescription)))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> PipelineVertexInputStateCreateFlags
-> Vector VertexInputBindingDescription
-> Vector VertexInputAttributeDescription
-> PipelineVertexInputStateCreateInfo es
PipelineVertexInputStateCreateInfo
             Chain es
next
             PipelineVertexInputStateCreateFlags
flags
             Vector VertexInputBindingDescription
pVertexBindingDescriptions'
             Vector VertexInputAttributeDescription
pVertexAttributeDescriptions'

instance es ~ '[] => Zero (PipelineVertexInputStateCreateInfo es) where
  zero :: PipelineVertexInputStateCreateInfo es
zero = forall (es :: [*]).
Chain es
-> PipelineVertexInputStateCreateFlags
-> Vector VertexInputBindingDescription
-> Vector VertexInputAttributeDescription
-> PipelineVertexInputStateCreateInfo es
PipelineVertexInputStateCreateInfo
           ()
           forall a. Zero a => a
zero
           forall a. Monoid a => a
mempty
           forall a. Monoid a => a
mempty


-- | VkPipelineInputAssemblyStateCreateInfo - Structure specifying parameters
-- of a newly created pipeline input assembly state
--
-- = Description
--
-- Restarting the assembly of primitives discards the most recent index
-- values if those elements formed an incomplete primitive, and restarts
-- the primitive assembly using the subsequent indices, but only assembling
-- the immediately following element through the end of the originally
-- specified elements. The primitive restart index value comparison is
-- performed before adding the @vertexOffset@ value to the index value.
--
-- == Valid Usage
--
-- -   #VUID-VkPipelineInputAssemblyStateCreateInfo-topology-06252# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-primitiveTopologyListRestart primitiveTopologyListRestart>
--     feature is not enabled, and @topology@ is
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_POINT_LIST',
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_LINE_LIST',
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_TRIANGLE_LIST',
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY',
--     or
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY',
--     @primitiveRestartEnable@ /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkPipelineInputAssemblyStateCreateInfo-topology-06253# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-primitiveTopologyPatchListRestart primitiveTopologyPatchListRestart>
--     feature is not enabled, and @topology@ is
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_PATCH_LIST',
--     @primitiveRestartEnable@ /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00429# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-geometryShader geometryShader>
--     feature is not enabled, @topology@ /must/ not be any of
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY',
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY',
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY'
--     or
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY'
--
-- -   #VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00430# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-tessellationShader tessellationShader>
--     feature is not enabled, @topology@ /must/ not be
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_PATCH_LIST'
--
-- -   #VUID-VkPipelineInputAssemblyStateCreateInfo-triangleFans-04452# If
--     the @VK_KHR_portability_subset@ extension is enabled, and
--     'Vulkan.Extensions.VK_KHR_portability_subset.PhysicalDevicePortabilitySubsetFeaturesKHR'::@triangleFans@
--     is 'Vulkan.Core10.FundamentalTypes.FALSE', @topology@ /must/ not be
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_TRIANGLE_FAN'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPipelineInputAssemblyStateCreateInfo-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO'
--
-- -   #VUID-VkPipelineInputAssemblyStateCreateInfo-pNext-pNext# @pNext@
--     /must/ be @NULL@
--
-- -   #VUID-VkPipelineInputAssemblyStateCreateInfo-flags-zerobitmask#
--     @flags@ /must/ be @0@
--
-- -   #VUID-VkPipelineInputAssemblyStateCreateInfo-topology-parameter#
--     @topology@ /must/ be a valid
--     'Vulkan.Core10.Enums.PrimitiveTopology.PrimitiveTopology' value
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32', 'GraphicsPipelineCreateInfo',
-- 'Vulkan.Core10.Enums.PipelineInputAssemblyStateCreateFlags.PipelineInputAssemblyStateCreateFlags',
-- 'Vulkan.Core10.Enums.PrimitiveTopology.PrimitiveTopology',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PipelineInputAssemblyStateCreateInfo = PipelineInputAssemblyStateCreateInfo
  { -- | @flags@ is reserved for future use.
    PipelineInputAssemblyStateCreateInfo
-> PipelineInputAssemblyStateCreateFlags
flags :: PipelineInputAssemblyStateCreateFlags
  , -- | @topology@ is a
    -- 'Vulkan.Core10.Enums.PrimitiveTopology.PrimitiveTopology' defining the
    -- primitive topology, as described below.
    PipelineInputAssemblyStateCreateInfo -> PrimitiveTopology
topology :: PrimitiveTopology
  , -- | @primitiveRestartEnable@ controls whether a special vertex index value
    -- is treated as restarting the assembly of primitives. This enable only
    -- applies to indexed draws
    -- ('Vulkan.Core10.CommandBufferBuilding.cmdDrawIndexed',
    -- 'Vulkan.Extensions.VK_EXT_multi_draw.cmdDrawMultiIndexedEXT', and
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdDrawIndexedIndirect'), and the
    -- special index value is either 0xFFFFFFFF when the @indexType@ parameter
    -- of 'Vulkan.Extensions.VK_KHR_maintenance5.cmdBindIndexBuffer2KHR' or
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdBindIndexBuffer' is equal to
    -- 'Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT32', 0xFF when @indexType@
    -- is equal to 'Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT8_EXT', or
    -- 0xFFFF when @indexType@ is equal to
    -- 'Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT16'. Primitive restart is
    -- not allowed for “list” topologies, unless one of the features
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-primitiveTopologyPatchListRestart primitiveTopologyPatchListRestart>
    -- (for
    -- 'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_PATCH_LIST')
    -- or
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-primitiveTopologyListRestart primitiveTopologyListRestart>
    -- (for all other list topologies) is enabled.
    PipelineInputAssemblyStateCreateInfo -> Bool
primitiveRestartEnable :: Bool
  }
  deriving (Typeable, PipelineInputAssemblyStateCreateInfo
-> PipelineInputAssemblyStateCreateInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineInputAssemblyStateCreateInfo
-> PipelineInputAssemblyStateCreateInfo -> Bool
$c/= :: PipelineInputAssemblyStateCreateInfo
-> PipelineInputAssemblyStateCreateInfo -> Bool
== :: PipelineInputAssemblyStateCreateInfo
-> PipelineInputAssemblyStateCreateInfo -> Bool
$c== :: PipelineInputAssemblyStateCreateInfo
-> PipelineInputAssemblyStateCreateInfo -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineInputAssemblyStateCreateInfo)
#endif
deriving instance Show PipelineInputAssemblyStateCreateInfo

instance ToCStruct PipelineInputAssemblyStateCreateInfo where
  withCStruct :: forall b.
PipelineInputAssemblyStateCreateInfo
-> (Ptr PipelineInputAssemblyStateCreateInfo -> IO b) -> IO b
withCStruct PipelineInputAssemblyStateCreateInfo
x Ptr PipelineInputAssemblyStateCreateInfo -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PipelineInputAssemblyStateCreateInfo
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineInputAssemblyStateCreateInfo
p PipelineInputAssemblyStateCreateInfo
x (Ptr PipelineInputAssemblyStateCreateInfo -> IO b
f Ptr PipelineInputAssemblyStateCreateInfo
p)
  pokeCStruct :: forall b.
Ptr PipelineInputAssemblyStateCreateInfo
-> PipelineInputAssemblyStateCreateInfo -> IO b -> IO b
pokeCStruct Ptr PipelineInputAssemblyStateCreateInfo
p PipelineInputAssemblyStateCreateInfo{Bool
PrimitiveTopology
PipelineInputAssemblyStateCreateFlags
primitiveRestartEnable :: Bool
topology :: PrimitiveTopology
flags :: PipelineInputAssemblyStateCreateFlags
$sel:primitiveRestartEnable:PipelineInputAssemblyStateCreateInfo :: PipelineInputAssemblyStateCreateInfo -> Bool
$sel:topology:PipelineInputAssemblyStateCreateInfo :: PipelineInputAssemblyStateCreateInfo -> PrimitiveTopology
$sel:flags:PipelineInputAssemblyStateCreateInfo :: PipelineInputAssemblyStateCreateInfo
-> PipelineInputAssemblyStateCreateFlags
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineInputAssemblyStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineInputAssemblyStateCreateInfo
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 PipelineInputAssemblyStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineInputAssemblyStateCreateFlags)) (PipelineInputAssemblyStateCreateFlags
flags)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineInputAssemblyStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr PrimitiveTopology)) (PrimitiveTopology
topology)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineInputAssemblyStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
primitiveRestartEnable))
    IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr PipelineInputAssemblyStateCreateInfo -> IO b -> IO b
pokeZeroCStruct Ptr PipelineInputAssemblyStateCreateInfo
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineInputAssemblyStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineInputAssemblyStateCreateInfo
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 PipelineInputAssemblyStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr PrimitiveTopology)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineInputAssemblyStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PipelineInputAssemblyStateCreateInfo where
  peekCStruct :: Ptr PipelineInputAssemblyStateCreateInfo
-> IO PipelineInputAssemblyStateCreateInfo
peekCStruct Ptr PipelineInputAssemblyStateCreateInfo
p = do
    PipelineInputAssemblyStateCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineInputAssemblyStateCreateFlags ((Ptr PipelineInputAssemblyStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineInputAssemblyStateCreateFlags))
    PrimitiveTopology
topology <- forall a. Storable a => Ptr a -> IO a
peek @PrimitiveTopology ((Ptr PipelineInputAssemblyStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr PrimitiveTopology))
    Bool32
primitiveRestartEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PipelineInputAssemblyStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ PipelineInputAssemblyStateCreateFlags
-> PrimitiveTopology
-> Bool
-> PipelineInputAssemblyStateCreateInfo
PipelineInputAssemblyStateCreateInfo
             PipelineInputAssemblyStateCreateFlags
flags PrimitiveTopology
topology (Bool32 -> Bool
bool32ToBool Bool32
primitiveRestartEnable)

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

instance Zero PipelineInputAssemblyStateCreateInfo where
  zero :: PipelineInputAssemblyStateCreateInfo
zero = PipelineInputAssemblyStateCreateFlags
-> PrimitiveTopology
-> Bool
-> PipelineInputAssemblyStateCreateInfo
PipelineInputAssemblyStateCreateInfo
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkPipelineTessellationStateCreateInfo - Structure specifying parameters
-- of a newly created pipeline tessellation state
--
-- == Valid Usage
--
-- -   #VUID-VkPipelineTessellationStateCreateInfo-patchControlPoints-01214#
--     @patchControlPoints@ /must/ be greater than zero and less than or
--     equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxTessellationPatchSize@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPipelineTessellationStateCreateInfo-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO'
--
-- -   #VUID-VkPipelineTessellationStateCreateInfo-pNext-pNext# @pNext@
--     /must/ be @NULL@ or a pointer to a valid instance of
--     'Vulkan.Core11.Promoted_From_VK_KHR_maintenance2.PipelineTessellationDomainOriginStateCreateInfo'
--
-- -   #VUID-VkPipelineTessellationStateCreateInfo-sType-unique# The
--     @sType@ value of each struct in the @pNext@ chain /must/ be unique
--
-- -   #VUID-VkPipelineTessellationStateCreateInfo-flags-zerobitmask#
--     @flags@ /must/ be @0@
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'GraphicsPipelineCreateInfo',
-- 'Vulkan.Extensions.VK_NV_device_generated_commands.GraphicsShaderGroupCreateInfoNV',
-- 'Vulkan.Core10.Enums.PipelineTessellationStateCreateFlags.PipelineTessellationStateCreateFlags',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PipelineTessellationStateCreateInfo (es :: [Type]) = PipelineTessellationStateCreateInfo
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]).
PipelineTessellationStateCreateInfo es -> Chain es
next :: Chain es
  , -- | @flags@ is reserved for future use.
    forall (es :: [*]).
PipelineTessellationStateCreateInfo es
-> PipelineTessellationStateCreateFlags
flags :: PipelineTessellationStateCreateFlags
  , -- | @patchControlPoints@ is the number of control points per patch.
    forall (es :: [*]).
PipelineTessellationStateCreateInfo es
-> "createInfoCount" ::: Word32
patchControlPoints :: Word32
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineTessellationStateCreateInfo (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (PipelineTessellationStateCreateInfo es)

instance Extensible PipelineTessellationStateCreateInfo where
  extensibleTypeName :: String
extensibleTypeName = String
"PipelineTessellationStateCreateInfo"
  setNext :: forall (ds :: [*]) (es :: [*]).
PipelineTessellationStateCreateInfo ds
-> Chain es -> PipelineTessellationStateCreateInfo es
setNext PipelineTessellationStateCreateInfo{"createInfoCount" ::: Word32
Chain ds
PipelineTessellationStateCreateFlags
patchControlPoints :: "createInfoCount" ::: Word32
flags :: PipelineTessellationStateCreateFlags
next :: Chain ds
$sel:patchControlPoints:PipelineTessellationStateCreateInfo :: forall (es :: [*]).
PipelineTessellationStateCreateInfo es
-> "createInfoCount" ::: Word32
$sel:flags:PipelineTessellationStateCreateInfo :: forall (es :: [*]).
PipelineTessellationStateCreateInfo es
-> PipelineTessellationStateCreateFlags
$sel:next:PipelineTessellationStateCreateInfo :: forall (es :: [*]).
PipelineTessellationStateCreateInfo es -> Chain es
..} Chain es
next' = PipelineTessellationStateCreateInfo{$sel:next:PipelineTessellationStateCreateInfo :: Chain es
next = Chain es
next', "createInfoCount" ::: Word32
PipelineTessellationStateCreateFlags
patchControlPoints :: "createInfoCount" ::: Word32
flags :: PipelineTessellationStateCreateFlags
$sel:patchControlPoints:PipelineTessellationStateCreateInfo :: "createInfoCount" ::: Word32
$sel:flags:PipelineTessellationStateCreateInfo :: PipelineTessellationStateCreateFlags
..}
  getNext :: forall (es :: [*]).
PipelineTessellationStateCreateInfo es -> Chain es
getNext PipelineTessellationStateCreateInfo{"createInfoCount" ::: Word32
Chain es
PipelineTessellationStateCreateFlags
patchControlPoints :: "createInfoCount" ::: Word32
flags :: PipelineTessellationStateCreateFlags
next :: Chain es
$sel:patchControlPoints:PipelineTessellationStateCreateInfo :: forall (es :: [*]).
PipelineTessellationStateCreateInfo es
-> "createInfoCount" ::: Word32
$sel:flags:PipelineTessellationStateCreateInfo :: forall (es :: [*]).
PipelineTessellationStateCreateInfo es
-> PipelineTessellationStateCreateFlags
$sel:next:PipelineTessellationStateCreateInfo :: forall (es :: [*]).
PipelineTessellationStateCreateInfo es -> Chain es
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends PipelineTessellationStateCreateInfo e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends PipelineTessellationStateCreateInfo e => b) -> Maybe b
extends proxy e
_ Extends PipelineTessellationStateCreateInfo e => b
f
    | Just e :~: PipelineTessellationDomainOriginStateCreateInfo
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineTessellationDomainOriginStateCreateInfo = forall a. a -> Maybe a
Just Extends PipelineTessellationStateCreateInfo e => b
f
    | Bool
otherwise = forall a. Maybe a
Nothing

instance ( Extendss PipelineTessellationStateCreateInfo es
         , PokeChain es ) => ToCStruct (PipelineTessellationStateCreateInfo es) where
  withCStruct :: forall b.
PipelineTessellationStateCreateInfo es
-> (Ptr (PipelineTessellationStateCreateInfo es) -> IO b) -> IO b
withCStruct PipelineTessellationStateCreateInfo es
x Ptr (PipelineTessellationStateCreateInfo es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineTessellationStateCreateInfo es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (PipelineTessellationStateCreateInfo es)
p PipelineTessellationStateCreateInfo es
x (Ptr (PipelineTessellationStateCreateInfo es) -> IO b
f Ptr (PipelineTessellationStateCreateInfo es)
p)
  pokeCStruct :: forall b.
Ptr (PipelineTessellationStateCreateInfo es)
-> PipelineTessellationStateCreateInfo es -> IO b -> IO b
pokeCStruct Ptr (PipelineTessellationStateCreateInfo es)
p PipelineTessellationStateCreateInfo{"createInfoCount" ::: Word32
Chain es
PipelineTessellationStateCreateFlags
patchControlPoints :: "createInfoCount" ::: Word32
flags :: PipelineTessellationStateCreateFlags
next :: Chain es
$sel:patchControlPoints:PipelineTessellationStateCreateInfo :: forall (es :: [*]).
PipelineTessellationStateCreateInfo es
-> "createInfoCount" ::: Word32
$sel:flags:PipelineTessellationStateCreateInfo :: forall (es :: [*]).
PipelineTessellationStateCreateInfo es
-> PipelineTessellationStateCreateFlags
$sel:next:PipelineTessellationStateCreateInfo :: forall (es :: [*]).
PipelineTessellationStateCreateInfo 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 (PipelineTessellationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO)
    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 (PipelineTessellationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (PipelineTessellationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineTessellationStateCreateFlags)) (PipelineTessellationStateCreateFlags
flags)
    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 (PipelineTessellationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) ("createInfoCount" ::: Word32
patchControlPoints)
    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
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr (PipelineTessellationStateCreateInfo es) -> IO b -> IO b
pokeZeroCStruct Ptr (PipelineTessellationStateCreateInfo 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 (PipelineTessellationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO)
    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 (PipelineTessellationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (PipelineTessellationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (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 PipelineTessellationStateCreateInfo es
         , PeekChain es ) => FromCStruct (PipelineTessellationStateCreateInfo es) where
  peekCStruct :: Ptr (PipelineTessellationStateCreateInfo es)
-> IO (PipelineTessellationStateCreateInfo es)
peekCStruct Ptr (PipelineTessellationStateCreateInfo es)
p = do
    Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (PipelineTessellationStateCreateInfo 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 Ptr ()
pNext)
    PipelineTessellationStateCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineTessellationStateCreateFlags ((Ptr (PipelineTessellationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineTessellationStateCreateFlags))
    "createInfoCount" ::: Word32
patchControlPoints <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (PipelineTessellationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> PipelineTessellationStateCreateFlags
-> ("createInfoCount" ::: Word32)
-> PipelineTessellationStateCreateInfo es
PipelineTessellationStateCreateInfo
             Chain es
next PipelineTessellationStateCreateFlags
flags "createInfoCount" ::: Word32
patchControlPoints

instance es ~ '[] => Zero (PipelineTessellationStateCreateInfo es) where
  zero :: PipelineTessellationStateCreateInfo es
zero = forall (es :: [*]).
Chain es
-> PipelineTessellationStateCreateFlags
-> ("createInfoCount" ::: Word32)
-> PipelineTessellationStateCreateInfo es
PipelineTessellationStateCreateInfo
           ()
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkPipelineViewportStateCreateInfo - Structure specifying parameters of a
-- newly created pipeline viewport state
--
-- == Valid Usage
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-viewportCount-01216# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-multiViewport multiViewport>
--     feature is not enabled, @viewportCount@ /must/ not be greater than
--     @1@
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-scissorCount-01217# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-multiViewport multiViewport>
--     feature is not enabled, @scissorCount@ /must/ not be greater than
--     @1@
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-viewportCount-01218#
--     @viewportCount@ /must/ be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewports@
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-scissorCount-01219#
--     @scissorCount@ /must/ be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxViewports@
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-x-02821# The @x@ and @y@
--     members of @offset@ member of any element of @pScissors@ /must/ be
--     greater than or equal to @0@
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-offset-02822# Evaluation of
--     (@offset.x@ + @extent.width@) /must/ not cause a signed integer
--     addition overflow for any element of @pScissors@
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-offset-02823# Evaluation of
--     (@offset.y@ + @extent.height@) /must/ not cause a signed integer
--     addition overflow for any element of @pScissors@
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-scissorCount-04134# If
--     @scissorCount@ and @viewportCount@ are both not dynamic, then
--     @scissorCount@ and @viewportCount@ /must/ be identical
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-viewportCount-04135# If the
--     graphics pipeline is being created with
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT'
--     set then @viewportCount@ /must/ be @0@, otherwise it /must/ be
--     greater than @0@
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-scissorCount-04136# If the
--     graphics pipeline is being created with
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT'
--     set then @scissorCount@ /must/ be @0@, otherwise it /must/ be
--     greater than @0@
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-viewportWScalingEnable-01726#
--     If the @viewportWScalingEnable@ member of a
--     'Vulkan.Extensions.VK_NV_clip_space_w_scaling.PipelineViewportWScalingStateCreateInfoNV'
--     structure included in the @pNext@ chain is
--     'Vulkan.Core10.FundamentalTypes.TRUE', the @viewportCount@ member of
--     the
--     'Vulkan.Extensions.VK_NV_clip_space_w_scaling.PipelineViewportWScalingStateCreateInfoNV'
--     structure /must/ be greater than or equal to
--     'PipelineViewportStateCreateInfo'::@viewportCount@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-sType-sType# @sType@ /must/
--     be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO'
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-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_NV_shading_rate_image.PipelineViewportCoarseSampleOrderStateCreateInfoNV',
--     'Vulkan.Extensions.VK_EXT_depth_clip_control.PipelineViewportDepthClipControlCreateInfoEXT',
--     'Vulkan.Extensions.VK_NV_scissor_exclusive.PipelineViewportExclusiveScissorStateCreateInfoNV',
--     'Vulkan.Extensions.VK_NV_shading_rate_image.PipelineViewportShadingRateImageStateCreateInfoNV',
--     'Vulkan.Extensions.VK_NV_viewport_swizzle.PipelineViewportSwizzleStateCreateInfoNV',
--     or
--     'Vulkan.Extensions.VK_NV_clip_space_w_scaling.PipelineViewportWScalingStateCreateInfoNV'
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-sType-unique# The @sType@
--     value of each struct in the @pNext@ chain /must/ be unique
--
-- -   #VUID-VkPipelineViewportStateCreateInfo-flags-zerobitmask# @flags@
--     /must/ be @0@
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'GraphicsPipelineCreateInfo',
-- 'Vulkan.Core10.Enums.PipelineViewportStateCreateFlags.PipelineViewportStateCreateFlags',
-- 'Vulkan.Core10.FundamentalTypes.Rect2D',
-- 'Vulkan.Core10.Enums.StructureType.StructureType', 'Viewport'
data PipelineViewportStateCreateInfo (es :: [Type]) = PipelineViewportStateCreateInfo
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]). PipelineViewportStateCreateInfo es -> Chain es
next :: Chain es
  , -- | @flags@ is reserved for future use.
    forall (es :: [*]).
PipelineViewportStateCreateInfo es
-> PipelineViewportStateCreateFlags
flags :: PipelineViewportStateCreateFlags
  , -- | @viewportCount@ is the number of viewports used by the pipeline.
    forall (es :: [*]).
PipelineViewportStateCreateInfo es -> "createInfoCount" ::: Word32
viewportCount :: Word32
  , -- | @pViewports@ is a pointer to an array of 'Viewport' structures, defining
    -- the viewport transforms. If the viewport state is dynamic, this member
    -- is ignored.
    forall (es :: [*]).
PipelineViewportStateCreateInfo es -> Vector Viewport
viewports :: Vector Viewport
  , -- | @scissorCount@ is the number of
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-scissor scissors>
    -- and /must/ match the number of viewports.
    forall (es :: [*]).
PipelineViewportStateCreateInfo es -> "createInfoCount" ::: Word32
scissorCount :: Word32
  , -- | @pScissors@ is a pointer to an array of
    -- 'Vulkan.Core10.FundamentalTypes.Rect2D' structures defining the
    -- rectangular bounds of the scissor for the corresponding viewport. If the
    -- scissor state is dynamic, this member is ignored.
    forall (es :: [*]).
PipelineViewportStateCreateInfo es -> Vector Rect2D
scissors :: Vector Rect2D
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineViewportStateCreateInfo (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (PipelineViewportStateCreateInfo es)

instance Extensible PipelineViewportStateCreateInfo where
  extensibleTypeName :: String
extensibleTypeName = String
"PipelineViewportStateCreateInfo"
  setNext :: forall (ds :: [*]) (es :: [*]).
PipelineViewportStateCreateInfo ds
-> Chain es -> PipelineViewportStateCreateInfo es
setNext PipelineViewportStateCreateInfo{"createInfoCount" ::: Word32
Vector Rect2D
Vector Viewport
Chain ds
PipelineViewportStateCreateFlags
scissors :: Vector Rect2D
scissorCount :: "createInfoCount" ::: Word32
viewports :: Vector Viewport
viewportCount :: "createInfoCount" ::: Word32
flags :: PipelineViewportStateCreateFlags
next :: Chain ds
$sel:scissors:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es -> Vector Rect2D
$sel:scissorCount:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es -> "createInfoCount" ::: Word32
$sel:viewports:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es -> Vector Viewport
$sel:viewportCount:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es -> "createInfoCount" ::: Word32
$sel:flags:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es
-> PipelineViewportStateCreateFlags
$sel:next:PipelineViewportStateCreateInfo :: forall (es :: [*]). PipelineViewportStateCreateInfo es -> Chain es
..} Chain es
next' = PipelineViewportStateCreateInfo{$sel:next:PipelineViewportStateCreateInfo :: Chain es
next = Chain es
next', "createInfoCount" ::: Word32
Vector Rect2D
Vector Viewport
PipelineViewportStateCreateFlags
scissors :: Vector Rect2D
scissorCount :: "createInfoCount" ::: Word32
viewports :: Vector Viewport
viewportCount :: "createInfoCount" ::: Word32
flags :: PipelineViewportStateCreateFlags
$sel:scissors:PipelineViewportStateCreateInfo :: Vector Rect2D
$sel:scissorCount:PipelineViewportStateCreateInfo :: "createInfoCount" ::: Word32
$sel:viewports:PipelineViewportStateCreateInfo :: Vector Viewport
$sel:viewportCount:PipelineViewportStateCreateInfo :: "createInfoCount" ::: Word32
$sel:flags:PipelineViewportStateCreateInfo :: PipelineViewportStateCreateFlags
..}
  getNext :: forall (es :: [*]). PipelineViewportStateCreateInfo es -> Chain es
getNext PipelineViewportStateCreateInfo{"createInfoCount" ::: Word32
Vector Rect2D
Vector Viewport
Chain es
PipelineViewportStateCreateFlags
scissors :: Vector Rect2D
scissorCount :: "createInfoCount" ::: Word32
viewports :: Vector Viewport
viewportCount :: "createInfoCount" ::: Word32
flags :: PipelineViewportStateCreateFlags
next :: Chain es
$sel:scissors:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es -> Vector Rect2D
$sel:scissorCount:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es -> "createInfoCount" ::: Word32
$sel:viewports:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es -> Vector Viewport
$sel:viewportCount:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es -> "createInfoCount" ::: Word32
$sel:flags:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es
-> PipelineViewportStateCreateFlags
$sel:next:PipelineViewportStateCreateInfo :: forall (es :: [*]). PipelineViewportStateCreateInfo es -> Chain es
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends PipelineViewportStateCreateInfo e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends PipelineViewportStateCreateInfo e => b) -> Maybe b
extends proxy e
_ Extends PipelineViewportStateCreateInfo e => b
f
    | Just e :~: PipelineViewportDepthClipControlCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineViewportDepthClipControlCreateInfoEXT = forall a. a -> Maybe a
Just Extends PipelineViewportStateCreateInfo e => b
f
    | Just e :~: PipelineViewportCoarseSampleOrderStateCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineViewportCoarseSampleOrderStateCreateInfoNV = forall a. a -> Maybe a
Just Extends PipelineViewportStateCreateInfo e => b
f
    | Just e :~: PipelineViewportShadingRateImageStateCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineViewportShadingRateImageStateCreateInfoNV = forall a. a -> Maybe a
Just Extends PipelineViewportStateCreateInfo e => b
f
    | Just e :~: PipelineViewportExclusiveScissorStateCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineViewportExclusiveScissorStateCreateInfoNV = forall a. a -> Maybe a
Just Extends PipelineViewportStateCreateInfo e => b
f
    | Just e :~: PipelineViewportSwizzleStateCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineViewportSwizzleStateCreateInfoNV = forall a. a -> Maybe a
Just Extends PipelineViewportStateCreateInfo e => b
f
    | Just e :~: PipelineViewportWScalingStateCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineViewportWScalingStateCreateInfoNV = forall a. a -> Maybe a
Just Extends PipelineViewportStateCreateInfo e => b
f
    | Bool
otherwise = forall a. Maybe a
Nothing

instance ( Extendss PipelineViewportStateCreateInfo es
         , PokeChain es ) => ToCStruct (PipelineViewportStateCreateInfo es) where
  withCStruct :: forall b.
PipelineViewportStateCreateInfo es
-> (Ptr (PipelineViewportStateCreateInfo es) -> IO b) -> IO b
withCStruct PipelineViewportStateCreateInfo es
x Ptr (PipelineViewportStateCreateInfo es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineViewportStateCreateInfo es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (PipelineViewportStateCreateInfo es)
p PipelineViewportStateCreateInfo es
x (Ptr (PipelineViewportStateCreateInfo es) -> IO b
f Ptr (PipelineViewportStateCreateInfo es)
p)
  pokeCStruct :: forall b.
Ptr (PipelineViewportStateCreateInfo es)
-> PipelineViewportStateCreateInfo es -> IO b -> IO b
pokeCStruct Ptr (PipelineViewportStateCreateInfo es)
p PipelineViewportStateCreateInfo{"createInfoCount" ::: Word32
Vector Rect2D
Vector Viewport
Chain es
PipelineViewportStateCreateFlags
scissors :: Vector Rect2D
scissorCount :: "createInfoCount" ::: Word32
viewports :: Vector Viewport
viewportCount :: "createInfoCount" ::: Word32
flags :: PipelineViewportStateCreateFlags
next :: Chain es
$sel:scissors:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es -> Vector Rect2D
$sel:scissorCount:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es -> "createInfoCount" ::: Word32
$sel:viewports:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es -> Vector Viewport
$sel:viewportCount:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es -> "createInfoCount" ::: Word32
$sel:flags:PipelineViewportStateCreateInfo :: forall (es :: [*]).
PipelineViewportStateCreateInfo es
-> PipelineViewportStateCreateFlags
$sel:next:PipelineViewportStateCreateInfo :: forall (es :: [*]). PipelineViewportStateCreateInfo 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 (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO)
    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 (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineViewportStateCreateFlags)) (PipelineViewportStateCreateFlags
flags)
    let pViewportsLength :: Int
pViewportsLength = forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector Viewport
viewports)
    "createInfoCount" ::: Word32
viewportCount'' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ if ("createInfoCount" ::: Word32
viewportCount) forall a. Eq a => a -> a -> Bool
== "createInfoCount" ::: Word32
0
      then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pViewportsLength
      else do
        forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pViewportsLength forall a. Eq a => a -> a -> Bool
== ("createInfoCount" ::: Word32
viewportCount) Bool -> Bool -> Bool
|| Int
pViewportsLength forall a. Eq a => a -> a -> Bool
== Int
0) 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
"pViewports must be empty or have 'viewportCount' elements" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
        forall (f :: * -> *) a. Applicative f => a -> f a
pure ("createInfoCount" ::: Word32
viewportCount)
    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 (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) ("createInfoCount" ::: Word32
viewportCount'')
    Ptr Viewport
pViewports'' <- if forall a. Vector a -> Bool
Data.Vector.null (Vector Viewport
viewports)
      then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      else do
        Ptr Viewport
pPViewports <- 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 @Viewport (((forall a. Vector a -> Int
Data.Vector.length (Vector Viewport
viewports))) forall a. Num a => a -> a -> a
* Int
24)
        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 Viewport
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Viewport
pPViewports forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
24 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Viewport) (Viewport
e)) ((Vector Viewport
viewports))
        forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr Viewport
pPViewports
    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 (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Viewport))) Ptr Viewport
pViewports''
    let pScissorsLength :: Int
pScissorsLength = forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector Rect2D
scissors)
    "createInfoCount" ::: Word32
scissorCount'' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ if ("createInfoCount" ::: Word32
scissorCount) forall a. Eq a => a -> a -> Bool
== "createInfoCount" ::: Word32
0
      then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pScissorsLength
      else do
        forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pScissorsLength forall a. Eq a => a -> a -> Bool
== ("createInfoCount" ::: Word32
scissorCount) Bool -> Bool -> Bool
|| Int
pScissorsLength forall a. Eq a => a -> a -> Bool
== Int
0) 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
"pScissors must be empty or have 'scissorCount' elements" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
        forall (f :: * -> *) a. Applicative f => a -> f a
pure ("createInfoCount" ::: Word32
scissorCount)
    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 (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) ("createInfoCount" ::: Word32
scissorCount'')
    Ptr Rect2D
pScissors'' <- if forall a. Vector a -> Bool
Data.Vector.null (Vector Rect2D
scissors)
      then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      else do
        Ptr Rect2D
pPScissors <- 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 @Rect2D (((forall a. Vector a -> Int
Data.Vector.length (Vector Rect2D
scissors))) forall a. Num a => a -> a -> a
* Int
16)
        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 Rect2D
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Rect2D
pPScissors forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
16 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Rect2D) (Rect2D
e)) ((Vector Rect2D
scissors))
        forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr Rect2D
pPScissors
    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 (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr Rect2D))) Ptr Rect2D
pScissors''
    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
48
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr (PipelineViewportStateCreateInfo es) -> IO b -> IO b
pokeZeroCStruct Ptr (PipelineViewportStateCreateInfo 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 (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO)
    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 (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext'
    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 PipelineViewportStateCreateInfo es
         , PeekChain es ) => FromCStruct (PipelineViewportStateCreateInfo es) where
  peekCStruct :: Ptr (PipelineViewportStateCreateInfo es)
-> IO (PipelineViewportStateCreateInfo es)
peekCStruct Ptr (PipelineViewportStateCreateInfo es)
p = do
    Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (PipelineViewportStateCreateInfo 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 Ptr ()
pNext)
    PipelineViewportStateCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineViewportStateCreateFlags ((Ptr (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineViewportStateCreateFlags))
    "createInfoCount" ::: Word32
viewportCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
    Ptr Viewport
pViewports <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Viewport) ((Ptr (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Viewport)))
    let pViewportsLength :: Int
pViewportsLength = if Ptr Viewport
pViewports forall a. Eq a => a -> a -> Bool
== forall a. Ptr a
nullPtr then Int
0 else (forall a b. (Integral a, Num b) => a -> b
fromIntegral "createInfoCount" ::: Word32
viewportCount)
    Vector Viewport
pViewports' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM Int
pViewportsLength (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Viewport ((Ptr Viewport
pViewports forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
24 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Viewport)))
    "createInfoCount" ::: Word32
scissorCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
    Ptr Rect2D
pScissors <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Rect2D) ((Ptr (PipelineViewportStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr Rect2D)))
    let pScissorsLength :: Int
pScissorsLength = if Ptr Rect2D
pScissors forall a. Eq a => a -> a -> Bool
== forall a. Ptr a
nullPtr then Int
0 else (forall a b. (Integral a, Num b) => a -> b
fromIntegral "createInfoCount" ::: Word32
scissorCount)
    Vector Rect2D
pScissors' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM Int
pScissorsLength (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Rect2D ((Ptr Rect2D
pScissors forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
16 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Rect2D)))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> PipelineViewportStateCreateFlags
-> ("createInfoCount" ::: Word32)
-> Vector Viewport
-> ("createInfoCount" ::: Word32)
-> Vector Rect2D
-> PipelineViewportStateCreateInfo es
PipelineViewportStateCreateInfo
             Chain es
next PipelineViewportStateCreateFlags
flags "createInfoCount" ::: Word32
viewportCount Vector Viewport
pViewports' "createInfoCount" ::: Word32
scissorCount Vector Rect2D
pScissors'

instance es ~ '[] => Zero (PipelineViewportStateCreateInfo es) where
  zero :: PipelineViewportStateCreateInfo es
zero = forall (es :: [*]).
Chain es
-> PipelineViewportStateCreateFlags
-> ("createInfoCount" ::: Word32)
-> Vector Viewport
-> ("createInfoCount" ::: Word32)
-> Vector Rect2D
-> PipelineViewportStateCreateInfo es
PipelineViewportStateCreateInfo
           ()
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Monoid a => a
mempty
           forall a. Zero a => a
zero
           forall a. Monoid a => a
mempty


-- | VkPipelineRasterizationStateCreateInfo - Structure specifying parameters
-- of a newly created pipeline rasterization state
--
-- = Description
--
-- The application /can/ also add a
-- 'Vulkan.Extensions.VK_AMD_rasterization_order.PipelineRasterizationStateRasterizationOrderAMD'
-- structure to the @pNext@ chain of a
-- 'PipelineRasterizationStateCreateInfo' structure. This structure enables
-- selecting the rasterization order to use when rendering with the
-- corresponding graphics pipeline as described in
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-order Rasterization Order>.
--
-- == Valid Usage
--
-- -   #VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-depthClamp depthClamp>
--     feature is not enabled, @depthClampEnable@ /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-01507# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-fillModeNonSolid fillModeNonSolid>
--     feature is not enabled, @polygonMode@ /must/ be
--     'Vulkan.Core10.Enums.PolygonMode.POLYGON_MODE_FILL' or
--     'Vulkan.Core10.Enums.PolygonMode.POLYGON_MODE_FILL_RECTANGLE_NV'
--
-- -   #VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-01414# If
--     the @VK_NV_fill_rectangle@ extension is not enabled, @polygonMode@
--     /must/ not be
--     'Vulkan.Core10.Enums.PolygonMode.POLYGON_MODE_FILL_RECTANGLE_NV'
--
-- -   #VUID-VkPipelineRasterizationStateCreateInfo-pointPolygons-04458# If
--     the @VK_KHR_portability_subset@ extension is enabled, and
--     'Vulkan.Extensions.VK_KHR_portability_subset.PhysicalDevicePortabilitySubsetFeaturesKHR'::@pointPolygons@
--     is 'Vulkan.Core10.FundamentalTypes.FALSE', and
--     @rasterizerDiscardEnable@ is 'Vulkan.Core10.FundamentalTypes.FALSE',
--     @polygonMode@ /must/ not be
--     'Vulkan.Core10.Enums.PolygonMode.POLYGON_MODE_POINT'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPipelineRasterizationStateCreateInfo-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO'
--
-- -   #VUID-VkPipelineRasterizationStateCreateInfo-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_EXT_depth_bias_control.DepthBiasRepresentationInfoEXT',
--     'Vulkan.Extensions.VK_EXT_conservative_rasterization.PipelineRasterizationConservativeStateCreateInfoEXT',
--     'Vulkan.Extensions.VK_EXT_depth_clip_enable.PipelineRasterizationDepthClipStateCreateInfoEXT',
--     'Vulkan.Extensions.VK_EXT_line_rasterization.PipelineRasterizationLineStateCreateInfoEXT',
--     'Vulkan.Extensions.VK_EXT_provoking_vertex.PipelineRasterizationProvokingVertexStateCreateInfoEXT',
--     'Vulkan.Extensions.VK_AMD_rasterization_order.PipelineRasterizationStateRasterizationOrderAMD',
--     or
--     'Vulkan.Extensions.VK_EXT_transform_feedback.PipelineRasterizationStateStreamCreateInfoEXT'
--
-- -   #VUID-VkPipelineRasterizationStateCreateInfo-sType-unique# The
--     @sType@ value of each struct in the @pNext@ chain /must/ be unique
--
-- -   #VUID-VkPipelineRasterizationStateCreateInfo-flags-zerobitmask#
--     @flags@ /must/ be @0@
--
-- -   #VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-parameter#
--     @polygonMode@ /must/ be a valid
--     'Vulkan.Core10.Enums.PolygonMode.PolygonMode' value
--
-- -   #VUID-VkPipelineRasterizationStateCreateInfo-cullMode-parameter#
--     @cullMode@ /must/ be a valid combination of
--     'Vulkan.Core10.Enums.CullModeFlagBits.CullModeFlagBits' values
--
-- -   #VUID-VkPipelineRasterizationStateCreateInfo-frontFace-parameter#
--     @frontFace@ /must/ be a valid
--     'Vulkan.Core10.Enums.FrontFace.FrontFace' value
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.CullModeFlagBits.CullModeFlags',
-- 'Vulkan.Core10.Enums.FrontFace.FrontFace', 'GraphicsPipelineCreateInfo',
-- 'Vulkan.Core10.Enums.PipelineRasterizationStateCreateFlags.PipelineRasterizationStateCreateFlags',
-- 'Vulkan.Core10.Enums.PolygonMode.PolygonMode',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PipelineRasterizationStateCreateInfo (es :: [Type]) = PipelineRasterizationStateCreateInfo
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Chain es
next :: Chain es
  , -- | @flags@ is reserved for future use.
    forall (es :: [*]).
PipelineRasterizationStateCreateInfo es
-> PipelineRasterizationStateCreateFlags
flags :: PipelineRasterizationStateCreateFlags
  , -- | @depthClampEnable@ controls whether to clamp the fragment’s depth values
    -- as described in
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-depth Depth Test>.
    -- If the pipeline is not created with
    -- 'Vulkan.Extensions.VK_EXT_depth_clip_enable.PipelineRasterizationDepthClipStateCreateInfoEXT'
    -- present then enabling depth clamp will also disable clipping primitives
    -- to the z planes of the frustrum as described in
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#vertexpostproc-clipping Primitive Clipping>.
    -- Otherwise depth clipping is controlled by the state set in
    -- 'Vulkan.Extensions.VK_EXT_depth_clip_enable.PipelineRasterizationDepthClipStateCreateInfoEXT'.
    forall (es :: [*]). PipelineRasterizationStateCreateInfo es -> Bool
depthClampEnable :: Bool
  , -- | @rasterizerDiscardEnable@ controls whether primitives are discarded
    -- immediately before the rasterization stage.
    forall (es :: [*]). PipelineRasterizationStateCreateInfo es -> Bool
rasterizerDiscardEnable :: Bool
  , -- | @polygonMode@ is the triangle rendering mode. See
    -- 'Vulkan.Core10.Enums.PolygonMode.PolygonMode'.
    forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> PolygonMode
polygonMode :: PolygonMode
  , -- | @cullMode@ is the triangle facing direction used for primitive culling.
    -- See 'Vulkan.Core10.Enums.CullModeFlagBits.CullModeFlagBits'.
    forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> CullModeFlags
cullMode :: CullModeFlags
  , -- | @frontFace@ is a 'Vulkan.Core10.Enums.FrontFace.FrontFace' value
    -- specifying the front-facing triangle orientation to be used for culling.
    forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> FrontFace
frontFace :: FrontFace
  , -- | @depthBiasEnable@ controls whether to bias fragment depth values.
    forall (es :: [*]). PipelineRasterizationStateCreateInfo es -> Bool
depthBiasEnable :: Bool
  , -- | @depthBiasConstantFactor@ is a scalar factor controlling the constant
    -- depth value added to each fragment.
    forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
depthBiasConstantFactor :: Float
  , -- | @depthBiasClamp@ is the maximum (or minimum) depth bias of a fragment.
    forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
depthBiasClamp :: Float
  , -- | @depthBiasSlopeFactor@ is a scalar factor applied to a fragment’s slope
    -- in depth bias calculations.
    forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
depthBiasSlopeFactor :: Float
  , -- | @lineWidth@ is the width of rasterized line segments.
    forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
lineWidth :: Float
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineRasterizationStateCreateInfo (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (PipelineRasterizationStateCreateInfo es)

instance Extensible PipelineRasterizationStateCreateInfo where
  extensibleTypeName :: String
extensibleTypeName = String
"PipelineRasterizationStateCreateInfo"
  setNext :: forall (ds :: [*]) (es :: [*]).
PipelineRasterizationStateCreateInfo ds
-> Chain es -> PipelineRasterizationStateCreateInfo es
setNext PipelineRasterizationStateCreateInfo{Bool
Float
Chain ds
CullModeFlags
FrontFace
PolygonMode
PipelineRasterizationStateCreateFlags
lineWidth :: Float
depthBiasSlopeFactor :: Float
depthBiasClamp :: Float
depthBiasConstantFactor :: Float
depthBiasEnable :: Bool
frontFace :: FrontFace
cullMode :: CullModeFlags
polygonMode :: PolygonMode
rasterizerDiscardEnable :: Bool
depthClampEnable :: Bool
flags :: PipelineRasterizationStateCreateFlags
next :: Chain ds
$sel:lineWidth:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
$sel:depthBiasSlopeFactor:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
$sel:depthBiasClamp:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
$sel:depthBiasConstantFactor:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
$sel:depthBiasEnable:PipelineRasterizationStateCreateInfo :: forall (es :: [*]). PipelineRasterizationStateCreateInfo es -> Bool
$sel:frontFace:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> FrontFace
$sel:cullMode:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> CullModeFlags
$sel:polygonMode:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> PolygonMode
$sel:rasterizerDiscardEnable:PipelineRasterizationStateCreateInfo :: forall (es :: [*]). PipelineRasterizationStateCreateInfo es -> Bool
$sel:depthClampEnable:PipelineRasterizationStateCreateInfo :: forall (es :: [*]). PipelineRasterizationStateCreateInfo es -> Bool
$sel:flags:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es
-> PipelineRasterizationStateCreateFlags
$sel:next:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Chain es
..} Chain es
next' = PipelineRasterizationStateCreateInfo{$sel:next:PipelineRasterizationStateCreateInfo :: Chain es
next = Chain es
next', Bool
Float
CullModeFlags
FrontFace
PolygonMode
PipelineRasterizationStateCreateFlags
lineWidth :: Float
depthBiasSlopeFactor :: Float
depthBiasClamp :: Float
depthBiasConstantFactor :: Float
depthBiasEnable :: Bool
frontFace :: FrontFace
cullMode :: CullModeFlags
polygonMode :: PolygonMode
rasterizerDiscardEnable :: Bool
depthClampEnable :: Bool
flags :: PipelineRasterizationStateCreateFlags
$sel:lineWidth:PipelineRasterizationStateCreateInfo :: Float
$sel:depthBiasSlopeFactor:PipelineRasterizationStateCreateInfo :: Float
$sel:depthBiasClamp:PipelineRasterizationStateCreateInfo :: Float
$sel:depthBiasConstantFactor:PipelineRasterizationStateCreateInfo :: Float
$sel:depthBiasEnable:PipelineRasterizationStateCreateInfo :: Bool
$sel:frontFace:PipelineRasterizationStateCreateInfo :: FrontFace
$sel:cullMode:PipelineRasterizationStateCreateInfo :: CullModeFlags
$sel:polygonMode:PipelineRasterizationStateCreateInfo :: PolygonMode
$sel:rasterizerDiscardEnable:PipelineRasterizationStateCreateInfo :: Bool
$sel:depthClampEnable:PipelineRasterizationStateCreateInfo :: Bool
$sel:flags:PipelineRasterizationStateCreateInfo :: PipelineRasterizationStateCreateFlags
..}
  getNext :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Chain es
getNext PipelineRasterizationStateCreateInfo{Bool
Float
Chain es
CullModeFlags
FrontFace
PolygonMode
PipelineRasterizationStateCreateFlags
lineWidth :: Float
depthBiasSlopeFactor :: Float
depthBiasClamp :: Float
depthBiasConstantFactor :: Float
depthBiasEnable :: Bool
frontFace :: FrontFace
cullMode :: CullModeFlags
polygonMode :: PolygonMode
rasterizerDiscardEnable :: Bool
depthClampEnable :: Bool
flags :: PipelineRasterizationStateCreateFlags
next :: Chain es
$sel:lineWidth:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
$sel:depthBiasSlopeFactor:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
$sel:depthBiasClamp:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
$sel:depthBiasConstantFactor:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
$sel:depthBiasEnable:PipelineRasterizationStateCreateInfo :: forall (es :: [*]). PipelineRasterizationStateCreateInfo es -> Bool
$sel:frontFace:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> FrontFace
$sel:cullMode:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> CullModeFlags
$sel:polygonMode:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> PolygonMode
$sel:rasterizerDiscardEnable:PipelineRasterizationStateCreateInfo :: forall (es :: [*]). PipelineRasterizationStateCreateInfo es -> Bool
$sel:depthClampEnable:PipelineRasterizationStateCreateInfo :: forall (es :: [*]). PipelineRasterizationStateCreateInfo es -> Bool
$sel:flags:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es
-> PipelineRasterizationStateCreateFlags
$sel:next:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Chain es
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends PipelineRasterizationStateCreateInfo e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends PipelineRasterizationStateCreateInfo e => b) -> Maybe b
extends proxy e
_ Extends PipelineRasterizationStateCreateInfo e => b
f
    | Just e :~: DepthBiasRepresentationInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @DepthBiasRepresentationInfoEXT = forall a. a -> Maybe a
Just Extends PipelineRasterizationStateCreateInfo e => b
f
    | Just e :~: PipelineRasterizationProvokingVertexStateCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineRasterizationProvokingVertexStateCreateInfoEXT = forall a. a -> Maybe a
Just Extends PipelineRasterizationStateCreateInfo e => b
f
    | Just e :~: PipelineRasterizationLineStateCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineRasterizationLineStateCreateInfoEXT = forall a. a -> Maybe a
Just Extends PipelineRasterizationStateCreateInfo e => b
f
    | Just e :~: PipelineRasterizationDepthClipStateCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineRasterizationDepthClipStateCreateInfoEXT = forall a. a -> Maybe a
Just Extends PipelineRasterizationStateCreateInfo e => b
f
    | Just e :~: PipelineRasterizationStateStreamCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineRasterizationStateStreamCreateInfoEXT = forall a. a -> Maybe a
Just Extends PipelineRasterizationStateCreateInfo e => b
f
    | Just e :~: PipelineRasterizationConservativeStateCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineRasterizationConservativeStateCreateInfoEXT = forall a. a -> Maybe a
Just Extends PipelineRasterizationStateCreateInfo e => b
f
    | Just e :~: PipelineRasterizationStateRasterizationOrderAMD
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineRasterizationStateRasterizationOrderAMD = forall a. a -> Maybe a
Just Extends PipelineRasterizationStateCreateInfo e => b
f
    | Bool
otherwise = forall a. Maybe a
Nothing

instance ( Extendss PipelineRasterizationStateCreateInfo es
         , PokeChain es ) => ToCStruct (PipelineRasterizationStateCreateInfo es) where
  withCStruct :: forall b.
PipelineRasterizationStateCreateInfo es
-> (Ptr (PipelineRasterizationStateCreateInfo es) -> IO b) -> IO b
withCStruct PipelineRasterizationStateCreateInfo es
x Ptr (PipelineRasterizationStateCreateInfo es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineRasterizationStateCreateInfo es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (PipelineRasterizationStateCreateInfo es)
p PipelineRasterizationStateCreateInfo es
x (Ptr (PipelineRasterizationStateCreateInfo es) -> IO b
f Ptr (PipelineRasterizationStateCreateInfo es)
p)
  pokeCStruct :: forall b.
Ptr (PipelineRasterizationStateCreateInfo es)
-> PipelineRasterizationStateCreateInfo es -> IO b -> IO b
pokeCStruct Ptr (PipelineRasterizationStateCreateInfo es)
p PipelineRasterizationStateCreateInfo{Bool
Float
Chain es
CullModeFlags
FrontFace
PolygonMode
PipelineRasterizationStateCreateFlags
lineWidth :: Float
depthBiasSlopeFactor :: Float
depthBiasClamp :: Float
depthBiasConstantFactor :: Float
depthBiasEnable :: Bool
frontFace :: FrontFace
cullMode :: CullModeFlags
polygonMode :: PolygonMode
rasterizerDiscardEnable :: Bool
depthClampEnable :: Bool
flags :: PipelineRasterizationStateCreateFlags
next :: Chain es
$sel:lineWidth:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
$sel:depthBiasSlopeFactor:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
$sel:depthBiasClamp:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
$sel:depthBiasConstantFactor:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> Float
$sel:depthBiasEnable:PipelineRasterizationStateCreateInfo :: forall (es :: [*]). PipelineRasterizationStateCreateInfo es -> Bool
$sel:frontFace:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> FrontFace
$sel:cullMode:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> CullModeFlags
$sel:polygonMode:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es -> PolygonMode
$sel:rasterizerDiscardEnable:PipelineRasterizationStateCreateInfo :: forall (es :: [*]). PipelineRasterizationStateCreateInfo es -> Bool
$sel:depthClampEnable:PipelineRasterizationStateCreateInfo :: forall (es :: [*]). PipelineRasterizationStateCreateInfo es -> Bool
$sel:flags:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo es
-> PipelineRasterizationStateCreateFlags
$sel:next:PipelineRasterizationStateCreateInfo :: forall (es :: [*]).
PipelineRasterizationStateCreateInfo 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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO)
    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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineRasterizationStateCreateFlags)) (PipelineRasterizationStateCreateFlags
flags)
    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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
depthClampEnable))
    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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rasterizerDiscardEnable))
    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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr PolygonMode)) (PolygonMode
polygonMode)
    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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CullModeFlags)) (CullModeFlags
cullMode)
    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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr FrontFace)) (FrontFace
frontFace)
    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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
depthBiasEnable))
    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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
depthBiasConstantFactor))
    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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
depthBiasClamp))
    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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
depthBiasSlopeFactor))
    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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
lineWidth))
    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
64
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr (PipelineRasterizationStateCreateInfo es) -> IO b -> IO b
pokeZeroCStruct Ptr (PipelineRasterizationStateCreateInfo 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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO)
    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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr PolygonMode)) (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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr FrontFace)) (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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr CFloat)) (Float -> CFloat
CFloat (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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr CFloat)) (Float -> CFloat
CFloat (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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr CFloat)) (Float -> CFloat
CFloat (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 (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr CFloat)) (Float -> CFloat
CFloat (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 PipelineRasterizationStateCreateInfo es
         , PeekChain es ) => FromCStruct (PipelineRasterizationStateCreateInfo es) where
  peekCStruct :: Ptr (PipelineRasterizationStateCreateInfo es)
-> IO (PipelineRasterizationStateCreateInfo es)
peekCStruct Ptr (PipelineRasterizationStateCreateInfo es)
p = do
    Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (PipelineRasterizationStateCreateInfo 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 Ptr ()
pNext)
    PipelineRasterizationStateCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineRasterizationStateCreateFlags ((Ptr (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineRasterizationStateCreateFlags))
    Bool32
depthClampEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
    Bool32
rasterizerDiscardEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
    PolygonMode
polygonMode <- forall a. Storable a => Ptr a -> IO a
peek @PolygonMode ((Ptr (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr PolygonMode))
    CullModeFlags
cullMode <- forall a. Storable a => Ptr a -> IO a
peek @CullModeFlags ((Ptr (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CullModeFlags))
    FrontFace
frontFace <- forall a. Storable a => Ptr a -> IO a
peek @FrontFace ((Ptr (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr FrontFace))
    Bool32
depthBiasEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32))
    CFloat
depthBiasConstantFactor <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr CFloat))
    CFloat
depthBiasClamp <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr CFloat))
    CFloat
depthBiasSlopeFactor <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr CFloat))
    CFloat
lineWidth <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr (PipelineRasterizationStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr CFloat))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> PipelineRasterizationStateCreateFlags
-> Bool
-> Bool
-> PolygonMode
-> CullModeFlags
-> FrontFace
-> Bool
-> Float
-> Float
-> Float
-> Float
-> PipelineRasterizationStateCreateInfo es
PipelineRasterizationStateCreateInfo
             Chain es
next
             PipelineRasterizationStateCreateFlags
flags
             (Bool32 -> Bool
bool32ToBool Bool32
depthClampEnable)
             (Bool32 -> Bool
bool32ToBool Bool32
rasterizerDiscardEnable)
             PolygonMode
polygonMode
             CullModeFlags
cullMode
             FrontFace
frontFace
             (Bool32 -> Bool
bool32ToBool Bool32
depthBiasEnable)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
depthBiasConstantFactor)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
depthBiasClamp)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
depthBiasSlopeFactor)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
lineWidth)

instance es ~ '[] => Zero (PipelineRasterizationStateCreateInfo es) where
  zero :: PipelineRasterizationStateCreateInfo es
zero = forall (es :: [*]).
Chain es
-> PipelineRasterizationStateCreateFlags
-> Bool
-> Bool
-> PolygonMode
-> CullModeFlags
-> FrontFace
-> Bool
-> Float
-> Float
-> Float
-> Float
-> PipelineRasterizationStateCreateInfo es
PipelineRasterizationStateCreateInfo
           ()
           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


-- | VkPipelineMultisampleStateCreateInfo - Structure specifying parameters
-- of a newly created pipeline multisample state
--
-- = Description
--
-- Each bit in the sample mask is associated with a unique
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-multisampling-coverage-mask sample index>
-- as defined for the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-multisampling-coverage-mask coverage mask>.
-- Each bit b for mask word w in the sample mask corresponds to sample
-- index i, where i = 32 × w + b. @pSampleMask@ has a length equal to ⌈
-- @rasterizationSamples@ \/ 32 ⌉ words.
--
-- If @pSampleMask@ is @NULL@, it is treated as if the mask has all bits
-- set to @1@.
--
-- == Valid Usage
--
-- -   #VUID-VkPipelineMultisampleStateCreateInfo-sampleShadingEnable-00784#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-sampleRateShading sampleRateShading>
--     feature is not enabled, @sampleShadingEnable@ /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkPipelineMultisampleStateCreateInfo-alphaToOneEnable-00785#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-alphaToOne alphaToOne>
--     feature is not enabled, @alphaToOneEnable@ /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkPipelineMultisampleStateCreateInfo-minSampleShading-00786#
--     @minSampleShading@ /must/ be in the range [0,1]
--
-- -   #VUID-VkPipelineMultisampleStateCreateInfo-rasterizationSamples-01415#
--     If the @VK_NV_framebuffer_mixed_samples@ extension is enabled, and
--     if the subpass has any color attachments and @rasterizationSamples@
--     is greater than the number of color samples, then
--     @sampleShadingEnable@ /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPipelineMultisampleStateCreateInfo-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO'
--
-- -   #VUID-VkPipelineMultisampleStateCreateInfo-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_NV_framebuffer_mixed_samples.PipelineCoverageModulationStateCreateInfoNV',
--     'Vulkan.Extensions.VK_NV_coverage_reduction_mode.PipelineCoverageReductionStateCreateInfoNV',
--     'Vulkan.Extensions.VK_NV_fragment_coverage_to_color.PipelineCoverageToColorStateCreateInfoNV',
--     or
--     'Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'
--
-- -   #VUID-VkPipelineMultisampleStateCreateInfo-sType-unique# The @sType@
--     value of each struct in the @pNext@ chain /must/ be unique
--
-- -   #VUID-VkPipelineMultisampleStateCreateInfo-flags-zerobitmask#
--     @flags@ /must/ be @0@
--
-- -   #VUID-VkPipelineMultisampleStateCreateInfo-rasterizationSamples-parameter#
--     @rasterizationSamples@ /must/ be a valid
--     'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' value
--
-- -   #VUID-VkPipelineMultisampleStateCreateInfo-pSampleMask-parameter# If
--     @pSampleMask@ is not @NULL@, @pSampleMask@ /must/ be a valid pointer
--     to an array of
--     \(\lceil{\mathit{rasterizationSamples} \over 32}\rceil\)
--     'Vulkan.Core10.FundamentalTypes.SampleMask' values
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32', 'GraphicsPipelineCreateInfo',
-- 'Vulkan.Core10.Enums.PipelineMultisampleStateCreateFlags.PipelineMultisampleStateCreateFlags',
-- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits',
-- 'Vulkan.Core10.FundamentalTypes.SampleMask',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PipelineMultisampleStateCreateInfo (es :: [Type]) = PipelineMultisampleStateCreateInfo
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]).
PipelineMultisampleStateCreateInfo es -> Chain es
next :: Chain es
  , -- | @flags@ is reserved for future use.
    forall (es :: [*]).
PipelineMultisampleStateCreateInfo es
-> PipelineMultisampleStateCreateFlags
flags :: PipelineMultisampleStateCreateFlags
  , -- | @rasterizationSamples@ is a
    -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' value
    -- specifying the number of samples used in rasterization. This value is
    -- ignored for the purposes of setting the number of samples used in
    -- rasterization if the pipeline is created with the
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT'
    -- dynamic state set, but if
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SAMPLE_MASK_EXT' dynamic
    -- state is not set, it is still used to define the size of the
    -- @pSampleMask@ array as described below.
    forall (es :: [*]).
PipelineMultisampleStateCreateInfo es -> SampleCountFlagBits
rasterizationSamples :: SampleCountFlagBits
  , -- | @sampleShadingEnable@ /can/ be used to enable
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-sampleshading Sample Shading>.
    forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Bool
sampleShadingEnable :: Bool
  , -- | @minSampleShading@ specifies a minimum fraction of sample shading if
    -- @sampleShadingEnable@ is set to 'Vulkan.Core10.FundamentalTypes.TRUE'.
    forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Float
minSampleShading :: Float
  , -- | @pSampleMask@ is a pointer to an array of
    -- 'Vulkan.Core10.FundamentalTypes.SampleMask' values used in the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-samplemask sample mask test>.
    forall (es :: [*]).
PipelineMultisampleStateCreateInfo es
-> Vector ("createInfoCount" ::: Word32)
sampleMask :: Vector SampleMask
  , -- | @alphaToCoverageEnable@ controls whether a temporary coverage value is
    -- generated based on the alpha component of the fragment’s first color
    -- output as specified in the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-covg Multisample Coverage>
    -- section.
    forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Bool
alphaToCoverageEnable :: Bool
  , -- | @alphaToOneEnable@ controls whether the alpha component of the
    -- fragment’s first color output is replaced with one as described in
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-covg Multisample Coverage>.
    forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Bool
alphaToOneEnable :: Bool
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineMultisampleStateCreateInfo (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (PipelineMultisampleStateCreateInfo es)

instance Extensible PipelineMultisampleStateCreateInfo where
  extensibleTypeName :: String
extensibleTypeName = String
"PipelineMultisampleStateCreateInfo"
  setNext :: forall (ds :: [*]) (es :: [*]).
PipelineMultisampleStateCreateInfo ds
-> Chain es -> PipelineMultisampleStateCreateInfo es
setNext PipelineMultisampleStateCreateInfo{Bool
Float
Vector ("createInfoCount" ::: Word32)
Chain ds
SampleCountFlagBits
PipelineMultisampleStateCreateFlags
alphaToOneEnable :: Bool
alphaToCoverageEnable :: Bool
sampleMask :: Vector ("createInfoCount" ::: Word32)
minSampleShading :: Float
sampleShadingEnable :: Bool
rasterizationSamples :: SampleCountFlagBits
flags :: PipelineMultisampleStateCreateFlags
next :: Chain ds
$sel:alphaToOneEnable:PipelineMultisampleStateCreateInfo :: forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Bool
$sel:alphaToCoverageEnable:PipelineMultisampleStateCreateInfo :: forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Bool
$sel:sampleMask:PipelineMultisampleStateCreateInfo :: forall (es :: [*]).
PipelineMultisampleStateCreateInfo es
-> Vector ("createInfoCount" ::: Word32)
$sel:minSampleShading:PipelineMultisampleStateCreateInfo :: forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Float
$sel:sampleShadingEnable:PipelineMultisampleStateCreateInfo :: forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Bool
$sel:rasterizationSamples:PipelineMultisampleStateCreateInfo :: forall (es :: [*]).
PipelineMultisampleStateCreateInfo es -> SampleCountFlagBits
$sel:flags:PipelineMultisampleStateCreateInfo :: forall (es :: [*]).
PipelineMultisampleStateCreateInfo es
-> PipelineMultisampleStateCreateFlags
$sel:next:PipelineMultisampleStateCreateInfo :: forall (es :: [*]).
PipelineMultisampleStateCreateInfo es -> Chain es
..} Chain es
next' = PipelineMultisampleStateCreateInfo{$sel:next:PipelineMultisampleStateCreateInfo :: Chain es
next = Chain es
next', Bool
Float
Vector ("createInfoCount" ::: Word32)
SampleCountFlagBits
PipelineMultisampleStateCreateFlags
alphaToOneEnable :: Bool
alphaToCoverageEnable :: Bool
sampleMask :: Vector ("createInfoCount" ::: Word32)
minSampleShading :: Float
sampleShadingEnable :: Bool
rasterizationSamples :: SampleCountFlagBits
flags :: PipelineMultisampleStateCreateFlags
$sel:alphaToOneEnable:PipelineMultisampleStateCreateInfo :: Bool
$sel:alphaToCoverageEnable:PipelineMultisampleStateCreateInfo :: Bool
$sel:sampleMask:PipelineMultisampleStateCreateInfo :: Vector ("createInfoCount" ::: Word32)
$sel:minSampleShading:PipelineMultisampleStateCreateInfo :: Float
$sel:sampleShadingEnable:PipelineMultisampleStateCreateInfo :: Bool
$sel:rasterizationSamples:PipelineMultisampleStateCreateInfo :: SampleCountFlagBits
$sel:flags:PipelineMultisampleStateCreateInfo :: PipelineMultisampleStateCreateFlags
..}
  getNext :: forall (es :: [*]).
PipelineMultisampleStateCreateInfo es -> Chain es
getNext PipelineMultisampleStateCreateInfo{Bool
Float
Vector ("createInfoCount" ::: Word32)
Chain es
SampleCountFlagBits
PipelineMultisampleStateCreateFlags
alphaToOneEnable :: Bool
alphaToCoverageEnable :: Bool
sampleMask :: Vector ("createInfoCount" ::: Word32)
minSampleShading :: Float
sampleShadingEnable :: Bool
rasterizationSamples :: SampleCountFlagBits
flags :: PipelineMultisampleStateCreateFlags
next :: Chain es
$sel:alphaToOneEnable:PipelineMultisampleStateCreateInfo :: forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Bool
$sel:alphaToCoverageEnable:PipelineMultisampleStateCreateInfo :: forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Bool
$sel:sampleMask:PipelineMultisampleStateCreateInfo :: forall (es :: [*]).
PipelineMultisampleStateCreateInfo es
-> Vector ("createInfoCount" ::: Word32)
$sel:minSampleShading:PipelineMultisampleStateCreateInfo :: forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Float
$sel:sampleShadingEnable:PipelineMultisampleStateCreateInfo :: forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Bool
$sel:rasterizationSamples:PipelineMultisampleStateCreateInfo :: forall (es :: [*]).
PipelineMultisampleStateCreateInfo es -> SampleCountFlagBits
$sel:flags:PipelineMultisampleStateCreateInfo :: forall (es :: [*]).
PipelineMultisampleStateCreateInfo es
-> PipelineMultisampleStateCreateFlags
$sel:next:PipelineMultisampleStateCreateInfo :: forall (es :: [*]).
PipelineMultisampleStateCreateInfo es -> Chain es
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends PipelineMultisampleStateCreateInfo e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends PipelineMultisampleStateCreateInfo e => b) -> Maybe b
extends proxy e
_ Extends PipelineMultisampleStateCreateInfo e => b
f
    | Just e :~: PipelineCoverageReductionStateCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineCoverageReductionStateCreateInfoNV = forall a. a -> Maybe a
Just Extends PipelineMultisampleStateCreateInfo e => b
f
    | Just e :~: PipelineCoverageModulationStateCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineCoverageModulationStateCreateInfoNV = forall a. a -> Maybe a
Just Extends PipelineMultisampleStateCreateInfo e => b
f
    | Just e :~: PipelineSampleLocationsStateCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineSampleLocationsStateCreateInfoEXT = forall a. a -> Maybe a
Just Extends PipelineMultisampleStateCreateInfo e => b
f
    | Just e :~: PipelineCoverageToColorStateCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineCoverageToColorStateCreateInfoNV = forall a. a -> Maybe a
Just Extends PipelineMultisampleStateCreateInfo e => b
f
    | Bool
otherwise = forall a. Maybe a
Nothing

instance ( Extendss PipelineMultisampleStateCreateInfo es
         , PokeChain es ) => ToCStruct (PipelineMultisampleStateCreateInfo es) where
  withCStruct :: forall b.
PipelineMultisampleStateCreateInfo es
-> (Ptr (PipelineMultisampleStateCreateInfo es) -> IO b) -> IO b
withCStruct PipelineMultisampleStateCreateInfo es
x Ptr (PipelineMultisampleStateCreateInfo es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineMultisampleStateCreateInfo es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (PipelineMultisampleStateCreateInfo es)
p PipelineMultisampleStateCreateInfo es
x (Ptr (PipelineMultisampleStateCreateInfo es) -> IO b
f Ptr (PipelineMultisampleStateCreateInfo es)
p)
  pokeCStruct :: forall b.
Ptr (PipelineMultisampleStateCreateInfo es)
-> PipelineMultisampleStateCreateInfo es -> IO b -> IO b
pokeCStruct Ptr (PipelineMultisampleStateCreateInfo es)
p PipelineMultisampleStateCreateInfo{Bool
Float
Vector ("createInfoCount" ::: Word32)
Chain es
SampleCountFlagBits
PipelineMultisampleStateCreateFlags
alphaToOneEnable :: Bool
alphaToCoverageEnable :: Bool
sampleMask :: Vector ("createInfoCount" ::: Word32)
minSampleShading :: Float
sampleShadingEnable :: Bool
rasterizationSamples :: SampleCountFlagBits
flags :: PipelineMultisampleStateCreateFlags
next :: Chain es
$sel:alphaToOneEnable:PipelineMultisampleStateCreateInfo :: forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Bool
$sel:alphaToCoverageEnable:PipelineMultisampleStateCreateInfo :: forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Bool
$sel:sampleMask:PipelineMultisampleStateCreateInfo :: forall (es :: [*]).
PipelineMultisampleStateCreateInfo es
-> Vector ("createInfoCount" ::: Word32)
$sel:minSampleShading:PipelineMultisampleStateCreateInfo :: forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Float
$sel:sampleShadingEnable:PipelineMultisampleStateCreateInfo :: forall (es :: [*]). PipelineMultisampleStateCreateInfo es -> Bool
$sel:rasterizationSamples:PipelineMultisampleStateCreateInfo :: forall (es :: [*]).
PipelineMultisampleStateCreateInfo es -> SampleCountFlagBits
$sel:flags:PipelineMultisampleStateCreateInfo :: forall (es :: [*]).
PipelineMultisampleStateCreateInfo es
-> PipelineMultisampleStateCreateFlags
$sel:next:PipelineMultisampleStateCreateInfo :: forall (es :: [*]).
PipelineMultisampleStateCreateInfo 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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO)
    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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineMultisampleStateCreateFlags)) (PipelineMultisampleStateCreateFlags
flags)
    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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr SampleCountFlagBits)) (SampleCountFlagBits
rasterizationSamples)
    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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
sampleShadingEnable))
    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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
minSampleShading))
    Ptr ("createInfoCount" ::: Word32)
pSampleMask'' <- case forall a. Vector a -> Int
Data.Vector.length (Vector ("createInfoCount" ::: Word32)
sampleMask) of
      Int
0      -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      Int
vecLen -> do
        let requiredLen :: "createInfoCount" ::: Word32
requiredLen = case (SampleCountFlagBits
rasterizationSamples) of
              SampleCountFlagBits "createInfoCount" ::: Word32
n -> ("createInfoCount" ::: Word32
n forall a. Num a => a -> a -> a
+ "createInfoCount" ::: Word32
31) forall a. Integral a => a -> a -> a
`quot` "createInfoCount" ::: Word32
32
        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 ("createInfoCount" ::: Word32
requiredLen forall a. Eq a => a -> a -> Bool
== forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
vecLen) 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
"sampleMask must be either empty or contain enough bits to cover all the sample specified by 'rasterizationSamples'" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
        do
          Ptr ("createInfoCount" ::: Word32)
pPSampleMask' <- 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 @SampleMask ((forall a. Vector a -> Int
Data.Vector.length ((Vector ("createInfoCount" ::: Word32)
sampleMask))) 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 "createInfoCount" ::: Word32
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ("createInfoCount" ::: Word32)
pPSampleMask' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr SampleMask) ("createInfoCount" ::: Word32
e)) ((Vector ("createInfoCount" ::: Word32)
sampleMask))
          forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr ("createInfoCount" ::: Word32)
pPSampleMask'
    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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr SampleMask))) Ptr ("createInfoCount" ::: Word32)
pSampleMask''
    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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
alphaToCoverageEnable))
    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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
alphaToOneEnable))
    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
48
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr (PipelineMultisampleStateCreateInfo es) -> IO b -> IO b
pokeZeroCStruct Ptr (PipelineMultisampleStateCreateInfo 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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO)
    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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr SampleCountFlagBits)) (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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr CFloat)) (Float -> CFloat
CFloat (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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (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 (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (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 PipelineMultisampleStateCreateInfo es
         , PeekChain es ) => FromCStruct (PipelineMultisampleStateCreateInfo es) where
  peekCStruct :: Ptr (PipelineMultisampleStateCreateInfo es)
-> IO (PipelineMultisampleStateCreateInfo es)
peekCStruct Ptr (PipelineMultisampleStateCreateInfo es)
p = do
    Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (PipelineMultisampleStateCreateInfo 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 Ptr ()
pNext)
    PipelineMultisampleStateCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineMultisampleStateCreateFlags ((Ptr (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineMultisampleStateCreateFlags))
    SampleCountFlagBits
rasterizationSamples <- forall a. Storable a => Ptr a -> IO a
peek @SampleCountFlagBits ((Ptr (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr SampleCountFlagBits))
    Bool32
sampleShadingEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
    CFloat
minSampleShading <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr CFloat))
    Ptr ("createInfoCount" ::: Word32)
pSampleMask <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr SampleMask) ((Ptr (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr SampleMask)))
    Vector ("createInfoCount" ::: Word32)
pSampleMask' <- if Ptr ("createInfoCount" ::: Word32)
pSampleMask forall a. Eq a => a -> a -> Bool
== forall a. Ptr a
nullPtr
      then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Monoid a => a
mempty
      else forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (case SampleCountFlagBits
rasterizationSamples of
        SampleCountFlagBits "createInfoCount" ::: Word32
n -> (forall a b. (Integral a, Num b) => a -> b
fromIntegral "createInfoCount" ::: Word32
n forall a. Num a => a -> a -> a
+ Int
31) forall a. Integral a => a -> a -> a
`quot` Int
32) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @SampleMask (((Ptr ("createInfoCount" ::: Word32)
pSampleMask) forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr SampleMask)))
    Bool32
alphaToCoverageEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32))
    Bool32
alphaToOneEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr (PipelineMultisampleStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> PipelineMultisampleStateCreateFlags
-> SampleCountFlagBits
-> Bool
-> Float
-> Vector ("createInfoCount" ::: Word32)
-> Bool
-> Bool
-> PipelineMultisampleStateCreateInfo es
PipelineMultisampleStateCreateInfo
             Chain es
next
             PipelineMultisampleStateCreateFlags
flags
             SampleCountFlagBits
rasterizationSamples
             (Bool32 -> Bool
bool32ToBool Bool32
sampleShadingEnable)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
minSampleShading)
             Vector ("createInfoCount" ::: Word32)
pSampleMask'
             (Bool32 -> Bool
bool32ToBool Bool32
alphaToCoverageEnable)
             (Bool32 -> Bool
bool32ToBool Bool32
alphaToOneEnable)

instance es ~ '[] => Zero (PipelineMultisampleStateCreateInfo es) where
  zero :: PipelineMultisampleStateCreateInfo es
zero = forall (es :: [*]).
Chain es
-> PipelineMultisampleStateCreateFlags
-> SampleCountFlagBits
-> Bool
-> Float
-> Vector ("createInfoCount" ::: Word32)
-> Bool
-> Bool
-> PipelineMultisampleStateCreateInfo es
PipelineMultisampleStateCreateInfo
           ()
           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. Monoid a => a
mempty
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkPipelineColorBlendAttachmentState - Structure specifying a pipeline
-- color blend attachment state
--
-- == Valid Usage
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-srcColorBlendFactor-00608#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-dualSrcBlend dualSrcBlend>
--     feature is not enabled, @srcColorBlendFactor@ /must/ not be
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_SRC1_COLOR',
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_ONE_MINUS_SRC1_COLOR',
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_SRC1_ALPHA', or
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA'
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-dstColorBlendFactor-00609#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-dualSrcBlend dualSrcBlend>
--     feature is not enabled, @dstColorBlendFactor@ /must/ not be
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_SRC1_COLOR',
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_ONE_MINUS_SRC1_COLOR',
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_SRC1_ALPHA', or
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA'
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-srcAlphaBlendFactor-00610#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-dualSrcBlend dualSrcBlend>
--     feature is not enabled, @srcAlphaBlendFactor@ /must/ not be
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_SRC1_COLOR',
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_ONE_MINUS_SRC1_COLOR',
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_SRC1_ALPHA', or
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA'
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-00611#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-dualSrcBlend dualSrcBlend>
--     feature is not enabled, @dstAlphaBlendFactor@ /must/ not be
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_SRC1_COLOR',
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_ONE_MINUS_SRC1_COLOR',
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_SRC1_ALPHA', or
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA'
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-colorBlendOp-01406# If
--     either of @colorBlendOp@ or @alphaBlendOp@ is an
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#framebuffer-blend-advanced advanced blend operation>,
--     then @colorBlendOp@ /must/ equal @alphaBlendOp@
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-advancedBlendIndependentBlend-01407#
--     If
--     'Vulkan.Extensions.VK_EXT_blend_operation_advanced.PhysicalDeviceBlendOperationAdvancedPropertiesEXT'::@advancedBlendIndependentBlend@
--     is 'Vulkan.Core10.FundamentalTypes.FALSE' and @colorBlendOp@ is an
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#framebuffer-blend-advanced advanced blend operation>,
--     then @colorBlendOp@ /must/ be the same for all attachments
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-advancedBlendIndependentBlend-01408#
--     If
--     'Vulkan.Extensions.VK_EXT_blend_operation_advanced.PhysicalDeviceBlendOperationAdvancedPropertiesEXT'::@advancedBlendIndependentBlend@
--     is 'Vulkan.Core10.FundamentalTypes.FALSE' and @alphaBlendOp@ is an
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#framebuffer-blend-advanced advanced blend operation>,
--     then @alphaBlendOp@ /must/ be the same for all attachments
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-advancedBlendAllOperations-01409#
--     If
--     'Vulkan.Extensions.VK_EXT_blend_operation_advanced.PhysicalDeviceBlendOperationAdvancedPropertiesEXT'::@advancedBlendAllOperations@
--     is 'Vulkan.Core10.FundamentalTypes.FALSE', then @colorBlendOp@
--     /must/ not be 'Vulkan.Core10.Enums.BlendOp.BLEND_OP_ZERO_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_SRC_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_DST_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_SRC_OVER_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_DST_OVER_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_SRC_IN_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_DST_IN_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_SRC_OUT_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_DST_OUT_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_SRC_ATOP_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_DST_ATOP_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_XOR_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_INVERT_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_INVERT_RGB_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_LINEARDODGE_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_LINEARBURN_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_VIVIDLIGHT_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_LINEARLIGHT_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_PINLIGHT_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_HARDMIX_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_PLUS_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_PLUS_CLAMPED_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_PLUS_CLAMPED_ALPHA_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_PLUS_DARKER_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_MINUS_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_MINUS_CLAMPED_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_CONTRAST_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_INVERT_OVG_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_RED_EXT',
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_GREEN_EXT', or
--     'Vulkan.Core10.Enums.BlendOp.BLEND_OP_BLUE_EXT'
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-colorBlendOp-01410# If
--     @colorBlendOp@ or @alphaBlendOp@ is an
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#framebuffer-blend-advanced advanced blend operation>,
--     then @colorAttachmentCount@ of the subpass this pipeline is compiled
--     against /must/ be less than or equal to
--     'Vulkan.Extensions.VK_EXT_blend_operation_advanced.PhysicalDeviceBlendOperationAdvancedPropertiesEXT'::@advancedBlendMaxColorAttachments@
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-constantAlphaColorBlendFactors-04454#
--     If the @VK_KHR_portability_subset@ extension is enabled, and
--     'Vulkan.Extensions.VK_KHR_portability_subset.PhysicalDevicePortabilitySubsetFeaturesKHR'::@constantAlphaColorBlendFactors@
--     is 'Vulkan.Core10.FundamentalTypes.FALSE', @srcColorBlendFactor@
--     /must/ not be
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_CONSTANT_ALPHA' or
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA'
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-constantAlphaColorBlendFactors-04455#
--     If the @VK_KHR_portability_subset@ extension is enabled, and
--     'Vulkan.Extensions.VK_KHR_portability_subset.PhysicalDevicePortabilitySubsetFeaturesKHR'::@constantAlphaColorBlendFactors@
--     is 'Vulkan.Core10.FundamentalTypes.FALSE', @dstColorBlendFactor@
--     /must/ not be
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_CONSTANT_ALPHA' or
--     'Vulkan.Core10.Enums.BlendFactor.BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-srcColorBlendFactor-parameter#
--     @srcColorBlendFactor@ /must/ be a valid
--     'Vulkan.Core10.Enums.BlendFactor.BlendFactor' value
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-dstColorBlendFactor-parameter#
--     @dstColorBlendFactor@ /must/ be a valid
--     'Vulkan.Core10.Enums.BlendFactor.BlendFactor' value
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-colorBlendOp-parameter#
--     @colorBlendOp@ /must/ be a valid
--     'Vulkan.Core10.Enums.BlendOp.BlendOp' value
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-srcAlphaBlendFactor-parameter#
--     @srcAlphaBlendFactor@ /must/ be a valid
--     'Vulkan.Core10.Enums.BlendFactor.BlendFactor' value
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-parameter#
--     @dstAlphaBlendFactor@ /must/ be a valid
--     'Vulkan.Core10.Enums.BlendFactor.BlendFactor' value
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-alphaBlendOp-parameter#
--     @alphaBlendOp@ /must/ be a valid
--     'Vulkan.Core10.Enums.BlendOp.BlendOp' value
--
-- -   #VUID-VkPipelineColorBlendAttachmentState-colorWriteMask-parameter#
--     @colorWriteMask@ /must/ be a valid combination of
--     'Vulkan.Core10.Enums.ColorComponentFlagBits.ColorComponentFlagBits'
--     values
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Enums.BlendFactor.BlendFactor',
-- 'Vulkan.Core10.Enums.BlendOp.BlendOp',
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.ColorComponentFlagBits.ColorComponentFlags',
-- 'PipelineColorBlendStateCreateInfo'
data PipelineColorBlendAttachmentState = PipelineColorBlendAttachmentState
  { -- | @blendEnable@ controls whether blending is enabled for the corresponding
    -- color attachment. If blending is not enabled, the source fragment’s
    -- color for that attachment is passed through unmodified.
    PipelineColorBlendAttachmentState -> Bool
blendEnable :: Bool
  , -- | @srcColorBlendFactor@ selects which blend factor is used to determine
    -- the source factors (Sr,Sg,Sb).
    PipelineColorBlendAttachmentState -> BlendFactor
srcColorBlendFactor :: BlendFactor
  , -- | @dstColorBlendFactor@ selects which blend factor is used to determine
    -- the destination factors (Dr,Dg,Db).
    PipelineColorBlendAttachmentState -> BlendFactor
dstColorBlendFactor :: BlendFactor
  , -- | @colorBlendOp@ selects which blend operation is used to calculate the
    -- RGB values to write to the color attachment.
    PipelineColorBlendAttachmentState -> BlendOp
colorBlendOp :: BlendOp
  , -- | @srcAlphaBlendFactor@ selects which blend factor is used to determine
    -- the source factor Sa.
    PipelineColorBlendAttachmentState -> BlendFactor
srcAlphaBlendFactor :: BlendFactor
  , -- | @dstAlphaBlendFactor@ selects which blend factor is used to determine
    -- the destination factor Da.
    PipelineColorBlendAttachmentState -> BlendFactor
dstAlphaBlendFactor :: BlendFactor
  , -- | @alphaBlendOp@ selects which blend operation is used to calculate the
    -- alpha values to write to the color attachment.
    PipelineColorBlendAttachmentState -> BlendOp
alphaBlendOp :: BlendOp
  , -- | @colorWriteMask@ is a bitmask of
    -- 'Vulkan.Core10.Enums.ColorComponentFlagBits.ColorComponentFlagBits'
    -- specifying which of the R, G, B, and\/or A components are enabled for
    -- writing, as described for the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#framebuffer-color-write-mask Color Write Mask>.
    PipelineColorBlendAttachmentState -> ColorComponentFlags
colorWriteMask :: ColorComponentFlags
  }
  deriving (Typeable, PipelineColorBlendAttachmentState
-> PipelineColorBlendAttachmentState -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineColorBlendAttachmentState
-> PipelineColorBlendAttachmentState -> Bool
$c/= :: PipelineColorBlendAttachmentState
-> PipelineColorBlendAttachmentState -> Bool
== :: PipelineColorBlendAttachmentState
-> PipelineColorBlendAttachmentState -> Bool
$c== :: PipelineColorBlendAttachmentState
-> PipelineColorBlendAttachmentState -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineColorBlendAttachmentState)
#endif
deriving instance Show PipelineColorBlendAttachmentState

instance ToCStruct PipelineColorBlendAttachmentState where
  withCStruct :: forall b.
PipelineColorBlendAttachmentState
-> (Ptr PipelineColorBlendAttachmentState -> IO b) -> IO b
withCStruct PipelineColorBlendAttachmentState
x Ptr PipelineColorBlendAttachmentState -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PipelineColorBlendAttachmentState
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineColorBlendAttachmentState
p PipelineColorBlendAttachmentState
x (Ptr PipelineColorBlendAttachmentState -> IO b
f Ptr PipelineColorBlendAttachmentState
p)
  pokeCStruct :: forall b.
Ptr PipelineColorBlendAttachmentState
-> PipelineColorBlendAttachmentState -> IO b -> IO b
pokeCStruct Ptr PipelineColorBlendAttachmentState
p PipelineColorBlendAttachmentState{Bool
ColorComponentFlags
BlendOp
BlendFactor
colorWriteMask :: ColorComponentFlags
alphaBlendOp :: BlendOp
dstAlphaBlendFactor :: BlendFactor
srcAlphaBlendFactor :: BlendFactor
colorBlendOp :: BlendOp
dstColorBlendFactor :: BlendFactor
srcColorBlendFactor :: BlendFactor
blendEnable :: Bool
$sel:colorWriteMask:PipelineColorBlendAttachmentState :: PipelineColorBlendAttachmentState -> ColorComponentFlags
$sel:alphaBlendOp:PipelineColorBlendAttachmentState :: PipelineColorBlendAttachmentState -> BlendOp
$sel:dstAlphaBlendFactor:PipelineColorBlendAttachmentState :: PipelineColorBlendAttachmentState -> BlendFactor
$sel:srcAlphaBlendFactor:PipelineColorBlendAttachmentState :: PipelineColorBlendAttachmentState -> BlendFactor
$sel:colorBlendOp:PipelineColorBlendAttachmentState :: PipelineColorBlendAttachmentState -> BlendOp
$sel:dstColorBlendFactor:PipelineColorBlendAttachmentState :: PipelineColorBlendAttachmentState -> BlendFactor
$sel:srcColorBlendFactor:PipelineColorBlendAttachmentState :: PipelineColorBlendAttachmentState -> BlendFactor
$sel:blendEnable:PipelineColorBlendAttachmentState :: PipelineColorBlendAttachmentState -> Bool
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
blendEnable))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr BlendFactor)) (BlendFactor
srcColorBlendFactor)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr BlendFactor)) (BlendFactor
dstColorBlendFactor)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr BlendOp)) (BlendOp
colorBlendOp)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr BlendFactor)) (BlendFactor
srcAlphaBlendFactor)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr BlendFactor)) (BlendFactor
dstAlphaBlendFactor)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr BlendOp)) (BlendOp
alphaBlendOp)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr ColorComponentFlags)) (ColorComponentFlags
colorWriteMask)
    IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
4
  pokeZeroCStruct :: forall b. Ptr PipelineColorBlendAttachmentState -> IO b -> IO b
pokeZeroCStruct Ptr PipelineColorBlendAttachmentState
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr BlendFactor)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr BlendFactor)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr BlendOp)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr BlendFactor)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr BlendFactor)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr BlendOp)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PipelineColorBlendAttachmentState where
  peekCStruct :: Ptr PipelineColorBlendAttachmentState
-> IO PipelineColorBlendAttachmentState
peekCStruct Ptr PipelineColorBlendAttachmentState
p = do
    Bool32
blendEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Bool32))
    BlendFactor
srcColorBlendFactor <- forall a. Storable a => Ptr a -> IO a
peek @BlendFactor ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr BlendFactor))
    BlendFactor
dstColorBlendFactor <- forall a. Storable a => Ptr a -> IO a
peek @BlendFactor ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr BlendFactor))
    BlendOp
colorBlendOp <- forall a. Storable a => Ptr a -> IO a
peek @BlendOp ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr BlendOp))
    BlendFactor
srcAlphaBlendFactor <- forall a. Storable a => Ptr a -> IO a
peek @BlendFactor ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr BlendFactor))
    BlendFactor
dstAlphaBlendFactor <- forall a. Storable a => Ptr a -> IO a
peek @BlendFactor ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr BlendFactor))
    BlendOp
alphaBlendOp <- forall a. Storable a => Ptr a -> IO a
peek @BlendOp ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr BlendOp))
    ColorComponentFlags
colorWriteMask <- forall a. Storable a => Ptr a -> IO a
peek @ColorComponentFlags ((Ptr PipelineColorBlendAttachmentState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr ColorComponentFlags))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool
-> BlendFactor
-> BlendFactor
-> BlendOp
-> BlendFactor
-> BlendFactor
-> BlendOp
-> ColorComponentFlags
-> PipelineColorBlendAttachmentState
PipelineColorBlendAttachmentState
             (Bool32 -> Bool
bool32ToBool Bool32
blendEnable)
             BlendFactor
srcColorBlendFactor
             BlendFactor
dstColorBlendFactor
             BlendOp
colorBlendOp
             BlendFactor
srcAlphaBlendFactor
             BlendFactor
dstAlphaBlendFactor
             BlendOp
alphaBlendOp
             ColorComponentFlags
colorWriteMask

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

instance Zero PipelineColorBlendAttachmentState where
  zero :: PipelineColorBlendAttachmentState
zero = Bool
-> BlendFactor
-> BlendFactor
-> BlendOp
-> BlendFactor
-> BlendFactor
-> BlendOp
-> ColorComponentFlags
-> PipelineColorBlendAttachmentState
PipelineColorBlendAttachmentState
           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


-- | VkPipelineColorBlendStateCreateInfo - Structure specifying parameters of
-- a newly created pipeline color blend state
--
-- == Valid Usage
--
-- -   #VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-independentBlend independentBlend>
--     feature is not enabled, all elements of @pAttachments@ /must/ be
--     identical
--
-- -   #VUID-VkPipelineColorBlendStateCreateInfo-logicOpEnable-00606# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-logicOp logicOp>
--     feature is not enabled, @logicOpEnable@ /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkPipelineColorBlendStateCreateInfo-logicOpEnable-00607# If
--     @logicOpEnable@ is 'Vulkan.Core10.FundamentalTypes.TRUE', @logicOp@
--     /must/ be a valid 'Vulkan.Core10.Enums.LogicOp.LogicOp' value
--
-- -   #VUID-VkPipelineColorBlendStateCreateInfo-rasterizationOrderColorAttachmentAccess-06465#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-rasterizationOrderColorAttachmentAccess rasterizationOrderColorAttachmentAccess>
--     feature is not enabled, @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineColorBlendStateCreateFlagBits.PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT'
--
-- -   #VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-07353# If
--     @attachmentCount@ is not @0@ , and any of
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT',
--     or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_WRITE_MASK_EXT'
--     are not set, @pAttachments@ /must/ be a valid pointer to an array of
--     @attachmentCount@ valid 'PipelineColorBlendAttachmentState'
--     structures
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPipelineColorBlendStateCreateInfo-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO'
--
-- -   #VUID-VkPipelineColorBlendStateCreateInfo-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_EXT_blend_operation_advanced.PipelineColorBlendAdvancedStateCreateInfoEXT'
--     or
--     'Vulkan.Extensions.VK_EXT_color_write_enable.PipelineColorWriteCreateInfoEXT'
--
-- -   #VUID-VkPipelineColorBlendStateCreateInfo-sType-unique# The @sType@
--     value of each struct in the @pNext@ chain /must/ be unique
--
-- -   #VUID-VkPipelineColorBlendStateCreateInfo-flags-parameter# @flags@
--     /must/ be a valid combination of
--     'Vulkan.Core10.Enums.PipelineColorBlendStateCreateFlagBits.PipelineColorBlendStateCreateFlagBits'
--     values
--
-- -   #VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-parameter# If
--     @attachmentCount@ is not @0@, and @pAttachments@ is not @NULL@,
--     @pAttachments@ /must/ be a valid pointer to an array of
--     @attachmentCount@ valid 'PipelineColorBlendAttachmentState'
--     structures
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32', 'GraphicsPipelineCreateInfo',
-- 'Vulkan.Core10.Enums.LogicOp.LogicOp',
-- 'PipelineColorBlendAttachmentState',
-- 'Vulkan.Core10.Enums.PipelineColorBlendStateCreateFlagBits.PipelineColorBlendStateCreateFlags',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PipelineColorBlendStateCreateInfo (es :: [Type]) = PipelineColorBlendStateCreateInfo
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]).
PipelineColorBlendStateCreateInfo es -> Chain es
next :: Chain es
  , -- | @flags@ is a bitmask of
    -- 'Vulkan.Core10.Enums.PipelineColorBlendStateCreateFlagBits.PipelineColorBlendStateCreateFlagBits'
    -- specifying additional color blending information.
    forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> PipelineColorBlendStateCreateFlags
flags :: PipelineColorBlendStateCreateFlags
  , -- | @logicOpEnable@ controls whether to apply
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#framebuffer-logicop Logical Operations>.
    forall (es :: [*]). PipelineColorBlendStateCreateInfo es -> Bool
logicOpEnable :: Bool
  , -- | @logicOp@ selects which logical operation to apply.
    forall (es :: [*]). PipelineColorBlendStateCreateInfo es -> LogicOp
logicOp :: LogicOp
  , -- | @attachmentCount@ is the number of 'PipelineColorBlendAttachmentState'
    -- elements in @pAttachments@. It is ignored if the pipeline is created
    -- with
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT',
    -- and
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_WRITE_MASK_EXT'
    -- dynamic states set, and either
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT'
    -- set or
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-advancedBlendCoherentOperations advancedBlendCoherentOperations>
    -- is not enabled on the device.
    forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> "createInfoCount" ::: Word32
attachmentCount :: Word32
  , -- | @pAttachments@ is a pointer to an array of
    -- 'PipelineColorBlendAttachmentState' structures defining blend state for
    -- each color attachment. It is ignored if the pipeline is created with
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT',
    -- and
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_WRITE_MASK_EXT'
    -- dynamic states set, and either
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT'
    -- set or
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-advancedBlendCoherentOperations advancedBlendCoherentOperations>
    -- is not enabled on the device.
    forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> Vector PipelineColorBlendAttachmentState
attachments :: Vector PipelineColorBlendAttachmentState
  , -- | @blendConstants@ is a pointer to an array of four values used as the R,
    -- G, B, and A components of the blend constant that are used in blending,
    -- depending on the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#framebuffer-blendfactors blend factor>.
    forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> (Float, Float, Float, Float)
blendConstants :: (Float, Float, Float, Float)
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineColorBlendStateCreateInfo (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (PipelineColorBlendStateCreateInfo es)

instance Extensible PipelineColorBlendStateCreateInfo where
  extensibleTypeName :: String
extensibleTypeName = String
"PipelineColorBlendStateCreateInfo"
  setNext :: forall (ds :: [*]) (es :: [*]).
PipelineColorBlendStateCreateInfo ds
-> Chain es -> PipelineColorBlendStateCreateInfo es
setNext PipelineColorBlendStateCreateInfo{Bool
"createInfoCount" ::: Word32
(Float, Float, Float, Float)
Vector PipelineColorBlendAttachmentState
Chain ds
LogicOp
PipelineColorBlendStateCreateFlags
blendConstants :: (Float, Float, Float, Float)
attachments :: Vector PipelineColorBlendAttachmentState
attachmentCount :: "createInfoCount" ::: Word32
logicOp :: LogicOp
logicOpEnable :: Bool
flags :: PipelineColorBlendStateCreateFlags
next :: Chain ds
$sel:blendConstants:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> (Float, Float, Float, Float)
$sel:attachments:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> Vector PipelineColorBlendAttachmentState
$sel:attachmentCount:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> "createInfoCount" ::: Word32
$sel:logicOp:PipelineColorBlendStateCreateInfo :: forall (es :: [*]). PipelineColorBlendStateCreateInfo es -> LogicOp
$sel:logicOpEnable:PipelineColorBlendStateCreateInfo :: forall (es :: [*]). PipelineColorBlendStateCreateInfo es -> Bool
$sel:flags:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> PipelineColorBlendStateCreateFlags
$sel:next:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es -> Chain es
..} Chain es
next' = PipelineColorBlendStateCreateInfo{$sel:next:PipelineColorBlendStateCreateInfo :: Chain es
next = Chain es
next', Bool
"createInfoCount" ::: Word32
(Float, Float, Float, Float)
Vector PipelineColorBlendAttachmentState
LogicOp
PipelineColorBlendStateCreateFlags
blendConstants :: (Float, Float, Float, Float)
attachments :: Vector PipelineColorBlendAttachmentState
attachmentCount :: "createInfoCount" ::: Word32
logicOp :: LogicOp
logicOpEnable :: Bool
flags :: PipelineColorBlendStateCreateFlags
$sel:blendConstants:PipelineColorBlendStateCreateInfo :: (Float, Float, Float, Float)
$sel:attachments:PipelineColorBlendStateCreateInfo :: Vector PipelineColorBlendAttachmentState
$sel:attachmentCount:PipelineColorBlendStateCreateInfo :: "createInfoCount" ::: Word32
$sel:logicOp:PipelineColorBlendStateCreateInfo :: LogicOp
$sel:logicOpEnable:PipelineColorBlendStateCreateInfo :: Bool
$sel:flags:PipelineColorBlendStateCreateInfo :: PipelineColorBlendStateCreateFlags
..}
  getNext :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es -> Chain es
getNext PipelineColorBlendStateCreateInfo{Bool
"createInfoCount" ::: Word32
(Float, Float, Float, Float)
Vector PipelineColorBlendAttachmentState
Chain es
LogicOp
PipelineColorBlendStateCreateFlags
blendConstants :: (Float, Float, Float, Float)
attachments :: Vector PipelineColorBlendAttachmentState
attachmentCount :: "createInfoCount" ::: Word32
logicOp :: LogicOp
logicOpEnable :: Bool
flags :: PipelineColorBlendStateCreateFlags
next :: Chain es
$sel:blendConstants:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> (Float, Float, Float, Float)
$sel:attachments:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> Vector PipelineColorBlendAttachmentState
$sel:attachmentCount:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> "createInfoCount" ::: Word32
$sel:logicOp:PipelineColorBlendStateCreateInfo :: forall (es :: [*]). PipelineColorBlendStateCreateInfo es -> LogicOp
$sel:logicOpEnable:PipelineColorBlendStateCreateInfo :: forall (es :: [*]). PipelineColorBlendStateCreateInfo es -> Bool
$sel:flags:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> PipelineColorBlendStateCreateFlags
$sel:next:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es -> Chain es
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends PipelineColorBlendStateCreateInfo e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends PipelineColorBlendStateCreateInfo e => b) -> Maybe b
extends proxy e
_ Extends PipelineColorBlendStateCreateInfo e => b
f
    | Just e :~: PipelineColorWriteCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineColorWriteCreateInfoEXT = forall a. a -> Maybe a
Just Extends PipelineColorBlendStateCreateInfo e => b
f
    | Just e :~: PipelineColorBlendAdvancedStateCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineColorBlendAdvancedStateCreateInfoEXT = forall a. a -> Maybe a
Just Extends PipelineColorBlendStateCreateInfo e => b
f
    | Bool
otherwise = forall a. Maybe a
Nothing

instance ( Extendss PipelineColorBlendStateCreateInfo es
         , PokeChain es ) => ToCStruct (PipelineColorBlendStateCreateInfo es) where
  withCStruct :: forall b.
PipelineColorBlendStateCreateInfo es
-> (Ptr (PipelineColorBlendStateCreateInfo es) -> IO b) -> IO b
withCStruct PipelineColorBlendStateCreateInfo es
x Ptr (PipelineColorBlendStateCreateInfo es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
56 forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineColorBlendStateCreateInfo es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (PipelineColorBlendStateCreateInfo es)
p PipelineColorBlendStateCreateInfo es
x (Ptr (PipelineColorBlendStateCreateInfo es) -> IO b
f Ptr (PipelineColorBlendStateCreateInfo es)
p)
  pokeCStruct :: forall b.
Ptr (PipelineColorBlendStateCreateInfo es)
-> PipelineColorBlendStateCreateInfo es -> IO b -> IO b
pokeCStruct Ptr (PipelineColorBlendStateCreateInfo es)
p PipelineColorBlendStateCreateInfo{Bool
"createInfoCount" ::: Word32
(Float, Float, Float, Float)
Vector PipelineColorBlendAttachmentState
Chain es
LogicOp
PipelineColorBlendStateCreateFlags
blendConstants :: (Float, Float, Float, Float)
attachments :: Vector PipelineColorBlendAttachmentState
attachmentCount :: "createInfoCount" ::: Word32
logicOp :: LogicOp
logicOpEnable :: Bool
flags :: PipelineColorBlendStateCreateFlags
next :: Chain es
$sel:blendConstants:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> (Float, Float, Float, Float)
$sel:attachments:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> Vector PipelineColorBlendAttachmentState
$sel:attachmentCount:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> "createInfoCount" ::: Word32
$sel:logicOp:PipelineColorBlendStateCreateInfo :: forall (es :: [*]). PipelineColorBlendStateCreateInfo es -> LogicOp
$sel:logicOpEnable:PipelineColorBlendStateCreateInfo :: forall (es :: [*]). PipelineColorBlendStateCreateInfo es -> Bool
$sel:flags:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo es
-> PipelineColorBlendStateCreateFlags
$sel:next:PipelineColorBlendStateCreateInfo :: forall (es :: [*]).
PipelineColorBlendStateCreateInfo 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 (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO)
    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 (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineColorBlendStateCreateFlags)) (PipelineColorBlendStateCreateFlags
flags)
    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 (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
logicOpEnable))
    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 (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr LogicOp)) (LogicOp
logicOp)
    let pAttachmentsLength :: Int
pAttachmentsLength = forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector PipelineColorBlendAttachmentState
attachments)
    "createInfoCount" ::: Word32
attachmentCount'' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ if ("createInfoCount" ::: Word32
attachmentCount) forall a. Eq a => a -> a -> Bool
== "createInfoCount" ::: Word32
0
      then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pAttachmentsLength
      else do
        forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pAttachmentsLength forall a. Eq a => a -> a -> Bool
== ("createInfoCount" ::: Word32
attachmentCount) Bool -> Bool -> Bool
|| Int
pAttachmentsLength forall a. Eq a => a -> a -> Bool
== Int
0) 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
"pAttachments must be empty or have 'attachmentCount' elements" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
        forall (f :: * -> *) a. Applicative f => a -> f a
pure ("createInfoCount" ::: Word32
attachmentCount)
    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 (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) ("createInfoCount" ::: Word32
attachmentCount'')
    Ptr PipelineColorBlendAttachmentState
pAttachments'' <- if forall a. Vector a -> Bool
Data.Vector.null (Vector PipelineColorBlendAttachmentState
attachments)
      then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      else do
        Ptr PipelineColorBlendAttachmentState
pPAttachments <- 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 @PipelineColorBlendAttachmentState (((forall a. Vector a -> Int
Data.Vector.length (Vector PipelineColorBlendAttachmentState
attachments))) forall a. Num a => a -> a -> a
* Int
32)
        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 PipelineColorBlendAttachmentState
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PipelineColorBlendAttachmentState
pPAttachments forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
32 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PipelineColorBlendAttachmentState) (PipelineColorBlendAttachmentState
e)) ((Vector PipelineColorBlendAttachmentState
attachments))
        forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr PipelineColorBlendAttachmentState
pPAttachments
    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 (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr PipelineColorBlendAttachmentState))) Ptr PipelineColorBlendAttachmentState
pAttachments''
    let pBlendConstants' :: Ptr CFloat
pBlendConstants' = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (FixedArray 4 CFloat)))
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ case ((Float, Float, Float, Float)
blendConstants) of
      (Float
e0, Float
e1, Float
e2, Float
e3) -> do
        forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pBlendConstants' :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0))
        forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pBlendConstants' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1))
        forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pBlendConstants' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e2))
        forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pBlendConstants' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e3))
    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
56
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr (PipelineColorBlendStateCreateInfo es) -> IO b -> IO b
pokeZeroCStruct Ptr (PipelineColorBlendStateCreateInfo 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 (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO)
    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 (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (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 (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr LogicOp)) (forall a. Zero a => a
zero)
    let pBlendConstants' :: Ptr CFloat
pBlendConstants' = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (FixedArray 4 CFloat)))
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ case ((forall a. Zero a => a
zero, forall a. Zero a => a
zero, forall a. Zero a => a
zero, forall a. Zero a => a
zero)) of
      (Float
e0, Float
e1, Float
e2, Float
e3) -> do
        forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pBlendConstants' :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0))
        forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pBlendConstants' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1))
        forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pBlendConstants' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e2))
        forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pBlendConstants' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e3))
    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 PipelineColorBlendStateCreateInfo es
         , PeekChain es ) => FromCStruct (PipelineColorBlendStateCreateInfo es) where
  peekCStruct :: Ptr (PipelineColorBlendStateCreateInfo es)
-> IO (PipelineColorBlendStateCreateInfo es)
peekCStruct Ptr (PipelineColorBlendStateCreateInfo es)
p = do
    Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (PipelineColorBlendStateCreateInfo 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 Ptr ()
pNext)
    PipelineColorBlendStateCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineColorBlendStateCreateFlags ((Ptr (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineColorBlendStateCreateFlags))
    Bool32
logicOpEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
    LogicOp
logicOp <- forall a. Storable a => Ptr a -> IO a
peek @LogicOp ((Ptr (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr LogicOp))
    "createInfoCount" ::: Word32
attachmentCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32))
    Ptr PipelineColorBlendAttachmentState
pAttachments <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PipelineColorBlendAttachmentState) ((Ptr (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr PipelineColorBlendAttachmentState)))
    let pAttachmentsLength :: Int
pAttachmentsLength = if Ptr PipelineColorBlendAttachmentState
pAttachments forall a. Eq a => a -> a -> Bool
== forall a. Ptr a
nullPtr then Int
0 else (forall a b. (Integral a, Num b) => a -> b
fromIntegral "createInfoCount" ::: Word32
attachmentCount)
    Vector PipelineColorBlendAttachmentState
pAttachments' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM Int
pAttachmentsLength (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineColorBlendAttachmentState ((Ptr PipelineColorBlendAttachmentState
pAttachments forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
32 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PipelineColorBlendAttachmentState)))
    let pblendConstants :: Ptr CFloat
pblendConstants = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @CFloat ((Ptr (PipelineColorBlendStateCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (FixedArray 4 CFloat)))
    CFloat
blendConstants0 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pblendConstants forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
0 :: Ptr CFloat))
    CFloat
blendConstants1 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pblendConstants forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
4 :: Ptr CFloat))
    CFloat
blendConstants2 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pblendConstants forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
8 :: Ptr CFloat))
    CFloat
blendConstants3 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pblendConstants forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
12 :: Ptr CFloat))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> PipelineColorBlendStateCreateFlags
-> Bool
-> LogicOp
-> ("createInfoCount" ::: Word32)
-> Vector PipelineColorBlendAttachmentState
-> (Float, Float, Float, Float)
-> PipelineColorBlendStateCreateInfo es
PipelineColorBlendStateCreateInfo
             Chain es
next
             PipelineColorBlendStateCreateFlags
flags
             (Bool32 -> Bool
bool32ToBool Bool32
logicOpEnable)
             LogicOp
logicOp
             "createInfoCount" ::: Word32
attachmentCount
             Vector PipelineColorBlendAttachmentState
pAttachments'
             (( (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
blendConstants0)
              , (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
blendConstants1)
              , (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
blendConstants2)
              , (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
blendConstants3) ))

instance es ~ '[] => Zero (PipelineColorBlendStateCreateInfo es) where
  zero :: PipelineColorBlendStateCreateInfo es
zero = forall (es :: [*]).
Chain es
-> PipelineColorBlendStateCreateFlags
-> Bool
-> LogicOp
-> ("createInfoCount" ::: Word32)
-> Vector PipelineColorBlendAttachmentState
-> (Float, Float, Float, Float)
-> PipelineColorBlendStateCreateInfo es
PipelineColorBlendStateCreateInfo
           ()
           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. Monoid a => a
mempty
           (forall a. Zero a => a
zero, forall a. Zero a => a
zero, forall a. Zero a => a
zero, forall a. Zero a => a
zero)


-- | VkPipelineDynamicStateCreateInfo - Structure specifying parameters of a
-- newly created pipeline dynamic state
--
-- == Valid Usage
--
-- -   #VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-01442# Each
--     element of @pDynamicStates@ /must/ be unique
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPipelineDynamicStateCreateInfo-sType-sType# @sType@ /must/
--     be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO'
--
-- -   #VUID-VkPipelineDynamicStateCreateInfo-pNext-pNext# @pNext@ /must/
--     be @NULL@
--
-- -   #VUID-VkPipelineDynamicStateCreateInfo-flags-zerobitmask# @flags@
--     /must/ be @0@
--
-- -   #VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-parameter# If
--     @dynamicStateCount@ is not @0@, @pDynamicStates@ /must/ be a valid
--     pointer to an array of @dynamicStateCount@ valid
--     'Vulkan.Core10.Enums.DynamicState.DynamicState' values
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Enums.DynamicState.DynamicState',
-- 'GraphicsPipelineCreateInfo',
-- 'Vulkan.Core10.Enums.PipelineDynamicStateCreateFlags.PipelineDynamicStateCreateFlags',
-- 'Vulkan.Extensions.VK_KHR_ray_tracing_pipeline.RayTracingPipelineCreateInfoKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PipelineDynamicStateCreateInfo = PipelineDynamicStateCreateInfo
  { -- | @flags@ is reserved for future use.
    PipelineDynamicStateCreateInfo -> PipelineDynamicStateCreateFlags
flags :: PipelineDynamicStateCreateFlags
  , -- | @pDynamicStates@ is a pointer to an array of
    -- 'Vulkan.Core10.Enums.DynamicState.DynamicState' values specifying which
    -- pieces of pipeline state will use the values from dynamic state commands
    -- rather than from pipeline state creation information.
    PipelineDynamicStateCreateInfo -> Vector DynamicState
dynamicStates :: Vector DynamicState
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineDynamicStateCreateInfo)
#endif
deriving instance Show PipelineDynamicStateCreateInfo

instance ToCStruct PipelineDynamicStateCreateInfo where
  withCStruct :: forall b.
PipelineDynamicStateCreateInfo
-> (Ptr PipelineDynamicStateCreateInfo -> IO b) -> IO b
withCStruct PipelineDynamicStateCreateInfo
x Ptr PipelineDynamicStateCreateInfo -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr PipelineDynamicStateCreateInfo
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineDynamicStateCreateInfo
p PipelineDynamicStateCreateInfo
x (Ptr PipelineDynamicStateCreateInfo -> IO b
f Ptr PipelineDynamicStateCreateInfo
p)
  pokeCStruct :: forall b.
Ptr PipelineDynamicStateCreateInfo
-> PipelineDynamicStateCreateInfo -> IO b -> IO b
pokeCStruct Ptr PipelineDynamicStateCreateInfo
p PipelineDynamicStateCreateInfo{Vector DynamicState
PipelineDynamicStateCreateFlags
dynamicStates :: Vector DynamicState
flags :: PipelineDynamicStateCreateFlags
$sel:dynamicStates:PipelineDynamicStateCreateInfo :: PipelineDynamicStateCreateInfo -> Vector DynamicState
$sel:flags:PipelineDynamicStateCreateInfo :: PipelineDynamicStateCreateInfo -> PipelineDynamicStateCreateFlags
..} 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 PipelineDynamicStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO)
    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 PipelineDynamicStateCreateInfo
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 ((Ptr PipelineDynamicStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineDynamicStateCreateFlags)) (PipelineDynamicStateCreateFlags
flags)
    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 PipelineDynamicStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) ((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
$ (Vector DynamicState
dynamicStates)) :: Word32))
    Ptr DynamicState
pPDynamicStates' <- 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 @DynamicState ((forall a. Vector a -> Int
Data.Vector.length (Vector DynamicState
dynamicStates)) 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 DynamicState
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DynamicState
pPDynamicStates' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr DynamicState) (DynamicState
e)) (Vector DynamicState
dynamicStates)
    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 PipelineDynamicStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr DynamicState))) (Ptr DynamicState
pPDynamicStates')
    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 PipelineDynamicStateCreateInfo -> IO b -> IO b
pokeZeroCStruct Ptr PipelineDynamicStateCreateInfo
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDynamicStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDynamicStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    IO b
f

instance FromCStruct PipelineDynamicStateCreateInfo where
  peekCStruct :: Ptr PipelineDynamicStateCreateInfo
-> IO PipelineDynamicStateCreateInfo
peekCStruct Ptr PipelineDynamicStateCreateInfo
p = do
    PipelineDynamicStateCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineDynamicStateCreateFlags ((Ptr PipelineDynamicStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineDynamicStateCreateFlags))
    "createInfoCount" ::: Word32
dynamicStateCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PipelineDynamicStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
    Ptr DynamicState
pDynamicStates <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr DynamicState) ((Ptr PipelineDynamicStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr DynamicState)))
    Vector DynamicState
pDynamicStates' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral "createInfoCount" ::: Word32
dynamicStateCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @DynamicState ((Ptr DynamicState
pDynamicStates forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr DynamicState)))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ PipelineDynamicStateCreateFlags
-> Vector DynamicState -> PipelineDynamicStateCreateInfo
PipelineDynamicStateCreateInfo
             PipelineDynamicStateCreateFlags
flags Vector DynamicState
pDynamicStates'

instance Zero PipelineDynamicStateCreateInfo where
  zero :: PipelineDynamicStateCreateInfo
zero = PipelineDynamicStateCreateFlags
-> Vector DynamicState -> PipelineDynamicStateCreateInfo
PipelineDynamicStateCreateInfo
           forall a. Zero a => a
zero
           forall a. Monoid a => a
mempty


-- | VkStencilOpState - Structure specifying stencil operation state
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Enums.CompareOp.CompareOp',
-- 'PipelineDepthStencilStateCreateInfo',
-- 'Vulkan.Core10.Enums.StencilOp.StencilOp'
data StencilOpState = StencilOpState
  { -- | @failOp@ is a 'Vulkan.Core10.Enums.StencilOp.StencilOp' value specifying
    -- the action performed on samples that fail the stencil test.
    --
    -- #VUID-VkStencilOpState-failOp-parameter# @failOp@ /must/ be a valid
    -- 'Vulkan.Core10.Enums.StencilOp.StencilOp' value
    StencilOpState -> StencilOp
failOp :: StencilOp
  , -- | @passOp@ is a 'Vulkan.Core10.Enums.StencilOp.StencilOp' value specifying
    -- the action performed on samples that pass both the depth and stencil
    -- tests.
    --
    -- #VUID-VkStencilOpState-passOp-parameter# @passOp@ /must/ be a valid
    -- 'Vulkan.Core10.Enums.StencilOp.StencilOp' value
    StencilOpState -> StencilOp
passOp :: StencilOp
  , -- | @depthFailOp@ is a 'Vulkan.Core10.Enums.StencilOp.StencilOp' value
    -- specifying the action performed on samples that pass the stencil test
    -- and fail the depth test.
    --
    -- #VUID-VkStencilOpState-depthFailOp-parameter# @depthFailOp@ /must/ be a
    -- valid 'Vulkan.Core10.Enums.StencilOp.StencilOp' value
    StencilOpState -> StencilOp
depthFailOp :: StencilOp
  , -- | @compareOp@ is a 'Vulkan.Core10.Enums.CompareOp.CompareOp' value
    -- specifying the comparison operator used in the stencil test.
    --
    -- #VUID-VkStencilOpState-compareOp-parameter# @compareOp@ /must/ be a
    -- valid 'Vulkan.Core10.Enums.CompareOp.CompareOp' value
    StencilOpState -> CompareOp
compareOp :: CompareOp
  , -- | @compareMask@ selects the bits of the unsigned integer stencil values
    -- participating in the stencil test.
    StencilOpState -> "createInfoCount" ::: Word32
compareMask :: Word32
  , -- | @writeMask@ selects the bits of the unsigned integer stencil values
    -- updated by the stencil test in the stencil framebuffer attachment.
    StencilOpState -> "createInfoCount" ::: Word32
writeMask :: Word32
  , -- | @reference@ is an integer stencil reference value that is used in the
    -- unsigned stencil comparison.
    StencilOpState -> "createInfoCount" ::: Word32
reference :: Word32
  }
  deriving (Typeable, StencilOpState -> StencilOpState -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StencilOpState -> StencilOpState -> Bool
$c/= :: StencilOpState -> StencilOpState -> Bool
== :: StencilOpState -> StencilOpState -> Bool
$c== :: StencilOpState -> StencilOpState -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (StencilOpState)
#endif
deriving instance Show StencilOpState

instance ToCStruct StencilOpState where
  withCStruct :: forall b. StencilOpState -> (Ptr StencilOpState -> IO b) -> IO b
withCStruct StencilOpState
x Ptr StencilOpState -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
28 forall a b. (a -> b) -> a -> b
$ \Ptr StencilOpState
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr StencilOpState
p StencilOpState
x (Ptr StencilOpState -> IO b
f Ptr StencilOpState
p)
  pokeCStruct :: forall b. Ptr StencilOpState -> StencilOpState -> IO b -> IO b
pokeCStruct Ptr StencilOpState
p StencilOpState{"createInfoCount" ::: Word32
CompareOp
StencilOp
reference :: "createInfoCount" ::: Word32
writeMask :: "createInfoCount" ::: Word32
compareMask :: "createInfoCount" ::: Word32
compareOp :: CompareOp
depthFailOp :: StencilOp
passOp :: StencilOp
failOp :: StencilOp
$sel:reference:StencilOpState :: StencilOpState -> "createInfoCount" ::: Word32
$sel:writeMask:StencilOpState :: StencilOpState -> "createInfoCount" ::: Word32
$sel:compareMask:StencilOpState :: StencilOpState -> "createInfoCount" ::: Word32
$sel:compareOp:StencilOpState :: StencilOpState -> CompareOp
$sel:depthFailOp:StencilOpState :: StencilOpState -> StencilOp
$sel:passOp:StencilOpState :: StencilOpState -> StencilOp
$sel:failOp:StencilOpState :: StencilOpState -> StencilOp
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StencilOp)) (StencilOp
failOp)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr StencilOp)) (StencilOp
passOp)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr StencilOp)) (StencilOp
depthFailOp)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CompareOp)) (CompareOp
compareOp)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) ("createInfoCount" ::: Word32
compareMask)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) ("createInfoCount" ::: Word32
writeMask)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) ("createInfoCount" ::: Word32
reference)
    IO b
f
  cStructSize :: Int
cStructSize = Int
28
  cStructAlignment :: Int
cStructAlignment = Int
4
  pokeZeroCStruct :: forall b. Ptr StencilOpState -> IO b -> IO b
pokeZeroCStruct Ptr StencilOpState
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StencilOp)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr StencilOp)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr StencilOp)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CompareOp)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct StencilOpState where
  peekCStruct :: Ptr StencilOpState -> IO StencilOpState
peekCStruct Ptr StencilOpState
p = do
    StencilOp
failOp <- forall a. Storable a => Ptr a -> IO a
peek @StencilOp ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StencilOp))
    StencilOp
passOp <- forall a. Storable a => Ptr a -> IO a
peek @StencilOp ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr StencilOp))
    StencilOp
depthFailOp <- forall a. Storable a => Ptr a -> IO a
peek @StencilOp ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr StencilOp))
    CompareOp
compareOp <- forall a. Storable a => Ptr a -> IO a
peek @CompareOp ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CompareOp))
    "createInfoCount" ::: Word32
compareMask <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
    "createInfoCount" ::: Word32
writeMask <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
    "createInfoCount" ::: Word32
reference <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr StencilOpState
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ StencilOp
-> StencilOp
-> StencilOp
-> CompareOp
-> ("createInfoCount" ::: Word32)
-> ("createInfoCount" ::: Word32)
-> ("createInfoCount" ::: Word32)
-> StencilOpState
StencilOpState
             StencilOp
failOp StencilOp
passOp StencilOp
depthFailOp CompareOp
compareOp "createInfoCount" ::: Word32
compareMask "createInfoCount" ::: Word32
writeMask "createInfoCount" ::: Word32
reference

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

instance Zero StencilOpState where
  zero :: StencilOpState
zero = StencilOp
-> StencilOp
-> StencilOp
-> CompareOp
-> ("createInfoCount" ::: Word32)
-> ("createInfoCount" ::: Word32)
-> ("createInfoCount" ::: Word32)
-> StencilOpState
StencilOpState
           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


-- | VkPipelineDepthStencilStateCreateInfo - Structure specifying parameters
-- of a newly created pipeline depth stencil state
--
-- == Valid Usage
--
-- -   #VUID-VkPipelineDepthStencilStateCreateInfo-depthBoundsTestEnable-00598#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-depthBounds depthBounds>
--     feature is not enabled, @depthBoundsTestEnable@ /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkPipelineDepthStencilStateCreateInfo-separateStencilMaskRef-04453#
--     If the @VK_KHR_portability_subset@ extension is enabled, and
--     'Vulkan.Extensions.VK_KHR_portability_subset.PhysicalDevicePortabilitySubsetFeaturesKHR'::@separateStencilMaskRef@
--     is 'Vulkan.Core10.FundamentalTypes.FALSE', and the value of
--     'PipelineDepthStencilStateCreateInfo'::@stencilTestEnable@ is
--     'Vulkan.Core10.FundamentalTypes.TRUE', and the value of
--     'PipelineRasterizationStateCreateInfo'::@cullMode@ is
--     'Vulkan.Core10.Enums.CullModeFlagBits.CULL_MODE_NONE', the value of
--     @reference@ in each of the 'StencilOpState' structs in @front@ and
--     @back@ /must/ be the same
--
-- -   #VUID-VkPipelineDepthStencilStateCreateInfo-rasterizationOrderDepthAttachmentAccess-06463#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-rasterizationOrderDepthAttachmentAccess rasterizationOrderDepthAttachmentAccess>
--     feature is not enabled, @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits.PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT'
--
-- -   #VUID-VkPipelineDepthStencilStateCreateInfo-rasterizationOrderStencilAttachmentAccess-06464#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-rasterizationOrderStencilAttachmentAccess rasterizationOrderStencilAttachmentAccess>
--     feature is not enabled, @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits.PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPipelineDepthStencilStateCreateInfo-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO'
--
-- -   #VUID-VkPipelineDepthStencilStateCreateInfo-pNext-pNext# @pNext@
--     /must/ be @NULL@
--
-- -   #VUID-VkPipelineDepthStencilStateCreateInfo-flags-parameter# @flags@
--     /must/ be a valid combination of
--     'Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits.PipelineDepthStencilStateCreateFlagBits'
--     values
--
-- -   #VUID-VkPipelineDepthStencilStateCreateInfo-depthCompareOp-parameter#
--     @depthCompareOp@ /must/ be a valid
--     'Vulkan.Core10.Enums.CompareOp.CompareOp' value
--
-- -   #VUID-VkPipelineDepthStencilStateCreateInfo-front-parameter# @front@
--     /must/ be a valid 'StencilOpState' structure
--
-- -   #VUID-VkPipelineDepthStencilStateCreateInfo-back-parameter# @back@
--     /must/ be a valid 'StencilOpState' structure
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.CompareOp.CompareOp', 'GraphicsPipelineCreateInfo',
-- 'Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits.PipelineDepthStencilStateCreateFlags',
-- 'StencilOpState', 'Vulkan.Core10.Enums.StructureType.StructureType'
data PipelineDepthStencilStateCreateInfo = PipelineDepthStencilStateCreateInfo
  { -- | @flags@ is a bitmask of
    -- 'Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits.PipelineDepthStencilStateCreateFlagBits'
    -- specifying additional depth\/stencil state information.
    PipelineDepthStencilStateCreateInfo
-> PipelineDepthStencilStateCreateFlags
flags :: PipelineDepthStencilStateCreateFlags
  , -- | @depthTestEnable@ controls whether
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-depth depth testing>
    -- is enabled.
    PipelineDepthStencilStateCreateInfo -> Bool
depthTestEnable :: Bool
  , -- | @depthWriteEnable@ controls whether
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-depth-write depth writes>
    -- are enabled when @depthTestEnable@ is
    -- 'Vulkan.Core10.FundamentalTypes.TRUE'. Depth writes are always disabled
    -- when @depthTestEnable@ is 'Vulkan.Core10.FundamentalTypes.FALSE'.
    PipelineDepthStencilStateCreateInfo -> Bool
depthWriteEnable :: Bool
  , -- | @depthCompareOp@ is a 'Vulkan.Core10.Enums.CompareOp.CompareOp' value
    -- specifying the comparison operator to use in the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-depth-comparison Depth Comparison>
    -- step of the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-depth depth test>.
    PipelineDepthStencilStateCreateInfo -> CompareOp
depthCompareOp :: CompareOp
  , -- | @depthBoundsTestEnable@ controls whether
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-dbt depth bounds testing>
    -- is enabled.
    PipelineDepthStencilStateCreateInfo -> Bool
depthBoundsTestEnable :: Bool
  , -- | @stencilTestEnable@ controls whether
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-stencil stencil testing>
    -- is enabled.
    PipelineDepthStencilStateCreateInfo -> Bool
stencilTestEnable :: Bool
  , -- | @front@ and @back@ are 'StencilOpState' values controlling the
    -- corresponding parameters of the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-stencil stencil test>.
    PipelineDepthStencilStateCreateInfo -> StencilOpState
front :: StencilOpState
  , -- No documentation found for Nested "VkPipelineDepthStencilStateCreateInfo" "back"
    PipelineDepthStencilStateCreateInfo -> StencilOpState
back :: StencilOpState
  , -- | @minDepthBounds@ is the minimum depth bound used in the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-dbt depth bounds test>.
    PipelineDepthStencilStateCreateInfo -> Float
minDepthBounds :: Float
  , -- | @maxDepthBounds@ is the maximum depth bound used in the
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-dbt depth bounds test>.
    PipelineDepthStencilStateCreateInfo -> Float
maxDepthBounds :: Float
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PipelineDepthStencilStateCreateInfo)
#endif
deriving instance Show PipelineDepthStencilStateCreateInfo

instance ToCStruct PipelineDepthStencilStateCreateInfo where
  withCStruct :: forall b.
PipelineDepthStencilStateCreateInfo
-> (Ptr PipelineDepthStencilStateCreateInfo -> IO b) -> IO b
withCStruct PipelineDepthStencilStateCreateInfo
x Ptr PipelineDepthStencilStateCreateInfo -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
104 forall a b. (a -> b) -> a -> b
$ \Ptr PipelineDepthStencilStateCreateInfo
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PipelineDepthStencilStateCreateInfo
p PipelineDepthStencilStateCreateInfo
x (Ptr PipelineDepthStencilStateCreateInfo -> IO b
f Ptr PipelineDepthStencilStateCreateInfo
p)
  pokeCStruct :: forall b.
Ptr PipelineDepthStencilStateCreateInfo
-> PipelineDepthStencilStateCreateInfo -> IO b -> IO b
pokeCStruct Ptr PipelineDepthStencilStateCreateInfo
p PipelineDepthStencilStateCreateInfo{Bool
Float
CompareOp
StencilOpState
PipelineDepthStencilStateCreateFlags
maxDepthBounds :: Float
minDepthBounds :: Float
back :: StencilOpState
front :: StencilOpState
stencilTestEnable :: Bool
depthBoundsTestEnable :: Bool
depthCompareOp :: CompareOp
depthWriteEnable :: Bool
depthTestEnable :: Bool
flags :: PipelineDepthStencilStateCreateFlags
$sel:maxDepthBounds:PipelineDepthStencilStateCreateInfo :: PipelineDepthStencilStateCreateInfo -> Float
$sel:minDepthBounds:PipelineDepthStencilStateCreateInfo :: PipelineDepthStencilStateCreateInfo -> Float
$sel:back:PipelineDepthStencilStateCreateInfo :: PipelineDepthStencilStateCreateInfo -> StencilOpState
$sel:front:PipelineDepthStencilStateCreateInfo :: PipelineDepthStencilStateCreateInfo -> StencilOpState
$sel:stencilTestEnable:PipelineDepthStencilStateCreateInfo :: PipelineDepthStencilStateCreateInfo -> Bool
$sel:depthBoundsTestEnable:PipelineDepthStencilStateCreateInfo :: PipelineDepthStencilStateCreateInfo -> Bool
$sel:depthCompareOp:PipelineDepthStencilStateCreateInfo :: PipelineDepthStencilStateCreateInfo -> CompareOp
$sel:depthWriteEnable:PipelineDepthStencilStateCreateInfo :: PipelineDepthStencilStateCreateInfo -> Bool
$sel:depthTestEnable:PipelineDepthStencilStateCreateInfo :: PipelineDepthStencilStateCreateInfo -> Bool
$sel:flags:PipelineDepthStencilStateCreateInfo :: PipelineDepthStencilStateCreateInfo
-> PipelineDepthStencilStateCreateFlags
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
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 PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineDepthStencilStateCreateFlags)) (PipelineDepthStencilStateCreateFlags
flags)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
depthTestEnable))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
depthWriteEnable))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr CompareOp)) (CompareOp
depthCompareOp)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
depthBoundsTestEnable))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
stencilTestEnable))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr StencilOpState)) (StencilOpState
front)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr StencilOpState)) (StencilOpState
back)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
minDepthBounds))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
100 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
maxDepthBounds))
    IO b
f
  cStructSize :: Int
cStructSize = Int
104
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr PipelineDepthStencilStateCreateInfo -> IO b -> IO b
pokeZeroCStruct Ptr PipelineDepthStencilStateCreateInfo
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
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 PipelineDepthStencilStateCreateInfo
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 PipelineDepthStencilStateCreateInfo
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 PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr CompareOp)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr StencilOpState)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr StencilOpState)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
100 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PipelineDepthStencilStateCreateInfo where
  peekCStruct :: Ptr PipelineDepthStencilStateCreateInfo
-> IO PipelineDepthStencilStateCreateInfo
peekCStruct Ptr PipelineDepthStencilStateCreateInfo
p = do
    PipelineDepthStencilStateCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineDepthStencilStateCreateFlags ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineDepthStencilStateCreateFlags))
    Bool32
depthTestEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
    Bool32
depthWriteEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
    CompareOp
depthCompareOp <- forall a. Storable a => Ptr a -> IO a
peek @CompareOp ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr CompareOp))
    Bool32
depthBoundsTestEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32))
    Bool32
stencilTestEnable <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32))
    StencilOpState
front <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @StencilOpState ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr StencilOpState))
    StencilOpState
back <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @StencilOpState ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
68 :: Ptr StencilOpState))
    CFloat
minDepthBounds <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr CFloat))
    CFloat
maxDepthBounds <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr PipelineDepthStencilStateCreateInfo
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
100 :: Ptr CFloat))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ PipelineDepthStencilStateCreateFlags
-> Bool
-> Bool
-> CompareOp
-> Bool
-> Bool
-> StencilOpState
-> StencilOpState
-> Float
-> Float
-> PipelineDepthStencilStateCreateInfo
PipelineDepthStencilStateCreateInfo
             PipelineDepthStencilStateCreateFlags
flags
             (Bool32 -> Bool
bool32ToBool Bool32
depthTestEnable)
             (Bool32 -> Bool
bool32ToBool Bool32
depthWriteEnable)
             CompareOp
depthCompareOp
             (Bool32 -> Bool
bool32ToBool Bool32
depthBoundsTestEnable)
             (Bool32 -> Bool
bool32ToBool Bool32
stencilTestEnable)
             StencilOpState
front
             StencilOpState
back
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
minDepthBounds)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
maxDepthBounds)

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

instance Zero PipelineDepthStencilStateCreateInfo where
  zero :: PipelineDepthStencilStateCreateInfo
zero = PipelineDepthStencilStateCreateFlags
-> Bool
-> Bool
-> CompareOp
-> Bool
-> Bool
-> StencilOpState
-> StencilOpState
-> Float
-> Float
-> PipelineDepthStencilStateCreateInfo
PipelineDepthStencilStateCreateInfo
           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


-- | VkGraphicsPipelineCreateInfo - Structure specifying parameters of a
-- newly created graphics pipeline
--
-- = Description
--
-- The parameters @basePipelineHandle@ and @basePipelineIndex@ are
-- described in more detail in
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-pipeline-derivatives Pipeline Derivatives>.
--
-- If any shader stage fails to compile, the compile log will be reported
-- back to the application, and
-- 'Vulkan.Core10.Enums.Result.ERROR_INVALID_SHADER_NV' will be generated.
--
-- Note
--
-- With @VK_EXT_extended_dynamic_state3@, it is possible that many of the
-- 'GraphicsPipelineCreateInfo' members above /can/ be @NULL@ because all
-- their state is dynamic and therefore ignored. This is optional so the
-- application /can/ still use a valid pointer if it needs to set the
-- @pNext@ or @flags@ fields to specify state for other extensions.
--
-- The state required for a graphics pipeline is divided into
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-vertex-input vertex input state>,
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
-- and
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output state>.
--
-- __Vertex Input State__
--
-- Vertex input state is defined by:
--
-- -   'PipelineVertexInputStateCreateInfo'
--
-- -   'PipelineInputAssemblyStateCreateInfo'
--
-- If this pipeline specifies
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization state>
-- either directly or by including it as a pipeline library and its
-- @pStages@ includes a vertex shader, this state /must/ be specified to
-- create a
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete graphics pipeline>.
--
-- If a pipeline includes
-- 'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT'
-- in
-- 'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
-- either explicitly or as a default, and either the conditions requiring
-- this state for a
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete graphics pipeline>
-- are met or this pipeline does not specify
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization state>
-- in any way, that pipeline /must/ specify this state directly.
--
-- __Pre-Rasterization Shader State__
--
-- Pre-rasterization shader state is defined by:
--
-- -   'PipelineShaderStageCreateInfo' entries for:
--
--     -   Vertex shaders
--
--     -   Tessellation control shaders
--
--     -   Tessellation evaluation shaders
--
--     -   Geometry shaders
--
--     -   Task shaders
--
--     -   Mesh shaders
--
-- -   Within the 'Vulkan.Core10.Handles.PipelineLayout', all descriptor
--     sets with pre-rasterization shader bindings if
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT'
--     was specified.
--
--     -   If
--         'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT'
--         was not specified, the full pipeline layout must be specified.
--
-- -   'PipelineViewportStateCreateInfo'
--
-- -   'PipelineRasterizationStateCreateInfo'
--
-- -   'PipelineTessellationStateCreateInfo'
--
-- -   'Vulkan.Core10.Handles.RenderPass' and @subpass@ parameter
--
-- -   The @viewMask@ parameter of
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'
--     (formats are ignored)
--
-- -   'Vulkan.Extensions.VK_EXT_discard_rectangles.PipelineDiscardRectangleStateCreateInfoEXT'
--
-- -   'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'
--
-- This state /must/ be specified to create a
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete graphics pipeline>.
--
-- If either the @pNext@ chain includes a
-- 'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'
-- structure with
-- 'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
-- included in @flags@, or it is not specified and would default to include
-- that value, this state /must/ be specified in the pipeline.
--
-- __Fragment Shader State__
--
-- Fragment shader state is defined by:
--
-- -   A 'PipelineShaderStageCreateInfo' entry for the fragment shader
--
-- -   Within the 'Vulkan.Core10.Handles.PipelineLayout', all descriptor
--     sets with fragment shader bindings if
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT'
--     was specified.
--
--     -   If
--         'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT'
--         was not specified, the full pipeline layout must be specified.
--
-- -   'PipelineMultisampleStateCreateInfo' if
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-sampleshading sample shading>
--     is enabled or @renderpass@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   'PipelineDepthStencilStateCreateInfo'
--
-- -   'Vulkan.Core10.Handles.RenderPass' and @subpass@ parameter
--
-- -   The @viewMask@ parameter of
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'
--     (formats are ignored)
--
-- -   'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'
--
-- -   'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV'
--
-- -   'Vulkan.Extensions.VK_NV_representative_fragment_test.PipelineRepresentativeFragmentTestStateCreateInfoNV'
--
-- -   Inclusion\/omission of the
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR'
--     flag
--
-- -   Inclusion\/omission of the
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT'
--     flag
--
-- If a pipeline specifies
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization state>
-- either directly or by including it as a pipeline library and
-- @rasterizerDiscardEnable@ is set to
-- 'Vulkan.Core10.FundamentalTypes.FALSE' or
-- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE'
-- is used, this state /must/ be specified to create a
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete graphics pipeline>.
--
-- If a pipeline includes
-- 'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT'
-- in
-- 'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
-- either explicitly or as a default, and either the conditions requiring
-- this state for a
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete graphics pipeline>
-- are met or this pipeline does not specify
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization state>
-- in any way, that pipeline /must/ specify this state directly.
--
-- __Fragment Output State__
--
-- Fragment output state is defined by:
--
-- -   'PipelineColorBlendStateCreateInfo'
--
-- -   'Vulkan.Core10.Handles.RenderPass' and @subpass@ parameter
--
-- -   'PipelineMultisampleStateCreateInfo'
--
-- -   'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'
--
-- -   'Vulkan.Extensions.VK_KHR_dynamic_rendering.AttachmentSampleCountInfoAMD'
--
-- -   'Vulkan.Extensions.VK_KHR_dynamic_rendering.AttachmentSampleCountInfoNV'
--
-- -   'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID'
--
-- -   Inclusion\/omission of the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT'
--     and
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT'
--     flags
--
-- If a pipeline specifies
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization state>
-- either directly or by including it as a pipeline library and
-- @rasterizerDiscardEnable@ is set to
-- 'Vulkan.Core10.FundamentalTypes.FALSE' or
-- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE'
-- is used, this state /must/ be specified to create a
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete graphics pipeline>.
--
-- If a pipeline includes
-- 'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT'
-- in
-- 'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
-- either explicitly or as a default, and either the conditions requiring
-- this state for a
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete graphics pipeline>
-- are met or this pipeline does not specify
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization state>
-- in any way, that pipeline /must/ specify this state directly.
--
-- __Dynamic State__
--
-- Dynamic state values set via @pDynamicState@ /must/ be ignored if the
-- state they correspond to is not otherwise statically set by one of the
-- state subsets used to create the pipeline. Additionally, setting dynamic
-- state values /must/ not modify whether state in a linked library is
-- static or dynamic; this is set and unchangeable when the library is
-- created. For example, if a pipeline only included
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
-- then any dynamic state value corresponding to depth or stencil testing
-- has no effect. Any linked library that has dynamic state enabled that
-- same dynamic state /must/ also be enabled in all the other linked
-- libraries to which that dynamic state applies.
--
-- __Complete Graphics Pipelines__
--
-- A complete graphics pipeline always includes
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
-- with other subsets included depending on that state as specified in the
-- above sections.
--
-- __Graphics Pipeline Library Layouts__
--
-- If different subsets are linked together with pipeline layouts created
-- with
-- 'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT',
-- the final effective pipeline layout is effectively the union of the
-- linked pipeline layouts. When binding descriptor sets for this pipeline,
-- the pipeline layout used /must/ be compatible with this union. This
-- pipeline layout /can/ be overridden when linking with
-- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT'
-- by providing a 'Vulkan.Core10.Handles.PipelineLayout' that is
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#descriptorsets-compatibility compatible>
-- with this union other than
-- 'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT',
-- or when linking without
-- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT'
-- by providing a 'Vulkan.Core10.Handles.PipelineLayout' that is fully
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#descriptorsets-compatibility compatible>
-- with this union.
--
-- 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-VkGraphicsPipelineCreateInfo-flags-07984# If @flags@ contains
--     the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, and @basePipelineIndex@ is -1, @basePipelineHandle@ /must/ be
--     a valid graphics 'Vulkan.Core10.Handles.Pipeline' handle
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-07985# If @flags@ contains
--     the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, and @basePipelineHandle@ is
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', @basePipelineIndex@ /must/
--     be a valid index into the calling command’s @pCreateInfos@ parameter
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-07986# If @flags@ contains
--     the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, @basePipelineIndex@ /must/ be -1 or @basePipelineHandle@
--     /must/ be 'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-layout-07987# If a push constant
--     block is declared in a shader, a push constant range in @layout@
--     /must/ match both the shader stage and range
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-layout-07988# If a
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#interfaces-resources resource variables>
--     is declared in a shader, a descriptor slot in @layout@ /must/ match
--     the shader stage
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-layout-07990# If a
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#interfaces-resources resource variables>
--     is declared in a shader, and the descriptor type is not
--     'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_MUTABLE_EXT', a
--     descriptor slot in @layout@ /must/ match the descriptor type
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-layout-07991# If a
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#interfaces-resources resource variables>
--     is declared in a shader as an array, a descriptor slot in @layout@
--     /must/ match the descriptor count
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-stage-02096# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     the @stage@ member of one element of @pStages@ /must/ be
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_VERTEX_BIT' or
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_MESH_BIT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-02095# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     the geometric shader stages provided in @pStages@ /must/ be either
--     from the mesh shading pipeline (@stage@ is
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TASK_BIT_EXT'
--     or
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_MESH_BIT_EXT')
--     or from the primitive shading pipeline (@stage@ is
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_VERTEX_BIT',
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TESSELLATION_CONTROL_BIT',
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TESSELLATION_EVALUATION_BIT',
--     or
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_GEOMETRY_BIT')
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-TaskNV-07063# The shader stages
--     for
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_TASK_BIT_EXT'
--     or
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_MESH_BIT_EXT'
--     /must/ use either the @TaskNV@ and @MeshNV@ @Execution@ @Model@ or
--     the @TaskEXT@ and @MeshEXT@ @Execution@ @Model@, but /must/ not use
--     both
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-00729# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and @pStages@ includes a tessellation control shader stage, it
--     /must/ include a tessellation evaluation shader stage
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-00730# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and @pStages@ includes a tessellation evaluation shader stage, it
--     /must/ include a tessellation control shader stage
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-09022# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and @pStages@ includes a tessellation control shader stage, and the
--     @VK_EXT_extended_dynamic_state3@ extension is not enabled or the
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT'
--     dynamic state is not set, @pTessellationState@ /must/ be a valid
--     pointer to a valid 'PipelineTessellationStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pTessellationState-09023# If
--     @pTessellationState@ is not @NULL@ it /must/ be a pointer to a valid
--     'PipelineTessellationStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-00732# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and @pStages@ includes tessellation shader stages, the shader code
--     of at least one stage /must/ contain an @OpExecutionMode@
--     instruction specifying the type of subdivision in the pipeline
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-00733# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and @pStages@ includes tessellation shader stages, and the shader
--     code of both stages contain an @OpExecutionMode@ instruction
--     specifying the type of subdivision in the pipeline, they /must/ both
--     specify the same subdivision mode
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-00734# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and @pStages@ includes tessellation shader stages, the shader code
--     of at least one stage /must/ contain an @OpExecutionMode@
--     instruction specifying the output patch size in the pipeline
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-00735# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and @pStages@ includes tessellation shader stages, and the shader
--     code of both contain an @OpExecutionMode@ instruction specifying the
--     out patch size in the pipeline, they /must/ both specify the same
--     patch size
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-08888# If the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-vertex-input vertex input state>
--     and @pStages@ includes tessellation shader stages, and either
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_TOPOLOGY'
--     dynamic state is not enabled or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-dynamicPrimitiveTopologyUnrestricted dynamicPrimitiveTopologyUnrestricted>
--     is 'Vulkan.Core10.FundamentalTypes.FALSE', the @topology@ member of
--     @pInputAssembly@ /must/ be
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_PATCH_LIST'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-topology-08889# If the pipeline
--     is being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-vertex-input vertex input state>
--     and the @topology@ member of @pInputAssembly@ is
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_PATCH_LIST',
--     and either
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_TOPOLOGY'
--     dynamic state is not enabled or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-dynamicPrimitiveTopologyUnrestricted dynamicPrimitiveTopologyUnrestricted>
--     is 'Vulkan.Core10.FundamentalTypes.FALSE', then @pStages@ /must/
--     include tessellation shader stages
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-TessellationEvaluation-07723# If
--     the pipeline is being created with a @TessellationEvaluation@
--     @Execution@ @Model@, no @Geometry@ @Execution@ @Model@, uses the
--     @PointMode@ @Execution@ @Mode@, and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-shaderTessellationAndGeometryPointSize shaderTessellationAndGeometryPointSize>
--     is enabled, a @PointSize@ decorated variable /must/ be written to if
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-maintenance5 maintenance5>
--     is not enabled
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-topology-08773# If the pipeline
--     is being created with a @Vertex@ @Execution@ @Model@ and no
--     @TessellationEvaluation@ or @Geometry@ @Execution@ @Model@, and the
--     @topology@ member of @pInputAssembly@ is
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_POINT_LIST',
--     and either
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_TOPOLOGY'
--     dynamic state is not enabled or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-dynamicPrimitiveTopologyUnrestricted dynamicPrimitiveTopologyUnrestricted>
--     is 'Vulkan.Core10.FundamentalTypes.FALSE', a @PointSize@ decorated
--     variable /must/ be written to if
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-maintenance5 maintenance5>
--     is not enabled
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-maintenance5-08775# If
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-maintenance5 maintenance5>
--     is enabled and a @PointSize@ decorated variable is written to, all
--     execution paths /must/ write to a @PointSize@ decorated variable
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-TessellationEvaluation-07724# If
--     the pipeline is being created with a @TessellationEvaluation@
--     @Execution@ @Model@, no @Geometry@ @Execution@ @Model@, uses the
--     @PointMode@ @Execution@ @Mode@, and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-shaderTessellationAndGeometryPointSize shaderTessellationAndGeometryPointSize>
--     is not enabled, a @PointSize@ decorated variable /must/ not be
--     written to
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-shaderTessellationAndGeometryPointSize-08776#
--     If the pipeline is being created with a @Geometry@ @Execution@
--     @Model@, uses the @OutputPoints@ @Execution@ @Mode@, and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-shaderTessellationAndGeometryPointSize shaderTessellationAndGeometryPointSize>
--     is enabled, a @PointSize@ decorated variable /must/ be written to
--     for every vertex emitted if
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-maintenance5 maintenance5>
--     is not enabled
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-Geometry-07726# If the pipeline
--     is being created with a @Geometry@ @Execution@ @Model@, uses the
--     @OutputPoints@ @Execution@ @Mode@, and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-shaderTessellationAndGeometryPointSize shaderTessellationAndGeometryPointSize>
--     is not enabled, a @PointSize@ decorated variable /must/ not be
--     written to
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-00738# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and @pStages@ includes a geometry shader stage, and does not include
--     any tessellation shader stages, its shader code /must/ contain an
--     @OpExecutionMode@ instruction specifying an input primitive type
--     that is
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#shaders-geometry-execution compatible>
--     with the primitive topology specified in @pInputAssembly@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-00739# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and @pStages@ includes a geometry shader stage, and also includes
--     tessellation shader stages, its shader code /must/ contain an
--     @OpExecutionMode@ instruction specifying an input primitive type
--     that is
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#shaders-geometry-execution compatible>
--     with the primitive topology that is output by the tessellation
--     stages
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-00740# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     it includes both a fragment shader and a geometry shader, and the
--     fragment shader code reads from an input variable that is decorated
--     with @PrimitiveId@, then the geometry shader code /must/ write to a
--     matching output variable, decorated with @PrimitiveId@, in all
--     execution paths
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-PrimitiveId-06264# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     it includes a mesh shader and the fragment shader code reads from an
--     input variable that is decorated with @PrimitiveId@, then the mesh
--     shader code /must/ write to a matching output variable, decorated
--     with @PrimitiveId@, in all execution paths
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06038# If @renderPass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE' and the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     the fragment shader /must/ not read from any input attachment that
--     is defined as 'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED' in
--     @subpass@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-00742# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and multiple pre-rasterization shader stages are included in
--     @pStages@, the shader code for the entry points identified by those
--     @pStages@ and the rest of the state identified by this structure
--     /must/ adhere to the pipeline linking rules described in the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#interfaces Shader Interfaces>
--     chapter
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-None-04889# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     the fragment shader and last
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader stage>
--     and any relevant state /must/ adhere to the pipeline linking rules
--     described in the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#interfaces Shader Interfaces>
--     chapter
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06041# If @renderPass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', and the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     then for each color attachment in the subpass, if the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#potential-format-features potential format features>
--     of the format of the corresponding attachment description do not
--     contain
--     'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT',
--     then the @blendEnable@ member of the corresponding element of the
--     @pAttachments@ member of @pColorBlendState@ /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-07609# If @renderPass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', and the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and the @pColorBlendState@ pointer is not @NULL@, and the subpass
--     uses color attachments, the @attachmentCount@ member of
--     @pColorBlendState@ /must/ be equal to the @colorAttachmentCount@
--     used to create @subpass@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04130# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and @pViewportState->pViewports@ is not dynamic, then
--     @pViewportState->pViewports@ /must/ be a valid pointer to an array
--     of @pViewportState->viewportCount@ valid 'Viewport' structures
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04131# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and @pViewportState->pScissors@ is not dynamic, then
--     @pViewportState->pScissors@ /must/ be a valid pointer to an array of
--     @pViewportState->scissorCount@
--     'Vulkan.Core10.FundamentalTypes.Rect2D' structures
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-wideLines wideLines>
--     feature is not enabled, and no element of the @pDynamicStates@
--     member of @pDynamicState@ is
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LINE_WIDTH', the
--     @lineWidth@ member of @pRasterizationState@ /must/ be @1.0@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-09024# If
--     the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and the
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE'
--     dynamic state is enabled or the @rasterizerDiscardEnable@ member of
--     @pRasterizationState@ is 'Vulkan.Core10.FundamentalTypes.FALSE', and
--     either the @VK_EXT_extended_dynamic_state3@ extension is not
--     enabled, or either the
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT'
--     or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT'
--     dynamic states are not set, @pViewportState@ /must/ be a valid
--     pointer to a valid 'PipelineViewportStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pViewportState-09025# If
--     @pViewportState@ is not @NULL@ it /must/ be a valid pointer to a
--     valid 'PipelineViewportStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pViewportState-04892# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and the graphics pipeline state was created with the
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE'
--     dynamic state enabled, @pViewportState@ /must/ be a valid pointer to
--     a valid 'PipelineViewportStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-09026# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and the @VK_EXT_extended_dynamic_state3@ extension is not enabled or
--     any of the
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SAMPLE_MASK_EXT', or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT'
--     dynamic states is not set, or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-alphaToOne alphaToOne>
--     is enabled on the device and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT'
--     is not set, @pMultisampleState@ /must/ be a valid pointer to a valid
--     'PipelineMultisampleStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-09027# If
--     @pMultisampleState@ is not @NULL@ is /must/ be a valid pointer to a
--     valid 'PipelineMultisampleStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-alphaToCoverageEnable-08891# If
--     the pipeline is being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     the 'PipelineMultisampleStateCreateInfo'::@alphaToCoverageEnable@ is
--     not ignored and is 'Vulkan.Core10.FundamentalTypes.TRUE', then the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#interfaces-fragmentoutput Fragment Output Interface>
--     /must/ contain a variable for the alpha @Component@ word in
--     @Location@ 0 at @Index@ 0
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-09028# If @renderPass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     and @subpass@ uses a depth\/stencil attachment, and the
--     @VK_EXT_extended_dynamic_state3@ extension is not enabled or, any of
--     the
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_TEST_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_WRITE_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_COMPARE_OP',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_STENCIL_TEST_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_STENCIL_OP', or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BOUNDS'
--     dynamic states are not set, @pDepthStencilState@ /must/ be a valid
--     pointer to a valid 'PipelineDepthStencilStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDepthStencilState-09029# If
--     @pDepthStencilState@ is not @NULL@ it /must/ be a valid pointer to a
--     valid 'PipelineDepthStencilStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-09030# If @renderPass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and @subpass@ uses color attachments, and
--     @VK_EXT_extended_dynamic_state3@ extension is not enabled, or any of
--     the
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LOGIC_OP_EXT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_WRITE_MASK_EXT',
--     or 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_BLEND_CONSTANTS'
--     dynamic states are not set, @pColorBlendState@ /must/ be a valid
--     pointer to a valid 'PipelineColorBlendStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-depthBiasClamp depthBiasClamp>
--     feature is not enabled, no element of the @pDynamicStates@ member of
--     @pDynamicState@ is
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BIAS', and the
--     @depthBiasEnable@ member of @pRasterizationState@ is
--     'Vulkan.Core10.FundamentalTypes.TRUE', the @depthBiasClamp@ member
--     of @pRasterizationState@ /must/ be @0.0@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-02510# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     and the @VK_EXT_depth_range_unrestricted@ extension is not enabled
--     and no element of the @pDynamicStates@ member of @pDynamicState@ is
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BOUNDS', and
--     the @depthBoundsTestEnable@ member of @pDepthStencilState@ is
--     'Vulkan.Core10.FundamentalTypes.TRUE', the @minDepthBounds@ and
--     @maxDepthBounds@ members of @pDepthStencilState@ /must/ be between
--     @0.0@ and @1.0@, inclusive
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07610# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and @rasterizationSamples@ and @sampleLocationsInfo@ are not
--     dynamic, and
--     'Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@
--     included in the @pNext@ chain of @pMultisampleState@ is
--     'Vulkan.Core10.FundamentalTypes.TRUE',
--     @sampleLocationsInfo.sampleLocationGridSize.width@ /must/ evenly
--     divide
--     'Vulkan.Extensions.VK_EXT_sample_locations.MultisamplePropertiesEXT'::@sampleLocationGridSize.width@
--     as returned by
--     'Vulkan.Extensions.VK_EXT_sample_locations.getPhysicalDeviceMultisamplePropertiesEXT'
--     with a @samples@ parameter equaling @rasterizationSamples@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07611# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and @rasterizationSamples@ and @sampleLocationsInfo@ are not
--     dynamic, and
--     'Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@
--     the included in the @pNext@ chain of @pMultisampleState@ is
--     'Vulkan.Core10.FundamentalTypes.TRUE' or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT'
--     is used, @sampleLocationsInfo.sampleLocationGridSize.height@ /must/
--     evenly divide
--     'Vulkan.Extensions.VK_EXT_sample_locations.MultisamplePropertiesEXT'::@sampleLocationGridSize.height@
--     as returned by
--     'Vulkan.Extensions.VK_EXT_sample_locations.getPhysicalDeviceMultisamplePropertiesEXT'
--     with a @samples@ parameter equaling @rasterizationSamples@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07612# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and @rasterizationSamples@ and @sampleLocationsInfo@ are not
--     dynamic, and
--     'Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'::@sampleLocationsEnable@
--     included in the @pNext@ chain of @pMultisampleState@ is
--     'Vulkan.Core10.FundamentalTypes.TRUE' or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT'
--     is used, @sampleLocationsInfo.sampleLocationsPerPixel@ /must/ equal
--     @rasterizationSamples@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-sampleLocationsEnable-01524# If
--     the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     and the @sampleLocationsEnable@ member of a
--     'Vulkan.Extensions.VK_EXT_sample_locations.PipelineSampleLocationsStateCreateInfoEXT'
--     structure included in the @pNext@ chain of @pMultisampleState@ is
--     'Vulkan.Core10.FundamentalTypes.TRUE', the fragment shader code
--     /must/ not statically use the extended instruction
--     @InterpolateAtSample@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-multisampledRenderToSingleSampled-06853#
--     If the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and none of the @VK_AMD_mixed_attachment_samples@ extension, the
--     @VK_NV_framebuffer_mixed_samples@ extension, or the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-multisampledRenderToSingleSampled multisampledRenderToSingleSampled>
--     feature are enabled, @rasterizationSamples@ is not dynamic, and if
--     @subpass@ uses color and\/or depth\/stencil attachments, then the
--     @rasterizationSamples@ member of @pMultisampleState@ /must/ be the
--     same as the sample count for those subpass attachments
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-subpass-01505# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and the @VK_AMD_mixed_attachment_samples@ extension is enabled,
--     @rasterizationSamples@ is not dynamic, and if @subpass@ uses color
--     and\/or depth\/stencil attachments, then the @rasterizationSamples@
--     member of @pMultisampleState@ /must/ equal the maximum of the sample
--     counts of those subpass attachments
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06854# If @renderPass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', the
--     @VK_EXT_multisampled_render_to_single_sampled@ extension is enabled,
--     @rasterizationSamples@ is not dynamic, and @subpass@ has a
--     'Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled.MultisampledRenderToSingleSampledInfoEXT'
--     structure included in the
--     'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.SubpassDescription2'::@pNext@
--     chain with @multisampledRenderToSingleSampledEnable@ equal to
--     'Vulkan.Core10.FundamentalTypes.TRUE', then the
--     @rasterizationSamples@ member of @pMultisampleState@ /must/ be equal
--     to
--     'Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled.MultisampledRenderToSingleSampledInfoEXT'::@rasterizationSamples@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-subpass-01411# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     the @VK_NV_framebuffer_mixed_samples@ extension is enabled,
--     @rasterizationSamples@ is not dynamic, and if @subpass@ has a
--     depth\/stencil attachment and depth test, stencil test, or depth
--     bounds test are enabled, then the @rasterizationSamples@ member of
--     @pMultisampleState@ /must/ be the same as the sample count of the
--     depth\/stencil attachment
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-subpass-01412# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     the @VK_NV_framebuffer_mixed_samples@ extension is enabled,
--     @rasterizationSamples@ is not dynamic, and if @subpass@ has any
--     color attachments, then the @rasterizationSamples@ member of
--     @pMultisampleState@ /must/ be greater than or equal to the sample
--     count for those subpass attachments
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-coverageReductionMode-02722# If
--     the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     the @VK_NV_coverage_reduction_mode@ extension is enabled, and
--     @rasterizationSamples@ is not dynamic, the coverage reduction mode
--     specified by
--     'Vulkan.Extensions.VK_NV_coverage_reduction_mode.PipelineCoverageReductionStateCreateInfoNV'::@coverageReductionMode@,
--     the @rasterizationSamples@ member of @pMultisampleState@ and the
--     sample counts for the color and depth\/stencil attachments (if the
--     subpass has them) /must/ be a valid combination returned by
--     'Vulkan.Extensions.VK_NV_coverage_reduction_mode.getPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-subpass-00758# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @rasterizationSamples@ is not dynamic, and @subpass@ does not use
--     any color and\/or depth\/stencil attachments, then the
--     @rasterizationSamples@ member of @pMultisampleState@ /must/ follow
--     the rules for a
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#renderpass-noattachments zero-attachment subpass>
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06046# If @renderPass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', @subpass@ /must/ be
--     a valid subpass within @renderPass@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06047# If @renderPass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     @subpass@ viewMask is not @0@, and @multiviewTessellationShader@ is
--     not enabled, then @pStages@ /must/ not include tessellation shaders
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06048# If @renderPass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     @subpass@ viewMask is not @0@, and @multiviewGeometryShader@ is not
--     enabled, then @pStages@ /must/ not include a geometry shader
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06049# If @renderPass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and @subpass@ viewMask is not @0@, all of the shaders in the
--     pipeline /must/ not write to the @Layer@ built-in output
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06050# If @renderPass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE' and the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and @subpass@ viewMask is not @0@, then all of the shaders in the
--     pipeline /must/ not include variables decorated with the @Layer@
--     built-in decoration in their interfaces
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-07717# If @renderPass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE' and the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and @subpass@ viewMask is not @0@, then all of the shaders in the
--     pipeline /must/ not include variables decorated with the @ViewMask@
--     built-in decoration in their interfaces
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-07064# If @renderPass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     @subpass@ viewMask is not @0@, and @multiviewMeshShader@ is not
--     enabled, then @pStages@ /must/ not include a mesh shader
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-00764# @flags@ /must/ not
--     contain the
--     'Vulkan.Core11.Promoted_From_VK_KHR_device_group.PIPELINE_CREATE_DISPATCH_BASE'
--     flag
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-01565# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and an input attachment was referenced by an @aspectMask@ at
--     @renderPass@ creation time, the fragment shader /must/ only read
--     from the aspects that were specified for that input attachment
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-layout-01688# The number of
--     resources in @layout@ accessible to each shader stage that is used
--     by the pipeline /must/ be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxPerStageResources@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01715# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and no element of the @pDynamicStates@ member of @pDynamicState@ is
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_W_SCALING_NV',
--     and the @viewportWScalingEnable@ member of a
--     'Vulkan.Extensions.VK_NV_clip_space_w_scaling.PipelineViewportWScalingStateCreateInfoNV'
--     structure, included in the @pNext@ chain of @pViewportState@, is
--     'Vulkan.Core10.FundamentalTypes.TRUE', the @pViewportWScalings@
--     member of the
--     'Vulkan.Extensions.VK_NV_clip_space_w_scaling.PipelineViewportWScalingStateCreateInfoNV'
--     /must/ be a pointer to an array of
--     'Vulkan.Extensions.VK_NV_clip_space_w_scaling.PipelineViewportWScalingStateCreateInfoNV'::@viewportCount@
--     valid
--     'Vulkan.Extensions.VK_NV_clip_space_w_scaling.ViewportWScalingNV'
--     structures
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04056# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and no element of the @pDynamicStates@ member of @pDynamicState@ is
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV',
--     and if @pViewportState->pNext@ chain includes a
--     'Vulkan.Extensions.VK_NV_scissor_exclusive.PipelineViewportExclusiveScissorStateCreateInfoNV'
--     structure, and if its @exclusiveScissorCount@ member is not @0@,
--     then its @pExclusiveScissors@ member /must/ be a valid pointer to an
--     array of @exclusiveScissorCount@
--     'Vulkan.Core10.FundamentalTypes.Rect2D' structures
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07854# If
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV'
--     is included in the @pDynamicStates@ array then the implementation
--     /must/ support at least @specVersion@ @2@ of the
--     @VK_NV_scissor_exclusive@ extension
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04057# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and no element of the @pDynamicStates@ member of @pDynamicState@ is
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV',
--     and if @pViewportState->pNext@ chain includes a
--     'Vulkan.Extensions.VK_NV_shading_rate_image.PipelineViewportShadingRateImageStateCreateInfoNV'
--     structure, then its @pShadingRatePalettes@ member /must/ be a valid
--     pointer to an array of @viewportCount@ valid
--     'Vulkan.Extensions.VK_NV_shading_rate_image.ShadingRatePaletteNV'
--     structures
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04058# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and no element of the @pDynamicStates@ member of @pDynamicState@ is
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DISCARD_RECTANGLE_EXT',
--     and if @pNext@ chain includes a
--     'Vulkan.Extensions.VK_EXT_discard_rectangles.PipelineDiscardRectangleStateCreateInfoEXT'
--     structure, and if its @discardRectangleCount@ member is not @0@,
--     then its @pDiscardRectangles@ member /must/ be a valid pointer to an
--     array of @discardRectangleCount@
--     'Vulkan.Core10.FundamentalTypes.Rect2D' structures
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07855# If
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT'
--     is included in the @pDynamicStates@ array then the implementation
--     /must/ support at least @specVersion@ @2@ of the
--     @VK_EXT_discard_rectangles@ extension
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07856# If
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT'
--     is included in the @pDynamicStates@ array then the implementation
--     /must/ support at least @specVersion@ @2@ of the
--     @VK_EXT_discard_rectangles@ extension
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-02097# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-vertex-input vertex input state>,
--     and @pVertexInputState@ is not dynamic, then @pVertexInputState@
--     /must/ be a valid pointer to a valid
--     'PipelineVertexInputStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-Input-07904# If the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-vertex-input vertex input state>
--     and @pVertexInputState@ is not dynamic, then all variables with the
--     @Input@ storage class decorated with @Location@ in the @Vertex@
--     @Execution@ @Model@ @OpEntryPoint@ /must/ contain a location in
--     'VertexInputAttributeDescription'::@location@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-Input-08733# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-vertex-input vertex input state>
--     and @pVertexInputState@ is not dynamic, then the numeric type
--     associated with all @Input@ variables of the corresponding
--     @Location@ in the @Vertex@ @Execution@ @Model@ @OpEntryPoint@ /must/
--     be the same as 'VertexInputAttributeDescription'::@format@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-08929# If the
--     pipeline is being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-vertex-input vertex input state>
--     and @pVertexInputState@ is not dynamic, and
--     'VertexInputAttributeDescription'::@format@ has a 64-bit component,
--     then the scalar width associated with all @Input@ variables of the
--     corresponding @Location@ in the @Vertex@ @Execution@ @Model@
--     @OpEntryPoint@ /must/ be 64-bit
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-08930# If the
--     pipeline is being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-vertex-input vertex input state>
--     and @pVertexInputState@ is not dynamic, and the scalar width
--     associated with a @Location@ decorated @Input@ variable in the
--     @Vertex@ @Execution@ @Model@ @OpEntryPoint@ is 64-bit, then the
--     corresponding 'VertexInputAttributeDescription'::@format@ /must/
--     have a 64-bit component
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-09198# If the
--     pipeline is being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-vertex-input vertex input state>
--     and @pVertexInputState@ is not dynamic, and
--     'VertexInputAttributeDescription'::@format@ has a 64-bit component,
--     then all @Input@ variables at the corresponding @Location@ in the
--     @Vertex@ @Execution@ @Model@ @OpEntryPoint@ /must/ not use
--     components that are not present in the format
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-dynamicPrimitiveTopologyUnrestricted-09031#
--     If the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-vertex-input vertex input state>,
--     and the @VK_EXT_extended_dynamic_state3@ extension is not enabled,
--     or either
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE',
--     or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_TOPOLOGY'
--     dynamic states are not set, or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-dynamicPrimitiveTopologyUnrestricted dynamicPrimitiveTopologyUnrestricted>
--     is 'Vulkan.Core10.FundamentalTypes.FALSE', @pInputAssemblyState@
--     /must/ be a valid pointer to a valid
--     'PipelineInputAssemblyStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pInputAssemblyState-09032# If
--     @pInputAssemblyState@ is not @NULL@ it /must/ be a valid pointer to
--     a valid 'PipelineInputAssemblyStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-02317# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     the @Xfb@ execution mode /can/ be specified by no more than one
--     shader stage in @pStages@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-02318# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and any shader stage in @pStages@ specifies @Xfb@ execution mode it
--     /must/ be the last
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader stage>
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-rasterizationStream-02319# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and a
--     'Vulkan.Extensions.VK_EXT_transform_feedback.PipelineRasterizationStateStreamCreateInfoEXT'::@rasterizationStream@
--     value other than zero is specified, all variables in the output
--     interface of the entry point being compiled decorated with
--     @Position@, @PointSize@, @ClipDistance@, or @CullDistance@ /must/ be
--     decorated with identical @Stream@ values that match the
--     @rasterizationStream@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-rasterizationStream-02320# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and
--     'Vulkan.Extensions.VK_EXT_transform_feedback.PipelineRasterizationStateStreamCreateInfoEXT'::@rasterizationStream@
--     is zero, or not specified, all variables in the output interface of
--     the entry point being compiled decorated with @Position@,
--     @PointSize@, @ClipDistance@, or @CullDistance@ /must/ be decorated
--     with a @Stream@ value of zero, or /must/ not specify the @Stream@
--     decoration
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-geometryStreams-02321# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and the last
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader stage>
--     is a geometry shader, and that geometry shader uses the
--     @GeometryStreams@ capability, then
--     'Vulkan.Extensions.VK_EXT_transform_feedback.PhysicalDeviceTransformFeedbackFeaturesEXT'::@geometryStreams@
--     feature /must/ be enabled
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-None-02322# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and there are any mesh shader stages in the pipeline there /must/
--     not be any shader stage in the pipeline with a @Xfb@ execution mode
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-lineRasterizationMode-02766# If
--     the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and at least one of
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     and @pMultisampleState@ is not @NULL@, the @lineRasterizationMode@
--     member of a
--     'Vulkan.Extensions.VK_EXT_line_rasterization.PipelineRasterizationLineStateCreateInfoEXT'
--     structure included in the @pNext@ chain of @pRasterizationState@ is
--     'Vulkan.Extensions.VK_EXT_line_rasterization.LINE_RASTERIZATION_MODE_BRESENHAM_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_line_rasterization.LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT',
--     then the @alphaToCoverageEnable@, @alphaToOneEnable@, and
--     @sampleShadingEnable@ members of @pMultisampleState@ /must/ all be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-stippledLineEnable-02767# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     the @stippledLineEnable@ member of
--     'Vulkan.Extensions.VK_EXT_line_rasterization.PipelineRasterizationLineStateCreateInfoEXT'
--     is 'Vulkan.Core10.FundamentalTypes.TRUE', and no element of the
--     @pDynamicStates@ member of @pDynamicState@ is
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LINE_STIPPLE_EXT',
--     then the @lineStippleFactor@ member of
--     'Vulkan.Extensions.VK_EXT_line_rasterization.PipelineRasterizationLineStateCreateInfoEXT'
--     /must/ be in the range [1,256]
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-03372# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-03373# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-03374# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-03375# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-03376# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-03377# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-03577# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-04947# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03378# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState extendedDynamicState>
--     feature is not enabled, and the value of
--     'Vulkan.Core10.DeviceInitialization.ApplicationInfo'::@apiVersion@
--     used to create the 'Vulkan.Core10.Handles.Instance' is less than
--     Version 1.3 there /must/ be no element of the @pDynamicStates@
--     member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_CULL_MODE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRONT_FACE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_TOPOLOGY',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_TEST_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_WRITE_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_COMPARE_OP',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_STENCIL_TEST_ENABLE',
--     or 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_STENCIL_OP'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03379# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT'
--     is included in the @pDynamicStates@ array then @viewportCount@
--     /must/ be zero
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03380# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT'
--     is included in the @pDynamicStates@ array then @scissorCount@ /must/
--     be zero
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04132# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT'
--     is included in the @pDynamicStates@ array then
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT' /must/ not
--     be present
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04133# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT'
--     is included in the @pDynamicStates@ array then
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR' /must/ not
--     be present
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07065# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and includes a mesh shader, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_TOPOLOGY',
--     or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04868# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState2 extendedDynamicState2>
--     feature is not enabled, and the value of
--     'Vulkan.Core10.DeviceInitialization.ApplicationInfo'::@apiVersion@
--     used to create the 'Vulkan.Core10.Handles.Instance' is less than
--     Version 1.3 there /must/ be no element of the @pDynamicStates@
--     member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BIAS_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE',
--     or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04869# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState2LogicOp extendedDynamicState2LogicOp>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LOGIC_OP_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04870# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState2PatchControlPoints extendedDynamicState2PatchControlPoints>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07066# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and includes a mesh shader, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE',
--     or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-02877# If @flags@ includes
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV',
--     then the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-deviceGeneratedCommands deviceGeneratedCommands>
--     feature /must/ be enabled
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-02966# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and @flags@ includes
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV',
--     then all stages /must/ not specify @Xfb@ execution mode
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-libraryCount-06648# If the
--     pipeline is not created with a
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete set of state>,
--     or
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@libraryCount@
--     is not @0@,
--     'Vulkan.Extensions.VK_NV_device_generated_commands.GraphicsPipelineShaderGroupsCreateInfoNV'::@groupCount@
--     and
--     'Vulkan.Extensions.VK_NV_device_generated_commands.GraphicsPipelineShaderGroupsCreateInfoNV'::@pipelineCount@
--     /must/ be @0@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-libraryCount-06649# If the
--     pipeline is created with a
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete set of state>,
--     and
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@libraryCount@
--     is @0@, and the @pNext@ chain includes an instance of
--     'Vulkan.Extensions.VK_NV_device_generated_commands.GraphicsPipelineShaderGroupsCreateInfoNV',
--     'Vulkan.Extensions.VK_NV_device_generated_commands.GraphicsPipelineShaderGroupsCreateInfoNV'::@groupCount@
--     /must/ be greater than @0@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pipelineCreationCacheControl-02878#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-pipelineCreationCacheControl pipelineCreationCacheControl>
--     feature is not enabled, @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT'
--     or
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pipelineProtectedAccess-07368# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-pipelineProtectedAccess pipelineProtectedAccess>
--     feature is not enabled, @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT'
--     or
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-07369# @flags@ /must/ not
--     include both
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT'
--     and
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04494# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@,
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@fragmentSize.width@
--     /must/ be greater than or equal to @1@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04495# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@,
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@fragmentSize.height@
--     /must/ be greater than or equal to @1@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04496# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@,
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@fragmentSize.width@
--     /must/ be a power-of-two value
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04497# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@,
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@fragmentSize.height@
--     /must/ be a power-of-two value
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04498# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@,
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@fragmentSize.width@
--     /must/ be less than or equal to @4@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04499# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@,
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@fragmentSize.height@
--     /must/ be less than or equal to @4@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04500# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@, and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-pipelineFragmentShadingRate pipelineFragmentShadingRate>
--     feature is not enabled,
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@fragmentSize.width@
--     and
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@fragmentSize.height@
--     /must/ both be equal to @1@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06567# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@,
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@combinerOps@[0]
--     /must/ be a valid
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FragmentShadingRateCombinerOpKHR'
--     value
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06568# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@,
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@combinerOps@[1]
--     /must/ be a valid
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FragmentShadingRateCombinerOpKHR'
--     value
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04501# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@, and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-primitiveFragmentShadingRate primitiveFragmentShadingRate>
--     feature is not enabled,
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@combinerOps@[0]
--     /must/ be
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04502# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@, and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-attachmentFragmentShadingRate attachmentFragmentShadingRate>
--     feature is not enabled,
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@combinerOps@[1]
--     /must/ be
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04503#
--     If the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-primitiveFragmentShadingRateWithMultipleViewports primitiveFragmentShadingRateWithMultipleViewports>
--     limit is not supported,
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT'
--     is not included in @pDynamicState->pDynamicStates@, and
--     'PipelineViewportStateCreateInfo'::@viewportCount@ is greater than
--     @1@, entry points specified in @pStages@ /must/ not write to the
--     @PrimitiveShadingRateKHR@ built-in
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04504#
--     If the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-primitiveFragmentShadingRateWithMultipleViewports primitiveFragmentShadingRateWithMultipleViewports>
--     limit is not supported, and entry points specified in @pStages@
--     write to the @ViewportIndex@ built-in, they /must/ not also write to
--     the @PrimitiveShadingRateKHR@ built-in
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04505#
--     If the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-primitiveFragmentShadingRateWithMultipleViewports primitiveFragmentShadingRateWithMultipleViewports>
--     limit is not supported, and entry points specified in @pStages@
--     write to the @ViewportMaskNV@ built-in, they /must/ not also write
--     to the @PrimitiveShadingRateKHR@ built-in
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-fragmentShadingRateNonTrivialCombinerOps-04506#
--     If the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-fragmentShadingRateNonTrivialCombinerOps fragmentShadingRateNonTrivialCombinerOps>
--     limit is not supported, and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@, elements of
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@combinerOps@
--     /must/ be
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR'
--     or
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-None-06569# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@,
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV'::@shadingRateType@
--     /must/ be a valid
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.FragmentShadingRateTypeNV'
--     value
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06570# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@,
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV'::@shadingRate@
--     /must/ be a valid
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.FragmentShadingRateNV'
--     value
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06571# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@,
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV'::@combinerOps@[0]
--     /must/ be a valid
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FragmentShadingRateCombinerOpKHR'
--     value
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06572# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@,
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV'::@combinerOps@[1]
--     /must/ be a valid
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FragmentShadingRateCombinerOpKHR'
--     value
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04569# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@, and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-fragmentShadingRateEnums fragmentShadingRateEnums>
--     feature is not enabled,
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV'::@shadingRateType@
--     /must/ be equal to
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04570# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@, and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-pipelineFragmentShadingRate pipelineFragmentShadingRate>
--     feature is not enabled,
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV'::@shadingRate@
--     /must/ be equal to
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04571# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@, and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-primitiveFragmentShadingRate primitiveFragmentShadingRate>
--     feature is not enabled,
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV'::@combinerOps@[0]
--     /must/ be
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04572# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@, and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-attachmentFragmentShadingRate attachmentFragmentShadingRate>
--     feature is not enabled,
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV'::@combinerOps@[1]
--     /must/ be
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-fragmentShadingRateNonTrivialCombinerOps-04573#
--     If the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-fragmentShadingRateNonTrivialCombinerOps fragmentShadingRateNonTrivialCombinerOps>
--     limit is not supported and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR'
--     is not included in @pDynamicState->pDynamicStates@, elements of
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV'::@combinerOps@
--     /must/ be
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR'
--     or
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-None-04574# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-supersampleFragmentShadingRates supersampleFragmentShadingRates>
--     feature is not enabled,
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV'::@shadingRate@
--     /must/ not be equal to
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV',
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV',
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV',
--     or
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-None-04575# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-noInvocationFragmentShadingRates noInvocationFragmentShadingRates>
--     feature is not enabled,
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV'::@shadingRate@
--     /must/ not be equal to
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03578# All
--     elements of the @pDynamicStates@ member of @pDynamicState@ /must/
--     not be
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04807# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-vertexInputDynamicState vertexInputDynamicState>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VERTEX_INPUT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07067# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and includes a mesh shader, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VERTEX_INPUT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04800# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-colorWriteEnable colorWriteEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-rasterizationSamples-04899# If
--     the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     and the @VK_QCOM_render_pass_shader_resolve@ extension is enabled,
--     @rasterizationSamples@ is not dynamic, and if subpass has any input
--     attachments, and if the subpass description contains
--     'Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM',
--     then the sample count of the input attachments /must/ equal
--     @rasterizationSamples@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-sampleShadingEnable-04900# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     and the @VK_QCOM_render_pass_shader_resolve@ extension is enabled,
--     and if the subpass description contains
--     'Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM',
--     then @sampleShadingEnable@ /must/ be false
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-04901# If @flags@ includes
--     'Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM',
--     then the subpass /must/ be the last subpass in a subpass dependency
--     chain
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-04902# If @flags@ includes
--     'Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM',
--     and if @pResolveAttachments@ is not @NULL@, then each resolve
--     attachment /must/ be 'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-dynamicRendering-06576# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-dynamicRendering dynamicRendering>
--     feature is not enabled and the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ /must/ not be 'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-multiview-06577# If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-multiview multiview>
--     feature is not enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@viewMask@
--     /must/ be @0@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06578# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', the
--     index of the most significant bit in
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@viewMask@
--     /must/ be less than
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxMultiviewViewCount maxMultiviewViewCount>
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06579# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', and
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@colorAttachmentCount@
--     is not 0,
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@pColorAttachmentFormats@
--     /must/ be a valid pointer to an array of @colorAttachmentCount@
--     valid 'Vulkan.Core10.Enums.Format.Format' values
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06580# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', each
--     element of
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@pColorAttachmentFormats@
--     /must/ be a valid 'Vulkan.Core10.Enums.Format.Format' value
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06582# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', and any
--     element of
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@pColorAttachmentFormats@
--     is not 'Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED', that format
--     /must/ be a format with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#potential-format-features potential format features>
--     that include
--     'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_COLOR_ATTACHMENT_BIT'
--     or
--     'Vulkan.Core13.Enums.FormatFeatureFlags2.FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06583# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@depthAttachmentFormat@
--     /must/ be a valid 'Vulkan.Core10.Enums.Format.Format' value
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06584# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@stencilAttachmentFormat@
--     /must/ be a valid 'Vulkan.Core10.Enums.Format.Format' value
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06585# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', and
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@depthAttachmentFormat@
--     is not 'Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED', it /must/ be a
--     format with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#potential-format-features potential format features>
--     that include
--     'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06586# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', and
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@stencilAttachmentFormat@
--     is not 'Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED', it /must/ be a
--     format with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#potential-format-features potential format features>
--     that include
--     'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06587# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', and
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@depthAttachmentFormat@
--     is not 'Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED', it /must/ be a
--     format that includes a depth component
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06588# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', and
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@stencilAttachmentFormat@
--     is not 'Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED', it /must/ be a
--     format that includes a stencil component
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06589# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@depthAttachmentFormat@
--     is not 'Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED', and
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@stencilAttachmentFormat@
--     is not 'Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED',
--     @depthAttachmentFormat@ /must/ equal @stencilAttachmentFormat@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-09033# If @renderPass@
--     is 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is being
--     created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and either of
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@depthAttachmentFormat@
--     or
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@stencilAttachmentFormat@
--     are not 'Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED', and the
--     @VK_EXT_extended_dynamic_state3@ extension is not enabled or any of
--     the
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_TEST_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_WRITE_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_COMPARE_OP',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_STENCIL_TEST_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_STENCIL_OP', or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BOUNDS'
--     dynamic states are not set, @pDepthStencilState@ /must/ be a valid
--     pointer to a valid 'PipelineDepthStencilStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDepthStencilState-09034# If
--     @pDepthStencilState@ is not @NULL@ it /must/ be a valid pointer to a
--     valid 'PipelineDepthStencilStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-09035# If @renderPass@
--     is 'Vulkan.Core10.APIConstants.NULL_HANDLE' and the pipeline is
--     being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     but not
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and the @VK_EXT_extended_dynamic_state3@ extension is not enabled,
--     or any of the
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_TEST_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_WRITE_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_COMPARE_OP',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_STENCIL_TEST_ENABLE',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_STENCIL_OP', or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BOUNDS'
--     dynamic states are not set, @pDepthStencilState@ /must/ be a valid
--     pointer to a valid 'PipelineDepthStencilStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDepthStencilState-09036# If
--     @pDepthStencilState@ is not @NULL@ it /must/ be a valid pointer to a
--     valid 'PipelineDepthStencilStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-09037# If @renderPass@
--     is 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is being
--     created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     and
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@colorAttachmentCount@
--     is not equal to @0@, and the @VK_EXT_extended_dynamic_state3@
--     extension is not enabled, or any of the
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LOGIC_OP_EXT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_WRITE_MASK_EXT',
--     or 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_BLEND_CONSTANTS'
--     dynamic states are not set, @pColorBlendState@ /must/ be a valid
--     pointer to a valid 'PipelineColorBlendStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pColorBlendState-09038# If
--     @pColorBlendState@ is not @NULL@ it /must/ be a valid pointer to a
--     valid 'PipelineColorBlendStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06055# If @renderPass@
--     is 'Vulkan.Core10.APIConstants.NULL_HANDLE', @pColorBlendState@ is
--     not dynamic, and the pipeline is being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @pColorBlendState->attachmentCount@ /must/ be equal to
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@colorAttachmentCount@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06057# If @renderPass@
--     is 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is being
--     created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@viewMask@
--     is not @0@, and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-multiview-tess multiviewTessellationShader>
--     feature is not enabled, then @pStages@ /must/ not include
--     tessellation shaders
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06058# If @renderPass@
--     is 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is being
--     created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@viewMask@
--     is not @0@, and the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-multiview-gs multiviewGeometryShader>
--     feature is not enabled, then @pStages@ /must/ not include a geometry
--     shader
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-07718# If @renderPass@
--     is 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is being
--     created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@viewMask@
--     is not @0@, all of the shaders in the pipeline /must/ not write to
--     the @Layer@ built-in output
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06059# If @renderPass@
--     is 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is being
--     created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@viewMask@
--     is not @0@, all of the shaders in the pipeline /must/ not include
--     variables decorated with the @Layer@ built-in decoration in their
--     interfaces
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-07719# If @renderPass@
--     is 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is being
--     created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@viewMask@
--     is not @0@, all of the shaders in the pipeline /must/ not include
--     variables decorated with the @ViewIndex@ built-in decoration in
--     their interfaces
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-07720# If @renderPass@
--     is 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is being
--     created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@viewMask@
--     is not @0@, and @multiviewMeshShader@ is not enabled, then @pStages@
--     /must/ not include a mesh shader
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06061# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     fragment shaders in @pStages@ /must/ not include the
--     @InputAttachment@ capability
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-08710# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and @renderPass@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     fragment shaders in @pStages@ /must/ not include any of the
--     @TileImageColorReadAccessEXT@, @TileImageDepthReadAccessEXT@, or
--     @TileImageStencilReadAccessEXT@ capabilities
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06062# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>
--     and @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', for
--     each color attachment format defined by the
--     @pColorAttachmentFormats@ member of
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo',
--     if its
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#potential-format-features potential format features>
--     do not contain
--     'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT',
--     then the @blendEnable@ member of the corresponding element of the
--     @pAttachments@ member of @pColorBlendState@ /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06063# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>
--     and @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', if the
--     @pNext@ chain includes
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.AttachmentSampleCountInfoAMD'
--     or
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.AttachmentSampleCountInfoNV',
--     the @colorAttachmentCount@ member of that structure /must/ be equal
--     to the value of
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@colorAttachmentCount@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06591# If @pStages@
--     includes a fragment shader stage, and the fragment shader declares
--     the @EarlyFragmentTests@ execution mode, the @flags@ member of
--     'PipelineDepthStencilStateCreateInfo' /must/ not include
--     'Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits.PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT'
--     or
--     'Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits.PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06482# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>
--     and the @flags@ member of 'PipelineColorBlendStateCreateInfo'
--     includes
--     'Vulkan.Core10.Enums.PipelineColorBlendStateCreateFlagBits.PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT',
--     @renderpass@ /must/ not be 'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06483# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>
--     and the @flags@ member of 'PipelineDepthStencilStateCreateInfo'
--     includes
--     'Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits.PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT'
--     or
--     'Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits.PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT',
--     @renderpass@ /must/ not be 'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pColorAttachmentSamples-06592# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     elements of the @pColorAttachmentSamples@ member of
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.AttachmentSampleCountInfoAMD'
--     or
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.AttachmentSampleCountInfoNV'
--     /must/ be valid
--     'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' values
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-depthStencilAttachmentSamples-06593#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>
--     and the @depthStencilAttachmentSamples@ member of
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.AttachmentSampleCountInfoAMD'
--     or
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.AttachmentSampleCountInfoNV'
--     is not 0, it /must/ be a valid
--     'Vulkan.Core10.Enums.SampleCountFlagBits.SampleCountFlagBits' value
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06484# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>
--     and the @flags@ member of 'PipelineColorBlendStateCreateInfo'
--     includes
--     'Vulkan.Core10.Enums.PipelineColorBlendStateCreateFlagBits.PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT'
--     @subpass@ /must/ have been created with
--     'Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06485# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and the @flags@ member of 'PipelineDepthStencilStateCreateInfo'
--     includes
--     'Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits.PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT',
--     @subpass@ /must/ have been created with
--     'Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06486# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and the @flags@ member of 'PipelineDepthStencilStateCreateInfo'
--     includes
--     'Vulkan.Core10.Enums.PipelineDepthStencilStateCreateFlagBits.PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT',
--     @subpass@ /must/ have been created with
--     'Vulkan.Core10.Enums.SubpassDescriptionFlagBits.SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pipelineStageCreationFeedbackCount-06594#
--     If
--     'Vulkan.Core13.Promoted_From_VK_EXT_pipeline_creation_feedback.PipelineCreationFeedbackCreateInfo'::@pipelineStageCreationFeedbackCount@
--     is not @0@, it /must/ be equal to @stageCount@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06595# If @renderPass@
--     is 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline is being
--     created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     and
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.MultiviewPerViewAttributesInfoNVX'::@perViewAttributesPositionXOnly@
--     is 'Vulkan.Core10.FundamentalTypes.TRUE' then
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.MultiviewPerViewAttributesInfoNVX'::@perViewAttributes@
--     /must/ also be 'Vulkan.Core10.FundamentalTypes.TRUE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06596# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes only one of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     and an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes the other flag, the value of
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.MultiviewPerViewAttributesInfoNVX'::@perViewAttributes@
--     specified in both this pipeline and the library /must/ be equal
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06597# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     and another element includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     the value of
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.MultiviewPerViewAttributesInfoNVX'::@perViewAttributes@
--     specified in both libraries /must/ be equal
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06598# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes only one of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     and an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes the other flag, the value of
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.MultiviewPerViewAttributesInfoNVX'::@perViewAttributesPositionXOnly@
--     specified in both this pipeline and the library /must/ be equal
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06599# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     and another element includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     the value of
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.MultiviewPerViewAttributesInfoNVX'::@perViewAttributesPositionXOnly@
--     specified in both libraries /must/ be equal
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-06600# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     @pStages@ /must/ be a valid pointer to an array of @stageCount@
--     valid 'PipelineShaderStageCreateInfo' structures
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-09039# If the
--     @VK_EXT_extended_dynamic_state3@ extension is not enabled, or any of
--     the
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SAMPLE_MASK_EXT', or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT'
--     dynamic states are not set, or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-alphaToOne alphaToOne>
--     is enabled on the device and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT'
--     is not set, then @pMultisampleState@ /must/ be a valid pointer to a
--     valid 'PipelineMultisampleStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-09040# If
--     @pRasterizationState@ is not @NULL@ it /must/ be a valid pointer to
--     a valid 'PipelineRasterizationStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-layout-06602# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     @layout@ /must/ be a valid 'Vulkan.Core10.Handles.PipelineLayout'
--     handle
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-06603# If
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output state>,
--     and @renderPass@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @renderPass@ /must/ be a valid 'Vulkan.Core10.Handles.RenderPass'
--     handle
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-stageCount-06604# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     @stageCount@ /must/ be greater than @0@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-graphicsPipelineLibrary-06606# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-graphicsPipelineLibrary graphicsPipelineLibrary>
--     feature is not enabled, @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LIBRARY_BIT_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06608# If the pipeline
--     defines, or includes as libraries, all the state subsets required
--     for a
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete graphics pipeline>,
--     @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LIBRARY_BIT_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06609# If @flags@ includes
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT',
--     pipeline libraries included via
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'
--     /must/ have been created with
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-09245# If @flags@ includes
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT',
--     @flags@ /must/ also include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LIBRARY_BIT_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06610# If @flags@ includes
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT',
--     pipeline libraries included via
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'
--     /must/ have been created with
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06611# Any pipeline
--     libraries included via
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     /must/ not include any
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets state subset>
--     already defined by this structure or defined by any other pipeline
--     library in
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06612# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes only one of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     and an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes the other flag, and @layout@ was not created with
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT',
--     then the @layout@ used by this pipeline and the library /must/ be
--     /identically defined/
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06613# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     and another element includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     and the @layout@ specified by either library was not created with
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT',
--     then the @layout@ used by each library /must/ be /identically
--     defined/
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06614# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes only one of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes the other subset, and @layout@ was created with
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT',
--     then the @layout@ used by the library /must/ also have been created
--     with
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06615# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     and another element includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     and the @layout@ specified by either library was created with
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT',
--     then the @layout@ used by both libraries /must/ have been created
--     with
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06616# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes only one of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes the other subset, and @layout@ was created with
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT',
--     elements of the @pSetLayouts@ array which @layout@ was created with
--     that are not 'Vulkan.Core10.APIConstants.NULL_HANDLE' /must/ be
--     /identically defined/ to the element at the same index of
--     @pSetLayouts@ used to create the library’s @layout@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06617# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     and another element includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     and the @layout@ specified by either library was created with
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT',
--     elements of the @pSetLayouts@ array which either @layout@ was
--     created with that are not 'Vulkan.Core10.APIConstants.NULL_HANDLE'
--     /must/ be /identically defined/ to the element at the same index of
--     @pSetLayouts@ used to create the other library’s @layout@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06618# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes only one of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     and an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes the other flag, any descriptor set layout /N/ specified by
--     @layout@ in both this pipeline and the library which include
--     bindings accessed by shader stages in each /must/ be /identically
--     defined/
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06619# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     and another element includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     any descriptor set layout /N/ specified by @layout@ in both
--     libraries which include bindings accessed by shader stages in each
--     /must/ be /identically defined/
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06620# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes only one of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     and an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes the other flag, push constants specified in @layout@ in
--     both this pipeline and the library which are available to shader
--     stages in each /must/ be /identically defined/
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06621# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     and another element includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     push constants specified in @layout@ in both this pipeline and the
--     library which are available to shader stages in each /must/ be
--     /identically defined/
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06679# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes only one of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes the other subset, and any element of the @pSetLayouts@
--     array which @layout@ was created with was
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', then the corresponding
--     element of the @pSetLayouts@ array used to create the library’s
--     @layout@ /must/ not be 'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06680# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes only one of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes the other subset, and any element of the @pSetLayouts@
--     array used to create the library’s @layout@ was
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', then the corresponding
--     element of the @pSetLayouts@ array used to create this pipeline’s
--     @layout@ /must/ not be 'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06681# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     and another element includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     and any element of the @pSetLayouts@ array used to create each
--     library’s @layout@ was 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     then the corresponding element of the @pSetLayouts@ array used to
--     create the other library’s @layout@ /must/ not be
--     'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06756# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes only one of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes the other subset, and any element of the @pSetLayouts@
--     array which @layout@ was created with was
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', then the corresponding
--     element of the @pSetLayouts@ array used to create the library’s
--     @layout@ /must/ not have shader bindings for shaders in the other
--     subset
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06757# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes only one of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes the other subset, and any element of the @pSetLayouts@
--     array used to create the library’s @layout@ was
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', then the corresponding
--     element of the @pSetLayouts@ array used to create this pipeline’s
--     @layout@ /must/ not have shader bindings for shaders in the other
--     subset
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06758# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     and another element includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     and any element of the @pSetLayouts@ array used to create each
--     library’s @layout@ was 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     then the corresponding element of the @pSetLayouts@ array used to
--     create the other library’s @layout@ /must/ not have shader bindings
--     for shaders in the other subset
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06682# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes both
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     and
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     @layout@ /must/ have been created with no elements of the
--     @pSetLayouts@ array set to 'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06683# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     and @pRasterizationState->rasterizerDiscardEnable@ is
--     'Vulkan.Core10.FundamentalTypes.TRUE', @layout@ /must/ have been
--     created with no elements of the @pSetLayouts@ array set to
--     'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06684# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes at least one of and no more than two of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT',
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT',
--     and an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes one of the other flags, the value of @subpass@ /must/ be
--     equal to that used to create the library
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06623# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes at least one of and no more than two of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT',
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT',
--     and another element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes one of the other flags, the value of @subpass@ used to
--     create each library /must/ be identical
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderpass-06624# If @renderpass@
--     is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes at least one of and no more than two of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT',
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT',
--     and an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes one of the other flags, @renderPass@ /must/ be compatible
--     with that used to create the library
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderpass-06625# If @renderpass@
--     is 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes at least one of and no more than two of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT',
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT',
--     and an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes one of the other flags, the value of @renderPass@ used to
--     create that library /must/ also be
--     'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06626# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes at least one of and no more than two of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT',
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT',
--     an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes one of the other flags, and @renderPass@ is
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', the value of
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@viewMask@
--     used by this pipeline and that specified by the library /must/ be
--     identical
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06627# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes at least one of and no more than two of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT',
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT',
--     another element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes one of the other flags, and @renderPass@ was
--     'Vulkan.Core10.APIConstants.NULL_HANDLE' for both libraries, the
--     value of
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@viewMask@
--     set by each library /must/ be identical
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06628# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes at least one of and no more than two of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT',
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT',
--     and another element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes one of the other flags, the @renderPass@ objects used to
--     create each library /must/ be compatible or all equal to
--     'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-06629# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     @pMultisampleState@ /must/ be @NULL@ or a valid pointer to a valid
--     'PipelineMultisampleStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderpass-06631# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and @renderpass@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     then @pMultisampleState@ /must/ not be @NULL@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-Input-06632# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     with a fragment shader that either enables
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-sampleshading sample shading>
--     or decorates any variable in the @Input@ storage class with
--     @Sample@, then @pMultisampleState@ /must/ not be @NULL@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06633# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT'
--     with a @pMultisampleState@ that was not @NULL@, and an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     was created with
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT',
--     @pMultisampleState@ /must/ be /identically defined/ to that used to
--     create the library
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06634# If an element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     was created with
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT'
--     with a @pMultisampleState@ that was not @NULL@, and if
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT',
--     @pMultisampleState@ /must/ be /identically defined/ to that used to
--     create the library
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06635# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     was created with
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT'
--     with a @pMultisampleState@ that was not @NULL@, and if a different
--     element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     was created with
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT',
--     the @pMultisampleState@ used to create each library /must/ be
--     /identically defined/
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06636# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     was created with
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT'
--     and a value of @pMultisampleState->sampleShading@ equal
--     'Vulkan.Core10.FundamentalTypes.TRUE', and if a different element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     was created with
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     the @pMultisampleState@ used to create each library /must/ be
--     /identically defined/
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06637# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT',
--     @pMultisampleState->sampleShading@ is
--     'Vulkan.Core10.FundamentalTypes.TRUE', and an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     was created with
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     the @pMultisampleState@ used to create that library /must/ be
--     /identically defined/ @pMultisampleState@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06638# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes only one of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     and an element of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes the other flag, values specified in
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'
--     for both this pipeline and that library /must/ be identical
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06639# If one element
--     of
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     and another element includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     values specified in
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'
--     for both this pipeline and that library /must/ be identical
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06640# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     @pStages@ /must/ be a valid pointer to an array of @stageCount@
--     valid 'PipelineShaderStageCreateInfo' structures
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-09041# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT',
--     and the @VK_EXT_extended_dynamic_state3@ extension is not enabled,
--     or any of the
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT',
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SAMPLE_MASK_EXT', or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT'
--     dynamic states are not set, or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-alphaToOne alphaToOne>
--     is enabled on the device and
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT'
--     is not set, @pMultisampleState@ /must/ be a valid pointer to a valid
--     'PipelineMultisampleStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-09042# If
--     @pRasterizationState@ is not @NULL@ it /must/ be a valid pointer to
--     a valid 'PipelineRasterizationStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06642# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     @layout@ /must/ be a valid 'Vulkan.Core10.Handles.PipelineLayout'
--     handle
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06643# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT',
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT',
--     and @renderPass@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @renderPass@ /must/ be a valid 'Vulkan.Core10.Handles.RenderPass'
--     handle
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06644# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     or
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     @stageCount@ /must/ be greater than @0@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06645# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     is non-zero, if @flags@ includes
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR',
--     any libraries /must/ have also been created with
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06646# If
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes more than one library, and any library was created with
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR',
--     all libraries /must/ have also been created with
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pLibraries-06647# If
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@
--     includes at least one library,
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     is non-zero, and any library was created with
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR',
--     @flags@ /must/ include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-None-07826# If the pipeline
--     includes a
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete set of state>,
--     and there are no libraries included in
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR'::@pLibraries@,
--     then 'Vulkan.Core10.Handles.PipelineLayout' /must/ be a valid
--     pipeline layout
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-layout-07827# If the pipeline
--     includes a
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete set of state>
--     specified entirely by libraries, and each library was created with a
--     'Vulkan.Core10.Handles.PipelineLayout' created without
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT',
--     then @layout@ /must/ be
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#descriptorsets-compatibility compatible>
--     with the layouts in those libraries
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06729# If @flags@ includes
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT',
--     the pipeline includes a
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete set of state>
--     specified entirely by libraries, and each library was created with a
--     'Vulkan.Core10.Handles.PipelineLayout' created with
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT',
--     then @layout@ /must/ be
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#descriptorsets-compatibility compatible>
--     with the union of the libraries\' pipeline layouts other than the
--     inclusion\/exclusion of
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-06730# If @flags@ does not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT',
--     the pipeline includes a
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-complete complete set of state>
--     specified entirely by libraries, and each library was created with a
--     'Vulkan.Core10.Handles.PipelineLayout' created with
--     'Vulkan.Core10.Enums.PipelineLayoutCreateFlagBits.PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT',
--     then @layout@ /must/ be
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#descriptorsets-compatibility compatible>
--     with the union of the libraries\' pipeline layouts
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-conservativePointAndLineRasterization-08892#
--     If
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-conservativePointAndLineRasterization conservativePointAndLineRasterization>
--     is not supported; the pipeline is being created with
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-vertex-input vertex input state>
--     and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>;
--     the pipeline does not include a geometry shader; and the value of
--     'PipelineInputAssemblyStateCreateInfo'::@topology@ is
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_POINT_LIST',
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_LINE_LIST',
--     or
--     'Vulkan.Core10.Enums.PrimitiveTopology.PRIMITIVE_TOPOLOGY_LINE_STRIP',
--     and either
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_TOPOLOGY'
--     dynamic state is not enabled or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-dynamicPrimitiveTopologyUnrestricted dynamicPrimitiveTopologyUnrestricted>
--     is 'Vulkan.Core10.FundamentalTypes.FALSE', then
--     'Vulkan.Extensions.VK_EXT_conservative_rasterization.PipelineRasterizationConservativeStateCreateInfoEXT'::@conservativeRasterizationMode@
--     /must/ be
--     'Vulkan.Extensions.VK_EXT_conservative_rasterization.CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-conservativePointAndLineRasterization-06760#
--     If
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-conservativePointAndLineRasterization conservativePointAndLineRasterization>
--     is not supported, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and the pipeline includes a geometry shader with either the
--     @OutputPoints@ or @OutputLineStrip@ execution modes,
--     'Vulkan.Extensions.VK_EXT_conservative_rasterization.PipelineRasterizationConservativeStateCreateInfoEXT'::@conservativeRasterizationMode@
--     /must/ be
--     'Vulkan.Extensions.VK_EXT_conservative_rasterization.CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-conservativePointAndLineRasterization-06761#
--     If
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-conservativePointAndLineRasterization conservativePointAndLineRasterization>
--     is not supported, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and the pipeline includes a mesh shader with either the
--     @OutputPoints@ or @OutputLinesNV@ execution modes,
--     'Vulkan.Extensions.VK_EXT_conservative_rasterization.PipelineRasterizationConservativeStateCreateInfoEXT'::@conservativeRasterizationMode@
--     /must/ be
--     'Vulkan.Extensions.VK_EXT_conservative_rasterization.CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-06894# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     but not
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     elements of @pStages@ /must/ not have @stage@ set to
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_FRAGMENT_BIT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-06895# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     but not
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     elements of @pStages@ /must/ not have @stage@ set to a shader stage
--     which participates in pre-rasterization
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-06896# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     all elements of @pStages@ /must/ have a @stage@ set to a shader
--     stage which participates in
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-stage-06897# If the pipeline
--     requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and\/or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     any value of @stage@ /must/ not be set in more than one element of
--     @pStages@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3TessellationDomainOrigin-07370#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3TessellationDomainOrigin extendedDynamicState3TessellationDomainOrigin>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3DepthClampEnable-07371#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3DepthClampEnable extendedDynamicState3DepthClampEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3PolygonMode-07372#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3PolygonMode extendedDynamicState3PolygonMode>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_POLYGON_MODE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3RasterizationSamples-07373#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3RasterizationSamples extendedDynamicState3RasterizationSamples>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3SampleMask-07374#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3SampleMask extendedDynamicState3SampleMask>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SAMPLE_MASK_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3AlphaToCoverageEnable-07375#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3AlphaToCoverageEnable extendedDynamicState3AlphaToCoverageEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3AlphaToOneEnable-07376#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3AlphaToOneEnable extendedDynamicState3AlphaToOneEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3LogicOpEnable-07377#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3LogicOpEnable extendedDynamicState3LogicOpEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorBlendEnable-07378#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3ColorBlendEnable extendedDynamicState3ColorBlendEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorBlendEquation-07379#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3ColorBlendEquation extendedDynamicState3ColorBlendEquation>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorWriteMask-07380#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3ColorWriteMask extendedDynamicState3ColorWriteMask>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_WRITE_MASK_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3RasterizationStream-07381#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3RasterizationStream extendedDynamicState3RasterizationStream>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZATION_STREAM_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ConservativeRasterizationMode-07382#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3ConservativeRasterizationMode extendedDynamicState3ConservativeRasterizationMode>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ExtraPrimitiveOverestimationSize-07383#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3ExtraPrimitiveOverestimationSize extendedDynamicState3ExtraPrimitiveOverestimationSize>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3DepthClipEnable-07384#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3DepthClipEnable extendedDynamicState3DepthClipEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3SampleLocationsEnable-07385#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3SampleLocationsEnable extendedDynamicState3SampleLocationsEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorBlendAdvanced-07386#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3ColorBlendAdvanced extendedDynamicState3ColorBlendAdvanced>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ProvokingVertexMode-07387#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3ProvokingVertexMode extendedDynamicState3ProvokingVertexMode>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3LineRasterizationMode-07388#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3LineRasterizationMode extendedDynamicState3LineRasterizationMode>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3LineStippleEnable-07389#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3LineStippleEnable extendedDynamicState3LineStippleEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3DepthClipNegativeOneToOne-07390#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3DepthClipNegativeOneToOne extendedDynamicState3DepthClipNegativeOneToOne>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ViewportWScalingEnable-07391#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3ViewportWScalingEnable extendedDynamicState3ViewportWScalingEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ViewportSwizzle-07392#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3ViewportSwizzle extendedDynamicState3ViewportSwizzle>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageToColorEnable-07393#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3CoverageToColorEnable extendedDynamicState3CoverageToColorEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageToColorLocation-07394#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3CoverageToColorLocation extendedDynamicState3CoverageToColorLocation>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageModulationMode-07395#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3CoverageModulationMode extendedDynamicState3CoverageModulationMode>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageModulationTableEnable-07396#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3CoverageModulationTableEnable extendedDynamicState3CoverageModulationTableEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageModulationTable-07397#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3CoverageModulationTable extendedDynamicState3CoverageModulationTable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageReductionMode-07398#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3CoverageReductionMode extendedDynamicState3CoverageReductionMode>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3RepresentativeFragmentTestEnable-07399#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3RepresentativeFragmentTestEnable extendedDynamicState3RepresentativeFragmentTestEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ShadingRateImageEnable-07400#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-extendedDynamicState3ShadingRateImageEnable extendedDynamicState3ShadingRateImageEnable>
--     feature is not enabled, there /must/ be no element of the
--     @pDynamicStates@ member of @pDynamicState@ set to
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-07401# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-07997# @flags@ /must/ not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07730# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and no element of the @pDynamicStates@ member of @pDynamicState@ is
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT' or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT',
--     and if
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-multiview-per-view-viewports multiviewPerViewViewports>
--     is enabled, then the index of the most significant bit in each
--     element of
--     'Vulkan.Core11.Promoted_From_VK_KHR_multiview.RenderPassMultiviewCreateInfo'::@pViewMasks@
--     /must/ be less than @pViewportState@::@viewportCount@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07731# If the
--     pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>,
--     and no element of the @pDynamicStates@ member of @pDynamicState@ is
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR' or
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT',
--     and if
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-multiview-per-view-viewports multiviewPerViewViewports>
--     is enabled, then the index of the most significant bit in each
--     element of
--     'Vulkan.Core11.Promoted_From_VK_KHR_multiview.RenderPassMultiviewCreateInfo'::@pViewMasks@
--     /must/ be less than @pViewportState@::@scissorCount@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-08711# If @pStages@
--     includes a fragment shader stage,
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_WRITE_ENABLE'
--     is not set in 'PipelineDynamicStateCreateInfo'::@pDynamicStates@,
--     and the fragment shader declares the @EarlyFragmentTests@ execution
--     mode and uses @OpDepthAttachmentReadEXT@, the @depthWriteEnable@
--     member of 'PipelineDepthStencilStateCreateInfo' /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pStages-08712# If @pStages@
--     includes a fragment shader stage,
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_STENCIL_WRITE_MASK'
--     is not set in 'PipelineDynamicStateCreateInfo'::@pDynamicStates@,
--     and the fragment shader declares the @EarlyFragmentTests@ execution
--     mode and uses @OpStencilAttachmentReadEXT@, the value of
--     'StencilOpState'::@writeMask@ for both @front@ and @back@ in
--     'PipelineDepthStencilStateCreateInfo' /must/ be @0@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-renderPass-08744# If @renderPass@
--     is 'Vulkan.Core10.APIConstants.NULL_HANDLE', the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output state>
--     or
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>,
--     the pipeline enables
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-sampleshading sample shading>,
--     @rasterizationSamples@ is not dynamic, and the @pNext@ chain
--     includes a
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'
--     structure, @rasterizationSamples@ /must/ be a bit value that is set
--     in @imageCreateSampleCounts@ (as defined in
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#resources-image-creation-limits Image Creation Limits>)
--     for every element of @depthAttachmentFormat@,
--     @stencilAttachmentFormat@ and the @pColorAttachmentFormats@ array
--     which is not 'Vulkan.Core10.Enums.Format.FORMAT_UNDEFINED'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-08897# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT',
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     is specified either in a library or by the inclusion of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT',
--     and that state includes a vertex shader stage in @pStages@, the
--     pipeline /must/ define
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-vertex-input vertex input state>
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-08898# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT',
--     and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     is not specified, the pipeline /must/ define
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-vertex-input vertex input state>
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-08899# If @flags@ does not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LIBRARY_BIT_KHR',
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     is specified either in a library or by the inclusion of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT',
--     and that state includes a vertex shader stage in @pStages@, the
--     pipeline /must/ either define
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or include that state in a linked pipeline library
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-08900# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT'
--     the pipeline /must/ define
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-08901# If @flags@ does not
--     include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LIBRARY_BIT_KHR',
--     the pipeline /must/ either define
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     or include that state in a linked pipeline library
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-08903# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     is specified either in a library or by the inclusion of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT',
--     and that state either includes
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE'
--     or has @pRasterizationState->rasterizerDiscardEnable@ set to
--     'Vulkan.Core10.FundamentalTypes.FALSE', the pipeline /must/ define
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-08904# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     is not specified, the pipeline /must/ define
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-08906# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     is specified either in a library or by the inclusion of
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT',
--     and that state either includes
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE'
--     or has @pRasterizationState->rasterizerDiscardEnable@ set to
--     'Vulkan.Core10.FundamentalTypes.FALSE', the pipeline /must/ define
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-08907# If
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT'::@flags@
--     includes
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT',
--     and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader state>
--     is not specified, the pipeline /must/ define
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-None-09043# If
--     @pDynamicState->pDynamicStates@ does not include
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_WRITE_MASK_EXT',
--     and the format of any color attachment is
--     'Vulkan.Core10.Enums.Format.FORMAT_E5B9G9R9_UFLOAT_PACK32', the
--     @colorWriteMask@ member of the corresponding element of
--     @pColorBlendState->pAttachments@ /must/ either include all of
--     'Vulkan.Core10.Enums.ColorComponentFlagBits.COLOR_COMPONENT_R_BIT',
--     'Vulkan.Core10.Enums.ColorComponentFlagBits.COLOR_COMPONENT_G_BIT',
--     and
--     'Vulkan.Core10.Enums.ColorComponentFlagBits.COLOR_COMPONENT_B_BIT',
--     or none of them
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09301# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-externalFormatResolve externalFormatResolve>
--     feature is enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', and
--     'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID'::@externalFormat@
--     is not @0@,
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@viewMask@
--     /must/ be @0@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09304# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-externalFormatResolve externalFormatResolve>
--     feature is enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID'::@externalFormat@
--     is not @0@, and @rasterizationSamples@ is not dynamic,
--     'PipelineMultisampleStateCreateInfo'::@rasterizationSamples@ /must/
--     be @1@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09305# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-externalFormatResolve externalFormatResolve>
--     feature is enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', and
--     'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID'::@externalFormat@
--     is not @0@, and @blendEnable@ is not dynamic, the @blendEnable@
--     member of each element of @pColorBlendState->pAttachments@ /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09306# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-externalFormatResolve externalFormatResolve>
--     feature is enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', and
--     'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID'::@externalFormat@
--     is not @0@, and @pDynamicState->pDynamicStates@ does not include
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR',
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@width@
--     /must/ be @1@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09307# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-externalFormatResolve externalFormatResolve>
--     feature is enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', and
--     'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID'::@externalFormat@
--     is not @0@, and @pDynamicState->pDynamicStates@ does not include
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR',
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@height@
--     /must/ be @1@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09308# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-externalFormatResolve externalFormatResolve>
--     feature is enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output pre-rasterization shader state>
--     and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', and
--     'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID'::@externalFormat@
--     is not @0@, the last
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader stage>
--     /must/ not statically use a variable with the
--     @PrimitiveShadingRateKHR@ built-in
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09309# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-externalFormatResolve externalFormatResolve>
--     feature is enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', and
--     'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID'::@externalFormat@
--     is not @0@,
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@colorAttachmentCount@
--     /must/ be @1@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09310# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-externalFormatResolve externalFormatResolve>
--     feature is enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-shader fragment shader state>
--     and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is 'Vulkan.Core10.APIConstants.NULL_HANDLE', and
--     'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID'::@externalFormat@
--     is not @0@, the fragment shader /must/ not declare the
--     @DepthReplacing@ or @StencilRefReplacingEXT@ execution modes
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09313# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-externalFormatResolve externalFormatResolve>
--     feature is enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @subpass@ includes an external format resolve attachment, and
--     @rasterizationSamples@ is not dynamic,
--     'PipelineMultisampleStateCreateInfo'::@rasterizationSamples@ /must/
--     be 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09314# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-externalFormatResolve externalFormatResolve>
--     feature is enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @subpass@ includes an external format resolve attachment, and
--     @blendEnable@ is not dynamic, the @blendEnable@ member of each
--     element of @pColorBlendState->pAttachments@ /must/ be
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09315# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-externalFormatResolve externalFormatResolve>
--     feature is enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @subpass@ includes an external format resolve attachment, and
--     @pDynamicState->pDynamicStates@ does not include
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR',
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@width@
--     /must/ be @1@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09316# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-externalFormatResolve externalFormatResolve>
--     feature is enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @subpass@ includes an external format resolve attachment, and
--     @pDynamicState->pDynamicStates@ does not include
--     'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR',
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR'::@height@
--     /must/ be @1@
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09317# If
--     the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-externalFormatResolve externalFormatResolve>
--     feature is enabled, the pipeline requires
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output pre-rasterization shader state>
--     and
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-fragment-output fragment output interface state>,
--     @renderPass@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', and
--     @subpass@ includes an external format resolve attachment, the last
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-graphics-subsets-pre-rasterization pre-rasterization shader stage>
--     /must/ not statically use a variable with the
--     @PrimitiveShadingRateKHR@ built-in
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-sType-sType# @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-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_dynamic_rendering.AttachmentSampleCountInfoAMD',
--     'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ExternalFormatANDROID',
--     'Vulkan.Extensions.VK_EXT_graphics_pipeline_library.GraphicsPipelineLibraryCreateInfoEXT',
--     'Vulkan.Extensions.VK_NV_device_generated_commands.GraphicsPipelineShaderGroupsCreateInfoNV',
--     'Vulkan.Extensions.VK_KHR_dynamic_rendering.MultiviewPerViewAttributesInfoNVX',
--     'Vulkan.Extensions.VK_AMD_pipeline_compiler_control.PipelineCompilerControlCreateInfoAMD',
--     'Vulkan.Extensions.VK_KHR_maintenance5.PipelineCreateFlags2CreateInfoKHR',
--     'Vulkan.Core13.Promoted_From_VK_EXT_pipeline_creation_feedback.PipelineCreationFeedbackCreateInfo',
--     'Vulkan.Extensions.VK_EXT_discard_rectangles.PipelineDiscardRectangleStateCreateInfoEXT',
--     'Vulkan.Extensions.VK_NV_fragment_shading_rate_enums.PipelineFragmentShadingRateEnumStateCreateInfoNV',
--     'Vulkan.Extensions.VK_KHR_fragment_shading_rate.PipelineFragmentShadingRateStateCreateInfoKHR',
--     'Vulkan.Extensions.VK_KHR_pipeline_library.PipelineLibraryCreateInfoKHR',
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo',
--     'Vulkan.Extensions.VK_NV_representative_fragment_test.PipelineRepresentativeFragmentTestStateCreateInfoNV',
--     or
--     'Vulkan.Extensions.VK_EXT_pipeline_robustness.PipelineRobustnessCreateInfoEXT'
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-sType-unique# The @sType@ value
--     of each struct in the @pNext@ chain /must/ be unique
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-flags-parameter# @flags@ /must/
--     be a valid combination of
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits'
--     values
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-pDynamicState-parameter# If
--     @pDynamicState@ is not @NULL@, @pDynamicState@ /must/ be a valid
--     pointer to a valid 'PipelineDynamicStateCreateInfo' structure
--
-- -   #VUID-VkGraphicsPipelineCreateInfo-commonparent# Each of
--     @basePipelineHandle@, @layout@, and @renderPass@ 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_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.Handles.Pipeline', 'PipelineColorBlendStateCreateInfo',
-- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlags',
-- 'PipelineDepthStencilStateCreateInfo', 'PipelineDynamicStateCreateInfo',
-- 'PipelineInputAssemblyStateCreateInfo',
-- 'Vulkan.Core10.Handles.PipelineLayout',
-- 'PipelineMultisampleStateCreateInfo',
-- 'PipelineRasterizationStateCreateInfo', 'PipelineShaderStageCreateInfo',
-- 'PipelineTessellationStateCreateInfo',
-- 'PipelineVertexInputStateCreateInfo', 'PipelineViewportStateCreateInfo',
-- 'Vulkan.Core10.Handles.RenderPass',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'createGraphicsPipelines'
data GraphicsPipelineCreateInfo (es :: [Type]) = GraphicsPipelineCreateInfo
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]). GraphicsPipelineCreateInfo es -> Chain es
next :: Chain es
  , -- | @flags@ is a bitmask of
    -- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits'
    -- specifying how the pipeline will be generated.
    forall (es :: [*]).
GraphicsPipelineCreateInfo es -> PipelineCreateFlags
flags :: PipelineCreateFlags
  , -- | @stageCount@ is the number of entries in the @pStages@ array.
    forall (es :: [*]).
GraphicsPipelineCreateInfo es -> "createInfoCount" ::: Word32
stageCount :: Word32
  , -- | @pStages@ is a pointer to an array of @stageCount@
    -- 'PipelineShaderStageCreateInfo' structures describing the set of the
    -- shader stages to be included in the graphics pipeline.
    forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
  , -- | @pVertexInputState@ is a pointer to a
    -- 'PipelineVertexInputStateCreateInfo' structure. It is ignored if the
    -- pipeline includes a mesh shader stage. It /can/ be @NULL@ if the
    -- pipeline is created with the
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VERTEX_INPUT_EXT'
    -- dynamic state set.
    forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
vertexInputState :: Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
  , -- | @pInputAssemblyState@ is a pointer to a
    -- 'PipelineInputAssemblyStateCreateInfo' structure which determines input
    -- assembly behavior for vertex shading, as described in
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#drawing Drawing Commands>.
    -- If the @VK_EXT_extended_dynamic_state3@ extension is enabled, it /can/
    -- be @NULL@ if the pipeline is created with both
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE',
    -- and 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PRIMITIVE_TOPOLOGY'
    -- dynamic states set and
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-dynamicPrimitiveTopologyUnrestricted dynamicPrimitiveTopologyUnrestricted>
    -- is 'Vulkan.Core10.FundamentalTypes.TRUE'. It is ignored if the pipeline
    -- includes a mesh shader stage.
    forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe PipelineInputAssemblyStateCreateInfo
inputAssemblyState :: Maybe PipelineInputAssemblyStateCreateInfo
  , -- | @pTessellationState@ is a pointer to a
    -- 'PipelineTessellationStateCreateInfo' structure defining tessellation
    -- state used by tessellation shaders. It /can/ be @NULL@ if the pipeline
    -- is created with the
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT'
    -- dynamic state set.
    forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineTessellationStateCreateInfo)
tessellationState :: Maybe (SomeStruct PipelineTessellationStateCreateInfo)
  , -- | @pViewportState@ is a pointer to a 'PipelineViewportStateCreateInfo'
    -- structure defining viewport state used when rasterization is enabled. If
    -- the @VK_EXT_extended_dynamic_state3@ extension is enabled, it /can/ be
    -- @NULL@ if the pipeline is created with both
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_VIEWPORT_WITH_COUNT',
    -- and 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SCISSOR_WITH_COUNT'
    -- dynamic states set.
    forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineViewportStateCreateInfo)
viewportState :: Maybe (SomeStruct PipelineViewportStateCreateInfo)
  , -- | @pRasterizationState@ is a pointer to a
    -- 'PipelineRasterizationStateCreateInfo' structure defining rasterization
    -- state. If the @VK_EXT_extended_dynamic_state3@ extension is enabled, it
    -- /can/ be @NULL@ if the pipeline is created with all of
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_POLYGON_MODE_EXT',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_CULL_MODE',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_FRONT_FACE',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BIAS_ENABLE',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BIAS', and
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LINE_WIDTH' dynamic
    -- states set.
    forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
rasterizationState :: Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
  , -- | @pMultisampleState@ is a pointer to a
    -- 'PipelineMultisampleStateCreateInfo' structure defining multisample
    -- state used when rasterization is enabled. If the
    -- @VK_EXT_extended_dynamic_state3@ extension is enabled, it /can/ be
    -- @NULL@ if the pipeline is created with all of
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_SAMPLE_MASK_EXT', and
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT'
    -- dynamic states set, and either
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-alphaToOne alphaToOne>
    -- is disabled on the device or
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT'
    -- is set, in which case
    -- 'PipelineMultisampleStateCreateInfo'::@sampleShadingEnable@ is assumed
    -- to be 'Vulkan.Core10.FundamentalTypes.FALSE'.
    forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
multisampleState :: Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
  , -- | @pDepthStencilState@ is a pointer to a
    -- 'PipelineDepthStencilStateCreateInfo' structure defining depth\/stencil
    -- state used when rasterization is enabled for depth or stencil
    -- attachments accessed during rendering. If the
    -- @VK_EXT_extended_dynamic_state3@ extension is enabled, it /can/ be
    -- @NULL@ if the pipeline is created with all of
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_TEST_ENABLE',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_WRITE_ENABLE',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_COMPARE_OP',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_STENCIL_TEST_ENABLE',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_STENCIL_OP', and
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_DEPTH_BOUNDS' dynamic
    -- states set.
    forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe PipelineDepthStencilStateCreateInfo
depthStencilState :: Maybe PipelineDepthStencilStateCreateInfo
  , -- | @pColorBlendState@ is a pointer to a 'PipelineColorBlendStateCreateInfo'
    -- structure defining color blend state used when rasterization is enabled
    -- for any color attachments accessed during rendering. If the
    -- @VK_EXT_extended_dynamic_state3@ extension is enabled, it /can/ be
    -- @NULL@ if the pipeline is created with all of
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_LOGIC_OP_EXT',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT',
    -- 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_COLOR_WRITE_MASK_EXT',
    -- and 'Vulkan.Core10.Enums.DynamicState.DYNAMIC_STATE_BLEND_CONSTANTS'
    -- dynamic states set.
    forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
colorBlendState :: Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
  , -- | @pDynamicState@ is a pointer to a 'PipelineDynamicStateCreateInfo'
    -- structure defining which properties of the pipeline state object are
    -- dynamic and /can/ be changed independently of the pipeline state. This
    -- /can/ be @NULL@, which means no state in the pipeline is considered
    -- dynamic.
    forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe PipelineDynamicStateCreateInfo
dynamicState :: Maybe PipelineDynamicStateCreateInfo
  , -- | @layout@ is the description of binding locations used by both the
    -- pipeline and descriptor sets used with the pipeline.
    forall (es :: [*]). GraphicsPipelineCreateInfo es -> PipelineLayout
layout :: PipelineLayout
  , -- | @renderPass@ is a handle to a render pass object describing the
    -- environment in which the pipeline will be used. The pipeline /must/ only
    -- be used with a render pass instance compatible with the one provided.
    -- See
    -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#renderpass-compatibility Render Pass Compatibility>
    -- for more information.
    forall (es :: [*]). GraphicsPipelineCreateInfo es -> RenderPass
renderPass :: RenderPass
  , -- | @subpass@ is the index of the subpass in the render pass where this
    -- pipeline will be used.
    forall (es :: [*]).
GraphicsPipelineCreateInfo es -> "createInfoCount" ::: Word32
subpass :: Word32
  , -- | @basePipelineHandle@ is a pipeline to derive from.
    forall (es :: [*]). GraphicsPipelineCreateInfo es -> Pipeline
basePipelineHandle :: Pipeline
  , -- | @basePipelineIndex@ is an index into the @pCreateInfos@ parameter to use
    -- as a pipeline to derive from.
    forall (es :: [*]). GraphicsPipelineCreateInfo es -> Int32
basePipelineIndex :: Int32
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (GraphicsPipelineCreateInfo (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (GraphicsPipelineCreateInfo es)

instance Extensible GraphicsPipelineCreateInfo where
  extensibleTypeName :: String
extensibleTypeName = String
"GraphicsPipelineCreateInfo"
  setNext :: forall (ds :: [*]) (es :: [*]).
GraphicsPipelineCreateInfo ds
-> Chain es -> GraphicsPipelineCreateInfo es
setNext GraphicsPipelineCreateInfo{Int32
Maybe PipelineInputAssemblyStateCreateInfo
Maybe PipelineDynamicStateCreateInfo
Maybe PipelineDepthStencilStateCreateInfo
Maybe (SomeStruct PipelineViewportStateCreateInfo)
Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
Maybe (SomeStruct PipelineTessellationStateCreateInfo)
Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
"createInfoCount" ::: Word32
Vector (SomeStruct PipelineShaderStageCreateInfo)
Chain ds
RenderPass
PipelineLayout
Pipeline
PipelineCreateFlags
basePipelineIndex :: Int32
basePipelineHandle :: Pipeline
subpass :: "createInfoCount" ::: Word32
renderPass :: RenderPass
layout :: PipelineLayout
dynamicState :: Maybe PipelineDynamicStateCreateInfo
colorBlendState :: Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
depthStencilState :: Maybe PipelineDepthStencilStateCreateInfo
multisampleState :: Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
rasterizationState :: Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
viewportState :: Maybe (SomeStruct PipelineViewportStateCreateInfo)
tessellationState :: Maybe (SomeStruct PipelineTessellationStateCreateInfo)
inputAssemblyState :: Maybe PipelineInputAssemblyStateCreateInfo
vertexInputState :: Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
stageCount :: "createInfoCount" ::: Word32
flags :: PipelineCreateFlags
next :: Chain ds
$sel:basePipelineIndex:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> Int32
$sel:basePipelineHandle:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> Pipeline
$sel:subpass:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es -> "createInfoCount" ::: Word32
$sel:renderPass:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> RenderPass
$sel:layout:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> PipelineLayout
$sel:dynamicState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe PipelineDynamicStateCreateInfo
$sel:colorBlendState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
$sel:depthStencilState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe PipelineDepthStencilStateCreateInfo
$sel:multisampleState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
$sel:rasterizationState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
$sel:viewportState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineViewportStateCreateInfo)
$sel:tessellationState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineTessellationStateCreateInfo)
$sel:inputAssemblyState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe PipelineInputAssemblyStateCreateInfo
$sel:vertexInputState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
$sel:stages:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
$sel:stageCount:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es -> "createInfoCount" ::: Word32
$sel:flags:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es -> PipelineCreateFlags
$sel:next:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> Chain es
..} Chain es
next' = GraphicsPipelineCreateInfo{$sel:next:GraphicsPipelineCreateInfo :: Chain es
next = Chain es
next', Int32
Maybe PipelineInputAssemblyStateCreateInfo
Maybe PipelineDynamicStateCreateInfo
Maybe PipelineDepthStencilStateCreateInfo
Maybe (SomeStruct PipelineViewportStateCreateInfo)
Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
Maybe (SomeStruct PipelineTessellationStateCreateInfo)
Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
"createInfoCount" ::: Word32
Vector (SomeStruct PipelineShaderStageCreateInfo)
RenderPass
PipelineLayout
Pipeline
PipelineCreateFlags
basePipelineIndex :: Int32
basePipelineHandle :: Pipeline
subpass :: "createInfoCount" ::: Word32
renderPass :: RenderPass
layout :: PipelineLayout
dynamicState :: Maybe PipelineDynamicStateCreateInfo
colorBlendState :: Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
depthStencilState :: Maybe PipelineDepthStencilStateCreateInfo
multisampleState :: Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
rasterizationState :: Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
viewportState :: Maybe (SomeStruct PipelineViewportStateCreateInfo)
tessellationState :: Maybe (SomeStruct PipelineTessellationStateCreateInfo)
inputAssemblyState :: Maybe PipelineInputAssemblyStateCreateInfo
vertexInputState :: Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
stageCount :: "createInfoCount" ::: Word32
flags :: PipelineCreateFlags
$sel:basePipelineIndex:GraphicsPipelineCreateInfo :: Int32
$sel:basePipelineHandle:GraphicsPipelineCreateInfo :: Pipeline
$sel:subpass:GraphicsPipelineCreateInfo :: "createInfoCount" ::: Word32
$sel:renderPass:GraphicsPipelineCreateInfo :: RenderPass
$sel:layout:GraphicsPipelineCreateInfo :: PipelineLayout
$sel:dynamicState:GraphicsPipelineCreateInfo :: Maybe PipelineDynamicStateCreateInfo
$sel:colorBlendState:GraphicsPipelineCreateInfo :: Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
$sel:depthStencilState:GraphicsPipelineCreateInfo :: Maybe PipelineDepthStencilStateCreateInfo
$sel:multisampleState:GraphicsPipelineCreateInfo :: Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
$sel:rasterizationState:GraphicsPipelineCreateInfo :: Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
$sel:viewportState:GraphicsPipelineCreateInfo :: Maybe (SomeStruct PipelineViewportStateCreateInfo)
$sel:tessellationState:GraphicsPipelineCreateInfo :: Maybe (SomeStruct PipelineTessellationStateCreateInfo)
$sel:inputAssemblyState:GraphicsPipelineCreateInfo :: Maybe PipelineInputAssemblyStateCreateInfo
$sel:vertexInputState:GraphicsPipelineCreateInfo :: Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
$sel:stages:GraphicsPipelineCreateInfo :: Vector (SomeStruct PipelineShaderStageCreateInfo)
$sel:stageCount:GraphicsPipelineCreateInfo :: "createInfoCount" ::: Word32
$sel:flags:GraphicsPipelineCreateInfo :: PipelineCreateFlags
..}
  getNext :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> Chain es
getNext GraphicsPipelineCreateInfo{Int32
Maybe PipelineInputAssemblyStateCreateInfo
Maybe PipelineDynamicStateCreateInfo
Maybe PipelineDepthStencilStateCreateInfo
Maybe (SomeStruct PipelineViewportStateCreateInfo)
Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
Maybe (SomeStruct PipelineTessellationStateCreateInfo)
Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
"createInfoCount" ::: Word32
Vector (SomeStruct PipelineShaderStageCreateInfo)
Chain es
RenderPass
PipelineLayout
Pipeline
PipelineCreateFlags
basePipelineIndex :: Int32
basePipelineHandle :: Pipeline
subpass :: "createInfoCount" ::: Word32
renderPass :: RenderPass
layout :: PipelineLayout
dynamicState :: Maybe PipelineDynamicStateCreateInfo
colorBlendState :: Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
depthStencilState :: Maybe PipelineDepthStencilStateCreateInfo
multisampleState :: Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
rasterizationState :: Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
viewportState :: Maybe (SomeStruct PipelineViewportStateCreateInfo)
tessellationState :: Maybe (SomeStruct PipelineTessellationStateCreateInfo)
inputAssemblyState :: Maybe PipelineInputAssemblyStateCreateInfo
vertexInputState :: Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
stageCount :: "createInfoCount" ::: Word32
flags :: PipelineCreateFlags
next :: Chain es
$sel:basePipelineIndex:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> Int32
$sel:basePipelineHandle:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> Pipeline
$sel:subpass:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es -> "createInfoCount" ::: Word32
$sel:renderPass:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> RenderPass
$sel:layout:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> PipelineLayout
$sel:dynamicState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe PipelineDynamicStateCreateInfo
$sel:colorBlendState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
$sel:depthStencilState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe PipelineDepthStencilStateCreateInfo
$sel:multisampleState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
$sel:rasterizationState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
$sel:viewportState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineViewportStateCreateInfo)
$sel:tessellationState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineTessellationStateCreateInfo)
$sel:inputAssemblyState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe PipelineInputAssemblyStateCreateInfo
$sel:vertexInputState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
$sel:stages:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
$sel:stageCount:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es -> "createInfoCount" ::: Word32
$sel:flags:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es -> PipelineCreateFlags
$sel:next:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> Chain es
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends GraphicsPipelineCreateInfo e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e -> (Extends GraphicsPipelineCreateInfo e => b) -> Maybe b
extends proxy e
_ Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: PipelineRobustnessCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineRobustnessCreateInfoEXT = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: GraphicsPipelineLibraryCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @GraphicsPipelineLibraryCreateInfoEXT = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: MultiviewPerViewAttributesInfoNVX
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @MultiviewPerViewAttributesInfoNVX = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: AttachmentSampleCountInfoAMD
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @AttachmentSampleCountInfoAMD = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: PipelineRenderingCreateInfo
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineRenderingCreateInfo = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: PipelineFragmentShadingRateEnumStateCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineFragmentShadingRateEnumStateCreateInfoNV = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: PipelineFragmentShadingRateStateCreateInfoKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineFragmentShadingRateStateCreateInfoKHR = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: PipelineLibraryCreateInfoKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineLibraryCreateInfoKHR = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: PipelineCompilerControlCreateInfoAMD
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineCompilerControlCreateInfoAMD = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: PipelineCreationFeedbackCreateInfo
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineCreationFeedbackCreateInfo = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: PipelineRepresentativeFragmentTestStateCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineRepresentativeFragmentTestStateCreateInfoNV = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: ExternalFormatANDROID
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @ExternalFormatANDROID = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: PipelineDiscardRectangleStateCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineDiscardRectangleStateCreateInfoEXT = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: GraphicsPipelineShaderGroupsCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @GraphicsPipelineShaderGroupsCreateInfoNV = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Just e :~: PipelineCreateFlags2CreateInfoKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineCreateFlags2CreateInfoKHR = forall a. a -> Maybe a
Just Extends GraphicsPipelineCreateInfo e => b
f
    | Bool
otherwise = forall a. Maybe a
Nothing

instance ( Extendss GraphicsPipelineCreateInfo es
         , PokeChain es ) => ToCStruct (GraphicsPipelineCreateInfo es) where
  withCStruct :: forall b.
GraphicsPipelineCreateInfo es
-> (Ptr (GraphicsPipelineCreateInfo es) -> IO b) -> IO b
withCStruct GraphicsPipelineCreateInfo es
x Ptr (GraphicsPipelineCreateInfo es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
144 forall a b. (a -> b) -> a -> b
$ \Ptr (GraphicsPipelineCreateInfo es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (GraphicsPipelineCreateInfo es)
p GraphicsPipelineCreateInfo es
x (Ptr (GraphicsPipelineCreateInfo es) -> IO b
f Ptr (GraphicsPipelineCreateInfo es)
p)
  pokeCStruct :: forall b.
Ptr (GraphicsPipelineCreateInfo es)
-> GraphicsPipelineCreateInfo es -> IO b -> IO b
pokeCStruct Ptr (GraphicsPipelineCreateInfo es)
p GraphicsPipelineCreateInfo{Int32
Maybe PipelineInputAssemblyStateCreateInfo
Maybe PipelineDynamicStateCreateInfo
Maybe PipelineDepthStencilStateCreateInfo
Maybe (SomeStruct PipelineViewportStateCreateInfo)
Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
Maybe (SomeStruct PipelineTessellationStateCreateInfo)
Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
"createInfoCount" ::: Word32
Vector (SomeStruct PipelineShaderStageCreateInfo)
Chain es
RenderPass
PipelineLayout
Pipeline
PipelineCreateFlags
basePipelineIndex :: Int32
basePipelineHandle :: Pipeline
subpass :: "createInfoCount" ::: Word32
renderPass :: RenderPass
layout :: PipelineLayout
dynamicState :: Maybe PipelineDynamicStateCreateInfo
colorBlendState :: Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
depthStencilState :: Maybe PipelineDepthStencilStateCreateInfo
multisampleState :: Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
rasterizationState :: Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
viewportState :: Maybe (SomeStruct PipelineViewportStateCreateInfo)
tessellationState :: Maybe (SomeStruct PipelineTessellationStateCreateInfo)
inputAssemblyState :: Maybe PipelineInputAssemblyStateCreateInfo
vertexInputState :: Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
stageCount :: "createInfoCount" ::: Word32
flags :: PipelineCreateFlags
next :: Chain es
$sel:basePipelineIndex:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> Int32
$sel:basePipelineHandle:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> Pipeline
$sel:subpass:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es -> "createInfoCount" ::: Word32
$sel:renderPass:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> RenderPass
$sel:layout:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo es -> PipelineLayout
$sel:dynamicState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe PipelineDynamicStateCreateInfo
$sel:colorBlendState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
$sel:depthStencilState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe PipelineDepthStencilStateCreateInfo
$sel:multisampleState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
$sel:rasterizationState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
$sel:viewportState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineViewportStateCreateInfo)
$sel:tessellationState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineTessellationStateCreateInfo)
$sel:inputAssemblyState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe PipelineInputAssemblyStateCreateInfo
$sel:vertexInputState:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
$sel:stages:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
$sel:stageCount:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es -> "createInfoCount" ::: Word32
$sel:flags:GraphicsPipelineCreateInfo :: forall (es :: [*]).
GraphicsPipelineCreateInfo es -> PipelineCreateFlags
$sel:next:GraphicsPipelineCreateInfo :: forall (es :: [*]). GraphicsPipelineCreateInfo 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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO)
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineCreateFlags)) (PipelineCreateFlags
flags)
    let pStagesLength :: Int
pStagesLength = forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages)
    "createInfoCount" ::: Word32
stageCount'' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ if ("createInfoCount" ::: Word32
stageCount) forall a. Eq a => a -> a -> Bool
== "createInfoCount" ::: Word32
0
      then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pStagesLength
      else do
        forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pStagesLength forall a. Eq a => a -> a -> Bool
== ("createInfoCount" ::: Word32
stageCount) Bool -> Bool -> Bool
|| Int
pStagesLength forall a. Eq a => a -> a -> Bool
== Int
0) 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
"pStages must be empty or have 'stageCount' elements" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
        forall (f :: * -> *) a. Applicative f => a -> f a
pure ("createInfoCount" ::: Word32
stageCount)
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) ("createInfoCount" ::: Word32
stageCount'')
    Ptr (PipelineShaderStageCreateInfo Any)
pStages'' <- if forall a. Vector a -> Bool
Data.Vector.null (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages)
      then forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      else do
        Ptr (PipelineShaderStageCreateInfo Any)
pPStages <- 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 @(PipelineShaderStageCreateInfo _) (((forall a. Vector a -> Int
Data.Vector.length (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages))) forall a. Num a => a -> a -> a
* Int
48)
        forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i SomeStruct PipelineShaderStageCreateInfo
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 (PipelineShaderStageCreateInfo Any)
pPStages forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
48 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (PipelineShaderStageCreateInfo _))) (SomeStruct PipelineShaderStageCreateInfo
e) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) ((Vector (SomeStruct PipelineShaderStageCreateInfo)
stages))
        forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr (PipelineShaderStageCreateInfo Any)
pPStages
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr (PipelineShaderStageCreateInfo _)))) Ptr (PipelineShaderStageCreateInfo Any)
pStages''
    Ptr (PipelineVertexInputStateCreateInfo '[])
pVertexInputState'' <- case (Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
vertexInputState) of
      Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      Just SomeStruct PipelineVertexInputStateCreateInfo
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (PipelineVertexInputStateCreateInfo '[])) forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineVertexInputStateCreateInfo '[]) -> IO b
cont -> forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
    (Extendss a es, PokeChain es) =>
    Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @PipelineVertexInputStateCreateInfo (SomeStruct PipelineVertexInputStateCreateInfo
j) (Ptr (PipelineVertexInputStateCreateInfo '[]) -> IO b
cont forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. Ptr a -> Ptr b
castPtr)
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr (PipelineVertexInputStateCreateInfo _)))) Ptr (PipelineVertexInputStateCreateInfo '[])
pVertexInputState''
    Ptr PipelineInputAssemblyStateCreateInfo
pInputAssemblyState'' <- case (Maybe PipelineInputAssemblyStateCreateInfo
inputAssemblyState) of
      Maybe PipelineInputAssemblyStateCreateInfo
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      Just PipelineInputAssemblyStateCreateInfo
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 (PipelineInputAssemblyStateCreateInfo
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 ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr PipelineInputAssemblyStateCreateInfo))) Ptr PipelineInputAssemblyStateCreateInfo
pInputAssemblyState''
    Ptr (PipelineTessellationStateCreateInfo '[])
pTessellationState'' <- case (Maybe (SomeStruct PipelineTessellationStateCreateInfo)
tessellationState) of
      Maybe (SomeStruct PipelineTessellationStateCreateInfo)
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      Just SomeStruct PipelineTessellationStateCreateInfo
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (PipelineTessellationStateCreateInfo '[])) forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineTessellationStateCreateInfo '[]) -> IO b
cont -> forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
    (Extendss a es, PokeChain es) =>
    Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @PipelineTessellationStateCreateInfo (SomeStruct PipelineTessellationStateCreateInfo
j) (Ptr (PipelineTessellationStateCreateInfo '[]) -> IO b
cont forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. Ptr a -> Ptr b
castPtr)
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr (Ptr (PipelineTessellationStateCreateInfo _)))) Ptr (PipelineTessellationStateCreateInfo '[])
pTessellationState''
    Ptr (PipelineViewportStateCreateInfo '[])
pViewportState'' <- case (Maybe (SomeStruct PipelineViewportStateCreateInfo)
viewportState) of
      Maybe (SomeStruct PipelineViewportStateCreateInfo)
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      Just SomeStruct PipelineViewportStateCreateInfo
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (PipelineViewportStateCreateInfo '[])) forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineViewportStateCreateInfo '[]) -> IO b
cont -> forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
    (Extendss a es, PokeChain es) =>
    Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @PipelineViewportStateCreateInfo (SomeStruct PipelineViewportStateCreateInfo
j) (Ptr (PipelineViewportStateCreateInfo '[]) -> IO b
cont forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. Ptr a -> Ptr b
castPtr)
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr (Ptr (PipelineViewportStateCreateInfo _)))) Ptr (PipelineViewportStateCreateInfo '[])
pViewportState''
    Ptr (PipelineRasterizationStateCreateInfo '[])
pRasterizationState'' <- case (Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
rasterizationState) of
      Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      Just SomeStruct PipelineRasterizationStateCreateInfo
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (PipelineRasterizationStateCreateInfo '[])) forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineRasterizationStateCreateInfo '[]) -> IO b
cont -> forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
    (Extendss a es, PokeChain es) =>
    Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @PipelineRasterizationStateCreateInfo (SomeStruct PipelineRasterizationStateCreateInfo
j) (Ptr (PipelineRasterizationStateCreateInfo '[]) -> IO b
cont forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. Ptr a -> Ptr b
castPtr)
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr (Ptr (PipelineRasterizationStateCreateInfo _)))) Ptr (PipelineRasterizationStateCreateInfo '[])
pRasterizationState''
    Ptr (PipelineMultisampleStateCreateInfo '[])
pMultisampleState'' <- case (Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
multisampleState) of
      Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      Just SomeStruct PipelineMultisampleStateCreateInfo
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (PipelineMultisampleStateCreateInfo '[])) forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineMultisampleStateCreateInfo '[]) -> IO b
cont -> forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
    (Extendss a es, PokeChain es) =>
    Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @PipelineMultisampleStateCreateInfo (SomeStruct PipelineMultisampleStateCreateInfo
j) (Ptr (PipelineMultisampleStateCreateInfo '[]) -> IO b
cont forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. Ptr a -> Ptr b
castPtr)
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr (Ptr (PipelineMultisampleStateCreateInfo _)))) Ptr (PipelineMultisampleStateCreateInfo '[])
pMultisampleState''
    Ptr PipelineDepthStencilStateCreateInfo
pDepthStencilState'' <- case (Maybe PipelineDepthStencilStateCreateInfo
depthStencilState) of
      Maybe PipelineDepthStencilStateCreateInfo
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      Just PipelineDepthStencilStateCreateInfo
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 (PipelineDepthStencilStateCreateInfo
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 ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr (Ptr PipelineDepthStencilStateCreateInfo))) Ptr PipelineDepthStencilStateCreateInfo
pDepthStencilState''
    Ptr (PipelineColorBlendStateCreateInfo '[])
pColorBlendState'' <- case (Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
colorBlendState) of
      Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      Just SomeStruct PipelineColorBlendStateCreateInfo
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT @_ @_ @(Ptr (PipelineColorBlendStateCreateInfo '[])) forall a b. (a -> b) -> a -> b
$ \Ptr (PipelineColorBlendStateCreateInfo '[]) -> IO b
cont -> forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
SomeStruct a
-> (forall (es :: [*]).
    (Extendss a es, PokeChain es) =>
    Ptr (a es) -> IO b)
-> IO b
withSomeCStruct @PipelineColorBlendStateCreateInfo (SomeStruct PipelineColorBlendStateCreateInfo
j) (Ptr (PipelineColorBlendStateCreateInfo '[]) -> IO b
cont forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. Ptr a -> Ptr b
castPtr)
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr (Ptr (PipelineColorBlendStateCreateInfo _)))) Ptr (PipelineColorBlendStateCreateInfo '[])
pColorBlendState''
    Ptr PipelineDynamicStateCreateInfo
pDynamicState'' <- case (Maybe PipelineDynamicStateCreateInfo
dynamicState) of
      Maybe PipelineDynamicStateCreateInfo
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
      Just PipelineDynamicStateCreateInfo
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 (PipelineDynamicStateCreateInfo
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 ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr (Ptr PipelineDynamicStateCreateInfo))) Ptr PipelineDynamicStateCreateInfo
pDynamicState''
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr PipelineLayout)) (PipelineLayout
layout)
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr RenderPass)) (RenderPass
renderPass)
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
120 :: Ptr Word32)) ("createInfoCount" ::: Word32
subpass)
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr Pipeline)) (Pipeline
basePipelineHandle)
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr Int32)) (Int32
basePipelineIndex)
    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
144
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr (GraphicsPipelineCreateInfo es) -> IO b -> IO b
pokeZeroCStruct Ptr (GraphicsPipelineCreateInfo 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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO)
    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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) 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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
120 :: Ptr Word32)) (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 (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr Int32)) (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 GraphicsPipelineCreateInfo es
         , PeekChain es ) => FromCStruct (GraphicsPipelineCreateInfo es) where
  peekCStruct :: Ptr (GraphicsPipelineCreateInfo es)
-> IO (GraphicsPipelineCreateInfo es)
peekCStruct Ptr (GraphicsPipelineCreateInfo es)
p = do
    Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (GraphicsPipelineCreateInfo 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 Ptr ()
pNext)
    PipelineCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineCreateFlags ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineCreateFlags))
    "createInfoCount" ::: Word32
stageCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
    Ptr (PipelineShaderStageCreateInfo Any)
pStages <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (PipelineShaderStageCreateInfo _)) ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr (PipelineShaderStageCreateInfo _))))
    let pStagesLength :: Int
pStagesLength = if Ptr (PipelineShaderStageCreateInfo Any)
pStages forall a. Eq a => a -> a -> Bool
== forall a. Ptr a
nullPtr then Int
0 else (forall a b. (Integral a, Num b) => a -> b
fromIntegral "createInfoCount" ::: Word32
stageCount)
    Vector (SomeStruct PipelineShaderStageCreateInfo)
pStages' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM Int
pStagesLength (\Int
i -> forall (a :: [*] -> *).
(Extensible a,
 forall (es :: [*]).
 (Extendss a es, PeekChain es) =>
 FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ((Ptr (PipelineShaderStageCreateInfo Any)
pStages forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
48 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (PipelineShaderStageCreateInfo _)))))
    Ptr (PipelineVertexInputStateCreateInfo Any)
pVertexInputState <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (PipelineVertexInputStateCreateInfo _)) ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr (PipelineVertexInputStateCreateInfo _))))
    Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
pVertexInputState' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr (PipelineVertexInputStateCreateInfo Any)
j -> forall (a :: [*] -> *).
(Extensible a,
 forall (es :: [*]).
 (Extendss a es, PeekChain es) =>
 FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineVertexInputStateCreateInfo Any)
j))) Ptr (PipelineVertexInputStateCreateInfo Any)
pVertexInputState
    Ptr PipelineInputAssemblyStateCreateInfo
pInputAssemblyState <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PipelineInputAssemblyStateCreateInfo) ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr PipelineInputAssemblyStateCreateInfo)))
    Maybe PipelineInputAssemblyStateCreateInfo
pInputAssemblyState' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr PipelineInputAssemblyStateCreateInfo
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineInputAssemblyStateCreateInfo (Ptr PipelineInputAssemblyStateCreateInfo
j)) Ptr PipelineInputAssemblyStateCreateInfo
pInputAssemblyState
    Ptr (PipelineTessellationStateCreateInfo Any)
pTessellationState <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (PipelineTessellationStateCreateInfo _)) ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr (Ptr (PipelineTessellationStateCreateInfo _))))
    Maybe (SomeStruct PipelineTessellationStateCreateInfo)
pTessellationState' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr (PipelineTessellationStateCreateInfo Any)
j -> forall (a :: [*] -> *).
(Extensible a,
 forall (es :: [*]).
 (Extendss a es, PeekChain es) =>
 FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineTessellationStateCreateInfo Any)
j))) Ptr (PipelineTessellationStateCreateInfo Any)
pTessellationState
    Ptr (PipelineViewportStateCreateInfo Any)
pViewportState <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (PipelineViewportStateCreateInfo _)) ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr (Ptr (PipelineViewportStateCreateInfo _))))
    Maybe (SomeStruct PipelineViewportStateCreateInfo)
pViewportState' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr (PipelineViewportStateCreateInfo Any)
j -> forall (a :: [*] -> *).
(Extensible a,
 forall (es :: [*]).
 (Extendss a es, PeekChain es) =>
 FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineViewportStateCreateInfo Any)
j))) Ptr (PipelineViewportStateCreateInfo Any)
pViewportState
    Ptr (PipelineRasterizationStateCreateInfo Any)
pRasterizationState <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (PipelineRasterizationStateCreateInfo _)) ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr (Ptr (PipelineRasterizationStateCreateInfo _))))
    Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
pRasterizationState' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr (PipelineRasterizationStateCreateInfo Any)
j -> forall (a :: [*] -> *).
(Extensible a,
 forall (es :: [*]).
 (Extendss a es, PeekChain es) =>
 FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineRasterizationStateCreateInfo Any)
j))) Ptr (PipelineRasterizationStateCreateInfo Any)
pRasterizationState
    Ptr (PipelineMultisampleStateCreateInfo Any)
pMultisampleState <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (PipelineMultisampleStateCreateInfo _)) ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr (Ptr (PipelineMultisampleStateCreateInfo _))))
    Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
pMultisampleState' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr (PipelineMultisampleStateCreateInfo Any)
j -> forall (a :: [*] -> *).
(Extensible a,
 forall (es :: [*]).
 (Extendss a es, PeekChain es) =>
 FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineMultisampleStateCreateInfo Any)
j))) Ptr (PipelineMultisampleStateCreateInfo Any)
pMultisampleState
    Ptr PipelineDepthStencilStateCreateInfo
pDepthStencilState <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PipelineDepthStencilStateCreateInfo) ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr (Ptr PipelineDepthStencilStateCreateInfo)))
    Maybe PipelineDepthStencilStateCreateInfo
pDepthStencilState' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr PipelineDepthStencilStateCreateInfo
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineDepthStencilStateCreateInfo (Ptr PipelineDepthStencilStateCreateInfo
j)) Ptr PipelineDepthStencilStateCreateInfo
pDepthStencilState
    Ptr (PipelineColorBlendStateCreateInfo Any)
pColorBlendState <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (PipelineColorBlendStateCreateInfo _)) ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr (Ptr (PipelineColorBlendStateCreateInfo _))))
    Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
pColorBlendState' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr (PipelineColorBlendStateCreateInfo Any)
j -> forall (a :: [*] -> *).
(Extensible a,
 forall (es :: [*]).
 (Extendss a es, PeekChain es) =>
 FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineColorBlendStateCreateInfo Any)
j))) Ptr (PipelineColorBlendStateCreateInfo Any)
pColorBlendState
    Ptr PipelineDynamicStateCreateInfo
pDynamicState <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PipelineDynamicStateCreateInfo) ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr (Ptr PipelineDynamicStateCreateInfo)))
    Maybe PipelineDynamicStateCreateInfo
pDynamicState' <- forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr PipelineDynamicStateCreateInfo
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineDynamicStateCreateInfo (Ptr PipelineDynamicStateCreateInfo
j)) Ptr PipelineDynamicStateCreateInfo
pDynamicState
    PipelineLayout
layout <- forall a. Storable a => Ptr a -> IO a
peek @PipelineLayout ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr PipelineLayout))
    RenderPass
renderPass <- forall a. Storable a => Ptr a -> IO a
peek @RenderPass ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
112 :: Ptr RenderPass))
    "createInfoCount" ::: Word32
subpass <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
120 :: Ptr Word32))
    Pipeline
basePipelineHandle <- forall a. Storable a => Ptr a -> IO a
peek @Pipeline ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr Pipeline))
    Int32
basePipelineIndex <- forall a. Storable a => Ptr a -> IO a
peek @Int32 ((Ptr (GraphicsPipelineCreateInfo es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr Int32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> PipelineCreateFlags
-> ("createInfoCount" ::: Word32)
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
-> Maybe PipelineInputAssemblyStateCreateInfo
-> Maybe (SomeStruct PipelineTessellationStateCreateInfo)
-> Maybe (SomeStruct PipelineViewportStateCreateInfo)
-> Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
-> Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
-> Maybe PipelineDepthStencilStateCreateInfo
-> Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
-> Maybe PipelineDynamicStateCreateInfo
-> PipelineLayout
-> RenderPass
-> ("createInfoCount" ::: Word32)
-> Pipeline
-> Int32
-> GraphicsPipelineCreateInfo es
GraphicsPipelineCreateInfo
             Chain es
next
             PipelineCreateFlags
flags
             "createInfoCount" ::: Word32
stageCount
             Vector (SomeStruct PipelineShaderStageCreateInfo)
pStages'
             Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
pVertexInputState'
             Maybe PipelineInputAssemblyStateCreateInfo
pInputAssemblyState'
             Maybe (SomeStruct PipelineTessellationStateCreateInfo)
pTessellationState'
             Maybe (SomeStruct PipelineViewportStateCreateInfo)
pViewportState'
             Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
pRasterizationState'
             Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
pMultisampleState'
             Maybe PipelineDepthStencilStateCreateInfo
pDepthStencilState'
             Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
pColorBlendState'
             Maybe PipelineDynamicStateCreateInfo
pDynamicState'
             PipelineLayout
layout
             RenderPass
renderPass
             "createInfoCount" ::: Word32
subpass
             Pipeline
basePipelineHandle
             Int32
basePipelineIndex

instance es ~ '[] => Zero (GraphicsPipelineCreateInfo es) where
  zero :: GraphicsPipelineCreateInfo es
zero = forall (es :: [*]).
Chain es
-> PipelineCreateFlags
-> ("createInfoCount" ::: Word32)
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Maybe (SomeStruct PipelineVertexInputStateCreateInfo)
-> Maybe PipelineInputAssemblyStateCreateInfo
-> Maybe (SomeStruct PipelineTessellationStateCreateInfo)
-> Maybe (SomeStruct PipelineViewportStateCreateInfo)
-> Maybe (SomeStruct PipelineRasterizationStateCreateInfo)
-> Maybe (SomeStruct PipelineMultisampleStateCreateInfo)
-> Maybe PipelineDepthStencilStateCreateInfo
-> Maybe (SomeStruct PipelineColorBlendStateCreateInfo)
-> Maybe PipelineDynamicStateCreateInfo
-> PipelineLayout
-> RenderPass
-> ("createInfoCount" ::: Word32)
-> Pipeline
-> Int32
-> GraphicsPipelineCreateInfo es
GraphicsPipelineCreateInfo
           ()
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Monoid a => a
mempty
           forall a. Maybe a
Nothing
           forall a. Maybe a
Nothing
           forall a. Maybe a
Nothing
           forall a. Maybe a
Nothing
           forall a. Maybe a
Nothing
           forall a. Maybe a
Nothing
           forall a. Maybe a
Nothing
           forall a. Maybe a
Nothing
           forall a. Maybe a
Nothing
           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