Vixen
02b45cc4
csharp
public sealed class PermutationValues

The values supplied for a compilation's [Permutation] keys — one effect variant's worth of settings.

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

Remarks

A permutation key is a shader field whose value is fixed at compile time but comes from outside the source: [Permutation] val UseSkinning: bool = false reads as false unless a value is supplied here. Branches on it fold and the dead side is dropped, so a variant compiles to only the code it uses.

Keys not present here take the initializer in the source as their value, which is why one is mandatory. Keys present here that no shader declares are ignored — the engine passes a whole effect's settings to each module it compiles.

Fields and properties (2)

  • public static PermutationValues Empty

    No values supplied; every key takes its declared default.

  • public int Count

    Number of keys supplied.

Methods (6)

  • public IEnumerator<KeyValuePair<string, object>> GetEnumerator()

    Returns an enumerator that iterates through the collection.

  • public static PermutationValues Create(IEnumerable<KeyValuePair<string, object>> values)

    Builds a set from name/value pairs. Values must be Boolean, Int32 or UInt32; anything else is rejected here rather than surfacing as a confusing type error deep in binding.

  • public static PermutationValues Parse(IEnumerable<string> defines)

    Parses Name=Value strings, as a command line or build script supplies them. Name alone means Name=true, matching how a define reads.

  • public static bool TryParse(IEnumerable<string> defines, out PermutationValues values, out string? error)

    Parses Name=Value strings, reporting a malformed entry rather than throwing.

  • public object? GetValueOrDefault(string key)

    The value supplied for , or null if none was.

  • public bool Contains(string key)

    Whether a value was supplied for .

Used by (22)

  • CapabilityTestsVixen.Raven.Tests
  • CompilationVixen.Raven
  • CompileDriverVixen.Raven.Cli
  • CompiledEffectVixen.Raven
  • CompiledEffectTestsVixen.Raven.Tests
  • CompiledLibraryTestsVixen.Raven.Tests
  • ComposeInterfaceTestsVixen.Raven.Tests
  • ComposeTestsVixen.Raven.Tests
  • LibraryReflectionTestsVixen.Raven.Tests
  • LibraryTreeTestsVixen.Raven.Tests
  • LoweringTestBaseVixen.Raven.Tests
  • MaterialRecordTestsVixen.Raven.Tests
  • PermutationTestsVixen.Raven.Tests
  • PermutationValuesTestsVixen.Raven.Tests
  • RavenEffectCompilerVixen.ShaderCompiler
  • ReflectionTestsVixen.Raven.Tests
  • RenderTargetTestsVixen.Raven.Tests
  • SharedBindingTestsVixen.Raven.Tests
  • SourceFieldSymbolVixen.Raven
  • SourceNamedTypeSymbolVixen.Raven
  • SourceValueParameterSymbolVixen.Raven
  • ValueParameterTestsVixen.Raven.Tests