Repository navigation
Lowering: SULD.P on a 1D surface (17 compute programs translate again) - #1447
Merged
Merged
Conversation
SULD.P with dimension code 0 (1D) stopped the Ampere -> Maxwell lowering as "native formatted surface load mode": only 2D, 2D_ARRAY and 3D were taken. 1D is Maxwell SULD.P.1D with one coordinate register; the Maxwell frontend already reads it as a Color1D image and the back end binds VK_IMAGE_VIEW_TYPE_1D. 1D_BUFFER and 1D_ARRAY (codes 1 and 2) are not seen in the game and stay refused. --prepare-shaders on the full shader list: 83 -> 66 programs that do not lower (all 17 "formatted surface load" gone, no new compile errors; with NotRexed#1437 too it is 43 -> 26). In game (Water Temple) nothing changes for the worse. tests/test_lower_suld_1d.py: both encodings from the log, 2D as before, 1D_BUFFER/1D_ARRAY refused; it fails without this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ate bound (review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Thanks for the review. Nits addressed in the latest commit on this branch (tests pass locally). |
# Conflicts: # tests/run_all.py
# Conflicts: # tests/run_all.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
SULD.Pwith dimension code 0 (1D) stopped the Ampere -> Maxwell lowering as "native formatted surface load mode", because the lowering accepted only 2D, 2D_ARRAY and 3D. Seventeen of OoT's compute programs stopped there (00007b97 00001000 001e0100 000f6200and01007b97 00000800 001e0100 000f6200), and a program that does not lower never runs.1D is Maxwell
SULD.P.1Dwith one coordinate register. The Maxwell frontend already reads it as aColor1Dimage (surface_load_store.cpp), and the back end bindsVK_IMAGE_VIEW_TYPE_1D(vk_draw.cppview_type). So the change only lets code 0 through and allows a coordinate register up to R254. 1D_BUFFER and 1D_ARRAY (codes 1 and 2) are not seen in the game and stay refused.Tested
--prepare-shaderson the full shader list (Linux, RTX 4070 Ti, fresh caches):hookshot_vk.so, with no device loss or crash.tests/test_lower_suld_1d.py(new, registered inrun_all.py) covers both encodings from the log, a 2D load (unchanged) and the refused 1D_BUFFER/1D_ARRAY codes. It fails without this change. The fulltests/run_all.pypasses: 190 passed, 19 skipped.Note: #1437 adds its test line at the same place in
tests/run_all.py. Whichever merges second needs a one-line conflict resolved, and I'll rebase it.🤖 Generated with Claude Code