# Xui.GPU.IR

Assembly: **Xui.Core** · [C# declarations](index.cs) · [Assembly overview](../index.md)

## Types

- [`enum BinaryOperator`](#api-085654f80d56da54)
- [`enum BuiltInSemantic`](#api-797320520957e252)
- [`enum InterpolationMode`](#api-726b278a28dd730f)
- [`class IrAssignment`](#api-3315037f403082b7)
- [`class IrBinaryOp`](#api-969261c2e31da483)
- [`class IrBindingDecoration`](#api-2d676591be33873b)
- [`class IrBlock`](#api-fa67309b4b73feab)
- [`class IrBuiltInDecoration`](#api-43ccb41d80b3d6b3)
- [`class IrConstant`](#api-4deaf1e8a2607c53)
- [`class IrConstructor`](#api-f2a7a274e0f9dda2)
- [`class IrDecoration`](#api-19b02074d5fb2083)
- [`class IrExpression`](#api-eb1502e1a1272db4)
- [`class IrFieldAccess`](#api-697796b2f3eff1a5)
- [`class IrFragmentStage`](#api-9d790f6b4228ddcc)
- [`class IrFunctionDecl`](#api-8983c63a8a6ae75d)
- [`class IrIf`](#api-e3edf326ea2e67ee)
- [`class IrInterpolationDecoration`](#api-34592b5b56008593)
- [`class IrLocationDecoration`](#api-92ee3d0a1c4a3b0f)
- [`class IrMatrixType`](#api-965b74ad4d8342cb)
- [`class IrMethodCall`](#api-4079957234850fd2)
- [`class IrNode`](#api-52dfef4bda6c642e)
- [`enum IrNodeKind`](#api-30af59d64416e09b)
- [`class IrParameter`](#api-0291730b0148d66a)
- [`class IrReturn`](#api-57b684822a5ec4d9)
- [`class IrSamplerType`](#api-f3b4c99a3b498c04)
- [`class IrScalarType`](#api-1f32d258153955f1)
- [`class IrShaderModule`](#api-1bd2074e7abbed7a)
- [`class IrStatement`](#api-de93e83d22ac3668)
- [`class IrStructDecl`](#api-01d7b076b50eb565)
- [`class IrStructField`](#api-a3a85d7b30af0ff0)
- [`class IrStructType`](#api-068a4c29e81ecb53)
- [`class IrTextureType`](#api-86efe1984378ea5b)
- [`class IrType`](#api-6bfe242b43ee6f66)
- [`class IrUnaryOp`](#api-c35bfdf2b1626ab6)
- [`class IrVarDecl`](#api-0a278c37a97af092)
- [`class IrVectorType`](#api-dc7babe4caadcc31)
- [`class IrVertexStage`](#api-3cbbd8aad96df22a)
- [`enum ScalarKind`](#api-778fda2eb98f3cd9)
- [`class SourceLocation`](#api-384e77f149b5bdcb)
- [`enum UnaryOperator`](#api-6d64aec28c2363e0)

<a id="api-085654f80d56da54"></a>

## `enum BinaryOperator`

Binary operator kind.

```csharp
public enum BinaryOperator
{
    Add,
    Subtract,
    Multiply,
    Divide,
    Modulo,
    Equal,
    NotEqual,
    LessThan,
    LessThanOrEqual,
    GreaterThan,
    GreaterThanOrEqual,
    LogicalAnd,
    LogicalOr,
    BitwiseAnd,
    BitwiseOr,
    BitwiseXor,
    ShiftLeft,
    ShiftRight
}
```

<a id="api-a49c870a26d830d8"></a>

### [`BinaryOperator.Add`](#api-a49c870a26d830d8)


```csharp
Add
```

Addition operator (+).

<a id="api-b968ad21e035ff3c"></a>

### [`BinaryOperator.BitwiseAnd`](#api-b968ad21e035ff3c)


```csharp
BitwiseAnd
```

Bitwise AND (&amp;).

<a id="api-723d53de61fc7bbc"></a>

### [`BinaryOperator.BitwiseOr`](#api-723d53de61fc7bbc)


```csharp
BitwiseOr
```

Bitwise OR (|).

<a id="api-269946f17cb70f2d"></a>

### [`BinaryOperator.BitwiseXor`](#api-269946f17cb70f2d)


```csharp
BitwiseXor
```

Bitwise XOR (^).

<a id="api-7a8e894401cb8241"></a>

### [`BinaryOperator.Divide`](#api-7a8e894401cb8241)


```csharp
Divide
```

Division operator (/).

<a id="api-26f08bdd7c49239a"></a>

### [`BinaryOperator.Equal`](#api-26f08bdd7c49239a)


```csharp
Equal
```

Equality comparison (==).

<a id="api-86e04cfdce686684"></a>

### [`BinaryOperator.GreaterThan`](#api-86e04cfdce686684)


```csharp
GreaterThan
```

Greater-than comparison (&gt;).

<a id="api-101bc81e3ff4da6f"></a>

### [`BinaryOperator.GreaterThanOrEqual`](#api-101bc81e3ff4da6f)


```csharp
GreaterThanOrEqual
```

Greater-than-or-equal comparison (&gt;=).

<a id="api-e42302da89f440eb"></a>

### [`BinaryOperator.LessThan`](#api-e42302da89f440eb)


```csharp
LessThan
```

Less-than comparison (&lt;).

<a id="api-442e62db5e1d8620"></a>

### [`BinaryOperator.LessThanOrEqual`](#api-442e62db5e1d8620)


```csharp
LessThanOrEqual
```

Less-than-or-equal comparison (&lt;=).

<a id="api-f4baa0ab61e3053e"></a>

### [`BinaryOperator.LogicalAnd`](#api-f4baa0ab61e3053e)


```csharp
LogicalAnd
```

Logical AND.

<a id="api-15df3581785eaa06"></a>

### [`BinaryOperator.LogicalOr`](#api-15df3581785eaa06)


```csharp
LogicalOr
```

Logical OR.

<a id="api-920141acf9ebb1bb"></a>

### [`BinaryOperator.Modulo`](#api-920141acf9ebb1bb)


```csharp
Modulo
```

Modulo operator (%).

<a id="api-c2fc56e0200e0374"></a>

### [`BinaryOperator.Multiply`](#api-c2fc56e0200e0374)


```csharp
Multiply
```

Multiplication operator (*).

<a id="api-bef53065956293b8"></a>

### [`BinaryOperator.NotEqual`](#api-bef53065956293b8)


```csharp
NotEqual
```

Inequality comparison (!=).

<a id="api-db0e562317a50000"></a>

### [`BinaryOperator.ShiftLeft`](#api-db0e562317a50000)


```csharp
ShiftLeft
```

Left bit shift (&lt;&lt;).

<a id="api-529f42f73352a1bd"></a>

### [`BinaryOperator.ShiftRight`](#api-529f42f73352a1bd)


```csharp
ShiftRight
```

Right bit shift (&gt;&gt;).

<a id="api-9f462e6ee09c795e"></a>

### [`BinaryOperator.Subtract`](#api-9f462e6ee09c795e)


```csharp
Subtract
```

Subtraction operator (-).


<a id="api-797320520957e252"></a>

## `enum BuiltInSemantic`

Built-in semantic kinds.

```csharp
public enum BuiltInSemantic
{
    Position,
    FragDepth,
    InstanceId,
    VertexId
}
```

<a id="api-73942509054dc098"></a>

### [`BuiltInSemantic.FragDepth`](#api-73942509054dc098)


```csharp
FragDepth
```

Fragment depth output semantic.

<a id="api-27fdc92f5bf3b58b"></a>

### [`BuiltInSemantic.InstanceId`](#api-27fdc92f5bf3b58b)


```csharp
InstanceId
```

Instance identifier semantic.

<a id="api-9df32c79ecd3d432"></a>

### [`BuiltInSemantic.Position`](#api-9df32c79ecd3d432)


```csharp
Position
```

Vertex position output semantic.

<a id="api-b1e0842fa2ca792d"></a>

### [`BuiltInSemantic.VertexId`](#api-b1e0842fa2ca792d)


```csharp
VertexId
```

Vertex identifier semantic.


<a id="api-726b278a28dd730f"></a>

## `enum InterpolationMode`

Interpolation mode for varyings.

```csharp
public enum InterpolationMode
{
    Linear,
    Flat,
    Perspective
}
```

<a id="api-f2ff96486476b7ec"></a>

### [`InterpolationMode.Flat`](#api-f2ff96486476b7ec)


```csharp
Flat
```

No interpolation; value is constant across the primitive.

<a id="api-2d200cc3f65fa79a"></a>

### [`InterpolationMode.Linear`](#api-2d200cc3f65fa79a)


```csharp
Linear
```

Linear interpolation without perspective correction.

<a id="api-9c3dbf79d93fa96c"></a>

### [`InterpolationMode.Perspective`](#api-9c3dbf79d93fa96c)


```csharp
Perspective
```

Perspective-correct interpolation (default).


<a id="api-3315037f403082b7"></a>

## `class IrAssignment`

Represents an assignment statement.

```csharp
public class IrAssignment : IrStatement
{
    public override IrNodeKind Kind { get; }
    public IrExpression Target { get; }
    public IrExpression Value { get; }

    public IrAssignment(IrExpression target, IrExpression value);
}
```

<a id="api-53b8a722db32ddb9"></a>

### [`IrAssignment.IrAssignment(IrExpression target, IrExpression value)`](#api-53b8a722db32ddb9)


```csharp
public IrAssignment(IrExpression target, IrExpression value);
```

Initializes a new instance of [`Xui.GPU.IR.IrAssignment`](../xui-gpu-ir/index.md#api-3315037f403082b7) with the specified target and value.

<a id="api-e1bca30a29e7ec99"></a>

### [`IrNodeKind IrAssignment.Kind`](#api-e1bca30a29e7ec99)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this statement.

<a id="api-c7a03c4e6cdfaec5"></a>

### [`IrExpression IrAssignment.Target`](#api-c7a03c4e6cdfaec5)


```csharp
public IrExpression Target { get; }
```

Gets the assignment target expression.

<a id="api-f4a6f3d2421f4014"></a>

### [`IrExpression IrAssignment.Value`](#api-f4a6f3d2421f4014)


```csharp
public IrExpression Value { get; }
```

Gets the value expression to assign.


<a id="api-969261c2e31da483"></a>

## `class IrBinaryOp`

Represents a binary operation.

```csharp
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);
}
```

<a id="api-f8976977e8ae7750"></a>

### [`IrBinaryOp.IrBinaryOp(BinaryOperator op, IrExpression left, IrExpression right, IrType type)`](#api-f8976977e8ae7750)


```csharp
public IrBinaryOp(BinaryOperator op, IrExpression left, IrExpression right, IrType type);
```

Initializes a new instance of the [`Xui.GPU.IR.IrBinaryOp`](../xui-gpu-ir/index.md#api-969261c2e31da483) class.

<a id="api-a8924b6aa7ae3974"></a>

### [`IrNodeKind IrBinaryOp.Kind`](#api-a8924b6aa7ae3974)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the node kind for this binary operation.

<a id="api-240c7bcd3240e8e2"></a>

### [`IrExpression IrBinaryOp.Left`](#api-240c7bcd3240e8e2)


```csharp
public IrExpression Left { get; }
```

Gets the left-hand operand.

<a id="api-24a953cb694efe26"></a>

### [`BinaryOperator IrBinaryOp.Operator`](#api-24a953cb694efe26)


```csharp
public BinaryOperator Operator { get; }
```

Gets the binary operator.

<a id="api-b193c491e1867d26"></a>

### [`IrExpression IrBinaryOp.Right`](#api-b193c491e1867d26)


```csharp
public IrExpression Right { get; }
```

Gets the right-hand operand.

<a id="api-435738df12f9a4fb"></a>

### [`IrType IrBinaryOp.Type`](#api-435738df12f9a4fb)


```csharp
public override IrType Type { get; }
```

Gets the result type of the binary operation.


<a id="api-2d676591be33873b"></a>

## `class IrBindingDecoration`

Represents a binding decoration for resources.

```csharp
public class IrBindingDecoration : IrDecoration
{
    public override IrNodeKind Kind { get; }
    public int Group { get; }
    public int Binding { get; }

    public IrBindingDecoration(int group, int binding);
}
```

<a id="api-08c76d4a032ff3c1"></a>

### [`IrBindingDecoration.IrBindingDecoration(int group, int binding)`](#api-08c76d4a032ff3c1)


```csharp
public IrBindingDecoration(int group, int binding);
```

Initializes a new instance of [`Xui.GPU.IR.IrBindingDecoration`](../xui-gpu-ir/index.md#api-2d676591be33873b) with the specified group and binding.

<a id="api-e2f98e23b789c718"></a>

### [`int IrBindingDecoration.Binding`](#api-e2f98e23b789c718)


```csharp
public int Binding { get; }
```

Gets the binding slot index within the group.

<a id="api-1f0c5f8e6cf6074f"></a>

### [`int IrBindingDecoration.Group`](#api-1f0c5f8e6cf6074f)


```csharp
public int Group { get; }
```

Gets the binding group index.

<a id="api-c46b2cb819ba9db7"></a>

### [`IrNodeKind IrBindingDecoration.Kind`](#api-c46b2cb819ba9db7)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this decoration.


<a id="api-fa67309b4b73feab"></a>

## `class IrBlock`

Represents a block of statements.

```csharp
public class IrBlock : IrStatement
{
    public override IrNodeKind Kind { get; }
    public List<IrStatement> Statements { get; }

    public IrBlock();
    public IrBlock(IEnumerable<IrStatement> statements);
}
```

<a id="api-e77511effaa4d09f"></a>

### [`IrBlock.IrBlock()`](#api-e77511effaa4d09f)


```csharp
public IrBlock();
```

Initializes a new empty block.

<a id="api-e6170cbc00f048d2"></a>

### [`IrBlock.IrBlock(IEnumerable<IrStatement> statements)`](#api-e6170cbc00f048d2)


```csharp
public IrBlock(IEnumerable<IrStatement> statements);
```

Initializes a new block with the specified statements.

<a id="api-90c3181501c6a6ae"></a>

### [`IrNodeKind IrBlock.Kind`](#api-90c3181501c6a6ae)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this block.

<a id="api-5e28bd5b9ed26ab9"></a>

### [`List<IrStatement> IrBlock.Statements`](#api-5e28bd5b9ed26ab9)


```csharp
public List<IrStatement> Statements { get; }
```

Gets the list of statements in this block.


<a id="api-43ccb41d80b3d6b3"></a>

## `class IrBuiltInDecoration`

Represents a built-in semantic decoration.

```csharp
public class IrBuiltInDecoration : IrDecoration
{
    public override IrNodeKind Kind { get; }
    public BuiltInSemantic Semantic { get; }

    public IrBuiltInDecoration(BuiltInSemantic semantic);
}
```

<a id="api-6f546eafe6aec81d"></a>

### [`IrBuiltInDecoration.IrBuiltInDecoration(BuiltInSemantic semantic)`](#api-6f546eafe6aec81d)


```csharp
public IrBuiltInDecoration(BuiltInSemantic semantic);
```

Initializes a new instance of [`Xui.GPU.IR.IrBuiltInDecoration`](../xui-gpu-ir/index.md#api-43ccb41d80b3d6b3) with the specified semantic.

<a id="api-c1887b9e13040a63"></a>

### [`IrNodeKind IrBuiltInDecoration.Kind`](#api-c1887b9e13040a63)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this decoration.

<a id="api-1ec79f233ca05070"></a>

### [`BuiltInSemantic IrBuiltInDecoration.Semantic`](#api-1ec79f233ca05070)


```csharp
public BuiltInSemantic Semantic { get; }
```

Gets the built-in semantic.


<a id="api-4deaf1e8a2607c53"></a>

## `class IrConstant`

Represents a constant value.

```csharp
public class IrConstant : IrExpression
{
    public override IrNodeKind Kind { get; }
    public override IrType Type { get; }
    public object Value { get; }

    public IrConstant(IrType type, object value);
}
```

<a id="api-4bff16dd9f59358c"></a>

### [`IrConstant.IrConstant(IrType type, object value)`](#api-4bff16dd9f59358c)


```csharp
public IrConstant(IrType type, object value);
```

Initializes a new instance of the [`Xui.GPU.IR.IrConstant`](../xui-gpu-ir/index.md#api-4deaf1e8a2607c53) class.

<a id="api-c313e49d44a6eb64"></a>

### [`IrNodeKind IrConstant.Kind`](#api-c313e49d44a6eb64)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the node kind for this constant.

<a id="api-0ccb97c426e05576"></a>

### [`IrType IrConstant.Type`](#api-0ccb97c426e05576)


```csharp
public override IrType Type { get; }
```

Gets the type of the constant.

<a id="api-1889639d8546d9b9"></a>

### [`object IrConstant.Value`](#api-1889639d8546d9b9)


```csharp
public object Value { get; }
```

Gets the constant value.


<a id="api-f2a7a274e0f9dda2"></a>

## `class IrConstructor`

Represents a constructor call.

```csharp
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);
}
```

<a id="api-d7ff12884336ad0e"></a>

### [`IrConstructor.IrConstructor(IrType type, List<IrExpression> arguments)`](#api-d7ff12884336ad0e)


```csharp
public IrConstructor(IrType type, List<IrExpression> arguments);
```

Initializes a new instance of the [`Xui.GPU.IR.IrConstructor`](../xui-gpu-ir/index.md#api-f2a7a274e0f9dda2) class.

<a id="api-18b2b032bfb205c6"></a>

### [`List<IrExpression> IrConstructor.Arguments`](#api-18b2b032bfb205c6)


```csharp
public List<IrExpression> Arguments { get; }
```

Gets the list of arguments passed to the constructor.

<a id="api-72ed43356d54e822"></a>

### [`IrNodeKind IrConstructor.Kind`](#api-72ed43356d54e822)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the node kind for this constructor call.

<a id="api-db5bc8156301e4ea"></a>

### [`IrType IrConstructor.Type`](#api-db5bc8156301e4ea)


```csharp
public override IrType Type { get; }
```

Gets the type being constructed.


<a id="api-19b02074d5fb2083"></a>

## `class IrDecoration`

Base class for decoration nodes (attributes).

```csharp
public abstract class IrDecoration : IrNode
{
}
```


<a id="api-eb1502e1a1272db4"></a>

## `class IrExpression`

Base class for all expression nodes in the IR.

```csharp
public abstract class IrExpression : IrNode
{
    public abstract IrType Type { get; }
}
```

<a id="api-f9c219452f73c4de"></a>

### [`IrType IrExpression.Type`](#api-f9c219452f73c4de)


```csharp
public abstract IrType Type { get; }
```

Gets the type of this expression.


<a id="api-697796b2f3eff1a5"></a>

## `class IrFieldAccess`

Represents a field access.

```csharp
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);
}
```

<a id="api-b694423287a9ea57"></a>

### [`IrFieldAccess.IrFieldAccess(IrExpression obj, string fieldName, IrType type)`](#api-b694423287a9ea57)


```csharp
public IrFieldAccess(IrExpression obj, string fieldName, IrType type);
```

Initializes a new instance of the [`Xui.GPU.IR.IrFieldAccess`](../xui-gpu-ir/index.md#api-697796b2f3eff1a5) class.

<a id="api-27e57e966f99d44d"></a>

### [`string IrFieldAccess.FieldName`](#api-27e57e966f99d44d)


```csharp
public string FieldName { get; }
```

Gets the name of the field being accessed.

<a id="api-72a5eaf2f3c69d5d"></a>

### [`IrNodeKind IrFieldAccess.Kind`](#api-72a5eaf2f3c69d5d)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the node kind for this field access.

<a id="api-d00b97b5d8f0765d"></a>

### [`IrExpression IrFieldAccess.Object`](#api-d00b97b5d8f0765d)


```csharp
public IrExpression Object { get; }
```

Gets the expression representing the object being accessed.

<a id="api-fab8486335545062"></a>

### [`IrType IrFieldAccess.Type`](#api-fab8486335545062)


```csharp
public override IrType Type { get; }
```

Gets the result type of the field access.


<a id="api-9d790f6b4228ddcc"></a>

## `class IrFragmentStage`

Represents a fragment shader stage.

```csharp
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; }
}
```

<a id="api-acd34101fa520ac2"></a>

### [`IrStructType? IrFragmentStage.BindingsType`](#api-acd34101fa520ac2)


```csharp
public IrStructType? BindingsType { get; set; }
```

Gets or sets the optional bindings struct type.

<a id="api-7b510ee71dbd8d7c"></a>

### [`IrBlock IrFragmentStage.Body`](#api-7b510ee71dbd8d7c)


```csharp
public IrBlock Body { get; set; }
```

Gets or sets the body block of this stage.

<a id="api-5a1ab9f3b6128780"></a>

### [`IrStructType IrFragmentStage.InputType`](#api-5a1ab9f3b6128780)


```csharp
public IrStructType InputType { get; set; }
```

Gets or sets the input struct type.

<a id="api-1dac036956460f2c"></a>

### [`IrNodeKind IrFragmentStage.Kind`](#api-1dac036956460f2c)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this stage.

<a id="api-20a747f6577c7acc"></a>

### [`string IrFragmentStage.Name`](#api-20a747f6577c7acc)


```csharp
public string Name { get; set; }
```

Gets or sets the stage name.

<a id="api-b5cbb72494caf72b"></a>

### [`IrStructType IrFragmentStage.OutputType`](#api-b5cbb72494caf72b)


```csharp
public IrStructType OutputType { get; set; }
```

Gets or sets the output struct type.


<a id="api-8983c63a8a6ae75d"></a>

## `class IrFunctionDecl`

Represents a function declaration.

```csharp
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; }
}
```

<a id="api-b0cce8a620498c0c"></a>

### [`IrBlock IrFunctionDecl.Body`](#api-b0cce8a620498c0c)


```csharp
public IrBlock Body { get; set; }
```

Gets or sets the function body block.

<a id="api-fefa839b05cfea94"></a>

### [`IrNodeKind IrFunctionDecl.Kind`](#api-fefa839b05cfea94)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this declaration.

<a id="api-49d2879d2c0e0cd7"></a>

### [`string IrFunctionDecl.Name`](#api-49d2879d2c0e0cd7)


```csharp
public string Name { get; set; }
```

Gets or sets the function name.

<a id="api-eef83b746b867f7c"></a>

### [`List<IrParameter> IrFunctionDecl.Parameters`](#api-eef83b746b867f7c)


```csharp
public List<IrParameter> Parameters { get; }
```

Gets the list of function parameters.

<a id="api-941d4af8e740c7bf"></a>

### [`IrType IrFunctionDecl.ReturnType`](#api-941d4af8e740c7bf)


```csharp
public IrType ReturnType { get; set; }
```

Gets or sets the return type.


<a id="api-e3edf326ea2e67ee"></a>

## `class IrIf`

Represents an if statement.

```csharp
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);
}
```

<a id="api-0851b75f9da9e420"></a>

### [`IrIf.IrIf(IrExpression condition, IrBlock thenBlock, IrBlock? elseBlock = null)`](#api-0851b75f9da9e420)


```csharp
public IrIf(IrExpression condition, IrBlock thenBlock, IrBlock? elseBlock = null);
```

Initializes a new instance of [`Xui.GPU.IR.IrIf`](../xui-gpu-ir/index.md#api-e3edf326ea2e67ee) with the specified condition and blocks.

<a id="api-ca367f7b65b5bac0"></a>

### [`IrExpression IrIf.Condition`](#api-ca367f7b65b5bac0)


```csharp
public IrExpression Condition { get; }
```

Gets the condition expression.

<a id="api-06212fd0ee9bf917"></a>

### [`IrBlock? IrIf.ElseBlock`](#api-06212fd0ee9bf917)


```csharp
public IrBlock? ElseBlock { get; }
```

Gets the optional block executed when the condition is false.

<a id="api-0982e7505d5b0a5b"></a>

### [`IrNodeKind IrIf.Kind`](#api-0982e7505d5b0a5b)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this statement.

<a id="api-602d9bfd396ef18d"></a>

### [`IrBlock IrIf.ThenBlock`](#api-602d9bfd396ef18d)


```csharp
public IrBlock ThenBlock { get; }
```

Gets the block executed when the condition is true.


<a id="api-34592b5b56008593"></a>

## `class IrInterpolationDecoration`

Represents an interpolation mode decoration.

```csharp
public class IrInterpolationDecoration : IrDecoration
{
    public override IrNodeKind Kind { get; }
    public InterpolationMode Mode { get; }

    public IrInterpolationDecoration(InterpolationMode mode);
}
```

<a id="api-c9903a42c8d32c4c"></a>

### [`IrInterpolationDecoration.IrInterpolationDecoration(InterpolationMode mode)`](#api-c9903a42c8d32c4c)


```csharp
public IrInterpolationDecoration(InterpolationMode mode);
```

Initializes a new instance of [`Xui.GPU.IR.IrInterpolationDecoration`](../xui-gpu-ir/index.md#api-34592b5b56008593) with the specified mode.

<a id="api-e0bb68266321588f"></a>

### [`IrNodeKind IrInterpolationDecoration.Kind`](#api-e0bb68266321588f)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this decoration.

<a id="api-09d0f168a3eef052"></a>

### [`InterpolationMode IrInterpolationDecoration.Mode`](#api-09d0f168a3eef052)


```csharp
public InterpolationMode Mode { get; }
```

Gets the interpolation mode.


<a id="api-92ee3d0a1c4a3b0f"></a>

## `class IrLocationDecoration`

Represents a location decoration for vertex inputs/outputs.

```csharp
public class IrLocationDecoration : IrDecoration
{
    public override IrNodeKind Kind { get; }
    public int Location { get; }

    public IrLocationDecoration(int location);
}
```

<a id="api-a3e071c45ea33fde"></a>

### [`IrLocationDecoration.IrLocationDecoration(int location)`](#api-a3e071c45ea33fde)


```csharp
public IrLocationDecoration(int location);
```

Initializes a new instance of [`Xui.GPU.IR.IrLocationDecoration`](../xui-gpu-ir/index.md#api-92ee3d0a1c4a3b0f) with the specified location.

<a id="api-b4bf91ab1fd93ded"></a>

### [`IrNodeKind IrLocationDecoration.Kind`](#api-b4bf91ab1fd93ded)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this decoration.

<a id="api-4e0ab1704715fda6"></a>

### [`int IrLocationDecoration.Location`](#api-4e0ab1704715fda6)


```csharp
public int Location { get; }
```

Gets the location index.


<a id="api-965b74ad4d8342cb"></a>

## `class IrMatrixType`

Represents a matrix type (Float4x4, etc.).

```csharp
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);
}
```

<a id="api-2f7f1a5170655f22"></a>

### [`IrMatrixType.IrMatrixType(IrScalarType elementType, int rows, int columns)`](#api-2f7f1a5170655f22)


```csharp
public IrMatrixType(IrScalarType elementType, int rows, int columns);
```

Initializes a new instance of [`Xui.GPU.IR.IrMatrixType`](../xui-gpu-ir/index.md#api-965b74ad4d8342cb) with the specified element type and dimensions.

<a id="api-d47ee921d420931a"></a>

### [`int IrMatrixType.Columns`](#api-d47ee921d420931a)


```csharp
public int Columns { get; }
```

Gets the number of columns.

<a id="api-42f91b6d10a34df4"></a>

### [`IrScalarType IrMatrixType.ElementType`](#api-42f91b6d10a34df4)


```csharp
public IrScalarType ElementType { get; }
```

Gets the scalar element type of the matrix.

<a id="api-ed242711c3fb523f"></a>

### [`IrNodeKind IrMatrixType.Kind`](#api-ed242711c3fb523f)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this type.

<a id="api-b87ceaaca5df49e7"></a>

### [`string IrMatrixType.Name`](#api-b87ceaaca5df49e7)


```csharp
public override string Name { get; }
```

Gets the display name of this matrix type.

<a id="api-266c45a062709151"></a>

### [`int IrMatrixType.Rows`](#api-266c45a062709151)


```csharp
public int Rows { get; }
```

Gets the number of rows.


<a id="api-4079957234850fd2"></a>

## `class IrMethodCall`

Represents a method call (shader intrinsic or user function).

```csharp
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);
}
```

<a id="api-c04b2b4af44dfece"></a>

### [`IrMethodCall.IrMethodCall(string methodName, List<IrExpression> arguments, IrType type, IrExpression? target = null)`](#api-c04b2b4af44dfece)


```csharp
public IrMethodCall(string methodName, List<IrExpression> arguments, IrType type, IrExpression? target = null);
```

Initializes a new instance of the [`Xui.GPU.IR.IrMethodCall`](../xui-gpu-ir/index.md#api-4079957234850fd2) class.

<a id="api-8485108720e4f370"></a>

### [`List<IrExpression> IrMethodCall.Arguments`](#api-8485108720e4f370)


```csharp
public List<IrExpression> Arguments { get; }
```

Gets the list of arguments passed to the method.

<a id="api-7c6b22b7e354a48c"></a>

### [`IrNodeKind IrMethodCall.Kind`](#api-7c6b22b7e354a48c)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the node kind for this method call.

<a id="api-189ac5bed5546439"></a>

### [`string IrMethodCall.MethodName`](#api-189ac5bed5546439)


```csharp
public string MethodName { get; }
```

Gets the name of the method being called.

<a id="api-8354de9e97c19ce9"></a>

### [`IrExpression? IrMethodCall.Target`](#api-8354de9e97c19ce9)


```csharp
public IrExpression? Target { get; }
```

Gets the optional target expression for instance method calls.

<a id="api-fdc5508c840f5d4c"></a>

### [`IrType IrMethodCall.Type`](#api-fdc5508c840f5d4c)


```csharp
public override IrType Type { get; }
```

Gets the return type of the method call.


<a id="api-52dfef4bda6c642e"></a>

## `class IrNode`

Base class for all IR nodes in the intermediate representation.

```csharp
public abstract class IrNode
{
    public abstract IrNodeKind Kind { get; }
    public SourceLocation? SourceLocation { get; set; }
}
```

<a id="api-8e9b2b98bed224a1"></a>

### [`IrNodeKind IrNode.Kind`](#api-8e9b2b98bed224a1)


```csharp
public abstract IrNodeKind Kind { get; }
```

Gets the node kind for pattern matching and visitors.

<a id="api-bc0e2e7cba0f573e"></a>

### [`SourceLocation? IrNode.SourceLocation`](#api-bc0e2e7cba0f573e)


```csharp
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.


<a id="api-30af59d64416e09b"></a>

## `enum IrNodeKind`

Enumeration of all IR node kinds.

```csharp
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,
}
```

<a id="api-8a2ac78e21cb3b3a"></a>

### [`IrNodeKind.Assignment`](#api-8a2ac78e21cb3b3a)


```csharp
Assignment
```

Assignment statement.

<a id="api-393329705a422687"></a>

### [`IrNodeKind.BinaryOp`](#api-393329705a422687)


```csharp
BinaryOp
```

Binary operation expression.

<a id="api-86864568a6aabf08"></a>

### [`IrNodeKind.Binding`](#api-86864568a6aabf08)


```csharp
Binding
```

Resource binding decoration.

<a id="api-77f66bda5b72764f"></a>

### [`IrNodeKind.Block`](#api-77f66bda5b72764f)


```csharp
Block
```

Block of statements.

<a id="api-49c456df34e436e9"></a>

### [`IrNodeKind.BuiltIn`](#api-49c456df34e436e9)


```csharp
BuiltIn
```

Built-in semantic decoration.

<a id="api-6be9768765abbdfb"></a>

### [`IrNodeKind.Constant`](#api-6be9768765abbdfb)


```csharp
Constant
```

Constant expression.

<a id="api-58e403afeff187c4"></a>

### [`IrNodeKind.Constructor`](#api-58e403afeff187c4)


```csharp
Constructor
```

Constructor call expression.

<a id="api-f24093cf26cb0db5"></a>

### [`IrNodeKind.Field`](#api-f24093cf26cb0db5)


```csharp
Field
```

Field access expression.

<a id="api-c47389096f6af09b"></a>

### [`IrNodeKind.FragmentStage`](#api-c47389096f6af09b)


```csharp
FragmentStage
```

Fragment shader stage.

<a id="api-7b32f087635218f4"></a>

### [`IrNodeKind.FunctionDecl`](#api-7b32f087635218f4)


```csharp
FunctionDecl
```

Function declaration.

<a id="api-5d3dbfc074f3687c"></a>

### [`IrNodeKind.If`](#api-5d3dbfc074f3687c)


```csharp
If
```

Conditional statement.

<a id="api-641ba805d12997dc"></a>

### [`IrNodeKind.Interpolation`](#api-641ba805d12997dc)


```csharp
Interpolation
```

Interpolation mode decoration.

<a id="api-1286308a42d07883"></a>

### [`IrNodeKind.Location`](#api-1286308a42d07883)


```csharp
Location
```

Location decoration.

<a id="api-1c2376e86fbc0f54"></a>

### [`IrNodeKind.MatrixType`](#api-1c2376e86fbc0f54)


```csharp
MatrixType
```

Matrix type node.

<a id="api-e81212467195582d"></a>

### [`IrNodeKind.MethodCall`](#api-e81212467195582d)


```csharp
MethodCall
```

Method call expression.

<a id="api-de87b671bd7f622c"></a>

### [`IrNodeKind.Parameter`](#api-de87b671bd7f622c)


```csharp
Parameter
```

Parameter reference expression.

<a id="api-1810f27773a71284"></a>

### [`IrNodeKind.Return`](#api-1810f27773a71284)


```csharp
Return
```

Return statement.

<a id="api-421c860f97fc8bbf"></a>

### [`IrNodeKind.SamplerType`](#api-421c860f97fc8bbf)


```csharp
SamplerType
```

Sampler type node.

<a id="api-2ff15daedc156ded"></a>

### [`IrNodeKind.ScalarType`](#api-2ff15daedc156ded)


```csharp
ScalarType
```

Scalar type node.

<a id="api-0f34d8c497550587"></a>

### [`IrNodeKind.ShaderModule`](#api-0f34d8c497550587)


```csharp
ShaderModule
```

Shader module node.

<a id="api-c006d74fb294977a"></a>

### [`IrNodeKind.StructDecl`](#api-c006d74fb294977a)


```csharp
StructDecl
```

Struct declaration.

<a id="api-a9293afbd8140828"></a>

### [`IrNodeKind.StructType`](#api-a9293afbd8140828)


```csharp
StructType
```

Struct type node.

<a id="api-5443821178cc9435"></a>

### [`IrNodeKind.TextureType`](#api-5443821178cc9435)


```csharp
TextureType
```

Texture type node.

<a id="api-461272957f3f20e7"></a>

### [`IrNodeKind.UnaryOp`](#api-461272957f3f20e7)


```csharp
UnaryOp
```

Unary operation expression.

<a id="api-6767ec1e1c6a7f99"></a>

### [`IrNodeKind.VarDecl`](#api-6767ec1e1c6a7f99)


```csharp
VarDecl
```

Variable declaration statement.

<a id="api-54eb1bf6921648f9"></a>

### [`IrNodeKind.VectorType`](#api-54eb1bf6921648f9)


```csharp
VectorType
```

Vector type node.

<a id="api-c1878a32c6b2bc91"></a>

### [`IrNodeKind.VertexStage`](#api-c1878a32c6b2bc91)


```csharp
VertexStage
```

Vertex shader stage.


<a id="api-0291730b0148d66a"></a>

## `class IrParameter`

Represents a parameter reference.

```csharp
public class IrParameter : IrExpression
{
    public override IrNodeKind Kind { get; }
    public override IrType Type { get; }
    public string Name { get; }

    public IrParameter(string name, IrType type);
}
```

<a id="api-322997b8acd8b1fd"></a>

### [`IrParameter.IrParameter(string name, IrType type)`](#api-322997b8acd8b1fd)


```csharp
public IrParameter(string name, IrType type);
```

Initializes a new instance of the [`Xui.GPU.IR.IrParameter`](../xui-gpu-ir/index.md#api-0291730b0148d66a) class.

<a id="api-db026eee6e15b707"></a>

### [`IrNodeKind IrParameter.Kind`](#api-db026eee6e15b707)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the node kind for this parameter reference.

<a id="api-cc674d49baa25074"></a>

### [`string IrParameter.Name`](#api-cc674d49baa25074)


```csharp
public string Name { get; }
```

Gets the name of the parameter.

<a id="api-5a34199d41d97719"></a>

### [`IrType IrParameter.Type`](#api-5a34199d41d97719)


```csharp
public override IrType Type { get; }
```

Gets the type of the parameter.


<a id="api-57b684822a5ec4d9"></a>

## `class IrReturn`

Represents a return statement.

```csharp
public class IrReturn : IrStatement
{
    public override IrNodeKind Kind { get; }
    public IrExpression? Value { get; }

    public IrReturn(IrExpression? value = null);
}
```

<a id="api-3e75e671b78bf830"></a>

### [`IrReturn.IrReturn(IrExpression? value = null)`](#api-3e75e671b78bf830)


```csharp
public IrReturn(IrExpression? value = null);
```

Initializes a new instance of [`Xui.GPU.IR.IrReturn`](../xui-gpu-ir/index.md#api-57b684822a5ec4d9) with an optional return value.

<a id="api-73f9772f251f231c"></a>

### [`IrNodeKind IrReturn.Kind`](#api-73f9772f251f231c)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this statement.

<a id="api-88bd06593923e761"></a>

### [`IrExpression? IrReturn.Value`](#api-88bd06593923e761)


```csharp
public IrExpression? Value { get; }
```

Gets the optional return value expression.


<a id="api-f3b4c99a3b498c04"></a>

## `class IrSamplerType`

Represents a sampler type.

```csharp
public class IrSamplerType : IrType
{
    public override IrNodeKind Kind { get; }
    public override string Name { get; }

    public static readonly IrSamplerType Instance;
}
```

<a id="api-be2e0c804496392a"></a>

### [`IrSamplerType IrSamplerType.Instance`](#api-be2e0c804496392a)


```csharp
public static readonly IrSamplerType Instance;
```

Shared singleton instance of the sampler type.

<a id="api-0d3defd44402badc"></a>

### [`IrNodeKind IrSamplerType.Kind`](#api-0d3defd44402badc)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this type.

<a id="api-488f8facfd14af25"></a>

### [`string IrSamplerType.Name`](#api-488f8facfd14af25)


```csharp
public override string Name { get; }
```

Gets the display name of this sampler type.


<a id="api-1f32d258153955f1"></a>

## `class IrScalarType`

Represents a scalar type (F32, I32, U32, Bool).

```csharp
public class IrScalarType : IrType
{
    public override IrNodeKind Kind { get; }
    public override string Name { get; }
    public ScalarKind ScalarKind { get; }

    public IrScalarType(ScalarKind kind);
}
```

<a id="api-1ae7bf69061f17e7"></a>

### [`IrScalarType.IrScalarType(ScalarKind kind)`](#api-1ae7bf69061f17e7)


```csharp
public IrScalarType(ScalarKind kind);
```

Initializes a new instance of [`Xui.GPU.IR.IrScalarType`](../xui-gpu-ir/index.md#api-1f32d258153955f1) with the specified scalar kind.

<a id="api-9e98f738d8952ed4"></a>

### [`IrNodeKind IrScalarType.Kind`](#api-9e98f738d8952ed4)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this type.

<a id="api-82f21d210c68e219"></a>

### [`string IrScalarType.Name`](#api-82f21d210c68e219)


```csharp
public override string Name { get; }
```

Gets the display name of this scalar type.

<a id="api-4ceb9094be8d960a"></a>

### [`ScalarKind IrScalarType.ScalarKind`](#api-4ceb9094be8d960a)


```csharp
public ScalarKind ScalarKind { get; }
```

Gets the scalar kind.


<a id="api-1bd2074e7abbed7a"></a>

## `class IrShaderModule`

Represents a complete shader module with all stages and declarations.

```csharp
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; }
}
```

<a id="api-db8fa4625e81863e"></a>

### [`IrFragmentStage? IrShaderModule.FragmentStage`](#api-db8fa4625e81863e)


```csharp
public IrFragmentStage? FragmentStage { get; set; }
```

Gets or sets the optional fragment shader stage.

<a id="api-1535ef825d522b26"></a>

### [`List<IrFunctionDecl> IrShaderModule.Functions`](#api-1535ef825d522b26)


```csharp
public List<IrFunctionDecl> Functions { get; }
```

Gets the list of function declarations.

<a id="api-15c38ff905284076"></a>

### [`IrNodeKind IrShaderModule.Kind`](#api-15c38ff905284076)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this module.

<a id="api-e2791e088f2a364d"></a>

### [`string IrShaderModule.Name`](#api-e2791e088f2a364d)


```csharp
public string Name { get; set; }
```

Gets or sets the module name.

<a id="api-cdfea9d9d291d00b"></a>

### [`List<IrStructDecl> IrShaderModule.Structs`](#api-cdfea9d9d291d00b)


```csharp
public List<IrStructDecl> Structs { get; }
```

Gets the list of struct declarations.

<a id="api-ca235ac375590af8"></a>

### [`IrVertexStage? IrShaderModule.VertexStage`](#api-ca235ac375590af8)


```csharp
public IrVertexStage? VertexStage { get; set; }
```

Gets or sets the optional vertex shader stage.


<a id="api-de93e83d22ac3668"></a>

## `class IrStatement`

Base class for all statement nodes in the IR.

```csharp
public abstract class IrStatement : IrNode
{
}
```


<a id="api-01d7b076b50eb565"></a>

## `class IrStructDecl`

Represents a struct declaration.

```csharp
public class IrStructDecl : IrNode
{
    public override IrNodeKind Kind { get; }
    public IrStructType Type { get; }

    public IrStructDecl(IrStructType type);
}
```

<a id="api-49dd34627e5c1b26"></a>

### [`IrStructDecl.IrStructDecl(IrStructType type)`](#api-49dd34627e5c1b26)


```csharp
public IrStructDecl(IrStructType type);
```

Initializes a new instance of [`Xui.GPU.IR.IrStructDecl`](../xui-gpu-ir/index.md#api-01d7b076b50eb565) with the specified struct type.

<a id="api-aa2e4439453f7b0e"></a>

### [`IrNodeKind IrStructDecl.Kind`](#api-aa2e4439453f7b0e)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this declaration.

<a id="api-6582a5d127fa8d87"></a>

### [`IrStructType IrStructDecl.Type`](#api-6582a5d127fa8d87)


```csharp
public IrStructType Type { get; }
```

Gets the struct type being declared.


<a id="api-a3a85d7b30af0ff0"></a>

## `class IrStructField`

Represents a field in a struct.

```csharp
public class IrStructField
{
    public string Name { get; set; }
    public IrType Type { get; set; }
    public List<IrDecoration> Decorations { get; }
}
```

<a id="api-486706e0172a3e76"></a>

### [`List<IrDecoration> IrStructField.Decorations`](#api-486706e0172a3e76)


```csharp
public List<IrDecoration> Decorations { get; }
```

Gets the list of decorations applied to this field.

<a id="api-2d763139ced2981c"></a>

### [`string IrStructField.Name`](#api-2d763139ced2981c)


```csharp
public string Name { get; set; }
```

Gets or sets the field name.

<a id="api-ead9f9ed0ff5d4b0"></a>

### [`IrType IrStructField.Type`](#api-ead9f9ed0ff5d4b0)


```csharp
public IrType Type { get; set; }
```

Gets or sets the field type.


<a id="api-068a4c29e81ecb53"></a>

## `class IrStructType`

Represents a struct type.

```csharp
public class IrStructType : IrType
{
    public override IrNodeKind Kind { get; }
    public override string Name { get; }
    public List<IrStructField> Fields { get; }

    public IrStructType(string name);
}
```

<a id="api-4889322a63d41396"></a>

### [`IrStructType.IrStructType(string name)`](#api-4889322a63d41396)


```csharp
public IrStructType(string name);
```

Initializes a new instance of [`Xui.GPU.IR.IrStructType`](../xui-gpu-ir/index.md#api-068a4c29e81ecb53) with the specified name.

<a id="api-91085b189a75f011"></a>

### [`List<IrStructField> IrStructType.Fields`](#api-91085b189a75f011)


```csharp
public List<IrStructField> Fields { get; }
```

Gets the list of fields in this struct.

<a id="api-077de4097b67bdde"></a>

### [`IrNodeKind IrStructType.Kind`](#api-077de4097b67bdde)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this type.

<a id="api-6b06c53cda2e09b1"></a>

### [`string IrStructType.Name`](#api-6b06c53cda2e09b1)


```csharp
public override string Name { get; }
```

Gets the name of this struct type.


<a id="api-86efe1984378ea5b"></a>

## `class IrTextureType`

Represents a texture type.

```csharp
public class IrTextureType : IrType
{
    public override IrNodeKind Kind { get; }
    public override string Name { get; }
    public IrType PixelType { get; }

    public IrTextureType(IrType pixelType);
}
```

<a id="api-7f6e65a9f9de71c9"></a>

### [`IrTextureType.IrTextureType(IrType pixelType)`](#api-7f6e65a9f9de71c9)


```csharp
public IrTextureType(IrType pixelType);
```

Initializes a new instance of [`Xui.GPU.IR.IrTextureType`](../xui-gpu-ir/index.md#api-86efe1984378ea5b) with the specified pixel type.

<a id="api-2506ace7a93aaba2"></a>

### [`IrNodeKind IrTextureType.Kind`](#api-2506ace7a93aaba2)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this type.

<a id="api-f446eb653eba105c"></a>

### [`string IrTextureType.Name`](#api-f446eb653eba105c)


```csharp
public override string Name { get; }
```

Gets the display name of this texture type.

<a id="api-ae6c174d9617b743"></a>

### [`IrType IrTextureType.PixelType`](#api-ae6c174d9617b743)


```csharp
public IrType PixelType { get; }
```

Gets the pixel element type of the texture.


<a id="api-6bfe242b43ee6f66"></a>

## `class IrType`

Base class for all type nodes in the IR.

```csharp
public abstract class IrType : IrNode
{
    public abstract string Name { get; }
}
```

<a id="api-0ae7f909d3ccaeef"></a>

### [`string IrType.Name`](#api-0ae7f909d3ccaeef)


```csharp
public abstract string Name { get; }
```

Gets the name of this type.


<a id="api-c35bfdf2b1626ab6"></a>

## `class IrUnaryOp`

Represents a unary operation.

```csharp
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);
}
```

<a id="api-1a51149ec8baabeb"></a>

### [`IrUnaryOp.IrUnaryOp(UnaryOperator op, IrExpression operand, IrType type)`](#api-1a51149ec8baabeb)


```csharp
public IrUnaryOp(UnaryOperator op, IrExpression operand, IrType type);
```

Initializes a new instance of the [`Xui.GPU.IR.IrUnaryOp`](../xui-gpu-ir/index.md#api-c35bfdf2b1626ab6) class.

<a id="api-4f0b9bd9596269ac"></a>

### [`IrNodeKind IrUnaryOp.Kind`](#api-4f0b9bd9596269ac)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the node kind for this unary operation.

<a id="api-8c674c5d83a33911"></a>

### [`IrExpression IrUnaryOp.Operand`](#api-8c674c5d83a33911)


```csharp
public IrExpression Operand { get; }
```

Gets the operand of the unary operation.

<a id="api-49b81073a3620860"></a>

### [`UnaryOperator IrUnaryOp.Operator`](#api-49b81073a3620860)


```csharp
public UnaryOperator Operator { get; }
```

Gets the unary operator.

<a id="api-c76f2d6e907c2117"></a>

### [`IrType IrUnaryOp.Type`](#api-c76f2d6e907c2117)


```csharp
public override IrType Type { get; }
```

Gets the result type of the unary operation.


<a id="api-0a278c37a97af092"></a>

## `class IrVarDecl`

Represents a variable declaration.

```csharp
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);
}
```

<a id="api-27ded286c6e11b7d"></a>

### [`IrVarDecl.IrVarDecl(string name, IrType type, IrExpression? initializer = null)`](#api-27ded286c6e11b7d)


```csharp
public IrVarDecl(string name, IrType type, IrExpression? initializer = null);
```

Initializes a new instance of [`Xui.GPU.IR.IrVarDecl`](../xui-gpu-ir/index.md#api-0a278c37a97af092) with the specified name, type, and optional initializer.

<a id="api-e64020c134101a03"></a>

### [`IrExpression? IrVarDecl.Initializer`](#api-e64020c134101a03)


```csharp
public IrExpression? Initializer { get; }
```

Gets the optional initializer expression.

<a id="api-678734767e74418f"></a>

### [`IrNodeKind IrVarDecl.Kind`](#api-678734767e74418f)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this statement.

<a id="api-a801d2bd4dcef504"></a>

### [`string IrVarDecl.Name`](#api-a801d2bd4dcef504)


```csharp
public string Name { get; }
```

Gets the variable name.

<a id="api-17d2cdced64387b0"></a>

### [`IrType IrVarDecl.Type`](#api-17d2cdced64387b0)


```csharp
public IrType Type { get; }
```

Gets the variable type.


<a id="api-dc7babe4caadcc31"></a>

## `class IrVectorType`

Represents a vector type (Float2, Float3, Float4, Int2, etc.).

```csharp
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);
}
```

<a id="api-fcdd964b9d820c43"></a>

### [`IrVectorType.IrVectorType(IrScalarType elementType, int dimension)`](#api-fcdd964b9d820c43)


```csharp
public IrVectorType(IrScalarType elementType, int dimension);
```

Initializes a new instance of [`Xui.GPU.IR.IrVectorType`](../xui-gpu-ir/index.md#api-dc7babe4caadcc31) with the specified element type and dimension.

<a id="api-bc7829b128dbd1a7"></a>

### [`int IrVectorType.Dimension`](#api-bc7829b128dbd1a7)


```csharp
public int Dimension { get; }
```

Gets the number of components (2-4).

<a id="api-bad82165ec435001"></a>

### [`IrScalarType IrVectorType.ElementType`](#api-bad82165ec435001)


```csharp
public IrScalarType ElementType { get; }
```

Gets the scalar element type of the vector.

<a id="api-74d72ee2d8fda718"></a>

### [`IrNodeKind IrVectorType.Kind`](#api-74d72ee2d8fda718)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this type.

<a id="api-587d790d1150f6b5"></a>

### [`string IrVectorType.Name`](#api-587d790d1150f6b5)


```csharp
public override string Name { get; }
```

Gets the display name of this vector type.


<a id="api-3cbbd8aad96df22a"></a>

## `class IrVertexStage`

Represents a vertex shader stage.

```csharp
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; }
}
```

<a id="api-58c7063090afedf6"></a>

### [`IrStructType? IrVertexStage.BindingsType`](#api-58c7063090afedf6)


```csharp
public IrStructType? BindingsType { get; set; }
```

Gets or sets the optional bindings struct type.

<a id="api-b12e3c0b12c1f4e8"></a>

### [`IrBlock IrVertexStage.Body`](#api-b12e3c0b12c1f4e8)


```csharp
public IrBlock Body { get; set; }
```

Gets or sets the body block of this stage.

<a id="api-aa072124bacee193"></a>

### [`IrStructType IrVertexStage.InputType`](#api-aa072124bacee193)


```csharp
public IrStructType InputType { get; set; }
```

Gets or sets the input struct type.

<a id="api-da08311107f3c48a"></a>

### [`IrNodeKind IrVertexStage.Kind`](#api-da08311107f3c48a)


```csharp
public override IrNodeKind Kind { get; }
```

Gets the IR node kind for this stage.

<a id="api-550d38dbc2f7c40c"></a>

### [`string IrVertexStage.Name`](#api-550d38dbc2f7c40c)


```csharp
public string Name { get; set; }
```

Gets or sets the stage name.

<a id="api-502e69afd30734b0"></a>

### [`IrStructType IrVertexStage.OutputType`](#api-502e69afd30734b0)


```csharp
public IrStructType OutputType { get; set; }
```

Gets or sets the output struct type.


<a id="api-778fda2eb98f3cd9"></a>

## `enum ScalarKind`

Kind of scalar type.

```csharp
public enum ScalarKind
{
    F32,
    I32,
    U32,
    Bool
}
```

<a id="api-51e8570185d6c8b8"></a>

### [`ScalarKind.Bool`](#api-51e8570185d6c8b8)


```csharp
Bool
```

Boolean value.

<a id="api-6588ef10fa0008a3"></a>

### [`ScalarKind.F32`](#api-6588ef10fa0008a3)


```csharp
F32
```

32-bit floating point.

<a id="api-23566f7af83670cd"></a>

### [`ScalarKind.I32`](#api-23566f7af83670cd)


```csharp
I32
```

32-bit signed integer.

<a id="api-4c55ea44394d5534"></a>

### [`ScalarKind.U32`](#api-4c55ea44394d5534)


```csharp
U32
```

32-bit unsigned integer.


<a id="api-384e77f149b5bdcb"></a>

## `class SourceLocation`

Represents a location in source code. Used to map IR nodes back to original C# source for error reporting.

```csharp
public class SourceLocation
{
    public string FilePath { get; set; }
    public int Line { get; set; }
    public int Column { get; set; }

    public string ToDisplayString();
}
```

<a id="api-bc9b8f81fe0ca9d3"></a>

### [`int SourceLocation.Column`](#api-bc9b8f81fe0ca9d3)


```csharp
public int Column { get; set; }
```

Gets the column number (1-based).

<a id="api-43c8e5004d2f270f"></a>

### [`string SourceLocation.FilePath`](#api-43c8e5004d2f270f)


```csharp
public string FilePath { get; set; }
```

Gets the source file path.

<a id="api-2aae9e10b8ee6760"></a>

### [`int SourceLocation.Line`](#api-2aae9e10b8ee6760)


```csharp
public int Line { get; set; }
```

Gets the line number (1-based).

<a id="api-60e303f9e37d9c0c"></a>

### [`string SourceLocation.ToDisplayString()`](#api-60e303f9e37d9c0c)


```csharp
public string ToDisplayString();
```

Gets a formatted string representation of this location.


<a id="api-6d64aec28c2363e0"></a>

## `enum UnaryOperator`

Unary operator kind.

```csharp
public enum UnaryOperator
{
    Negate,
    LogicalNot,
    BitwiseNot
}
```

<a id="api-d607c160cde37bb6"></a>

### [`UnaryOperator.BitwiseNot`](#api-d607c160cde37bb6)


```csharp
BitwiseNot
```

Bitwise NOT (~).

<a id="api-7dd8e73844b84748"></a>

### [`UnaryOperator.LogicalNot`](#api-7dd8e73844b84748)


```csharp
LogicalNot
```

Logical NOT (!).

<a id="api-3186edf93b398413"></a>

### [`UnaryOperator.Negate`](#api-3186edf93b398413)


```csharp
Negate
```

Arithmetic negation (-).

