{-# language CPP #-}
-- No documentation found for Chapter "PipelineShaderStageCreateFlagBits"
module Vulkan.Core10.Enums.PipelineShaderStageCreateFlagBits  ( PipelineShaderStageCreateFlags
                                                              , PipelineShaderStageCreateFlagBits( PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT
                                                                                                 , PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_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 PipelineShaderStageCreateFlags = PipelineShaderStageCreateFlagBits

-- | VkPipelineShaderStageCreateFlagBits - Bitmask controlling how a pipeline
-- shader stage is created
--
-- = Description
--
-- Note
--
-- If
-- 'Vulkan.Extensions.VK_EXT_subgroup_size_control.PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT'
-- and
-- 'Vulkan.Extensions.VK_EXT_subgroup_size_control.PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT'
-- are specified and
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-minSubgroupSize minSubgroupSize>
-- does not equal
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-maxSubgroupSize maxSubgroupSize>
-- and no
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-required-subgroup-size required subgroup size>
-- is specified, then the only way to guarantee that the \'X\' dimension of
-- the local workgroup size is a multiple of
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#interfaces-builtin-variables-sgs SubgroupSize>
-- is to make it a multiple of @maxSubgroupSize@. Under these conditions,
-- you are guaranteed full subgroups but not any particular subgroup size.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'PipelineShaderStageCreateFlags'
newtype PipelineShaderStageCreateFlagBits = PipelineShaderStageCreateFlagBits Flags
  deriving newtype (PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
$c/= :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
== :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
$c== :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
Eq, Eq PipelineShaderStageCreateFlagBits
PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Ordering
PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
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 :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
$cmin :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
max :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
$cmax :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
>= :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
$c>= :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
> :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
$c> :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
<= :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
$c<= :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
< :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
$c< :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Bool
compare :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Ordering
$ccompare :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> Ordering
Ord, Ptr PipelineShaderStageCreateFlagBits
-> IO PipelineShaderStageCreateFlagBits
Ptr PipelineShaderStageCreateFlagBits
-> Int -> IO PipelineShaderStageCreateFlagBits
Ptr PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits -> IO ()
Ptr PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> IO ()
PipelineShaderStageCreateFlagBits -> Int
forall b. Ptr b -> Int -> IO PipelineShaderStageCreateFlagBits
forall b.
Ptr b -> Int -> PipelineShaderStageCreateFlagBits -> 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 PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> IO ()
$cpoke :: Ptr PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits -> IO ()
peek :: Ptr PipelineShaderStageCreateFlagBits
-> IO PipelineShaderStageCreateFlagBits
$cpeek :: Ptr PipelineShaderStageCreateFlagBits
-> IO PipelineShaderStageCreateFlagBits
pokeByteOff :: forall b.
Ptr b -> Int -> PipelineShaderStageCreateFlagBits -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> PipelineShaderStageCreateFlagBits -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO PipelineShaderStageCreateFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PipelineShaderStageCreateFlagBits
pokeElemOff :: Ptr PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits -> IO ()
$cpokeElemOff :: Ptr PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits -> IO ()
peekElemOff :: Ptr PipelineShaderStageCreateFlagBits
-> Int -> IO PipelineShaderStageCreateFlagBits
$cpeekElemOff :: Ptr PipelineShaderStageCreateFlagBits
-> Int -> IO PipelineShaderStageCreateFlagBits
alignment :: PipelineShaderStageCreateFlagBits -> Int
$calignment :: PipelineShaderStageCreateFlagBits -> Int
sizeOf :: PipelineShaderStageCreateFlagBits -> Int
$csizeOf :: PipelineShaderStageCreateFlagBits -> Int
Storable, PipelineShaderStageCreateFlagBits
forall a. a -> Zero a
zero :: PipelineShaderStageCreateFlagBits
$czero :: PipelineShaderStageCreateFlagBits
Zero, Eq PipelineShaderStageCreateFlagBits
PipelineShaderStageCreateFlagBits
Int -> PipelineShaderStageCreateFlagBits
PipelineShaderStageCreateFlagBits -> Bool
PipelineShaderStageCreateFlagBits -> Int
PipelineShaderStageCreateFlagBits -> Maybe Int
PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
PipelineShaderStageCreateFlagBits -> Int -> Bool
PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
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 :: PipelineShaderStageCreateFlagBits -> Int
$cpopCount :: PipelineShaderStageCreateFlagBits -> Int
rotateR :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
$crotateR :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
rotateL :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
$crotateL :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
unsafeShiftR :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
$cunsafeShiftR :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
shiftR :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
$cshiftR :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
unsafeShiftL :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
$cunsafeShiftL :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
shiftL :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
$cshiftL :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
isSigned :: PipelineShaderStageCreateFlagBits -> Bool
$cisSigned :: PipelineShaderStageCreateFlagBits -> Bool
bitSize :: PipelineShaderStageCreateFlagBits -> Int
$cbitSize :: PipelineShaderStageCreateFlagBits -> Int
bitSizeMaybe :: PipelineShaderStageCreateFlagBits -> Maybe Int
$cbitSizeMaybe :: PipelineShaderStageCreateFlagBits -> Maybe Int
testBit :: PipelineShaderStageCreateFlagBits -> Int -> Bool
$ctestBit :: PipelineShaderStageCreateFlagBits -> Int -> Bool
complementBit :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
$ccomplementBit :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
clearBit :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
$cclearBit :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
setBit :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
$csetBit :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
bit :: Int -> PipelineShaderStageCreateFlagBits
$cbit :: Int -> PipelineShaderStageCreateFlagBits
zeroBits :: PipelineShaderStageCreateFlagBits
$czeroBits :: PipelineShaderStageCreateFlagBits
rotate :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
$crotate :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
shift :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
$cshift :: PipelineShaderStageCreateFlagBits
-> Int -> PipelineShaderStageCreateFlagBits
complement :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
$ccomplement :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
xor :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
$cxor :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
.|. :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
$c.|. :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
.&. :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
$c.&. :: PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
-> PipelineShaderStageCreateFlagBits
Bits, Bits PipelineShaderStageCreateFlagBits
PipelineShaderStageCreateFlagBits -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: PipelineShaderStageCreateFlagBits -> Int
$ccountTrailingZeros :: PipelineShaderStageCreateFlagBits -> Int
countLeadingZeros :: PipelineShaderStageCreateFlagBits -> Int
$ccountLeadingZeros :: PipelineShaderStageCreateFlagBits -> Int
finiteBitSize :: PipelineShaderStageCreateFlagBits -> Int
$cfiniteBitSize :: PipelineShaderStageCreateFlagBits -> Int
FiniteBits)

-- | 'PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT' specifies that
-- the subgroup sizes /must/ be launched with all invocations active in the
-- task, mesh, or compute stage.
pattern $bPIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT :: PipelineShaderStageCreateFlagBits
$mPIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT :: forall {r}.
PipelineShaderStageCreateFlagBits
-> ((# #) -> r) -> ((# #) -> r) -> r
PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT = PipelineShaderStageCreateFlagBits 0x00000002

-- | 'PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT' specifies
-- that the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#interfaces-builtin-variables-sgs SubgroupSize>
-- /may/ vary in the shader stage.
pattern $bPIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT :: PipelineShaderStageCreateFlagBits
$mPIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT :: forall {r}.
PipelineShaderStageCreateFlagBits
-> ((# #) -> r) -> ((# #) -> r) -> r
PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT = PipelineShaderStageCreateFlagBits 0x00000001

conNamePipelineShaderStageCreateFlagBits :: String
conNamePipelineShaderStageCreateFlagBits :: String
conNamePipelineShaderStageCreateFlagBits = String
"PipelineShaderStageCreateFlagBits"

enumPrefixPipelineShaderStageCreateFlagBits :: String
enumPrefixPipelineShaderStageCreateFlagBits :: String
enumPrefixPipelineShaderStageCreateFlagBits = String
"PIPELINE_SHADER_STAGE_CREATE_"

showTablePipelineShaderStageCreateFlagBits :: [(PipelineShaderStageCreateFlagBits, String)]
showTablePipelineShaderStageCreateFlagBits :: [(PipelineShaderStageCreateFlagBits, String)]
showTablePipelineShaderStageCreateFlagBits =
  [
    ( PipelineShaderStageCreateFlagBits
PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT
    , String
"REQUIRE_FULL_SUBGROUPS_BIT"
    )
  ,
    ( PipelineShaderStageCreateFlagBits
PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT
    , String
"ALLOW_VARYING_SUBGROUP_SIZE_BIT"
    )
  ]

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