Table of Contents

Class D3DReflectionMaps

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

The single source of truth for the raw D3D reflection numeric value → ShadowDusk enum lookup tables (D3D_SHADER_VARIABLE_CLASS, D3D_SHADER_VARIABLE_TYPE, and D3D_SRV_DIMENSION). Both reflection readers consume these so the numeric mappings cannot drift apart: the pure-managed RdefReader passes the raw values it reads from the DXBC container, while the DXIL extractor casts its Vortice/D3D12 reflection enums (whose underlying values are these same D3D constants).

These helpers only own the value → enum table. Each caller keeps its own unmapped-value policy: the DXIL extractor throws on an unmapped class/type, whereas RdefReader reports failure (false) — that difference is deliberate and is preserved at the call sites, not unified here.

public static class D3DReflectionMaps
Inheritance
D3DReflectionMaps
Inherited Members

Methods

MapSrvDimension(uint)

Maps a D3D_SRV_DIMENSION numeric value to a TextureDimension. Array and multisample variants collapse onto their base dimensionality; an unrecognised value yields Unknown.

public static TextureDimension MapSrvDimension(uint dim)

Parameters

dim uint

The raw D3D_SRV_DIMENSION value.

Returns

TextureDimension

The folded texture dimensionality.

TryMapClass(uint, out EffectParameterClass)

Maps a D3D_SHADER_VARIABLE_CLASS numeric value to an EffectParameterClass. Row- and column-major matrices both fold to Matrix.

public static bool TryMapClass(uint cls, out EffectParameterClass mapped)

Parameters

cls uint

The raw D3D_SHADER_VARIABLE_CLASS value.

mapped EffectParameterClass

The mapped class when the value is recognised.

Returns

bool

true when the value is recognised; otherwise false.

TryMapType(uint, out EffectParameterType)

Maps a D3D_SHADER_VARIABLE_TYPE numeric value to an EffectParameterType. uint (19) folds into Int32, matching mgfxc/MonoGame's parameter model.

public static bool TryMapType(uint type, out EffectParameterType mapped)

Parameters

type uint

The raw D3D_SHADER_VARIABLE_TYPE value.

mapped EffectParameterType

The mapped type when the value is recognised.

Returns

bool

true when the value is recognised; otherwise false.