translator: reads of title memory by address share one directory look per block #172

Open
mahhnameisjeff wants to merge 1 commit from upstream-pr/172 into amd
mahhnameisjeff commented 2026-12-03 14:28:42 +00:00 (Migrated from github.com)

Imported from eikkapine/jaxe. Originally posted by mahhnameisjeff on 2026-12-03T14:28:42Z.


Base: origin/amd (0902398). Independent of the other PRs from this batch.
Bumps TRANSLATOR_VERSION 4 -> 5 (the translation of 77 shaders changes).

Programs that read title memory by address (the ray-tracing structure
walks above all) looked each address up in the directory, picked the copy's
view, then read: three dependent memory round trips per read, and a record's
fields are read one load each from one pointer. Now:

  • Lower::memory_read: a read whose address register pair a look in the
    same machine block already served reuses that look for lanes whose
    address is in the same 64 KiB page with a copy; other lanes look again
    (in a branch). Emptied at each block.
  • the second half of a 128-byte BVH node reuses the first half's look
    unless the node ends its page.
  • JAXE_PAGE_REUSE=0 (translation listing only, not part of the cache
    key) turns it off, to tell which programs it changes.

Measured on RX 6700 XT, ray tracing on: the two structure-walking programs
37.6 -> 22.2 ms per frame (timing runs, JAXE_GPU_TIMING); frame rate after
the load 10.8-12.6 -> 13.0-13.7 fps; with JAXE_PAGE_REUSE=0 the same build
gave 11.7. Keeping looks across dominated blocks was tried and made both
programs slower (more registers live across their loops): not done.
jaxe-shader tests pass (313); the changed programs validate with dxil.dll
and compile on the card. Of 19,098 known shaders 77 change, all compute.

Related: general GPU-bound reports (#142, #130, #87, #108).

🤖 Generated with Claude Code

<!-- greyfinch-sync:eikkapine/jaxe:issue:5628464005 --> Imported from [eikkapine/jaxe](https://github.com/eikkapine/jaxe/pull/172). Originally posted by [mahhnameisjeff](https://github.com/mahhnameisjeff) on 2026-12-03T14:28:42Z. --- Base: origin/amd (0902398). Independent of the other PRs from this batch. Bumps TRANSLATOR_VERSION 4 -> 5 (the translation of 77 shaders changes). Programs that read title memory by address (the ray-tracing structure walks above all) looked each address up in the directory, picked the copy's view, then read: three dependent memory round trips per read, and a record's fields are read one load each from one pointer. Now: - `Lower::memory_read`: a read whose address register pair a look in the same machine block already served reuses that look for lanes whose address is in the same 64 KiB page with a copy; other lanes look again (in a branch). Emptied at each block. - the second half of a 128-byte BVH node reuses the first half's look unless the node ends its page. - `JAXE_PAGE_REUSE=0` (translation listing only, not part of the cache key) turns it off, to tell which programs it changes. Measured on RX 6700 XT, ray tracing on: the two structure-walking programs 37.6 -> 22.2 ms per frame (timing runs, JAXE_GPU_TIMING); frame rate after the load 10.8-12.6 -> 13.0-13.7 fps; with JAXE_PAGE_REUSE=0 the same build gave 11.7. Keeping looks across dominated blocks was tried and made both programs slower (more registers live across their loops): not done. jaxe-shader tests pass (313); the changed programs validate with dxil.dll and compile on the card. Of 19,098 known shaders 77 change, all compute. Related: general GPU-bound reports (#142, #130, #87, #108). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/172:upstream-pr/172'
git switch 'upstream-pr/172'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'amd'
git merge --no-ff 'upstream-pr/172'
git switch 'upstream-pr/172'
git rebase 'amd'
git switch 'amd'
git merge --ff-only 'upstream-pr/172'
git switch 'upstream-pr/172'
git rebase 'amd'
git switch 'amd'
git merge --no-ff 'upstream-pr/172'
git switch 'amd'
git merge --squash 'upstream-pr/172'
git switch 'amd'
git merge --ff-only 'upstream-pr/172'
git switch 'amd'
git merge 'upstream-pr/172'
git push origin 'amd'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
eikkapine/jaxe!172
No description provided.