{-# language CPP #-}
module Vulkan.Core12.Enums.ResolveModeFlagBits  ( ResolveModeFlagBits( RESOLVE_MODE_NONE
                                                                     , RESOLVE_MODE_SAMPLE_ZERO_BIT
                                                                     , RESOLVE_MODE_AVERAGE_BIT
                                                                     , RESOLVE_MODE_MIN_BIT
                                                                     , RESOLVE_MODE_MAX_BIT
                                                                     , ..
                                                                     )
                                                , ResolveModeFlags
                                                ) 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)
-- | VkResolveModeFlagBits - Bitmask indicating supported depth and stencil
-- resolve modes
--
-- = See Also
--
-- 'ResolveModeFlags',
-- 'Vulkan.Core12.Promoted_From_VK_KHR_depth_stencil_resolve.SubpassDescriptionDepthStencilResolve'
newtype ResolveModeFlagBits = ResolveModeFlagBits Flags
  deriving newtype (ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
(ResolveModeFlagBits -> ResolveModeFlagBits -> Bool)
-> (ResolveModeFlagBits -> ResolveModeFlagBits -> Bool)
-> Eq ResolveModeFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
$c/= :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
== :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
$c== :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
Eq, Eq ResolveModeFlagBits
Eq ResolveModeFlagBits =>
(ResolveModeFlagBits -> ResolveModeFlagBits -> Ordering)
-> (ResolveModeFlagBits -> ResolveModeFlagBits -> Bool)
-> (ResolveModeFlagBits -> ResolveModeFlagBits -> Bool)
-> (ResolveModeFlagBits -> ResolveModeFlagBits -> Bool)
-> (ResolveModeFlagBits -> ResolveModeFlagBits -> Bool)
-> (ResolveModeFlagBits
    -> ResolveModeFlagBits -> ResolveModeFlagBits)
-> (ResolveModeFlagBits
    -> ResolveModeFlagBits -> ResolveModeFlagBits)
-> Ord ResolveModeFlagBits
ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
ResolveModeFlagBits -> ResolveModeFlagBits -> Ordering
ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
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 :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
$cmin :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
max :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
$cmax :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
>= :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
$c>= :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
> :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
$c> :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
<= :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
$c<= :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
< :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
$c< :: ResolveModeFlagBits -> ResolveModeFlagBits -> Bool
compare :: ResolveModeFlagBits -> ResolveModeFlagBits -> Ordering
$ccompare :: ResolveModeFlagBits -> ResolveModeFlagBits -> Ordering
$cp1Ord :: Eq ResolveModeFlagBits
Ord, Ptr b -> Int -> IO ResolveModeFlagBits
Ptr b -> Int -> ResolveModeFlagBits -> IO ()
Ptr ResolveModeFlagBits -> IO ResolveModeFlagBits
Ptr ResolveModeFlagBits -> Int -> IO ResolveModeFlagBits
Ptr ResolveModeFlagBits -> Int -> ResolveModeFlagBits -> IO ()
Ptr ResolveModeFlagBits -> ResolveModeFlagBits -> IO ()
ResolveModeFlagBits -> Int
(ResolveModeFlagBits -> Int)
-> (ResolveModeFlagBits -> Int)
-> (Ptr ResolveModeFlagBits -> Int -> IO ResolveModeFlagBits)
-> (Ptr ResolveModeFlagBits -> Int -> ResolveModeFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO ResolveModeFlagBits)
-> (forall b. Ptr b -> Int -> ResolveModeFlagBits -> IO ())
-> (Ptr ResolveModeFlagBits -> IO ResolveModeFlagBits)
-> (Ptr ResolveModeFlagBits -> ResolveModeFlagBits -> IO ())
-> Storable ResolveModeFlagBits
forall b. Ptr b -> Int -> IO ResolveModeFlagBits
forall b. Ptr b -> Int -> ResolveModeFlagBits -> 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 ResolveModeFlagBits -> ResolveModeFlagBits -> IO ()
$cpoke :: Ptr ResolveModeFlagBits -> ResolveModeFlagBits -> IO ()
peek :: Ptr ResolveModeFlagBits -> IO ResolveModeFlagBits
$cpeek :: Ptr ResolveModeFlagBits -> IO ResolveModeFlagBits
pokeByteOff :: Ptr b -> Int -> ResolveModeFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ResolveModeFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO ResolveModeFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ResolveModeFlagBits
pokeElemOff :: Ptr ResolveModeFlagBits -> Int -> ResolveModeFlagBits -> IO ()
$cpokeElemOff :: Ptr ResolveModeFlagBits -> Int -> ResolveModeFlagBits -> IO ()
peekElemOff :: Ptr ResolveModeFlagBits -> Int -> IO ResolveModeFlagBits
$cpeekElemOff :: Ptr ResolveModeFlagBits -> Int -> IO ResolveModeFlagBits
alignment :: ResolveModeFlagBits -> Int
$calignment :: ResolveModeFlagBits -> Int
sizeOf :: ResolveModeFlagBits -> Int
$csizeOf :: ResolveModeFlagBits -> Int
Storable, ResolveModeFlagBits
ResolveModeFlagBits -> Zero ResolveModeFlagBits
forall a. a -> Zero a
zero :: ResolveModeFlagBits
$czero :: ResolveModeFlagBits
Zero, Eq ResolveModeFlagBits
ResolveModeFlagBits
Eq ResolveModeFlagBits =>
(ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits)
-> (ResolveModeFlagBits
    -> ResolveModeFlagBits -> ResolveModeFlagBits)
-> (ResolveModeFlagBits
    -> ResolveModeFlagBits -> ResolveModeFlagBits)
-> (ResolveModeFlagBits -> ResolveModeFlagBits)
-> (ResolveModeFlagBits -> Int -> ResolveModeFlagBits)
-> (ResolveModeFlagBits -> Int -> ResolveModeFlagBits)
-> ResolveModeFlagBits
-> (Int -> ResolveModeFlagBits)
-> (ResolveModeFlagBits -> Int -> ResolveModeFlagBits)
-> (ResolveModeFlagBits -> Int -> ResolveModeFlagBits)
-> (ResolveModeFlagBits -> Int -> ResolveModeFlagBits)
-> (ResolveModeFlagBits -> Int -> Bool)
-> (ResolveModeFlagBits -> Maybe Int)
-> (ResolveModeFlagBits -> Int)
-> (ResolveModeFlagBits -> Bool)
-> (ResolveModeFlagBits -> Int -> ResolveModeFlagBits)
-> (ResolveModeFlagBits -> Int -> ResolveModeFlagBits)
-> (ResolveModeFlagBits -> Int -> ResolveModeFlagBits)
-> (ResolveModeFlagBits -> Int -> ResolveModeFlagBits)
-> (ResolveModeFlagBits -> Int -> ResolveModeFlagBits)
-> (ResolveModeFlagBits -> Int -> ResolveModeFlagBits)
-> (ResolveModeFlagBits -> Int)
-> Bits ResolveModeFlagBits
Int -> ResolveModeFlagBits
ResolveModeFlagBits -> Bool
ResolveModeFlagBits -> Int
ResolveModeFlagBits -> Maybe Int
ResolveModeFlagBits -> ResolveModeFlagBits
ResolveModeFlagBits -> Int -> Bool
ResolveModeFlagBits -> Int -> ResolveModeFlagBits
ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
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 :: ResolveModeFlagBits -> Int
$cpopCount :: ResolveModeFlagBits -> Int
rotateR :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$crotateR :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
rotateL :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$crotateL :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
unsafeShiftR :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$cunsafeShiftR :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
shiftR :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$cshiftR :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
unsafeShiftL :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$cunsafeShiftL :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
shiftL :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$cshiftL :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
isSigned :: ResolveModeFlagBits -> Bool
$cisSigned :: ResolveModeFlagBits -> Bool
bitSize :: ResolveModeFlagBits -> Int
$cbitSize :: ResolveModeFlagBits -> Int
bitSizeMaybe :: ResolveModeFlagBits -> Maybe Int
$cbitSizeMaybe :: ResolveModeFlagBits -> Maybe Int
testBit :: ResolveModeFlagBits -> Int -> Bool
$ctestBit :: ResolveModeFlagBits -> Int -> Bool
complementBit :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$ccomplementBit :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
clearBit :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$cclearBit :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
setBit :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$csetBit :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
bit :: Int -> ResolveModeFlagBits
$cbit :: Int -> ResolveModeFlagBits
zeroBits :: ResolveModeFlagBits
$czeroBits :: ResolveModeFlagBits
rotate :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$crotate :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
shift :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
$cshift :: ResolveModeFlagBits -> Int -> ResolveModeFlagBits
complement :: ResolveModeFlagBits -> ResolveModeFlagBits
$ccomplement :: ResolveModeFlagBits -> ResolveModeFlagBits
xor :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
$cxor :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
.|. :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
$c.|. :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
.&. :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
$c.&. :: ResolveModeFlagBits -> ResolveModeFlagBits -> ResolveModeFlagBits
$cp1Bits :: Eq ResolveModeFlagBits
Bits)

-- | 'RESOLVE_MODE_NONE' indicates that no resolve operation is done.
pattern $bRESOLVE_MODE_NONE :: ResolveModeFlagBits
$mRESOLVE_MODE_NONE :: forall r. ResolveModeFlagBits -> (Void# -> r) -> (Void# -> r) -> r
RESOLVE_MODE_NONE = ResolveModeFlagBits 0x00000000
-- | 'RESOLVE_MODE_SAMPLE_ZERO_BIT' indicates that result of the resolve
-- operation is equal to the value of sample 0.
pattern $bRESOLVE_MODE_SAMPLE_ZERO_BIT :: ResolveModeFlagBits
$mRESOLVE_MODE_SAMPLE_ZERO_BIT :: forall r. ResolveModeFlagBits -> (Void# -> r) -> (Void# -> r) -> r
RESOLVE_MODE_SAMPLE_ZERO_BIT = ResolveModeFlagBits 0x00000001
-- | 'RESOLVE_MODE_AVERAGE_BIT' indicates that result of the resolve
-- operation is the average of the sample values.
pattern $bRESOLVE_MODE_AVERAGE_BIT :: ResolveModeFlagBits
$mRESOLVE_MODE_AVERAGE_BIT :: forall r. ResolveModeFlagBits -> (Void# -> r) -> (Void# -> r) -> r
RESOLVE_MODE_AVERAGE_BIT = ResolveModeFlagBits 0x00000002
-- | 'RESOLVE_MODE_MIN_BIT' indicates that result of the resolve operation is
-- the minimum of the sample values.
pattern $bRESOLVE_MODE_MIN_BIT :: ResolveModeFlagBits
$mRESOLVE_MODE_MIN_BIT :: forall r. ResolveModeFlagBits -> (Void# -> r) -> (Void# -> r) -> r
RESOLVE_MODE_MIN_BIT = ResolveModeFlagBits 0x00000004
-- | 'RESOLVE_MODE_MAX_BIT' indicates that result of the resolve operation is
-- the maximum of the sample values.
pattern $bRESOLVE_MODE_MAX_BIT :: ResolveModeFlagBits
$mRESOLVE_MODE_MAX_BIT :: forall r. ResolveModeFlagBits -> (Void# -> r) -> (Void# -> r) -> r
RESOLVE_MODE_MAX_BIT = ResolveModeFlagBits 0x00000008

type ResolveModeFlags = ResolveModeFlagBits

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