Vixen
02b45cc4
csharp
public sealed class IrBinding

One resource a shader expects from the host. Slots are assigned per kind, in declaration order, so a host can bind against them deterministically.

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

Remarks

Slot is not the descriptor binding index. It numbers each kind separately, which is what the IR verifier checks for duplicates and what the IR dump prints; the (set, binding) pair a backend emits is assigned by Vixen.Raven.Reflection.BindingPlan, once, for every consumer.

Fields and properties (11)

  • public IrVariable Variable
  • public IrBindingKind Kind
  • public int Slot
  • public bool IsWritable

    Whether the shader may store into this binding. Only a RWBuffer or a storage image ever can.

  • public ResourceSet Set

    The descriptor set this binding belongs to.

  • public object? DefaultValue

    The initialiser the author wrote — var exposure: float = 1f — or null.

  • public string? Semantic

    The pipeline semantic from [Semantic("…")], if any.

  • public string Name

    The host-visible name: the variable's, unless this binding was contributed by a shader filling a compose slot, in which case it is qualified by that shader.

  • public bool IsShared

    Whether this is one resource for the whole compilation rather than a contribution from each feature that declared it.

  • public bool IsMaterialIndex

    Whether this is the index of the material record a draw reads.

  • public IrType Type

Methods (1)

  • public IrBinding(IrVariable variable, IrBindingKind kind, int slot, string? semantic, ResourceSet set = PerMaterial, string? name = null, bool writable = false, object? defaultValue = null, bool shared = false, bool materialIndex = false)

    One resource a shader expects from the host. Slots are assigned per kind, in declaration order, so a host can bind against them deterministically.

Used by (30)

  • BindingPlanVixen.Raven
  • CodeGenTestBaseVixen.Raven.Tests
  • ComposeInterfaceTestsVixen.Raven.Tests
  • ComposeTestsVixen.Raven.Tests
  • DescriptorSetTestsVixen.Raven.Tests
  • GlslEmitterVixen.Raven
  • GroupSharedTestsVixen.Raven.Tests
  • ImportPrunerVixen.Raven
  • InheritanceTestsVixen.Raven.Tests
  • IrCapabilitiesVixen.Raven
  • IrPrinterVixen.Raven
  • IrShaderVixen.Raven
  • IrVerifierVixen.Raven
  • IrVerifierTestsVixen.Raven.Tests
  • LibraryTreeTestsVixen.Raven.Tests
  • LowererVixen.Raven
  • LoweringTestsVixen.Raven.Tests
  • MaterialRecordTestsVixen.Raven.Tests
  • PlannedBindingVixen.Raven
  • PushConstantTestsVixen.Raven.Tests
  • RayQueryTestsVixen.Raven.Tests
  • ReflectionBuilderVixen.Raven
  • ReflectionTestsVixen.Raven.Tests
  • SampledTextureTestsVixen.Raven.Tests
  • SizedArrayTestsVixen.Raven.Tests
  • SpirvEmitterVixen.Raven
  • SpirvGlobalVixen.Raven
  • StorageImageTestsVixen.Raven.Tests
  • StreamTestsVixen.Raven.Tests
  • WritableResourceTestsVixen.Raven.Tests