Graphic mat 44 is now generic; TextRegex source gen will use goto instead of do{}while()

This commit is contained in:
Youmu Liu
2026-09-07 17:51:15 +08:00
parent ee67dfbde1
commit 90c7538639
27 changed files with 805 additions and 713 deletions
@@ -232,13 +232,13 @@ namespace StgSharp.GenerateGL.Generation
List<ManagedParameterDefinition> singleParameters = new List<ManagedParameterDefinition>(prefix)
{
new ManagedParameterDefinition("bool", "transpose", transposeSource),
new ManagedParameterDefinition("GraphicsMatrix", "value", valueSource),
new ManagedParameterDefinition("GMatrix44<float>", "value", valueSource),
};
List<ManagedParameterDefinition> spanParameters = new List<ManagedParameterDefinition>(prefix)
{
new ManagedParameterDefinition("bool", "transpose", transposeSource),
new ManagedParameterDefinition(
"ReadOnlySpan<GraphicsMatrix>",
"ReadOnlySpan<GMatrix44<float>>",
"values",
valueSource),
};
@@ -740,7 +740,7 @@ namespace StgSharp.GenerateGL.Generation
string matrixName = EscapeIdentifier(matrix.Name);
if (invocation.IsSpan)
{
builder.Append(" fixed (GraphicsMatrix* __value = ");
builder.Append(" fixed (GMatrix44<float>* __value = ");
builder.Append(matrixName);
builder.Append(")\n");
builder.Append(" {\n");
+1 -1
View File
@@ -92,7 +92,7 @@ The generator merges a family only when it can validate the resulting signatures
| `glUniform1*v` | `Uniform(..., ReadOnlySpan<T>)` |
| `glUniform4*v` | `Uniform(..., ReadOnlySpan<Vec4<T>>)` |
| `glUniform2*v` and `glUniform3*v` | Omitted because `Vec2` and `Vec3` storage is not a tightly packed C array |
| `glUniformMatrix4fv` | `Uniform(..., GraphicsMatrix)` and matrix-span overloads |
| `glUniformMatrix4fv` | `Uniform(..., GMatrix44<float>)` and matrix-span overloads |
| Other matrix sizes and double matrices | Omitted because only the graphics-oriented 4x4 float layout is defined |
| `glGetBooleanv`, `glGetFloatv`, `glGetIntegerv`, and related queries | `GetValue(..., Span<T>)` |
| `glVertexAttrib1f/2f/3f/4f` and equivalent scalar forms | `VertexAttribute(...)`; component count is expressed by the parameter list |