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

module Data.SpirV.Enum.ImageFormat where

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

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

instance Show ImageFormat where
  showsPrec :: Int -> ImageFormat -> ShowS
showsPrec Int
p (ImageFormat Word32
v) = case Word32
v of
    Word32
0 -> String -> ShowS
showString String
"Unknown"
    Word32
1 -> String -> ShowS
showString String
"Rgba32f"
    Word32
2 -> String -> ShowS
showString String
"Rgba16f"
    Word32
3 -> String -> ShowS
showString String
"R32f"
    Word32
4 -> String -> ShowS
showString String
"Rgba8"
    Word32
5 -> String -> ShowS
showString String
"Rgba8Snorm"
    Word32
6 -> String -> ShowS
showString String
"Rg32f"
    Word32
7 -> String -> ShowS
showString String
"Rg16f"
    Word32
8 -> String -> ShowS
showString String
"R11fG11fB10f"
    Word32
9 -> String -> ShowS
showString String
"R16f"
    Word32
10 -> String -> ShowS
showString String
"Rgba16"
    Word32
11 -> String -> ShowS
showString String
"Rgb10A2"
    Word32
12 -> String -> ShowS
showString String
"Rg16"
    Word32
13 -> String -> ShowS
showString String
"Rg8"
    Word32
14 -> String -> ShowS
showString String
"R16"
    Word32
15 -> String -> ShowS
showString String
"R8"
    Word32
16 -> String -> ShowS
showString String
"Rgba16Snorm"
    Word32
17 -> String -> ShowS
showString String
"Rg16Snorm"
    Word32
18 -> String -> ShowS
showString String
"Rg8Snorm"
    Word32
19 -> String -> ShowS
showString String
"R16Snorm"
    Word32
20 -> String -> ShowS
showString String
"R8Snorm"
    Word32
21 -> String -> ShowS
showString String
"Rgba32i"
    Word32
22 -> String -> ShowS
showString String
"Rgba16i"
    Word32
23 -> String -> ShowS
showString String
"Rgba8i"
    Word32
24 -> String -> ShowS
showString String
"R32i"
    Word32
25 -> String -> ShowS
showString String
"Rg32i"
    Word32
26 -> String -> ShowS
showString String
"Rg16i"
    Word32
27 -> String -> ShowS
showString String
"Rg8i"
    Word32
28 -> String -> ShowS
showString String
"R16i"
    Word32
29 -> String -> ShowS
showString String
"R8i"
    Word32
30 -> String -> ShowS
showString String
"Rgba32ui"
    Word32
31 -> String -> ShowS
showString String
"Rgba16ui"
    Word32
32 -> String -> ShowS
showString String
"Rgba8ui"
    Word32
33 -> String -> ShowS
showString String
"R32ui"
    Word32
34 -> String -> ShowS
showString String
"Rgb10a2ui"
    Word32
35 -> String -> ShowS
showString String
"Rg32ui"
    Word32
36 -> String -> ShowS
showString String
"Rg16ui"
    Word32
37 -> String -> ShowS
showString String
"Rg8ui"
    Word32
38 -> String -> ShowS
showString String
"R16ui"
    Word32
39 -> String -> ShowS
showString String
"R8ui"
    Word32
40 -> String -> ShowS
showString String
"R64ui"
    Word32
41 -> String -> ShowS
showString String
"R64i"
    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
"ImageFormat " 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 Unknown :: ImageFormat
pattern $mUnknown :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bUnknown :: ImageFormat
Unknown = ImageFormat 0

pattern Rgba32f :: ImageFormat
pattern $mRgba32f :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgba32f :: ImageFormat
Rgba32f = ImageFormat 1

pattern Rgba16f :: ImageFormat
pattern $mRgba16f :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgba16f :: ImageFormat
Rgba16f = ImageFormat 2

pattern R32f :: ImageFormat
pattern $mR32f :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR32f :: ImageFormat
R32f = ImageFormat 3

pattern Rgba8 :: ImageFormat
pattern $mRgba8 :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgba8 :: ImageFormat
Rgba8 = ImageFormat 4

pattern Rgba8Snorm :: ImageFormat
pattern $mRgba8Snorm :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgba8Snorm :: ImageFormat
Rgba8Snorm = ImageFormat 5

pattern Rg32f :: ImageFormat
pattern $mRg32f :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRg32f :: ImageFormat
Rg32f = ImageFormat 6

pattern Rg16f :: ImageFormat
pattern $mRg16f :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRg16f :: ImageFormat
Rg16f = ImageFormat 7

pattern R11fG11fB10f :: ImageFormat
pattern $mR11fG11fB10f :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR11fG11fB10f :: ImageFormat
R11fG11fB10f = ImageFormat 8

pattern R16f :: ImageFormat
pattern $mR16f :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR16f :: ImageFormat
R16f = ImageFormat 9

pattern Rgba16 :: ImageFormat
pattern $mRgba16 :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgba16 :: ImageFormat
Rgba16 = ImageFormat 10

pattern Rgb10A2 :: ImageFormat
pattern $mRgb10A2 :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgb10A2 :: ImageFormat
Rgb10A2 = ImageFormat 11

pattern Rg16 :: ImageFormat
pattern $mRg16 :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRg16 :: ImageFormat
Rg16 = ImageFormat 12

pattern Rg8 :: ImageFormat
pattern $mRg8 :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRg8 :: ImageFormat
Rg8 = ImageFormat 13

pattern R16 :: ImageFormat
pattern $mR16 :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR16 :: ImageFormat
R16 = ImageFormat 14

pattern R8 :: ImageFormat
pattern $mR8 :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR8 :: ImageFormat
R8 = ImageFormat 15

pattern Rgba16Snorm :: ImageFormat
pattern $mRgba16Snorm :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgba16Snorm :: ImageFormat
Rgba16Snorm = ImageFormat 16

pattern Rg16Snorm :: ImageFormat
pattern $mRg16Snorm :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRg16Snorm :: ImageFormat
Rg16Snorm = ImageFormat 17

pattern Rg8Snorm :: ImageFormat
pattern $mRg8Snorm :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRg8Snorm :: ImageFormat
Rg8Snorm = ImageFormat 18

pattern R16Snorm :: ImageFormat
pattern $mR16Snorm :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR16Snorm :: ImageFormat
R16Snorm = ImageFormat 19

pattern R8Snorm :: ImageFormat
pattern $mR8Snorm :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR8Snorm :: ImageFormat
R8Snorm = ImageFormat 20

pattern Rgba32i :: ImageFormat
pattern $mRgba32i :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgba32i :: ImageFormat
Rgba32i = ImageFormat 21

pattern Rgba16i :: ImageFormat
pattern $mRgba16i :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgba16i :: ImageFormat
Rgba16i = ImageFormat 22

pattern Rgba8i :: ImageFormat
pattern $mRgba8i :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgba8i :: ImageFormat
Rgba8i = ImageFormat 23

pattern R32i :: ImageFormat
pattern $mR32i :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR32i :: ImageFormat
R32i = ImageFormat 24

pattern Rg32i :: ImageFormat
pattern $mRg32i :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRg32i :: ImageFormat
Rg32i = ImageFormat 25

pattern Rg16i :: ImageFormat
pattern $mRg16i :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRg16i :: ImageFormat
Rg16i = ImageFormat 26

pattern Rg8i :: ImageFormat
pattern $mRg8i :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRg8i :: ImageFormat
Rg8i = ImageFormat 27

pattern R16i :: ImageFormat
pattern $mR16i :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR16i :: ImageFormat
R16i = ImageFormat 28

pattern R8i :: ImageFormat
pattern $mR8i :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR8i :: ImageFormat
R8i = ImageFormat 29

pattern Rgba32ui :: ImageFormat
pattern $mRgba32ui :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgba32ui :: ImageFormat
Rgba32ui = ImageFormat 30

pattern Rgba16ui :: ImageFormat
pattern $mRgba16ui :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgba16ui :: ImageFormat
Rgba16ui = ImageFormat 31

pattern Rgba8ui :: ImageFormat
pattern $mRgba8ui :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgba8ui :: ImageFormat
Rgba8ui = ImageFormat 32

pattern R32ui :: ImageFormat
pattern $mR32ui :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR32ui :: ImageFormat
R32ui = ImageFormat 33

pattern Rgb10a2ui :: ImageFormat
pattern $mRgb10a2ui :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRgb10a2ui :: ImageFormat
Rgb10a2ui = ImageFormat 34

pattern Rg32ui :: ImageFormat
pattern $mRg32ui :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRg32ui :: ImageFormat
Rg32ui = ImageFormat 35

pattern Rg16ui :: ImageFormat
pattern $mRg16ui :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRg16ui :: ImageFormat
Rg16ui = ImageFormat 36

pattern Rg8ui :: ImageFormat
pattern $mRg8ui :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bRg8ui :: ImageFormat
Rg8ui = ImageFormat 37

pattern R16ui :: ImageFormat
pattern $mR16ui :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR16ui :: ImageFormat
R16ui = ImageFormat 38

pattern R8ui :: ImageFormat
pattern $mR8ui :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR8ui :: ImageFormat
R8ui = ImageFormat 39

pattern R64ui :: ImageFormat
pattern $mR64ui :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR64ui :: ImageFormat
R64ui = ImageFormat 40

pattern R64i :: ImageFormat
pattern $mR64i :: forall {r}. ImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
$bR64i :: ImageFormat
R64i = ImageFormat 41