chore(build): RX_SOFT_WRITE_WATCH and LONGSHOT_OCCLUSION_OFF removed: the soft write watch and the game's occlusion queries, as by default #573
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
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
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!573
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:chore/remove-two-switches"
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?
Why
Two build/run switches were left over from past measurements and experiments, and the owner's sweep of build switches (2026-11-14: sensible defaults, no knobs) removes them. Nothing changes for players: both already did nothing unless set, and their default is now the only behaviour.
What changed
RX_SOFT_WRITE_WATCHis gone fromnx2/build.py.WRITE_TRACKis always-DA64_WRITE_TRACK(the soft write watch,rt/a64.hA64_MARK), as it was unlessRX_SOFT_WRITE_WATCH=0was set. The flags are the same as today's default, so the object keys don't change.reserve_guest()inhost/hos_main.cno longer has theMEM_WRITE_WATCHbranch that only a build withoutA64_WRITE_TRACKtook. On Windows the guest window is reserved without a write watch, as it already was in every default build.nx2/oot_occlusion.py(Fritchii's Occlusion Off) and its import innx2/lift.pyare gone. WithLONGSHOT_OCCLUSION_OFFunset it only addedif (hos_occlusion_off) c->x[8] = 0;after six of the game's instructions, and that flag was 0, so it did nothing.hos_occlusion_offandocclusion_switch()inhost/hos_main.care gone too. The game makes its occlusion queries as before, and the Vulkan replay answers them (RX_VK_OCC_*, unchanged).LONGSHOT_OCCLUSION_OFF=1line is gone from docs/development.md's switch reference.RX_SOFT_WRITE_WATCHhad no entry there.tests/test_switches_removed.pychecks that neither switch (norhos_occlusion_off) is read anywhere in nx2/, host/, gpu/, scripts/, builder/ or docs/, thatWRITE_TRACKis always on, thatnx2/oot_occlusion.pystays gone and thathos_main.cno longer asks forMEM_WRITE_WATCH. No existing check read the removed code.Flags and settings
RX_SOFT_WRITE_WATCH(removed)=0built with Windows' write watch instead of the soft one=0path was ~20 ms a scan and ~12 ms of replay wait a frameLONGSHOT_OCCLUSION_OFF(removed)=1made the game skip its occlusion queriesNeither is a player option: no menu row, options-file key or launcher setting reads them.
Measurements
None. Default behaviour is unchanged: the build flags are the same as today's default, and the removed lift patch did nothing with its switch unset. Being a build and source cleanup, it is measured by its game-free checks.
main:
7ff5256e(2026-11-14)this PR: chore/remove-two-switches @
32bbfabcTesting
Tested: Nothing was run on this PC: no build, no game, no checks. CI runs
tests/run_all.py.Not tested: A run in the game. The only difference from main's default build is that the six occlusion-switch sites are lifted without the no-op check, and that a Windows build reserves the guest window as it already did by default.
Needs other testers: None.
Screenshots
Nothing on screen.
Risk and rollback
nx2/lift.pychanged andnx2/oot_occlusion.pyis gone. Both are lift sources (make_game.pylift_sources()), so the lift key changes once and the next build translates the game again. The lifted C of the six functions with the occlusion sites changes too (the no-op check is gone), so their objects are compiled again. The game-code flags are the same, so the other objects stay cached.host/hos_main.cchanged, so that one runtime file is compiled again.GetWriteWatchfallbacks ingpu/render/(rx_buffer.cpp) andhost/rx_backend.c's#else(rx_collect_written) belong to the WebGPU renderer, which is being removed in a parallel PR.hos.h's no-opHOS_WRITTEN(#else) stays because the checks compile host files withoutA64_WRITE_TRACK.third_party/a64-kit/rt/a64.hstill namesRX_SOFT_WRITE_WATCH=0in a comment, which can't be edited here (tree-sha256).Reviewer notes
Start with
reserve_guest()inhost/hos_main.c: theHOS_LARGE_PAGESbranch was already inside theA64_WRITE_TRACKcase, so every build keeps it.Issues
None.
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above). (not run here: left to CI)third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.mainand passing here (read off the diff: main still reads both switches; not run here).#ifbranch and a removed function)🤖 Generated with Claude Code
WIP: chore(build): RX_SOFT_WRITE_WATCH and LONGSHOT_OCCLUSION_OFF removed: the soft write watch and the game's occlusion queries, as by defaultto chore(build): RX_SOFT_WRITE_WATCH and LONGSHOT_OCCLUSION_OFF removed: the soft write watch and the game's occlusion queries, as by default