fix(dev): a Tracy pack builds the game, also from an unchanged tree #1741

Merged
HumanBean merged 2 commits from HumanBean/Longshot:fix/tracy-pack-route into main 2026-11-19 15:16:19 +00:00
Owner

Type: fix · Risk: low · Tested on: Linux (a development script, no GPU involved) · Needs: none

TL;DR

Building a test pack with the Tracy profiler turned on (LONGSHOT_TRACY=1) gave a pack with no profiler in it whenever the change touched only the renderer, or nothing at all, so a capture recorded nothing. Packs with the profiler on now always build the game, where the profiler's client lives. A new check fails on main and passes here.

Breakdown

  • Who it helps: developers who profile with Tracy against a base (dev_packs.py pack).
  • What was wrong: pack_route sent a LONGSHOT_TRACY=1 pack of an unchanged or renderer-only tree to the renderer-only build, or to no build, but Tracy's client is in the game's executable.
  • What changes: LONGSHOT_TRACY set (and not 0) routes the pack to the game build, as RX_PGO already did.
  • What does not change: packs without the switch; the game players build.
  • How it was checked: three new cases in tests/test_vk_pgo.py's pack_route table: the first fails on main, all pass here; a Tracy pack built this way recorded captures in the game on my lab PC.
  • What is still open: nothing.
  • Risk: low: a Tracy pack now always takes the game build's time.

Why

LONGSHOT_TRACY=1 dev_packs.py pack <base> tracy of a tree with no change (to profile main itself) said there was nothing to build, and a renderer-only change built the renderer alone. Either way the pack's game had no Tracy client, and tracy-capture waited for a connection that never came.

How to reproduce

Seen on: Linux, any GPU
Settings and switches: LONGSHOT_TRACY=1
Steps: LONGSHOT_TRACY=1 python -I scripts/dev_packs.py pack <base> tracy from a checkout at the base's commit, then run it with tracy-capture -a 127.0.0.1
Expected: a pack with the Tracy client; the capture fills
Actual: "nothing to build" (or a renderer-only pack); the capture records nothing

What changed

pack_route routes a LONGSHOT_TRACY pack to the game.

  • dev: pack_route in scripts/dev_packs.py: LONGSHOT_TRACY (set, not "" or 0) returns "game", beside RX_PGO.
  • tests: tests/test_vk_pgo.py: three cases in the pack_route table (an unchanged tree, a renderer-only tree, and LONGSHOT_TRACY=0 staying off).

Measurements

Verdict: nothing to measure: a development script and its check.

Flags and settings

None.

Testing

Tested: tests/test_vk_pgo.py on Linux: fails on main (FAIL: pack_route: a Tracy pack of an unchanged tree builds the game), passes here. With the fix, LONGSHOT_TRACY=1 dev_packs.py pack of an unchanged tree built the game, and Tracy captures of Kokiri Forest recorded the game's and the renderer's zones (Linux, RX 580, Mesa RADV 26.2.6). tests/run_all.py --changed also passes, apart from test_dev_packs.py ("a game patch shows in the objects") and test_switch_table.py, which fail the same way on main on that PC.

Not tested: Windows (the routing is the same Python on both).

Must be tested: None.

Risks

What could break: nothing outside dev_packs.py pack with LONGSHOT_TRACY set.

Turning it off: revert the commit.

Compatibility: Nothing changes.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why.
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened.

🤖 Generated with Claude Code

https://claude.ai/code/session_016o1k1NeAdSovkHa9ukS7YM

**Type:** fix · **Risk:** low · **Tested on:** Linux (a development script, no GPU involved) · **Needs:** none ## TL;DR Building a test pack with the Tracy profiler turned on (`LONGSHOT_TRACY=1`) gave a pack with no profiler in it whenever the change touched only the renderer, or nothing at all, so a capture recorded nothing. Packs with the profiler on now always build the game, where the profiler's client lives. A new check fails on `main` and passes here. ## Breakdown - **Who it helps:** developers who profile with Tracy against a base (`dev_packs.py pack`). - **What was wrong:** `pack_route` sent a `LONGSHOT_TRACY=1` pack of an unchanged or renderer-only tree to the renderer-only build, or to no build, but Tracy's client is in the game's executable. - **What changes:** `LONGSHOT_TRACY` set (and not `0`) routes the pack to the game build, as `RX_PGO` already did. - **What does not change:** packs without the switch; the game players build. - **How it was checked:** three new cases in `tests/test_vk_pgo.py`'s `pack_route` table: the first fails on `main`, all pass here; a Tracy pack built this way recorded captures in the game on my lab PC. - **What is still open:** nothing. - **Risk:** low: a Tracy pack now always takes the game build's time. ## Why `LONGSHOT_TRACY=1 dev_packs.py pack <base> tracy` of a tree with no change (to profile `main` itself) said there was nothing to build, and a renderer-only change built the renderer alone. Either way the pack's game had no Tracy client, and `tracy-capture` waited for a connection that never came. ## How to reproduce **Seen on:** Linux, any GPU **Settings and switches:** `LONGSHOT_TRACY=1` **Steps:** `LONGSHOT_TRACY=1 python -I scripts/dev_packs.py pack <base> tracy` from a checkout at the base's commit, then run it with `tracy-capture -a 127.0.0.1` **Expected:** a pack with the Tracy client; the capture fills **Actual:** "nothing to build" (or a renderer-only pack); the capture records nothing ## What changed `pack_route` routes a `LONGSHOT_TRACY` pack to the game. - dev: `pack_route` in `scripts/dev_packs.py`: `LONGSHOT_TRACY` (set, not `""` or `0`) returns `"game"`, beside `RX_PGO`. - tests: `tests/test_vk_pgo.py`: three cases in the `pack_route` table (an unchanged tree, a renderer-only tree, and `LONGSHOT_TRACY=0` staying off). ## Measurements **Verdict:** nothing to measure: a development script and its check. ### Flags and settings None. ## Testing **Tested:** `tests/test_vk_pgo.py` on Linux: fails on `main` (`FAIL: pack_route: a Tracy pack of an unchanged tree builds the game`), passes here. With the fix, `LONGSHOT_TRACY=1 dev_packs.py pack` of an unchanged tree built the game, and Tracy captures of Kokiri Forest recorded the game's and the renderer's zones (Linux, RX 580, Mesa RADV 26.2.6). `tests/run_all.py --changed` also passes, apart from `test_dev_packs.py` ("a game patch shows in the objects") and `test_switch_table.py`, which fail the same way on `main` on that PC. **Not tested:** Windows (the routing is the same Python on both). **Must be tested:** None. ## Risks **What could break:** nothing outside `dev_packs.py pack` with `LONGSHOT_TRACY` set. **Turning it off:** revert the commit. **Compatibility:** Nothing changes. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016o1k1NeAdSovkHa9ukS7YM
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1NeAdSovkHa9ukS7YM
fix(dev): a Tracy pack builds the game, also from an unchanged tree
Some checks failed
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 12s
CI / Workflow lint (actionlint) (pull_request) Successful in 12s
Third-party parts / As their notes say (pull_request) Successful in 12s
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 3s
a8190fb1cb
LONGSHOT_TRACY=1 puts the Tracy client in the game's executable, but
pack_route sent an unchanged tree (or a renderer-only one) to the
renderer path, or to nothing at all, so the pack had no Tracy in it and
a capture recorded nothing. It now routes LONGSHOT_TRACY to the game,
as RX_PGO already did; LONGSHOT_TRACY=0 is off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1NeAdSovkHa9ukS7YM
HumanBean changed title from WIP: fix(dev): a Tracy pack builds the game, also from an unchanged tree to fix(dev): a Tracy pack builds the game, also from an unchanged tree 2026-11-19 14:06:23 +00:00
Author
Owner

Checklist: ticked the box for the updated check under tests/ (test_vk_pgo.py reads scripts/dev_packs.py).

Checklist: ticked the box for the updated check under tests/ (test_vk_pgo.py reads scripts/dev_packs.py).
HumanBean deleted branch fix/tracy-pack-route 2026-11-19 15:16:20 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
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.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1741
No description provided.