test(vk): the texture-staging fixture defines logf_at and LogLevel, which the cut code now calls #195

Open
d4nkn3ss wants to merge 1 commit from d4nkn3ss/Longshot:fix/test-texture-staging-log-levels into main
Contributor

Why

tests/test_texture_staging_publication.py fails on main on Windows since e51e28e9 (debug and trace log lines): its fixture no longer compiles, so the check that texture staging slices are published before the GPU reads them isn't running.

What changed

  • tests: tests/texture_staging_publication_test.cpp gains gpu/vk/vk_internal.h's LogLevel and an empty logf_at, beside its logf. e51e28e9 moved some of vk_memory.cpp's lines to logf_at(log_debug, ...), and the fixture compiles those functions with its own stand-ins: without them, error: use of undeclared identifier 'log_debug'.

Flags and settings

None

Measurements

main: e51e28e9 (2026-11-13)
this PR: fix/test-texture-staging-log-levels @ a8dadc92
Hardware: Windows 11, llvm-mingw clang 23 (the Longshot Builder's), Python 3.12
Scene: n/a (game-free)
Method: python -I -B tests/run_all.py texture_staging_publication on both sides
How to reproduce: the command above, with clang++ on PATH

main @ e51e28e9 this PR @ a8dadc92
tests/test_texture_staging_publication.py FAIL: fixture.cpp:146:51: error: use of undeclared identifier 'log_debug' pass

Testing

Tested: the row above on Windows 11.

Full suite: python -I -B tests/run_all.py on this branch @ a8dadc92, Windows 11: 486 passed, 3 failed, 33 skipped: tests/test_check_third_party.py (#80), tests/test_display_pointer.py (#187) and tests/test_release.py (#119, #144, #145), all failing on main the same way.

Not tested: Linux (not run here). The fixture's change is the same on every OS; why e51e28e9's Linux run didn't show this failure I don't know (its description doesn't list its skips).

Needs other testers: None

Screenshots

Nothing on screen

Risk and rollback

Test-only; reverting the commit is enough.

Issues

None

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run and passing (any failure that also fails on main is named above).
  • Tested in the game, or what wasn't is named under Testing. (Test-only change: nothing in the game.)
  • Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests).
  • Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. (A test result: the same on every run.)
  • 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.

If applicable

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A check under tests/ that reads changed source updated in this PR, not weakened.

🤖 Generated with Claude Code

## Why `tests/test_texture_staging_publication.py` fails on `main` on Windows since e51e28e9 (debug and trace log lines): its fixture no longer compiles, so the check that texture staging slices are published before the GPU reads them isn't running. ## What changed - tests: `tests/texture_staging_publication_test.cpp` gains `gpu/vk/vk_internal.h`'s `LogLevel` and an empty `logf_at`, beside its `logf`. e51e28e9 moved some of `vk_memory.cpp`'s lines to `logf_at(log_debug, ...)`, and the fixture compiles those functions with its own stand-ins: without them, `error: use of undeclared identifier 'log_debug'`. ## Flags and settings None ## Measurements main: e51e28e9 (2026-11-13) this PR: fix/test-texture-staging-log-levels @ a8dadc92 Hardware: Windows 11, llvm-mingw clang 23 (the Longshot Builder's), Python 3.12 Scene: n/a (game-free) Method: `python -I -B tests/run_all.py texture_staging_publication` on both sides How to reproduce: the command above, with clang++ on PATH | | main @ e51e28e9 | this PR @ a8dadc92 | |---|---|---| | `tests/test_texture_staging_publication.py` | FAIL: `fixture.cpp:146:51: error: use of undeclared identifier 'log_debug'` | pass | ## Testing **Tested:** the row above on Windows 11. **Full suite:** `python -I -B tests/run_all.py` on this branch @ a8dadc92, Windows 11: 486 passed, 3 failed, 33 skipped: `tests/test_check_third_party.py` (#80), `tests/test_display_pointer.py` (#187) and `tests/test_release.py` (#119, #144, #145), all failing on `main` the same way. **Not tested:** Linux (not run here). The fixture's change is the same on every OS; why e51e28e9's Linux run didn't show this failure I don't know (its description doesn't list its skips). **Needs other testers:** None ## Screenshots Nothing on screen ## Risk and rollback Test-only; reverting the commit is enough. ## Issues None ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named above). - [x] Tested in the game, or what wasn't is named under Testing. (Test-only change: nothing in the game.) - [x] Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests). - [x] Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. (A test result: the same on every run.) - [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. ### If applicable - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
test(vk): the texture-staging fixture defines logf_at and LogLevel, which the cut code now calls (e51e28e9)
Some checks are pending
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
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
PR description / Description follows the template (pull_request_target) Successful in 7s
a8dadc9232
e51e28e9 (debug and trace log lines) moved some of vk_memory.cpp's lines to logf_at(log_debug, ...).
tests/texture_staging_publication_test.cpp compiles those functions with its own logf only, so the fixture stopped
compiling on Windows: "use of undeclared identifier 'log_debug'". It now has vk_internal.h's LogLevel and a logf_at.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Contributor

Duplicate of #202 (dyst), the same two-line fixture fix for log_debug/logf_at. #202 was also run on Linux, so it's the more complete one: please take #202 and close this. (My fault: I opened this between room posts without claiming it there first.)

Duplicate of #202 (dyst), the same two-line fixture fix for log_debug/logf_at. #202 was also run on Linux, so it's the more complete one: please take #202 and close this. (My fault: I opened this between room posts without claiming it there first.)
HumanBean left a comment

This duplicates #202, which makes the same change, so keep #202 and close this one.

All three PRs (#195, #202 and #215) add the same LogLevel enum and logf_at stub, and all match gpu/vk/vk_internal.h:36-37 exactly, so this code is correct too. 202 is the one to keep because it has the most thorough testing (Windows and Linux, plain and sanitized) and a description that names the call site correctly (staging() in gpu/vk/vk_texture.cpp).

(One detail if this is kept anyway: the description says the logf_at(log_debug, ...) lines are in vk_memory.cpp. The call the check cuts is in gpu/vk/vk_texture.cpp, in staging().)

This duplicates https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/202, which makes the same change, so keep https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/202 and close this one. All three PRs (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/195, https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/202 and https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/215) add the same `LogLevel` enum and `logf_at` stub, and all match `gpu/vk/vk_internal.h:36-37` exactly, so this code is correct too. 202 is the one to keep because it has the most thorough testing (Windows and Linux, plain and sanitized) and a description that names the call site correctly (`staging()` in `gpu/vk/vk_texture.cpp`). (One detail if this is kept anyway: the description says the `logf_at(log_debug, ...)` lines are in `vk_memory.cpp`. The call the check cuts is in `gpu/vk/vk_texture.cpp`, in `staging()`.)
Some checks are pending
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
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
PR description / Description follows the template (pull_request_target) Successful in 7s
This pull request has changes conflicting with the target branch.
  • tests/texture_staging_publication_test.cpp
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/test-texture-staging-log-levels:d4nkn3ss-fix/test-texture-staging-log-levels'
git switch 'd4nkn3ss-fix/test-texture-staging-log-levels'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!195
No description provided.