fix(agc): merge Prospero attrib-table formats onto IR vertex inputs (#556)

IR-discovered BufferLoadFormat often keeps a stale float sharp format;
patch DataFormat/offset from the AGC attrib table (semantic index),
allow offen fetches, and map quirks 113/121 through NarrowVk for host
vertex input.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
MarcelMediaDev
2026-07-23 13:39:24 +01:00
committed by GitHub
parent 8779c96c3a
commit f9d92135a0
8 changed files with 1195 additions and 19 deletions
+2 -1
View File
@@ -312,7 +312,8 @@ public sealed record Gen5VertexInputBinding(
uint OffsetBytes,
byte[] Data,
int DataLength,
bool DataPooled);
bool DataPooled,
bool PerInstance = false);
public sealed record Gen5ShaderEvaluation(
IReadOnlyList<uint> InitialScalarRegisters,
@@ -883,8 +883,11 @@ public static class Gen5ShaderScalarEvaluator
Gen5ShaderInstruction instruction,
Gen5BufferMemoryControl control,
BufferDescriptor descriptor) =>
// AGC embedded fetch is BufferLoadFormat/TBufferLoadFormat with idxen.
// offen is allowed: the constant/scalar offset folds into OffsetBytes
// (UI glyph shaders use this shape). Rejecting offen left those loads
// as live SSBOs and dropped vertex attributes.
control.IndexEnabled &&
!control.OffsetEnabled &&
control.DwordCount is >= 1 and <= 4 &&
descriptor.BaseAddress != 0 &&
descriptor.Stride != 0 &&