docs(debt): measure the null vertex buffer V# fetch on gfx1036 #18142
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18142"
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 brumskysb on 2026-11-10T15:49:15Z.
What
Measures the gap clause of the Null vertex buffer V# entry of
docs/dev/debt/libSceAgcDriver.md— "This follows the V# fields in the AMD RDNA2 ISA (NUM_RECORDS0,DST_SEL0 selects 0), not measured on hardware" — on RDNA2 hardware.Measured on gfx1036 (driver 31.0.22044.1) with the hardware oracle, wave32 and wave64, one work-group, the destination preset to a sentinel (
0xcdcdcdcd) inside the body before the load:0x0004dfac, 3 vs 6 records) reproduces 768/768 words, wave32 and wave64 — indices 3-5 over 3 records read00000000x4 (W included), 6 records return the stored values. Same SKU on another driver: a reproduction of the rule, not a re-measurement of #2241's numbers.s[8:11]= 0, read back 0 on every lane): 15 forms x wave32/wave64 —buffer_load_format_{x,xy,xyz,xyzw}withidxen,offenandidxen offen,buffer_load_format_d16_xyzw idxen,tbuffer_load_format_xyzw idxenwithBUF_FMT_32_32_32_32_FLOATandBUF_FMT_8_8_8_8_UNORM; index {0, 1, 0x10000, 0xfffffff0} x offset {0, 4, 0x1000, 0xfffffff0}. 3,840/3,840 written words are 0 (W included, not 1.0), 1,920/1,920 registers outside the destination keep the sentinel, 30/30 dispatches returned without a fault.buffer_load_format_xyzw idxen):NUM_RECORDS0,DST_SEL0/0/0/0 and word 3FORMAT0 each alone zero 128/128 (wave32) and 256/256 (wave64) words; the control reads the stored data (0 zero words, 6 distinct vectors). So the ISA reading in the entry is right but names two of three sufficient fields, and the null result cannot say which one the hardware applies; the entry now says that.The entry's first sentence (the zeroed vertex buffer of the attribute's size with stride 0) is code behaviour (
NullVertexDescriptor/DecodeVertexFormatinVertexInput.hpp, read at this base) and is unchanged. No code changes in this PR.Evidence (runners, verifier, all 50 dumps as one bundle, per-dump SHA-256 ledger, claims worksheet, results): https://gist.github.com/brumskysb/9e0579b14879df4820845462482d9066
Tested
gfx1036, driver 31.0.22044.1, Windows 11; harnesstools/hw-oraclethroughrig_runner.py, wave32 and wave64, one work-group, LDS 4096, IEEE 0, DX10 clamp 1, fp16_overflow 0.s8-s11on every lane.verify_step4.pyrecomputes every count above from the dumps. GistREADME.md,dumps_bundle.jsonandverify_step4.pyraw-URL SHA-256 equal the local files.The replaced region, copied from
check_entry_edit.py's REPLACED REGION:before:
... (NUM_RECORDS0,DST_SEL0 selects 0), not measured on hardware.after:
... (NUM_RECORDS0,DST_SEL0 selects 0). Measured on RDNA2 (gfx1036, driver 31.0.22044.1) with the hardware oracle in wave32 and wave64: an all-zero V# returns 0 in every written component, W included, forbuffer_load_format_xto_xyzw(idxen,offenor both),_d16_xyzwandtbuffer_load_format_xyzw(32_32_32_32_FLOAT,8_8_8_8_UNORM), without a fault; over stored data,NUM_RECORDS0,DST_SEL0 andFORMAT0 each zero an_xyzwfetch alone, so the null result cannot name the field. The fetch was a compute dispatch, not a vertex shader; the PS5's gfx1013 is not measured.Removed phrases declared to the gate:
0),andmeasured on hardware.— only the closing "not measured on hardware" goes; "not measured" moves to the PS5's gfx1013. The ISA link and the field reading are untouched.Notes
NUM_RECORDS> 0 (skipped: an in-range read at address 0 is not provably safe), tbuffer formats other than the two named, and isolation legs on forms other than_xyzw idxen.docs/dev/debt/libSceAgcDriver.mdand none carries this entry in a +/- line.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attached to this PR)Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-10T17:50:13Z.
Review: COMMENTED
Read
1353c67b7fagainstmain.Correctness. The entry on main describes the
NullVertexDescriptorhandling inGraphics/include/VertexInput.hpp(:27-34,:296,:310): an all-zero V# is bound to a zeroed buffer of the attribute size with stride 0, so every component reads 0. The new text keeps that wording and adds the gfx1036 measurement, which agrees with the behaviour. The measurement used computebuffer_load_formatandtbuffer_load_format, not a vertex shader; the entry says so and says gfx1013 is not measured, which is the right scope. The old sentence on main is unchanged since the PR base. The hardware numbers cannot be checked from the code. No overlap with the otherlibSceAgcDriver.mdPRs in this set (#17883 edits line 9, #18091 the start of Functional).Not run here; this is from reading the code.
AI-assisted: yes.