WIP: fix(vk): give each light its own shadow map in the water's light loop (for testing against #107) #545
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!545
Loading…
Reference in a new issue
No description provided.
Delete branch "kingo/Longshot:test/water-handle-table-v3"
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
Light squares on water, ice and snow (the "Navi light" blocks, https://github.com/NotRexed/Hookshot/issues/2509): a player still sees them in the Water Temple. This is our Hookshot fix for them, opened so someone can test it against main's own fix (#107). It predates #107 and conflicts with it on purpose: it is on main
9eae480e, the commit before #107 merged, so the two can be compared.What changed
gpu/vk/eden/shader_recompiler/ir_opt/texture_pass.cpp:FindHandleTableIndex()finds a light's index in the address of its 96-byte record (a plain multiply, or an XMAD pair's 16-bit halves in either order) and builds the shadow-map handle as a table (HandleOp::Index), so each light samples its own shadow map instead of the dummy;ir_opt/passes.h,shader_info.h: the index operation and the array.gpu/vk/vk_shader.cpp,vk_shader.h,vk_draw.cpp: the draw evaluates the handle once per element;RX_VK_HANDLE_TABLEandRX_VK_HANDLE_TABLE_COUNTin the program cache's stamp.tests/test_handle_table.py(new);test_texture_handle_banks.py,test_translation_pools.py,test_program_answer_domains.pyfollow the new operation.docs/development.md.Flags and settings
RX_VK_HANDLE_TABLE=0RX_VK_HANDLE_TABLE_COUNT=<n>Measurements
main:
9eae480e(2026-11-13), the commit before #107this PR: test/water-handle-table-v3 @
63ad82d2Hardware: RTX 5060 Ti 8 GB, driver 32.0.16.1088; Intel Core Ultra 7 265F; 64 GB; Windows 11
Scene: Zora's Domain and Zora's River (child, day), Chamber of Sages; 1920x1080
Method: on Hookshot (main 8c359bca + these two commits), in game, screenshots with and without the fix; on this branch, the game-free checks and a renderer build only.
How to reproduce: Zora's Domain or the Water Temple, standing by lit water;
RX_VK_HANDLE_TABLE=0brings the squares back.9eae480e63ad82d2tests/test_handle_table.pyNot measured on Longshot: no fps or VRAM numbers; asked for testing first.
Testing
Tested: on Hookshot in game: Zora's Domain (child and adult), Zora's River and the Chamber of Sages clean with the fix. On this branch:
tests/test_handle_table.py,test_texture_handle_banks.py,test_translation_pools.pypass with llvm-mingw on Windows; the renderer builds (RX_VK_ONLY).Not tested: this branch in game on Longshot; the full
run_all.py; against #107 side by side.Needs other testers:
Screenshots
Nothing from this branch yet; the Hookshot before/after is on the issue linked above.
Risk and rollback
Conflicts with main (#107 replaced the same code): this is for testing, not to merge as it is. If it fixes a case #107 misses, the difference would be ported onto #107 in a new PR.
RX_VK_HANDLE_TABLE=0turns it off.Issues
See https://github.com/NotRexed/Hookshot/issues/2509
Checklist
For everyone
type(scope): description).main. (No, on purpose: based on9eae480e, before #107, for comparison.)python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above). (Only the touched checks run.)third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
Closing this. A player who sees the squares at the Water Temple entrance ran this PR's build (log:
longshot v3.0.0-rc.3-13-g63ad82d2, RTX 4070 SUPER) and still saw them, so this change does not fix their case. I've asked them to try the newest nightly (with #107) at the same spot; if it still shows there, an issue with their log and screenshot is the next step. T-X4WT is cancelled.Pull request closed