AMD Vega (Windows, driver 23.19): the last vertex of a strided fetch reads zero because the bound range ends inside its record; agc_driver_zero_vertex_fetch_ranges fails #26623
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by cryst4lpepsi on 2026-11-24T11:58:51Z.
What happens
agc_driver_zero_vertex_fetch_rangesandagc_driver_zero_vertex_fetch_ranges_verify_planfail on an AMD Vega iGPU with AMD's Windows driver 23.19, 3 of 3 runs each:live known-zero layout transition: vertex 2 v8 is 0, expected 1048576000. They pass 3 of 3 on an NVIDIA GPU in the same laptop.What was checked
The failing case draws 3 vertices with a 32-byte stride and 16-byte elements.
VertexBufferReadSizegivesstride * last index + element bytes= 80 bytes, so the bound range ends inside the last record. An older local experiment (mainf220c22162, not proposed) isolates this:robustBufferAccess(and sorobustBufferAccess2) not enabledRobust Buffer Access lets a driver check vertex input against the range rounded down to a multiple of the binding's stride. I did not find that allowance in the Robust Buffer Access 2 section, and AnyPS5 enables
robustBufferAccess2on this device. So the driver may be at fault here, but on a device with onlyrobustBufferAccessthe same result would be allowed.From reading the code,
VertexBufferExtent(indirect draws) also ends inside the last record:(records - 1) * stride + element bytes. I have not tested an indirect draw.Reading the added bytes from the guest needs the checks of
vertexCopyTailReadableand its callers (#19100), so I am not proposing the local experiment as a fix.Not tried: another AMD driver, a title. I do not know of a title that shows this.
Title, test or build step
agc_driver_zero_vertex_fetch_ranges,agc_driver_zero_vertex_fetch_ranges_verify_planAnyPS5 commit
main72f4ebca39, nothing merged on top.System
Windows 11 Home 22621, WinLibs GCC 15.2.0 r7, Release. AMD Radeon(TM) Graphics (Vega iGPU,
1002:1638), AMD proprietary driver 23.19.10.08. Control: NVIDIA GeForce RTX 3050 Ti Laptop GPU (10de:25a0), driver 596.36.Steps to reproduce
Log
AI-assisted: yes