Commit Graph
3 Commits
Author SHA1 Message Date
milescovielloandClaude Opus 5.5 1d983101fe fix(agc): copy an indirect draw's vertex buffer only up to its last element
For an indirect draw, whose counts only the GPU knows, the driver copies
the whole range a vertex buffer descriptor covers, records * stride from
the descriptor's address. The last record's element ends sooner when the
attribute sits at an offset in its record, and the fetch can read at most
(records - 1) * stride plus the element.

Forspoken (PPSA03984) draws instances from a 48 MiB buffer of 96-byte
records with six attributes at offsets 0 to 0x50 in each record. The copy
for the attribute at 0x50 ran 0x50 bytes past the buffer into the
unmapped page after it, and the draw stopped with "guest memory is not
readable".

VertexBufferExtent now ends at the last record's element, as
VertexBufferReadSize does for the last record of a direct draw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 02:54:23 +00:00
TibixDev 02e58e9936 fix(graphics): bypass vertex layout cache churn
Preserve current null-descriptor and format-component semantics, keep live validation per draw, and leave empty or bypassed layouts on the value-owned path. Add differential, concurrency, and isolated timing coverage.

Written with AI assistance.
2026-10-14 16:05:35 +02:00
TibixDev c724c69324 perf(graphics): retain immutable vertex input layouts
Cache validated layouts by shader variant and exact static shape, independently of buffer transport. Preserve per-draw address checks and share layout ownership with draw recipes.

Written with AI assistance.
2026-10-14 16:05:35 +02:00