fix(vk): the Grass distance path calls ub_overlay with its allocator and alignment, so the renderer builds #2098
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2098
Loading…
Reference in a new issue
No description provided.
Delete branch "d4nkn3ss/Longshot:fix/grass-ub-overlay"
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
maindoesn't build sinced2f0e8dc(#1382, Grass distance). Its new uniform-buffer path ingpu/vk/vk_draw.cppcallsub_overlaywith four arguments, a capturing lambda as the allocator. Since6112edb6(#391),vk_draw.h'sub_overlaytakes a plain function pointer and the alignment as a fifth argument. This passesstream_allocandalign, the same call the next block in the function already makes.On main: build the renderer:
vk_draw.cpp:4017:31: error: no matching function for call to 'ub_overlay'(candidate function not viable: requires 5 arguments, but 4 were provided).Read first: the one line in
gpu/vk/vk_draw.cppunder// (the Grass distance row: grass_reach), and theub_overlaycall about 20 lines below it.See #1382. Its renderer builds were still skipped, waiting on the Test Farm's approval, when it merged.
Testing
Tested:
936d4e00the standalone build stops atvk_draw.cpp(1 error). With this PR it compiles, andlongshot.exeandlongshot_vk.dlllink.ls_ab_walk). The patch ran: 4vk: Grass distance 3x: program ... word 46 0.00263486 -> 0.000878286lines. Market 73 fps, field 55 fps, the run round 60.5 fps median (52.9 min), 0 draws skipped, and noCRASH,FATAL,VK_ERRORor device lost.python -I -B tests/test_grass_distance.py: 2 passed. It cuts the grass functions out ofvk_draw.cppand doesn't reach the changed call, so it passed on main too.longshot_vk.so, Windows) do.python -I -B tests/run_all.py --changed origin/main(the 164 checks that readvk_draw.cpp), Windows: 147 passed, 17 failed, 4 skipped (Linux only). The same 17 fail with main'svk_draw.cpp:FAIL:,['longshot_fsr4_pipelines.bin']),build,page,test_dev_packs.py,test_device_lost_exit.py,test_device_policy.py,test_draw_binds.py,test_draw_stream_visibility.py,test_frame_overlap.py,test_framegen_preset.py,test_fsr_uniform_ownership.py,test_linux_pressure.py,test_mesh_conv.py,test_pipeline_play_cache.py,test_prepare_cache_save.py,test_recorder_own_idle.py,test_rumble_menu.py,test_sampler_admission.py,test_upscaler_rows.py,test_vk_occlusion_queries.py. The rest of the suite reads no changed file (miseisn't installed here).Still to test: None
Measurements
Nothing to measure: a build fix, one call. The path it touches runs only with Grass distance above Game's, as #1382 made it.
Risks
None beyond #1382's own. Without the lambda, the allocator is the same function with the same alignment. Turning it off: a revert, which breaks the build again.
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
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.🤖 Generated with Claude Code
Tested in game: RTX 3080 10 GB, NVIDIA 621.14, Windows 11 Pro 26300: this head's build with Grass distance 3x, the adult save through the Market, out into Hyrule Field and a 60 s run round. The patched path ran (4 'vk: Grass distance 3x' lines), 60.5 fps median in the run round, no crash, FATAL, VK_ERROR or device lost.
WIP: fix(vk): the Grass distance path calls ub_overlay with its allocator and alignment, so the renderer buildsto fix(vk): the Grass distance path calls ub_overlay with its allocator and alignment, so the renderer buildserlo68 referenced this pull request2026-11-21 18:58:26 +00:00