{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TypeSynonymInstances #-}

module Data.SpirV.Enum.StorageClass where

import Data.Word (Word32)
import Foreign.Storable (Storable)

newtype StorageClass = StorageClass Word32
  deriving newtype (StorageClass -> StorageClass -> Bool
(StorageClass -> StorageClass -> Bool)
-> (StorageClass -> StorageClass -> Bool) -> Eq StorageClass
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StorageClass -> StorageClass -> Bool
== :: StorageClass -> StorageClass -> Bool
$c/= :: StorageClass -> StorageClass -> Bool
/= :: StorageClass -> StorageClass -> Bool
Eq, Eq StorageClass
Eq StorageClass =>
(StorageClass -> StorageClass -> Ordering)
-> (StorageClass -> StorageClass -> Bool)
-> (StorageClass -> StorageClass -> Bool)
-> (StorageClass -> StorageClass -> Bool)
-> (StorageClass -> StorageClass -> Bool)
-> (StorageClass -> StorageClass -> StorageClass)
-> (StorageClass -> StorageClass -> StorageClass)
-> Ord StorageClass
StorageClass -> StorageClass -> Bool
StorageClass -> StorageClass -> Ordering
StorageClass -> StorageClass -> StorageClass
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
$ccompare :: StorageClass -> StorageClass -> Ordering
compare :: StorageClass -> StorageClass -> Ordering
$c< :: StorageClass -> StorageClass -> Bool
< :: StorageClass -> StorageClass -> Bool
$c<= :: StorageClass -> StorageClass -> Bool
<= :: StorageClass -> StorageClass -> Bool
$c> :: StorageClass -> StorageClass -> Bool
> :: StorageClass -> StorageClass -> Bool
$c>= :: StorageClass -> StorageClass -> Bool
>= :: StorageClass -> StorageClass -> Bool
$cmax :: StorageClass -> StorageClass -> StorageClass
max :: StorageClass -> StorageClass -> StorageClass
$cmin :: StorageClass -> StorageClass -> StorageClass
min :: StorageClass -> StorageClass -> StorageClass
Ord, Ptr StorageClass -> IO StorageClass
Ptr StorageClass -> Int -> IO StorageClass
Ptr StorageClass -> Int -> StorageClass -> IO ()
Ptr StorageClass -> StorageClass -> IO ()
StorageClass -> Int
(StorageClass -> Int)
-> (StorageClass -> Int)
-> (Ptr StorageClass -> Int -> IO StorageClass)
-> (Ptr StorageClass -> Int -> StorageClass -> IO ())
-> (forall b. Ptr b -> Int -> IO StorageClass)
-> (forall b. Ptr b -> Int -> StorageClass -> IO ())
-> (Ptr StorageClass -> IO StorageClass)
-> (Ptr StorageClass -> StorageClass -> IO ())
-> Storable StorageClass
forall b. Ptr b -> Int -> IO StorageClass
forall b. Ptr b -> Int -> StorageClass -> 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
$csizeOf :: StorageClass -> Int
sizeOf :: StorageClass -> Int
$calignment :: StorageClass -> Int
alignment :: StorageClass -> Int
$cpeekElemOff :: Ptr StorageClass -> Int -> IO StorageClass
peekElemOff :: Ptr StorageClass -> Int -> IO StorageClass
$cpokeElemOff :: Ptr StorageClass -> Int -> StorageClass -> IO ()
pokeElemOff :: Ptr StorageClass -> Int -> StorageClass -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO StorageClass
peekByteOff :: forall b. Ptr b -> Int -> IO StorageClass
$cpokeByteOff :: forall b. Ptr b -> Int -> StorageClass -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> StorageClass -> IO ()
$cpeek :: Ptr StorageClass -> IO StorageClass
peek :: Ptr StorageClass -> IO StorageClass
$cpoke :: Ptr StorageClass -> StorageClass -> IO ()
poke :: Ptr StorageClass -> StorageClass -> IO ()
Storable)

instance Show StorageClass where
  showsPrec :: Int -> StorageClass -> ShowS
showsPrec Int
p (StorageClass Word32
v) = case Word32
v of
    Word32
0 -> String -> ShowS
showString String
"UniformConstant"
    Word32
1 -> String -> ShowS
showString String
"Input"
    Word32
2 -> String -> ShowS
showString String
"Uniform"
    Word32
3 -> String -> ShowS
showString String
"Output"
    Word32
4 -> String -> ShowS
showString String
"Workgroup"
    Word32
5 -> String -> ShowS
showString String
"CrossWorkgroup"
    Word32
6 -> String -> ShowS
showString String
"Private"
    Word32
7 -> String -> ShowS
showString String
"Function"
    Word32
8 -> String -> ShowS
showString String
"Generic"
    Word32
9 -> String -> ShowS
showString String
"PushConstant"
    Word32
10 -> String -> ShowS
showString String
"AtomicCounter"
    Word32
11 -> String -> ShowS
showString String
"Image"
    Word32
12 -> String -> ShowS
showString String
"StorageBuffer"
    Word32
4172 -> String -> ShowS
showString String
"TileImageEXT"
    Word32
5068 -> String -> ShowS
showString String
"NodePayloadAMDX"
    Word32
5076 -> String -> ShowS
showString String
"NodeOutputPayloadAMDX"
    Word32
5328 -> String -> ShowS
showString String
"CallableDataKHR"
    Word32
5329 -> String -> ShowS
showString String
"IncomingCallableDataKHR"
    Word32
5338 -> String -> ShowS
showString String
"RayPayloadKHR"
    Word32
5339 -> String -> ShowS
showString String
"HitAttributeKHR"
    Word32
5342 -> String -> ShowS
showString String
"IncomingRayPayloadKHR"
    Word32
5343 -> String -> ShowS
showString String
"ShaderRecordBufferKHR"
    Word32
5349 -> String -> ShowS
showString String
"PhysicalStorageBuffer"
    Word32
5385 -> String -> ShowS
showString String
"HitObjectAttributeNV"
    Word32
5402 -> String -> ShowS
showString String
"TaskPayloadWorkgroupEXT"
    Word32
5605 -> String -> ShowS
showString String
"CodeSectionINTEL"
    Word32
5936 -> String -> ShowS
showString String
"DeviceOnlyINTEL"
    Word32
5937 -> String -> ShowS
showString String
"HostOnlyINTEL"
    Word32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> Int
10) (ShowS -> ShowS) -> ShowS -> ShowS
forall a b. (a -> b) -> a -> b
$ String -> ShowS
showString String
"StorageClass " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Word32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec (Int
p Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Word32
x

pattern UniformConstant :: StorageClass
pattern $mUniformConstant :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bUniformConstant :: StorageClass
UniformConstant = StorageClass 0

pattern Input :: StorageClass
pattern $mInput :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bInput :: StorageClass
Input = StorageClass 1

pattern Uniform :: StorageClass
pattern $mUniform :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bUniform :: StorageClass
Uniform = StorageClass 2

pattern Output :: StorageClass
pattern $mOutput :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bOutput :: StorageClass
Output = StorageClass 3

pattern Workgroup :: StorageClass
pattern $mWorkgroup :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bWorkgroup :: StorageClass
Workgroup = StorageClass 4

pattern CrossWorkgroup :: StorageClass
pattern $mCrossWorkgroup :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bCrossWorkgroup :: StorageClass
CrossWorkgroup = StorageClass 5

pattern Private :: StorageClass
pattern $mPrivate :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bPrivate :: StorageClass
Private = StorageClass 6

pattern Function :: StorageClass
pattern $mFunction :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bFunction :: StorageClass
Function = StorageClass 7

pattern Generic :: StorageClass
pattern $mGeneric :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bGeneric :: StorageClass
Generic = StorageClass 8

pattern PushConstant :: StorageClass
pattern $mPushConstant :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bPushConstant :: StorageClass
PushConstant = StorageClass 9

pattern AtomicCounter :: StorageClass
pattern $mAtomicCounter :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bAtomicCounter :: StorageClass
AtomicCounter = StorageClass 10

pattern Image :: StorageClass
pattern $mImage :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bImage :: StorageClass
Image = StorageClass 11

pattern StorageBuffer :: StorageClass
pattern $mStorageBuffer :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bStorageBuffer :: StorageClass
StorageBuffer = StorageClass 12

pattern TileImageEXT :: StorageClass
pattern $mTileImageEXT :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bTileImageEXT :: StorageClass
TileImageEXT = StorageClass 4172

pattern NodePayloadAMDX :: StorageClass
pattern $mNodePayloadAMDX :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bNodePayloadAMDX :: StorageClass
NodePayloadAMDX = StorageClass 5068

pattern NodeOutputPayloadAMDX :: StorageClass
pattern $mNodeOutputPayloadAMDX :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bNodeOutputPayloadAMDX :: StorageClass
NodeOutputPayloadAMDX = StorageClass 5076

pattern CallableDataKHR :: StorageClass
pattern $mCallableDataKHR :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bCallableDataKHR :: StorageClass
CallableDataKHR = StorageClass 5328

pattern CallableDataNV :: StorageClass
pattern $mCallableDataNV :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bCallableDataNV :: StorageClass
CallableDataNV = StorageClass 5328

pattern IncomingCallableDataKHR :: StorageClass
pattern $mIncomingCallableDataKHR :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bIncomingCallableDataKHR :: StorageClass
IncomingCallableDataKHR = StorageClass 5329

pattern IncomingCallableDataNV :: StorageClass
pattern $mIncomingCallableDataNV :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bIncomingCallableDataNV :: StorageClass
IncomingCallableDataNV = StorageClass 5329

pattern RayPayloadKHR :: StorageClass
pattern $mRayPayloadKHR :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bRayPayloadKHR :: StorageClass
RayPayloadKHR = StorageClass 5338

pattern RayPayloadNV :: StorageClass
pattern $mRayPayloadNV :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bRayPayloadNV :: StorageClass
RayPayloadNV = StorageClass 5338

pattern HitAttributeKHR :: StorageClass
pattern $mHitAttributeKHR :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bHitAttributeKHR :: StorageClass
HitAttributeKHR = StorageClass 5339

pattern HitAttributeNV :: StorageClass
pattern $mHitAttributeNV :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bHitAttributeNV :: StorageClass
HitAttributeNV = StorageClass 5339

pattern IncomingRayPayloadKHR :: StorageClass
pattern $mIncomingRayPayloadKHR :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bIncomingRayPayloadKHR :: StorageClass
IncomingRayPayloadKHR = StorageClass 5342

pattern IncomingRayPayloadNV :: StorageClass
pattern $mIncomingRayPayloadNV :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bIncomingRayPayloadNV :: StorageClass
IncomingRayPayloadNV = StorageClass 5342

pattern ShaderRecordBufferKHR :: StorageClass
pattern $mShaderRecordBufferKHR :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bShaderRecordBufferKHR :: StorageClass
ShaderRecordBufferKHR = StorageClass 5343

pattern ShaderRecordBufferNV :: StorageClass
pattern $mShaderRecordBufferNV :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bShaderRecordBufferNV :: StorageClass
ShaderRecordBufferNV = StorageClass 5343

pattern PhysicalStorageBuffer :: StorageClass
pattern $mPhysicalStorageBuffer :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bPhysicalStorageBuffer :: StorageClass
PhysicalStorageBuffer = StorageClass 5349

pattern PhysicalStorageBufferEXT :: StorageClass
pattern $mPhysicalStorageBufferEXT :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bPhysicalStorageBufferEXT :: StorageClass
PhysicalStorageBufferEXT = StorageClass 5349

pattern HitObjectAttributeNV :: StorageClass
pattern $mHitObjectAttributeNV :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bHitObjectAttributeNV :: StorageClass
HitObjectAttributeNV = StorageClass 5385

pattern TaskPayloadWorkgroupEXT :: StorageClass
pattern $mTaskPayloadWorkgroupEXT :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bTaskPayloadWorkgroupEXT :: StorageClass
TaskPayloadWorkgroupEXT = StorageClass 5402

pattern CodeSectionINTEL :: StorageClass
pattern $mCodeSectionINTEL :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bCodeSectionINTEL :: StorageClass
CodeSectionINTEL = StorageClass 5605

pattern DeviceOnlyINTEL :: StorageClass
pattern $mDeviceOnlyINTEL :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bDeviceOnlyINTEL :: StorageClass
DeviceOnlyINTEL = StorageClass 5936

pattern HostOnlyINTEL :: StorageClass
pattern $mHostOnlyINTEL :: forall {r}. StorageClass -> ((# #) -> r) -> ((# #) -> r) -> r
$bHostOnlyINTEL :: StorageClass
HostOnlyINTEL = StorageClass 5937