Table of Contents

Class ConstantBufferReflection

Namespace
ShadowDusk.Core.Reflection
Assembly
ShadowDusk.Core.dll

A reflected constant (uniform) buffer: its name, size, bind slot, and variables.

public sealed record ConstantBufferReflection : IEquatable<ConstantBufferReflection>
Inheritance
ConstantBufferReflection
Implements
Inherited Members

Properties

BindSlot

The register/bind slot the buffer occupies.

public required int BindSlot { get; init; }

Property Value

int

Name

The constant buffer's name.

public required string Name { get; init; }

Property Value

string

RawBinding

The raw SPIR-V Binding decoration (unlike BindSlot, a class-relative renumbering). Used only by the Vulkan container's descriptor-layout table — Vulkan's cbuffer binding is NOT reliably 0; it must be reflected like any other resource. Default 0 for non-Vulkan.

public int RawBinding { get; init; }

Property Value

int

RawDescriptorSet

The raw SPIR-V DescriptorSet decoration (see RawBinding), set by the SPIR-V reflection; 0 elsewhere. The Vulkan target also uses it to refuse a buffer outside its stage's descriptor set (SD0229), since MonoGame's DesktopVK binds one set per stage.

public int RawDescriptorSet { get; init; }

Property Value

int

SizeBytes

The total size of the buffer in bytes.

public required int SizeBytes { get; init; }

Property Value

int

Variables

The variables packed into the buffer, in offset order.

public required IReadOnlyList<VariableReflection> Variables { get; init; }

Property Value

IReadOnlyList<VariableReflection>