test(vk): the env_on and late readback checks match the render thread's source #622

Open
zeldaootr wants to merge 1 commit from zeldaootr/Longshot:fix-stand-ins-after-render-thread into main
Contributor

Type: test · Risk: low · Tested on: Linux, no GPU (game-free checks, g++ 13.3 and clang 23.1.5) · Needs: none

Why

Two game-free checks have failed on main since the render thread merged (#588), and still fail on main @ aa95d35f, so main is red for everyone before a release candidate. The renderer is right in both; the checks read its source by text and no longer match it. No issue was open for them; none of the open pull requests or claims in the team chat covers them. (A third, test_vram_budget_row, was repaired here too until main removed that check with the VRAM budget row in #735, so it has left this PR.)

How to reproduce

Seen on: Linux (Ubuntu 24.04), no GPU; g++ 13.3 and clang 23.1.5
Settings and switches: none; LONGSHOT_VULKAN_HEADERS set for the runner
Steps: on main aa95d35f, run python -I -B tests/run_all.py test_env_on test_readback_late
Expected: both pass, as they did on 546dc212, the commit before #588
Actual: both fail: test_env_on names RX_VK_PRESENT_AFTER_SIGNAL (gpu/vk/vk_replay.cpp:5788) as read set-means-on; test_readback_late says the readbacks are noted by range without RX_VK_LOG_READBACK_RANGES

What changed

Test-only: each check is brought in line with the source #588 merged, and neither is made looser than the rule it states. No product file changes.

  • tests/test_env_on.py: a line that also asks env_on(name) reads the switch's value, as a line with a second getenv(name) already did. #588 reads RX_VK_PRESENT_AFTER_SIGNAL as getenv(x) ? env_on(x) : gate_on(), where 0 is off. A plain getenv(x) ? true : ... on that line still fails the check (tried).
  • tests/test_readback_late.py: invalidate's by-range notes are a braced block since #588 (rb_range_note and the new rb_range_age); the check matches if (log_ranges) { and asks for both calls inside it.

Measurements

Verdict: passes: both checks fail on main and pass on this branch, with g++ and with clang, in two interleaved rounds.

Hardware: Linux (Ubuntu 24.04, kernel 6.8), x86-64, no GPU used; g++ 13.3.0, clang 23.1.5 (llvm-mingw's, --target=x86_64-linux-gnu), Python 3.15
Scene: no game: the game-free checks
Method: each check run alone with --cxx g++ and with clang, round 1 on main then this branch, round 2 the same again; failed runs counted per round (4 runs a round)
How to reproduce: python -I -B tests/test_env_on.py --cxx g++ (and test_readback_late.py; again with --cxx clang++) on each commit

Before: main @ aa95d35f After: this PR @ e5da29cb
Failed runs of 4, round 1 / round 2 4 / 4 0 / 0
r1 main@aa95d35f test_env_on g++ |   RX_VK_PRESENT_AFTER_SIGNAL (gpu/vk/vk_replay.cpp:5788)
r1 main@aa95d35f test_readback_late g++ | the readbacks are noted by range without RX_VK_LOG_READBACK_RANGES
r1 e5da29cb test_env_on g++ | PASS: env_on's rule in C, C++ and Python (17 values); no on/off switch read the old way
r1 e5da29cb test_readback_late g++ | PASS: RX_VK_READBACK_LATE's rules
(clang, and round 2: the same results each side)

Flags and settings

None

Testing

Tested: on Linux, both checks with g++ and clang, failing on main aa95d35f and passing here in two interleaved rounds; both pass at 546dc212 and fail at 82886e89 (#588's merge), which is what turned them red. test_env_on was also run against a planted getenv("RX_VK_PRESENT_AFTER_SIGNAL") ? true : gate_on(), which it still reports. The full suite (python -I -B tests/run_all.py, Linux, g++, LONGSHOT_VULKAN_HEADERS set) ran once on main aa95d35f with this PR and the other open fixes from the same sweep merged locally (ac6a1e97, not pushed): 550 passed, 5 failed, 51 skipped. All five fail on clean main aa95d35f too: tests/test_make_game_cache.py, tests/test_crash_dialog.py (its repair, #626, needs one more line since #729), tests/test_options_budget_once.py, tests/test_mods_size_table.py and tests/test_walk_key.py.

Not tested: Windows: the change is to the checks' Python, the same on both systems. No game run: no product code changes.

Must be tested: None

Risks

What could break: only these two checks; a check that now passes something it should not. The rules kept are the ones each states.

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).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main. Onto main 94abdd57 (head d453f528) with no conflict, with the commit subjects made Conventional Commits, which CI's lint job now checks for every commit, on a base that has CI's config (#417); each commit's change is the same as before by git patch-id. The commits named in this description are from before this rebase: e5da29cb is now d453f528. Re-run on 94abdd57: test_env_on and test_readback_late fail on main 94abdd57 and pass here, with g++ 13.3 and clang 23.1.5.
  • 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.
  • Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
**Type:** test · **Risk:** low · **Tested on:** Linux, no GPU (game-free checks, g++ 13.3 and clang 23.1.5) · **Needs:** none ## Why Two game-free checks have failed on `main` since the render thread merged (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/588), and still fail on `main` @ aa95d35f, so `main` is red for everyone before a release candidate. The renderer is right in both; the checks read its source by text and no longer match it. No issue was open for them; none of the open pull requests or claims in the team chat covers them. (A third, `test_vram_budget_row`, was repaired here too until `main` removed that check with the VRAM budget row in https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/735, so it has left this PR.) ## How to reproduce **Seen on:** Linux (Ubuntu 24.04), no GPU; g++ 13.3 and clang 23.1.5 **Settings and switches:** none; `LONGSHOT_VULKAN_HEADERS` set for the runner **Steps:** on `main` aa95d35f, run `python -I -B tests/run_all.py test_env_on test_readback_late` **Expected:** both pass, as they did on 546dc212, the commit before #588 **Actual:** both fail: `test_env_on` names `RX_VK_PRESENT_AFTER_SIGNAL (gpu/vk/vk_replay.cpp:5788)` as read set-means-on; `test_readback_late` says `the readbacks are noted by range without RX_VK_LOG_READBACK_RANGES` ## What changed Test-only: each check is brought in line with the source #588 merged, and neither is made looser than the rule it states. No product file changes. - `tests/test_env_on.py`: a line that also asks `env_on(name)` reads the switch's value, as a line with a second `getenv(name)` already did. #588 reads `RX_VK_PRESENT_AFTER_SIGNAL` as `getenv(x) ? env_on(x) : gate_on()`, where 0 is off. A plain `getenv(x) ? true : ...` on that line still fails the check (tried). - `tests/test_readback_late.py`: `invalidate`'s by-range notes are a braced block since #588 (`rb_range_note` and the new `rb_range_age`); the check matches `if (log_ranges) {` and asks for both calls inside it. ## Measurements **Verdict:** passes: both checks fail on `main` and pass on this branch, with g++ and with clang, in two interleaved rounds. Hardware: Linux (Ubuntu 24.04, kernel 6.8), x86-64, no GPU used; g++ 13.3.0, clang 23.1.5 (llvm-mingw's, `--target=x86_64-linux-gnu`), Python 3.15 Scene: no game: the game-free checks Method: each check run alone with `--cxx g++` and with clang, round 1 on main then this branch, round 2 the same again; failed runs counted per round (4 runs a round) How to reproduce: `python -I -B tests/test_env_on.py --cxx g++` (and `test_readback_late.py`; again with `--cxx clang++`) on each commit | | Before: main @ aa95d35f | After: this PR @ e5da29cb | |---|---|---| | Failed runs of 4, round 1 / round 2 | 4 / 4 | 0 / 0 | ``` r1 main@aa95d35f test_env_on g++ | RX_VK_PRESENT_AFTER_SIGNAL (gpu/vk/vk_replay.cpp:5788) r1 main@aa95d35f test_readback_late g++ | the readbacks are noted by range without RX_VK_LOG_READBACK_RANGES r1 e5da29cb test_env_on g++ | PASS: env_on's rule in C, C++ and Python (17 values); no on/off switch read the old way r1 e5da29cb test_readback_late g++ | PASS: RX_VK_READBACK_LATE's rules (clang, and round 2: the same results each side) ``` ### Flags and settings None ## Testing **Tested:** on Linux, both checks with g++ and clang, failing on main aa95d35f and passing here in two interleaved rounds; both pass at 546dc212 and fail at 82886e89 (#588's merge), which is what turned them red. `test_env_on` was also run against a planted `getenv("RX_VK_PRESENT_AFTER_SIGNAL") ? true : gate_on()`, which it still reports. The full suite (`python -I -B tests/run_all.py`, Linux, g++, `LONGSHOT_VULKAN_HEADERS` set) ran once on `main` aa95d35f with this PR and the other open fixes from the same sweep merged locally (ac6a1e97, not pushed): 550 passed, 5 failed, 51 skipped. All five fail on clean `main` aa95d35f too: `tests/test_make_game_cache.py`, `tests/test_crash_dialog.py` (its repair, https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/626, needs one more line since https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/729), `tests/test_options_budget_once.py`, `tests/test_mods_size_table.py` and `tests/test_walk_key.py`. **Not tested:** Windows: the change is to the checks' Python, the same on both systems. No game run: no product code changes. **Must be tested:** None ## Risks **What could break:** only these two checks; a check that now passes something it should not. The rules kept are the ones each states. **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] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. Onto main 94abdd57 (head d453f528) with no conflict, with the commit subjects made Conventional Commits, which CI's lint job now checks for every commit, on a base that has CI's config (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/417); each commit's change is the same as before by `git patch-id`. The commits named in this description are from before this rebase: e5da29cb is now d453f528. Re-run on 94abdd57: `test_env_on` and `test_readback_late` fail on main 94abdd57 and pass here, with g++ 13.3 and clang 23.1.5. - [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] Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
fix three checks' stand-ins for the render thread's source
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 3s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
7092582f34
Assisted-by: Claude

#588 made `RX_VK_PRESENT_AFTER_SIGNAL` read through `env_on` behind a getenv, braced the `log_ranges` notes in `invalidate`, and put `RX_VK_ASYNC` in a comment in `Options`, which the VRAM budget fixture's bare `SYNC` placeholder matched. `test_env_on` counts an `env_on` on the same line as a value read, `test_readback_late` matches the braced block (with `rb_range_age` in it), `test_vram_budget_row` uses `@KEY@` markers.
Author
Contributor

Rebased onto main aa95d35f (e5da29cb): #735 deleted tests/test_vram_budget_row.py, so its repair left this PR, which now fixes the two checks still red on main, test_env_on and test_readback_late.
Both still fail on clean main aa95d35f and pass here, with g++ and clang, two interleaved rounds; title to update to "test(vk): the env_on and late readback checks match the render thread's source".

Rebased onto `main` aa95d35f (e5da29cb): #735 deleted `tests/test_vram_budget_row.py`, so its repair left this PR, which now fixes the two checks still red on `main`, `test_env_on` and `test_readback_late`. Both still fail on clean `main` aa95d35f and pass here, with g++ and clang, two interleaved rounds; title to update to "test(vk): the env_on and late readback checks match the render thread's source".
zeldaootr force-pushed fix-stand-ins-after-render-thread from 7092582f34
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 3s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to e5da29cbcb
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 3s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
2026-11-15 13:32:21 +00:00
Compare
zeldaootr changed title from test(vk): the env_on, VRAM budget row and late readback checks match the render thread's source to test(vk): the env_on and late readback checks match the render thread's source 2026-11-15 13:32:25 +00:00
zeldaootr force-pushed fix-stand-ins-after-render-thread from e5da29cbcb
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 3s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
to d453f528f5
Some checks are pending
PR description / Description follows the template (pull_request_target) Waiting to run
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
2026-11-15 19:15:20 +00:00
Compare
Author
Contributor

Rebased onto main 94abdd57 (head d453f528), with no conflict; the commit subjects are now Conventional Commits, which CircleCI's lint job checks for every commit of a pull request (#417), and the base has the CI's config, which a fork's pull request needs at its own head. No other change: each commit's change is the same as before by git patch-id.
Re-run on 94abdd57: test_env_on and test_readback_late fail on main 94abdd57 and pass here, with g++ 13.3 and clang 23.1.5. The description names the new commits.

Rebased onto `main` 94abdd57 (head d453f528), with no conflict; the commit subjects are now Conventional Commits, which CircleCI's lint job checks for every commit of a pull request (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/417), and the base has the CI's config, which a fork's pull request needs at its own head. No other change: each commit's change is the same as before by `git patch-id`. Re-run on 94abdd57: `test_env_on` and `test_readback_late` fail on main 94abdd57 and pass here, with g++ 13.3 and clang 23.1.5. The description names the new commits.
Some checks are pending
PR description / Description follows the template (pull_request_target) Waiting to run
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
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 'fix-stand-ins-after-render-thread:zeldaootr-fix-stand-ins-after-render-thread'
git switch 'zeldaootr-fix-stand-ins-after-render-thread'
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!622
No description provided.