Repository navigation
Conversation
Owner
2 tasks done
Know-It-All-Brother
pushed a commit
to Know-It-All-Brother/nxnative
that referenced
this pull request
Nov 9, 2026
…d t_linear_readback (PR seedds#97)
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.
tex_upgrade()currently replaces a buffer-backed linear texture with a standalone texture when adding render-target or pixel-format-view usage. The initial pixels are copied, but subsequent GPU writes update the new allocation while the guest CPU mapping still reads the original pool buffer. This can produce black save thumbnails even after GPU completion.The change recreates a buffer-backed texture over the same
buffer,bufferOffsetandbufferBytesPerRow. No copy is encoded when both textures share that storage. Standalone textures retain the existing slice/level copy path. Alignment requirements are unchanged.The regression uses synthetic 160x90 RGBA8 and RGBA8 sRGB textures, 640-byte rows and a CPU/GPU cached pool. It exercises actual
img_fit()conversion to an R32UI image and an NVN scaled sRGB copy from 320x180 into the linear destination, then reads through the guest CPU mapping.On the pinned public main
ebe75c9d5d34486f714678f850f0e74bbab398ac, the same test has four failures in 17 assertions. With this patch alone it passes 17/17 with Metal API Validation. Each pixel case checks all 14,400 pixels, and the scaled-copy case also checks that the destination still has its buffer backing. The observed minimum linear alignment on the test Mac is 16 bytes, so the 640-byte pitch is valid.A separate combined iPhone build produced a new, nonblack 160x90 save thumbnail inside LM3. No game image, save, shader, binary or extracted input is included with this contribution. The isolated Metal regression is the proof for this change; the device observation is integration evidence.