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@9dd41326, 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.
Also here, the harness repair
b63bb5b1from #1956, cherry-picked unchanged (same patch and message; here7a18881f), withwhich two scheduler checks build too:
tests/test_vcore_escape.pyhas declaredhos_fps_timingtwice since #1323(
39da4155), whosestatic volatile int hos_fps_timing;meets #1553'sstatic int escapes_logged, hos_fps_timing;, andtests/test_vcore_mask0.pyhas not compiled since #327 (a104182b) added it:hos_thread.c's virtual-core block callsenv_on_or(since #980,9bfc99ee), and the fixture did not includegpu/vk/compat/longshot_env.has the escapefixture does. One declaration is left, and the header is included; nothing else in either test changes. The same
commit is carried by #1956, #1972, #1974 and #2020: whichever lands first takes it, and the others drop it on their
rebase without a conflict. Its message speaks of "the scheduler code this PR changes" (#1956's); here nothing outside
tests/changes.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 four) fails with the errors above. Without the headers,
--strictfails each renderer check with"not found: vulkan_headers" and nothing is compiled (the two vcore checks need no headers).
Read first: the three renderer
tests/test_*.pydrivers and their fixtures (tests/fsr_image_retirement_test.cpp,tests/fsr_uniform_ownership_test.cpp,tests/draw_stream_visibility_test.cpp); 7a18881f's two lines in the vcorechecks.
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. In a hidden console of its own,
in a job of this PC's job queue (fb2-2037-1), on this branch @
7a18881f(onmain@9dd41326) and onmain@9dd41326:python -I -B tests/run_all.py --strict --exact --jobs 2 --timeout 1200withtest_fsr_uniform_ownership.py,test_fsr_image_retirement.py,test_draw_stream_visibility.py,test_vcore_escape.pyandtest_vcore_mask0.py:main: 5 failed, each before running a case: the uniform check with its ten compile errors, the retirement checkwith
host_read_barrierundeclared, the draw check with "substring not found", the escape check with "redefinitionof 'hos_fps_timing' with a different type", the mask-0 check with "use of undeclared identifier 'env_on_or'".
Earlier, before the harness repair was added, each renderer check ran alone (
python -I -B tests/run_all.py --strict --exact tests/<check>.py), in a build job of this PC's job queue (fb3-fix-3), onmain@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@fd7dc40d(98f1ad99) and now ontomain@9dd41326, withouta conflict, the three commits unchanged (
git range-diff). Not run: the wholemise run test.Still to test:
python3 -I -B tests/run_all.py --strict --exactwith each of the five checks, expecting each to pass, as onWindows (by hand, or CI's run)
Measurements
Nothing to measure: only five game-free checks under
tests/change; nothing the game runs.Risks
Nothing a player notices: only
tests/changes, and nothing the game runs. The five checks now run their cases whereCI runs them; if the code they cut is reshaped again, they stop with the cutter's message naming the marker, or a
compile error. A revert gives back
main's five 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:
98f1ad99447a18881f96Rebased onto
main@9dd41326(the three commits unchanged) and added7a18881f: the harness repairb63bb5b1from #1956, cherry-picked unchanged, sotests/test_vcore_escape.pyandtests/test_vcore_mask0.pycompile again too (the same commit is in #1956, #1972, #1974 and #2020; whichever lands first takes it). The five checks pass at7a18881fand all five fail onmain@9dd41326, as Testing says.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.