{-# language CPP #-}
module Vulkan.Core12.Enums.SemaphoreWaitFlagBits  ( SemaphoreWaitFlagBits( SEMAPHORE_WAIT_ANY_BIT
                                                                         , ..
                                                                         )
                                                  , SemaphoreWaitFlags
                                                  ) 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)
-- | VkSemaphoreWaitFlagBits - Bitmask specifying additional parameters of a
-- semaphore wait operation
--
-- = See Also
--
-- 'SemaphoreWaitFlags'
newtype SemaphoreWaitFlagBits = SemaphoreWaitFlagBits Flags
  deriving newtype (SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
(SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool)
-> (SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool)
-> Eq SemaphoreWaitFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
$c/= :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
== :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
$c== :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
Eq, Eq SemaphoreWaitFlagBits
Eq SemaphoreWaitFlagBits =>
(SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Ordering)
-> (SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool)
-> (SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool)
-> (SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool)
-> (SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool)
-> (SemaphoreWaitFlagBits
    -> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits
    -> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits)
-> Ord SemaphoreWaitFlagBits
SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Ordering
SemaphoreWaitFlagBits
-> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
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 :: SemaphoreWaitFlagBits
-> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
$cmin :: SemaphoreWaitFlagBits
-> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
max :: SemaphoreWaitFlagBits
-> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
$cmax :: SemaphoreWaitFlagBits
-> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
>= :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
$c>= :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
> :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
$c> :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
<= :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
$c<= :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
< :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
$c< :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Bool
compare :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Ordering
$ccompare :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> Ordering
$cp1Ord :: Eq SemaphoreWaitFlagBits
Ord, Ptr b -> Int -> IO SemaphoreWaitFlagBits
Ptr b -> Int -> SemaphoreWaitFlagBits -> IO ()
Ptr SemaphoreWaitFlagBits -> IO SemaphoreWaitFlagBits
Ptr SemaphoreWaitFlagBits -> Int -> IO SemaphoreWaitFlagBits
Ptr SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits -> IO ()
Ptr SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> IO ()
SemaphoreWaitFlagBits -> Int
(SemaphoreWaitFlagBits -> Int)
-> (SemaphoreWaitFlagBits -> Int)
-> (Ptr SemaphoreWaitFlagBits -> Int -> IO SemaphoreWaitFlagBits)
-> (Ptr SemaphoreWaitFlagBits
    -> Int -> SemaphoreWaitFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO SemaphoreWaitFlagBits)
-> (forall b. Ptr b -> Int -> SemaphoreWaitFlagBits -> IO ())
-> (Ptr SemaphoreWaitFlagBits -> IO SemaphoreWaitFlagBits)
-> (Ptr SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> IO ())
-> Storable SemaphoreWaitFlagBits
forall b. Ptr b -> Int -> IO SemaphoreWaitFlagBits
forall b. Ptr b -> Int -> SemaphoreWaitFlagBits -> 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 SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> IO ()
$cpoke :: Ptr SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits -> IO ()
peek :: Ptr SemaphoreWaitFlagBits -> IO SemaphoreWaitFlagBits
$cpeek :: Ptr SemaphoreWaitFlagBits -> IO SemaphoreWaitFlagBits
pokeByteOff :: Ptr b -> Int -> SemaphoreWaitFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SemaphoreWaitFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO SemaphoreWaitFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SemaphoreWaitFlagBits
pokeElemOff :: Ptr SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits -> IO ()
$cpokeElemOff :: Ptr SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits -> IO ()
peekElemOff :: Ptr SemaphoreWaitFlagBits -> Int -> IO SemaphoreWaitFlagBits
$cpeekElemOff :: Ptr SemaphoreWaitFlagBits -> Int -> IO SemaphoreWaitFlagBits
alignment :: SemaphoreWaitFlagBits -> Int
$calignment :: SemaphoreWaitFlagBits -> Int
sizeOf :: SemaphoreWaitFlagBits -> Int
$csizeOf :: SemaphoreWaitFlagBits -> Int
Storable, SemaphoreWaitFlagBits
SemaphoreWaitFlagBits -> Zero SemaphoreWaitFlagBits
forall a. a -> Zero a
zero :: SemaphoreWaitFlagBits
$czero :: SemaphoreWaitFlagBits
Zero, Eq SemaphoreWaitFlagBits
SemaphoreWaitFlagBits
Eq SemaphoreWaitFlagBits =>
(SemaphoreWaitFlagBits
 -> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits
    -> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits
    -> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits)
-> SemaphoreWaitFlagBits
-> (Int -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits -> Int -> Bool)
-> (SemaphoreWaitFlagBits -> Maybe Int)
-> (SemaphoreWaitFlagBits -> Int)
-> (SemaphoreWaitFlagBits -> Bool)
-> (SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits)
-> (SemaphoreWaitFlagBits -> Int)
-> Bits SemaphoreWaitFlagBits
Int -> SemaphoreWaitFlagBits
SemaphoreWaitFlagBits -> Bool
SemaphoreWaitFlagBits -> Int
SemaphoreWaitFlagBits -> Maybe Int
SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
SemaphoreWaitFlagBits -> Int -> Bool
SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
SemaphoreWaitFlagBits
-> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
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 :: SemaphoreWaitFlagBits -> Int
$cpopCount :: SemaphoreWaitFlagBits -> Int
rotateR :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
$crotateR :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
rotateL :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
$crotateL :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
unsafeShiftR :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
$cunsafeShiftR :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
shiftR :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
$cshiftR :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
unsafeShiftL :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
$cunsafeShiftL :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
shiftL :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
$cshiftL :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
isSigned :: SemaphoreWaitFlagBits -> Bool
$cisSigned :: SemaphoreWaitFlagBits -> Bool
bitSize :: SemaphoreWaitFlagBits -> Int
$cbitSize :: SemaphoreWaitFlagBits -> Int
bitSizeMaybe :: SemaphoreWaitFlagBits -> Maybe Int
$cbitSizeMaybe :: SemaphoreWaitFlagBits -> Maybe Int
testBit :: SemaphoreWaitFlagBits -> Int -> Bool
$ctestBit :: SemaphoreWaitFlagBits -> Int -> Bool
complementBit :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
$ccomplementBit :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
clearBit :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
$cclearBit :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
setBit :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
$csetBit :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
bit :: Int -> SemaphoreWaitFlagBits
$cbit :: Int -> SemaphoreWaitFlagBits
zeroBits :: SemaphoreWaitFlagBits
$czeroBits :: SemaphoreWaitFlagBits
rotate :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
$crotate :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
shift :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
$cshift :: SemaphoreWaitFlagBits -> Int -> SemaphoreWaitFlagBits
complement :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
$ccomplement :: SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
xor :: SemaphoreWaitFlagBits
-> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
$cxor :: SemaphoreWaitFlagBits
-> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
.|. :: SemaphoreWaitFlagBits
-> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
$c.|. :: SemaphoreWaitFlagBits
-> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
.&. :: SemaphoreWaitFlagBits
-> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
$c.&. :: SemaphoreWaitFlagBits
-> SemaphoreWaitFlagBits -> SemaphoreWaitFlagBits
$cp1Bits :: Eq SemaphoreWaitFlagBits
Bits)

-- | 'SEMAPHORE_WAIT_ANY_BIT' specifies that the semaphore wait condition is
-- that at least one of the semaphores in
-- 'Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreWaitInfo'::@pSemaphores@
-- has reached the value specified by the corresponding element of
-- 'Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreWaitInfo'::@pValues@.
-- If 'SEMAPHORE_WAIT_ANY_BIT' is not set, the semaphore wait condition is
-- that all of the semaphores in
-- 'Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreWaitInfo'::@pSemaphores@
-- have reached the value specified by the corresponding element of
-- 'Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreWaitInfo'::@pValues@.
pattern $bSEMAPHORE_WAIT_ANY_BIT :: SemaphoreWaitFlagBits
$mSEMAPHORE_WAIT_ANY_BIT :: forall r.
SemaphoreWaitFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SEMAPHORE_WAIT_ANY_BIT = SemaphoreWaitFlagBits 0x00000001

type SemaphoreWaitFlags = SemaphoreWaitFlagBits

instance Show SemaphoreWaitFlagBits where
  showsPrec :: Int -> SemaphoreWaitFlagBits -> ShowS
showsPrec p :: Int
p = \case
    SEMAPHORE_WAIT_ANY_BIT -> String -> ShowS
showString "SEMAPHORE_WAIT_ANY_BIT"
    SemaphoreWaitFlagBits x :: Flags
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "SemaphoreWaitFlagBits 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 SemaphoreWaitFlagBits where
  readPrec :: ReadPrec SemaphoreWaitFlagBits
readPrec = ReadPrec SemaphoreWaitFlagBits -> ReadPrec SemaphoreWaitFlagBits
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec SemaphoreWaitFlagBits)]
-> ReadPrec SemaphoreWaitFlagBits
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("SEMAPHORE_WAIT_ANY_BIT", SemaphoreWaitFlagBits -> ReadPrec SemaphoreWaitFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure SemaphoreWaitFlagBits
SEMAPHORE_WAIT_ANY_BIT)]
                     ReadPrec SemaphoreWaitFlagBits
-> ReadPrec SemaphoreWaitFlagBits -> ReadPrec SemaphoreWaitFlagBits
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec SemaphoreWaitFlagBits -> ReadPrec SemaphoreWaitFlagBits
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "SemaphoreWaitFlagBits")
                       Flags
v <- ReadPrec Flags -> ReadPrec Flags
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Flags
forall a. Read a => ReadPrec a
readPrec
                       SemaphoreWaitFlagBits -> ReadPrec SemaphoreWaitFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags -> SemaphoreWaitFlagBits
SemaphoreWaitFlagBits Flags
v)))