Class PreprocessedSource
- Namespace
- ShadowDusk.Core.Preprocessor
- Assembly
- ShadowDusk.Core.dll
The output of the include-flattening preprocessor pass: the fully expanded source text, the DXC macro flags to pass downstream, and the original file path for diagnostics.
public sealed record PreprocessedSource : IEquatable<PreprocessedSource>
- Inheritance
-
PreprocessedSource
- Implements
- Inherited Members
Constructors
PreprocessedSource(string, IReadOnlyList<string>, string)
Creates a warning-free preprocessed source.
public PreprocessedSource(string text, IReadOnlyList<string> dxcMacroFlags, string originalFilePath)
Parameters
textstringThe flattened source.
dxcMacroFlagsIReadOnlyList<string>The platform macro flags to forward to DXC.
originalFilePathstringThe original source file path.
PreprocessedSource(string, IReadOnlyList<string>, string, IReadOnlyList<ShaderError>)
The output of the include-flattening preprocessor pass: the fully expanded source text, the DXC macro flags to pass downstream, and the original file path for diagnostics.
public PreprocessedSource(string Text, IReadOnlyList<string> DxcMacroFlags, string OriginalFilePath, IReadOnlyList<ShaderError> Warnings)
Parameters
TextstringThe flattened source with all
#includedirectives expanded.DxcMacroFlagsIReadOnlyList<string>The platform macro flags to forward to DXC.
OriginalFilePathstringThe original source file path, preserved for diagnostics.
WarningsIReadOnlyList<ShaderError>Non-fatal diagnostics raised while flattening — currently the
SD0008case-only#includemismatch. The pipeline forwards these onto Warnings; they never gate output.
Properties
DxcMacroFlags
The platform macro flags to forward to DXC.
public IReadOnlyList<string> DxcMacroFlags { get; init; }
Property Value
OriginalFilePath
The original source file path, preserved for diagnostics.
public string OriginalFilePath { get; init; }
Property Value
Text
The flattened source with all #include directives expanded.
public string Text { get; init; }
Property Value
Warnings
Non-fatal diagnostics raised while flattening — currently the SD0008 case-only
#include mismatch. The pipeline forwards these onto
Warnings; they never gate output.
public IReadOnlyList<ShaderError> Warnings { get; init; }