Vixen
02b45cc4
csharp
public sealed class SourceValueParameterSymbol

A val type parameter — shader Blur<val TapCount: int> — which parameterises a shader by a compile-time constant rather than by a type.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Modelled as a constant member rather than as a TypeParameterSymbol, because it is not a type: the shader's arity is unchanged and every existing generic path is untouched. The body sees an ordinary readable name, and because IsConst is true with a known ConstantValue, folding and dead-branch elimination handle it with no special case — the same route a [Permutation] field takes.

The difference from a permutation field is that this has no default: a value is part of the shader's signature, so compiling without one is an error rather than falling back. Values arrive through the same PermutationValues channel and are reported in Compilation.UsedPermutationKeys, because they affect codegen and therefore belong in the cache key.

Fields and properties (11)

  • public override string Name
  • public override Symbol? ContainingSymbol
  • public override SyntaxNode DeclaringSyntax
  • public int Ordinal

    Position in the declaring shader's parameter list.

  • public override TypeSymbol Type
  • public override bool IsConst
  • public override bool IsStatic
  • public override bool IsReadOnly
  • public override bool IsValueParameter
  • public override ResourceKind ResourceKind

    A parameter is never data on the target — it is folded at every use.

  • public override object? ConstantValue

Used by (2)

  • BinderVixen.Raven
  • SourceNamedTypeSymbolVixen.Raven