{-# language CPP #-}
-- | = Name
--
-- VK_EXT_subpass_merge_feedback - device extension
--
-- == VK_EXT_subpass_merge_feedback
--
-- [__Name String__]
--     @VK_EXT_subpass_merge_feedback@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     459
--
-- [__Revision__]
--     2
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_get_physical_device_properties2 VK_KHR_get_physical_device_properties2>
--
-- [__Contact__]
--
--     -   Ting Wei
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_EXT_subpass_merge_feedback] @catweiting%0A*Here describe the issue or question you have about the VK_EXT_subpass_merge_feedback extension* >
--
-- [__Extension Proposal__]
--     <https://github.com/KhronosGroup/Vulkan-Docs/tree/main/proposals/VK_EXT_subpass_merge_feedback.adoc VK_EXT_subpass_merge_feedback>
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2022-05-24
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Contributors__]
--
--     -   Jan-Harald Fredriksen, Arm
--
--     -   Jorg Wagner, Arm
--
--     -   Ting Wei, Arm
--
-- == Description
--
-- This extension adds a mechanism to provide feedback to an application
-- about whether the subpasses specified on render pass creation are merged
-- by the implementation. Additionally, it provides a control to enable or
-- disable subpass merging in the render pass.
--
-- == New Structures
--
-- -   'RenderPassCreationFeedbackInfoEXT'
--
-- -   'RenderPassSubpassFeedbackInfoEXT'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceSubpassMergeFeedbackFeaturesEXT'
--
-- -   Extending
--     'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.RenderPassCreateInfo2':
--
--     -   'RenderPassCreationFeedbackCreateInfoEXT'
--
-- -   Extending
--     'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.RenderPassCreateInfo2',
--     'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.SubpassDescription2':
--
--     -   'RenderPassCreationControlEXT'
--
-- -   Extending
--     'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.SubpassDescription2':
--
--     -   'RenderPassSubpassFeedbackCreateInfoEXT'
--
-- == New Enums
--
-- -   'SubpassMergeStatusEXT'
--
-- == New Enum Constants
--
-- -   'EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME'
--
-- -   'EXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_RENDER_PASS_CREATION_CONTROL_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT'
--
-- == Version History
--
-- -   Revision 1, 2022-03-10
--
--     -   Initial draft.
--
-- -   Revision 2, 2022-05-24
--
--     -   Fix structextends and constness issues.
--
-- == See Also
--
-- 'PhysicalDeviceSubpassMergeFeedbackFeaturesEXT',
-- 'RenderPassCreationControlEXT',
-- 'RenderPassCreationFeedbackCreateInfoEXT',
-- 'RenderPassCreationFeedbackInfoEXT',
-- 'RenderPassSubpassFeedbackCreateInfoEXT',
-- 'RenderPassSubpassFeedbackInfoEXT', 'SubpassMergeStatusEXT'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_EXT_subpass_merge_feedback Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_EXT_subpass_merge_feedback  ( RenderPassCreationControlEXT(..)
                                                        , RenderPassCreationFeedbackInfoEXT(..)
                                                        , RenderPassCreationFeedbackCreateInfoEXT(..)
                                                        , RenderPassSubpassFeedbackInfoEXT(..)
                                                        , RenderPassSubpassFeedbackCreateInfoEXT(..)
                                                        , PhysicalDeviceSubpassMergeFeedbackFeaturesEXT(..)
                                                        , SubpassMergeStatusEXT( SUBPASS_MERGE_STATUS_MERGED_EXT
                                                                               , SUBPASS_MERGE_STATUS_DISALLOWED_EXT
                                                                               , SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT
                                                                               , SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT
                                                                               , SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT
                                                                               , SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT
                                                                               , SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT
                                                                               , SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT
                                                                               , SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT
                                                                               , SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT
                                                                               , SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT
                                                                               , SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT
                                                                               , SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT
                                                                               , SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT
                                                                               , ..
                                                                               )
                                                        , EXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION
                                                        , pattern EXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION
                                                        , EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME
                                                        , pattern EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME
                                                        ) where

import Vulkan.CStruct.Utils (FixedArray)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showsPrec)
import Data.ByteString (packCString)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.C.Types (CChar)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import Data.Int (Int32)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.ByteString (ByteString)
import Data.Kind (Type)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Utils (lowerArrayPtr)
import Vulkan.CStruct.Utils (pokeFixedLengthNullTerminatedByteString)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.APIConstants (MAX_DESCRIPTION_SIZE)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RENDER_PASS_CREATION_CONTROL_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT))
-- | VkRenderPassCreationControlEXT - Control about the creation of render
-- pass or subpass
--
-- = Description
--
-- If a 'RenderPassCreationControlEXT' structure is included in the @pNext@
-- chain of
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.RenderPassCreateInfo2'
-- and its value of @disallowMerging@ is
-- 'Vulkan.Core10.FundamentalTypes.TRUE', the implementation will disable
-- subpass merging for the entire render pass. If a
-- 'RenderPassCreationControlEXT' structure is included in the @pNext@
-- chain of
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.SubpassDescription2'
-- and its value of @disallowMerging@ is
-- 'Vulkan.Core10.FundamentalTypes.TRUE', the implementation will disable
-- merging the described subpass with previous subpasses in the render
-- pass.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_subpass_merge_feedback VK_EXT_subpass_merge_feedback>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.RenderPassCreateInfo2',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.SubpassDescription2',
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.createRenderPass2'
data RenderPassCreationControlEXT = RenderPassCreationControlEXT
  { -- | @disallowMerging@ is a boolean value indicating whether subpass merging
    -- will be disabled.
    RenderPassCreationControlEXT -> Bool
disallowMerging :: Bool }
  deriving (Typeable, RenderPassCreationControlEXT
-> RenderPassCreationControlEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RenderPassCreationControlEXT
-> RenderPassCreationControlEXT -> Bool
$c/= :: RenderPassCreationControlEXT
-> RenderPassCreationControlEXT -> Bool
== :: RenderPassCreationControlEXT
-> RenderPassCreationControlEXT -> Bool
$c== :: RenderPassCreationControlEXT
-> RenderPassCreationControlEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (RenderPassCreationControlEXT)
#endif
deriving instance Show RenderPassCreationControlEXT

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

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

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

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


-- | VkRenderPassCreationFeedbackInfoEXT - Feedback about the creation of a
-- render pass
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_subpass_merge_feedback VK_EXT_subpass_merge_feedback>,
-- 'RenderPassCreationFeedbackCreateInfoEXT'
data RenderPassCreationFeedbackInfoEXT = RenderPassCreationFeedbackInfoEXT
  { -- | @postMergeSubpassCount@ is the subpass count after merge.
    RenderPassCreationFeedbackInfoEXT -> Word32
postMergeSubpassCount :: Word32 }
  deriving (Typeable, RenderPassCreationFeedbackInfoEXT
-> RenderPassCreationFeedbackInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RenderPassCreationFeedbackInfoEXT
-> RenderPassCreationFeedbackInfoEXT -> Bool
$c/= :: RenderPassCreationFeedbackInfoEXT
-> RenderPassCreationFeedbackInfoEXT -> Bool
== :: RenderPassCreationFeedbackInfoEXT
-> RenderPassCreationFeedbackInfoEXT -> Bool
$c== :: RenderPassCreationFeedbackInfoEXT
-> RenderPassCreationFeedbackInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (RenderPassCreationFeedbackInfoEXT)
#endif
deriving instance Show RenderPassCreationFeedbackInfoEXT

instance ToCStruct RenderPassCreationFeedbackInfoEXT where
  withCStruct :: forall b.
RenderPassCreationFeedbackInfoEXT
-> (Ptr RenderPassCreationFeedbackInfoEXT -> IO b) -> IO b
withCStruct RenderPassCreationFeedbackInfoEXT
x Ptr RenderPassCreationFeedbackInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
4 forall a b. (a -> b) -> a -> b
$ \Ptr RenderPassCreationFeedbackInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RenderPassCreationFeedbackInfoEXT
p RenderPassCreationFeedbackInfoEXT
x (Ptr RenderPassCreationFeedbackInfoEXT -> IO b
f Ptr RenderPassCreationFeedbackInfoEXT
p)
  pokeCStruct :: forall b.
Ptr RenderPassCreationFeedbackInfoEXT
-> RenderPassCreationFeedbackInfoEXT -> IO b -> IO b
pokeCStruct Ptr RenderPassCreationFeedbackInfoEXT
p RenderPassCreationFeedbackInfoEXT{Word32
postMergeSubpassCount :: Word32
$sel:postMergeSubpassCount:RenderPassCreationFeedbackInfoEXT :: RenderPassCreationFeedbackInfoEXT -> Word32
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassCreationFeedbackInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Word32
postMergeSubpassCount)
    IO b
f
  cStructSize :: Int
cStructSize = Int
4
  cStructAlignment :: Int
cStructAlignment = Int
4
  pokeZeroCStruct :: forall b. Ptr RenderPassCreationFeedbackInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr RenderPassCreationFeedbackInfoEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassCreationFeedbackInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct RenderPassCreationFeedbackInfoEXT where
  peekCStruct :: Ptr RenderPassCreationFeedbackInfoEXT
-> IO RenderPassCreationFeedbackInfoEXT
peekCStruct Ptr RenderPassCreationFeedbackInfoEXT
p = do
    Word32
postMergeSubpassCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RenderPassCreationFeedbackInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Word32 -> RenderPassCreationFeedbackInfoEXT
RenderPassCreationFeedbackInfoEXT
             Word32
postMergeSubpassCount

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

instance Zero RenderPassCreationFeedbackInfoEXT where
  zero :: RenderPassCreationFeedbackInfoEXT
zero = Word32 -> RenderPassCreationFeedbackInfoEXT
RenderPassCreationFeedbackInfoEXT
           forall a. Zero a => a
zero


-- | VkRenderPassCreationFeedbackCreateInfoEXT - Request feedback about the
-- creation of render pass
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_subpass_merge_feedback VK_EXT_subpass_merge_feedback>,
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.RenderPassCreateInfo2',
-- 'RenderPassCreationControlEXT', 'RenderPassCreationFeedbackInfoEXT',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.createRenderPass2'
data RenderPassCreationFeedbackCreateInfoEXT = RenderPassCreationFeedbackCreateInfoEXT
  { -- | @pRenderPassFeedback@ is a pointer to a
    -- 'RenderPassCreationFeedbackInfoEXT' structure in which feedback is
    -- returned.
    --
    -- #VUID-VkRenderPassCreationFeedbackCreateInfoEXT-pRenderPassFeedback-parameter#
    -- @pRenderPassFeedback@ /must/ be a valid pointer to a
    -- 'RenderPassCreationFeedbackInfoEXT' structure
    RenderPassCreationFeedbackCreateInfoEXT
-> Ptr RenderPassCreationFeedbackInfoEXT
renderPassFeedback :: Ptr RenderPassCreationFeedbackInfoEXT }
  deriving (Typeable, RenderPassCreationFeedbackCreateInfoEXT
-> RenderPassCreationFeedbackCreateInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RenderPassCreationFeedbackCreateInfoEXT
-> RenderPassCreationFeedbackCreateInfoEXT -> Bool
$c/= :: RenderPassCreationFeedbackCreateInfoEXT
-> RenderPassCreationFeedbackCreateInfoEXT -> Bool
== :: RenderPassCreationFeedbackCreateInfoEXT
-> RenderPassCreationFeedbackCreateInfoEXT -> Bool
$c== :: RenderPassCreationFeedbackCreateInfoEXT
-> RenderPassCreationFeedbackCreateInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (RenderPassCreationFeedbackCreateInfoEXT)
#endif
deriving instance Show RenderPassCreationFeedbackCreateInfoEXT

instance ToCStruct RenderPassCreationFeedbackCreateInfoEXT where
  withCStruct :: forall b.
RenderPassCreationFeedbackCreateInfoEXT
-> (Ptr RenderPassCreationFeedbackCreateInfoEXT -> IO b) -> IO b
withCStruct RenderPassCreationFeedbackCreateInfoEXT
x Ptr RenderPassCreationFeedbackCreateInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr RenderPassCreationFeedbackCreateInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RenderPassCreationFeedbackCreateInfoEXT
p RenderPassCreationFeedbackCreateInfoEXT
x (Ptr RenderPassCreationFeedbackCreateInfoEXT -> IO b
f Ptr RenderPassCreationFeedbackCreateInfoEXT
p)
  pokeCStruct :: forall b.
Ptr RenderPassCreationFeedbackCreateInfoEXT
-> RenderPassCreationFeedbackCreateInfoEXT -> IO b -> IO b
pokeCStruct Ptr RenderPassCreationFeedbackCreateInfoEXT
p RenderPassCreationFeedbackCreateInfoEXT{Ptr RenderPassCreationFeedbackInfoEXT
renderPassFeedback :: Ptr RenderPassCreationFeedbackInfoEXT
$sel:renderPassFeedback:RenderPassCreationFeedbackCreateInfoEXT :: RenderPassCreationFeedbackCreateInfoEXT
-> Ptr RenderPassCreationFeedbackInfoEXT
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassCreationFeedbackCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassCreationFeedbackCreateInfoEXT
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 RenderPassCreationFeedbackCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr RenderPassCreationFeedbackInfoEXT))) (Ptr RenderPassCreationFeedbackInfoEXT
renderPassFeedback)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr RenderPassCreationFeedbackCreateInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr RenderPassCreationFeedbackCreateInfoEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassCreationFeedbackCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassCreationFeedbackCreateInfoEXT
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 RenderPassCreationFeedbackCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr RenderPassCreationFeedbackInfoEXT))) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct RenderPassCreationFeedbackCreateInfoEXT where
  peekCStruct :: Ptr RenderPassCreationFeedbackCreateInfoEXT
-> IO RenderPassCreationFeedbackCreateInfoEXT
peekCStruct Ptr RenderPassCreationFeedbackCreateInfoEXT
p = do
    Ptr RenderPassCreationFeedbackInfoEXT
pRenderPassFeedback <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr RenderPassCreationFeedbackInfoEXT) ((Ptr RenderPassCreationFeedbackCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr RenderPassCreationFeedbackInfoEXT)))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr RenderPassCreationFeedbackInfoEXT
-> RenderPassCreationFeedbackCreateInfoEXT
RenderPassCreationFeedbackCreateInfoEXT
             Ptr RenderPassCreationFeedbackInfoEXT
pRenderPassFeedback

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

instance Zero RenderPassCreationFeedbackCreateInfoEXT where
  zero :: RenderPassCreationFeedbackCreateInfoEXT
zero = Ptr RenderPassCreationFeedbackInfoEXT
-> RenderPassCreationFeedbackCreateInfoEXT
RenderPassCreationFeedbackCreateInfoEXT
           forall a. Zero a => a
zero


-- | VkRenderPassSubpassFeedbackInfoEXT - Feedback about the creation of
-- subpass
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_subpass_merge_feedback VK_EXT_subpass_merge_feedback>,
-- 'RenderPassSubpassFeedbackCreateInfoEXT', 'SubpassMergeStatusEXT'
data RenderPassSubpassFeedbackInfoEXT = RenderPassSubpassFeedbackInfoEXT
  { -- | @subpassMergeStatus@ is a 'SubpassMergeStatusEXT' value specifying
    -- information about whether the subpass is merged with previous subpass
    -- and the reason why it is not merged.
    RenderPassSubpassFeedbackInfoEXT -> SubpassMergeStatusEXT
subpassMergeStatus :: SubpassMergeStatusEXT
  , -- | @description@ is an array of
    -- 'Vulkan.Core10.APIConstants.MAX_DESCRIPTION_SIZE' @char@ containing a
    -- null-terminated UTF-8 string which provides additional details.
    RenderPassSubpassFeedbackInfoEXT -> ByteString
description :: ByteString
  , -- | @postMergeIndex@ is the subpass index after the subpass merging.
    RenderPassSubpassFeedbackInfoEXT -> Word32
postMergeIndex :: Word32
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (RenderPassSubpassFeedbackInfoEXT)
#endif
deriving instance Show RenderPassSubpassFeedbackInfoEXT

instance ToCStruct RenderPassSubpassFeedbackInfoEXT where
  withCStruct :: forall b.
RenderPassSubpassFeedbackInfoEXT
-> (Ptr RenderPassSubpassFeedbackInfoEXT -> IO b) -> IO b
withCStruct RenderPassSubpassFeedbackInfoEXT
x Ptr RenderPassSubpassFeedbackInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
264 forall a b. (a -> b) -> a -> b
$ \Ptr RenderPassSubpassFeedbackInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RenderPassSubpassFeedbackInfoEXT
p RenderPassSubpassFeedbackInfoEXT
x (Ptr RenderPassSubpassFeedbackInfoEXT -> IO b
f Ptr RenderPassSubpassFeedbackInfoEXT
p)
  pokeCStruct :: forall b.
Ptr RenderPassSubpassFeedbackInfoEXT
-> RenderPassSubpassFeedbackInfoEXT -> IO b -> IO b
pokeCStruct Ptr RenderPassSubpassFeedbackInfoEXT
p RenderPassSubpassFeedbackInfoEXT{Word32
ByteString
SubpassMergeStatusEXT
postMergeIndex :: Word32
description :: ByteString
subpassMergeStatus :: SubpassMergeStatusEXT
$sel:postMergeIndex:RenderPassSubpassFeedbackInfoEXT :: RenderPassSubpassFeedbackInfoEXT -> Word32
$sel:description:RenderPassSubpassFeedbackInfoEXT :: RenderPassSubpassFeedbackInfoEXT -> ByteString
$sel:subpassMergeStatus:RenderPassSubpassFeedbackInfoEXT :: RenderPassSubpassFeedbackInfoEXT -> SubpassMergeStatusEXT
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassSubpassFeedbackInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr SubpassMergeStatusEXT)) (SubpassMergeStatusEXT
subpassMergeStatus)
    forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString ((Ptr RenderPassSubpassFeedbackInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
description)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassSubpassFeedbackInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
260 :: Ptr Word32)) (Word32
postMergeIndex)
    IO b
f
  cStructSize :: Int
cStructSize = Int
264
  cStructAlignment :: Int
cStructAlignment = Int
4
  pokeZeroCStruct :: forall b. Ptr RenderPassSubpassFeedbackInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr RenderPassSubpassFeedbackInfoEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassSubpassFeedbackInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr SubpassMergeStatusEXT)) (forall a. Zero a => a
zero)
    forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString ((Ptr RenderPassSubpassFeedbackInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (forall a. Monoid a => a
mempty)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassSubpassFeedbackInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
260 :: Ptr Word32)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct RenderPassSubpassFeedbackInfoEXT where
  peekCStruct :: Ptr RenderPassSubpassFeedbackInfoEXT
-> IO RenderPassSubpassFeedbackInfoEXT
peekCStruct Ptr RenderPassSubpassFeedbackInfoEXT
p = do
    SubpassMergeStatusEXT
subpassMergeStatus <- forall a. Storable a => Ptr a -> IO a
peek @SubpassMergeStatusEXT ((Ptr RenderPassSubpassFeedbackInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr SubpassMergeStatusEXT))
    ByteString
description <- CString -> IO ByteString
packCString (forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr RenderPassSubpassFeedbackInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))))
    Word32
postMergeIndex <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RenderPassSubpassFeedbackInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
260 :: Ptr Word32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ SubpassMergeStatusEXT
-> ByteString -> Word32 -> RenderPassSubpassFeedbackInfoEXT
RenderPassSubpassFeedbackInfoEXT
             SubpassMergeStatusEXT
subpassMergeStatus ByteString
description Word32
postMergeIndex

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

instance Zero RenderPassSubpassFeedbackInfoEXT where
  zero :: RenderPassSubpassFeedbackInfoEXT
zero = SubpassMergeStatusEXT
-> ByteString -> Word32 -> RenderPassSubpassFeedbackInfoEXT
RenderPassSubpassFeedbackInfoEXT
           forall a. Zero a => a
zero
           forall a. Monoid a => a
mempty
           forall a. Zero a => a
zero


-- | VkRenderPassSubpassFeedbackCreateInfoEXT - Request for feedback about
-- the creation of subpass
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_subpass_merge_feedback VK_EXT_subpass_merge_feedback>,
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.RenderPassCreateInfo2',
-- 'RenderPassCreationControlEXT', 'RenderPassSubpassFeedbackInfoEXT',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.SubpassDescription2',
-- 'Vulkan.Core12.Promoted_From_VK_KHR_create_renderpass2.createRenderPass2'
data RenderPassSubpassFeedbackCreateInfoEXT = RenderPassSubpassFeedbackCreateInfoEXT
  { -- | @pSubpassFeedback@ is a pointer to a 'RenderPassSubpassFeedbackInfoEXT'
    -- structure in which feedback is returned.
    --
    -- #VUID-VkRenderPassSubpassFeedbackCreateInfoEXT-pSubpassFeedback-parameter#
    -- @pSubpassFeedback@ /must/ be a valid pointer to a
    -- 'RenderPassSubpassFeedbackInfoEXT' structure
    RenderPassSubpassFeedbackCreateInfoEXT
-> Ptr RenderPassSubpassFeedbackInfoEXT
subpassFeedback :: Ptr RenderPassSubpassFeedbackInfoEXT }
  deriving (Typeable, RenderPassSubpassFeedbackCreateInfoEXT
-> RenderPassSubpassFeedbackCreateInfoEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RenderPassSubpassFeedbackCreateInfoEXT
-> RenderPassSubpassFeedbackCreateInfoEXT -> Bool
$c/= :: RenderPassSubpassFeedbackCreateInfoEXT
-> RenderPassSubpassFeedbackCreateInfoEXT -> Bool
== :: RenderPassSubpassFeedbackCreateInfoEXT
-> RenderPassSubpassFeedbackCreateInfoEXT -> Bool
$c== :: RenderPassSubpassFeedbackCreateInfoEXT
-> RenderPassSubpassFeedbackCreateInfoEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (RenderPassSubpassFeedbackCreateInfoEXT)
#endif
deriving instance Show RenderPassSubpassFeedbackCreateInfoEXT

instance ToCStruct RenderPassSubpassFeedbackCreateInfoEXT where
  withCStruct :: forall b.
RenderPassSubpassFeedbackCreateInfoEXT
-> (Ptr RenderPassSubpassFeedbackCreateInfoEXT -> IO b) -> IO b
withCStruct RenderPassSubpassFeedbackCreateInfoEXT
x Ptr RenderPassSubpassFeedbackCreateInfoEXT -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr RenderPassSubpassFeedbackCreateInfoEXT
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RenderPassSubpassFeedbackCreateInfoEXT
p RenderPassSubpassFeedbackCreateInfoEXT
x (Ptr RenderPassSubpassFeedbackCreateInfoEXT -> IO b
f Ptr RenderPassSubpassFeedbackCreateInfoEXT
p)
  pokeCStruct :: forall b.
Ptr RenderPassSubpassFeedbackCreateInfoEXT
-> RenderPassSubpassFeedbackCreateInfoEXT -> IO b -> IO b
pokeCStruct Ptr RenderPassSubpassFeedbackCreateInfoEXT
p RenderPassSubpassFeedbackCreateInfoEXT{Ptr RenderPassSubpassFeedbackInfoEXT
subpassFeedback :: Ptr RenderPassSubpassFeedbackInfoEXT
$sel:subpassFeedback:RenderPassSubpassFeedbackCreateInfoEXT :: RenderPassSubpassFeedbackCreateInfoEXT
-> Ptr RenderPassSubpassFeedbackInfoEXT
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassSubpassFeedbackCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassSubpassFeedbackCreateInfoEXT
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 RenderPassSubpassFeedbackCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr RenderPassSubpassFeedbackInfoEXT))) (Ptr RenderPassSubpassFeedbackInfoEXT
subpassFeedback)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr RenderPassSubpassFeedbackCreateInfoEXT -> IO b -> IO b
pokeZeroCStruct Ptr RenderPassSubpassFeedbackCreateInfoEXT
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassSubpassFeedbackCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RenderPassSubpassFeedbackCreateInfoEXT
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 RenderPassSubpassFeedbackCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr RenderPassSubpassFeedbackInfoEXT))) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct RenderPassSubpassFeedbackCreateInfoEXT where
  peekCStruct :: Ptr RenderPassSubpassFeedbackCreateInfoEXT
-> IO RenderPassSubpassFeedbackCreateInfoEXT
peekCStruct Ptr RenderPassSubpassFeedbackCreateInfoEXT
p = do
    Ptr RenderPassSubpassFeedbackInfoEXT
pSubpassFeedback <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr RenderPassSubpassFeedbackInfoEXT) ((Ptr RenderPassSubpassFeedbackCreateInfoEXT
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr RenderPassSubpassFeedbackInfoEXT)))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Ptr RenderPassSubpassFeedbackInfoEXT
-> RenderPassSubpassFeedbackCreateInfoEXT
RenderPassSubpassFeedbackCreateInfoEXT
             Ptr RenderPassSubpassFeedbackInfoEXT
pSubpassFeedback

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

instance Zero RenderPassSubpassFeedbackCreateInfoEXT where
  zero :: RenderPassSubpassFeedbackCreateInfoEXT
zero = Ptr RenderPassSubpassFeedbackInfoEXT
-> RenderPassSubpassFeedbackCreateInfoEXT
RenderPassSubpassFeedbackCreateInfoEXT
           forall a. Zero a => a
zero


-- | VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT - Structure describing
-- whether subpass merging feedback can be supported by the implementation
--
-- = Members
--
-- This structure describes the following feature:
--
-- = Description
--
-- If the 'PhysicalDeviceSubpassMergeFeedbackFeaturesEXT' 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. 'PhysicalDeviceSubpassMergeFeedbackFeaturesEXT' /can/ also be
-- used in the @pNext@ chain of 'Vulkan.Core10.Device.DeviceCreateInfo' to
-- selectively enable these features.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_subpass_merge_feedback VK_EXT_subpass_merge_feedback>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceSubpassMergeFeedbackFeaturesEXT = PhysicalDeviceSubpassMergeFeedbackFeaturesEXT
  { -- | #features-subpassMergeFeedback# @subpassMergeFeedback@ indicates whether
    -- the implementation supports feedback of subpass merging.
    PhysicalDeviceSubpassMergeFeedbackFeaturesEXT -> Bool
subpassMergeFeedback :: Bool }
  deriving (Typeable, PhysicalDeviceSubpassMergeFeedbackFeaturesEXT
-> PhysicalDeviceSubpassMergeFeedbackFeaturesEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceSubpassMergeFeedbackFeaturesEXT
-> PhysicalDeviceSubpassMergeFeedbackFeaturesEXT -> Bool
$c/= :: PhysicalDeviceSubpassMergeFeedbackFeaturesEXT
-> PhysicalDeviceSubpassMergeFeedbackFeaturesEXT -> Bool
== :: PhysicalDeviceSubpassMergeFeedbackFeaturesEXT
-> PhysicalDeviceSubpassMergeFeedbackFeaturesEXT -> Bool
$c== :: PhysicalDeviceSubpassMergeFeedbackFeaturesEXT
-> PhysicalDeviceSubpassMergeFeedbackFeaturesEXT -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceSubpassMergeFeedbackFeaturesEXT)
#endif
deriving instance Show PhysicalDeviceSubpassMergeFeedbackFeaturesEXT

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

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

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

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


-- | VkSubpassMergeStatusEXT - Specify a subpass merging status
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_EXT_subpass_merge_feedback VK_EXT_subpass_merge_feedback>,
-- 'RenderPassSubpassFeedbackInfoEXT'
newtype SubpassMergeStatusEXT = SubpassMergeStatusEXT Int32
  deriving newtype (SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
$c/= :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
== :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
$c== :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
Eq, Eq SubpassMergeStatusEXT
SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Ordering
SubpassMergeStatusEXT
-> SubpassMergeStatusEXT -> SubpassMergeStatusEXT
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SubpassMergeStatusEXT
-> SubpassMergeStatusEXT -> SubpassMergeStatusEXT
$cmin :: SubpassMergeStatusEXT
-> SubpassMergeStatusEXT -> SubpassMergeStatusEXT
max :: SubpassMergeStatusEXT
-> SubpassMergeStatusEXT -> SubpassMergeStatusEXT
$cmax :: SubpassMergeStatusEXT
-> SubpassMergeStatusEXT -> SubpassMergeStatusEXT
>= :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
$c>= :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
> :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
$c> :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
<= :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
$c<= :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
< :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
$c< :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Bool
compare :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Ordering
$ccompare :: SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> Ordering
Ord, Ptr SubpassMergeStatusEXT -> IO SubpassMergeStatusEXT
Ptr SubpassMergeStatusEXT -> Int -> IO SubpassMergeStatusEXT
Ptr SubpassMergeStatusEXT -> Int -> SubpassMergeStatusEXT -> IO ()
Ptr SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> IO ()
SubpassMergeStatusEXT -> Int
forall b. Ptr b -> Int -> IO SubpassMergeStatusEXT
forall b. Ptr b -> Int -> SubpassMergeStatusEXT -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> IO ()
$cpoke :: Ptr SubpassMergeStatusEXT -> SubpassMergeStatusEXT -> IO ()
peek :: Ptr SubpassMergeStatusEXT -> IO SubpassMergeStatusEXT
$cpeek :: Ptr SubpassMergeStatusEXT -> IO SubpassMergeStatusEXT
pokeByteOff :: forall b. Ptr b -> Int -> SubpassMergeStatusEXT -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SubpassMergeStatusEXT -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO SubpassMergeStatusEXT
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SubpassMergeStatusEXT
pokeElemOff :: Ptr SubpassMergeStatusEXT -> Int -> SubpassMergeStatusEXT -> IO ()
$cpokeElemOff :: Ptr SubpassMergeStatusEXT -> Int -> SubpassMergeStatusEXT -> IO ()
peekElemOff :: Ptr SubpassMergeStatusEXT -> Int -> IO SubpassMergeStatusEXT
$cpeekElemOff :: Ptr SubpassMergeStatusEXT -> Int -> IO SubpassMergeStatusEXT
alignment :: SubpassMergeStatusEXT -> Int
$calignment :: SubpassMergeStatusEXT -> Int
sizeOf :: SubpassMergeStatusEXT -> Int
$csizeOf :: SubpassMergeStatusEXT -> Int
Storable, SubpassMergeStatusEXT
forall a. a -> Zero a
zero :: SubpassMergeStatusEXT
$czero :: SubpassMergeStatusEXT
Zero)

-- | 'SUBPASS_MERGE_STATUS_MERGED_EXT' specifies the subpass is merged with a
-- previous subpass.
pattern $bSUBPASS_MERGE_STATUS_MERGED_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_MERGED_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_MERGED_EXT = SubpassMergeStatusEXT 0

-- | 'SUBPASS_MERGE_STATUS_DISALLOWED_EXT' specifies the subpass is
-- disallowed to merge with previous subpass. If the render pass does not
-- allow subpass merging, then all subpass statuses are set to this value.
-- If a subpass description does not allow subpass merging, then only that
-- subpass’s status is set to this value.
pattern $bSUBPASS_MERGE_STATUS_DISALLOWED_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_DISALLOWED_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_DISALLOWED_EXT = SubpassMergeStatusEXT 1

-- | 'SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT' specifies the subpass
-- is not merged because it contains side effects.
pattern $bSUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT = SubpassMergeStatusEXT 2

-- | 'SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT' specifies the
-- subpass is not merged because sample count is not compatible with
-- previous subpass.
pattern $bSUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT = SubpassMergeStatusEXT 3

-- | 'SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT' specifies the
-- subpass is not merged because view masks do not match with previous
-- subpass.
pattern $bSUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT = SubpassMergeStatusEXT 4

-- | 'SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT' specifies the subpass is
-- not merged because of attachments aliasing between them.
pattern $bSUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT = SubpassMergeStatusEXT 5

-- | 'SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT' specifies the subpass
-- is not merged because subpass dependencies do not allow merging.
pattern $bSUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT = SubpassMergeStatusEXT 6

-- | 'SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT'
-- specifies the subpass is not merged because input attachment is not a
-- color attachment from previous subpass or the formats are incompatible.
pattern $bSUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT = SubpassMergeStatusEXT 7

-- | 'SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT' specifies the
-- subpass is not merged because of too many attachments.
pattern $bSUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT = SubpassMergeStatusEXT 8

-- | 'SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT' specifies the
-- subpass is not merged because of insufficient memory.
pattern $bSUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT = SubpassMergeStatusEXT 9

-- | 'SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT' specifies the
-- subpass is not merged because of too many depth\/stencil attachments.
pattern $bSUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT = SubpassMergeStatusEXT 10

-- | 'SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT' specifies
-- the subpass is not merged because a resolve attachment is reused as an
-- input attachment in a subsequent subpass.
pattern $bSUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT = SubpassMergeStatusEXT 11

-- | 'SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT' specifies the
-- subpass is not merged because the render pass has only one subpass.
pattern $bSUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT = SubpassMergeStatusEXT 12

-- | 'SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT' specifies other
-- reasons why subpass is not merged. It is also the recommended default
-- value that should be reported when a subpass is not merged and when no
-- other value is appropriate.
pattern $bSUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT :: SubpassMergeStatusEXT
$mSUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT :: forall {r}.
SubpassMergeStatusEXT -> ((# #) -> r) -> ((# #) -> r) -> r
SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT = SubpassMergeStatusEXT 13

{-# COMPLETE
  SUBPASS_MERGE_STATUS_MERGED_EXT
  , SUBPASS_MERGE_STATUS_DISALLOWED_EXT
  , SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT
  , SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT
  , SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT
  , SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT
  , SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT
  , SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT
  , SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT
  , SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT
  , SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT
  , SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT
  , SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT
  , SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT ::
    SubpassMergeStatusEXT
  #-}

conNameSubpassMergeStatusEXT :: String
conNameSubpassMergeStatusEXT :: String
conNameSubpassMergeStatusEXT = String
"SubpassMergeStatusEXT"

enumPrefixSubpassMergeStatusEXT :: String
enumPrefixSubpassMergeStatusEXT :: String
enumPrefixSubpassMergeStatusEXT = String
"SUBPASS_MERGE_STATUS_"

showTableSubpassMergeStatusEXT :: [(SubpassMergeStatusEXT, String)]
showTableSubpassMergeStatusEXT :: [(SubpassMergeStatusEXT, String)]
showTableSubpassMergeStatusEXT =
  [
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_MERGED_EXT
    , String
"MERGED_EXT"
    )
  ,
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_DISALLOWED_EXT
    , String
"DISALLOWED_EXT"
    )
  ,
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT
    , String
"NOT_MERGED_SIDE_EFFECTS_EXT"
    )
  ,
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT
    , String
"NOT_MERGED_SAMPLES_MISMATCH_EXT"
    )
  ,
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT
    , String
"NOT_MERGED_VIEWS_MISMATCH_EXT"
    )
  ,
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT
    , String
"NOT_MERGED_ALIASING_EXT"
    )
  ,
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT
    , String
"NOT_MERGED_DEPENDENCIES_EXT"
    )
  ,
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT
    , String
"NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT"
    )
  ,
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT
    , String
"NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT"
    )
  ,
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT
    , String
"NOT_MERGED_INSUFFICIENT_STORAGE_EXT"
    )
  ,
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT
    , String
"NOT_MERGED_DEPTH_STENCIL_COUNT_EXT"
    )
  ,
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT
    , String
"NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT"
    )
  ,
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT
    , String
"NOT_MERGED_SINGLE_SUBPASS_EXT"
    )
  ,
    ( SubpassMergeStatusEXT
SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT
    , String
"NOT_MERGED_UNSPECIFIED_EXT"
    )
  ]

instance Show SubpassMergeStatusEXT where
  showsPrec :: Int -> SubpassMergeStatusEXT -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixSubpassMergeStatusEXT
      [(SubpassMergeStatusEXT, String)]
showTableSubpassMergeStatusEXT
      String
conNameSubpassMergeStatusEXT
      (\(SubpassMergeStatusEXT Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read SubpassMergeStatusEXT where
  readPrec :: ReadPrec SubpassMergeStatusEXT
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixSubpassMergeStatusEXT
      [(SubpassMergeStatusEXT, String)]
showTableSubpassMergeStatusEXT
      String
conNameSubpassMergeStatusEXT
      Int32 -> SubpassMergeStatusEXT
SubpassMergeStatusEXT

type EXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION = 2

-- No documentation found for TopLevel "VK_EXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION"
pattern EXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION :: forall a . Integral a => a
pattern $bEXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION :: forall a. Integral a => a
$mEXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION = 2


type EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME = "VK_EXT_subpass_merge_feedback"

-- No documentation found for TopLevel "VK_EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME"
pattern EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bEXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mEXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME = "VK_EXT_subpass_merge_feedback"