{-# language CPP #-}
module Vulkan.Core10.Enums.SampleCountFlagBits ( SampleCountFlags
, SampleCountFlagBits( SAMPLE_COUNT_1_BIT
, SAMPLE_COUNT_2_BIT
, SAMPLE_COUNT_4_BIT
, SAMPLE_COUNT_8_BIT
, SAMPLE_COUNT_16_BIT
, SAMPLE_COUNT_32_BIT
, SAMPLE_COUNT_64_BIT
, ..
)
) where
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showString)
import Numeric (showHex)
import Vulkan.Zero (Zero)
import Foreign.Storable (Storable)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Vulkan.Core10.FundamentalTypes (Flags)
type SampleCountFlags = SampleCountFlagBits
newtype SampleCountFlagBits = SampleCountFlagBits Flags
deriving newtype (SampleCountFlagBits -> SampleCountFlagBits -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
$c/= :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
== :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
$c== :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
Eq, Eq SampleCountFlagBits
SampleCountFlagBits -> SampleCountFlagBits -> Bool
SampleCountFlagBits -> SampleCountFlagBits -> Ordering
SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
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 :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
$cmin :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
max :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
$cmax :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
>= :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
$c>= :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
> :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
$c> :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
<= :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
$c<= :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
< :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
$c< :: SampleCountFlagBits -> SampleCountFlagBits -> Bool
compare :: SampleCountFlagBits -> SampleCountFlagBits -> Ordering
$ccompare :: SampleCountFlagBits -> SampleCountFlagBits -> Ordering
Ord, Ptr SampleCountFlagBits -> IO SampleCountFlagBits
Ptr SampleCountFlagBits -> Int -> IO SampleCountFlagBits
Ptr SampleCountFlagBits -> Int -> SampleCountFlagBits -> IO ()
Ptr SampleCountFlagBits -> SampleCountFlagBits -> IO ()
SampleCountFlagBits -> Int
forall b. Ptr b -> Int -> IO SampleCountFlagBits
forall b. Ptr b -> Int -> SampleCountFlagBits -> 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 SampleCountFlagBits -> SampleCountFlagBits -> IO ()
$cpoke :: Ptr SampleCountFlagBits -> SampleCountFlagBits -> IO ()
peek :: Ptr SampleCountFlagBits -> IO SampleCountFlagBits
$cpeek :: Ptr SampleCountFlagBits -> IO SampleCountFlagBits
pokeByteOff :: forall b. Ptr b -> Int -> SampleCountFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SampleCountFlagBits -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO SampleCountFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SampleCountFlagBits
pokeElemOff :: Ptr SampleCountFlagBits -> Int -> SampleCountFlagBits -> IO ()
$cpokeElemOff :: Ptr SampleCountFlagBits -> Int -> SampleCountFlagBits -> IO ()
peekElemOff :: Ptr SampleCountFlagBits -> Int -> IO SampleCountFlagBits
$cpeekElemOff :: Ptr SampleCountFlagBits -> Int -> IO SampleCountFlagBits
alignment :: SampleCountFlagBits -> Int
$calignment :: SampleCountFlagBits -> Int
sizeOf :: SampleCountFlagBits -> Int
$csizeOf :: SampleCountFlagBits -> Int
Storable, SampleCountFlagBits
forall a. a -> Zero a
zero :: SampleCountFlagBits
$czero :: SampleCountFlagBits
Zero, Eq SampleCountFlagBits
SampleCountFlagBits
Int -> SampleCountFlagBits
SampleCountFlagBits -> Bool
SampleCountFlagBits -> Int
SampleCountFlagBits -> Maybe Int
SampleCountFlagBits -> SampleCountFlagBits
SampleCountFlagBits -> Int -> Bool
SampleCountFlagBits -> Int -> SampleCountFlagBits
SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
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 :: SampleCountFlagBits -> Int
$cpopCount :: SampleCountFlagBits -> Int
rotateR :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$crotateR :: SampleCountFlagBits -> Int -> SampleCountFlagBits
rotateL :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$crotateL :: SampleCountFlagBits -> Int -> SampleCountFlagBits
unsafeShiftR :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$cunsafeShiftR :: SampleCountFlagBits -> Int -> SampleCountFlagBits
shiftR :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$cshiftR :: SampleCountFlagBits -> Int -> SampleCountFlagBits
unsafeShiftL :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$cunsafeShiftL :: SampleCountFlagBits -> Int -> SampleCountFlagBits
shiftL :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$cshiftL :: SampleCountFlagBits -> Int -> SampleCountFlagBits
isSigned :: SampleCountFlagBits -> Bool
$cisSigned :: SampleCountFlagBits -> Bool
bitSize :: SampleCountFlagBits -> Int
$cbitSize :: SampleCountFlagBits -> Int
bitSizeMaybe :: SampleCountFlagBits -> Maybe Int
$cbitSizeMaybe :: SampleCountFlagBits -> Maybe Int
testBit :: SampleCountFlagBits -> Int -> Bool
$ctestBit :: SampleCountFlagBits -> Int -> Bool
complementBit :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$ccomplementBit :: SampleCountFlagBits -> Int -> SampleCountFlagBits
clearBit :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$cclearBit :: SampleCountFlagBits -> Int -> SampleCountFlagBits
setBit :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$csetBit :: SampleCountFlagBits -> Int -> SampleCountFlagBits
bit :: Int -> SampleCountFlagBits
$cbit :: Int -> SampleCountFlagBits
zeroBits :: SampleCountFlagBits
$czeroBits :: SampleCountFlagBits
rotate :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$crotate :: SampleCountFlagBits -> Int -> SampleCountFlagBits
shift :: SampleCountFlagBits -> Int -> SampleCountFlagBits
$cshift :: SampleCountFlagBits -> Int -> SampleCountFlagBits
complement :: SampleCountFlagBits -> SampleCountFlagBits
$ccomplement :: SampleCountFlagBits -> SampleCountFlagBits
xor :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
$cxor :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
.|. :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
$c.|. :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
.&. :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
$c.&. :: SampleCountFlagBits -> SampleCountFlagBits -> SampleCountFlagBits
Bits, Bits SampleCountFlagBits
SampleCountFlagBits -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: SampleCountFlagBits -> Int
$ccountTrailingZeros :: SampleCountFlagBits -> Int
countLeadingZeros :: SampleCountFlagBits -> Int
$ccountLeadingZeros :: SampleCountFlagBits -> Int
finiteBitSize :: SampleCountFlagBits -> Int
$cfiniteBitSize :: SampleCountFlagBits -> Int
FiniteBits)
pattern $bSAMPLE_COUNT_1_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_1_BIT :: forall {r}.
SampleCountFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLE_COUNT_1_BIT = SampleCountFlagBits 0x00000001
pattern $bSAMPLE_COUNT_2_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_2_BIT :: forall {r}.
SampleCountFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLE_COUNT_2_BIT = SampleCountFlagBits 0x00000002
pattern $bSAMPLE_COUNT_4_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_4_BIT :: forall {r}.
SampleCountFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLE_COUNT_4_BIT = SampleCountFlagBits 0x00000004
pattern $bSAMPLE_COUNT_8_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_8_BIT :: forall {r}.
SampleCountFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLE_COUNT_8_BIT = SampleCountFlagBits 0x00000008
pattern $bSAMPLE_COUNT_16_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_16_BIT :: forall {r}.
SampleCountFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLE_COUNT_16_BIT = SampleCountFlagBits 0x00000010
pattern $bSAMPLE_COUNT_32_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_32_BIT :: forall {r}.
SampleCountFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLE_COUNT_32_BIT = SampleCountFlagBits 0x00000020
pattern $bSAMPLE_COUNT_64_BIT :: SampleCountFlagBits
$mSAMPLE_COUNT_64_BIT :: forall {r}.
SampleCountFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SAMPLE_COUNT_64_BIT = SampleCountFlagBits 0x00000040
conNameSampleCountFlagBits :: String
conNameSampleCountFlagBits :: String
conNameSampleCountFlagBits = String
"SampleCountFlagBits"
enumPrefixSampleCountFlagBits :: String
enumPrefixSampleCountFlagBits :: String
enumPrefixSampleCountFlagBits = String
"SAMPLE_COUNT_"
showTableSampleCountFlagBits :: [(SampleCountFlagBits, String)]
showTableSampleCountFlagBits :: [(SampleCountFlagBits, String)]
showTableSampleCountFlagBits =
[ (SampleCountFlagBits
SAMPLE_COUNT_1_BIT, String
"1_BIT")
, (SampleCountFlagBits
SAMPLE_COUNT_2_BIT, String
"2_BIT")
, (SampleCountFlagBits
SAMPLE_COUNT_4_BIT, String
"4_BIT")
, (SampleCountFlagBits
SAMPLE_COUNT_8_BIT, String
"8_BIT")
, (SampleCountFlagBits
SAMPLE_COUNT_16_BIT, String
"16_BIT")
, (SampleCountFlagBits
SAMPLE_COUNT_32_BIT, String
"32_BIT")
, (SampleCountFlagBits
SAMPLE_COUNT_64_BIT, String
"64_BIT")
]
instance Show SampleCountFlagBits where
showsPrec :: Int -> SampleCountFlagBits -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixSampleCountFlagBits
[(SampleCountFlagBits, String)]
showTableSampleCountFlagBits
String
conNameSampleCountFlagBits
(\(SampleCountFlagBits Flags
x) -> Flags
x)
(\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)
instance Read SampleCountFlagBits where
readPrec :: ReadPrec SampleCountFlagBits
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixSampleCountFlagBits
[(SampleCountFlagBits, String)]
showTableSampleCountFlagBits
String
conNameSampleCountFlagBits
Flags -> SampleCountFlagBits
SampleCountFlagBits