{-# language CPP #-}
-- No documentation found for Chapter "SparseMemoryBindFlagBits"
module Vulkan.Core10.Enums.SparseMemoryBindFlagBits  ( SparseMemoryBindFlags
                                                     , SparseMemoryBindFlagBits( SPARSE_MEMORY_BIND_METADATA_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 SparseMemoryBindFlags = SparseMemoryBindFlagBits

-- | VkSparseMemoryBindFlagBits - Bitmask specifying usage of a sparse memory
-- binding operation
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'SparseMemoryBindFlags'
newtype SparseMemoryBindFlagBits = SparseMemoryBindFlagBits Flags
  deriving newtype (SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
$c/= :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
== :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
$c== :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
Eq, Eq SparseMemoryBindFlagBits
SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Ordering
SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
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 :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
$cmin :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
max :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
$cmax :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
>= :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
$c>= :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
> :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
$c> :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
<= :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
$c<= :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
< :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
$c< :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
compare :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Ordering
$ccompare :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Ordering
Ord, Ptr SparseMemoryBindFlagBits -> IO SparseMemoryBindFlagBits
Ptr SparseMemoryBindFlagBits -> Int -> IO SparseMemoryBindFlagBits
Ptr SparseMemoryBindFlagBits
-> Int -> SparseMemoryBindFlagBits -> IO ()
Ptr SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> IO ()
SparseMemoryBindFlagBits -> Int
forall b. Ptr b -> Int -> IO SparseMemoryBindFlagBits
forall b. Ptr b -> Int -> SparseMemoryBindFlagBits -> 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 SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> IO ()
$cpoke :: Ptr SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> IO ()
peek :: Ptr SparseMemoryBindFlagBits -> IO SparseMemoryBindFlagBits
$cpeek :: Ptr SparseMemoryBindFlagBits -> IO SparseMemoryBindFlagBits
pokeByteOff :: forall b. Ptr b -> Int -> SparseMemoryBindFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SparseMemoryBindFlagBits -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO SparseMemoryBindFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SparseMemoryBindFlagBits
pokeElemOff :: Ptr SparseMemoryBindFlagBits
-> Int -> SparseMemoryBindFlagBits -> IO ()
$cpokeElemOff :: Ptr SparseMemoryBindFlagBits
-> Int -> SparseMemoryBindFlagBits -> IO ()
peekElemOff :: Ptr SparseMemoryBindFlagBits -> Int -> IO SparseMemoryBindFlagBits
$cpeekElemOff :: Ptr SparseMemoryBindFlagBits -> Int -> IO SparseMemoryBindFlagBits
alignment :: SparseMemoryBindFlagBits -> Int
$calignment :: SparseMemoryBindFlagBits -> Int
sizeOf :: SparseMemoryBindFlagBits -> Int
$csizeOf :: SparseMemoryBindFlagBits -> Int
Storable, SparseMemoryBindFlagBits
forall a. a -> Zero a
zero :: SparseMemoryBindFlagBits
$czero :: SparseMemoryBindFlagBits
Zero, Eq SparseMemoryBindFlagBits
SparseMemoryBindFlagBits
Int -> SparseMemoryBindFlagBits
SparseMemoryBindFlagBits -> Bool
SparseMemoryBindFlagBits -> Int
SparseMemoryBindFlagBits -> Maybe Int
SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
SparseMemoryBindFlagBits -> Int -> Bool
SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
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 :: SparseMemoryBindFlagBits -> Int
$cpopCount :: SparseMemoryBindFlagBits -> Int
rotateR :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$crotateR :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
rotateL :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$crotateL :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
unsafeShiftR :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$cunsafeShiftR :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
shiftR :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$cshiftR :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
unsafeShiftL :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$cunsafeShiftL :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
shiftL :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$cshiftL :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
isSigned :: SparseMemoryBindFlagBits -> Bool
$cisSigned :: SparseMemoryBindFlagBits -> Bool
bitSize :: SparseMemoryBindFlagBits -> Int
$cbitSize :: SparseMemoryBindFlagBits -> Int
bitSizeMaybe :: SparseMemoryBindFlagBits -> Maybe Int
$cbitSizeMaybe :: SparseMemoryBindFlagBits -> Maybe Int
testBit :: SparseMemoryBindFlagBits -> Int -> Bool
$ctestBit :: SparseMemoryBindFlagBits -> Int -> Bool
complementBit :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$ccomplementBit :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
clearBit :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$cclearBit :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
setBit :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$csetBit :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
bit :: Int -> SparseMemoryBindFlagBits
$cbit :: Int -> SparseMemoryBindFlagBits
zeroBits :: SparseMemoryBindFlagBits
$czeroBits :: SparseMemoryBindFlagBits
rotate :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$crotate :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
shift :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$cshift :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
complement :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
$ccomplement :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
xor :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
$cxor :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
.|. :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
$c.|. :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
.&. :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
$c.&. :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
Bits, Bits SparseMemoryBindFlagBits
SparseMemoryBindFlagBits -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: SparseMemoryBindFlagBits -> Int
$ccountTrailingZeros :: SparseMemoryBindFlagBits -> Int
countLeadingZeros :: SparseMemoryBindFlagBits -> Int
$ccountLeadingZeros :: SparseMemoryBindFlagBits -> Int
finiteBitSize :: SparseMemoryBindFlagBits -> Int
$cfiniteBitSize :: SparseMemoryBindFlagBits -> Int
FiniteBits)

-- | 'SPARSE_MEMORY_BIND_METADATA_BIT' specifies that the memory being bound
-- is only for the metadata aspect.
pattern $bSPARSE_MEMORY_BIND_METADATA_BIT :: SparseMemoryBindFlagBits
$mSPARSE_MEMORY_BIND_METADATA_BIT :: forall {r}.
SparseMemoryBindFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SPARSE_MEMORY_BIND_METADATA_BIT = SparseMemoryBindFlagBits 0x00000001

conNameSparseMemoryBindFlagBits :: String
conNameSparseMemoryBindFlagBits :: String
conNameSparseMemoryBindFlagBits = String
"SparseMemoryBindFlagBits"

enumPrefixSparseMemoryBindFlagBits :: String
enumPrefixSparseMemoryBindFlagBits :: String
enumPrefixSparseMemoryBindFlagBits = String
"SPARSE_MEMORY_BIND_METADATA_BIT"

showTableSparseMemoryBindFlagBits :: [(SparseMemoryBindFlagBits, String)]
showTableSparseMemoryBindFlagBits :: [(SparseMemoryBindFlagBits, String)]
showTableSparseMemoryBindFlagBits = [(SparseMemoryBindFlagBits
SPARSE_MEMORY_BIND_METADATA_BIT, String
"")]

instance Show SparseMemoryBindFlagBits where
  showsPrec :: Int -> SparseMemoryBindFlagBits -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixSparseMemoryBindFlagBits
      [(SparseMemoryBindFlagBits, String)]
showTableSparseMemoryBindFlagBits
      String
conNameSparseMemoryBindFlagBits
      (\(SparseMemoryBindFlagBits 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 SparseMemoryBindFlagBits where
  readPrec :: ReadPrec SparseMemoryBindFlagBits
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixSparseMemoryBindFlagBits
      [(SparseMemoryBindFlagBits, String)]
showTableSparseMemoryBindFlagBits
      String
conNameSparseMemoryBindFlagBits
      Flags -> SparseMemoryBindFlagBits
SparseMemoryBindFlagBits