// generated file, do not modify!
// 2020-05-18T22:24:29.026311Z

package LambdaCube.IR;


typealias StreamName = Long

typealias ProgramName = Long

typealias TextureName = Long

typealias SamplerName = Long

typealias UniformName = String

typealias SlotName = Long

typealias FrameBufferComponent = Long

typealias TextureUnit = Long

typealias RenderTargetName = Long

typealias TextureUnitMapping = Map<UniformName, TextureUnit>

sealed class ArrayValue()
object VBoolArray : ArrayValue()
object VIntArray : ArrayValue()
object VWordArray : ArrayValue()
object VFloatArray : ArrayValue()

sealed class Value()
object VBool : Value()
object VV2B : Value()
object VV3B : Value()
object VV4B : Value()
object VWord : Value()
object VV2U : Value()
object VV3U : Value()
object VV4U : Value()
object VInt : Value()
object VV2I : Value()
object VV3I : Value()
object VV4I : Value()
object VFloat : Value()
object VV2F : Value()
object VV3F : Value()
object VV4F : Value()
object VM22F : Value()
object VM23F : Value()
object VM24F : Value()
object VM32F : Value()
object VM33F : Value()
object VM34F : Value()
object VM42F : Value()
object VM43F : Value()
object VM44F : Value()

sealed class InputType()
object Bool : InputType()
object V2B : InputType()
object V3B : InputType()
object V4B : InputType()
object Word : InputType()
object V2U : InputType()
object V3U : InputType()
object V4U : InputType()
object Int : InputType()
object V2I : InputType()
object V3I : InputType()
object V4I : InputType()
object Float : InputType()
object V2F : InputType()
object V3F : InputType()
object V4F : InputType()
object M22F : InputType()
object M23F : InputType()
object M24F : InputType()
object M32F : InputType()
object M33F : InputType()
object M34F : InputType()
object M42F : InputType()
object M43F : InputType()
object M44F : InputType()
object STexture1D : InputType()
object STexture2D : InputType()
object STextureCube : InputType()
object STexture1DArray : InputType()
object STexture2DArray : InputType()
object STexture2DRect : InputType()
object FTexture1D : InputType()
object FTexture2D : InputType()
object FTexture3D : InputType()
object FTextureCube : InputType()
object FTexture1DArray : InputType()
object FTexture2DArray : InputType()
object FTexture2DMS : InputType()
object FTexture2DMSArray : InputType()
object FTextureBuffer : InputType()
object FTexture2DRect : InputType()
object ITexture1D : InputType()
object ITexture2D : InputType()
object ITexture3D : InputType()
object ITextureCube : InputType()
object ITexture1DArray : InputType()
object ITexture2DArray : InputType()
object ITexture2DMS : InputType()
object ITexture2DMSArray : InputType()
object ITextureBuffer : InputType()
object ITexture2DRect : InputType()
object UTexture1D : InputType()
object UTexture2D : InputType()
object UTexture3D : InputType()
object UTextureCube : InputType()
object UTexture1DArray : InputType()
object UTexture2DArray : InputType()
object UTexture2DMS : InputType()
object UTexture2DMSArray : InputType()
object UTextureBuffer : InputType()
object UTexture2DRect : InputType()

sealed class PointSpriteCoordOrigin()
object LowerLeft : PointSpriteCoordOrigin()
object UpperLeft : PointSpriteCoordOrigin()

sealed class PointSize()
object PointSize : PointSize()
object ProgramPointSize : PointSize()

sealed class PolygonOffset()
object NoOffset : PolygonOffset()
object Offset : PolygonOffset()

sealed class FrontFace()
object CCW : FrontFace()
object CW : FrontFace()

sealed class PolygonMode()
object PolygonPoint : PolygonMode()
object PolygonLine : PolygonMode()
object PolygonFill : PolygonMode()

sealed class ProvokingVertex()
object FirstVertex : ProvokingVertex()
object LastVertex : ProvokingVertex()

sealed class CullMode()
object CullNone : CullMode()
object CullFront : CullMode()
object CullBack : CullMode()

sealed class ComparisonFunction()
object Never : ComparisonFunction()
object Less : ComparisonFunction()
object Equal : ComparisonFunction()
object Lequal : ComparisonFunction()
object Greater : ComparisonFunction()
object Notequal : ComparisonFunction()
object Gequal : ComparisonFunction()
object Always : ComparisonFunction()

typealias DepthFunction = ComparisonFunction

sealed class StencilOperation()
object OpZero : StencilOperation()
object OpKeep : StencilOperation()
object OpReplace : StencilOperation()
object OpIncr : StencilOperation()
object OpIncrWrap : StencilOperation()
object OpDecr : StencilOperation()
object OpDecrWrap : StencilOperation()
object OpInvert : StencilOperation()

sealed class BlendEquation()
object FuncAdd : BlendEquation()
object FuncSubtract : BlendEquation()
object FuncReverseSubtract : BlendEquation()
object Min : BlendEquation()
object Max : BlendEquation()

sealed class BlendingFactor()
object Zero : BlendingFactor()
object One : BlendingFactor()
object SrcColor : BlendingFactor()
object OneMinusSrcColor : BlendingFactor()
object DstColor : BlendingFactor()
object OneMinusDstColor : BlendingFactor()
object SrcAlpha : BlendingFactor()
object OneMinusSrcAlpha : BlendingFactor()
object DstAlpha : BlendingFactor()
object OneMinusDstAlpha : BlendingFactor()
object ConstantColor : BlendingFactor()
object OneMinusConstantColor : BlendingFactor()
object ConstantAlpha : BlendingFactor()
object OneMinusConstantAlpha : BlendingFactor()
object SrcAlphaSaturate : BlendingFactor()

sealed class LogicOperation()
object Clear : LogicOperation()
object And : LogicOperation()
object AndReverse : LogicOperation()
object Copy : LogicOperation()
object AndInverted : LogicOperation()
object Noop : LogicOperation()
object Xor : LogicOperation()
object Or : LogicOperation()
object Nor : LogicOperation()
object Equiv : LogicOperation()
object Invert : LogicOperation()
object OrReverse : LogicOperation()
object CopyInverted : LogicOperation()
object OrInverted : LogicOperation()
object Nand : LogicOperation()
object Set : LogicOperation()

data class StencilOps(
  val frontStencilOp : StencilOperation,
  val backStencilOp : StencilOperation,
)

data class StencilTest(
  val stencilComparision : ComparisonFunction,
  val stencilReference : Int,
  val stencilMask : Int,
)

object StencilTests

sealed class FetchPrimitive()
object Points : FetchPrimitive()
object Lines : FetchPrimitive()
object Triangles : FetchPrimitive()
object LinesAdjacency : FetchPrimitive()
object TrianglesAdjacency : FetchPrimitive()

sealed class OutputPrimitive()
object TrianglesOutput : OutputPrimitive()
object LinesOutput : OutputPrimitive()
object PointsOutput : OutputPrimitive()

sealed class ColorArity()
object Red : ColorArity()
object RG : ColorArity()
object RGB : ColorArity()
object RGBA : ColorArity()

sealed class Blending()
object NoBlending : Blending()
object BlendLogicOp : Blending()
data class Blend(
  val colorEqSrc : BlendEquation,
  val alphaEqSrc : BlendEquation,
  val colorFSrc : BlendingFactor,
  val colorFDst : BlendingFactor,
  val alphaFSrc : BlendingFactor,
  val alphaFDst : BlendingFactor,
  val color : V4F,
) : Blending()

sealed class RasterContext()
object PointCtx : RasterContext()
object LineCtx : RasterContext()
object TriangleCtx : RasterContext()

sealed class FragmentOperation()
object DepthOp : FragmentOperation()
object StencilOp : FragmentOperation()
object ColorOp : FragmentOperation()

data class AccumulationContext(
  val accViewportName : String?,
  val accOperations : List<FragmentOperation>,
)

sealed class TextureDataType()
object FloatT : TextureDataType()
object IntT : TextureDataType()
object WordT : TextureDataType()
object ShadowT : TextureDataType()

sealed class TextureType()
object Texture1D : TextureType()
object Texture2D : TextureType()
object Texture3D : TextureType()
object TextureCube : TextureType()
object TextureRect : TextureType()
object Texture2DMS : TextureType()
object TextureBuffer : TextureType()

sealed class MipMap()
object Mip : MipMap()
object NoMip : MipMap()
object AutoMip : MipMap()

sealed class Filter()
object Nearest : Filter()
object Linear : Filter()
object NearestMipmapNearest : Filter()
object NearestMipmapLinear : Filter()
object LinearMipmapNearest : Filter()
object LinearMipmapLinear : Filter()

sealed class EdgeMode()
object Repeat : EdgeMode()
object MirroredRepeat : EdgeMode()
object ClampToEdge : EdgeMode()
object ClampToBorder : EdgeMode()

sealed class ImageSemantic()
object Depth : ImageSemantic()
object Stencil : ImageSemantic()
object Color : ImageSemantic()

sealed class ImageRef()
object TextureImage : ImageRef()
object Framebuffer : ImageRef()

data class ClearImage(
  val imageSemantic : ImageSemantic,
  val clearValue : Value,
)

sealed class Command()
object SetRasterContext : Command()
object SetAccumulationContext : Command()
object SetRenderTarget : Command()
object SetProgram : Command()
object SetSamplerUniform : Command()
object SetTexture : Command()
object SetSampler : Command()
object RenderSlot : Command()
object RenderStream : Command()
object ClearRenderTarget : Command()
object GenerateMipMap : Command()
object SaveImage : Command()
object LoadImage : Command()

data class SamplerDescriptor(
  val samplerWrapS : EdgeMode,
  val samplerWrapT : EdgeMode?,
  val samplerWrapR : EdgeMode?,
  val samplerMinFilter : Filter,
  val samplerMagFilter : Filter,
  val samplerBorderColor : Value,
  val samplerMinLod : Float?,
  val samplerMaxLod : Float?,
  val samplerLodBias : Float,
  val samplerCompareFunc : ComparisonFunction?,
)

data class TextureDescriptor(
  val textureType : TextureType,
  val textureSize : Value,
  val textureSemantic : ImageSemantic,
  val textureSampler : SamplerDescriptor,
  val textureBaseLevel : Long,
  val textureMaxLevel : Long,
)

data class Parameter(
  val name : String,
  val ty : InputType,
)

data class Program(
  val programUniforms : Map<UniformName, InputType>,
  val programStreams : Map<UniformName, Parameter>,
  val programInTextures : Map<UniformName, InputType>,
  val programOutput : Array<Parameter>,
  val vertexShader : String,
  val geometryShader : String?,
  val fragmentShader : String,
)

data class Slot(
  val slotName : String,
  val slotStreams : Map<String, InputType>,
  val slotUniforms : Map<UniformName, InputType>,
  val slotPrimitive : FetchPrimitive,
  val slotPrograms : Array<ProgramName>,
)

data class StreamData(
  val streamData : Map<String, ArrayValue>,
  val streamType : Map<String, InputType>,
  val streamPrimitive : FetchPrimitive,
  val streamPrograms : Array<ProgramName>,
)

data class TargetItem(
  val targetSemantic : ImageSemantic,
  val targetRef : ImageRef?,
)

data class RenderTarget(
  val renderTargets : Array<TargetItem>,
)

sealed class Backend()
object WebGL1 : Backend()
object OpenGL33 : Backend()

data class Pipeline(
  val info : String,
  val backend : Backend,
  val textures : Array<TextureDescriptor>,
  val samplers : Array<SamplerDescriptor>,
  val targets : Array<RenderTarget>,
  val programs : Array<Program>,
  val slots : Array<Slot>,
  val streams : Array<StreamData>,
  val commands : Array<Command>,
)