test(vk): five checks read the replay as the thread rewrite left it #1864
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!1864
Loading…
Reference in a new issue
No description provided.
Delete branch "zeldaootr/Longshot:checks-after-thread-rewrite"
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
Five game-free checks have failed on
mainsince the renderer's threads were rewritten(#1763): each cuts renderer source by its text, and the rewrite
reshaped that source. This brings each back to checking its rule against the code as it is now. No check is loosened,
and nothing outside
tests/changes.tests/test_split_before_draw.py: the parallel replay's dry and worker modes are gone, so replay()'s guard before aplain draw is
if (part_end_wanted && ...without!dry && !worker &&. The check looks for that guard; it stillfails if a mesh draw or a dispatch can end a part.
tests/test_early_split_before_draw.py: the end after a readback's writer is guarded byif (early) {alone now.The check cuts that block and runs it as before; the fixture's unused
dry/workerstand-ins are gone.tests/test_hold_gpu.py:wait()is now a wrapper that times the wait forRX_VK_GPU_TIMELINEand hands it towait_inner, which holds the old body. The check cutswait_innerfor the waiter's count and also checks thatwait()hands every wait towait_innerand counts no waiter itself.tests/test_readback_early.py: the uniform update's guard lost!dry; and the rewrite started cuttingvk_memory.cpp's part counters (with the newrec_part()) into the fixture, which still definedmem_rec_part/mem_in_place_partitself, so the fixture no longer compiled. The guard is matched as it is, and thecounters now come from the source alone.
tests/test_readback_late.py:RX_VK_READBACK_LATEunset now also reads the newest submission's ranges late on ahandheld (
device_policy.hreadback_late_newest), as its row ingpu/vk/switches.defsays. The check looks forboth parts of the unset branch and runs its cases on a handheld and on any other PC.
Read first: the five test files;
gpu/vk/vk_replay.cppreplay(),wait()/wait_inner(),readback_late_wanted().Testing
Tested: Linux, game-free only (nothing here runs in the game). Each of the five passes on this branch and fails on
main. Each was also run against a scratch copy of the source with the rule broken, and fails:part_end_wantedtest dropped.early_splitending the part at once even where parts end only before a plain draw (fails on Intel);the
RX_VK_READBACK_EARLY_GAPtest dropped ("a writer before the gap's 16 draws ends its part at the 16th").wait()taking apath that skips
wait_inner.rec_part()returning 0 (the fixture's part checksfail).
newestadded even when the switch is set (=0on a handheld reads late); thedefault size left out on a handheld.
python -I -B tests/run_all.pyon this branch and onmain(89c3d21ea) on the same PC:main784 passed, 69 failed;this branch 788 passed, 65 failed. The five above pass here and no check that passes on
mainfails here. The other 64fail on both and need what this PC lacks (tools, packages, Windows-only parts).
tests/test_recording_admission.pyfailed in this branch's full run once and is flaky on
maintoo (1 of 8 runs alone failed onmain, 2 of 6 here); thischange touches nothing it reads.
Still to test: None.
Measurements
Nothing to measure: a change to the checks only.
Risks
None for players: only
tests/changes. Overlaps#949 in
tests/test_split_before_draw.pyandtests/test_hold_gpu.py, in different lines (that pull replaces their ownblockwithsrccut's; this one edits thechecks' bodies), so the two merge without a conflict.
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.tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.The render thread rewrite removed replay()'s dry and worker modes, so the end after a readback's writer is now guarded by `if (early) {` alone. The check cuts that block and runs it with the part's end before a plain draw, maybe_split, split_part and early_split as before; the fixture's unused `dry` and `worker` stand-ins are gone with it. Assisted-by: ClaudeWIP: test(vk): five checks read the replay as the thread rewrite left itto test(vk): five checks read the replay as the thread rewrite left itPossibly related, for context: