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

-- | 'FENCE_IMPORT_TEMPORARY_BIT' specifies that the fence payload will be
-- imported only temporarily, as described in
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-fences-importing Importing Fence Payloads>,
-- regardless of the permanence of @handleType@.
pattern $bFENCE_IMPORT_TEMPORARY_BIT :: FenceImportFlagBits
$mFENCE_IMPORT_TEMPORARY_BIT :: forall r. FenceImportFlagBits -> (Void# -> r) -> (Void# -> r) -> r
FENCE_IMPORT_TEMPORARY_BIT = FenceImportFlagBits 0x00000001

type FenceImportFlags = FenceImportFlagBits

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