Repository navigation
Conversation
Source: NotRexed/Hookshot#1332 Original proposal by: BiasedMonkey Original head: 03c951e0565e4a8338ca34959f0c720d1fbcda69 Verified source tree: 76ac6cf Reconstructed import commit, not a claim of original authorship. Source head author: tonyz <tony.corlay@gmail.com>
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.
Longshot is preserving this upstream proposal for review. This draft is not an adopted or functionally verified fix.
Source: NotRexed/Hookshot#1332
Original contributor: BiasedMonkey.
Original head:
03c951e0565e4a8338ca34959f0c720d1fbcda69.Exact source tree:
76ac6cff991203442696d64354eab41dca3cc69f.Import parent:
7dbdcdc00889ccf038ad95c7481ad6e10397f8a5(common ancestor with the migration base).The source-tree checksum matches exactly. Original commits after the common ancestor are represented by one reconstructed import commit; source links and authorship are recorded. This snapshot can contain prerequisites beyond our migration base. Review its complete diff and overlapping proposals before merging.
Validation here: copying fidelity only. Platform builds, gameplay, functional behavior and the upstream author's claims have not been independently verified. Keep draft until reviewed, rebased and tested.
Original proposal
What: OoT draws into and clears a 16-layer BC4 texture array through an RGBA16UI view of its blocks (one 8-byte block = one RGBA16UI texel). Compressed images were never created with
COLOR_ATTACHMENT, somake_view()returned null for those views and the draws and clears were silently left out. This is theview of texture 0x1133ccb000 (vk 139) as vk 95 type 1 levels 0+1 layers N+1 not madeline found in the AMD haze reports (NotRexed/Hookshot#914, NotRexed/Hookshot#1101), 16 times, one per layer.Changes (
gpu/vk/vk_texture.cpp,vk_draw.cpp,vk_xfer.cpp):COLOR_ATTACHMENTwhen the raw block format can be a color attachment andvkGetPhysicalDeviceImageFormatPropertiesaccepts it. This is asked separately fromSTORAGE, so a refusal does not cost the raw storage views (the amdvlk note there).COLOR_ATTACHMENTfirst, then withoutSTORAGE(as before).targets(), region clears inclear_tex()) is computed in blocks (view_texels()), not in the image's texels. The clear rect is clamped to it.RX_VK_BC_TARGETS=1/0turns it on / off on any driver.usage … not in the image's …, or thevkCreateImageViewresult), and compressed images log when one of their block-view usages is refused.How it was found:
MUTABLE_FORMAT | BLOCK_TEXEL_VIEW_COMPATIBLE | EXTENDED_USAGE, plus a storage view as RGBA16UI / R32G32UI) passes on RADV with the Khronos validation layer and no message. So the driver was not refusing it.not made: usage 0x10 not in the image's 0xf. The image hadSTORAGE; the game wantedCOLOR_ATTACHMENT.COLOR_ATTACHMENT, cleared one layer through an RGBA16UI view with dynamic rendering, and read it back: all 16384 blocks held the clear value, with no validation message, on an RX 7700S (NAVI33) and a 780M (PHOENIX), Mesa 26.2.6.Tested: v2.0.11 + this commit (rebased here onto main, builds), RX 7700S, CachyOS, Mesa 26.2.6. Only
hookshot_vk.sowas rebuilt (RX_VK_ONLY=1).Log before (v2.0.11):
Diagnostic build:
After:
Not tested: NVIDIA, amdvlk, Intel (unchanged by default;
RX_VK_BC_TARGETS=1to try). No visible change on this machine: the white haze over outdoor scenes (NotRexed/Hookshot#1004) is still there with this commit, so it has another cause. This PR only stops the draws and clears into that texture from being skipped.(Update: on this machine the washed-out picture turned out to be NotRexed/Hookshot#1042, the swapchain's colour space on KDE Wayland: with NotRexed/Hookshot#1086's change applied to v2.0.11 the picture is right again, so NotRexed/Hookshot#1086 is confirmed on an RX 7700S, RADV, Mesa 26.2.6. This PR is independent of it.)
AI-assisted (Claude Code) on behalf of the author: diagnosis, repros, patch and write-up; built and run on the machine above.
🤖 Generated with Claude Code