{-# language CPP #-}
-- No documentation found for Chapter "SubgroupFeatureFlagBits"
module Vulkan.Core11.Enums.SubgroupFeatureFlagBits  ( SubgroupFeatureFlags
                                                    , SubgroupFeatureFlagBits( SUBGROUP_FEATURE_BASIC_BIT
                                                                             , SUBGROUP_FEATURE_VOTE_BIT
                                                                             , SUBGROUP_FEATURE_ARITHMETIC_BIT
                                                                             , SUBGROUP_FEATURE_BALLOT_BIT
                                                                             , SUBGROUP_FEATURE_SHUFFLE_BIT
                                                                             , SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT
                                                                             , SUBGROUP_FEATURE_CLUSTERED_BIT
                                                                             , SUBGROUP_FEATURE_QUAD_BIT
                                                                             , SUBGROUP_FEATURE_PARTITIONED_BIT_NV
                                                                             , ..
                                                                             )
                                                    ) 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 SubgroupFeatureFlags = SubgroupFeatureFlagBits

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

-- | #features-subgroup-basic# 'SUBGROUP_FEATURE_BASIC_BIT' specifies the
-- device will accept SPIR-V shader modules containing the
-- @GroupNonUniform@ capability.
pattern $bSUBGROUP_FEATURE_BASIC_BIT :: SubgroupFeatureFlagBits
$mSUBGROUP_FEATURE_BASIC_BIT :: forall {r}.
SubgroupFeatureFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SUBGROUP_FEATURE_BASIC_BIT = SubgroupFeatureFlagBits 0x00000001

-- | #features-subgroup-vote# 'SUBGROUP_FEATURE_VOTE_BIT' specifies the
-- device will accept SPIR-V shader modules containing the
-- @GroupNonUniformVote@ capability.
pattern $bSUBGROUP_FEATURE_VOTE_BIT :: SubgroupFeatureFlagBits
$mSUBGROUP_FEATURE_VOTE_BIT :: forall {r}.
SubgroupFeatureFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SUBGROUP_FEATURE_VOTE_BIT = SubgroupFeatureFlagBits 0x00000002

-- | #features-subgroup-arithmetic# 'SUBGROUP_FEATURE_ARITHMETIC_BIT'
-- specifies the device will accept SPIR-V shader modules containing the
-- @GroupNonUniformArithmetic@ capability.
pattern $bSUBGROUP_FEATURE_ARITHMETIC_BIT :: SubgroupFeatureFlagBits
$mSUBGROUP_FEATURE_ARITHMETIC_BIT :: forall {r}.
SubgroupFeatureFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SUBGROUP_FEATURE_ARITHMETIC_BIT = SubgroupFeatureFlagBits 0x00000004

-- | #features-subgroup-ballot# 'SUBGROUP_FEATURE_BALLOT_BIT' specifies the
-- device will accept SPIR-V shader modules containing the
-- @GroupNonUniformBallot@ capability.
pattern $bSUBGROUP_FEATURE_BALLOT_BIT :: SubgroupFeatureFlagBits
$mSUBGROUP_FEATURE_BALLOT_BIT :: forall {r}.
SubgroupFeatureFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SUBGROUP_FEATURE_BALLOT_BIT = SubgroupFeatureFlagBits 0x00000008

-- | #features-subgroup-shuffle# 'SUBGROUP_FEATURE_SHUFFLE_BIT' specifies the
-- device will accept SPIR-V shader modules containing the
-- @GroupNonUniformShuffle@ capability.
pattern $bSUBGROUP_FEATURE_SHUFFLE_BIT :: SubgroupFeatureFlagBits
$mSUBGROUP_FEATURE_SHUFFLE_BIT :: forall {r}.
SubgroupFeatureFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SUBGROUP_FEATURE_SHUFFLE_BIT = SubgroupFeatureFlagBits 0x00000010

-- | #features-subgroup-shuffle-relative#
-- 'SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT' specifies the device will accept
-- SPIR-V shader modules containing the @GroupNonUniformShuffleRelative@
-- capability.
pattern $bSUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT :: SubgroupFeatureFlagBits
$mSUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT :: forall {r}.
SubgroupFeatureFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = SubgroupFeatureFlagBits 0x00000020

-- | #features-subgroup-clustered# 'SUBGROUP_FEATURE_CLUSTERED_BIT' specifies
-- the device will accept SPIR-V shader modules containing the
-- @GroupNonUniformClustered@ capability.
pattern $bSUBGROUP_FEATURE_CLUSTERED_BIT :: SubgroupFeatureFlagBits
$mSUBGROUP_FEATURE_CLUSTERED_BIT :: forall {r}.
SubgroupFeatureFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SUBGROUP_FEATURE_CLUSTERED_BIT = SubgroupFeatureFlagBits 0x00000040

-- | #features-subgroup-quad# 'SUBGROUP_FEATURE_QUAD_BIT' specifies the
-- device will accept SPIR-V shader modules containing the
-- @GroupNonUniformQuad@ capability.
pattern $bSUBGROUP_FEATURE_QUAD_BIT :: SubgroupFeatureFlagBits
$mSUBGROUP_FEATURE_QUAD_BIT :: forall {r}.
SubgroupFeatureFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SUBGROUP_FEATURE_QUAD_BIT = SubgroupFeatureFlagBits 0x00000080

-- | #features-subgroup-partitioned# 'SUBGROUP_FEATURE_PARTITIONED_BIT_NV'
-- specifies the device will accept SPIR-V shader modules containing the
-- @GroupNonUniformPartitionedNV@ capability.
pattern $bSUBGROUP_FEATURE_PARTITIONED_BIT_NV :: SubgroupFeatureFlagBits
$mSUBGROUP_FEATURE_PARTITIONED_BIT_NV :: forall {r}.
SubgroupFeatureFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SUBGROUP_FEATURE_PARTITIONED_BIT_NV = SubgroupFeatureFlagBits 0x00000100

conNameSubgroupFeatureFlagBits :: String
conNameSubgroupFeatureFlagBits :: String
conNameSubgroupFeatureFlagBits = String
"SubgroupFeatureFlagBits"

enumPrefixSubgroupFeatureFlagBits :: String
enumPrefixSubgroupFeatureFlagBits :: String
enumPrefixSubgroupFeatureFlagBits = String
"SUBGROUP_FEATURE_"

showTableSubgroupFeatureFlagBits :: [(SubgroupFeatureFlagBits, String)]
showTableSubgroupFeatureFlagBits :: [(SubgroupFeatureFlagBits, String)]
showTableSubgroupFeatureFlagBits =
  [ (SubgroupFeatureFlagBits
SUBGROUP_FEATURE_BASIC_BIT, String
"BASIC_BIT")
  , (SubgroupFeatureFlagBits
SUBGROUP_FEATURE_VOTE_BIT, String
"VOTE_BIT")
  ,
    ( SubgroupFeatureFlagBits
SUBGROUP_FEATURE_ARITHMETIC_BIT
    , String
"ARITHMETIC_BIT"
    )
  , (SubgroupFeatureFlagBits
SUBGROUP_FEATURE_BALLOT_BIT, String
"BALLOT_BIT")
  ,
    ( SubgroupFeatureFlagBits
SUBGROUP_FEATURE_SHUFFLE_BIT
    , String
"SHUFFLE_BIT"
    )
  ,
    ( SubgroupFeatureFlagBits
SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT
    , String
"SHUFFLE_RELATIVE_BIT"
    )
  ,
    ( SubgroupFeatureFlagBits
SUBGROUP_FEATURE_CLUSTERED_BIT
    , String
"CLUSTERED_BIT"
    )
  , (SubgroupFeatureFlagBits
SUBGROUP_FEATURE_QUAD_BIT, String
"QUAD_BIT")
  ,
    ( SubgroupFeatureFlagBits
SUBGROUP_FEATURE_PARTITIONED_BIT_NV
    , String
"PARTITIONED_BIT_NV"
    )
  ]

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