public record class PermutationClosureResultWhat enumerating a shader's variants produced.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
is a warning, and worth reading. A key is in an EffectKey only if the shader read it, and the engine decides which keys those are from the reflection checked in beside the shader — one reflection, from one variant. That works when reading a key does not depend on the others, which is the ordinary case: a flag tested at the top of the function is read whatever the rest are.
When it is not the ordinary case — if (Outer) { if (Inner) … } — this finds more variants than a draw can ask for, because the generated key list was built from a compilation that never reached Inner. Baking them is not wrong, but the extra ones will not be resolved by anything, and the shader wants restructuring so that the inner flag is read unconditionally.
Fields and properties (4)
public ImmutableArray<EffectData> EffectsThe distinct variants, in key order.
public int CompilationsHow many compilations it took, including the ones that turned out to be duplicates.
public ImmutableArray<string> UsedThe permutation keys that turned out to matter, by their declared names.
public bool DependentWhether which keys matter depends on what the other keys are set to.
Methods (1)
public PermutationClosureResult(ImmutableArray<EffectData> Effects, int Compilations, ImmutableArray<string> Used, bool Dependent = false)What enumerating a shader's variants produced.
Used by (4)
- EffectBundleBuilderVixen.ShaderCompiler
- EffectCompilerTestsVixen.ShaderCompiler.Tests
- PermutationClosureVixen.ShaderCompiler
- ZeroRuntimeCompilationTestsVixen.ShaderCompiler.Tests