{-# language CPP #-}
-- | = Name
--
-- VK_KHR_maintenance7 - device extension
--
-- = VK_KHR_maintenance7
--
-- [__Name String__]
--     @VK_KHR_maintenance7@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     563
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#versions-1.1 Vulkan Version 1.1>
--
-- [__Contact__]
--
--     -   Mike Blumenkrantz
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_KHR_maintenance7] @zmike%0A*Here describe the issue or question you have about the VK_KHR_maintenance7 extension* >
--
-- [__Extension Proposal__]
--     <https://github.com/KhronosGroup/Vulkan-Docs/tree/main/proposals/VK_KHR_maintenance7.adoc VK_KHR_maintenance7>
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2024-01-30
--
-- [__Interactions and External Dependencies__; __Contributors__]
--
--     -   Mike Blumenkrantz, Valve
--
--     -   Hans-Kristian Arntzen, Valve
--
--     -   Pan Gao, Huawei
--
--     -   Tobias Hector, AMD
--
--     -   Jon Leech, Khronos
--
--     -   Daniel Story, Nintendo
--
--     -   Shahbaz Youssefi, Google
--
--     -   Yiwei Zhang, Google
--
--     -   Matthew Netsch, Qualcomm
--
-- == Description
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_maintenance7 VK_KHR_maintenance7>
-- adds a collection of minor features, none of which would warrant an
-- entire extension of their own.
--
-- The proposed new features are as follows:
--
-- -   Add a property query to determine if a framebuffer writes to depth
--     or stencil aspect does not trigger a write access in the sibling
--     aspect. For example, this allows sampling stencil aspect as a
--     texture while rendering to the sibling depth attachment and
--     vice-versa given appropriate image layouts.
--
-- -   Add a way to query information regarding the underlying devices in
--     environments where the Vulkan implementation is provided through
--     layered implementations. For example, running on Mesa\/Venus, driver
--     ID is returned as
--     'Vulkan.Core12.Enums.DriverId.DRIVER_ID_MESA_VENUS', but it can be
--     necessary to know what the real driver under the hood is. The new
--     'PhysicalDeviceLayeredApiPropertiesKHR' structure can be used to
--     gather information regarding layers underneath the top-level
--     physical device.
--
-- -   Promote
--     'Vulkan.Extensions.VK_EXT_nested_command_buffer.RENDERING_CONTENTS_INLINE_BIT_EXT'
--     and
--     'Vulkan.Extensions.VK_EXT_nested_command_buffer.SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_EXT'
--     to KHR
--
-- -   Add a limit to report the maximum total count of dynamic uniform
--     buffers and dynamic storage buffers that can be included in a
--     pipeline layout.
--
-- -   Require that for an unsigned integer query, the 32-bit result value
--     /must/ be equal to the 32 least significant bits of the equivalent
--     64-bit result value.
--
-- -   Add query for robust access support when using fragment shading rate
--     attachments
--
-- == New Structures
--
-- -   'PhysicalDeviceLayeredApiPropertiesKHR'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceMaintenance7FeaturesKHR'
--
-- -   Extending 'PhysicalDeviceLayeredApiPropertiesKHR':
--
--     -   'PhysicalDeviceLayeredApiVulkanPropertiesKHR'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2':
--
--     -   'PhysicalDeviceLayeredApiPropertiesListKHR'
--
--     -   'PhysicalDeviceMaintenance7PropertiesKHR'
--
-- == New Enums
--
-- -   'PhysicalDeviceLayeredApiKHR'
--
-- == New Enum Constants
--
-- -   'KHR_MAINTENANCE_7_EXTENSION_NAME'
--
-- -   'KHR_MAINTENANCE_7_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core13.Enums.RenderingFlagBits.RenderingFlagBits':
--
--     -   'Vulkan.Core13.Enums.RenderingFlagBits.RENDERING_CONTENTS_INLINE_BIT_KHR'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR'
--
-- -   Extending 'Vulkan.Core10.Enums.SubpassContents.SubpassContents':
--
--     -   'Vulkan.Core10.Enums.SubpassContents.SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR'
--
-- == Issues
--
-- None.
--
-- == Version History
--
-- -   Revision 1, 2024-01-30 (Jon Leech)
--
--     -   Initial revision
--
-- == See Also
--
-- No cross-references are available
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#VK_KHR_maintenance7 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_maintenance7  ( PhysicalDeviceMaintenance7FeaturesKHR(..)
                                              , PhysicalDeviceMaintenance7PropertiesKHR(..)
                                              , PhysicalDeviceLayeredApiPropertiesListKHR(..)
                                              , PhysicalDeviceLayeredApiPropertiesKHR(..)
                                              , PhysicalDeviceLayeredApiVulkanPropertiesKHR(..)
                                              , PhysicalDeviceLayeredApiKHR( PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR
                                                                           , PHYSICAL_DEVICE_LAYERED_API_D3D12_KHR
                                                                           , PHYSICAL_DEVICE_LAYERED_API_METAL_KHR
                                                                           , PHYSICAL_DEVICE_LAYERED_API_OPENGL_KHR
                                                                           , PHYSICAL_DEVICE_LAYERED_API_OPENGLES_KHR
                                                                           , ..
                                                                           )
                                              , KHR_MAINTENANCE_7_SPEC_VERSION
                                              , pattern KHR_MAINTENANCE_7_SPEC_VERSION
                                              , KHR_MAINTENANCE_7_EXTENSION_NAME
                                              , pattern KHR_MAINTENANCE_7_EXTENSION_NAME
                                              ) where

import Vulkan.CStruct.Utils (FixedArray)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytes)
import GHC.Ptr (castPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showsPrec)
import Data.ByteString (packCString)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
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.Type.Equality ((:~:)(Refl))
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 Control.Monad.Trans.Cont (ContT(..))
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.CStruct.Utils (lowerArrayPtr)
import Vulkan.CStruct.Extends (peekSomeCStruct)
import Vulkan.CStruct.Utils (pokeFixedLengthNullTerminatedByteString)
import Vulkan.CStruct.Extends (pokeSomeCStruct)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.CStruct.Extends (Chain)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.Core10.APIConstants (MAX_PHYSICAL_DEVICE_NAME_SIZE)
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PeekChain(..))
import Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2 (PhysicalDeviceProperties2)
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.CStruct.Extends (SomeStruct(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR))
-- | VkPhysicalDeviceMaintenance7FeaturesKHR - Structure describing whether
-- the implementation supports maintenance7 functionality
--
-- = Members
--
-- This structure describes the following feature:
--
-- = Description
--
-- If the 'PhysicalDeviceMaintenance7FeaturesKHR' structure is included in
-- the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceFeatures2',
-- it is filled in to indicate whether each corresponding feature is
-- supported. If the application wishes to use a
-- 'Vulkan.Core10.Handles.Device' with any features described by
-- 'PhysicalDeviceMaintenance7FeaturesKHR', it /must/ add an instance of
-- the structure, with the desired feature members set to
-- 'Vulkan.Core10.FundamentalTypes.TRUE', to the @pNext@ chain of
-- 'Vulkan.Core10.Device.DeviceCreateInfo' when creating the
-- 'Vulkan.Core10.Handles.Device'.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_maintenance7 VK_KHR_maintenance7>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceMaintenance7FeaturesKHR = PhysicalDeviceMaintenance7FeaturesKHR
  { -- | #features-maintenance7# @maintenance7@ indicates that the implementation
    -- supports the following:
    --
    -- -   The
    --     'Vulkan.Core13.Enums.RenderingFlagBits.RENDERING_CONTENTS_INLINE_BIT_KHR'
    --     and
    --     'Vulkan.Core10.Enums.SubpassContents.SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR'
    --     flags /can/ be used to record commands in render pass instances both
    --     inline and in secondary command buffers executed with
    --     'Vulkan.Core10.CommandBufferBuilding.cmdExecuteCommands' for dynamic
    --     rendering and legacy render passes respectively.
    --
    -- -   Querying information regarding the underlying devices in
    --     environments where the Vulkan implementation is provided through
    --     layered implementations. This is done by chaining
    --     'PhysicalDeviceLayeredApiPropertiesListKHR' to
    --     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2'.
    --
    -- -   New limits which indicate the maximum total count of dynamic uniform
    --     buffers and dynamic storage buffers that /can/ be included in a
    --     pipeline layout.
    --
    -- -   32-bit timestamp queries /must/ wrap on overflow
    --
    -- -   A property that indicates whether a fragment shading rate attachment
    --     can have a size that is too small to cover a specified render area.
    --
    -- -   A property that indicates support for writing to one aspect of a
    --     depth\/stencil attachment without performing a read-modify-write
    --     operation on the other aspect
    PhysicalDeviceMaintenance7FeaturesKHR -> Bool
maintenance7 :: Bool }
  deriving (Typeable, PhysicalDeviceMaintenance7FeaturesKHR
-> PhysicalDeviceMaintenance7FeaturesKHR -> Bool
(PhysicalDeviceMaintenance7FeaturesKHR
 -> PhysicalDeviceMaintenance7FeaturesKHR -> Bool)
-> (PhysicalDeviceMaintenance7FeaturesKHR
    -> PhysicalDeviceMaintenance7FeaturesKHR -> Bool)
-> Eq PhysicalDeviceMaintenance7FeaturesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceMaintenance7FeaturesKHR
-> PhysicalDeviceMaintenance7FeaturesKHR -> Bool
== :: PhysicalDeviceMaintenance7FeaturesKHR
-> PhysicalDeviceMaintenance7FeaturesKHR -> Bool
$c/= :: PhysicalDeviceMaintenance7FeaturesKHR
-> PhysicalDeviceMaintenance7FeaturesKHR -> Bool
/= :: PhysicalDeviceMaintenance7FeaturesKHR
-> PhysicalDeviceMaintenance7FeaturesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceMaintenance7FeaturesKHR)
#endif
deriving instance Show PhysicalDeviceMaintenance7FeaturesKHR

instance ToCStruct PhysicalDeviceMaintenance7FeaturesKHR where
  withCStruct :: forall b.
PhysicalDeviceMaintenance7FeaturesKHR
-> (Ptr PhysicalDeviceMaintenance7FeaturesKHR -> IO b) -> IO b
withCStruct PhysicalDeviceMaintenance7FeaturesKHR
x Ptr PhysicalDeviceMaintenance7FeaturesKHR -> IO b
f = Int -> (Ptr PhysicalDeviceMaintenance7FeaturesKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceMaintenance7FeaturesKHR -> IO b) -> IO b)
-> (Ptr PhysicalDeviceMaintenance7FeaturesKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceMaintenance7FeaturesKHR
p -> Ptr PhysicalDeviceMaintenance7FeaturesKHR
-> PhysicalDeviceMaintenance7FeaturesKHR -> IO b -> IO b
forall b.
Ptr PhysicalDeviceMaintenance7FeaturesKHR
-> PhysicalDeviceMaintenance7FeaturesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMaintenance7FeaturesKHR
p PhysicalDeviceMaintenance7FeaturesKHR
x (Ptr PhysicalDeviceMaintenance7FeaturesKHR -> IO b
f Ptr PhysicalDeviceMaintenance7FeaturesKHR
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceMaintenance7FeaturesKHR
-> PhysicalDeviceMaintenance7FeaturesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMaintenance7FeaturesKHR
p PhysicalDeviceMaintenance7FeaturesKHR{Bool
maintenance7 :: PhysicalDeviceMaintenance7FeaturesKHR -> Bool
maintenance7 :: Bool
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7FeaturesKHR
p Ptr PhysicalDeviceMaintenance7FeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7FeaturesKHR
p Ptr PhysicalDeviceMaintenance7FeaturesKHR -> 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 PhysicalDeviceMaintenance7FeaturesKHR
p Ptr PhysicalDeviceMaintenance7FeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
maintenance7))
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr PhysicalDeviceMaintenance7FeaturesKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceMaintenance7FeaturesKHR
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7FeaturesKHR
p Ptr PhysicalDeviceMaintenance7FeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7FeaturesKHR
p Ptr PhysicalDeviceMaintenance7FeaturesKHR -> 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 PhysicalDeviceMaintenance7FeaturesKHR
p Ptr PhysicalDeviceMaintenance7FeaturesKHR -> 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 PhysicalDeviceMaintenance7FeaturesKHR where
  peekCStruct :: Ptr PhysicalDeviceMaintenance7FeaturesKHR
-> IO PhysicalDeviceMaintenance7FeaturesKHR
peekCStruct Ptr PhysicalDeviceMaintenance7FeaturesKHR
p = do
    maintenance7 <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceMaintenance7FeaturesKHR
p Ptr PhysicalDeviceMaintenance7FeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    pure $ PhysicalDeviceMaintenance7FeaturesKHR
             (bool32ToBool maintenance7)

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

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


-- | VkPhysicalDeviceMaintenance7PropertiesKHR - Structure describing various
-- implementation-defined properties introduced with VK_KHR_maintenance7
--
-- = Description
--
-- If the 'PhysicalDeviceMaintenance7PropertiesKHR' structure is included
-- in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceProperties2',
-- it is filled in with each corresponding implementation-dependent
-- property.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_maintenance7 VK_KHR_maintenance7>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceMaintenance7PropertiesKHR = PhysicalDeviceMaintenance7PropertiesKHR
  { -- | #limits-robustFragmentShadingRateAttachmentAccess#
    -- @robustFragmentShadingRateAttachmentAccess@ indicates whether the scaled
    -- size of a fragment shading rate attachment /can/ be less than the size
    -- of the render area. If @robustFragmentShadingRateAttachmentAccess@ is
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', the size of the attachment
    -- multiplied by the texel size /must/ be greater than or equal to the size
    -- of the render area. If it is 'Vulkan.Core10.FundamentalTypes.TRUE' and
    -- the fragment shading rate attachment was created with
    -- 'Vulkan.Core10.ImageView.ImageSubresourceRange'::@baseMipLevel@ equal to
    -- 0, the scaled size /can/ be smaller than the render area, with missing
    -- shading rates defined by
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#shaders-execution-memory-access-bounds out of bounds behavior>.
    PhysicalDeviceMaintenance7PropertiesKHR -> Bool
robustFragmentShadingRateAttachmentAccess :: Bool
  , -- | #limits-separateDepthStencilAttachmentAccess#
    -- @separateDepthStencilAttachmentAccess@ indicates support for writing to
    -- one aspect of a depth\/stencil attachment without performing
    -- read-modify-write operations on the other aspect. If this property is
    -- 'Vulkan.Core10.FundamentalTypes.TRUE', writes to one aspect /must/ not
    -- result in read-modify-write operations on the other aspect. If
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', writes to one aspect /may/
    -- result in writes to the other aspect as defined by
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#renderpass-load-operations render pass load operations>,
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#renderpass-store-operations render pass store operations>
    -- and
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#renderpass-resolve-operations render pass resolve operations>.
    PhysicalDeviceMaintenance7PropertiesKHR -> Bool
separateDepthStencilAttachmentAccess :: Bool
  , -- | #limits-maxDescriptorSetTotalUniformBuffersDynamic#
    -- @maxDescriptorSetTotalUniformBuffersDynamic@ is the maximum total count
    -- of dynamic uniform buffers that /can/ be included in a pipeline layout.
    -- Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-uniformbufferdynamic>.
    PhysicalDeviceMaintenance7PropertiesKHR -> Word32
maxDescriptorSetTotalUniformBuffersDynamic :: Word32
  , -- | #limits-maxDescriptorSetTotalStorageBuffersDynamic#
    -- @maxDescriptorSetTotalStorageBuffersDynamic@ is the maximum total count
    -- of dynamic storage buffers that /can/ be included in a pipeline layout.
    -- Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit. See
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#descriptorsets-storagebufferdynamic>.
    PhysicalDeviceMaintenance7PropertiesKHR -> Word32
maxDescriptorSetTotalStorageBuffersDynamic :: Word32
  , -- | #limits-maxDescriptorSetTotalBuffersDynamic#
    -- @maxDescriptorSetTotalBuffersDynamic@ is the maximum total count of
    -- dynamic uniform buffers and storage buffers that /can/ be included in a
    -- pipeline layout. Descriptors with a type of
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC'
    -- or
    -- 'Vulkan.Core10.Enums.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'
    -- count against this limit. Only descriptors in descriptor set layouts
    -- created without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set count against this limit.
    PhysicalDeviceMaintenance7PropertiesKHR -> Word32
maxDescriptorSetTotalBuffersDynamic :: Word32
  , -- | #limits-maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic#
    -- @maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic@ is similar
    -- to @maxDescriptorSetTotalUniformBuffersDynamic@ but counts descriptors
    -- from descriptor sets created with or without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set.
    PhysicalDeviceMaintenance7PropertiesKHR -> Word32
maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic :: Word32
  , -- | #limits-maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic#
    -- @maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic@ is similar
    -- to @maxDescriptorSetTotalStorageBuffersDynamic@ but counts descriptors
    -- from descriptor sets created with or without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set.
    PhysicalDeviceMaintenance7PropertiesKHR -> Word32
maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic :: Word32
  , -- | #limits-maxDescriptorSetUpdateAfterBindTotalBuffersDynamic#
    -- @maxDescriptorSetUpdateAfterBindTotalBuffersDynamic@ is similar to
    -- @maxDescriptorSetTotalBuffersDynamic@ but counts descriptors from
    -- descriptor sets created with or without the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT'
    -- bit set. While an application /can/ allocate dynamic storage buffer
    -- descriptors from a pool created with the
    -- 'Vulkan.Core10.Enums.DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT',
    -- bindings for these descriptors /must/ not be present in any descriptor
    -- set layout that includes bindings created with
    -- 'Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT'.
    PhysicalDeviceMaintenance7PropertiesKHR -> Word32
maxDescriptorSetUpdateAfterBindTotalBuffersDynamic :: Word32
  }
  deriving (Typeable, PhysicalDeviceMaintenance7PropertiesKHR
-> PhysicalDeviceMaintenance7PropertiesKHR -> Bool
(PhysicalDeviceMaintenance7PropertiesKHR
 -> PhysicalDeviceMaintenance7PropertiesKHR -> Bool)
-> (PhysicalDeviceMaintenance7PropertiesKHR
    -> PhysicalDeviceMaintenance7PropertiesKHR -> Bool)
-> Eq PhysicalDeviceMaintenance7PropertiesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceMaintenance7PropertiesKHR
-> PhysicalDeviceMaintenance7PropertiesKHR -> Bool
== :: PhysicalDeviceMaintenance7PropertiesKHR
-> PhysicalDeviceMaintenance7PropertiesKHR -> Bool
$c/= :: PhysicalDeviceMaintenance7PropertiesKHR
-> PhysicalDeviceMaintenance7PropertiesKHR -> Bool
/= :: PhysicalDeviceMaintenance7PropertiesKHR
-> PhysicalDeviceMaintenance7PropertiesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceMaintenance7PropertiesKHR)
#endif
deriving instance Show PhysicalDeviceMaintenance7PropertiesKHR

instance ToCStruct PhysicalDeviceMaintenance7PropertiesKHR where
  withCStruct :: forall b.
PhysicalDeviceMaintenance7PropertiesKHR
-> (Ptr PhysicalDeviceMaintenance7PropertiesKHR -> IO b) -> IO b
withCStruct PhysicalDeviceMaintenance7PropertiesKHR
x Ptr PhysicalDeviceMaintenance7PropertiesKHR -> IO b
f = Int
-> (Ptr PhysicalDeviceMaintenance7PropertiesKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 ((Ptr PhysicalDeviceMaintenance7PropertiesKHR -> IO b) -> IO b)
-> (Ptr PhysicalDeviceMaintenance7PropertiesKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceMaintenance7PropertiesKHR
p -> Ptr PhysicalDeviceMaintenance7PropertiesKHR
-> PhysicalDeviceMaintenance7PropertiesKHR -> IO b -> IO b
forall b.
Ptr PhysicalDeviceMaintenance7PropertiesKHR
-> PhysicalDeviceMaintenance7PropertiesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMaintenance7PropertiesKHR
p PhysicalDeviceMaintenance7PropertiesKHR
x (Ptr PhysicalDeviceMaintenance7PropertiesKHR -> IO b
f Ptr PhysicalDeviceMaintenance7PropertiesKHR
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceMaintenance7PropertiesKHR
-> PhysicalDeviceMaintenance7PropertiesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceMaintenance7PropertiesKHR
p PhysicalDeviceMaintenance7PropertiesKHR{Bool
Word32
robustFragmentShadingRateAttachmentAccess :: PhysicalDeviceMaintenance7PropertiesKHR -> Bool
separateDepthStencilAttachmentAccess :: PhysicalDeviceMaintenance7PropertiesKHR -> Bool
maxDescriptorSetTotalUniformBuffersDynamic :: PhysicalDeviceMaintenance7PropertiesKHR -> Word32
maxDescriptorSetTotalStorageBuffersDynamic :: PhysicalDeviceMaintenance7PropertiesKHR -> Word32
maxDescriptorSetTotalBuffersDynamic :: PhysicalDeviceMaintenance7PropertiesKHR -> Word32
maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic :: PhysicalDeviceMaintenance7PropertiesKHR -> Word32
maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic :: PhysicalDeviceMaintenance7PropertiesKHR -> Word32
maxDescriptorSetUpdateAfterBindTotalBuffersDynamic :: PhysicalDeviceMaintenance7PropertiesKHR -> Word32
robustFragmentShadingRateAttachmentAccess :: Bool
separateDepthStencilAttachmentAccess :: Bool
maxDescriptorSetTotalUniformBuffersDynamic :: Word32
maxDescriptorSetTotalStorageBuffersDynamic :: Word32
maxDescriptorSetTotalBuffersDynamic :: Word32
maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic :: Word32
maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic :: Word32
maxDescriptorSetUpdateAfterBindTotalBuffersDynamic :: Word32
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> 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 PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
robustFragmentShadingRateAttachmentAccess))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
separateDepthStencilAttachmentAccess))
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
maxDescriptorSetTotalUniformBuffersDynamic)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Word32
maxDescriptorSetTotalStorageBuffersDynamic)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Word32
maxDescriptorSetTotalBuffersDynamic)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32)) (Word32
maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Word32
maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (Word32
maxDescriptorSetUpdateAfterBindTotalBuffersDynamic)
    IO b
f
  cStructSize :: Int
cStructSize = Int
48
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceMaintenance7PropertiesKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceMaintenance7PropertiesKHR
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> 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 PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PhysicalDeviceMaintenance7PropertiesKHR where
  peekCStruct :: Ptr PhysicalDeviceMaintenance7PropertiesKHR
-> IO PhysicalDeviceMaintenance7PropertiesKHR
peekCStruct Ptr PhysicalDeviceMaintenance7PropertiesKHR
p = do
    robustFragmentShadingRateAttachmentAccess <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceMaintenance7PropertiesKHR
p Ptr PhysicalDeviceMaintenance7PropertiesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    separateDepthStencilAttachmentAccess <- peek @Bool32 ((p `plusPtr` 20 :: Ptr Bool32))
    maxDescriptorSetTotalUniformBuffersDynamic <- peek @Word32 ((p `plusPtr` 24 :: Ptr Word32))
    maxDescriptorSetTotalStorageBuffersDynamic <- peek @Word32 ((p `plusPtr` 28 :: Ptr Word32))
    maxDescriptorSetTotalBuffersDynamic <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32))
    maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic <- peek @Word32 ((p `plusPtr` 36 :: Ptr Word32))
    maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic <- peek @Word32 ((p `plusPtr` 40 :: Ptr Word32))
    maxDescriptorSetUpdateAfterBindTotalBuffersDynamic <- peek @Word32 ((p `plusPtr` 44 :: Ptr Word32))
    pure $ PhysicalDeviceMaintenance7PropertiesKHR
             (bool32ToBool robustFragmentShadingRateAttachmentAccess)
             (bool32ToBool separateDepthStencilAttachmentAccess)
             maxDescriptorSetTotalUniformBuffersDynamic
             maxDescriptorSetTotalStorageBuffersDynamic
             maxDescriptorSetTotalBuffersDynamic
             maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic
             maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic
             maxDescriptorSetUpdateAfterBindTotalBuffersDynamic

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

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


-- | VkPhysicalDeviceLayeredApiPropertiesListKHR - Structure describing
-- layered implementations underneath the Vulkan physical device
--
-- = Description
--
-- If @pLayeredApis@ is @NULL@, then the number of layered implementations
-- that are underneath the top-most Vulkan physical device (i.e. the one
-- returned by
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceProperties2')
-- is returned in @layeredApiCount@. Otherwise, @layeredApiCount@ /must/ be
-- set by the application to the number of elements in the @pLayeredApis@
-- array, and on return is overwritten with the number of values actually
-- written to @pLayeredApis@. If the value of @layeredApiCount@ is less
-- than the number of layered implementations underneath the Vulkan
-- physical device, at most @layeredApiCount@ values will be written to
-- @pLayeredApis@. An implementation that is not a layer will return 0 in
-- @layeredApiCount@.
--
-- In the presence of multiple layered implementations, each element of
-- @pLayeredApis@ corresponds to an API implementation that is implemented
-- on top of the API at the previous index. If there are layered
-- implementations underneath a non-Vulkan implementation, they may not be
-- visible in this query as the corresponding APIs may lack such a query.
--
-- If the 'PhysicalDeviceLayeredApiPropertiesListKHR' structure is included
-- in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceProperties2',
-- it is filled in with each corresponding implementation-dependent
-- property.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPhysicalDeviceLayeredApiPropertiesListKHR-sType-sType#
--     @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR'
--
-- -   #VUID-VkPhysicalDeviceLayeredApiPropertiesListKHR-pLayeredApis-parameter#
--     If @layeredApiCount@ is not @0@, and @pLayeredApis@ is not @NULL@,
--     @pLayeredApis@ /must/ be a valid pointer to an array of
--     @layeredApiCount@ 'PhysicalDeviceLayeredApiPropertiesKHR' structures
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_maintenance7 VK_KHR_maintenance7>,
-- 'PhysicalDeviceLayeredApiPropertiesKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceLayeredApiPropertiesListKHR = PhysicalDeviceLayeredApiPropertiesListKHR
  { -- | @layeredApiCount@ is an integer related to the number of layered
    -- implementations underneath the Vulkan physical device, as described
    -- below.
    PhysicalDeviceLayeredApiPropertiesListKHR -> Word32
layeredApiCount :: Word32
  , -- | @pLayeredApis@ is a pointer to an array of
    -- 'PhysicalDeviceLayeredApiPropertiesKHR' in which information regarding
    -- the layered implementations underneath the Vulkan physical device are
    -- returned.
    PhysicalDeviceLayeredApiPropertiesListKHR
-> Ptr (PhysicalDeviceLayeredApiPropertiesKHR '[])
layeredApis :: Ptr (PhysicalDeviceLayeredApiPropertiesKHR '[])
  }
  deriving (Typeable, PhysicalDeviceLayeredApiPropertiesListKHR
-> PhysicalDeviceLayeredApiPropertiesListKHR -> Bool
(PhysicalDeviceLayeredApiPropertiesListKHR
 -> PhysicalDeviceLayeredApiPropertiesListKHR -> Bool)
-> (PhysicalDeviceLayeredApiPropertiesListKHR
    -> PhysicalDeviceLayeredApiPropertiesListKHR -> Bool)
-> Eq PhysicalDeviceLayeredApiPropertiesListKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceLayeredApiPropertiesListKHR
-> PhysicalDeviceLayeredApiPropertiesListKHR -> Bool
== :: PhysicalDeviceLayeredApiPropertiesListKHR
-> PhysicalDeviceLayeredApiPropertiesListKHR -> Bool
$c/= :: PhysicalDeviceLayeredApiPropertiesListKHR
-> PhysicalDeviceLayeredApiPropertiesListKHR -> Bool
/= :: PhysicalDeviceLayeredApiPropertiesListKHR
-> PhysicalDeviceLayeredApiPropertiesListKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceLayeredApiPropertiesListKHR)
#endif
deriving instance Show PhysicalDeviceLayeredApiPropertiesListKHR

instance ToCStruct PhysicalDeviceLayeredApiPropertiesListKHR where
  withCStruct :: forall b.
PhysicalDeviceLayeredApiPropertiesListKHR
-> (Ptr PhysicalDeviceLayeredApiPropertiesListKHR -> IO b) -> IO b
withCStruct PhysicalDeviceLayeredApiPropertiesListKHR
x Ptr PhysicalDeviceLayeredApiPropertiesListKHR -> IO b
f = Int
-> (Ptr PhysicalDeviceLayeredApiPropertiesListKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PhysicalDeviceLayeredApiPropertiesListKHR -> IO b) -> IO b)
-> (Ptr PhysicalDeviceLayeredApiPropertiesListKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceLayeredApiPropertiesListKHR
p -> Ptr PhysicalDeviceLayeredApiPropertiesListKHR
-> PhysicalDeviceLayeredApiPropertiesListKHR -> IO b -> IO b
forall b.
Ptr PhysicalDeviceLayeredApiPropertiesListKHR
-> PhysicalDeviceLayeredApiPropertiesListKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceLayeredApiPropertiesListKHR
p PhysicalDeviceLayeredApiPropertiesListKHR
x (Ptr PhysicalDeviceLayeredApiPropertiesListKHR -> IO b
f Ptr PhysicalDeviceLayeredApiPropertiesListKHR
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceLayeredApiPropertiesListKHR
-> PhysicalDeviceLayeredApiPropertiesListKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceLayeredApiPropertiesListKHR
p PhysicalDeviceLayeredApiPropertiesListKHR{Word32
Ptr (PhysicalDeviceLayeredApiPropertiesKHR '[])
layeredApiCount :: PhysicalDeviceLayeredApiPropertiesListKHR -> Word32
layeredApis :: PhysicalDeviceLayeredApiPropertiesListKHR
-> Ptr (PhysicalDeviceLayeredApiPropertiesKHR '[])
layeredApiCount :: Word32
layeredApis :: Ptr (PhysicalDeviceLayeredApiPropertiesKHR '[])
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLayeredApiPropertiesListKHR
p Ptr PhysicalDeviceLayeredApiPropertiesListKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLayeredApiPropertiesListKHR
p Ptr PhysicalDeviceLayeredApiPropertiesListKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLayeredApiPropertiesListKHR
p Ptr PhysicalDeviceLayeredApiPropertiesListKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
layeredApiCount)
    Ptr (Ptr (PhysicalDeviceLayeredApiPropertiesKHR '[]))
-> Ptr (PhysicalDeviceLayeredApiPropertiesKHR '[]) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLayeredApiPropertiesListKHR
p Ptr PhysicalDeviceLayeredApiPropertiesListKHR
-> Int -> Ptr (Ptr (PhysicalDeviceLayeredApiPropertiesKHR w))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr (PhysicalDeviceLayeredApiPropertiesKHR _)))) (Ptr (PhysicalDeviceLayeredApiPropertiesKHR '[])
layeredApis)
    IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceLayeredApiPropertiesListKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceLayeredApiPropertiesListKHR
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLayeredApiPropertiesListKHR
p Ptr PhysicalDeviceLayeredApiPropertiesListKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLayeredApiPropertiesListKHR
p Ptr PhysicalDeviceLayeredApiPropertiesListKHR
-> 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 PhysicalDeviceLayeredApiPropertiesListKHR where
  peekCStruct :: Ptr PhysicalDeviceLayeredApiPropertiesListKHR
-> IO PhysicalDeviceLayeredApiPropertiesListKHR
peekCStruct Ptr PhysicalDeviceLayeredApiPropertiesListKHR
p = do
    layeredApiCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceLayeredApiPropertiesListKHR
p Ptr PhysicalDeviceLayeredApiPropertiesListKHR -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
    pLayeredApis <- peek @(Ptr (PhysicalDeviceLayeredApiPropertiesKHR _)) ((p `plusPtr` 24 :: Ptr (Ptr (PhysicalDeviceLayeredApiPropertiesKHR _))))
    pure $ PhysicalDeviceLayeredApiPropertiesListKHR
             layeredApiCount pLayeredApis

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

instance Zero PhysicalDeviceLayeredApiPropertiesListKHR where
  zero :: PhysicalDeviceLayeredApiPropertiesListKHR
zero = Word32
-> Ptr (PhysicalDeviceLayeredApiPropertiesKHR '[])
-> PhysicalDeviceLayeredApiPropertiesListKHR
PhysicalDeviceLayeredApiPropertiesListKHR
           Word32
forall a. Zero a => a
zero
           Ptr (PhysicalDeviceLayeredApiPropertiesKHR '[])
forall a. Zero a => a
zero


-- | VkPhysicalDeviceLayeredApiPropertiesKHR - Structure describing a single
-- layered implementation underneath the Vulkan physical device
--
-- = Description
--
-- If @layeredAPI@ is 'PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR', additional
-- Vulkan-specific information can be queried by including the
-- 'PhysicalDeviceLayeredApiVulkanPropertiesKHR' structure in the @pNext@
-- chain. Otherwise if such a structure is included in the @pNext@ chain,
-- it is ignored.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPhysicalDeviceLayeredApiPropertiesKHR-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR'
--
-- -   #VUID-VkPhysicalDeviceLayeredApiPropertiesKHR-pNext-pNext# @pNext@
--     /must/ be @NULL@ or a pointer to a valid instance of
--     'PhysicalDeviceLayeredApiVulkanPropertiesKHR'
--
-- -   #VUID-VkPhysicalDeviceLayeredApiPropertiesKHR-sType-unique# The
--     @sType@ value of each structure in the @pNext@ chain /must/ be
--     unique
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_maintenance7 VK_KHR_maintenance7>,
-- 'PhysicalDeviceLayeredApiKHR',
-- 'PhysicalDeviceLayeredApiPropertiesListKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceLayeredApiPropertiesKHR (es :: [Type]) = PhysicalDeviceLayeredApiPropertiesKHR
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> Chain es
next :: Chain es
  , -- | @vendorID@ is a unique identifier for the vendor of the layered
    -- implementation.
    forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> Word32
vendorID :: Word32
  , -- | @deviceID@ is a unique identifier for the layered implementation among
    -- devices available from the vendor.
    forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> Word32
deviceID :: Word32
  , -- | @layeredAPI@ is a 'PhysicalDeviceLayeredApiKHR' specifying the API
    -- implemented by the layered implementation.
    forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es
-> PhysicalDeviceLayeredApiKHR
layeredAPI :: PhysicalDeviceLayeredApiKHR
  , -- | @deviceName@ is an array of
    -- 'Vulkan.Core10.APIConstants.MAX_PHYSICAL_DEVICE_NAME_SIZE' @char@
    -- containing a null-terminated UTF-8 string which is the name of the
    -- device.
    forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> ByteString
deviceName :: ByteString
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceLayeredApiPropertiesKHR (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (PhysicalDeviceLayeredApiPropertiesKHR es)

instance Extensible PhysicalDeviceLayeredApiPropertiesKHR where
  extensibleTypeName :: String
extensibleTypeName = String
"PhysicalDeviceLayeredApiPropertiesKHR"
  setNext :: forall (ds :: [*]) (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR ds
-> Chain es -> PhysicalDeviceLayeredApiPropertiesKHR es
setNext PhysicalDeviceLayeredApiPropertiesKHR{Word32
ByteString
Chain ds
PhysicalDeviceLayeredApiKHR
next :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> Chain es
vendorID :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> Word32
deviceID :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> Word32
layeredAPI :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es
-> PhysicalDeviceLayeredApiKHR
deviceName :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> ByteString
next :: Chain ds
vendorID :: Word32
deviceID :: Word32
layeredAPI :: PhysicalDeviceLayeredApiKHR
deviceName :: ByteString
..} Chain es
next' = PhysicalDeviceLayeredApiPropertiesKHR{next :: Chain es
next = Chain es
next', Word32
ByteString
PhysicalDeviceLayeredApiKHR
vendorID :: Word32
deviceID :: Word32
layeredAPI :: PhysicalDeviceLayeredApiKHR
deviceName :: ByteString
vendorID :: Word32
deviceID :: Word32
layeredAPI :: PhysicalDeviceLayeredApiKHR
deviceName :: ByteString
..}
  getNext :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> Chain es
getNext PhysicalDeviceLayeredApiPropertiesKHR{Word32
ByteString
Chain es
PhysicalDeviceLayeredApiKHR
next :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> Chain es
vendorID :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> Word32
deviceID :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> Word32
layeredAPI :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es
-> PhysicalDeviceLayeredApiKHR
deviceName :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> ByteString
next :: Chain es
vendorID :: Word32
deviceID :: Word32
layeredAPI :: PhysicalDeviceLayeredApiKHR
deviceName :: ByteString
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends PhysicalDeviceLayeredApiPropertiesKHR e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends PhysicalDeviceLayeredApiPropertiesKHR e => b)
-> Maybe b
extends proxy e
_ Extends PhysicalDeviceLayeredApiPropertiesKHR e => b
f
    | Just e :~: PhysicalDeviceLayeredApiVulkanPropertiesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceLayeredApiVulkanPropertiesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends PhysicalDeviceLayeredApiPropertiesKHR e => b
f
    | Bool
otherwise = Maybe b
forall a. Maybe a
Nothing

instance ( Extendss PhysicalDeviceLayeredApiPropertiesKHR es
         , PokeChain es ) => ToCStruct (PhysicalDeviceLayeredApiPropertiesKHR es) where
  withCStruct :: forall b.
PhysicalDeviceLayeredApiPropertiesKHR es
-> (Ptr (PhysicalDeviceLayeredApiPropertiesKHR es) -> IO b) -> IO b
withCStruct PhysicalDeviceLayeredApiPropertiesKHR es
x Ptr (PhysicalDeviceLayeredApiPropertiesKHR es) -> IO b
f = Int
-> (Ptr (PhysicalDeviceLayeredApiPropertiesKHR es) -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
288 ((Ptr (PhysicalDeviceLayeredApiPropertiesKHR es) -> IO b) -> IO b)
-> (Ptr (PhysicalDeviceLayeredApiPropertiesKHR es) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
p -> Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
-> PhysicalDeviceLayeredApiPropertiesKHR es -> IO b -> IO b
forall b.
Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
-> PhysicalDeviceLayeredApiPropertiesKHR es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
p PhysicalDeviceLayeredApiPropertiesKHR es
x (Ptr (PhysicalDeviceLayeredApiPropertiesKHR es) -> IO b
f Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
p)
  pokeCStruct :: forall b.
Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
-> PhysicalDeviceLayeredApiPropertiesKHR es -> IO b -> IO b
pokeCStruct Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
p PhysicalDeviceLayeredApiPropertiesKHR{Word32
ByteString
Chain es
PhysicalDeviceLayeredApiKHR
next :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> Chain es
vendorID :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> Word32
deviceID :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> Word32
layeredAPI :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es
-> PhysicalDeviceLayeredApiKHR
deviceName :: forall (es :: [*]).
PhysicalDeviceLayeredApiPropertiesKHR es -> ByteString
next :: Chain es
vendorID :: Word32
deviceID :: Word32
layeredAPI :: PhysicalDeviceLayeredApiKHR
deviceName :: ByteString
..} 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 (PhysicalDeviceLayeredApiPropertiesKHR es)
p Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR)
    pNext'' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
    -> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
forall a. Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
    lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext''
    lift $ poke ((p `plusPtr` 16 :: Ptr Word32)) (vendorID)
    lift $ poke ((p `plusPtr` 20 :: Ptr Word32)) (deviceID)
    lift $ poke ((p `plusPtr` 24 :: Ptr PhysicalDeviceLayeredApiKHR)) (layeredAPI)
    lift $ pokeFixedLengthNullTerminatedByteString ((p `plusPtr` 28 :: Ptr (FixedArray MAX_PHYSICAL_DEVICE_NAME_SIZE CChar))) (deviceName)
    lift $ f
  cStructSize :: Int
cStructSize = Int
288
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr (PhysicalDeviceLayeredApiPropertiesKHR es) -> IO b -> IO b
pokeZeroCStruct Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
p Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR)
    pNext' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> ContT b IO a -> ContT b IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
    -> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
    lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext'
    lift $ poke ((p `plusPtr` 16 :: Ptr Word32)) (zero)
    lift $ poke ((p `plusPtr` 20 :: Ptr Word32)) (zero)
    lift $ poke ((p `plusPtr` 24 :: Ptr PhysicalDeviceLayeredApiKHR)) (zero)
    lift $ pokeFixedLengthNullTerminatedByteString ((p `plusPtr` 28 :: Ptr (FixedArray MAX_PHYSICAL_DEVICE_NAME_SIZE CChar))) (mempty)
    lift $ f

instance ( Extendss PhysicalDeviceLayeredApiPropertiesKHR es
         , PeekChain es ) => FromCStruct (PhysicalDeviceLayeredApiPropertiesKHR es) where
  peekCStruct :: Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
-> IO (PhysicalDeviceLayeredApiPropertiesKHR es)
peekCStruct Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
p = do
    pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
p Ptr (PhysicalDeviceLayeredApiPropertiesKHR es)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
    next <- peekChain (castPtr pNext)
    vendorID <- peek @Word32 ((p `plusPtr` 16 :: Ptr Word32))
    deviceID <- peek @Word32 ((p `plusPtr` 20 :: Ptr Word32))
    layeredAPI <- peek @PhysicalDeviceLayeredApiKHR ((p `plusPtr` 24 :: Ptr PhysicalDeviceLayeredApiKHR))
    deviceName <- packCString (lowerArrayPtr ((p `plusPtr` 28 :: Ptr (FixedArray MAX_PHYSICAL_DEVICE_NAME_SIZE CChar))))
    pure $ PhysicalDeviceLayeredApiPropertiesKHR
             next vendorID deviceID layeredAPI deviceName

instance es ~ '[] => Zero (PhysicalDeviceLayeredApiPropertiesKHR es) where
  zero :: PhysicalDeviceLayeredApiPropertiesKHR es
zero = Chain es
-> Word32
-> Word32
-> PhysicalDeviceLayeredApiKHR
-> ByteString
-> PhysicalDeviceLayeredApiPropertiesKHR es
forall (es :: [*]).
Chain es
-> Word32
-> Word32
-> PhysicalDeviceLayeredApiKHR
-> ByteString
-> PhysicalDeviceLayeredApiPropertiesKHR es
PhysicalDeviceLayeredApiPropertiesKHR
           ()
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           PhysicalDeviceLayeredApiKHR
forall a. Zero a => a
zero
           ByteString
forall a. Monoid a => a
mempty


-- | VkPhysicalDeviceLayeredApiVulkanPropertiesKHR - Structure describing
-- physical device properties of a layered Vulkan implementation underneath
-- the Vulkan physical device
--
-- = Description
--
-- The implementation /must/ zero-fill the contents of
-- @properties.properties.limits@ and
-- @properties.properties.sparseProperties@.
--
-- == Valid Usage
--
-- -   #VUID-VkPhysicalDeviceLayeredApiVulkanPropertiesKHR-pNext-10011#
--     Only
--     'Vulkan.Core12.Promoted_From_VK_KHR_driver_properties.PhysicalDeviceDriverProperties'
--     and
--     'Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.PhysicalDeviceIDProperties'
--     are allowed in the @pNext@ chain of @properties@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkPhysicalDeviceLayeredApiVulkanPropertiesKHR-sType-sType#
--     @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_KHR'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_maintenance7 VK_KHR_maintenance7>,
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceLayeredApiVulkanPropertiesKHR = PhysicalDeviceLayeredApiVulkanPropertiesKHR
  { -- | @properties@ is a
    -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2'
    -- in which properties of the underlying layered Vulkan implementation are
    -- returned.
    PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> SomeStruct PhysicalDeviceProperties2
properties :: SomeStruct PhysicalDeviceProperties2 }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceLayeredApiVulkanPropertiesKHR)
#endif
deriving instance Show PhysicalDeviceLayeredApiVulkanPropertiesKHR

instance ToCStruct PhysicalDeviceLayeredApiVulkanPropertiesKHR where
  withCStruct :: forall b.
PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> (Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR -> IO b)
-> IO b
withCStruct PhysicalDeviceLayeredApiVulkanPropertiesKHR
x Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR -> IO b
f = Int
-> (Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
856 ((Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR -> IO b) -> IO b)
-> (Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
p -> Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> PhysicalDeviceLayeredApiVulkanPropertiesKHR -> IO b -> IO b
forall b.
Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> PhysicalDeviceLayeredApiVulkanPropertiesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
p PhysicalDeviceLayeredApiVulkanPropertiesKHR
x (Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR -> IO b
f Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> PhysicalDeviceLayeredApiVulkanPropertiesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
p PhysicalDeviceLayeredApiVulkanPropertiesKHR{SomeStruct PhysicalDeviceProperties2
properties :: PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> SomeStruct PhysicalDeviceProperties2
properties :: SomeStruct PhysicalDeviceProperties2
..} 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 PhysicalDeviceLayeredApiVulkanPropertiesKHR
p Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_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 PhysicalDeviceLayeredApiVulkanPropertiesKHR
p Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    ((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (SomeStruct PhysicalDeviceProperties2)
-> SomeStruct PhysicalDeviceProperties2 -> IO b -> IO b
forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (Ptr (PhysicalDeviceProperties2 (ZonkAny 0))
-> Ptr (SomeStruct PhysicalDeviceProperties2)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ((Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
p Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> Int -> Ptr (PhysicalDeviceProperties2 w)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (PhysicalDeviceProperties2 _)))) (SomeStruct PhysicalDeviceProperties2
properties) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
    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
856
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
p Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_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 PhysicalDeviceLayeredApiVulkanPropertiesKHR
p Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    ((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (SomeStruct PhysicalDeviceProperties2)
-> SomeStruct PhysicalDeviceProperties2 -> IO b -> IO b
forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (Ptr (PhysicalDeviceProperties2 (ZonkAny 1))
-> Ptr (SomeStruct PhysicalDeviceProperties2)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ((Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
p Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> Int -> Ptr (PhysicalDeviceProperties2 w)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (PhysicalDeviceProperties2 _)))) ((PhysicalDeviceProperties2 '[]
-> SomeStruct PhysicalDeviceProperties2
forall (a :: [*] -> *) (es :: [*]).
(Extendss a es, PokeChain es, Show (Chain es)) =>
a es -> SomeStruct a
SomeStruct PhysicalDeviceProperties2 '[]
forall a. Zero a => a
zero)) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
    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

instance FromCStruct PhysicalDeviceLayeredApiVulkanPropertiesKHR where
  peekCStruct :: Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> IO PhysicalDeviceLayeredApiVulkanPropertiesKHR
peekCStruct Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
p = do
    properties <- Ptr (SomeStruct PhysicalDeviceProperties2)
-> IO (SomeStruct PhysicalDeviceProperties2)
forall (a :: [*] -> *).
(Extensible a,
 forall (es :: [*]).
 (Extendss a es, PeekChain es) =>
 FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (Ptr (PhysicalDeviceProperties2 (ZonkAny 2))
-> Ptr (SomeStruct PhysicalDeviceProperties2)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ((Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
p Ptr PhysicalDeviceLayeredApiVulkanPropertiesKHR
-> Int -> Ptr (PhysicalDeviceProperties2 w)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (PhysicalDeviceProperties2 _))))
    pure $ PhysicalDeviceLayeredApiVulkanPropertiesKHR
             properties

instance Zero PhysicalDeviceLayeredApiVulkanPropertiesKHR where
  zero :: PhysicalDeviceLayeredApiVulkanPropertiesKHR
zero = SomeStruct PhysicalDeviceProperties2
-> PhysicalDeviceLayeredApiVulkanPropertiesKHR
PhysicalDeviceLayeredApiVulkanPropertiesKHR
           (PhysicalDeviceProperties2 '[]
-> SomeStruct PhysicalDeviceProperties2
forall (a :: [*] -> *) (es :: [*]).
(Extendss a es, PokeChain es, Show (Chain es)) =>
a es -> SomeStruct a
SomeStruct PhysicalDeviceProperties2 '[]
forall a. Zero a => a
zero)


-- | VkPhysicalDeviceLayeredApiKHR - API implemented by the layered
-- implementation
--
-- = Description
--
-- -   'PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR' - the device implements the
--     Vulkan API.
--
-- -   'PHYSICAL_DEVICE_LAYERED_API_D3D12_KHR' - the device implements the
--     D3D12 API.
--
-- -   'PHYSICAL_DEVICE_LAYERED_API_METAL_KHR' - the device implements the
--     Metal API.
--
-- -   'PHYSICAL_DEVICE_LAYERED_API_OPENGL_KHR' - the device implements the
--     OpenGL API.
--
-- -   'PHYSICAL_DEVICE_LAYERED_API_OPENGLES_KHR' - the device implements
--     the OpenGL ES API.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_maintenance7 VK_KHR_maintenance7>,
-- 'PhysicalDeviceLayeredApiPropertiesKHR'
newtype PhysicalDeviceLayeredApiKHR = PhysicalDeviceLayeredApiKHR Int32
  deriving newtype (PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
(PhysicalDeviceLayeredApiKHR
 -> PhysicalDeviceLayeredApiKHR -> Bool)
-> (PhysicalDeviceLayeredApiKHR
    -> PhysicalDeviceLayeredApiKHR -> Bool)
-> Eq PhysicalDeviceLayeredApiKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
== :: PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
$c/= :: PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
/= :: PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
Eq, Eq PhysicalDeviceLayeredApiKHR
Eq PhysicalDeviceLayeredApiKHR =>
(PhysicalDeviceLayeredApiKHR
 -> PhysicalDeviceLayeredApiKHR -> Ordering)
-> (PhysicalDeviceLayeredApiKHR
    -> PhysicalDeviceLayeredApiKHR -> Bool)
-> (PhysicalDeviceLayeredApiKHR
    -> PhysicalDeviceLayeredApiKHR -> Bool)
-> (PhysicalDeviceLayeredApiKHR
    -> PhysicalDeviceLayeredApiKHR -> Bool)
-> (PhysicalDeviceLayeredApiKHR
    -> PhysicalDeviceLayeredApiKHR -> Bool)
-> (PhysicalDeviceLayeredApiKHR
    -> PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR)
-> (PhysicalDeviceLayeredApiKHR
    -> PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR)
-> Ord PhysicalDeviceLayeredApiKHR
PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
PhysicalDeviceLayeredApiKHR
-> PhysicalDeviceLayeredApiKHR -> Ordering
PhysicalDeviceLayeredApiKHR
-> PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR
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
$ccompare :: PhysicalDeviceLayeredApiKHR
-> PhysicalDeviceLayeredApiKHR -> Ordering
compare :: PhysicalDeviceLayeredApiKHR
-> PhysicalDeviceLayeredApiKHR -> Ordering
$c< :: PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
< :: PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
$c<= :: PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
<= :: PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
$c> :: PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
> :: PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
$c>= :: PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
>= :: PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR -> Bool
$cmax :: PhysicalDeviceLayeredApiKHR
-> PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR
max :: PhysicalDeviceLayeredApiKHR
-> PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR
$cmin :: PhysicalDeviceLayeredApiKHR
-> PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR
min :: PhysicalDeviceLayeredApiKHR
-> PhysicalDeviceLayeredApiKHR -> PhysicalDeviceLayeredApiKHR
Ord, Ptr PhysicalDeviceLayeredApiKHR -> IO PhysicalDeviceLayeredApiKHR
Ptr PhysicalDeviceLayeredApiKHR
-> Int -> IO PhysicalDeviceLayeredApiKHR
Ptr PhysicalDeviceLayeredApiKHR
-> Int -> PhysicalDeviceLayeredApiKHR -> IO ()
Ptr PhysicalDeviceLayeredApiKHR
-> PhysicalDeviceLayeredApiKHR -> IO ()
PhysicalDeviceLayeredApiKHR -> Int
(PhysicalDeviceLayeredApiKHR -> Int)
-> (PhysicalDeviceLayeredApiKHR -> Int)
-> (Ptr PhysicalDeviceLayeredApiKHR
    -> Int -> IO PhysicalDeviceLayeredApiKHR)
-> (Ptr PhysicalDeviceLayeredApiKHR
    -> Int -> PhysicalDeviceLayeredApiKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO PhysicalDeviceLayeredApiKHR)
-> (forall b. Ptr b -> Int -> PhysicalDeviceLayeredApiKHR -> IO ())
-> (Ptr PhysicalDeviceLayeredApiKHR
    -> IO PhysicalDeviceLayeredApiKHR)
-> (Ptr PhysicalDeviceLayeredApiKHR
    -> PhysicalDeviceLayeredApiKHR -> IO ())
-> Storable PhysicalDeviceLayeredApiKHR
forall b. Ptr b -> Int -> IO PhysicalDeviceLayeredApiKHR
forall b. Ptr b -> Int -> PhysicalDeviceLayeredApiKHR -> 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
$csizeOf :: PhysicalDeviceLayeredApiKHR -> Int
sizeOf :: PhysicalDeviceLayeredApiKHR -> Int
$calignment :: PhysicalDeviceLayeredApiKHR -> Int
alignment :: PhysicalDeviceLayeredApiKHR -> Int
$cpeekElemOff :: Ptr PhysicalDeviceLayeredApiKHR
-> Int -> IO PhysicalDeviceLayeredApiKHR
peekElemOff :: Ptr PhysicalDeviceLayeredApiKHR
-> Int -> IO PhysicalDeviceLayeredApiKHR
$cpokeElemOff :: Ptr PhysicalDeviceLayeredApiKHR
-> Int -> PhysicalDeviceLayeredApiKHR -> IO ()
pokeElemOff :: Ptr PhysicalDeviceLayeredApiKHR
-> Int -> PhysicalDeviceLayeredApiKHR -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PhysicalDeviceLayeredApiKHR
peekByteOff :: forall b. Ptr b -> Int -> IO PhysicalDeviceLayeredApiKHR
$cpokeByteOff :: forall b. Ptr b -> Int -> PhysicalDeviceLayeredApiKHR -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> PhysicalDeviceLayeredApiKHR -> IO ()
$cpeek :: Ptr PhysicalDeviceLayeredApiKHR -> IO PhysicalDeviceLayeredApiKHR
peek :: Ptr PhysicalDeviceLayeredApiKHR -> IO PhysicalDeviceLayeredApiKHR
$cpoke :: Ptr PhysicalDeviceLayeredApiKHR
-> PhysicalDeviceLayeredApiKHR -> IO ()
poke :: Ptr PhysicalDeviceLayeredApiKHR
-> PhysicalDeviceLayeredApiKHR -> IO ()
Storable, PhysicalDeviceLayeredApiKHR
PhysicalDeviceLayeredApiKHR -> Zero PhysicalDeviceLayeredApiKHR
forall a. a -> Zero a
$czero :: PhysicalDeviceLayeredApiKHR
zero :: PhysicalDeviceLayeredApiKHR
Zero)

-- No documentation found for Nested "VkPhysicalDeviceLayeredApiKHR" "VK_PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR"
pattern $mPHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR :: forall {r}.
PhysicalDeviceLayeredApiKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bPHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR :: PhysicalDeviceLayeredApiKHR
PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR = PhysicalDeviceLayeredApiKHR 0

-- No documentation found for Nested "VkPhysicalDeviceLayeredApiKHR" "VK_PHYSICAL_DEVICE_LAYERED_API_D3D12_KHR"
pattern $mPHYSICAL_DEVICE_LAYERED_API_D3D12_KHR :: forall {r}.
PhysicalDeviceLayeredApiKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bPHYSICAL_DEVICE_LAYERED_API_D3D12_KHR :: PhysicalDeviceLayeredApiKHR
PHYSICAL_DEVICE_LAYERED_API_D3D12_KHR = PhysicalDeviceLayeredApiKHR 1

-- No documentation found for Nested "VkPhysicalDeviceLayeredApiKHR" "VK_PHYSICAL_DEVICE_LAYERED_API_METAL_KHR"
pattern $mPHYSICAL_DEVICE_LAYERED_API_METAL_KHR :: forall {r}.
PhysicalDeviceLayeredApiKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bPHYSICAL_DEVICE_LAYERED_API_METAL_KHR :: PhysicalDeviceLayeredApiKHR
PHYSICAL_DEVICE_LAYERED_API_METAL_KHR = PhysicalDeviceLayeredApiKHR 2

-- No documentation found for Nested "VkPhysicalDeviceLayeredApiKHR" "VK_PHYSICAL_DEVICE_LAYERED_API_OPENGL_KHR"
pattern $mPHYSICAL_DEVICE_LAYERED_API_OPENGL_KHR :: forall {r}.
PhysicalDeviceLayeredApiKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bPHYSICAL_DEVICE_LAYERED_API_OPENGL_KHR :: PhysicalDeviceLayeredApiKHR
PHYSICAL_DEVICE_LAYERED_API_OPENGL_KHR = PhysicalDeviceLayeredApiKHR 3

-- No documentation found for Nested "VkPhysicalDeviceLayeredApiKHR" "VK_PHYSICAL_DEVICE_LAYERED_API_OPENGLES_KHR"
pattern $mPHYSICAL_DEVICE_LAYERED_API_OPENGLES_KHR :: forall {r}.
PhysicalDeviceLayeredApiKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bPHYSICAL_DEVICE_LAYERED_API_OPENGLES_KHR :: PhysicalDeviceLayeredApiKHR
PHYSICAL_DEVICE_LAYERED_API_OPENGLES_KHR = PhysicalDeviceLayeredApiKHR 4

{-# COMPLETE
  PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR
  , PHYSICAL_DEVICE_LAYERED_API_D3D12_KHR
  , PHYSICAL_DEVICE_LAYERED_API_METAL_KHR
  , PHYSICAL_DEVICE_LAYERED_API_OPENGL_KHR
  , PHYSICAL_DEVICE_LAYERED_API_OPENGLES_KHR ::
    PhysicalDeviceLayeredApiKHR
  #-}

conNamePhysicalDeviceLayeredApiKHR :: String
conNamePhysicalDeviceLayeredApiKHR :: String
conNamePhysicalDeviceLayeredApiKHR = String
"PhysicalDeviceLayeredApiKHR"

enumPrefixPhysicalDeviceLayeredApiKHR :: String
enumPrefixPhysicalDeviceLayeredApiKHR :: String
enumPrefixPhysicalDeviceLayeredApiKHR = String
"PHYSICAL_DEVICE_LAYERED_API_"

showTablePhysicalDeviceLayeredApiKHR :: [(PhysicalDeviceLayeredApiKHR, String)]
showTablePhysicalDeviceLayeredApiKHR :: [(PhysicalDeviceLayeredApiKHR, String)]
showTablePhysicalDeviceLayeredApiKHR =
  [
    ( PhysicalDeviceLayeredApiKHR
PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR
    , String
"VULKAN_KHR"
    )
  ,
    ( PhysicalDeviceLayeredApiKHR
PHYSICAL_DEVICE_LAYERED_API_D3D12_KHR
    , String
"D3D12_KHR"
    )
  ,
    ( PhysicalDeviceLayeredApiKHR
PHYSICAL_DEVICE_LAYERED_API_METAL_KHR
    , String
"METAL_KHR"
    )
  ,
    ( PhysicalDeviceLayeredApiKHR
PHYSICAL_DEVICE_LAYERED_API_OPENGL_KHR
    , String
"OPENGL_KHR"
    )
  ,
    ( PhysicalDeviceLayeredApiKHR
PHYSICAL_DEVICE_LAYERED_API_OPENGLES_KHR
    , String
"OPENGLES_KHR"
    )
  ]

instance Show PhysicalDeviceLayeredApiKHR where
  showsPrec :: Int -> PhysicalDeviceLayeredApiKHR -> ShowS
showsPrec =
    String
-> [(PhysicalDeviceLayeredApiKHR, String)]
-> String
-> (PhysicalDeviceLayeredApiKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> PhysicalDeviceLayeredApiKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixPhysicalDeviceLayeredApiKHR
      [(PhysicalDeviceLayeredApiKHR, String)]
showTablePhysicalDeviceLayeredApiKHR
      String
conNamePhysicalDeviceLayeredApiKHR
      (\(PhysicalDeviceLayeredApiKHR Int32
x) -> Int32
x)
      (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read PhysicalDeviceLayeredApiKHR where
  readPrec :: ReadPrec PhysicalDeviceLayeredApiKHR
readPrec =
    String
-> [(PhysicalDeviceLayeredApiKHR, String)]
-> String
-> (Int32 -> PhysicalDeviceLayeredApiKHR)
-> ReadPrec PhysicalDeviceLayeredApiKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixPhysicalDeviceLayeredApiKHR
      [(PhysicalDeviceLayeredApiKHR, String)]
showTablePhysicalDeviceLayeredApiKHR
      String
conNamePhysicalDeviceLayeredApiKHR
      Int32 -> PhysicalDeviceLayeredApiKHR
PhysicalDeviceLayeredApiKHR

type KHR_MAINTENANCE_7_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_KHR_MAINTENANCE_7_SPEC_VERSION"
pattern KHR_MAINTENANCE_7_SPEC_VERSION :: forall a . Integral a => a
pattern $mKHR_MAINTENANCE_7_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bKHR_MAINTENANCE_7_SPEC_VERSION :: forall a. Integral a => a
KHR_MAINTENANCE_7_SPEC_VERSION = 1


type KHR_MAINTENANCE_7_EXTENSION_NAME = "VK_KHR_maintenance7"

-- No documentation found for TopLevel "VK_KHR_MAINTENANCE_7_EXTENSION_NAME"
pattern KHR_MAINTENANCE_7_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mKHR_MAINTENANCE_7_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bKHR_MAINTENANCE_7_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
KHR_MAINTENANCE_7_EXTENSION_NAME = "VK_KHR_maintenance7"