Repository navigation
Conversation
The census's largest refusal row (771 programs at ffe310e) came from three different places under one reason, so a census could not tell which one to lower. Each now names what the program reads: - a descriptor that scalar buffer loads (s_buffer_load_dword*) use first: its record count (dword 2) by the view's kind (raw, structured, constant buffer, other), or its address or format; "used by scalar loads before a vector access" when a vector access later decides the view; - s_memtime and s_memrealtime as timestamps, s_get_waveid_in_workgroup as the wave's index in its group; - scalar stores, scalar scratch loads and cache instructions. A load through a root view's address now says it reads that view's memory rather than "a descriptor read only as data". Only the reasons change: every read stops the program as before, no IR is emitted for them, and what translates today is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A descriptor dword the translation cannot rebuild from the host view stopped the program with "a descriptor's address or format read as data" (92 programs at ffe310e), whatever the dword. Each now names what it holds: an image's address, array pitch or mip limits, compression fields or metadata address; a buffer's address, stride or high address, or format and swizzle. A census can then tell which ones a program needs, as a buffer's stride, say, can come from the used-resource list. Only the reasons change. Dwords past the descriptor keep the old one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A reviewer's note on this one, since it is the least risky of the open shader PRs and the diff is bigger than it looks. It cannot change what translates. The one structural change, and it is the interesting half to review: the per-descriptor path collects all uses ( Measured on The one claim nobody here can check is the census number — "92 programs at |
|
Thanks for the run @Zipettte — 123 passed / 0 failed at |
|
Automated triage for the maintainers. Needs rebase. This PR does not merge cleanly into current The content has not been reviewed yet; it will be once the branch is rebased onto Generated by Claude Code |
AI-assisted; measured on my own machine.
What
Two commits on the descriptor-data path, both about what a refusal says rather than what translates.
Name what a scalar memory read is. A scalar instruction that is not a load of dwords stopped the program with one string, "a scalar memory read as data", whatever it was. Each now names it: a timestamp (
s_memtime/s_memrealtime), a wave's index in its group, a scalar cache instruction, a scalar store, a scratch load, or — the common one — a scalar memory read as data.Name which descriptor dword. A descriptor dword the translation cannot rebuild from the host view stopped it with "a descriptor's address or format read as data" (92 programs at
ffe310e), whichever dword it was. Each now names what it holds: an image's address, array pitch or mip limits, compression fields or metadata address; a buffer's address, stride or high address, or format and swizzle. A descriptor that a vector access uses later keeps a reason of its own, because an error at that point would give every dword the same one.Only the reasons change; nothing translates that did not before. The point is
victory translateand census output: it can say which descriptor dwords the title's programs actually need, and that is what decides whether a dword can come from the used-resource list (a buffer's stride can, for one).Testing
cargo test -p victory-shader: 123 passed, 1 ignored (the new tests cover the instruction names and a table of image and buffer dwords).cargo clippy -p victory-shader --all-targets --all-features -- -D warnings: clean.cargo build --release -p victory: builds.I did not run
victory translateover the title's shader set for this revision — no title data on this machine — so the census numbers a full set gives are still to be measured.Stacked
This is the naming change plus the per-dword reasons only. The root-view commit, which reads a root view's memory for scalar loads, is #1056 and is deliberately not included here.