Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- data TextureShape
- data Red = Red
- data RG = RG
- data RGB = RGB
- data RGBA = RGBA
- data TextureSemantics a
- = Regular a
- | Shadow a
- | MultiSample a
- | Buffer a
- data TextureArray
- data Sampler :: TextureShape -> TextureArray -> TextureSemantics * -> * -> *
- class GPU a => IsScalar a where
- class (Show a, Typeable a) => GPU a where
- class GPU a => SGPU a
- type family EltRepr a :: *
- type family EltRepr' a :: *
- class IsTuple tup where
- type TupleRepr tup
- data Tuple c t where
- data TupleIdx t e where
- ZeroTupIdx :: GPU s => TupleIdx (t, s) s
- SuccTupIdx :: TupleIdx t e -> TupleIdx (t, s) e
- tix0 :: GPU s => TupleIdx (t, s) s
- tix1 :: GPU s => TupleIdx ((t, s), s1) s
- tix2 :: GPU s => TupleIdx (((t, s), s1), s2) s
- tix3 :: GPU s => TupleIdx ((((t, s), s1), s2), s3) s
- tix4 :: GPU s => TupleIdx (((((t, s), s1), s2), s3), s4) s
- tix5 :: GPU s => TupleIdx ((((((t, s), s1), s2), s3), s4), s5) s
- tix6 :: GPU s => TupleIdx (((((((t, s), s1), s2), s3), s4), s5), s6) s
- tix7 :: GPU s => TupleIdx ((((((((t, s), s1), s2), s3), s4), s5), s6), s7) s
- tix8 :: GPU s => TupleIdx (((((((((t, s), s1), s2), s3), s4), s5), s6), s7), s8) s
Documentation
data TextureShape Source
Typeable TextureShape TexRect | |
Typeable TextureShape Tex3D | |
Typeable TextureShape Tex2D | |
Typeable TextureShape Tex1D | |
Typeable (TextureShape -> TextureArray -> TextureSemantics * -> * -> *) Sampler | |
Typeable (TextureShape -> TextureMipMap -> TextureArray -> Nat -> TextureSemantics * -> * -> *) TextureType | |
Typeable (TextureShape -> TextureArray -> TextureSemantics * -> k -> *) (Texture k) |
data TextureSemantics a Source
Regular a | |
Shadow a | |
MultiSample a | |
Buffer a |
Typeable (TextureSemantics * -> * -> *) TextureDataType | |
Typeable (TextureShape -> TextureArray -> TextureSemantics * -> * -> *) Sampler | |
Typeable (TextureShape -> TextureMipMap -> TextureArray -> Nat -> TextureSemantics * -> * -> *) TextureType | |
Typeable (k -> TextureSemantics k) (Buffer k) | |
Typeable (k -> TextureSemantics k) (MultiSample k) | |
Typeable (k -> TextureSemantics k) (Shadow k) | |
Typeable (k -> TextureSemantics k) (Regular k) | |
Typeable (TextureShape -> TextureArray -> TextureSemantics * -> k -> *) (Texture k) |
data TextureArray Source
Typeable TextureArray CubeTex | |
Typeable TextureArray ArrayTex | |
Typeable TextureArray SingleTex | |
Typeable (TextureShape -> TextureArray -> TextureSemantics * -> * -> *) Sampler | |
Typeable (TextureShape -> TextureMipMap -> TextureArray -> Nat -> TextureSemantics * -> * -> *) TextureType | |
Typeable (TextureShape -> TextureArray -> TextureSemantics * -> k -> *) (Texture k) |
data Sampler :: TextureShape -> TextureArray -> TextureSemantics * -> * -> * Source
class GPU a => IsScalar a where Source
class (Show a, Typeable a) => GPU a where Source
SGPU Float | |
SGPU Int32 | |
SGPU Word32 | |
SGPU M22F | |
SGPU M23F | |
SGPU M24F | |
SGPU M32F | |
SGPU M33F | |
SGPU M34F | |
SGPU M42F | |
SGPU M43F | |
SGPU M44F | |
SGPU V2F | |
SGPU V3F | |
SGPU V4F | |
SGPU V2I | |
SGPU V3I | |
SGPU V4I | |
SGPU V2U | |
SGPU V3U | |
SGPU V4U | |
(SGPU a, SGPU b) => SGPU (a, b) | |
(SGPU a, SGPU b, SGPU c) => SGPU (a, b, c) | |
(SGPU a, SGPU b, SGPU c, SGPU d) => SGPU (a, b, c, d) | |
(SGPU a, SGPU b, SGPU c, SGPU d, SGPU e) => SGPU (a, b, c, d, e) | |
(SGPU a, SGPU b, SGPU c, SGPU d, SGPU e, SGPU f) => SGPU (a, b, c, d, e, f) | |
(SGPU a, SGPU b, SGPU c, SGPU d, SGPU e, SGPU f, SGPU g) => SGPU (a, b, c, d, e, f, g) | |
(SGPU a, SGPU b, SGPU c, SGPU d, SGPU e, SGPU f, SGPU g, SGPU h) => SGPU (a, b, c, d, e, f, g, h) | |
(SGPU a, SGPU b, SGPU c, SGPU d, SGPU e, SGPU f, SGPU g, SGPU h, SGPU i) => SGPU (a, b, c, d, e, f, g, h, i) |
type family EltRepr a :: * Source
type EltRepr Bool = ((), Bool) | |
type EltRepr Float = ((), Float) | |
type EltRepr Int32 = ((), Int32) | |
type EltRepr Word32 = ((), Word32) | |
type EltRepr () = () | |
type EltRepr M22F = ((), M22F) | |
type EltRepr M23F = ((), M23F) | |
type EltRepr M24F = ((), M24F) | |
type EltRepr M32F = ((), M32F) | |
type EltRepr M33F = ((), M33F) | |
type EltRepr M34F = ((), M34F) | |
type EltRepr M42F = ((), M42F) | |
type EltRepr M43F = ((), M43F) | |
type EltRepr M44F = ((), M44F) | |
type EltRepr V2F = ((), V2F) | |
type EltRepr V3F = ((), V3F) | |
type EltRepr V4F = ((), V4F) | |
type EltRepr V2I = ((), V2I) | |
type EltRepr V3I = ((), V3I) | |
type EltRepr V4I = ((), V4I) | |
type EltRepr V2U = ((), V2U) | |
type EltRepr V3U = ((), V3U) | |
type EltRepr V4U = ((), V4U) | |
type EltRepr V2B = ((), V2B) | |
type EltRepr V3B = ((), V3B) | |
type EltRepr V4B = ((), V4B) | |
type EltRepr (a, b) = (EltRepr a, EltRepr' b) | |
type EltRepr (a, b, c) = (EltRepr (a, b), EltRepr' c) | |
type EltRepr (a, b, c, d) = (EltRepr (a, b, c), EltRepr' d) | |
type EltRepr (Sampler dim sh t ar) = ((), Sampler dim sh t ar) | |
type EltRepr (a, b, c, d, e) = (EltRepr (a, b, c, d), EltRepr' e) | |
type EltRepr (a, b, c, d, e, f) = (EltRepr (a, b, c, d, e), EltRepr' f) | |
type EltRepr (a, b, c, d, e, f, g) = (EltRepr (a, b, c, d, e, f), EltRepr' g) | |
type EltRepr (a, b, c, d, e, f, g, h) = (EltRepr (a, b, c, d, e, f, g), EltRepr' h) | |
type EltRepr (a, b, c, d, e, f, g, h, i) = (EltRepr (a, b, c, d, e, f, g, h), EltRepr' i) |
type family EltRepr' a :: * Source
type EltRepr' Bool = Bool | |
type EltRepr' Float = Float | |
type EltRepr' Int32 = Int32 | |
type EltRepr' Word32 = Word32 | |
type EltRepr' () = () | |
type EltRepr' M22F = M22F | |
type EltRepr' M23F = M23F | |
type EltRepr' M24F = M24F | |
type EltRepr' M32F = M32F | |
type EltRepr' M33F = M33F | |
type EltRepr' M34F = M34F | |
type EltRepr' M42F = M42F | |
type EltRepr' M43F = M43F | |
type EltRepr' M44F = M44F | |
type EltRepr' V2F = V2F | |
type EltRepr' V3F = V3F | |
type EltRepr' V4F = V4F | |
type EltRepr' V2I = V2I | |
type EltRepr' V3I = V3I | |
type EltRepr' V4I = V4I | |
type EltRepr' V2U = V2U | |
type EltRepr' V3U = V3U | |
type EltRepr' V4U = V4U | |
type EltRepr' V2B = V2B | |
type EltRepr' V3B = V3B | |
type EltRepr' V4B = V4B | |
type EltRepr' (a, b) = (EltRepr a, EltRepr' b) | |
type EltRepr' (a, b, c) = (EltRepr (a, b), EltRepr' c) | |
type EltRepr' (a, b, c, d) = (EltRepr (a, b, c), EltRepr' d) | |
type EltRepr' (Sampler dim sh t ar) = Sampler dim sh t ar | |
type EltRepr' (a, b, c, d, e) = (EltRepr (a, b, c, d), EltRepr' e) | |
type EltRepr' (a, b, c, d, e, f) = (EltRepr (a, b, c, d, e), EltRepr' f) | |
type EltRepr' (a, b, c, d, e, f, g) = (EltRepr (a, b, c, d, e, f), EltRepr' g) | |
type EltRepr' (a, b, c, d, e, f, g, h) = (EltRepr (a, b, c, d, e, f, g), EltRepr' h) | |
type EltRepr' (a, b, c, d, e, f, g, h, i) = (EltRepr (a, b, c, d, e, f, g, h), EltRepr' i) |
Conversion between surface n-tuples and our tuple representation.
our language uses nested tuple representation
We represent tuples as heterogenous lists, typed by a type list.
data TupleIdx t e where Source
Type-safe projection indicies for tuples.
NB: We index tuples by starting to count from the *right*!
ZeroTupIdx :: GPU s => TupleIdx (t, s) s | |
SuccTupIdx :: TupleIdx t e -> TupleIdx (t, s) e |