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

Open
github-bot wants to merge 1 commit from github-bot/gh-172 into amd AGit
Owner

@⁠mahhnameisjeff on GitHub · 2026-12-03 14:28 UTC · original
mahhnameisjeff:amd-translator-page-reuse → amd · +132 −18 · 4 files · 1 commits · open

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

**@⁠mahhnameisjeff** on GitHub · 2026-12-03 14:28 UTC · [original](https://github.com/eikkapine/jaxe/pull/172) `mahhnameisjeff:amd-translator-page-reuse` → `amd` · +132 −18 · 4 files · 1 commits · open 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)
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).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 14:35:23 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/172/head:github-bot/gh-172'
git switch 'github-bot/gh-172'

Merge

Merge the changes and update on Forgejo.
git switch 'amd'
git merge --no-ff 'github-bot/gh-172'
git switch 'github-bot/gh-172'
git rebase 'amd'
git switch 'amd'
git merge --ff-only 'github-bot/gh-172'
git switch 'github-bot/gh-172'
git rebase 'amd'
git switch 'amd'
git merge --no-ff 'github-bot/gh-172'
git switch 'amd'
git merge --squash 'github-bot/gh-172'
git switch 'amd'
git merge --ff-only 'github-bot/gh-172'
git switch 'amd'
git merge 'github-bot/gh-172'
git push origin 'amd'
This discussion has been locked. Commenting is limited to contributors.
No description provided.