{-# language CPP #-}
-- No documentation found for Chapter "SparseImageFormatFlagBits"
module Vulkan.Core10.Enums.SparseImageFormatFlagBits  ( SparseImageFormatFlags
                                                      , SparseImageFormatFlagBits( SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT
                                                                                 , SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT
                                                                                 , SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT
                                                                                 , ..
                                                                                 )
                                                      ) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showString)
import Numeric (showHex)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Foreign.Storable (Storable)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Zero (Zero)
type SparseImageFormatFlags = SparseImageFormatFlagBits

-- | VkSparseImageFormatFlagBits - Bitmask specifying additional information
-- about a sparse image resource
--
-- = See Also
--
-- 'SparseImageFormatFlags'
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, Bits SparseImageFormatFlagBits
Bits SparseImageFormatFlagBits =>
(SparseImageFormatFlagBits -> Int)
-> (SparseImageFormatFlagBits -> Int)
-> (SparseImageFormatFlagBits -> Int)
-> FiniteBits SparseImageFormatFlagBits
SparseImageFormatFlagBits -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: SparseImageFormatFlagBits -> Int
$ccountTrailingZeros :: SparseImageFormatFlagBits -> Int
countLeadingZeros :: SparseImageFormatFlagBits -> Int
$ccountLeadingZeros :: SparseImageFormatFlagBits -> Int
finiteBitSize :: SparseImageFormatFlagBits -> Int
$cfiniteBitSize :: SparseImageFormatFlagBits -> Int
$cp1FiniteBits :: Bits SparseImageFormatFlagBits
FiniteBits)

-- | 'SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT' specifies that the image uses a
-- single mip tail region for all array layers.
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
-- | 'SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT' specifies that the first mip
-- level whose dimensions are not integer multiples of the corresponding
-- dimensions of the sparse image block begins the mip tail region.
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
-- | 'SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT' specifies that the
-- image uses non-standard sparse image block dimensions, and the
-- @imageGranularity@ values do not match the standard sparse image block
-- dimensions for the given format.
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

conNameSparseImageFormatFlagBits :: String
conNameSparseImageFormatFlagBits :: String
conNameSparseImageFormatFlagBits = "SparseImageFormatFlagBits"

enumPrefixSparseImageFormatFlagBits :: String
enumPrefixSparseImageFormatFlagBits :: String
enumPrefixSparseImageFormatFlagBits = "SPARSE_IMAGE_FORMAT_"

showTableSparseImageFormatFlagBits :: [(SparseImageFormatFlagBits, String)]
showTableSparseImageFormatFlagBits :: [(SparseImageFormatFlagBits, String)]
showTableSparseImageFormatFlagBits =
  [ (SparseImageFormatFlagBits
SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT        , "SINGLE_MIPTAIL_BIT")
  , (SparseImageFormatFlagBits
SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT      , "ALIGNED_MIP_SIZE_BIT")
  , (SparseImageFormatFlagBits
SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT, "NONSTANDARD_BLOCK_SIZE_BIT")
  ]

instance Show SparseImageFormatFlagBits where
  showsPrec :: Int -> SparseImageFormatFlagBits -> ShowS
showsPrec = String
-> [(SparseImageFormatFlagBits, String)]
-> String
-> (SparseImageFormatFlagBits -> Flags)
-> (Flags -> ShowS)
-> Int
-> SparseImageFormatFlagBits
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixSparseImageFormatFlagBits
                            [(SparseImageFormatFlagBits, String)]
showTableSparseImageFormatFlagBits
                            String
conNameSparseImageFormatFlagBits
                            (\(SparseImageFormatFlagBits x :: Flags
x) -> Flags
x)
                            (\x :: Flags
x -> String -> ShowS
showString "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 = String
-> [(SparseImageFormatFlagBits, String)]
-> String
-> (Flags -> SparseImageFormatFlagBits)
-> ReadPrec SparseImageFormatFlagBits
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixSparseImageFormatFlagBits
                          [(SparseImageFormatFlagBits, String)]
showTableSparseImageFormatFlagBits
                          String
conNameSparseImageFormatFlagBits
                          Flags -> SparseImageFormatFlagBits
SparseImageFormatFlagBits