{-# language CPP #-}
-- No documentation found for Chapter "PipelineCacheHeaderVersion"
module Vulkan.Core10.Enums.PipelineCacheHeaderVersion  (PipelineCacheHeaderVersion( PIPELINE_CACHE_HEADER_VERSION_ONE
                                                                                  , PIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE
                                                                                  , ..
                                                                                  )) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showsPrec)
import Vulkan.Zero (Zero)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))

-- | VkPipelineCacheHeaderVersion - Encode pipeline cache version
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'Vulkan.Core10.OtherTypes.PipelineCacheHeaderVersionOne',
-- 'Vulkan.Core10.PipelineCache.createPipelineCache',
-- 'Vulkan.Core10.PipelineCache.getPipelineCacheData'
newtype PipelineCacheHeaderVersion = PipelineCacheHeaderVersion Int32
  deriving newtype (PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
$c/= :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
== :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
$c== :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
Eq, Eq PipelineCacheHeaderVersion
PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> Ordering
PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion
$cmin :: PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion
max :: PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion
$cmax :: PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion
>= :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
$c>= :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
> :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
$c> :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
<= :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
$c<= :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
< :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
$c< :: PipelineCacheHeaderVersion -> PipelineCacheHeaderVersion -> Bool
compare :: PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> Ordering
$ccompare :: PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> Ordering
Ord, Ptr PipelineCacheHeaderVersion -> IO PipelineCacheHeaderVersion
Ptr PipelineCacheHeaderVersion
-> Int -> IO PipelineCacheHeaderVersion
Ptr PipelineCacheHeaderVersion
-> Int -> PipelineCacheHeaderVersion -> IO ()
Ptr PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> IO ()
PipelineCacheHeaderVersion -> Int
forall b. Ptr b -> Int -> IO PipelineCacheHeaderVersion
forall b. Ptr b -> Int -> PipelineCacheHeaderVersion -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> IO ()
$cpoke :: Ptr PipelineCacheHeaderVersion
-> PipelineCacheHeaderVersion -> IO ()
peek :: Ptr PipelineCacheHeaderVersion -> IO PipelineCacheHeaderVersion
$cpeek :: Ptr PipelineCacheHeaderVersion -> IO PipelineCacheHeaderVersion
pokeByteOff :: forall b. Ptr b -> Int -> PipelineCacheHeaderVersion -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PipelineCacheHeaderVersion -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO PipelineCacheHeaderVersion
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PipelineCacheHeaderVersion
pokeElemOff :: Ptr PipelineCacheHeaderVersion
-> Int -> PipelineCacheHeaderVersion -> IO ()
$cpokeElemOff :: Ptr PipelineCacheHeaderVersion
-> Int -> PipelineCacheHeaderVersion -> IO ()
peekElemOff :: Ptr PipelineCacheHeaderVersion
-> Int -> IO PipelineCacheHeaderVersion
$cpeekElemOff :: Ptr PipelineCacheHeaderVersion
-> Int -> IO PipelineCacheHeaderVersion
alignment :: PipelineCacheHeaderVersion -> Int
$calignment :: PipelineCacheHeaderVersion -> Int
sizeOf :: PipelineCacheHeaderVersion -> Int
$csizeOf :: PipelineCacheHeaderVersion -> Int
Storable, PipelineCacheHeaderVersion
forall a. a -> Zero a
zero :: PipelineCacheHeaderVersion
$czero :: PipelineCacheHeaderVersion
Zero)

-- Note that the zero instance does not produce a valid value, passing 'zero' to Vulkan will result in an error

-- | 'PIPELINE_CACHE_HEADER_VERSION_ONE' specifies version one of the
-- pipeline cache, described by
-- 'Vulkan.Core10.OtherTypes.PipelineCacheHeaderVersionOne'.
pattern $bPIPELINE_CACHE_HEADER_VERSION_ONE :: PipelineCacheHeaderVersion
$mPIPELINE_CACHE_HEADER_VERSION_ONE :: forall {r}.
PipelineCacheHeaderVersion -> ((# #) -> r) -> ((# #) -> r) -> r
PIPELINE_CACHE_HEADER_VERSION_ONE = PipelineCacheHeaderVersion 1

-- No documentation found for Nested "VkPipelineCacheHeaderVersion" "VK_PIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE"
pattern $bPIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE :: PipelineCacheHeaderVersion
$mPIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE :: forall {r}.
PipelineCacheHeaderVersion -> ((# #) -> r) -> ((# #) -> r) -> r
PIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE = PipelineCacheHeaderVersion 1000298001

{-# COMPLETE
  PIPELINE_CACHE_HEADER_VERSION_ONE
  , PIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE ::
    PipelineCacheHeaderVersion
  #-}

conNamePipelineCacheHeaderVersion :: String
conNamePipelineCacheHeaderVersion :: String
conNamePipelineCacheHeaderVersion = String
"PipelineCacheHeaderVersion"

enumPrefixPipelineCacheHeaderVersion :: String
enumPrefixPipelineCacheHeaderVersion :: String
enumPrefixPipelineCacheHeaderVersion = String
"PIPELINE_CACHE_HEADER_VERSION_"

showTablePipelineCacheHeaderVersion :: [(PipelineCacheHeaderVersion, String)]
showTablePipelineCacheHeaderVersion :: [(PipelineCacheHeaderVersion, String)]
showTablePipelineCacheHeaderVersion =
  [
    ( PipelineCacheHeaderVersion
PIPELINE_CACHE_HEADER_VERSION_ONE
    , String
"ONE"
    )
  ,
    ( PipelineCacheHeaderVersion
PIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE
    , String
"SAFETY_CRITICAL_ONE"
    )
  ]

instance Show PipelineCacheHeaderVersion where
  showsPrec :: Int -> PipelineCacheHeaderVersion -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixPipelineCacheHeaderVersion
      [(PipelineCacheHeaderVersion, String)]
showTablePipelineCacheHeaderVersion
      String
conNamePipelineCacheHeaderVersion
      (\(PipelineCacheHeaderVersion Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read PipelineCacheHeaderVersion where
  readPrec :: ReadPrec PipelineCacheHeaderVersion
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixPipelineCacheHeaderVersion
      [(PipelineCacheHeaderVersion, String)]
showTablePipelineCacheHeaderVersion
      String
conNamePipelineCacheHeaderVersion
      Int32 -> PipelineCacheHeaderVersion
PipelineCacheHeaderVersion