{-# language CPP #-}
module Vulkan.Core10.Enums.PipelineCacheCreateFlagBits  ( PipelineCacheCreateFlagBits( PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT
                                                                                     , ..
                                                                                     )
                                                        , PipelineCacheCreateFlags
                                                        ) where

import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Data.Bits (Bits)
import Foreign.Storable (Storable)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Vulkan.Core10.BaseType (Flags)
import Vulkan.Zero (Zero)
-- | VkPipelineCacheCreateFlagBits - Bitmask specifying the behavior of the
-- pipeline cache
--
-- = See Also
--
-- 'PipelineCacheCreateFlags'
newtype PipelineCacheCreateFlagBits = PipelineCacheCreateFlagBits Flags
  deriving newtype (PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
(PipelineCacheCreateFlagBits
 -> PipelineCacheCreateFlagBits -> Bool)
-> (PipelineCacheCreateFlagBits
    -> PipelineCacheCreateFlagBits -> Bool)
-> Eq PipelineCacheCreateFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
$c/= :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
== :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
$c== :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
Eq, Eq PipelineCacheCreateFlagBits
Eq PipelineCacheCreateFlagBits =>
(PipelineCacheCreateFlagBits
 -> PipelineCacheCreateFlagBits -> Ordering)
-> (PipelineCacheCreateFlagBits
    -> PipelineCacheCreateFlagBits -> Bool)
-> (PipelineCacheCreateFlagBits
    -> PipelineCacheCreateFlagBits -> Bool)
-> (PipelineCacheCreateFlagBits
    -> PipelineCacheCreateFlagBits -> Bool)
-> (PipelineCacheCreateFlagBits
    -> PipelineCacheCreateFlagBits -> Bool)
-> (PipelineCacheCreateFlagBits
    -> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits
    -> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits)
-> Ord PipelineCacheCreateFlagBits
PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> Ordering
PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
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 :: PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
$cmin :: PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
max :: PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
$cmax :: PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
>= :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
$c>= :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
> :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
$c> :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
<= :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
$c<= :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
< :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
$c< :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits -> Bool
compare :: PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> Ordering
$ccompare :: PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> Ordering
$cp1Ord :: Eq PipelineCacheCreateFlagBits
Ord, Ptr b -> Int -> IO PipelineCacheCreateFlagBits
Ptr b -> Int -> PipelineCacheCreateFlagBits -> IO ()
Ptr PipelineCacheCreateFlagBits -> IO PipelineCacheCreateFlagBits
Ptr PipelineCacheCreateFlagBits
-> Int -> IO PipelineCacheCreateFlagBits
Ptr PipelineCacheCreateFlagBits
-> Int -> PipelineCacheCreateFlagBits -> IO ()
Ptr PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> IO ()
PipelineCacheCreateFlagBits -> Int
(PipelineCacheCreateFlagBits -> Int)
-> (PipelineCacheCreateFlagBits -> Int)
-> (Ptr PipelineCacheCreateFlagBits
    -> Int -> IO PipelineCacheCreateFlagBits)
-> (Ptr PipelineCacheCreateFlagBits
    -> Int -> PipelineCacheCreateFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO PipelineCacheCreateFlagBits)
-> (forall b. Ptr b -> Int -> PipelineCacheCreateFlagBits -> IO ())
-> (Ptr PipelineCacheCreateFlagBits
    -> IO PipelineCacheCreateFlagBits)
-> (Ptr PipelineCacheCreateFlagBits
    -> PipelineCacheCreateFlagBits -> IO ())
-> Storable PipelineCacheCreateFlagBits
forall b. Ptr b -> Int -> IO PipelineCacheCreateFlagBits
forall b. Ptr b -> Int -> PipelineCacheCreateFlagBits -> 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 PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> IO ()
$cpoke :: Ptr PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> IO ()
peek :: Ptr PipelineCacheCreateFlagBits -> IO PipelineCacheCreateFlagBits
$cpeek :: Ptr PipelineCacheCreateFlagBits -> IO PipelineCacheCreateFlagBits
pokeByteOff :: Ptr b -> Int -> PipelineCacheCreateFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PipelineCacheCreateFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO PipelineCacheCreateFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PipelineCacheCreateFlagBits
pokeElemOff :: Ptr PipelineCacheCreateFlagBits
-> Int -> PipelineCacheCreateFlagBits -> IO ()
$cpokeElemOff :: Ptr PipelineCacheCreateFlagBits
-> Int -> PipelineCacheCreateFlagBits -> IO ()
peekElemOff :: Ptr PipelineCacheCreateFlagBits
-> Int -> IO PipelineCacheCreateFlagBits
$cpeekElemOff :: Ptr PipelineCacheCreateFlagBits
-> Int -> IO PipelineCacheCreateFlagBits
alignment :: PipelineCacheCreateFlagBits -> Int
$calignment :: PipelineCacheCreateFlagBits -> Int
sizeOf :: PipelineCacheCreateFlagBits -> Int
$csizeOf :: PipelineCacheCreateFlagBits -> Int
Storable, PipelineCacheCreateFlagBits
PipelineCacheCreateFlagBits -> Zero PipelineCacheCreateFlagBits
forall a. a -> Zero a
zero :: PipelineCacheCreateFlagBits
$czero :: PipelineCacheCreateFlagBits
Zero, Eq PipelineCacheCreateFlagBits
PipelineCacheCreateFlagBits
Eq PipelineCacheCreateFlagBits =>
(PipelineCacheCreateFlagBits
 -> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits
    -> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits
    -> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits
    -> Int -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits
    -> Int -> PipelineCacheCreateFlagBits)
-> PipelineCacheCreateFlagBits
-> (Int -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits
    -> Int -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits
    -> Int -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits
    -> Int -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits -> Int -> Bool)
-> (PipelineCacheCreateFlagBits -> Maybe Int)
-> (PipelineCacheCreateFlagBits -> Int)
-> (PipelineCacheCreateFlagBits -> Bool)
-> (PipelineCacheCreateFlagBits
    -> Int -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits
    -> Int -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits
    -> Int -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits
    -> Int -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits
    -> Int -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits
    -> Int -> PipelineCacheCreateFlagBits)
-> (PipelineCacheCreateFlagBits -> Int)
-> Bits PipelineCacheCreateFlagBits
Int -> PipelineCacheCreateFlagBits
PipelineCacheCreateFlagBits -> Bool
PipelineCacheCreateFlagBits -> Int
PipelineCacheCreateFlagBits -> Maybe Int
PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
PipelineCacheCreateFlagBits -> Int -> Bool
PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
forall a.
Eq a =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: PipelineCacheCreateFlagBits -> Int
$cpopCount :: PipelineCacheCreateFlagBits -> Int
rotateR :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
$crotateR :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
rotateL :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
$crotateL :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
unsafeShiftR :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
$cunsafeShiftR :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
shiftR :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
$cshiftR :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
unsafeShiftL :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
$cunsafeShiftL :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
shiftL :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
$cshiftL :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
isSigned :: PipelineCacheCreateFlagBits -> Bool
$cisSigned :: PipelineCacheCreateFlagBits -> Bool
bitSize :: PipelineCacheCreateFlagBits -> Int
$cbitSize :: PipelineCacheCreateFlagBits -> Int
bitSizeMaybe :: PipelineCacheCreateFlagBits -> Maybe Int
$cbitSizeMaybe :: PipelineCacheCreateFlagBits -> Maybe Int
testBit :: PipelineCacheCreateFlagBits -> Int -> Bool
$ctestBit :: PipelineCacheCreateFlagBits -> Int -> Bool
complementBit :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
$ccomplementBit :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
clearBit :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
$cclearBit :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
setBit :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
$csetBit :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
bit :: Int -> PipelineCacheCreateFlagBits
$cbit :: Int -> PipelineCacheCreateFlagBits
zeroBits :: PipelineCacheCreateFlagBits
$czeroBits :: PipelineCacheCreateFlagBits
rotate :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
$crotate :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
shift :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
$cshift :: PipelineCacheCreateFlagBits -> Int -> PipelineCacheCreateFlagBits
complement :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
$ccomplement :: PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
xor :: PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
$cxor :: PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
.|. :: PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
$c.|. :: PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
.&. :: PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
$c.&. :: PipelineCacheCreateFlagBits
-> PipelineCacheCreateFlagBits -> PipelineCacheCreateFlagBits
$cp1Bits :: Eq PipelineCacheCreateFlagBits
Bits)

-- | 'PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT' specifies that
-- all commands that modify the created
-- 'Vulkan.Core10.Handles.PipelineCache' will be
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-threadingbehavior externally synchronized>.
-- When set, the implementation /may/ skip any unnecessary processing
-- needed to support simultaneous modification from multiple threads where
-- allowed.
pattern $bPIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT :: PipelineCacheCreateFlagBits
$mPIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT :: forall r.
PipelineCacheCreateFlagBits -> (Void# -> r) -> (Void# -> r) -> r
PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT = PipelineCacheCreateFlagBits 0x00000001

type PipelineCacheCreateFlags = PipelineCacheCreateFlagBits

instance Show PipelineCacheCreateFlagBits where
  showsPrec :: Int -> PipelineCacheCreateFlagBits -> ShowS
showsPrec p :: Int
p = \case
    PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT -> String -> ShowS
showString "PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT"
    PipelineCacheCreateFlagBits x :: Flags
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "PipelineCacheCreateFlagBits 0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read PipelineCacheCreateFlagBits where
  readPrec :: ReadPrec PipelineCacheCreateFlagBits
readPrec = ReadPrec PipelineCacheCreateFlagBits
-> ReadPrec PipelineCacheCreateFlagBits
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec PipelineCacheCreateFlagBits)]
-> ReadPrec PipelineCacheCreateFlagBits
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT", PipelineCacheCreateFlagBits -> ReadPrec PipelineCacheCreateFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure PipelineCacheCreateFlagBits
PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT)]
                     ReadPrec PipelineCacheCreateFlagBits
-> ReadPrec PipelineCacheCreateFlagBits
-> ReadPrec PipelineCacheCreateFlagBits
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec PipelineCacheCreateFlagBits
-> ReadPrec PipelineCacheCreateFlagBits
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "PipelineCacheCreateFlagBits")
                       Flags
v <- ReadPrec Flags -> ReadPrec Flags
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Flags
forall a. Read a => ReadPrec a
readPrec
                       PipelineCacheCreateFlagBits -> ReadPrec PipelineCacheCreateFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags -> PipelineCacheCreateFlagBits
PipelineCacheCreateFlagBits Flags
v)))