module Data.SpirV.Reflect.InterfaceVariable
  ( InterfaceVariable(..)
  , WordOffset(..)
  ) where

import Data.SpirV.Enum qualified as SpirV
import Data.SpirV.Reflect.Enums qualified as Reflect
import Data.SpirV.Reflect.Traits qualified as Traits
import Data.SpirV.Reflect.TypeDescription (TypeDescription)
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Word (Word32)
import GHC.Generics (Generic)

data InterfaceVariable = InterfaceVariable
  { InterfaceVariable -> Maybe Word32
spirv_id         :: Maybe Word32
  , InterfaceVariable -> Maybe Text
name             :: Maybe Text
  , InterfaceVariable -> Word32
location         :: Word32
  , InterfaceVariable -> Maybe Word32
component        :: Maybe Word32
  , InterfaceVariable -> StorageClass
storage_class    :: SpirV.StorageClass
  , InterfaceVariable -> Maybe Text
semantic         :: Maybe Text
  , InterfaceVariable -> DecorationFlags
decoration_flags :: Reflect.DecorationFlags
  , InterfaceVariable -> Maybe BuiltIn
built_in         :: Maybe SpirV.BuiltIn
  , InterfaceVariable -> Numeric
numeric          :: Traits.Numeric
  , InterfaceVariable -> Array
array            :: Traits.Array
  , InterfaceVariable -> Vector InterfaceVariable
members          :: Vector InterfaceVariable
  , InterfaceVariable -> Format
format           :: Reflect.Format
  , InterfaceVariable -> Maybe TypeDescription
type_description :: Maybe TypeDescription
  , InterfaceVariable -> WordOffset
word_offset      :: WordOffset
  }
  deriving (InterfaceVariable -> InterfaceVariable -> Bool
(InterfaceVariable -> InterfaceVariable -> Bool)
-> (InterfaceVariable -> InterfaceVariable -> Bool)
-> Eq InterfaceVariable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InterfaceVariable -> InterfaceVariable -> Bool
== :: InterfaceVariable -> InterfaceVariable -> Bool
$c/= :: InterfaceVariable -> InterfaceVariable -> Bool
/= :: InterfaceVariable -> InterfaceVariable -> Bool
Eq, Int -> InterfaceVariable -> ShowS
[InterfaceVariable] -> ShowS
InterfaceVariable -> String
(Int -> InterfaceVariable -> ShowS)
-> (InterfaceVariable -> String)
-> ([InterfaceVariable] -> ShowS)
-> Show InterfaceVariable
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InterfaceVariable -> ShowS
showsPrec :: Int -> InterfaceVariable -> ShowS
$cshow :: InterfaceVariable -> String
show :: InterfaceVariable -> String
$cshowList :: [InterfaceVariable] -> ShowS
showList :: [InterfaceVariable] -> ShowS
Show, (forall x. InterfaceVariable -> Rep InterfaceVariable x)
-> (forall x. Rep InterfaceVariable x -> InterfaceVariable)
-> Generic InterfaceVariable
forall x. Rep InterfaceVariable x -> InterfaceVariable
forall x. InterfaceVariable -> Rep InterfaceVariable x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. InterfaceVariable -> Rep InterfaceVariable x
from :: forall x. InterfaceVariable -> Rep InterfaceVariable x
$cto :: forall x. Rep InterfaceVariable x -> InterfaceVariable
to :: forall x. Rep InterfaceVariable x -> InterfaceVariable
Generic)

newtype WordOffset = WordOffset
  { WordOffset -> Word32
location :: Word32
  }
  deriving (WordOffset -> WordOffset -> Bool
(WordOffset -> WordOffset -> Bool)
-> (WordOffset -> WordOffset -> Bool) -> Eq WordOffset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WordOffset -> WordOffset -> Bool
== :: WordOffset -> WordOffset -> Bool
$c/= :: WordOffset -> WordOffset -> Bool
/= :: WordOffset -> WordOffset -> Bool
Eq, Int -> WordOffset -> ShowS
[WordOffset] -> ShowS
WordOffset -> String
(Int -> WordOffset -> ShowS)
-> (WordOffset -> String)
-> ([WordOffset] -> ShowS)
-> Show WordOffset
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WordOffset -> ShowS
showsPrec :: Int -> WordOffset -> ShowS
$cshow :: WordOffset -> String
show :: WordOffset -> String
$cshowList :: [WordOffset] -> ShowS
showList :: [WordOffset] -> ShowS
Show, (forall x. WordOffset -> Rep WordOffset x)
-> (forall x. Rep WordOffset x -> WordOffset) -> Generic WordOffset
forall x. Rep WordOffset x -> WordOffset
forall x. WordOffset -> Rep WordOffset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. WordOffset -> Rep WordOffset x
from :: forall x. WordOffset -> Rep WordOffset x
$cto :: forall x. Rep WordOffset x -> WordOffset
to :: forall x. Rep WordOffset x -> WordOffset
Generic)