glsl-0.0.1.1: Parser and optimizer for a small subset of GLSL
Safe HaskellNone
LanguageHaskell2010

Language.GLSL.BitCode

Synopsis

Documentation

type BitsStmt = ((B, B), (BitsType, B, BitsExpr)) Source #

type BitsType = ((B, B), (B, B)) Source #

2 bits encode the type, then 2 bits encode the vec/mat size.

encodeArgs :: FunName -> [ExprAtom] -> (BitsExprAtom, BitsExprAtom) Source #

Implements special encodings for functions with more than 2 args.

type BitsBinaryOp = (B, B, B, B) Source #

4 bits encode the binary operator.

type BitsFunName = (B, B, B, B, B) Source #

5 bits encode the function name for FunCallExpr.

encodeExprAtomType :: ExprAtom -> (B, B, B) Source #

ExprAtom type is encoded in 3 bits.

type BitsExprAtom = ((B, B, B), ((B, B), (B, B))) Source #

main :: IO () Source #