Table of Contents

Enum FxParseErrorCode

Namespace
ShadowDusk.HLSL
Assembly
ShadowDusk.HLSL.dll

Diagnostic codes emitted by the FX9 pre-parser.

public enum FxParseErrorCode

Fields

DuplicatePassName = 6

FX0006: Two or more passes within a technique share the same name.

DuplicateTechniqueName = 5

FX0005: Two or more techniques share the same name.

MalformedCompileExpression = 3

FX0003: A compile() expression was malformed (unexpected tokens inside argument list).

MissingSemicolon = 8

FX0008: A required semicolon is missing after a statement.

UnclosedAnnotationBlock = 7

FX0007: An annotation block was opened but never closed.

UnclosedSamplerBlock = 9

FX0009: A sampler_state block was opened but never closed.

UnexpectedEof = 2

FX0002: The source ended before the current construct was closed.

UnexpectedToken = 1

FX0001: An unexpected token was encountered during parsing.

UnknownCharacter = 11

FX0011: A character the lexer does not recognize appeared outside any token.

UnrecognizedRenderStateKey = 10

FX0010: A render-state key is not recognized (non-fatal warning).

UnrecognizedShaderProfile = 4

FX0004: The shader profile string is not a recognized profile name.

UnsupportedLegacyIntrinsic = 12

FX0012: A legacy D3D9 sampling intrinsic (e.g. tex2Dlod) whose argument list does not map 1:1 onto a modern Texture2D method, so it cannot be rewritten forward for DXC. (The FNA target compiles these natively and never raises this.)

UnsupportedShaderStage = 14

FX0014: A pass assigns a shader stage the consumer runtime has no place to put: HullShader, DomainShader, GeometryShader, or ComputeShader. MonoGame's and KNI's Effect model exactly two stages (MonoGame stores the stage as a single bool, KNI as a two-value byte with a throwing default), so no compiler can produce a loadable effect containing one of these — it is a runtime limit, not a gap in ShadowDusk. Raised instead of letting the assignment fall through to render-state parsing, which blamed a missing semicolon (FX0008) on a file that had none.

UnsupportedSm4TypeForFx2 = 13

FX0013: An SM4+ resource/sampler type appeared in a shader targeting FNA's D3D9 fx_2_0 profile, where no SM1-3 lowering exists. Raised BEFORE the source reaches vkd3d, which does not reject these cleanly — a SamplerComparisonState makes its SM1 lowering hit "Unreachable code reached" and take the whole process down with an access violation, so the user would get a crash instead of a diagnostic.