Vixen
dd8b0a81
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.

Read the guide page for this →

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 (12)

  • 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 bool IsDynamicOffset

    Whether this block is bound at an offset the host moves per draw — [DynamicOffset].

  • 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, bool dynamicOffset = 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 (33)

  • BindingPlanVixen.Raven
  • CodeGenTestBaseVixen.Raven.Tests
  • ComposeInterfaceTestsVixen.Raven.Tests
  • ComposeTestsVixen.Raven.Tests
  • DepthTextureTestsVixen.Raven.Tests
  • DescriptorSetTestsVixen.Raven.Tests
  • DynamicOffsetTestsVixen.Raven.Tests
  • EsslBackendVixen.Raven.Transpile
  • 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