{-# language CPP #-}
-- | = Name
--
-- VK_SEC_pipeline_cache_incremental_mode - device extension
--
-- = VK_SEC_pipeline_cache_incremental_mode
--
-- [__Name String__]
--     @VK_SEC_pipeline_cache_incremental_mode@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     638
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_get_physical_device_properties2 VK_KHR_get_physical_device_properties2>
--     or
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#versions-1.1 Vulkan Version 1.1>
--
-- [__Contact__]
--
--     -   Chris Hambacher
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_SEC_pipeline_cache_incremental_mode] @chambacher%0A*Here describe the issue or question you have about the VK_SEC_pipeline_cache_incremental_mode extension* >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2025-06-24
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Contributors__]
--
--     -   Chris Hambacher, Samsung
--
--     -   Mohan Maiya, Samsung
--
--     -   Brandon Schade, Samsung
--
-- == Description
--
-- This extension allows layered implementations such as ANGLE to modify
-- the default behavior of VkPipelineCache to return only the incremental
-- data from the previous call to vkGetPipelineCacheData. Application
-- developers should avoid using this extension.
--
-- There is currently no specification language written for this extension.
-- The links to APIs defined by the extension are to stubs that only
-- include generated content such as API declarations and implicit valid
-- usage statements.
--
-- This extension is only intended for use in specific embedded
-- environments with known implementation details, and is therefore
-- undocumented.
--
-- == New Structures
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC'
--
-- == New Enum Constants
--
-- -   'SEC_PIPELINE_CACHE_INCREMENTAL_MODE_EXTENSION_NAME'
--
-- -   'SEC_PIPELINE_CACHE_INCREMENTAL_MODE_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CACHE_INCREMENTAL_MODE_FEATURES_SEC'
--
-- == Stub API References
--
-- There is currently no specification language written for this type. This
-- section acts only as placeholder and to avoid dead links in the
-- specification and reference pages.
--
-- > // Provided by VK_SEC_pipeline_cache_incremental_mode
-- > typedef struct VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC {
-- >     VkStructureType    sType;
-- >     void*              pNext;
-- >     VkBool32           pipelineCacheIncrementalMode;
-- > } VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC;
--
-- === Valid Usage (Implicit)
--
-- -   #VUID-VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC-sType-sType#
--     @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CACHE_INCREMENTAL_MODE_FEATURES_SEC'
--
-- == Version History
--
-- -   Revision 1, 2025-06-24 (Chris Hambacher)
--
--     -   Initial specification
--
-- == 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_SEC_pipeline_cache_incremental_mode Vulkan Specification>.
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_SEC_pipeline_cache_incremental_mode  ( PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC(..)
                                                                 , SEC_PIPELINE_CACHE_INCREMENTAL_MODE_SPEC_VERSION
                                                                 , pattern SEC_PIPELINE_CACHE_INCREMENTAL_MODE_SPEC_VERSION
                                                                 , SEC_PIPELINE_CACHE_INCREMENTAL_MODE_EXTENSION_NAME
                                                                 , pattern SEC_PIPELINE_CACHE_INCREMENTAL_MODE_EXTENSION_NAME
                                                                 ) where

import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import Foreign.Ptr (Ptr)
import Data.Kind (Type)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CACHE_INCREMENTAL_MODE_FEATURES_SEC))
-- | VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC - Stub
-- description of VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_SEC_pipeline_cache_incremental_mode VK_SEC_pipeline_cache_incremental_mode>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC = PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC
  { -- No documentation found for Nested "VkPhysicalDevicePipelineCacheIncrementalModeFeaturesSEC" "pipelineCacheIncrementalMode"
    PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC -> Bool
pipelineCacheIncrementalMode :: Bool }
  deriving (Typeable, PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC
-> PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC -> Bool
(PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC
 -> PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC -> Bool)
-> (PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC
    -> PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC -> Bool)
-> Eq PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC
-> PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC -> Bool
== :: PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC
-> PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC -> Bool
$c/= :: PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC
-> PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC -> Bool
/= :: PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC
-> PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC)
#endif
deriving instance Show PhysicalDevicePipelineCacheIncrementalModeFeaturesSEC

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

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

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


type SEC_PIPELINE_CACHE_INCREMENTAL_MODE_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_SEC_PIPELINE_CACHE_INCREMENTAL_MODE_SPEC_VERSION"
pattern SEC_PIPELINE_CACHE_INCREMENTAL_MODE_SPEC_VERSION :: forall a . Integral a => a
pattern $mSEC_PIPELINE_CACHE_INCREMENTAL_MODE_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bSEC_PIPELINE_CACHE_INCREMENTAL_MODE_SPEC_VERSION :: forall a. Integral a => a
SEC_PIPELINE_CACHE_INCREMENTAL_MODE_SPEC_VERSION = 1


type SEC_PIPELINE_CACHE_INCREMENTAL_MODE_EXTENSION_NAME = "VK_SEC_pipeline_cache_incremental_mode"

-- No documentation found for TopLevel "VK_SEC_PIPELINE_CACHE_INCREMENTAL_MODE_EXTENSION_NAME"
pattern SEC_PIPELINE_CACHE_INCREMENTAL_MODE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mSEC_PIPELINE_CACHE_INCREMENTAL_MODE_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bSEC_PIPELINE_CACHE_INCREMENTAL_MODE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
SEC_PIPELINE_CACHE_INCREMENTAL_MODE_EXTENSION_NAME = "VK_SEC_pipeline_cache_incremental_mode"