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 aKazm1 on 2026-12-02T15:19:34Z.
Console measurements of an assumption several AGC driver changes rest on, with the method and the numbers. @teepean @EdouardSence: #7340 and #9852 state that the guest GPU leaves stores and atomics of draws that no barrier separates unordered; these runs confirm it on hardware. @Celegans12 @oneandonlydean: #9176 keeps queue-0 dispatches ordered and lists console behavior as untested; the graphics ring does not order dispatches either.
Console: retail PS5, system software 13.000.040, gfx1013, graphics ring (DCB,
sceAgcDriverSubmitDcb), OpenAGC low-level path, hand-encoded wave32 shaders.Method. Every pixel or thread of workload A takes a ticket with
global_atomic_add ... glcon a counter and stores its workload id atlog[ticket]with a plainglobal_store_dword; workload B does the same on the same counter and log. The log therefore lists the order in which the two workloads' memory operations reached memory. A is large (a 512x512 triangle, or 4096 groups of 64 threads: 262,144 invocations either way), optionally slowed by a boundeds_sleep 1loop before its ticket. B is small (a 2,016-pixel triangle inside A's area, or 32 groups of 64) and does not wait. B is recorded right after A, with nothing between them or with oneEVENT_WRITE(event index 4) between them. For read-after-write, A stores 1 atdata[ticket], and every invocation of B readsdata[slot * 128]and A's counter with an atomic add of 0 (a read at the L2, past the per-CU caches) and logs both values.Write order (A's tickets taken after B's first ticket; every run counted all invocations, none lost):
Read after write (B's reads that returned 0 because A had not stored that slot yet):
So on this console the GPU orders neither the writes nor the reads of a draw or dispatch against the one before it unless the command stream has a partial flush between them, and the flush has to cover the earlier work's stage: a CS_PARTIAL_FLUSH does not wait for earlier pixel work.
What this bears on in the driver:
SealWriteOnlyrelies on.sealsWriteOnlyalso seals at CS_PARTIAL_FLUSH (event 0x07). On the console that event does not order earlier pixel work, so sealing draw writes there orders more than the hardware does. It is the safe direction; I mention it only for anyone narrowing the seals.DispatchTrailingafter each one,DispatchLeadingbefore it unless the previous barrier already covers it), and #9176 overlaps only compute-ring dispatches with disjoint accesses. Extending #9176 to queue 0 between guest flushes would match the hardware. SAROS (PPSA07631) records about 990 dispatches and about 1,650 of these barriers per frame.I have no numbers for a dispatch followed by a draw: in my hand-written command buffers that order did not complete. I can attach the payload source and the raw output.
AI-assisted: Yes.