mirror of
https://github.com/par274/sharpemu.git
synced 2026-08-03 00:19:46 +08:00
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:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user