Vixen
02b45cc4
csharp
public record class PermutationInfo

One [Permutation] key the shader declares: something a host may vary to get a different compiled variant.

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

Remarks

Not a SpecConstantInfo, and the difference is the whole design. A specialisation constant is overridable when the pipeline is created, so the module has to keep both branches; a permutation key is resolved when the shader is compiled, which is what lets the dead branch disappear. Raven has no spec constants for exactly that reason.

This is also not UsedPermutationKeys. That is what the variant read and it is the cache key; this is what the shader declares and it is the same for every variant — which it must be, or generated C# would change shape depending on which variant happened to compile.

Fields and properties (3)

  • public string Name

    The declared name, as a host supplies it.

  • public ShaderDataType Type

    Its shape: bool, int or uint.

  • public string DefaultValue

    The declared default, which every permutation key has. Text rather than object so it survives the JSON header of a .rvnfx unchanged — a boxed value comes back as a JsonElement and stops comparing equal. says how to read it, and it matches how CompiledEffect.PermutationKey already stores values.

Methods (1)

  • public PermutationInfo(string Name, ShaderDataType Type, string DefaultValue)

    One [Permutation] key the shader declares: something a host may vary to get a different compiled variant.

Used by (9)

  • DistanceFieldDeviceTestsVixen.Graphics.Golden.Tests
  • CompiledEffectTestsVixen.Raven.Tests
  • EffectTranslatorVixen.ShaderCompiler
  • LibraryReflectionTestsVixen.Raven.Tests
  • PermutationClosureVixen.ShaderCompiler
  • RavenEffectCompilerVixen.ShaderCompiler
  • RavenReflectionVixen.Raven
  • ReflectionBuilderVixen.Raven
  • ReflectionTestsVixen.Raven.Tests