WIP: fix(tests): three renderer checks build and run on main again #2037
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2037
Loading…
Reference in a new issue
No description provided.
Delete branch "siantm/Longshot:fix/tests-renderer-fixtures-build"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Three game-free renderer checks fail on
mainbefore they run a single case: each cuts renderer functions out of thesource by their text, and the source moved on under them. #759 and #1995 change these checks (#1995 adds cases to the
uniform one), and their changes cannot run either. This brings each back to running its cases against the code as it
is on
main@fd7dc40d, one commit per check; nothing outsidetests/changes.tests/test_fsr_image_retirement.py(FSR images kept until the GPU is past their last use):submit_recordingendseach recording with
host_read_barrier(r.cmd)since905e36a9(#1031), which the check did not cut, so its fixturestopped at "use of undeclared identifier 'host_read_barrier'". The check now cuts
host_read_barrierwith the rest ofthe submission code, and the fixture gives it
vkCmdPipelineBarrier2(no GPU). No case or assertion changes.tests/test_fsr_uniform_ownership.py(FSR constants stay owned by their recording): the recording code it cuts gainedcalls its fixture did not provide:
recording_wait'sFpsRtWait(c64e864f, #928),begin_recording'stexture_complete_writes(7daafa7a, #1553),draw_begin_recording'spool_shift_first,make_pool(shift)andpools_grown(382a3d67, #1158) andmesh_conv_begin_recording(9027e737, #1846): ten compile errors. The check nowcuts
pool_shift_firsttoo; the fixture'smake_pooltakes the shift,pools_grownis counted, and the FPS counter'stimer, the texture writes' completion and the mesh draws' conversion stand empty (none of them here). No case or
assertion changes.
tests/test_draw_stream_visibility.py(the draw streams' bytes are flushed before the GPU reads them): it cut theparallel replay's segment submit out of
vk_replay.cpp(fromif (j->inits < 0) init_lost = true;to the device-lostcheck), and
a3565ac5(#1763) deleted the segment workers and that loop with them: "substring not found", beforeanything compiled. Dropped: the cases
segmentsandfailed-segment, which ran that loop: the code they tested isgone in
a3565ac5(no segment worker records a slot, no segment submit orders them, no init command buffer whose failurestops the submits after it). Every recording is now submitted by
submit_recording, which the seven other cases run;the fixture's harness for the loop (
Job,submit_segments, the init command buffer, the submitted-slot bookkeeping)goes with the two cases. The rest builds against
main:host_read_barrierandpool_shift_firstare cut from thesource,
make_pool,pools_grownandmesh_conv_begin_recordingas in the uniform check. The other cases and theirassertions are unchanged.
How to see it on
main: with the Vulkan headers found (RX_CPMpointing at the CPM cache, orLONGSHOT_VULKAN_HEADERS),python -I -B tests/run_all.py --strict --exact tests/test_fsr_image_retirement.py(and thesame for the other two) fails with the errors above. Without the headers,
--strictfails each with "not found:vulkan_headers" and nothing is compiled.
Read first: the three
tests/test_*.pydrivers and their fixtures (tests/fsr_image_retirement_test.cpp,tests/fsr_uniform_ownership_test.cpp,tests/draw_stream_visibility_test.cpp).Testing
Tested: Windows 11 (10.0.26300), llvm-mingw clang 23.1.5, the Vulkan headers 1.4.345 from the CPM cache (
RX_CPM);game-free checks only: nothing here runs in the game, so there was nothing to run in it. Each check ran alone
(
python -I -B tests/run_all.py --strict --exact tests/<check>.py), in a hidden console of its own, in a build job ofthis PC's job queue (fb3-fix-3), on
main@e6196f0fand on this branch @ 7354e49d:maineach fails as the Summary says: the uniform check with its ten compile errors, the retirement check withhost_read_barrierundeclared, the draw check with "substring not found" before compiling.a non-coherent cache for both backends, the draw check's 7 cases with both caches.
(not committed):
vk_fsr3.cppfree_deadfreeing a retired image one timeline value early (now + 1 >= ...): the retirement checkfails at
resumed, "view destroyed while GPU use is pending".vk_draw.cppuniform_uploadhanding back the stream's start instead of its slice (cur->mappedforcur->mapped + at): the uniform check fails atqueued, "GPU must see this evaluation's authored constants".vk_draw.cppdraw_flush_recordingflushing only the stream in use, not the ones the recording outgrew: the drawcheck fails at
growwith the non-coherent cache, "GPU draw input must see the CPU-authored bytes".python -I -B tests/run_all.py --strict --changed origin/main(the three checks read the changed files, and thebyte-compile of the tracked Python): 4 passed.
The same results came earlier on
main@40bfceb0(fb3-fix-1 onmain; fb3-fix-2 on these commits there, @ 30589ebe,with the same scratch breaks). Then rebased onto
main@fd7dc40dwithout a conflict, the three commits unchanged(
git range-diff), now98f1ad99; the checks have not run again on that base: its three new commits (#2007, #2017,#1657) change none of the text these checks cut, and the C++ each check writes is byte-for-byte the same as at 7354e49d
(written out without compiling, and compared). Not run: the whole
mise run test.Still to test:
python3 -I -B tests/run_all.py --strict --exactwith each of the three checks, expecting each to pass, as onWindows (by hand, or CI's run)
Measurements
Nothing to measure: only three game-free checks under
tests/change; nothing the game runs.Risks
Nothing a player notices: only
tests/changes, and nothing the game runs. The three checks now run their cases whereCI runs them; if the renderer reshapes the functions they cut again, they stop with
tests/srccut.py's message namingthe marker, or a compile error. A revert gives back
main's three failing checks.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.Possibly related, for context:
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.