{-# language CPP #-}
-- | = Name
--
-- VK_KHR_dynamic_rendering_local_read - device extension
--
-- = VK_KHR_dynamic_rendering_local_read
--
-- [__Name String__]
--     @VK_KHR_dynamic_rendering_local_read@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     233
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_dynamic_rendering VK_KHR_dynamic_rendering>
--     or
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#versions-1.3 Vulkan Version 1.3>
--
-- [__Contact__]
--
--     -   Tobias Hector
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_KHR_dynamic_rendering_local_read] @tobski%0A*Here describe the issue or question you have about the VK_KHR_dynamic_rendering_local_read extension* >
--
-- [__Extension Proposal__]
--     <https://github.com/KhronosGroup/Vulkan-Docs/tree/main/proposals/VK_KHR_dynamic_rendering_local_read.adoc VK_KHR_dynamic_rendering_local_read>
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2023-11-03
--
-- [__Contributors__]
--
--     -   Tobias Hector, AMD
--
--     -   Hans-Kristian Arntzen, Valve
--
--     -   Connor Abbott, Valve
--
--     -   Pan Gao, Huawei
--
--     -   Lionel Landwerlin, Intel
--
--     -   Shahbaz Youssefi, Google
--
--     -   Alyssa Rosenzweig, Valve
--
--     -   Jan-Harald Fredriksen, Arm
--
--     -   Mike Blumenkrantz, Valve
--
--     -   Graeme Leese, Broadcom
--
--     -   Piers Daniell, Nvidia
--
--     -   Stuart Smith, AMD
--
--     -   Daniel Story, Nintendo
--
--     -   James Fitzpatrick, Imagination
--
--     -   Piotr Byszewski, Mobica
--
--     -   Spencer Fricke, LunarG
--
--     -   Tom Olson, Arm
--
--     -   Michal Pietrasiuk, Intel
--
--     -   Matthew Netsch, Qualcomm
--
--     -   Marty Johnson, Khronos
--
--     -   Wyvern Wang, Huawei
--
--     -   Jeff Bolz, Nvidia
--
--     -   Samuel (Sheng-Wen) Huang, MediaTek
--
-- == Description
--
-- This extension enables reads from attachments and resources written by
-- previous fragment shaders within a dynamic render pass.
--
-- == New Commands
--
-- -   'cmdSetRenderingAttachmentLocationsKHR'
--
-- -   'cmdSetRenderingInputAttachmentIndicesKHR'
--
-- == New Structures
--
-- -   Extending 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo',
--     'Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo':
--
--     -   'RenderingAttachmentLocationInfoKHR'
--
--     -   'RenderingInputAttachmentIndexInfoKHR'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR'
--
-- == New Enum Constants
--
-- -   'KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME'
--
-- -   'KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.ImageLayout.ImageLayout':
--
--     -   'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR'
--
-- == Version History
--
-- -   Revision 1, 2023-11-03 (Tobias Hector)
--
--     -   Initial revision
--
-- == See Also
--
-- No cross-references are available
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_KHR_dynamic_rendering_local_read Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_KHR_dynamic_rendering_local_read  ( cmdSetRenderingAttachmentLocationsKHR
                                                              , cmdSetRenderingInputAttachmentIndicesKHR
                                                              , PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR(..)
                                                              , RenderingAttachmentLocationInfoKHR(..)
                                                              , RenderingInputAttachmentIndexInfoKHR(..)
                                                              , KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION
                                                              , pattern KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION
                                                              , KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME
                                                              , pattern KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME
                                                              ) where

import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Utils (maybePeek)
import Foreign.Marshal.Utils (with)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
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.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import Data.Word (Word32)
import Data.Kind (Type)
import 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.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer))
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetRenderingAttachmentLocationsKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetRenderingInputAttachmentIndicesKHR))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdSetRenderingAttachmentLocationsKHR
  :: FunPtr (Ptr CommandBuffer_T -> Ptr RenderingAttachmentLocationInfoKHR -> IO ()) -> Ptr CommandBuffer_T -> Ptr RenderingAttachmentLocationInfoKHR -> IO ()

-- | vkCmdSetRenderingAttachmentLocationsKHR - Set color attachment location
-- mappings for a command buffer
--
-- = Description
--
-- This command sets the attachment location mappings for subsequent
-- drawing commands, and /must/ match the mappings provided to the bound
-- pipeline, if one is bound, which /can/ be set by chaining
-- 'RenderingAttachmentLocationInfoKHR' to
-- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'.
--
-- Until this command is called, mappings in the command buffer state are
-- treated as each color attachment specified in
-- 'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.cmdBeginRendering'
-- having a location equal to its index in
-- 'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.RenderingInfo'::@pColorAttachments@.
-- This state is reset whenever
-- 'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.cmdBeginRendering'
-- is called.
--
-- == Valid Usage
--
-- -   #VUID-vkCmdSetRenderingAttachmentLocationsKHR-dynamicRenderingLocalRead-09509#
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-dynamicRenderingLocalRead dynamicRenderingLocalRead>
--     /must/ be enabled
--
-- -   #VUID-vkCmdSetRenderingAttachmentLocationsKHR-pLocationInfo-09510#
--     @pLocationInfo->colorAttachmentCount@ /must/ be equal to the value
--     of
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.RenderingInfo'::@colorAttachmentCount@
--     used to begin the current render pass instance
--
-- -   #VUID-vkCmdSetRenderingAttachmentLocationsKHR-commandBuffer-09511#
--     The current render pass instance /must/ have been started or resumed
--     by
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.cmdBeginRendering'
--     in this @commandBuffer@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdSetRenderingAttachmentLocationsKHR-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdSetRenderingAttachmentLocationsKHR-pLocationInfo-parameter#
--     @pLocationInfo@ /must/ be a valid pointer to a valid
--     'RenderingAttachmentLocationInfoKHR' structure
--
-- -   #VUID-vkCmdSetRenderingAttachmentLocationsKHR-commandBuffer-recording#
--     @commandBuffer@ /must/ be in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>
--
-- -   #VUID-vkCmdSetRenderingAttachmentLocationsKHR-commandBuffer-cmdpool#
--     The 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support graphics operations
--
-- -   #VUID-vkCmdSetRenderingAttachmentLocationsKHR-renderpass# This
--     command /must/ only be called inside of a render pass instance
--
-- -   #VUID-vkCmdSetRenderingAttachmentLocationsKHR-videocoding# This
--     command /must/ only be called outside of a video coding scope
--
-- == Host Synchronization
--
-- -   Host access to @commandBuffer@ /must/ be externally synchronized
--
-- -   Host access to the 'Vulkan.Core10.Handles.CommandPool' that
--     @commandBuffer@ was allocated from /must/ be externally synchronized
--
-- == Command Properties
--
-- \'
--
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginVideoCodingKHR Video Coding Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-queueoperation-command-types Command Type> |
-- +============================================================================================================================+========================================================================================================================+=============================================================================================================================+=======================================================================================================================+========================================================================================================================================+
-- | Primary                                                                                                                    | Inside                                                                                                                 | Outside                                                                                                                     | Graphics                                                                                                              | State                                                                                                                                  |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             |                                                                                                                       |                                                                                                                                        |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_dynamic_rendering_local_read VK_KHR_dynamic_rendering_local_read>,
-- 'Vulkan.Core10.Handles.CommandBuffer',
-- 'RenderingAttachmentLocationInfoKHR'
cmdSetRenderingAttachmentLocationsKHR :: forall io
                                       . (MonadIO io)
                                      => -- | @commandBuffer@ is the command buffer into which the command will be
                                         -- recorded.
                                         CommandBuffer
                                      -> -- | @pLocationInfo@ is a 'RenderingAttachmentLocationInfoKHR' structure
                                         -- indicating the new mappings.
                                         RenderingAttachmentLocationInfoKHR
                                      -> io ()
cmdSetRenderingAttachmentLocationsKHR :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer -> RenderingAttachmentLocationInfoKHR -> io ()
cmdSetRenderingAttachmentLocationsKHR CommandBuffer
commandBuffer
                                        RenderingAttachmentLocationInfoKHR
locationInfo = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkCmdSetRenderingAttachmentLocationsKHRPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> Ptr RenderingAttachmentLocationInfoKHR -> IO ())
vkCmdSetRenderingAttachmentLocationsKHRPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> Ptr RenderingAttachmentLocationInfoKHR -> IO ())
pVkCmdSetRenderingAttachmentLocationsKHR (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> Ptr RenderingAttachmentLocationInfoKHR -> IO ())
vkCmdSetRenderingAttachmentLocationsKHRPtr FunPtr
  (Ptr CommandBuffer_T
   -> Ptr RenderingAttachmentLocationInfoKHR -> IO ())
-> FunPtr
     (Ptr CommandBuffer_T
      -> Ptr RenderingAttachmentLocationInfoKHR -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr CommandBuffer_T
   -> Ptr RenderingAttachmentLocationInfoKHR -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetRenderingAttachmentLocationsKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCmdSetRenderingAttachmentLocationsKHR' :: Ptr CommandBuffer_T
-> Ptr RenderingAttachmentLocationInfoKHR -> IO ()
vkCmdSetRenderingAttachmentLocationsKHR' = FunPtr
  (Ptr CommandBuffer_T
   -> Ptr RenderingAttachmentLocationInfoKHR -> IO ())
-> Ptr CommandBuffer_T
-> Ptr RenderingAttachmentLocationInfoKHR
-> IO ()
mkVkCmdSetRenderingAttachmentLocationsKHR FunPtr
  (Ptr CommandBuffer_T
   -> Ptr RenderingAttachmentLocationInfoKHR -> IO ())
vkCmdSetRenderingAttachmentLocationsKHRPtr
  Ptr RenderingAttachmentLocationInfoKHR
pLocationInfo <- ((Ptr RenderingAttachmentLocationInfoKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr RenderingAttachmentLocationInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr RenderingAttachmentLocationInfoKHR -> IO ()) -> IO ())
 -> ContT () IO (Ptr RenderingAttachmentLocationInfoKHR))
-> ((Ptr RenderingAttachmentLocationInfoKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr RenderingAttachmentLocationInfoKHR)
forall a b. (a -> b) -> a -> b
$ RenderingAttachmentLocationInfoKHR
-> (Ptr RenderingAttachmentLocationInfoKHR -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
RenderingAttachmentLocationInfoKHR
-> (Ptr RenderingAttachmentLocationInfoKHR -> IO b) -> IO b
withCStruct (RenderingAttachmentLocationInfoKHR
locationInfo)
  IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdSetRenderingAttachmentLocationsKHR" (Ptr CommandBuffer_T
-> Ptr RenderingAttachmentLocationInfoKHR -> IO ()
vkCmdSetRenderingAttachmentLocationsKHR'
                                                                       (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
                                                                       Ptr RenderingAttachmentLocationInfoKHR
pLocationInfo)
  () -> ContT () IO ()
forall a. a -> ContT () IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdSetRenderingInputAttachmentIndicesKHR
  :: FunPtr (Ptr CommandBuffer_T -> Ptr RenderingInputAttachmentIndexInfoKHR -> IO ()) -> Ptr CommandBuffer_T -> Ptr RenderingInputAttachmentIndexInfoKHR -> IO ()

-- | vkCmdSetRenderingInputAttachmentIndicesKHR - Set input attachment index
-- mappings for a command buffer
--
-- = Description
--
-- This command sets the input attachment index mappings for subsequent
-- drawing commands, and /must/ match the mappings provided to the bound
-- pipeline, if one is bound, which /can/ be set by chaining
-- 'RenderingInputAttachmentIndexInfoKHR' to
-- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo'.
--
-- Until this command is called, mappings in the command buffer state are
-- treated as each color attachment specified in
-- 'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.cmdBeginRendering'
-- mapping to subpass inputs with a @InputAttachmentIndex@ equal to its
-- index in
-- 'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.RenderingInfo'::@pColorAttachments@,
-- and depth\/stencil attachments mapping to input attachments without
-- these decorations. This state is reset whenever
-- 'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.cmdBeginRendering'
-- is called.
--
-- == Valid Usage
--
-- -   #VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-dynamicRenderingLocalRead-09516#
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-dynamicRenderingLocalRead dynamicRenderingLocalRead>
--     /must/ be enabled
--
-- -   #VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-pInputAttachmentIndexInfo-09517#
--     @pInputAttachmentIndexInfo->colorAttachmentCount@ /must/ be equal to
--     the value of
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.RenderingInfo'::@colorAttachmentCount@
--     used to begin the current render pass instance
--
-- -   #VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-commandBuffer-09518#
--     The current render pass instance /must/ have been started or resumed
--     by
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.cmdBeginRendering'
--     in this @commandBuffer@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-pInputAttachmentIndexInfo-parameter#
--     @pInputAttachmentIndexInfo@ /must/ be a valid pointer to a valid
--     'RenderingInputAttachmentIndexInfoKHR' structure
--
-- -   #VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-commandBuffer-recording#
--     @commandBuffer@ /must/ be in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>
--
-- -   #VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-commandBuffer-cmdpool#
--     The 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support graphics operations
--
-- -   #VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-renderpass# This
--     command /must/ only be called inside of a render pass instance
--
-- -   #VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-videocoding# This
--     command /must/ only be called outside of a video coding scope
--
-- == Host Synchronization
--
-- -   Host access to @commandBuffer@ /must/ be externally synchronized
--
-- -   Host access to the 'Vulkan.Core10.Handles.CommandPool' that
--     @commandBuffer@ was allocated from /must/ be externally synchronized
--
-- == Command Properties
--
-- \'
--
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginVideoCodingKHR Video Coding Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-queueoperation-command-types Command Type> |
-- +============================================================================================================================+========================================================================================================================+=============================================================================================================================+=======================================================================================================================+========================================================================================================================================+
-- | Primary                                                                                                                    | Inside                                                                                                                 | Outside                                                                                                                     | Graphics                                                                                                              | State                                                                                                                                  |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             |                                                                                                                       |                                                                                                                                        |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_dynamic_rendering_local_read VK_KHR_dynamic_rendering_local_read>,
-- 'Vulkan.Core10.Handles.CommandBuffer',
-- 'RenderingInputAttachmentIndexInfoKHR'
cmdSetRenderingInputAttachmentIndicesKHR :: forall io
                                          . (MonadIO io)
                                         => -- | @commandBuffer@ is the command buffer into which the command will be
                                            -- recorded.
                                            CommandBuffer
                                         -> -- | @pInputAttachmentIndexInfo@ is a 'RenderingInputAttachmentIndexInfoKHR'
                                            -- structure indicating the new mappings.
                                            RenderingInputAttachmentIndexInfoKHR
                                         -> io ()
cmdSetRenderingInputAttachmentIndicesKHR :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer -> RenderingInputAttachmentIndexInfoKHR -> io ()
cmdSetRenderingInputAttachmentIndicesKHR CommandBuffer
commandBuffer
                                           RenderingInputAttachmentIndexInfoKHR
inputAttachmentIndexInfo = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkCmdSetRenderingInputAttachmentIndicesKHRPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> Ptr RenderingInputAttachmentIndexInfoKHR -> IO ())
vkCmdSetRenderingInputAttachmentIndicesKHRPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> Ptr RenderingInputAttachmentIndexInfoKHR -> IO ())
pVkCmdSetRenderingInputAttachmentIndicesKHR (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> Ptr RenderingInputAttachmentIndexInfoKHR -> IO ())
vkCmdSetRenderingInputAttachmentIndicesKHRPtr FunPtr
  (Ptr CommandBuffer_T
   -> Ptr RenderingInputAttachmentIndexInfoKHR -> IO ())
-> FunPtr
     (Ptr CommandBuffer_T
      -> Ptr RenderingInputAttachmentIndexInfoKHR -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr CommandBuffer_T
   -> Ptr RenderingInputAttachmentIndexInfoKHR -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdSetRenderingInputAttachmentIndicesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCmdSetRenderingInputAttachmentIndicesKHR' :: Ptr CommandBuffer_T
-> Ptr RenderingInputAttachmentIndexInfoKHR -> IO ()
vkCmdSetRenderingInputAttachmentIndicesKHR' = FunPtr
  (Ptr CommandBuffer_T
   -> Ptr RenderingInputAttachmentIndexInfoKHR -> IO ())
-> Ptr CommandBuffer_T
-> Ptr RenderingInputAttachmentIndexInfoKHR
-> IO ()
mkVkCmdSetRenderingInputAttachmentIndicesKHR FunPtr
  (Ptr CommandBuffer_T
   -> Ptr RenderingInputAttachmentIndexInfoKHR -> IO ())
vkCmdSetRenderingInputAttachmentIndicesKHRPtr
  Ptr RenderingInputAttachmentIndexInfoKHR
pInputAttachmentIndexInfo <- ((Ptr RenderingInputAttachmentIndexInfoKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr RenderingInputAttachmentIndexInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr RenderingInputAttachmentIndexInfoKHR -> IO ()) -> IO ())
 -> ContT () IO (Ptr RenderingInputAttachmentIndexInfoKHR))
-> ((Ptr RenderingInputAttachmentIndexInfoKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr RenderingInputAttachmentIndexInfoKHR)
forall a b. (a -> b) -> a -> b
$ RenderingInputAttachmentIndexInfoKHR
-> (Ptr RenderingInputAttachmentIndexInfoKHR -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
RenderingInputAttachmentIndexInfoKHR
-> (Ptr RenderingInputAttachmentIndexInfoKHR -> IO b) -> IO b
withCStruct (RenderingInputAttachmentIndexInfoKHR
inputAttachmentIndexInfo)
  IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdSetRenderingInputAttachmentIndicesKHR" (Ptr CommandBuffer_T
-> Ptr RenderingInputAttachmentIndexInfoKHR -> IO ()
vkCmdSetRenderingInputAttachmentIndicesKHR'
                                                                          (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
                                                                          Ptr RenderingInputAttachmentIndexInfoKHR
pInputAttachmentIndexInfo)
  () -> ContT () IO ()
forall a. a -> ContT () IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()


-- | VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR - Structure
-- indicating support for local reads in dynamic render pass instances
--
-- = Members
--
-- This structure describes the following feature:
--
-- = Description
--
-- If the 'PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR' structure is
-- included in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceFeatures2',
-- it is filled in to indicate whether each corresponding feature is
-- supported. 'PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR' /can/
-- also be used in the @pNext@ chain of
-- 'Vulkan.Core10.Device.DeviceCreateInfo' to selectively enable these
-- features.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_dynamic_rendering_local_read VK_KHR_dynamic_rendering_local_read>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR = PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
  { -- | #features-dynamicRenderingLocalRead# @dynamicRenderingLocalRead@
    -- specifies that the implementation supports local reads inside dynamic
    -- render pass instances using the
    -- 'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.cmdBeginRendering'
    -- command.
    PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> Bool
dynamicRenderingLocalRead :: Bool }
  deriving (Typeable, PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> Bool
(PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
 -> PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> Bool)
-> (PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
    -> PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> Bool)
-> Eq PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> Bool
== :: PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> Bool
$c/= :: PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> Bool
/= :: PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR)
#endif
deriving instance Show PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR

instance ToCStruct PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR where
  withCStruct :: forall b.
PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> (Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> IO b)
-> IO b
withCStruct PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
x Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> IO b
f = Int
-> (Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> IO b)
 -> IO b)
-> (Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
p -> Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> IO b
-> IO b
forall b.
Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
p PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
x (Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> IO b
f Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> IO b
-> IO b
pokeCStruct Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
p PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR{Bool
$sel:dynamicRenderingLocalRead:PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR :: PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR -> Bool
dynamicRenderingLocalRead :: Bool
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
p Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
p Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
p Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
dynamicRenderingLocalRead))
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
p Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
p Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
p Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR where
  peekCStruct :: Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> IO PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
peekCStruct Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
p = do
    Bool32
dynamicRenderingLocalRead <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
p Ptr PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> IO PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
 -> IO PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR)
-> PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
-> IO PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR
             (Bool32 -> Bool
bool32ToBool Bool32
dynamicRenderingLocalRead)

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

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


-- | VkRenderingAttachmentLocationInfoKHR - Structure specifying attachment
-- locations
--
-- = Description
--
-- This structure allows applications to remap the locations of color
-- attachments to different fragment shader output locations.
--
-- Each element of @pColorAttachmentLocations@ set to
-- 'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED' will be inaccessible to
-- this pipeline as a color attachment; no location will map to it. Each
-- element of @pColorAttachmentLocations@ set to any other value will map
-- the specified location value to the color attachment specified in the
-- render pass at the corresponding index in the
-- @pColorAttachmentLocations@ array. Any writes to a fragment output
-- location that is not mapped to an attachment /must/ be discarded.
--
-- If @pColorAttachmentLocations@ is @NULL@, it is equivalent to setting
-- each element to its index within the array.
--
-- This structure /can/ be included in the @pNext@ chain of a
-- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' structure to set
-- this state for a pipeline. If this structure is not included in the
-- @pNext@ chain of 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo', it
-- is equivalent to specifying this structure with the following
-- properties:
--
-- -   @colorAttachmentCount@ set to
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@colorAttachmentCount@.
--
-- -   @pColorAttachmentLocations@ set to @NULL@.
--
-- This structure /can/ be included in the @pNext@ chain of a
-- 'Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo' structure to
-- specify inherited state from the primary command buffer. If
-- 'Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo'::renderPass
-- is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', or
-- 'Vulkan.Core10.Enums.CommandBufferUsageFlagBits.COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT'
-- is not specified in
-- 'Vulkan.Core10.CommandBuffer.CommandBufferBeginInfo'::flags, members of
-- this structure are ignored. If this structure is not included in the
-- @pNext@ chain of
-- 'Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo', it is
-- equivalent to specifying this structure with the following properties:
--
-- -   @colorAttachmentCount@ set to
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.CommandBufferInheritanceRenderingInfo'::@colorAttachmentCount@.
--
-- -   @pColorAttachmentLocations@ set to @NULL@.
--
-- == Valid Usage
--
-- -   #VUID-VkRenderingAttachmentLocationInfoKHR-dynamicRenderingLocalRead-09512#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-dynamicRenderingLocalRead dynamicRenderingLocalRead>
--     feature is not enabled, and @pColorAttachmentLocations@ is not
--     @NULL@, each element /must/ be the value of its index within the
--     array
--
-- -   #VUID-VkRenderingAttachmentLocationInfoKHR-pColorAttachmentLocations-09513#
--     Elements of @pColorAttachmentLocations@ that are not
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED' /must/ each be unique
--
-- -   #VUID-VkRenderingAttachmentLocationInfoKHR-colorAttachmentCount-09514#
--     @colorAttachmentCount@ /must/ be less than or equal to
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxColorAttachments maxColorAttachments>
--
-- -   #VUID-VkRenderingAttachmentLocationInfoKHR-pColorAttachmentLocations-09515#
--     Each element of @pColorAttachmentLocations@ /must/ be less than
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxColorAttachments maxColorAttachments>
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkRenderingAttachmentLocationInfoKHR-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_dynamic_rendering_local_read VK_KHR_dynamic_rendering_local_read>,
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'cmdSetRenderingAttachmentLocationsKHR'
data RenderingAttachmentLocationInfoKHR = RenderingAttachmentLocationInfoKHR
  { -- | @pColorAttachmentLocations@ is a pointer to an array of
    -- @colorAttachmentCount@ @uint32_t@ values defining remapped locations for
    -- color attachments.
    RenderingAttachmentLocationInfoKHR -> Vector Word32
colorAttachmentLocations :: Vector Word32 }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (RenderingAttachmentLocationInfoKHR)
#endif
deriving instance Show RenderingAttachmentLocationInfoKHR

instance ToCStruct RenderingAttachmentLocationInfoKHR where
  withCStruct :: forall b.
RenderingAttachmentLocationInfoKHR
-> (Ptr RenderingAttachmentLocationInfoKHR -> IO b) -> IO b
withCStruct RenderingAttachmentLocationInfoKHR
x Ptr RenderingAttachmentLocationInfoKHR -> IO b
f = Int -> (Ptr RenderingAttachmentLocationInfoKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr RenderingAttachmentLocationInfoKHR -> IO b) -> IO b)
-> (Ptr RenderingAttachmentLocationInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr RenderingAttachmentLocationInfoKHR
p -> Ptr RenderingAttachmentLocationInfoKHR
-> RenderingAttachmentLocationInfoKHR -> IO b -> IO b
forall b.
Ptr RenderingAttachmentLocationInfoKHR
-> RenderingAttachmentLocationInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RenderingAttachmentLocationInfoKHR
p RenderingAttachmentLocationInfoKHR
x (Ptr RenderingAttachmentLocationInfoKHR -> IO b
f Ptr RenderingAttachmentLocationInfoKHR
p)
  pokeCStruct :: forall b.
Ptr RenderingAttachmentLocationInfoKHR
-> RenderingAttachmentLocationInfoKHR -> IO b -> IO b
pokeCStruct Ptr RenderingAttachmentLocationInfoKHR
p RenderingAttachmentLocationInfoKHR{Vector Word32
$sel:colorAttachmentLocations:RenderingAttachmentLocationInfoKHR :: RenderingAttachmentLocationInfoKHR -> Vector Word32
colorAttachmentLocations :: Vector Word32
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingAttachmentLocationInfoKHR
p Ptr RenderingAttachmentLocationInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR)
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingAttachmentLocationInfoKHR
p Ptr RenderingAttachmentLocationInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingAttachmentLocationInfoKHR
p Ptr RenderingAttachmentLocationInfoKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) ((Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector Word32 -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Word32 -> Int) -> Vector Word32 -> Int
forall a b. (a -> b) -> a -> b
$ (Vector Word32
colorAttachmentLocations)) :: Word32))
    Ptr Word32
pPColorAttachmentLocations' <- ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32))
-> ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Word32 ((Vector Word32 -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Word32
colorAttachmentLocations)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
4)
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Word32 -> IO ()) -> Vector Word32 -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Word32
e -> Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Word32
pPColorAttachmentLocations' Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Word32
e)) (Vector Word32
colorAttachmentLocations)
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Word32) -> Ptr Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingAttachmentLocationInfoKHR
p Ptr RenderingAttachmentLocationInfoKHR -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Word32))) (Ptr Word32
pPColorAttachmentLocations')
    IO b -> ContT b IO b
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr RenderingAttachmentLocationInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr RenderingAttachmentLocationInfoKHR
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingAttachmentLocationInfoKHR
p Ptr RenderingAttachmentLocationInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingAttachmentLocationInfoKHR
p Ptr RenderingAttachmentLocationInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    IO b
f

instance FromCStruct RenderingAttachmentLocationInfoKHR where
  peekCStruct :: Ptr RenderingAttachmentLocationInfoKHR
-> IO RenderingAttachmentLocationInfoKHR
peekCStruct Ptr RenderingAttachmentLocationInfoKHR
p = do
    Word32
colorAttachmentCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RenderingAttachmentLocationInfoKHR
p Ptr RenderingAttachmentLocationInfoKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
    Ptr Word32
pColorAttachmentLocations <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) ((Ptr RenderingAttachmentLocationInfoKHR
p Ptr RenderingAttachmentLocationInfoKHR -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Word32)))
    Vector Word32
pColorAttachmentLocations' <- Int -> (Int -> IO Word32) -> IO (Vector Word32)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
colorAttachmentCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr Word32
pColorAttachmentLocations Ptr Word32 -> Int -> Ptr Word32
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
    RenderingAttachmentLocationInfoKHR
-> IO RenderingAttachmentLocationInfoKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (RenderingAttachmentLocationInfoKHR
 -> IO RenderingAttachmentLocationInfoKHR)
-> RenderingAttachmentLocationInfoKHR
-> IO RenderingAttachmentLocationInfoKHR
forall a b. (a -> b) -> a -> b
$ Vector Word32 -> RenderingAttachmentLocationInfoKHR
RenderingAttachmentLocationInfoKHR
             Vector Word32
pColorAttachmentLocations'

instance Zero RenderingAttachmentLocationInfoKHR where
  zero :: RenderingAttachmentLocationInfoKHR
zero = Vector Word32 -> RenderingAttachmentLocationInfoKHR
RenderingAttachmentLocationInfoKHR
           Vector Word32
forall a. Monoid a => a
mempty


-- | VkRenderingInputAttachmentIndexInfoKHR - Structure specifying input
-- attachment indices
--
-- = Description
--
-- This structure allows applications to remap attachments to different
-- input attachment indices.
--
-- Each element of @pColorAttachmentInputIndices@ set to a value of
-- 'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED' indicates that the
-- corresponding attachment will not be used as an input attachment in this
-- pipeline. Any other value in each of those elements will map the
-- corresponding attachment to a @InputAttachmentIndex@ value defined in
-- shader code.
--
-- If @pColorAttachmentInputIndices@ is @NULL@, it is equivalent to setting
-- each element to its index within the array.
--
-- If @pDepthInputAttachmentIndex@ or @pStencilInputAttachmentIndex@ are
-- set to @NULL@, they map to input attachments without a
-- @InputAttachmentIndex@ decoration. If they point to a value of
-- 'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', it indicates that the
-- corresponding attachment will not be used as an input attachment in this
-- pipeline. If they point to any other value it maps the corresponding
-- attachment to a @InputAttachmentIndex@ value defined in shader code.
--
-- This structure /can/ be included in the @pNext@ chain of a
-- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' structure to set
-- this state for a pipeline. If this structure is not included in the
-- @pNext@ chain of 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo', it
-- is equivalent to specifying this structure with the following
-- properties:
--
-- -   @colorAttachmentCount@ set to
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.PipelineRenderingCreateInfo'::@colorAttachmentCount@.
--
-- -   @pColorAttachmentInputIndices@ set to @NULL@.
--
-- -   @pDepthInputAttachmentIndex@ set to @NULL@.
--
-- -   @pStencilInputAttachmentIndex@ set to @NULL@.
--
-- This structure /can/ be included in the @pNext@ chain of a
-- 'Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo' structure to
-- specify inherited state from the primary command buffer. If this
-- structure is not included in the @pNext@ chain of
-- 'Vulkan.Core10.CommandBuffer.CommandBufferInheritanceInfo', it is
-- equivalent to specifying this structure with the following properties:
--
-- -   @colorAttachmentCount@ set to
--     'Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering.CommandBufferInheritanceRenderingInfo'::@colorAttachmentCount@.
--
-- -   @pColorAttachmentInputIndices@ set to @NULL@.
--
-- -   @pDepthInputAttachmentIndex@ set to @NULL@.
--
-- -   @pStencilInputAttachmentIndex@ set to @NULL@.
--
-- == Valid Usage
--
-- -   #VUID-VkRenderingInputAttachmentIndexInfoKHR-dynamicRenderingLocalRead-09519#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-dynamicRenderingLocalRead dynamicRenderingLocalRead>
--     feature is not enabled, and @pColorAttachmentInputIndices@ is not
--     @NULL@, each element /must/ be
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED'
--
-- -   #VUID-VkRenderingInputAttachmentIndexInfoKHR-dynamicRenderingLocalRead-09520#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-dynamicRenderingLocalRead dynamicRenderingLocalRead>
--     feature is not enabled, @pDepthInputAttachmentIndex@ /must/ be a
--     valid pointer to a value of
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED'
--
-- -   #VUID-VkRenderingInputAttachmentIndexInfoKHR-dynamicRenderingLocalRead-09521#
--     If the
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#features-dynamicRenderingLocalRead dynamicRenderingLocalRead>
--     feature is not enabled, @pStencilInputAttachmentIndex@ /must/ be a
--     valid pointer to a value of
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED'
--
-- -   #VUID-VkRenderingInputAttachmentIndexInfoKHR-pColorAttachmentInputIndices-09522#
--     Elements of @pColorAttachmentInputIndices@ that are not
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED' /must/ each be unique
--
-- -   #VUID-VkRenderingInputAttachmentIndexInfoKHR-pColorAttachmentInputIndices-09523#
--     Elements of @pColorAttachmentInputIndices@ that are not
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED' /must/ not take the
--     same value as the content of @pDepthInputAttachmentIndex@
--
-- -   #VUID-VkRenderingInputAttachmentIndexInfoKHR-pColorAttachmentInputIndices-09524#
--     Elements of @pColorAttachmentInputIndices@ that are not
--     'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED' /must/ not take the
--     same value as the content of @pStencilInputAttachmentIndex@
--
-- -   #VUID-VkRenderingInputAttachmentIndexInfoKHR-colorAttachmentCount-09525#
--     @colorAttachmentCount@ /must/ be less than or equal to
--     <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxColorAttachments maxColorAttachments>
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkRenderingInputAttachmentIndexInfoKHR-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR'
--
-- -   #VUID-VkRenderingInputAttachmentIndexInfoKHR-pColorAttachmentInputIndices-parameter#
--     If @colorAttachmentCount@ is not @0@, and
--     @pColorAttachmentInputIndices@ is not @NULL@,
--     @pColorAttachmentInputIndices@ /must/ be a valid pointer to an array
--     of @colorAttachmentCount@ @uint32_t@ values
--
-- -   #VUID-VkRenderingInputAttachmentIndexInfoKHR-pDepthInputAttachmentIndex-parameter#
--     If @pDepthInputAttachmentIndex@ is not @NULL@,
--     @pDepthInputAttachmentIndex@ /must/ be a valid pointer to a valid
--     @uint32_t@ value
--
-- -   #VUID-VkRenderingInputAttachmentIndexInfoKHR-pStencilInputAttachmentIndex-parameter#
--     If @pStencilInputAttachmentIndex@ is not @NULL@,
--     @pStencilInputAttachmentIndex@ /must/ be a valid pointer to a valid
--     @uint32_t@ value
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_dynamic_rendering_local_read VK_KHR_dynamic_rendering_local_read>,
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'cmdSetRenderingInputAttachmentIndicesKHR'
data RenderingInputAttachmentIndexInfoKHR = RenderingInputAttachmentIndexInfoKHR
  { -- | @colorAttachmentCount@ is the number of elements in
    -- @pColorAttachmentInputIndices@.
    RenderingInputAttachmentIndexInfoKHR -> Word32
colorAttachmentCount :: Word32
  , -- | @pColorAttachmentInputIndices@ is a pointer to an array of
    -- @colorAttachmentCount@ @uint32_t@ values defining indices for color
    -- attachments to be used as input attachments.
    RenderingInputAttachmentIndexInfoKHR -> Vector Word32
colorAttachmentInputIndices :: Vector Word32
  , -- | @pDepthInputAttachmentIndex@ is either @NULL@, or a pointer to a
    -- @uint32_t@ value defining the index for the depth attachment to be used
    -- as an input attachment.
    RenderingInputAttachmentIndexInfoKHR -> Maybe Word32
depthInputAttachmentIndex :: Maybe Word32
  , -- | @pStencilInputAttachmentIndex@ is either @NULL@, or a pointer to a
    -- @uint32_t@ value defining the index for the stencil attachment to be
    -- used as an input attachment.
    RenderingInputAttachmentIndexInfoKHR -> Maybe Word32
stencilInputAttachmentIndex :: Maybe Word32
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (RenderingInputAttachmentIndexInfoKHR)
#endif
deriving instance Show RenderingInputAttachmentIndexInfoKHR

instance ToCStruct RenderingInputAttachmentIndexInfoKHR where
  withCStruct :: forall b.
RenderingInputAttachmentIndexInfoKHR
-> (Ptr RenderingInputAttachmentIndexInfoKHR -> IO b) -> IO b
withCStruct RenderingInputAttachmentIndexInfoKHR
x Ptr RenderingInputAttachmentIndexInfoKHR -> IO b
f = Int -> (Ptr RenderingInputAttachmentIndexInfoKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 ((Ptr RenderingInputAttachmentIndexInfoKHR -> IO b) -> IO b)
-> (Ptr RenderingInputAttachmentIndexInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr RenderingInputAttachmentIndexInfoKHR
p -> Ptr RenderingInputAttachmentIndexInfoKHR
-> RenderingInputAttachmentIndexInfoKHR -> IO b -> IO b
forall b.
Ptr RenderingInputAttachmentIndexInfoKHR
-> RenderingInputAttachmentIndexInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RenderingInputAttachmentIndexInfoKHR
p RenderingInputAttachmentIndexInfoKHR
x (Ptr RenderingInputAttachmentIndexInfoKHR -> IO b
f Ptr RenderingInputAttachmentIndexInfoKHR
p)
  pokeCStruct :: forall b.
Ptr RenderingInputAttachmentIndexInfoKHR
-> RenderingInputAttachmentIndexInfoKHR -> IO b -> IO b
pokeCStruct Ptr RenderingInputAttachmentIndexInfoKHR
p RenderingInputAttachmentIndexInfoKHR{Maybe Word32
Word32
Vector Word32
$sel:colorAttachmentCount:RenderingInputAttachmentIndexInfoKHR :: RenderingInputAttachmentIndexInfoKHR -> Word32
$sel:colorAttachmentInputIndices:RenderingInputAttachmentIndexInfoKHR :: RenderingInputAttachmentIndexInfoKHR -> Vector Word32
$sel:depthInputAttachmentIndex:RenderingInputAttachmentIndexInfoKHR :: RenderingInputAttachmentIndexInfoKHR -> Maybe Word32
$sel:stencilInputAttachmentIndex:RenderingInputAttachmentIndexInfoKHR :: RenderingInputAttachmentIndexInfoKHR -> Maybe Word32
colorAttachmentCount :: Word32
colorAttachmentInputIndices :: Vector Word32
depthInputAttachmentIndex :: Maybe Word32
stencilInputAttachmentIndex :: Maybe Word32
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingInputAttachmentIndexInfoKHR
p Ptr RenderingInputAttachmentIndexInfoKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR)
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingInputAttachmentIndexInfoKHR
p Ptr RenderingInputAttachmentIndexInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    let pColorAttachmentInputIndicesLength :: Int
pColorAttachmentInputIndicesLength = Vector Word32 -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Word32 -> Int) -> Vector Word32 -> Int
forall a b. (a -> b) -> a -> b
$ (Vector Word32
colorAttachmentInputIndices)
    Word32
colorAttachmentCount'' <- IO Word32 -> ContT b IO Word32
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Word32 -> ContT b IO Word32) -> IO Word32 -> ContT b IO Word32
forall a b. (a -> b) -> a -> b
$ if (Word32
colorAttachmentCount) Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
== Word32
0
      then Word32 -> IO Word32
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Word32 -> IO Word32) -> Word32 -> IO Word32
forall a b. (a -> b) -> a -> b
$ Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pColorAttachmentInputIndicesLength
      else do
        Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pColorAttachmentInputIndicesLength Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
== (Word32
colorAttachmentCount) Bool -> Bool -> Bool
|| Int
pColorAttachmentInputIndicesLength Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Int
0) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
          IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"pColorAttachmentInputIndices must be empty or have 'colorAttachmentCount' elements" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
        Word32 -> IO Word32
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Word32
colorAttachmentCount)
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingInputAttachmentIndexInfoKHR
p Ptr RenderingInputAttachmentIndexInfoKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
colorAttachmentCount'')
    Ptr Word32
pColorAttachmentInputIndices'' <- if Vector Word32 -> Bool
forall a. Vector a -> Bool
Data.Vector.null (Vector Word32
colorAttachmentInputIndices)
      then Ptr Word32 -> ContT b IO (Ptr Word32)
forall a. a -> ContT b IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr Word32
forall a. Ptr a
nullPtr
      else do
        Ptr Word32
pPColorAttachmentInputIndices <- ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32))
-> ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Word32 (((Vector Word32 -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Word32
colorAttachmentInputIndices))) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
4)
        IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Word32 -> IO ()) -> Vector Word32 -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Word32
e -> Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Word32
pPColorAttachmentInputIndices Ptr Word32 -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Word32
e)) ((Vector Word32
colorAttachmentInputIndices))
        Ptr Word32 -> ContT b IO (Ptr Word32)
forall a. a -> ContT b IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Ptr Word32 -> ContT b IO (Ptr Word32))
-> Ptr Word32 -> ContT b IO (Ptr Word32)
forall a b. (a -> b) -> a -> b
$ Ptr Word32
pPColorAttachmentInputIndices
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Word32) -> Ptr Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingInputAttachmentIndexInfoKHR
p Ptr RenderingInputAttachmentIndexInfoKHR -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Word32))) Ptr Word32
pColorAttachmentInputIndices''
    Ptr Word32
pDepthInputAttachmentIndex'' <- case (Maybe Word32
depthInputAttachmentIndex) of
      Maybe Word32
Nothing -> Ptr Word32 -> ContT b IO (Ptr Word32)
forall a. a -> ContT b IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr Word32
forall a. Ptr a
nullPtr
      Just Word32
j -> ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32))
-> ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall a b. (a -> b) -> a -> b
$ Word32 -> (Ptr Word32 -> IO b) -> IO b
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with (Word32
j)
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Word32) -> Ptr Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingInputAttachmentIndexInfoKHR
p Ptr RenderingInputAttachmentIndexInfoKHR -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr Word32))) Ptr Word32
pDepthInputAttachmentIndex''
    Ptr Word32
pStencilInputAttachmentIndex'' <- case (Maybe Word32
stencilInputAttachmentIndex) of
      Maybe Word32
Nothing -> Ptr Word32 -> ContT b IO (Ptr Word32)
forall a. a -> ContT b IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr Word32
forall a. Ptr a
nullPtr
      Just Word32
j -> ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32))
-> ((Ptr Word32 -> IO b) -> IO b) -> ContT b IO (Ptr Word32)
forall a b. (a -> b) -> a -> b
$ Word32 -> (Ptr Word32 -> IO b) -> IO b
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with (Word32
j)
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Word32) -> Ptr Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingInputAttachmentIndexInfoKHR
p Ptr RenderingInputAttachmentIndexInfoKHR -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr Word32))) Ptr Word32
pStencilInputAttachmentIndex''
    IO b -> ContT b IO b
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = Int
48
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr RenderingInputAttachmentIndexInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr RenderingInputAttachmentIndexInfoKHR
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingInputAttachmentIndexInfoKHR
p Ptr RenderingInputAttachmentIndexInfoKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderingInputAttachmentIndexInfoKHR
p Ptr RenderingInputAttachmentIndexInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    IO b
f

instance FromCStruct RenderingInputAttachmentIndexInfoKHR where
  peekCStruct :: Ptr RenderingInputAttachmentIndexInfoKHR
-> IO RenderingInputAttachmentIndexInfoKHR
peekCStruct Ptr RenderingInputAttachmentIndexInfoKHR
p = do
    Word32
colorAttachmentCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RenderingInputAttachmentIndexInfoKHR
p Ptr RenderingInputAttachmentIndexInfoKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
    Ptr Word32
pColorAttachmentInputIndices <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) ((Ptr RenderingInputAttachmentIndexInfoKHR
p Ptr RenderingInputAttachmentIndexInfoKHR -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Word32)))
    let pColorAttachmentInputIndicesLength :: Int
pColorAttachmentInputIndicesLength = if Ptr Word32
pColorAttachmentInputIndices Ptr Word32 -> Ptr Word32 -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr Word32
forall a. Ptr a
nullPtr then Int
0 else (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
colorAttachmentCount)
    Vector Word32
pColorAttachmentInputIndices' <- Int -> (Int -> IO Word32) -> IO (Vector Word32)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM Int
pColorAttachmentInputIndicesLength (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr Word32
pColorAttachmentInputIndices Ptr Word32 -> Int -> Ptr Word32
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
    Ptr Word32
pDepthInputAttachmentIndex <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) ((Ptr RenderingInputAttachmentIndexInfoKHR
p Ptr RenderingInputAttachmentIndexInfoKHR -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr Word32)))
    Maybe Word32
pDepthInputAttachmentIndex' <- (Ptr Word32 -> IO Word32) -> Ptr Word32 -> IO (Maybe Word32)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr Word32
j -> forall a. Storable a => Ptr a -> IO a
peek @Word32 (Ptr Word32
j)) Ptr Word32
pDepthInputAttachmentIndex
    Ptr Word32
pStencilInputAttachmentIndex <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) ((Ptr RenderingInputAttachmentIndexInfoKHR
p Ptr RenderingInputAttachmentIndexInfoKHR -> Int -> Ptr (Ptr Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr Word32)))
    Maybe Word32
pStencilInputAttachmentIndex' <- (Ptr Word32 -> IO Word32) -> Ptr Word32 -> IO (Maybe Word32)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr Word32
j -> forall a. Storable a => Ptr a -> IO a
peek @Word32 (Ptr Word32
j)) Ptr Word32
pStencilInputAttachmentIndex
    RenderingInputAttachmentIndexInfoKHR
-> IO RenderingInputAttachmentIndexInfoKHR
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (RenderingInputAttachmentIndexInfoKHR
 -> IO RenderingInputAttachmentIndexInfoKHR)
-> RenderingInputAttachmentIndexInfoKHR
-> IO RenderingInputAttachmentIndexInfoKHR
forall a b. (a -> b) -> a -> b
$ Word32
-> Vector Word32
-> Maybe Word32
-> Maybe Word32
-> RenderingInputAttachmentIndexInfoKHR
RenderingInputAttachmentIndexInfoKHR
             Word32
colorAttachmentCount
             Vector Word32
pColorAttachmentInputIndices'
             Maybe Word32
pDepthInputAttachmentIndex'
             Maybe Word32
pStencilInputAttachmentIndex'

instance Zero RenderingInputAttachmentIndexInfoKHR where
  zero :: RenderingInputAttachmentIndexInfoKHR
zero = Word32
-> Vector Word32
-> Maybe Word32
-> Maybe Word32
-> RenderingInputAttachmentIndexInfoKHR
RenderingInputAttachmentIndexInfoKHR
           Word32
forall a. Zero a => a
zero
           Vector Word32
forall a. Monoid a => a
mempty
           Maybe Word32
forall a. Maybe a
Nothing
           Maybe Word32
forall a. Maybe a
Nothing


type KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION"
pattern KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION :: forall a . Integral a => a
pattern $mKHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bKHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION :: forall a. Integral a => a
KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION = 1


type KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME = "VK_KHR_dynamic_rendering_local_read"

-- No documentation found for TopLevel "VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME"
pattern KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mKHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bKHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME = "VK_KHR_dynamic_rendering_local_read"