{-# language CPP #-}
module Vulkan.Core10.Enums.SparseImageFormatFlagBits ( SparseImageFormatFlagBits( SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT
, SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT
, SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT
, ..
)
, SparseImageFormatFlags
) 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)
newtype SparseImageFormatFlagBits = SparseImageFormatFlagBits Flags
deriving newtype (SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
(SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool)
-> (SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool)
-> Eq SparseImageFormatFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
$c/= :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
== :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
$c== :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
Eq, Eq SparseImageFormatFlagBits
Eq SparseImageFormatFlagBits =>
(SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> Ordering)
-> (SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool)
-> (SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool)
-> (SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool)
-> (SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool)
-> (SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits)
-> Ord SparseImageFormatFlagBits
SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Ordering
SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits
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 :: SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits
$cmin :: SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits
max :: SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits
$cmax :: SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits
>= :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
$c>= :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
> :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
$c> :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
<= :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
$c<= :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
< :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
$c< :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Bool
compare :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Ordering
$ccompare :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> Ordering
$cp1Ord :: Eq SparseImageFormatFlagBits
Ord, Ptr b -> Int -> IO SparseImageFormatFlagBits
Ptr b -> Int -> SparseImageFormatFlagBits -> IO ()
Ptr SparseImageFormatFlagBits -> IO SparseImageFormatFlagBits
Ptr SparseImageFormatFlagBits
-> Int -> IO SparseImageFormatFlagBits
Ptr SparseImageFormatFlagBits
-> Int -> SparseImageFormatFlagBits -> IO ()
Ptr SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> IO ()
SparseImageFormatFlagBits -> Int
(SparseImageFormatFlagBits -> Int)
-> (SparseImageFormatFlagBits -> Int)
-> (Ptr SparseImageFormatFlagBits
-> Int -> IO SparseImageFormatFlagBits)
-> (Ptr SparseImageFormatFlagBits
-> Int -> SparseImageFormatFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO SparseImageFormatFlagBits)
-> (forall b. Ptr b -> Int -> SparseImageFormatFlagBits -> IO ())
-> (Ptr SparseImageFormatFlagBits -> IO SparseImageFormatFlagBits)
-> (Ptr SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> IO ())
-> Storable SparseImageFormatFlagBits
forall b. Ptr b -> Int -> IO SparseImageFormatFlagBits
forall b. Ptr b -> Int -> SparseImageFormatFlagBits -> 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 SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> IO ()
$cpoke :: Ptr SparseImageFormatFlagBits -> SparseImageFormatFlagBits -> IO ()
peek :: Ptr SparseImageFormatFlagBits -> IO SparseImageFormatFlagBits
$cpeek :: Ptr SparseImageFormatFlagBits -> IO SparseImageFormatFlagBits
pokeByteOff :: Ptr b -> Int -> SparseImageFormatFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SparseImageFormatFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO SparseImageFormatFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SparseImageFormatFlagBits
pokeElemOff :: Ptr SparseImageFormatFlagBits
-> Int -> SparseImageFormatFlagBits -> IO ()
$cpokeElemOff :: Ptr SparseImageFormatFlagBits
-> Int -> SparseImageFormatFlagBits -> IO ()
peekElemOff :: Ptr SparseImageFormatFlagBits
-> Int -> IO SparseImageFormatFlagBits
$cpeekElemOff :: Ptr SparseImageFormatFlagBits
-> Int -> IO SparseImageFormatFlagBits
alignment :: SparseImageFormatFlagBits -> Int
$calignment :: SparseImageFormatFlagBits -> Int
sizeOf :: SparseImageFormatFlagBits -> Int
$csizeOf :: SparseImageFormatFlagBits -> Int
Storable, SparseImageFormatFlagBits
SparseImageFormatFlagBits -> Zero SparseImageFormatFlagBits
forall a. a -> Zero a
zero :: SparseImageFormatFlagBits
$czero :: SparseImageFormatFlagBits
Zero, Eq SparseImageFormatFlagBits
SparseImageFormatFlagBits
Eq SparseImageFormatFlagBits =>
(SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits)
-> SparseImageFormatFlagBits
-> (Int -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits -> Int -> Bool)
-> (SparseImageFormatFlagBits -> Maybe Int)
-> (SparseImageFormatFlagBits -> Int)
-> (SparseImageFormatFlagBits -> Bool)
-> (SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits)
-> (SparseImageFormatFlagBits -> Int)
-> Bits SparseImageFormatFlagBits
Int -> SparseImageFormatFlagBits
SparseImageFormatFlagBits -> Bool
SparseImageFormatFlagBits -> Int
SparseImageFormatFlagBits -> Maybe Int
SparseImageFormatFlagBits -> SparseImageFormatFlagBits
SparseImageFormatFlagBits -> Int -> Bool
SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits
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 :: SparseImageFormatFlagBits -> Int
$cpopCount :: SparseImageFormatFlagBits -> Int
rotateR :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
$crotateR :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
rotateL :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
$crotateL :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
unsafeShiftR :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
$cunsafeShiftR :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
shiftR :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
$cshiftR :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
unsafeShiftL :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
$cunsafeShiftL :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
shiftL :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
$cshiftL :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
isSigned :: SparseImageFormatFlagBits -> Bool
$cisSigned :: SparseImageFormatFlagBits -> Bool
bitSize :: SparseImageFormatFlagBits -> Int
$cbitSize :: SparseImageFormatFlagBits -> Int
bitSizeMaybe :: SparseImageFormatFlagBits -> Maybe Int
$cbitSizeMaybe :: SparseImageFormatFlagBits -> Maybe Int
testBit :: SparseImageFormatFlagBits -> Int -> Bool
$ctestBit :: SparseImageFormatFlagBits -> Int -> Bool
complementBit :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
$ccomplementBit :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
clearBit :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
$cclearBit :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
setBit :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
$csetBit :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
bit :: Int -> SparseImageFormatFlagBits
$cbit :: Int -> SparseImageFormatFlagBits
zeroBits :: SparseImageFormatFlagBits
$czeroBits :: SparseImageFormatFlagBits
rotate :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
$crotate :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
shift :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
$cshift :: SparseImageFormatFlagBits -> Int -> SparseImageFormatFlagBits
complement :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits
$ccomplement :: SparseImageFormatFlagBits -> SparseImageFormatFlagBits
xor :: SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits
$cxor :: SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits
.|. :: SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits
$c.|. :: SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits
.&. :: SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits
$c.&. :: SparseImageFormatFlagBits
-> SparseImageFormatFlagBits -> SparseImageFormatFlagBits
$cp1Bits :: Eq SparseImageFormatFlagBits
Bits)
pattern $bSPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT :: SparseImageFormatFlagBits
$mSPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT :: forall r.
SparseImageFormatFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = SparseImageFormatFlagBits 0x00000001
pattern $bSPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT :: SparseImageFormatFlagBits
$mSPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT :: forall r.
SparseImageFormatFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = SparseImageFormatFlagBits 0x00000002
pattern $bSPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT :: SparseImageFormatFlagBits
$mSPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT :: forall r.
SparseImageFormatFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = SparseImageFormatFlagBits 0x00000004
type SparseImageFormatFlags = SparseImageFormatFlagBits
instance Show SparseImageFormatFlagBits where
showsPrec :: Int -> SparseImageFormatFlagBits -> ShowS
showsPrec p :: Int
p = \case
SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT -> String -> ShowS
showString "SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT"
SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT -> String -> ShowS
showString "SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT"
SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT -> String -> ShowS
showString "SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT"
SparseImageFormatFlagBits x :: Flags
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "SparseImageFormatFlagBits 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 SparseImageFormatFlagBits where
readPrec :: ReadPrec SparseImageFormatFlagBits
readPrec = ReadPrec SparseImageFormatFlagBits
-> ReadPrec SparseImageFormatFlagBits
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec SparseImageFormatFlagBits)]
-> ReadPrec SparseImageFormatFlagBits
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT", SparseImageFormatFlagBits -> ReadPrec SparseImageFormatFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure SparseImageFormatFlagBits
SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT)
, ("SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT", SparseImageFormatFlagBits -> ReadPrec SparseImageFormatFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure SparseImageFormatFlagBits
SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT)
, ("SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT", SparseImageFormatFlagBits -> ReadPrec SparseImageFormatFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure SparseImageFormatFlagBits
SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT)]
ReadPrec SparseImageFormatFlagBits
-> ReadPrec SparseImageFormatFlagBits
-> ReadPrec SparseImageFormatFlagBits
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int
-> ReadPrec SparseImageFormatFlagBits
-> ReadPrec SparseImageFormatFlagBits
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "SparseImageFormatFlagBits")
Flags
v <- ReadPrec Flags -> ReadPrec Flags
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Flags
forall a. Read a => ReadPrec a
readPrec
SparseImageFormatFlagBits -> ReadPrec SparseImageFormatFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags -> SparseImageFormatFlagBits
SparseImageFormatFlagBits Flags
v)))