Xui.GPU.IR
Assembly: Xui.Core · C# declarations · Assembly overview
Types
enum BinaryOperatorenum BuiltInSemanticenum InterpolationModeclass IrAssignmentclass IrBinaryOpclass IrBindingDecorationclass IrBlockclass IrBuiltInDecorationclass IrConstantclass IrConstructorclass IrDecorationclass IrExpressionclass IrFieldAccessclass IrFragmentStageclass IrFunctionDeclclass IrIfclass IrInterpolationDecorationclass IrLocationDecorationclass IrMatrixTypeclass IrMethodCallclass IrNodeenum IrNodeKindclass IrParameterclass IrReturnclass IrSamplerTypeclass IrScalarTypeclass IrShaderModuleclass IrStatementclass IrStructDeclclass IrStructFieldclass IrStructTypeclass IrTextureTypeclass IrTypeclass IrUnaryOpclass IrVarDeclclass IrVectorTypeclass IrVertexStageenum ScalarKindclass SourceLocationenum UnaryOperator
enum BinaryOperator
Binary operator kind.
public enum BinaryOperator
{
Add,
Subtract,
Multiply,
Divide,
Modulo,
Equal,
NotEqual,
LessThan,
LessThanOrEqual,
GreaterThan,
GreaterThanOrEqual,
LogicalAnd,
LogicalOr,
BitwiseAnd,
BitwiseOr,
BitwiseXor,
ShiftLeft,
ShiftRight
}
BinaryOperator.Add
Add
Addition operator (+).
BinaryOperator.BitwiseAnd
BitwiseAnd
Bitwise AND (&).
BinaryOperator.BitwiseOr
BitwiseOr
Bitwise OR (|).
BinaryOperator.BitwiseXor
BitwiseXor
Bitwise XOR (^).
BinaryOperator.Divide
Divide
Division operator (/).
BinaryOperator.Equal
Equal
Equality comparison (==).
BinaryOperator.GreaterThan
GreaterThan
Greater-than comparison (>).
BinaryOperator.GreaterThanOrEqual
GreaterThanOrEqual
Greater-than-or-equal comparison (>=).
BinaryOperator.LessThan
LessThan
Less-than comparison (<).
BinaryOperator.LessThanOrEqual
LessThanOrEqual
Less-than-or-equal comparison (<=).
BinaryOperator.LogicalAnd
LogicalAnd
Logical AND.
BinaryOperator.LogicalOr
LogicalOr
Logical OR.
BinaryOperator.Modulo
Modulo
Modulo operator (%).
BinaryOperator.Multiply
Multiply
Multiplication operator (*).
BinaryOperator.NotEqual
NotEqual
Inequality comparison (!=).
BinaryOperator.ShiftLeft
ShiftLeft
Left bit shift (<<).
BinaryOperator.ShiftRight
ShiftRight
Right bit shift (>>).
BinaryOperator.Subtract
Subtract
Subtraction operator (-).
enum BuiltInSemantic
Built-in semantic kinds.
public enum BuiltInSemantic
{
Position,
FragDepth,
InstanceId,
VertexId
}
BuiltInSemantic.FragDepth
FragDepth
Fragment depth output semantic.
BuiltInSemantic.InstanceId
InstanceId
Instance identifier semantic.
BuiltInSemantic.Position
Position
Vertex position output semantic.
BuiltInSemantic.VertexId
VertexId
Vertex identifier semantic.
enum InterpolationMode
Interpolation mode for varyings.
public enum InterpolationMode
{
Linear,
Flat,
Perspective
}
InterpolationMode.Flat
Flat
No interpolation; value is constant across the primitive.
InterpolationMode.Linear
Linear
Linear interpolation without perspective correction.
InterpolationMode.Perspective
Perspective
Perspective-correct interpolation (default).
class IrAssignment
Represents an assignment statement.
public class IrAssignment : IrStatement
{
public override IrNodeKind Kind { get; }
public IrExpression Target { get; }
public IrExpression Value { get; }
public IrAssignment(IrExpression target, IrExpression value);
}
IrAssignment.IrAssignment(IrExpression target, IrExpression value)
public IrAssignment(IrExpression target, IrExpression value);
Initializes a new instance of Xui.GPU.IR.IrAssignment with the specified target and value.
IrNodeKind IrAssignment.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this statement.
IrExpression IrAssignment.Target
public IrExpression Target { get; }
Gets the assignment target expression.
IrExpression IrAssignment.Value
public IrExpression Value { get; }
Gets the value expression to assign.
class IrBinaryOp
Represents a binary operation.
public class IrBinaryOp : IrExpression
{
public override IrNodeKind Kind { get; }
public override IrType Type { get; }
public BinaryOperator Operator { get; }
public IrExpression Left { get; }
public IrExpression Right { get; }
public IrBinaryOp(BinaryOperator op, IrExpression left, IrExpression right, IrType type);
}
IrBinaryOp.IrBinaryOp(BinaryOperator op, IrExpression left, IrExpression right, IrType type)
public IrBinaryOp(BinaryOperator op, IrExpression left, IrExpression right, IrType type);
Initializes a new instance of the Xui.GPU.IR.IrBinaryOp class.
IrNodeKind IrBinaryOp.Kind
public override IrNodeKind Kind { get; }
Gets the node kind for this binary operation.
IrExpression IrBinaryOp.Left
public IrExpression Left { get; }
Gets the left-hand operand.
BinaryOperator IrBinaryOp.Operator
public BinaryOperator Operator { get; }
Gets the binary operator.
IrExpression IrBinaryOp.Right
public IrExpression Right { get; }
Gets the right-hand operand.
IrType IrBinaryOp.Type
public override IrType Type { get; }
Gets the result type of the binary operation.
class IrBindingDecoration
Represents a binding decoration for resources.
public class IrBindingDecoration : IrDecoration
{
public override IrNodeKind Kind { get; }
public int Group { get; }
public int Binding { get; }
public IrBindingDecoration(int group, int binding);
}
IrBindingDecoration.IrBindingDecoration(int group, int binding)
public IrBindingDecoration(int group, int binding);
Initializes a new instance of Xui.GPU.IR.IrBindingDecoration with the specified group and binding.
int IrBindingDecoration.Binding
public int Binding { get; }
Gets the binding slot index within the group.
int IrBindingDecoration.Group
public int Group { get; }
Gets the binding group index.
IrNodeKind IrBindingDecoration.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this decoration.
class IrBlock
Represents a block of statements.
public class IrBlock : IrStatement
{
public override IrNodeKind Kind { get; }
public List<IrStatement> Statements { get; }
public IrBlock();
public IrBlock(IEnumerable<IrStatement> statements);
}
IrBlock.IrBlock()
public IrBlock();
Initializes a new empty block.
IrBlock.IrBlock(IEnumerable<IrStatement> statements)
public IrBlock(IEnumerable<IrStatement> statements);
Initializes a new block with the specified statements.
IrNodeKind IrBlock.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this block.
List<IrStatement> IrBlock.Statements
public List<IrStatement> Statements { get; }
Gets the list of statements in this block.
class IrBuiltInDecoration
Represents a built-in semantic decoration.
public class IrBuiltInDecoration : IrDecoration
{
public override IrNodeKind Kind { get; }
public BuiltInSemantic Semantic { get; }
public IrBuiltInDecoration(BuiltInSemantic semantic);
}
IrBuiltInDecoration.IrBuiltInDecoration(BuiltInSemantic semantic)
public IrBuiltInDecoration(BuiltInSemantic semantic);
Initializes a new instance of Xui.GPU.IR.IrBuiltInDecoration with the specified semantic.
IrNodeKind IrBuiltInDecoration.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this decoration.
BuiltInSemantic IrBuiltInDecoration.Semantic
public BuiltInSemantic Semantic { get; }
Gets the built-in semantic.
class IrConstant
Represents a constant value.
public class IrConstant : IrExpression
{
public override IrNodeKind Kind { get; }
public override IrType Type { get; }
public object Value { get; }
public IrConstant(IrType type, object value);
}
IrConstant.IrConstant(IrType type, object value)
public IrConstant(IrType type, object value);
Initializes a new instance of the Xui.GPU.IR.IrConstant class.
IrNodeKind IrConstant.Kind
public override IrNodeKind Kind { get; }
Gets the node kind for this constant.
IrType IrConstant.Type
public override IrType Type { get; }
Gets the type of the constant.
object IrConstant.Value
public object Value { get; }
Gets the constant value.
class IrConstructor
Represents a constructor call.
public class IrConstructor : IrExpression
{
public override IrNodeKind Kind { get; }
public override IrType Type { get; }
public List<IrExpression> Arguments { get; }
public IrConstructor(IrType type, List<IrExpression> arguments);
}
IrConstructor.IrConstructor(IrType type, List<IrExpression> arguments)
public IrConstructor(IrType type, List<IrExpression> arguments);
Initializes a new instance of the Xui.GPU.IR.IrConstructor class.
List<IrExpression> IrConstructor.Arguments
public List<IrExpression> Arguments { get; }
Gets the list of arguments passed to the constructor.
IrNodeKind IrConstructor.Kind
public override IrNodeKind Kind { get; }
Gets the node kind for this constructor call.
IrType IrConstructor.Type
public override IrType Type { get; }
Gets the type being constructed.
class IrDecoration
Base class for decoration nodes (attributes).
public abstract class IrDecoration : IrNode
{
}
class IrExpression
Base class for all expression nodes in the IR.
public abstract class IrExpression : IrNode
{
public abstract IrType Type { get; }
}
IrType IrExpression.Type
public abstract IrType Type { get; }
Gets the type of this expression.
class IrFieldAccess
Represents a field access.
public class IrFieldAccess : IrExpression
{
public override IrNodeKind Kind { get; }
public override IrType Type { get; }
public IrExpression Object { get; }
public string FieldName { get; }
public IrFieldAccess(IrExpression obj, string fieldName, IrType type);
}
IrFieldAccess.IrFieldAccess(IrExpression obj, string fieldName, IrType type)
public IrFieldAccess(IrExpression obj, string fieldName, IrType type);
Initializes a new instance of the Xui.GPU.IR.IrFieldAccess class.
string IrFieldAccess.FieldName
public string FieldName { get; }
Gets the name of the field being accessed.
IrNodeKind IrFieldAccess.Kind
public override IrNodeKind Kind { get; }
Gets the node kind for this field access.
IrExpression IrFieldAccess.Object
public IrExpression Object { get; }
Gets the expression representing the object being accessed.
IrType IrFieldAccess.Type
public override IrType Type { get; }
Gets the result type of the field access.
class IrFragmentStage
Represents a fragment shader stage.
public class IrFragmentStage : IrNode
{
public override IrNodeKind Kind { get; }
public string Name { get; set; }
public IrStructType InputType { get; set; }
public IrStructType OutputType { get; set; }
public IrStructType? BindingsType { get; set; }
public IrBlock Body { get; set; }
}
IrStructType? IrFragmentStage.BindingsType
public IrStructType? BindingsType { get; set; }
Gets or sets the optional bindings struct type.
IrBlock IrFragmentStage.Body
public IrBlock Body { get; set; }
Gets or sets the body block of this stage.
IrStructType IrFragmentStage.InputType
public IrStructType InputType { get; set; }
Gets or sets the input struct type.
IrNodeKind IrFragmentStage.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this stage.
string IrFragmentStage.Name
public string Name { get; set; }
Gets or sets the stage name.
IrStructType IrFragmentStage.OutputType
public IrStructType OutputType { get; set; }
Gets or sets the output struct type.
class IrFunctionDecl
Represents a function declaration.
public class IrFunctionDecl : IrNode
{
public override IrNodeKind Kind { get; }
public string Name { get; set; }
public IrType ReturnType { get; set; }
public List<IrParameter> Parameters { get; }
public IrBlock Body { get; set; }
}
IrBlock IrFunctionDecl.Body
public IrBlock Body { get; set; }
Gets or sets the function body block.
IrNodeKind IrFunctionDecl.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this declaration.
string IrFunctionDecl.Name
public string Name { get; set; }
Gets or sets the function name.
List<IrParameter> IrFunctionDecl.Parameters
public List<IrParameter> Parameters { get; }
Gets the list of function parameters.
IrType IrFunctionDecl.ReturnType
public IrType ReturnType { get; set; }
Gets or sets the return type.
class IrIf
Represents an if statement.
public class IrIf : IrStatement
{
public override IrNodeKind Kind { get; }
public IrExpression Condition { get; }
public IrBlock ThenBlock { get; }
public IrBlock? ElseBlock { get; }
public IrIf(IrExpression condition, IrBlock thenBlock, IrBlock? elseBlock = null);
}
IrIf.IrIf(IrExpression condition, IrBlock thenBlock, IrBlock? elseBlock = null)
public IrIf(IrExpression condition, IrBlock thenBlock, IrBlock? elseBlock = null);
Initializes a new instance of Xui.GPU.IR.IrIf with the specified condition and blocks.
IrExpression IrIf.Condition
public IrExpression Condition { get; }
Gets the condition expression.
IrBlock? IrIf.ElseBlock
public IrBlock? ElseBlock { get; }
Gets the optional block executed when the condition is false.
IrNodeKind IrIf.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this statement.
IrBlock IrIf.ThenBlock
public IrBlock ThenBlock { get; }
Gets the block executed when the condition is true.
class IrInterpolationDecoration
Represents an interpolation mode decoration.
public class IrInterpolationDecoration : IrDecoration
{
public override IrNodeKind Kind { get; }
public InterpolationMode Mode { get; }
public IrInterpolationDecoration(InterpolationMode mode);
}
IrInterpolationDecoration.IrInterpolationDecoration(InterpolationMode mode)
public IrInterpolationDecoration(InterpolationMode mode);
Initializes a new instance of Xui.GPU.IR.IrInterpolationDecoration with the specified mode.
IrNodeKind IrInterpolationDecoration.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this decoration.
InterpolationMode IrInterpolationDecoration.Mode
public InterpolationMode Mode { get; }
Gets the interpolation mode.
class IrLocationDecoration
Represents a location decoration for vertex inputs/outputs.
public class IrLocationDecoration : IrDecoration
{
public override IrNodeKind Kind { get; }
public int Location { get; }
public IrLocationDecoration(int location);
}
IrLocationDecoration.IrLocationDecoration(int location)
public IrLocationDecoration(int location);
Initializes a new instance of Xui.GPU.IR.IrLocationDecoration with the specified location.
IrNodeKind IrLocationDecoration.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this decoration.
int IrLocationDecoration.Location
public int Location { get; }
Gets the location index.
class IrMatrixType
Represents a matrix type (Float4x4, etc.).
public class IrMatrixType : IrType
{
public override IrNodeKind Kind { get; }
public override string Name { get; }
public IrScalarType ElementType { get; }
public int Rows { get; }
public int Columns { get; }
public IrMatrixType(IrScalarType elementType, int rows, int columns);
}
IrMatrixType.IrMatrixType(IrScalarType elementType, int rows, int columns)
public IrMatrixType(IrScalarType elementType, int rows, int columns);
Initializes a new instance of Xui.GPU.IR.IrMatrixType with the specified element type and dimensions.
int IrMatrixType.Columns
public int Columns { get; }
Gets the number of columns.
IrScalarType IrMatrixType.ElementType
public IrScalarType ElementType { get; }
Gets the scalar element type of the matrix.
IrNodeKind IrMatrixType.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this type.
string IrMatrixType.Name
public override string Name { get; }
Gets the display name of this matrix type.
int IrMatrixType.Rows
public int Rows { get; }
Gets the number of rows.
class IrMethodCall
Represents a method call (shader intrinsic or user function).
public class IrMethodCall : IrExpression
{
public override IrNodeKind Kind { get; }
public override IrType Type { get; }
public string MethodName { get; }
public List<IrExpression> Arguments { get; }
public IrExpression? Target { get; }
public IrMethodCall(string methodName, List<IrExpression> arguments, IrType type, IrExpression? target = null);
}
IrMethodCall.IrMethodCall(string methodName, List<IrExpression> arguments, IrType type, IrExpression? target = null)
public IrMethodCall(string methodName, List<IrExpression> arguments, IrType type, IrExpression? target = null);
Initializes a new instance of the Xui.GPU.IR.IrMethodCall class.
List<IrExpression> IrMethodCall.Arguments
public List<IrExpression> Arguments { get; }
Gets the list of arguments passed to the method.
IrNodeKind IrMethodCall.Kind
public override IrNodeKind Kind { get; }
Gets the node kind for this method call.
string IrMethodCall.MethodName
public string MethodName { get; }
Gets the name of the method being called.
IrExpression? IrMethodCall.Target
public IrExpression? Target { get; }
Gets the optional target expression for instance method calls.
IrType IrMethodCall.Type
public override IrType Type { get; }
Gets the return type of the method call.
class IrNode
Base class for all IR nodes in the intermediate representation.
public abstract class IrNode
{
public abstract IrNodeKind Kind { get; }
public SourceLocation? SourceLocation { get; set; }
}
IrNodeKind IrNode.Kind
public abstract IrNodeKind Kind { get; }
Gets the node kind for pattern matching and visitors.
SourceLocation? IrNode.SourceLocation
public SourceLocation? SourceLocation { get; set; }
Gets or sets the source location where this node originates from. Used to generate accurate error messages mapping back to C# source.
enum IrNodeKind
Enumeration of all IR node kinds.
public enum IrNodeKind
{
ScalarType,
VectorType,
MatrixType,
StructType,
TextureType,
SamplerType,
Constant,
Parameter,
Field,
BinaryOp,
UnaryOp,
MethodCall,
Constructor,
VarDecl,
Assignment,
Return,
If,
Block,
Location,
BuiltIn,
Binding,
Interpolation,
ShaderModule,
VertexStage,
FragmentStage,
StructDecl,
FunctionDecl,
}
IrNodeKind.Assignment
Assignment
Assignment statement.
IrNodeKind.BinaryOp
BinaryOp
Binary operation expression.
IrNodeKind.Binding
Binding
Resource binding decoration.
IrNodeKind.Block
Block
Block of statements.
IrNodeKind.BuiltIn
BuiltIn
Built-in semantic decoration.
IrNodeKind.Constant
Constant
Constant expression.
IrNodeKind.Constructor
Constructor
Constructor call expression.
IrNodeKind.Field
Field
Field access expression.
IrNodeKind.FragmentStage
FragmentStage
Fragment shader stage.
IrNodeKind.FunctionDecl
FunctionDecl
Function declaration.
IrNodeKind.If
If
Conditional statement.
IrNodeKind.Interpolation
Interpolation
Interpolation mode decoration.
IrNodeKind.Location
Location
Location decoration.
IrNodeKind.MatrixType
MatrixType
Matrix type node.
IrNodeKind.MethodCall
MethodCall
Method call expression.
IrNodeKind.Parameter
Parameter
Parameter reference expression.
IrNodeKind.Return
Return
Return statement.
IrNodeKind.SamplerType
SamplerType
Sampler type node.
IrNodeKind.ScalarType
ScalarType
Scalar type node.
IrNodeKind.ShaderModule
ShaderModule
Shader module node.
IrNodeKind.StructDecl
StructDecl
Struct declaration.
IrNodeKind.StructType
StructType
Struct type node.
IrNodeKind.TextureType
TextureType
Texture type node.
IrNodeKind.UnaryOp
UnaryOp
Unary operation expression.
IrNodeKind.VarDecl
VarDecl
Variable declaration statement.
IrNodeKind.VectorType
VectorType
Vector type node.
IrNodeKind.VertexStage
VertexStage
Vertex shader stage.
class IrParameter
Represents a parameter reference.
public class IrParameter : IrExpression
{
public override IrNodeKind Kind { get; }
public override IrType Type { get; }
public string Name { get; }
public IrParameter(string name, IrType type);
}
IrParameter.IrParameter(string name, IrType type)
public IrParameter(string name, IrType type);
Initializes a new instance of the Xui.GPU.IR.IrParameter class.
IrNodeKind IrParameter.Kind
public override IrNodeKind Kind { get; }
Gets the node kind for this parameter reference.
string IrParameter.Name
public string Name { get; }
Gets the name of the parameter.
IrType IrParameter.Type
public override IrType Type { get; }
Gets the type of the parameter.
class IrReturn
Represents a return statement.
public class IrReturn : IrStatement
{
public override IrNodeKind Kind { get; }
public IrExpression? Value { get; }
public IrReturn(IrExpression? value = null);
}
IrReturn.IrReturn(IrExpression? value = null)
public IrReturn(IrExpression? value = null);
Initializes a new instance of Xui.GPU.IR.IrReturn with an optional return value.
IrNodeKind IrReturn.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this statement.
IrExpression? IrReturn.Value
public IrExpression? Value { get; }
Gets the optional return value expression.
class IrSamplerType
Represents a sampler type.
public class IrSamplerType : IrType
{
public override IrNodeKind Kind { get; }
public override string Name { get; }
public static readonly IrSamplerType Instance;
}
IrSamplerType IrSamplerType.Instance
public static readonly IrSamplerType Instance;
Shared singleton instance of the sampler type.
IrNodeKind IrSamplerType.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this type.
string IrSamplerType.Name
public override string Name { get; }
Gets the display name of this sampler type.
class IrScalarType
Represents a scalar type (F32, I32, U32, Bool).
public class IrScalarType : IrType
{
public override IrNodeKind Kind { get; }
public override string Name { get; }
public ScalarKind ScalarKind { get; }
public IrScalarType(ScalarKind kind);
}
IrScalarType.IrScalarType(ScalarKind kind)
public IrScalarType(ScalarKind kind);
Initializes a new instance of Xui.GPU.IR.IrScalarType with the specified scalar kind.
IrNodeKind IrScalarType.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this type.
string IrScalarType.Name
public override string Name { get; }
Gets the display name of this scalar type.
ScalarKind IrScalarType.ScalarKind
public ScalarKind ScalarKind { get; }
Gets the scalar kind.
class IrShaderModule
Represents a complete shader module with all stages and declarations.
public class IrShaderModule : IrNode
{
public override IrNodeKind Kind { get; }
public string Name { get; set; }
public List<IrStructDecl> Structs { get; }
public List<IrFunctionDecl> Functions { get; }
public IrVertexStage? VertexStage { get; set; }
public IrFragmentStage? FragmentStage { get; set; }
}
IrFragmentStage? IrShaderModule.FragmentStage
public IrFragmentStage? FragmentStage { get; set; }
Gets or sets the optional fragment shader stage.
List<IrFunctionDecl> IrShaderModule.Functions
public List<IrFunctionDecl> Functions { get; }
Gets the list of function declarations.
IrNodeKind IrShaderModule.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this module.
string IrShaderModule.Name
public string Name { get; set; }
Gets or sets the module name.
List<IrStructDecl> IrShaderModule.Structs
public List<IrStructDecl> Structs { get; }
Gets the list of struct declarations.
IrVertexStage? IrShaderModule.VertexStage
public IrVertexStage? VertexStage { get; set; }
Gets or sets the optional vertex shader stage.
class IrStatement
Base class for all statement nodes in the IR.
public abstract class IrStatement : IrNode
{
}
class IrStructDecl
Represents a struct declaration.
public class IrStructDecl : IrNode
{
public override IrNodeKind Kind { get; }
public IrStructType Type { get; }
public IrStructDecl(IrStructType type);
}
IrStructDecl.IrStructDecl(IrStructType type)
public IrStructDecl(IrStructType type);
Initializes a new instance of Xui.GPU.IR.IrStructDecl with the specified struct type.
IrNodeKind IrStructDecl.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this declaration.
IrStructType IrStructDecl.Type
public IrStructType Type { get; }
Gets the struct type being declared.
class IrStructField
Represents a field in a struct.
public class IrStructField
{
public string Name { get; set; }
public IrType Type { get; set; }
public List<IrDecoration> Decorations { get; }
}
List<IrDecoration> IrStructField.Decorations
public List<IrDecoration> Decorations { get; }
Gets the list of decorations applied to this field.
string IrStructField.Name
public string Name { get; set; }
Gets or sets the field name.
IrType IrStructField.Type
public IrType Type { get; set; }
Gets or sets the field type.
class IrStructType
Represents a struct type.
public class IrStructType : IrType
{
public override IrNodeKind Kind { get; }
public override string Name { get; }
public List<IrStructField> Fields { get; }
public IrStructType(string name);
}
IrStructType.IrStructType(string name)
public IrStructType(string name);
Initializes a new instance of Xui.GPU.IR.IrStructType with the specified name.
List<IrStructField> IrStructType.Fields
public List<IrStructField> Fields { get; }
Gets the list of fields in this struct.
IrNodeKind IrStructType.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this type.
string IrStructType.Name
public override string Name { get; }
Gets the name of this struct type.
class IrTextureType
Represents a texture type.
public class IrTextureType : IrType
{
public override IrNodeKind Kind { get; }
public override string Name { get; }
public IrType PixelType { get; }
public IrTextureType(IrType pixelType);
}
IrTextureType.IrTextureType(IrType pixelType)
public IrTextureType(IrType pixelType);
Initializes a new instance of Xui.GPU.IR.IrTextureType with the specified pixel type.
IrNodeKind IrTextureType.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this type.
string IrTextureType.Name
public override string Name { get; }
Gets the display name of this texture type.
IrType IrTextureType.PixelType
public IrType PixelType { get; }
Gets the pixel element type of the texture.
class IrType
Base class for all type nodes in the IR.
public abstract class IrType : IrNode
{
public abstract string Name { get; }
}
string IrType.Name
public abstract string Name { get; }
Gets the name of this type.
class IrUnaryOp
Represents a unary operation.
public class IrUnaryOp : IrExpression
{
public override IrNodeKind Kind { get; }
public override IrType Type { get; }
public UnaryOperator Operator { get; }
public IrExpression Operand { get; }
public IrUnaryOp(UnaryOperator op, IrExpression operand, IrType type);
}
IrUnaryOp.IrUnaryOp(UnaryOperator op, IrExpression operand, IrType type)
public IrUnaryOp(UnaryOperator op, IrExpression operand, IrType type);
Initializes a new instance of the Xui.GPU.IR.IrUnaryOp class.
IrNodeKind IrUnaryOp.Kind
public override IrNodeKind Kind { get; }
Gets the node kind for this unary operation.
IrExpression IrUnaryOp.Operand
public IrExpression Operand { get; }
Gets the operand of the unary operation.
UnaryOperator IrUnaryOp.Operator
public UnaryOperator Operator { get; }
Gets the unary operator.
IrType IrUnaryOp.Type
public override IrType Type { get; }
Gets the result type of the unary operation.
class IrVarDecl
Represents a variable declaration.
public class IrVarDecl : IrStatement
{
public override IrNodeKind Kind { get; }
public string Name { get; }
public IrType Type { get; }
public IrExpression? Initializer { get; }
public IrVarDecl(string name, IrType type, IrExpression? initializer = null);
}
IrVarDecl.IrVarDecl(string name, IrType type, IrExpression? initializer = null)
public IrVarDecl(string name, IrType type, IrExpression? initializer = null);
Initializes a new instance of Xui.GPU.IR.IrVarDecl with the specified name, type, and optional initializer.
IrExpression? IrVarDecl.Initializer
public IrExpression? Initializer { get; }
Gets the optional initializer expression.
IrNodeKind IrVarDecl.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this statement.
string IrVarDecl.Name
public string Name { get; }
Gets the variable name.
IrType IrVarDecl.Type
public IrType Type { get; }
Gets the variable type.
class IrVectorType
Represents a vector type (Float2, Float3, Float4, Int2, etc.).
public class IrVectorType : IrType
{
public override IrNodeKind Kind { get; }
public override string Name { get; }
public IrScalarType ElementType { get; }
public int Dimension { get; }
public IrVectorType(IrScalarType elementType, int dimension);
}
IrVectorType.IrVectorType(IrScalarType elementType, int dimension)
public IrVectorType(IrScalarType elementType, int dimension);
Initializes a new instance of Xui.GPU.IR.IrVectorType with the specified element type and dimension.
int IrVectorType.Dimension
public int Dimension { get; }
Gets the number of components (2-4).
IrScalarType IrVectorType.ElementType
public IrScalarType ElementType { get; }
Gets the scalar element type of the vector.
IrNodeKind IrVectorType.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this type.
string IrVectorType.Name
public override string Name { get; }
Gets the display name of this vector type.
class IrVertexStage
Represents a vertex shader stage.
public class IrVertexStage : IrNode
{
public override IrNodeKind Kind { get; }
public string Name { get; set; }
public IrStructType InputType { get; set; }
public IrStructType OutputType { get; set; }
public IrStructType? BindingsType { get; set; }
public IrBlock Body { get; set; }
}
IrStructType? IrVertexStage.BindingsType
public IrStructType? BindingsType { get; set; }
Gets or sets the optional bindings struct type.
IrBlock IrVertexStage.Body
public IrBlock Body { get; set; }
Gets or sets the body block of this stage.
IrStructType IrVertexStage.InputType
public IrStructType InputType { get; set; }
Gets or sets the input struct type.
IrNodeKind IrVertexStage.Kind
public override IrNodeKind Kind { get; }
Gets the IR node kind for this stage.
string IrVertexStage.Name
public string Name { get; set; }
Gets or sets the stage name.
IrStructType IrVertexStage.OutputType
public IrStructType OutputType { get; set; }
Gets or sets the output struct type.
enum ScalarKind
Kind of scalar type.
public enum ScalarKind
{
F32,
I32,
U32,
Bool
}
ScalarKind.Bool
Bool
Boolean value.
ScalarKind.F32
F32
32-bit floating point.
ScalarKind.I32
I32
32-bit signed integer.
ScalarKind.U32
U32
32-bit unsigned integer.
class SourceLocation
Represents a location in source code. Used to map IR nodes back to original C# source for error reporting.
public class SourceLocation
{
public string FilePath { get; set; }
public int Line { get; set; }
public int Column { get; set; }
public string ToDisplayString();
}
int SourceLocation.Column
public int Column { get; set; }
Gets the column number (1-based).
string SourceLocation.FilePath
public string FilePath { get; set; }
Gets the source file path.
int SourceLocation.Line
public int Line { get; set; }
Gets the line number (1-based).
string SourceLocation.ToDisplayString()
public string ToDisplayString();
Gets a formatted string representation of this location.
enum UnaryOperator
Unary operator kind.
public enum UnaryOperator
{
Negate,
LogicalNot,
BitwiseNot
}
UnaryOperator.BitwiseNot
BitwiseNot
Bitwise NOT (~).
UnaryOperator.LogicalNot
LogicalNot
Logical NOT (!).
UnaryOperator.Negate
Negate
Arithmetic negation (-).