Class GlobalInitializerDefault
- Namespace
- ShadowDusk.HLSL
- Assembly
- ShadowDusk.HLSL.dll
The default value of one global uniform, read off its HLSL initializer (float R = 1;).
public sealed record GlobalInitializerDefault : IEquatable<GlobalInitializerDefault>
- Inheritance
-
GlobalInitializerDefault
- Implements
- Inherited Members
Constructors
GlobalInitializerDefault(string, byte, byte, int, int, int, IReadOnlyList<byte[]>, string, int, int)
The default value of one global uniform, read off its HLSL initializer (float R = 1;).
public GlobalInitializerDefault(string Name, byte Class, byte Type, int Rows, int Columns, int ArrayLength, IReadOnlyList<byte[]> ElementBlobs, string File, int Line, int Column)
Parameters
NamestringThe parameter name.
ClassbyteThe MGFX parameter class: Scalar = 0, Vector = 1, Matrix = 2.
TypebyteThe MGFX parameter type: Bool = 1, Int32 = 2, Single = 3.
RowsintThe MGFX row count (1 for a scalar or vector).
ColumnsintThe MGFX column count (1 for a scalar).
ArrayLengthintThe declared array length, or 0 when the declaration is not an array.
ElementBlobsIReadOnlyList<byte[]>One default blob per array element (a single blob when not an array), each
Rows * Columns * 4bytes in the layout MonoGame'sEffectParameter.Dataholds.FilestringThe author's file the declaration is in.
LineintThe 1-based line of the declared name.
ColumnintThe 1-based column of the declared name.
Properties
ArrayLength
The declared array length, or 0 when the declaration is not an array.
public int ArrayLength { get; init; }
Property Value
Class
The MGFX parameter class: Scalar = 0, Vector = 1, Matrix = 2.
public byte Class { get; init; }
Property Value
Column
The 1-based column of the declared name.
public int Column { get; init; }
Property Value
Columns
The MGFX column count (1 for a scalar).
public int Columns { get; init; }
Property Value
ElementBlobs
One default blob per array element (a single blob when not an array), each
Rows * Columns * 4 bytes in the layout MonoGame's EffectParameter.Data holds.
public IReadOnlyList<byte[]> ElementBlobs { get; init; }
Property Value
EndColumn
The 1-based column of the initializer's last character; see EndLine.
public int EndColumn { get; init; }
Property Value
EndLine
The 1-based line of the initializer's last character in File; with
EndColumn it closes the span (Line, Column) .. (EndLine, EndColumn)
that runs from the declared name to the end of its initializer. A compiler reports a
diagnostic about the initializer somewhere inside that span (DXC's SPIR-V path at the
initializer's first token, its DXIL path at the name), which can be lines below the name
(float4 C = / { 1, 0, 0, 1 };). 0 when unknown: the span is the name alone.
public int EndLine { get; init; }
Property Value
File
The author's file the declaration is in.
public string File { get; init; }
Property Value
Kind
The declared scalar kind. Type is the MGFX type, which is Int32 for both
int and uint (and every compiler we drive reflects a uint as Int32,
a bool too on Vulkan), so this is what says how a 32-bit word of the blob reads
(issue #427). When not set it follows Type: Bool, Int or Float.
public GlobalInitializerKind Kind { get; init; }
Property Value
Line
The 1-based line of the declared name.
public int Line { get; init; }
Property Value
Name
The parameter name.
public string Name { get; init; }
Property Value
Rows
The MGFX row count (1 for a scalar or vector).
public int Rows { get; init; }
Property Value
Type
The MGFX parameter type: Bool = 1, Int32 = 2, Single = 3.
public byte Type { get; init; }