{-# language CPP #-}
module Vulkan.Core11.Enums.ExternalFenceHandleTypeFlagBits  ( ExternalFenceHandleTypeFlagBits( EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT
                                                                                             , EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT
                                                                                             , EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT
                                                                                             , EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT
                                                                                             , ..
                                                                                             )
                                                            , ExternalFenceHandleTypeFlags
                                                            ) 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.FundamentalTypes (Flags)
import Vulkan.Zero (Zero)
-- | VkExternalFenceHandleTypeFlagBits - Bitmask of valid external fence
-- handle types
--
-- = Description
--
-- Some external fence handle types can only be shared within the same
-- underlying physical device and\/or the same driver version, as defined
-- in the following table:
--
-- +---------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
-- | Handle type                                       | 'Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.PhysicalDeviceIDProperties'::@driverUUID@ | 'Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.PhysicalDeviceIDProperties'::@deviceUUID@ |
-- +---------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
-- | 'EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT'        | Must match                                                                                                 | Must match                                                                                                 |
-- +---------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
-- | 'EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT'     | Must match                                                                                                 | Must match                                                                                                 |
-- +---------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
-- | 'EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT' | Must match                                                                                                 | Must match                                                                                                 |
-- +---------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
-- | 'EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT'          | No restriction                                                                                             | No restriction                                                                                             |
-- +---------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
--
-- External fence handle types compatibility
--
-- = See Also
--
-- 'ExternalFenceHandleTypeFlags',
-- 'Vulkan.Extensions.VK_KHR_external_fence_fd.FenceGetFdInfoKHR',
-- 'Vulkan.Extensions.VK_KHR_external_fence_win32.FenceGetWin32HandleInfoKHR',
-- 'Vulkan.Extensions.VK_KHR_external_fence_fd.ImportFenceFdInfoKHR',
-- 'Vulkan.Extensions.VK_KHR_external_fence_win32.ImportFenceWin32HandleInfoKHR',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_external_fence_capabilities.PhysicalDeviceExternalFenceInfo'
newtype ExternalFenceHandleTypeFlagBits = ExternalFenceHandleTypeFlagBits Flags
  deriving newtype (ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
(ExternalFenceHandleTypeFlagBits
 -> ExternalFenceHandleTypeFlagBits -> Bool)
-> (ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits -> Bool)
-> Eq ExternalFenceHandleTypeFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
$c/= :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
== :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
$c== :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
Eq, Eq ExternalFenceHandleTypeFlagBits
Eq ExternalFenceHandleTypeFlagBits =>
(ExternalFenceHandleTypeFlagBits
 -> ExternalFenceHandleTypeFlagBits -> Ordering)
-> (ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits -> Bool)
-> (ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits -> Bool)
-> (ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits -> Bool)
-> (ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits -> Bool)
-> (ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits)
-> Ord ExternalFenceHandleTypeFlagBits
ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Ordering
ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
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 :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
$cmin :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
max :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
$cmax :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
>= :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
$c>= :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
> :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
$c> :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
<= :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
$c<= :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
< :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
$c< :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Bool
compare :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Ordering
$ccompare :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> Ordering
$cp1Ord :: Eq ExternalFenceHandleTypeFlagBits
Ord, Ptr b -> Int -> IO ExternalFenceHandleTypeFlagBits
Ptr b -> Int -> ExternalFenceHandleTypeFlagBits -> IO ()
Ptr ExternalFenceHandleTypeFlagBits
-> IO ExternalFenceHandleTypeFlagBits
Ptr ExternalFenceHandleTypeFlagBits
-> Int -> IO ExternalFenceHandleTypeFlagBits
Ptr ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits -> IO ()
Ptr ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> IO ()
ExternalFenceHandleTypeFlagBits -> Int
(ExternalFenceHandleTypeFlagBits -> Int)
-> (ExternalFenceHandleTypeFlagBits -> Int)
-> (Ptr ExternalFenceHandleTypeFlagBits
    -> Int -> IO ExternalFenceHandleTypeFlagBits)
-> (Ptr ExternalFenceHandleTypeFlagBits
    -> Int -> ExternalFenceHandleTypeFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO ExternalFenceHandleTypeFlagBits)
-> (forall b.
    Ptr b -> Int -> ExternalFenceHandleTypeFlagBits -> IO ())
-> (Ptr ExternalFenceHandleTypeFlagBits
    -> IO ExternalFenceHandleTypeFlagBits)
-> (Ptr ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits -> IO ())
-> Storable ExternalFenceHandleTypeFlagBits
forall b. Ptr b -> Int -> IO ExternalFenceHandleTypeFlagBits
forall b. Ptr b -> Int -> ExternalFenceHandleTypeFlagBits -> 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 ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> IO ()
$cpoke :: Ptr ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits -> IO ()
peek :: Ptr ExternalFenceHandleTypeFlagBits
-> IO ExternalFenceHandleTypeFlagBits
$cpeek :: Ptr ExternalFenceHandleTypeFlagBits
-> IO ExternalFenceHandleTypeFlagBits
pokeByteOff :: Ptr b -> Int -> ExternalFenceHandleTypeFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ExternalFenceHandleTypeFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO ExternalFenceHandleTypeFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ExternalFenceHandleTypeFlagBits
pokeElemOff :: Ptr ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits -> IO ()
$cpokeElemOff :: Ptr ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits -> IO ()
peekElemOff :: Ptr ExternalFenceHandleTypeFlagBits
-> Int -> IO ExternalFenceHandleTypeFlagBits
$cpeekElemOff :: Ptr ExternalFenceHandleTypeFlagBits
-> Int -> IO ExternalFenceHandleTypeFlagBits
alignment :: ExternalFenceHandleTypeFlagBits -> Int
$calignment :: ExternalFenceHandleTypeFlagBits -> Int
sizeOf :: ExternalFenceHandleTypeFlagBits -> Int
$csizeOf :: ExternalFenceHandleTypeFlagBits -> Int
Storable, ExternalFenceHandleTypeFlagBits
ExternalFenceHandleTypeFlagBits
-> Zero ExternalFenceHandleTypeFlagBits
forall a. a -> Zero a
zero :: ExternalFenceHandleTypeFlagBits
$czero :: ExternalFenceHandleTypeFlagBits
Zero, Eq ExternalFenceHandleTypeFlagBits
ExternalFenceHandleTypeFlagBits
Eq ExternalFenceHandleTypeFlagBits =>
(ExternalFenceHandleTypeFlagBits
 -> ExternalFenceHandleTypeFlagBits
 -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> Int -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> Int -> ExternalFenceHandleTypeFlagBits)
-> ExternalFenceHandleTypeFlagBits
-> (Int -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> Int -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> Int -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> Int -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits -> Int -> Bool)
-> (ExternalFenceHandleTypeFlagBits -> Maybe Int)
-> (ExternalFenceHandleTypeFlagBits -> Int)
-> (ExternalFenceHandleTypeFlagBits -> Bool)
-> (ExternalFenceHandleTypeFlagBits
    -> Int -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> Int -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> Int -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> Int -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> Int -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits
    -> Int -> ExternalFenceHandleTypeFlagBits)
-> (ExternalFenceHandleTypeFlagBits -> Int)
-> Bits ExternalFenceHandleTypeFlagBits
Int -> ExternalFenceHandleTypeFlagBits
ExternalFenceHandleTypeFlagBits -> Bool
ExternalFenceHandleTypeFlagBits -> Int
ExternalFenceHandleTypeFlagBits -> Maybe Int
ExternalFenceHandleTypeFlagBits -> ExternalFenceHandleTypeFlagBits
ExternalFenceHandleTypeFlagBits -> Int -> Bool
ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
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 :: ExternalFenceHandleTypeFlagBits -> Int
$cpopCount :: ExternalFenceHandleTypeFlagBits -> Int
rotateR :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
$crotateR :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
rotateL :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
$crotateL :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
unsafeShiftR :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
$cunsafeShiftR :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
shiftR :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
$cshiftR :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
unsafeShiftL :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
$cunsafeShiftL :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
shiftL :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
$cshiftL :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
isSigned :: ExternalFenceHandleTypeFlagBits -> Bool
$cisSigned :: ExternalFenceHandleTypeFlagBits -> Bool
bitSize :: ExternalFenceHandleTypeFlagBits -> Int
$cbitSize :: ExternalFenceHandleTypeFlagBits -> Int
bitSizeMaybe :: ExternalFenceHandleTypeFlagBits -> Maybe Int
$cbitSizeMaybe :: ExternalFenceHandleTypeFlagBits -> Maybe Int
testBit :: ExternalFenceHandleTypeFlagBits -> Int -> Bool
$ctestBit :: ExternalFenceHandleTypeFlagBits -> Int -> Bool
complementBit :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
$ccomplementBit :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
clearBit :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
$cclearBit :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
setBit :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
$csetBit :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
bit :: Int -> ExternalFenceHandleTypeFlagBits
$cbit :: Int -> ExternalFenceHandleTypeFlagBits
zeroBits :: ExternalFenceHandleTypeFlagBits
$czeroBits :: ExternalFenceHandleTypeFlagBits
rotate :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
$crotate :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
shift :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
$cshift :: ExternalFenceHandleTypeFlagBits
-> Int -> ExternalFenceHandleTypeFlagBits
complement :: ExternalFenceHandleTypeFlagBits -> ExternalFenceHandleTypeFlagBits
$ccomplement :: ExternalFenceHandleTypeFlagBits -> ExternalFenceHandleTypeFlagBits
xor :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
$cxor :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
.|. :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
$c.|. :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
.&. :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
$c.&. :: ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
-> ExternalFenceHandleTypeFlagBits
$cp1Bits :: Eq ExternalFenceHandleTypeFlagBits
Bits)

-- | 'EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT' specifies a POSIX file
-- descriptor handle that has only limited valid usage outside of Vulkan
-- and other compatible APIs. It /must/ be compatible with the POSIX system
-- calls @dup@, @dup2@, @close@, and the non-standard system call @dup3@.
-- Additionally, it /must/ be transportable over a socket using an
-- @SCM_RIGHTS@ control message. It owns a reference to the underlying
-- synchronization primitive represented by its Vulkan fence object.
pattern $bEXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT :: ExternalFenceHandleTypeFlagBits
$mEXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT :: forall r.
ExternalFenceHandleTypeFlagBits
-> (Void# -> r) -> (Void# -> r) -> r
EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT = ExternalFenceHandleTypeFlagBits 0x00000001
-- | 'EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT' specifies an NT handle
-- that has only limited valid usage outside of Vulkan and other compatible
-- APIs. It /must/ be compatible with the functions @DuplicateHandle@,
-- @CloseHandle@, @CompareObjectHandles@, @GetHandleInformation@, and
-- @SetHandleInformation@. It owns a reference to the underlying
-- synchronization primitive represented by its Vulkan fence object.
pattern $bEXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT :: ExternalFenceHandleTypeFlagBits
$mEXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT :: forall r.
ExternalFenceHandleTypeFlagBits
-> (Void# -> r) -> (Void# -> r) -> r
EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT = ExternalFenceHandleTypeFlagBits 0x00000002
-- | 'EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT' specifies a global
-- share handle that has only limited valid usage outside of Vulkan and
-- other compatible APIs. It is not compatible with any native APIs. It
-- does not own a reference to the underlying synchronization primitive
-- represented by its Vulkan fence object, and will therefore become
-- invalid when all Vulkan fence objects associated with it are destroyed.
pattern $bEXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT :: ExternalFenceHandleTypeFlagBits
$mEXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT :: forall r.
ExternalFenceHandleTypeFlagBits
-> (Void# -> r) -> (Void# -> r) -> r
EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = ExternalFenceHandleTypeFlagBits 0x00000004
-- | 'EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT' specifies a POSIX file
-- descriptor handle to a Linux Sync File or Android Fence. It can be used
-- with any native API accepting a valid sync file or fence as input. It
-- owns a reference to the underlying synchronization primitive associated
-- with the file descriptor. Implementations which support importing this
-- handle type /must/ accept any type of sync or fence FD supported by the
-- native system they are running on.
pattern $bEXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT :: ExternalFenceHandleTypeFlagBits
$mEXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT :: forall r.
ExternalFenceHandleTypeFlagBits
-> (Void# -> r) -> (Void# -> r) -> r
EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT = ExternalFenceHandleTypeFlagBits 0x00000008

type ExternalFenceHandleTypeFlags = ExternalFenceHandleTypeFlagBits

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