mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-30 22:49:53 +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:
@@ -1225,8 +1225,11 @@ internal static partial class MetalVideoPresenter
|
||||
? vertexBuffer.Stride
|
||||
: Math.Max(vertexBuffer.ComponentCount, 1) * 4;
|
||||
MetalNative.Send(layout, MetalNative.Selector("setStride:"), (nint)stride);
|
||||
// MTLVertexStepFunction.PerVertex = 1.
|
||||
MetalNative.Send(layout, MetalNative.Selector("setStepFunction:"), 1);
|
||||
// MTLVertexStepFunction: PerVertex = 1, PerInstance = 2.
|
||||
MetalNative.Send(
|
||||
layout,
|
||||
MetalNative.Selector("setStepFunction:"),
|
||||
vertexBuffer.PerInstance ? 2 : 1);
|
||||
}
|
||||
|
||||
return descriptor;
|
||||
|
||||
Reference in New Issue
Block a user