{-# language CPP #-}
-- No documentation found for Chapter "QueryResultFlagBits"
module Vulkan.Core10.Enums.QueryResultFlagBits  ( QueryResultFlags
                                                , QueryResultFlagBits( QUERY_RESULT_64_BIT
                                                                     , QUERY_RESULT_WAIT_BIT
                                                                     , QUERY_RESULT_WITH_AVAILABILITY_BIT
                                                                     , QUERY_RESULT_PARTIAL_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 QueryResultFlags = QueryResultFlagBits

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

-- | 'QUERY_RESULT_64_BIT' specifies the results will be written as an array
-- of 64-bit unsigned integer values. If this bit is not set, the results
-- will be written as an array of 32-bit unsigned integer values.
pattern $bQUERY_RESULT_64_BIT :: QueryResultFlagBits
$mQUERY_RESULT_64_BIT :: forall {r}.
QueryResultFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
QUERY_RESULT_64_BIT = QueryResultFlagBits 0x00000001

-- | 'QUERY_RESULT_WAIT_BIT' specifies that Vulkan will wait for each query’s
-- status to become available before retrieving its results.
pattern $bQUERY_RESULT_WAIT_BIT :: QueryResultFlagBits
$mQUERY_RESULT_WAIT_BIT :: forall {r}.
QueryResultFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
QUERY_RESULT_WAIT_BIT = QueryResultFlagBits 0x00000002

-- | 'QUERY_RESULT_WITH_AVAILABILITY_BIT' specifies that the availability
-- status accompanies the results.
pattern $bQUERY_RESULT_WITH_AVAILABILITY_BIT :: QueryResultFlagBits
$mQUERY_RESULT_WITH_AVAILABILITY_BIT :: forall {r}.
QueryResultFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
QUERY_RESULT_WITH_AVAILABILITY_BIT = QueryResultFlagBits 0x00000004

-- | 'QUERY_RESULT_PARTIAL_BIT' specifies that returning partial results is
-- acceptable.
pattern $bQUERY_RESULT_PARTIAL_BIT :: QueryResultFlagBits
$mQUERY_RESULT_PARTIAL_BIT :: forall {r}.
QueryResultFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
QUERY_RESULT_PARTIAL_BIT = QueryResultFlagBits 0x00000008

conNameQueryResultFlagBits :: String
conNameQueryResultFlagBits :: String
conNameQueryResultFlagBits = String
"QueryResultFlagBits"

enumPrefixQueryResultFlagBits :: String
enumPrefixQueryResultFlagBits :: String
enumPrefixQueryResultFlagBits = String
"QUERY_RESULT_"

showTableQueryResultFlagBits :: [(QueryResultFlagBits, String)]
showTableQueryResultFlagBits :: [(QueryResultFlagBits, String)]
showTableQueryResultFlagBits =
  [ (QueryResultFlagBits
QUERY_RESULT_64_BIT, String
"64_BIT")
  , (QueryResultFlagBits
QUERY_RESULT_WAIT_BIT, String
"WAIT_BIT")
  ,
    ( QueryResultFlagBits
QUERY_RESULT_WITH_AVAILABILITY_BIT
    , String
"WITH_AVAILABILITY_BIT"
    )
  , (QueryResultFlagBits
QUERY_RESULT_PARTIAL_BIT, String
"PARTIAL_BIT")
  ]

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