Vixen
dd8b0a81
csharp
public sealed class TexturePlan

A flat, ordered list of kernel dispatches over a table of images: the artefact both front ends compile to and the only thing the evaluator runs.

Read the guide page for this →

Remarks

Doc 48 § D1. A graph compiles to one of these and so does a layer stack, which is what stops the two front ends from acquiring two evaluators and then two opinions about what "overlay" means. Nothing here knows about a node, a wire, a document or a panel.

Hand-buildable, and that is a requirement rather than a convenience. M0 is a plan with no graph behind it, and every test in this assembly builds one the same way — so a defect in the evaluator is never confused with a defect in a compiler that does not exist yet.

The order is the liveness. Ops run in the order they are listed, which is what lets TexturePoolSchedule free an intermediate the moment its last reader has run without any analysis of its own. A compiler emitting this list emits it in topological order; a stack emits it bottom-up.

Fields and properties (9)

  • public const int MaxExtent

    The largest extent any image in a plan may reach, in texels.

  • public required int BaseWidth

    The width every relative image is measured against, in texels: the resolution the graph was authored at.

  • public required int BaseHeight

    The height every relative image is measured against, in texels, at the authoring resolution.

  • public int BakeLevelOffset

    How much bigger this bake is than the resolution the graph was authored at.

  • public required ImmutableArray<TextureImage> Images

    The image table. Ops address these by index.

  • public required ImmutableArray<TextureOp> Ops

    The dispatches, in evaluation order.

  • public ImmutableArray<int> Outputs

    Which images survive the evaluation, as indices into Images.

  • public uint Seed

    The plan's seed, from which every op's is derived.

  • public ImmutableDictionary<string, string> Kernels

    The kernels this plan brought with it, by the name its ops give them.

Methods (11)

  • public static int BakeLevelFor(int authoredWidth, int bakeWidth)

    The level offset that bakes a graph authored at one width at another.

  • public string Source(string kernel)

    The Raven one of this plan's ops runs, wherever it came from.

  • public Int2 SizeOf(int image)

    How big one image is in this bake, in texels.

  • public int LevelOf(int image)

    Where one image sits, counted in mip levels from the authoring base.

  • public float ScaleOf(int image)

    How many texels of this image there are per texel of the authoring base.

  • public float Resolve(int op, TextureParameter parameter)

    What one op's parameter is worth at the resolution that op writes.

  • public uint SeedFor(int op)

    The seed one op draws from.

  • public ImmutableArray<string> TilingRefusals()

    Why this plan cannot be evaluated a tile at a time, if it cannot.

  • public ImmutableArray<string> Validate()

    Everything about this plan that would make an evaluation meaningless.

  • public ImmutableArray<string> Warnings()

    Everything this plan bakes differently from the graph it came from.

  • public ImmutableArray<TextureProblem> Check()

    Everything wrong with this plan, refusals and warnings together.

Used by (96, showing 40)

  • BakedMaterialImageTestsVixen.Graphics.Golden.Tests
  • ExternalCompoundTestsVixen.Editor.Texturing.Tests
  • LayerCoverageDeviceTestsVixen.Editor.Texturing.Tests
  • LayerStackBakeDeviceTestsVixen.Editor.Texturing.Tests
  • LayerStackCompilationVixen.Editor.Texturing
  • LayerStackCompileTestsVixen.Editor.Texturing.Tests
  • LayerStackDifferentialVixen.Editor.Texturing.Tests
  • LayerStackEditingTestsVixen.Editor.Texturing.Tests
  • LayerStackExplodeTestsVixen.Editor.Texturing.Tests
  • LayerStackShapeTestsVixen.Editor.Texturing.Tests
  • MaskStackTestsVixen.Editor.Texturing.Tests
  • MaterialBakeRouteVixen.Editor.Texturing
  • ModuleReferenceTestsVixen.Editor.Texturing.Tests
  • NodeNamespaceTestsVixen.Editor.TextureGraph.Tests
  • NormalToHeightOperationVixen.Editor.TextureGraph
  • PaintWiringTestsVixen.Editor.Texturing.Tests
  • TextureAdjustTestsVixen.Editor.TextureGraph.Tests
  • TextureAnalysisDeviceTestsVixen.Editor.TextureGraph.Tests
  • TextureAspectDeviceTestsVixen.Editor.TextureGraph.Tests
  • TextureBakeVixen.Editor.TextureGraph
  • TextureBlendDeviceTestsVixen.Editor.TextureGraph.Tests
  • TextureBudgetDeviceTestsVixen.Editor.TextureGraph.Tests
  • TextureCeilingTestsVixen.Editor.TextureGraph.Tests
  • TextureCellMetricTestsVixen.Editor.TextureGraph.Tests
  • TextureColourDeviceTestsVixen.Editor.TextureGraph.Tests
  • TextureCompoundBakeDeviceTestsVixen.Editor.TextureGraph.Tests
  • TextureCompoundLibraryTestsVixen.Editor.TextureGraph.Tests
  • TextureCpuInvocationVixen.Editor.TextureGraph
  • TextureCpuOpDeviceTestsVixen.Editor.TextureGraph.Tests
  • TextureEvaluationCostTestsVixen.Editor.TextureGraph.Tests
  • TextureExpressionCostTestsVixen.Editor.TextureGraph.Tests
  • TextureExternalGraphDeviceTestsVixen.Editor.TextureGraph.Tests
  • TextureExternalImagesVixen.Editor.Texturing
  • TextureExternalUsageTestsVixen.Editor.TextureGraph.Tests
  • TextureFilterDeviceTestsVixen.Editor.TextureGraph.Tests
  • TextureFilterKernelTestsVixen.Editor.TextureGraph.Tests
  • TextureFiltersVixen.Editor.TextureGraph
  • TextureFrameLoopTestsVixen.Editor.TextureGraph.Tests
  • TextureGraphCompilationVixen.Editor.Texturing
  • TextureGraphCompilerVixen.Editor.TextureGraph