Table of Contents

Namespace ShadowDusk.HLSL.Ast

Classes

AnnotationEntry

A single entry inside an annotation block: TypeName Key = Value;

CompilerPredefinedMacroTest

A preprocessor conditional that tested a compiler-predefined macro.

EntryPointMatrixInterpolants

The matrix declarations one entry point's signature carries, split by direction: what it reads (parameters without out) and what it writes (its return value and its out parameters; an inout one is both). Unmodelled names the signature shapes whose register layout is not modelled (a semantic on a struct-typed declaration whose struct holds a matrix, a type name defined twice at file scope, an overloaded name): a compile of that entry point that meets a matrix interpolant is refused.

FxParseResult

The output of the FX9 pre-parser: stripped HLSL plus all extracted FX9 metadata.

FxPreprocessedParse

The pre-parse of an effect's PREPROCESSED source (issue #308), produced by ParsePreprocessed(string, string): the recovery for an effect whose legacy sampler syntax the raw pre-parse could not see because an #include or a macro supplies it.

FxPreprocessedTechniques

The techniques of an effect's PREPROCESSED translation unit (issue #407), produced by ParseTechniquesPreprocessed(string, string): conditionals evaluated with the compile's macros, #includes inlined and macros expanded, which is the text mgfxc reads its techniques from. Spans are mapped back onto the author's lines.

GlSamplerSlots

The two facts the OpenGL sampler allocator starts from, both read off the PREPROCESSED source (conditionals evaluated, macros expanded) the way mgfxc reads them. Produced by CollectGlSamplerSlots(string, string, FxParseResult).

LegacySamplerResidue

A legacy D3D9 sampler construct left in a source the compiler is given.

LegacySamplerResidueCheck

The answer of HasLegacySamplerResidue(string, string).

MatrixInterpolantDeclaration

One MATRIX-typed declaration with a semantic in an entry point's signature (a parameter, the return value, or a member of a struct either of those uses, at any depth), read off the preprocessed source by CollectGlSamplerSlots(string, string, FxParseResult).

The OpenGL target needs it because DXC emits byte-identical SPIR-V, and so GLSL, for a row_major and a column_major matrix interpolant, while fxc (and so mgfxc) packs them differently: one HLSL COLUMN per register for column_major (the default; a #pragma pack_matrix does not change it for interpolants), one ROW per register for an explicit row_major. The rewriter must reproduce that layout, or a stage that declares the interpolant as separate vectors reads the wrong data. A float1xN (column_major) or row_major floatNx1 spreads over N registers in fxc but reaches the rewriter as a plain vector, so it is recorded too: the rewrite splits it over N one-component registers as fxc does (and refuses it as a vertex input).

ParameterAnnotation

Annotation block attached to a global parameter declaration.

PassInfo

Represents a single pass block within an FX9 technique.

RenderStateEntry

A single render-state key/value assignment inside an FX9 pass block.

RestructuredHelperDefinition

One helper a tex2Dlod-family call was rewritten to; see RestructuredHelpers.

SamplerInfo

Represents a parsed FX9 sampler declaration with its sampler_state block.

SamplerStateEntry

A single state key/value assignment inside an FX9 sampler_state block.

TechniqueInfo

Represents a parsed FX9 technique block.

Structs

SourceSpan

Source location range covering a contiguous span of characters in the input file.