Repository navigation
Conversation
…ot a failed read The resource materializer reads every scalar load up front, including loads through a null table pointer, which read as zero by design. The read proof re-reads those addresses at every revalidation (once per draw). In the split GPU process each of these reads is a line fill plus a word read in the Metal concurrent resolver, so it showed up as a pair of "GPU read of guest 0x0+0x100 / 0x18+0x4 failed" warnings that named nobody. - GuestReadContext (HLE, thread-static): reader kind, shader hash/stage, queue/submit/packet or prefetch job. - RemoteGuestAddressSpace: one report per request (a line-fill miss folds into its word's report), the reader named, a stack on the first report, counted summaries after the cap of 16. - Null-base reads marked at all raw-read sites and at the proof recheck (bit 63 in proof unreadables); in split mode they are counted and named once at INFO, not warned. Read behaviour is unchanged.
…er name per word read The failed-read report's context cost three thread-static writes per command packet and a scope per resource word read. The walker now registers itself once per slice and is asked for its packet by the report; a read made while a shader's resources are materialized is named resource-read without a scope of its own.
📦 Build artifacts —
|
| Platform | Download |
|---|---|
| macOS (osx-x64) | sharpemu-osx-x64-e824ac9 |
| macOS app bundle (osx-x64) | sharpemu-osx-x64-app-e824ac9 |
From build run #571. Downloads require a GitHub login and expire after 90 days.
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.
Before submitting
Please read our contribution guidelines before opening a pull request:
➡️ CONTRIBUTING.md
By opening this pull request, you confirm that you have read and agree to follow the contribution guidelines.
What this changes
A tester's Astro Bot log (split mode) has 16 warnings like "GPU read of guest 0x0+0x100 failed" followed by "0x18+0x4 failed", with the second address going 0x18, 0x30, 0x34, 0x58, 0x5C again and again. Nobody could tell which reader asked.
What reads them: the shader resource materializer evaluates every scalar read up front, including reads the shader skips at run time when a pointer is null. A read through a null base reads as zero by design (RuntimeValueEvaluator.ReadRawWord; upstream and the in-process path do the same). The read proof records those addresses as unreadable, and at every revalidation (once per draw) it reads them again to check they still find no memory (ResourceMaterializer.Holds). On the GPU process side the read goes through the Metal concurrent resolver's word read (MetalRenderHost.TryReadGuestWordConcurrentTested). That code first tries to fill the 256-byte line around the word, which fails, then reads the word itself, which fails too. So we get two warnings per word, five words of one null table pointer, for every draw. The values are the same as before (zero), so nothing is used wrongly. Only the warnings are wrong.
Changes:
A tester's log will now show, once:
[GPU-SPLIT][INFO] GPU read of guest 0x0000000000000018+0x4 through a null resource base found no memory (its word line 0x0000000000000000+0x100 failed first); it reads as zero by design, later ones are counted (null_base=): reader=read-proof-unreadable shader=0x... stage=Pixel queue=0 submit=... packet=0x...
Cost on the hot paths: none per packet or per word read. The command-stream walker registers itself once per slice and is asked for its packet only when a read fails; a read made while a shader's resources are materialized is named
resource-readwithout a scope of its own. A word-line fill and a null-base read each set one thread-static flag.Testing
No game was run (none is available on this machine). Unit tests: RemoteGuestAddressSpaceTests (the report names its reader and the work it serves; a line fill and its word read are one report, the cap of 16 counts reports, the summary line; a null-base miss is counted and named once, not warned) and ReadProofTests (null-base reads are marked at the evaluation and at the proof recheck, which names its reader and shader). The ReadProofTests fail with the recheck change reverted. Release build with 0 errors, REUSE lint clean, full
dotnet test SharpEmu.slnx -c Release: every project passed. The first run caught two allocation-test failures, ShaderPipelineCacheAllocationTests.ACachedDrawAllocatesOnlyItsResults (an Enum.ToString per cached draw); fixed with cached stage names, and the Libs (12638 passed), ShaderCompiler (3041) and GpuSplit (58) suites passed on rerun, and again after the hot-path follow-up commit. The Metal and other projects passed in the first full run and were not rerun after that commit, which does not touch them.Checklist
By submitting this pull request, you confirm that:
CONTRIBUTING.md.N/A.N/A).