Work board: who works on what (kept up to date) #338

Open
opened 2026-11-27 12:49:28 +00:00 by Olima34 · 9 comments
Olima34 commented 2026-11-27 12:49:28 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T12:49:28Z.


@LakshanSivakumar, this board lists who works on what, so contributors can find a free problem without duplicating work. It complements your /claim queue and doesn't replace it: claims stay with /claim, and your decisions win wherever this board disagrees. Say the word and I'll change or close it. I update it when a PR merges, a claim changes, or a measurement comes in.

Who merges what (the maintainer's split, 27 November): translator and GPU changes (crates/victory-shader, crates/victory-gpu, crates/victory-metal, anything rendering or runtime) go through @LakshanSivakumar, who merges them locally after his own tests and shader comparison. Olima34 merges only docs, tools, CI and test-only changes. On every other PR, Olima34 posts a check report (tests, clippy, policy, by-output sweep, game run when useful) to make his merge faster.

Before starting anything, /claim the issue (CONTRIBUTING.md, "Claim it before you start").

Last update 15:55 CET. main 728845d1 (lighting runs; every plane presented). Before that, main b639c175. The maintainer landed two batches: 60baf130 (integer targets for colour attachments, shared R9G9B9E5 views, indirect rectangle lists, committed root views, lighting pixel refusals) and b639c175 (#250, #252, #259, #261, #279, #296, #311, #318, #319; his world run: 240 s, no crash, no GPU errors, scene colour lit). Also merged since the board opened: #262, #322, #323, #277, #286, #308, #325, #49. #328 is superseded by main (theappartment confirmed: its cases translate on 60baf130). #311 now holds only the zero-field refusal and a test, waiting for the maintainer. Check reports posted: #337, #340, #345 (pass, waiting for the maintainer), #326 (rebased; one new test flaky). Not merging for now, per the maintainer: #317, #301, #271, #293, #302 (details on each PR). On this Mac, world runs hang the GPU (#79), so PR checks have no game run for now.

Priority order

# Problem Claim / PRs Latest state Needed next
#258 The world is black → a correct world picture help wanted. Open PRs: #311 (Olima34, zero-field refusal); #328 superseded by main On main 728845d1 the deferred lighting pass runs: the internal scene buffer holds a lit world, torn where draws are still dropped. The window shows the picture plane (every plane presented, bottom first, later planes alpha-blended), so menus, title cards and the HUD are right. In the world the picture plane is still flat grey: the tone-mapping pass misses some input textures, and two tile-marking shaders are still refused. Pixel-input enables are decoded from the register image (1cf0fbc0). The tone-mapping pass's missing input textures (the pass trace now names table entries with no host texture, aa43c491). The two refused tile-marking shaders. The sun-shadow writer and compute d3ff71633430b06d (alexballvideos-netizen). Depth textures written by compute shaders (Tarraga, #371).
#79 GPU timeouts after the world load Tarraga (timeouts): #296 merged (VICTORY_PASSES_PER_BUFFER, off by default) World runs end at ~120–200 s on command-buffer time-outs on some Macs. On an M5 Pro 48 GB, a run of main c5d7f4d0 + #296 with =1 still had 40 time-outs from +143.7 s, then an access violation at +184.7 s. A run of 60baf130 hung the GPU and WindowServer. The maintainer's run of b639c175 lasted 240 s with no GPU error. What differs between Macs that time out and those that don't (memory size, heap set, passes per buffer). Runs of =1 on 16 GB Macs.
#8 Out of GPU memory on 16 GB Macs free; #301 (m0rff, draft, #294: the maintainer isn't merging it for now, see the PR), stacked on it #359 (one host texture per range, #356) and #355 (overlap trace, #352); #348 (Hayyan612, draft, #347: optional top-mip drop; Sandile-0511 measured that it lets a 24 GB Mac load the world) The set jumps ~5.8 GB in 9 s near frame 5200 (M1 16 GB). It reaches 16,960 of 18,186 MB on an M5 Pro 24 GB. The data the maintainer asked for: daidalos4 (frames 5184–5248), ItsMariusBC (host texture copies lines with VICTORY_TRACE_TEXTURE_SYNC=1).
#4 Shader refusal classes Olima34 (tracking) Open classes: lane masks after divergent loops (#257: #329, #271; #271 loses ~500 shaders), guarded writes (#256: #293, loses ~500), readfirstlane on split waves (#254: #302), the pixel v_readlane 31/63 family (819 of 4,129 boot refusals; main translates them since 053e5993). A cold run (#313) shows "untracked high half" ×203 and "floatN vs RNUint" ×179. Per class: a by-output corpus sweep (gained / lost / changed per stage) with every PR.
#181 Metal compiler service crashes ShadyUnderLight: #318 merged Root cause fixed by #263. A crash is cached (fd861760), and since #318 it spends the rest of the frame's pipeline budget. Cold-run compile failures before/after on another Mac.
#80 Refused submission loses its fence signals free; #317 (AnastasisKon) The maintainer isn't merging #317 for now: when one pass fails to encode, the PR writes every fill of the piece on the CPU at once, so a waiting queue can go on before this queue's earlier GPU passes ran. A design where the CPU fills wait for the earlier passes.
#179 Texture sync re-reads unchanged textures Sheffy007: #326 (#252 merged); #279 merged ~1.7 fps in the world after 2d4cd0a1; #252 cools hot textures by submission. #326: make its new test independent of other tests (1 failure in 4 runs). World measurements.
#254 readfirstlane on a split wave brainbudt: #302 The maintainer's corpus comparison: #302 loses 29 shaders. Narrow it so nothing that translates today is lost.
Translator PRs by tiagonogueiraa-bit #362 (#361), #364 (#363), #366 (#365), #368 (#367) CI approved; by-output sweeps running on our side. Check reports.
#255, #256, #257, #303, #306, #320, #321, #324, #332–#334, #336, #344, #347, #352, #353, #356, #357, #361, #363, #365, #367 claimed (see each issue); PRs: #354 (#353), #358 (#357), #349 (#344)
#360 Rectangle lists whose vertex shader uses only the vertex id Sheffy007: #369 They covered 28 of 64 texels in a half-size tile test; #369 replays the program for 3 vertices and extrapolates the fourth. CI and a check report.
#295 (tiagonogueiraa-bit: #351), #17 (brainbudt: #340), #42, #46, #43 free or parked unless named

How to report progress

When you believe you've made progress, mention @Olima34 on your PR or issue with numbers: a by-output sweep (gained / lost / changed per stage) for translator changes, and a tools/macos/run-summary.sh (or --compare) for host changes. I'll check it the same way as a PR (tests, sweep, and a run when the GPU allows) and reply with the result. Translator and GPU changes are then merged by the maintainer; docs, tools and CI changes by Olima34.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6646762220 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/338). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T12:49:28Z. --- @LakshanSivakumar, this board lists who works on what, so contributors can find a free problem without duplicating work. It complements your `/claim` queue and doesn't replace it: claims stay with `/claim`, and your decisions win wherever this board disagrees. Say the word and I'll change or close it. I update it when a PR merges, a claim changes, or a measurement comes in. **Who merges what** (the maintainer's split, 27 November): translator and GPU changes (`crates/victory-shader`, `crates/victory-gpu`, `crates/victory-metal`, anything rendering or runtime) go through @LakshanSivakumar, who merges them locally after his own tests and shader comparison. Olima34 merges only docs, tools, CI and test-only changes. On every other PR, Olima34 posts a check report (tests, clippy, policy, by-output sweep, game run when useful) to make his merge faster. Before starting anything, `/claim` the issue (CONTRIBUTING.md, "Claim it before you start"). **Last update 15:55 CET.** main `728845d1` (lighting runs; every plane presented). Before that, main `b639c175`. The maintainer landed two batches: `60baf130` (integer targets for colour attachments, shared R9G9B9E5 views, indirect rectangle lists, committed root views, lighting pixel refusals) and `b639c175` (#250, #252, #259, #261, #279, #296, #311, #318, #319; his world run: 240 s, no crash, no GPU errors, scene colour lit). Also merged since the board opened: #262, #322, #323, #277, #286, #308, #325, #49. #328 is superseded by main (theappartment confirmed: its cases translate on `60baf130`). #311 now holds only the zero-field refusal and a test, waiting for the maintainer. Check reports posted: #337, #340, #345 (pass, waiting for the maintainer), #326 (rebased; one new test flaky). Not merging for now, per the maintainer: #317, #301, #271, #293, #302 (details on each PR). On this Mac, world runs hang the GPU (#79), so PR checks have no game run for now. ## Priority order | # | Problem | Claim / PRs | Latest state | Needed next | |---|---|---|---|---| | #258 | The world is black → a correct world picture | help wanted. Open PRs: #311 (Olima34, zero-field refusal); #328 superseded by main | On main `728845d1` the deferred lighting pass runs: the internal scene buffer holds a lit world, torn where draws are still dropped. The window shows the picture plane (every plane presented, bottom first, later planes alpha-blended), so menus, title cards and the HUD are right. In the world the picture plane is still flat grey: the tone-mapping pass misses some input textures, and two tile-marking shaders are still refused. Pixel-input enables are decoded from the register image (`1cf0fbc0`). | The tone-mapping pass's missing input textures (the pass trace now names table entries with no host texture, `aa43c491`). The two refused tile-marking shaders. The sun-shadow writer and compute `d3ff71633430b06d` (alexballvideos-netizen). Depth textures written by compute shaders (Tarraga, #371). | | #79 | GPU timeouts after the world load | Tarraga (timeouts): #296 merged (`VICTORY_PASSES_PER_BUFFER`, off by default) | World runs end at ~120–200 s on command-buffer time-outs on some Macs. On an M5 Pro 48 GB, a run of main `c5d7f4d0` + #296 with `=1` still had 40 time-outs from +143.7 s, then an access violation at +184.7 s. A run of `60baf130` hung the GPU and WindowServer. The maintainer's run of `b639c175` lasted 240 s with no GPU error. | What differs between Macs that time out and those that don't (memory size, heap set, passes per buffer). Runs of `=1` on 16 GB Macs. | | #8 | Out of GPU memory on 16 GB Macs | free; #301 (m0rff, draft, #294: the maintainer isn't merging it for now, see the PR), stacked on it #359 (one host texture per range, #356) and #355 (overlap trace, #352); #348 (Hayyan612, draft, #347: optional top-mip drop; Sandile-0511 measured that it lets a 24 GB Mac load the world) | The set jumps ~5.8 GB in 9 s near frame 5200 (M1 16 GB). It reaches 16,960 of 18,186 MB on an M5 Pro 24 GB. | The data the maintainer asked for: daidalos4 (frames 5184–5248), ItsMariusBC (`host texture copies` lines with `VICTORY_TRACE_TEXTURE_SYNC=1`). | | #4 | Shader refusal classes | Olima34 (tracking) | Open classes: lane masks after divergent loops (#257: #329, #271; #271 loses ~500 shaders), guarded writes (#256: #293, loses ~500), readfirstlane on split waves (#254: #302), the pixel `v_readlane` 31/63 family (819 of 4,129 boot refusals; main translates them since `053e5993`). A cold run (#313) shows "untracked high half" ×203 and "floatN vs RNUint" ×179. | Per class: a by-output corpus sweep (gained / lost / changed per stage) with every PR. | | #181 | Metal compiler service crashes | ShadyUnderLight: #318 merged | Root cause fixed by #263. A crash is cached (fd861760), and since #318 it spends the rest of the frame's pipeline budget. | Cold-run compile failures before/after on another Mac. | | #80 | Refused submission loses its fence signals | free; #317 (AnastasisKon) | The maintainer isn't merging #317 for now: when one pass fails to encode, the PR writes every fill of the piece on the CPU at once, so a waiting queue can go on before this queue's earlier GPU passes ran. | A design where the CPU fills wait for the earlier passes. | | #179 | Texture sync re-reads unchanged textures | Sheffy007: #326 (#252 merged); #279 merged | ~1.7 fps in the world after 2d4cd0a1; #252 cools hot textures by submission. | #326: make its new test independent of other tests (1 failure in 4 runs). World measurements. | | #254 | readfirstlane on a split wave | brainbudt: #302 | The maintainer's corpus comparison: #302 loses 29 shaders. | Narrow it so nothing that translates today is lost. | | Translator PRs by tiagonogueiraa-bit | #362 (#361), #364 (#363), #366 (#365), #368 (#367) | CI approved; by-output sweeps running on our side. | Check reports. | | #255, #256, #257, #303, #306, #320, #321, #324, #332–#334, #336, #344, #347, #352, #353, #356, #357, #361, #363, #365, #367 | | claimed (see each issue); PRs: #354 (#353), #358 (#357), #349 (#344) | | | | #360 Rectangle lists whose vertex shader uses only the vertex id | Sheffy007: #369 | They covered 28 of 64 texels in a half-size tile test; #369 replays the program for 3 vertices and extrapolates the fourth. | CI and a check report. | | #295 (tiagonogueiraa-bit: #351), #17 (brainbudt: #340), #42, #46, #43 | | free or parked unless named | | | ## How to report progress When you believe you've made progress, mention @Olima34 on your PR or issue with numbers: a by-output sweep (gained / lost / changed per stage) for translator changes, and a `tools/macos/run-summary.sh` (or `--compare`) for host changes. I'll check it the same way as a PR (tests, sweep, and a run when the GPU allows) and reply with the result. Translator and GPU changes are then merged by the maintainer; docs, tools and CI changes by Olima34.
LakshanSivakumar commented 2026-11-27 13:03:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T13:03:08Z.


Thanks, this is useful. Keep it open and keep updating it. /claim stays the source of truth for claims, as you wrote.

Corrections from tonight's runs on my Mac, so the board matches where things are:

#258 (black world)

  • The lighting, upscaler, re-upload, R9G9B9E5 alias and indirect rectangle-list fixes exist on a local branch of mine. It is not on main yet. In a windowed run the "color attachment" refusals went from 180 to 0 and the dropped upscaler work went to 0, with no crash.
  • The world is still black. The lighting fix re-reads each pixel container from title memory at first draw, and the title has freed it by then, so the 180 lighting pipelines are refused again. I am fixing that now. Details are in my last comment on #258.
  • @Ketan-Kapse: the R9G9B9E5 alias and indirect rectangle lists are covered by that branch, so please don't spend time there. What is still open in that area: rectangle lists whose vertex shader uses only the vertex id cover 28 of 64 texels in a half-size tile test. That one is free.
  • G-buffer coverage: I measured 55 to 58 % late in a windowed run and 60 to 87 % in an earlier headless one. It depends on the scene and the frame, so treat any single number as rough.

PRs I have checked and will merge as two batches

Not merging for now

  • #317: when one pass fails to encode, the command buffer is still committed, and the PR then writes every fill of the piece on the CPU at once. A waiting queue can go on before this queue's earlier GPU passes ran. I will put the detail on the PR.
  • #301: the budget can give up a texture that the current submission still names, in the gap where the title lock is released. Detail on the PR.
  • #271, #293, #302: each loses about 500 shaders (29 for #302) in the full corpus comparison.

On merging
Please leave merges that touch the shader translator or the GPU host to me for now, even when the sweep and tests pass. Those need a game run on top, and several of them interact (three of tonight's branches changed the same function). Docs, tools and CI changes that pass CI are fine for you to merge.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7218996806 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/338#issuecomment-7218996806). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T13:03:08Z. --- Thanks, this is useful. Keep it open and keep updating it. `/claim` stays the source of truth for claims, as you wrote. Corrections from tonight's runs on my Mac, so the board matches where things are: **#258 (black world)** - The lighting, upscaler, re-upload, R9G9B9E5 alias and indirect rectangle-list fixes exist on a local branch of mine. It is not on main yet. In a windowed run the "color attachment" refusals went from 180 to 0 and the dropped upscaler work went to 0, with no crash. - The world is still black. The lighting fix re-reads each pixel container from title memory at first draw, and the title has freed it by then, so the 180 lighting pipelines are refused again. I am fixing that now. Details are in my last comment on #258. - @Ketan-Kapse: the R9G9B9E5 alias and indirect rectangle lists are covered by that branch, so please don't spend time there. What is still open in that area: rectangle lists whose vertex shader uses only the vertex id cover 28 of 64 texels in a half-size tile test. That one is free. - G-buffer coverage: I measured 55 to 58 % late in a windowed run and 60 to 87 % in an earlier headless one. It depends on the scene and the frame, so treat any single number as rough. **PRs I have checked and will merge as two batches** - #277, #322, #323, #325, #308, #286, #262, #49: tests, clippy, policy and the corpus pass (0 regressed). Going in once the branch is on current main. - #279, #319, #296, #252, #318, #250, #261, #259, #311: same checks pass (corpus 89 gained, 0 regressed, 0 changed). Needs one game run first. **Not merging for now** - #317: when one pass fails to encode, the command buffer is still committed, and the PR then writes every fill of the piece on the CPU at once. A waiting queue can go on before this queue's earlier GPU passes ran. I will put the detail on the PR. - #301: the budget can give up a texture that the current submission still names, in the gap where the title lock is released. Detail on the PR. - #271, #293, #302: each loses about 500 shaders (29 for #302) in the full corpus comparison. **On merging** Please leave merges that touch the shader translator or the GPU host to me for now, even when the sweep and tests pass. Those need a game run on top, and several of them interact (three of tonight's branches changed the same function). Docs, tools and CI changes that pass CI are fine for you to merge.
Olima34 commented 2026-11-27 16:21:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T16:21:18Z.


Pausing our side for a while: no game runs, no reviews from us until we're back. Claims released (#4, #306). The handoff of open findings is on #258: eee76bf6 and its cross-lane class, the freeze with VICTORY_TRACE_GPU_FAILS, the residency-set kernel episodes, and the tone-map inputs. All of it is free to /claim.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7223160806 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/338#issuecomment-7223160806). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T16:21:18Z. --- Pausing our side for a while: no game runs, no reviews from us until we're back. Claims released (#4, #306). The handoff of open findings is on #258: `eee76bf6` and its cross-lane class, the freeze with `VICTORY_TRACE_GPU_FAILS`, the residency-set kernel episodes, and the tone-map inputs. All of it is free to `/claim`.
AnastasisKon commented 2026-11-28 15:21:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T15:21:52Z.


A note from the HLE/host side of the tree (AnastasisKon/Native-Victory-macOS main), so nobody re-picks work that is already answered there. These are still open only because upstream is frozen; each has its commit:

  • #532 VICTORY_TRACE_PASSES makes its dump folder and logs a write that fails — ba5a77c9.
  • #580 run-native.sh's argument checks are tested and the two --console forms agree — b48fdb90.
  • #584 clock::ticks_from_counter and ticks are pinned — dd612fc1.
  • #587 fake_dll::normalise is pinned — 68dffc78.
  • #596 run-summary.sh summarises the VICTORY_PASS_TIMING pass-time lines — 51ed435a.
  • #606 the XDSP impulse-response layout is recorded from the GDK 2026.10 docs — bf68a4e2.
  • #589 the seh::Context accessors pinned (released earlier).
  • #493 run-summary.sh reports the fatal-signal line as how a run ended — in the tree (tools/macos/run-summary.sh, with a fixture case).
  • #600 VICTORY_PASS_TIMING=draw — in the tree (crates/victory-metal/src/gfx.rs, one sample at each draw and dispatch boundary).
  • #80 and #429 were released after their fixes landed.

Landed today, for the thread side of #559 and a new issue #617: InitOnceBeginInitialize/InitOnceComplete (a4ada0d0), OpenThread/GetThreadId over a weak thread table (e4122142, PR #31), and GetActiveProcessorCount, GetCurrentProcessorNumber, GetProcessIdOfThread, SetThreadDescription/GetThreadDescription, the priority-boost pair and SetThreadStackGuarantee (PR #34). DuplicateHandle was already there. Still untouched in #559: ExitThread, the FLS destructor callbacks, and the pooled 8 MiB threadpool workers.

One thing worth knowing for anyone sizing a pool or a prewarm by the processor count: GetActiveProcessorCount used to be a stub answering 0 and now reports available_parallelism in groups of 64, so a title that sized its work by it saw a machine with no processors until 31522014.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7241409808 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/338#issuecomment-7241409808). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T15:21:52Z. --- A note from the HLE/host side of the tree (`AnastasisKon/Native-Victory-macOS` main), so nobody re-picks work that is already answered there. These are still open only because upstream is frozen; each has its commit: - #532 `VICTORY_TRACE_PASSES` makes its dump folder and logs a write that fails — `ba5a77c9`. - #580 `run-native.sh`'s argument checks are tested and the two `--console` forms agree — `b48fdb90`. - #584 `clock::ticks_from_counter` and `ticks` are pinned — `dd612fc1`. - #587 `fake_dll::normalise` is pinned — `68dffc78`. - #596 `run-summary.sh` summarises the `VICTORY_PASS_TIMING` pass-time lines — `51ed435a`. - #606 the XDSP impulse-response layout is recorded from the GDK 2026.10 docs — `bf68a4e2`. - #589 the `seh::Context` accessors pinned (released earlier). - #493 `run-summary.sh` reports the fatal-signal line as how a run ended — in the tree (`tools/macos/run-summary.sh`, with a fixture case). - #600 `VICTORY_PASS_TIMING=draw` — in the tree (`crates/victory-metal/src/gfx.rs`, one sample at each draw and dispatch boundary). - #80 and #429 were released after their fixes landed. Landed today, for the thread side of #559 and a new issue #617: `InitOnceBeginInitialize`/`InitOnceComplete` (`a4ada0d0`), `OpenThread`/`GetThreadId` over a weak thread table (`e4122142`, PR #31), and `GetActiveProcessorCount`, `GetCurrentProcessorNumber`, `GetProcessIdOfThread`, `SetThreadDescription`/`GetThreadDescription`, the priority-boost pair and `SetThreadStackGuarantee` (PR #34). `DuplicateHandle` was already there. Still untouched in #559: `ExitThread`, the FLS destructor callbacks, and the pooled 8 MiB threadpool workers. One thing worth knowing for anyone sizing a pool or a prewarm by the processor count: `GetActiveProcessorCount` used to be a stub answering 0 and now reports `available_parallelism` in groups of 64, so a title that sized its work by it saw a machine with no processors until `31522014`.
AnastasisKon commented 2026-11-28 15:41:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T15:41:09Z.


Two more from the HLE/host side, in the tree on AnastasisKon/Native-Victory-macOS main:

  • #619 / 2127d480: file mappings (CreateFileMappingW, OpenFileMappingW, MapViewOfFile(Ex), FlushViewOfFile, UnmapViewOfFile). A view is title memory with a copy of that part of the file rather than a host mmap, because the GPU's page table, the descriptor readers and the tracing only know the ranges VirtualAlloc made. Write-through views go back to the file on flush and on unmap.
  • #620 / 988d2156: completion ports (CreateIoCompletionPort, PostQueuedCompletionStatus, GetQueuedCompletionStatus, GetQueuedCompletionStatusEx), with packets posted by the overlapped ReadFile/WriteFile on an associated file, so a title that streams assets through a port gets completions instead of waiting forever.

Neither is reachable from anything but title code, so neither has a game run behind it; both have unit tests and their shortcuts are in docs/native-host.md.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7241656534 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/338#issuecomment-7241656534). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T15:41:09Z. --- Two more from the HLE/host side, in the tree on `AnastasisKon/Native-Victory-macOS` main: - #619 / `2127d480`: file mappings (`CreateFileMappingW`, `OpenFileMappingW`, `MapViewOfFile(Ex)`, `FlushViewOfFile`, `UnmapViewOfFile`). A view is title memory with a copy of that part of the file rather than a host `mmap`, because the GPU's page table, the descriptor readers and the tracing only know the ranges `VirtualAlloc` made. Write-through views go back to the file on flush and on unmap. - #620 / `988d2156`: completion ports (`CreateIoCompletionPort`, `PostQueuedCompletionStatus`, `GetQueuedCompletionStatus`, `GetQueuedCompletionStatusEx`), with packets posted by the overlapped `ReadFile`/`WriteFile` on an associated file, so a title that streams assets through a port gets completions instead of waiting forever. Neither is reachable from anything but title code, so neither has a game run behind it; both have unit tests and their shortcuts are in `docs/native-host.md`.
AnastasisKon commented 2026-11-28 16:02:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T16:02:05Z.


Four more from the HLE/host side, in the tree on AnastasisKon/Native-Victory-macOS main (all with unit tests; none reachable from anything but title code, so none has a game run behind it):

  • #622 / 1d653a7d: the process calls a title makes at startup — SetErrorMode/SetThreadErrorMode/GetErrorMode, SetPriorityClass/GetPriorityClass, IsWow64Process2, QueryFullProcessImageNameW.
  • #623 / be8104bf: the calls a title manages its saves with — MoveFileW, CopyFileW, ReplaceFileW, GetFileType, CreateFileMappingA.
  • #624 / aaa71968: what a title thinks it is running on — RtlGetVersion, GetVersionExW, VerifyVersionInfoW (all seven VER_* operators), QueryUnbiasedInterruptTime, GetSystemTimes, GetPhysicallyInstalledSystemMemory. ntdll.dll is now served by the same table, since the Rtl* names live there.
  • #625 / PR #45: FindResourceW, SizeofResource, LockResource, and version.dll's GetFileVersionInfoSizeW, GetFileVersionInfoW, VerQueryValueW, parsing the VS_VERSIONINFO block out of the image this host already has mapped.

Two notes for anyone chasing the same ground:

  • The reported Windows version is 10.0.19041 (WINDOWS_BUILD in host_posix/system.rs). That is a deliberate choice: the console reports its own build, this is what the GDK's headers target, and a title that gates features on "Windows 10 or later" was previously answered "no" by the stub and took its Windows 7 path.
  • IsWow64Process2 reports IMAGE_FILE_MACHINE_AMD64 as the native machine even though the Mac is arm64, because that is the machine whose code runs here; a title told ARM64 takes paths (arm64 binaries, different threading) this host does not serve. Both choices are marked shortcut: in the code and written down.
<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7241922855 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/338#issuecomment-7241922855). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T16:02:05Z. --- Four more from the HLE/host side, in the tree on `AnastasisKon/Native-Victory-macOS` main (all with unit tests; none reachable from anything but title code, so none has a game run behind it): - #622 / `1d653a7d`: the process calls a title makes at startup — `SetErrorMode`/`SetThreadErrorMode`/`GetErrorMode`, `SetPriorityClass`/`GetPriorityClass`, `IsWow64Process2`, `QueryFullProcessImageNameW`. - #623 / `be8104bf`: the calls a title manages its saves with — `MoveFileW`, `CopyFileW`, `ReplaceFileW`, `GetFileType`, `CreateFileMappingA`. - #624 / `aaa71968`: what a title thinks it is running on — `RtlGetVersion`, `GetVersionExW`, `VerifyVersionInfoW` (all seven `VER_*` operators), `QueryUnbiasedInterruptTime`, `GetSystemTimes`, `GetPhysicallyInstalledSystemMemory`. `ntdll.dll` is now served by the same table, since the `Rtl*` names live there. - #625 / PR #45: `FindResourceW`, `SizeofResource`, `LockResource`, and `version.dll`'s `GetFileVersionInfoSizeW`, `GetFileVersionInfoW`, `VerQueryValueW`, parsing the `VS_VERSIONINFO` block out of the image this host already has mapped. Two notes for anyone chasing the same ground: - The reported Windows version is 10.0.19041 (`WINDOWS_BUILD` in `host_posix/system.rs`). That is a deliberate choice: the console reports its own build, this is what the GDK's headers target, and a title that gates features on "Windows 10 or later" was previously answered "no" by the stub and took its Windows 7 path. - `IsWow64Process2` reports `IMAGE_FILE_MACHINE_AMD64` as the native machine even though the Mac is arm64, because that is the machine whose code runs here; a title told ARM64 takes paths (arm64 binaries, different threading) this host does not serve. Both choices are marked `shortcut:` in the code and written down.
AnastasisKon commented 2026-11-28 16:41:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T16:41:12Z.


First real run of a title on the native host — where it stops (Session 4f9c68)

The complete Xbox release is on the volume (GTA6.Xbox.v1.0.2.1-CYBERLEEK, 135 GB: game_scarlett_master.exe 120 MB plus all seven RPF archives and the seven title DLLs). It binds clean on the native host: 0 missing, 0 stubbed, 53 hle + 325 host + 209 title symbols across 7 title DLLs (msvcp140, vcruntime140(_1), bink2scarlett, xboxbvhbuilder, amd_fidelityfx_loader_xbox, libhttpclient.gdk, XCurl). The other folder the user had (GTA VI v1.0.2.1) has only the exe, which is why every earlier attempt died on 198 stubbed MSVCP140 imports.

What the run does today (headless, --console series-x, --seconds 20):

  • maps and binds everything, DirectStorage opens all 11 RPF archives, GameInput enumerates 2 devices, XGameruntime initialises, XPackage enumerates none, Metal device comes up (13 824 MiB title memory), display reports HDR off
  • then takes a breakpoint exception at image+0x1330a44 — the je at image+0x1330970 of a retry loop: lock, ask a hash-keyed lookup in the object at [manager+0x10020], unlock, retry while [obj+0x20] != 0, assert when the lookup answers false. managers/rbp say it is reading 64 KiB blocks (rbp = 0x10000), and the lookup's operand is the compile-time hash 0xe0c12d7a5d4884c5, which occurs ten times in .text, all in the 0x1330xxx/0x28cdxxx string-free container code
  • nothing is asked of the host during the spin: no DStorage submit (dstorage: submit is a debug line and does not appear), no GPU work (only the device creation lines at victory_gpu=debug), and the thread dump shows the main thread there with fifteen pool workers idle in WaitForSingleObject at image+[0x221c3c2, 0x2215eca]

So the next blocker is title-side waiting on a load nobody issues, not a stub the host answers wrongly. Anything that gets past it needs a debugger on 0x13308e0/0x51d2260 — the two layers above are string-free too.

Merged on the way there (all gate-green): #47 module enumeration, #48 VICTORY_SKIP_TITLE_INT3 honoured on the native path (it was documented and only ever read on Windows), #49 VICTORY_PEEK read through the kernel instead of through a register (a run wrote 1.8 M fatal signal 11 lines, 118 MB, instead of the fault it was reporting), #52 the first-chance line names twelve registers.

Still unimplemented and worth picking up: dbghelp.dll!MiniDumpW (the title's breakpad asks for it through GetProcAddress and gets null, so every crash report it uploads has no minidump).

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7242433581 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/338#issuecomment-7242433581). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T16:41:12Z. --- **First real run of a title on the native host — where it stops (Session 4f9c68)** The complete Xbox release is on the volume (`GTA6.Xbox.v1.0.2.1-CYBERLEEK`, 135 GB: `game_scarlett_master.exe` 120 MB plus all seven RPF archives and the seven title DLLs). It binds clean on the native host: **0 missing, 0 stubbed**, 53 hle + 325 host + 209 title symbols across 7 title DLLs (`msvcp140`, `vcruntime140(_1)`, `bink2scarlett`, `xboxbvhbuilder`, `amd_fidelityfx_loader_xbox`, `libhttpclient.gdk`, `XCurl`). The other folder the user had (`GTA VI v1.0.2.1`) has only the exe, which is why every earlier attempt died on 198 stubbed `MSVCP140` imports. What the run does today (headless, `--console series-x`, `--seconds 20`): - maps and binds everything, DirectStorage opens all 11 RPF archives, GameInput enumerates 2 devices, XGameruntime initialises, XPackage enumerates none, Metal device comes up (13 824 MiB title memory), display reports HDR off - then takes a breakpoint exception at `image+0x1330a44` — the `je` at `image+0x1330970` of a retry loop: lock, ask a hash-keyed lookup in the object at `[manager+0x10020]`, unlock, retry while `[obj+0x20] != 0`, assert when the lookup answers false. `managers`/`rbp` say it is reading 64 KiB blocks (`rbp = 0x10000`), and the lookup's operand is the compile-time hash `0xe0c12d7a5d4884c5`, which occurs ten times in `.text`, all in the `0x1330xxx`/`0x28cdxxx` string-free container code - **nothing is asked of the host during the spin**: no DStorage submit (`dstorage: submit` is a debug line and does not appear), no GPU work (only the device creation lines at `victory_gpu=debug`), and the thread dump shows the main thread there with fifteen pool workers idle in `WaitForSingleObject` at `image+[0x221c3c2, 0x2215eca]` So the next blocker is title-side waiting on a load nobody issues, not a stub the host answers wrongly. Anything that gets past it needs a debugger on `0x13308e0`/`0x51d2260` — the two layers above are string-free too. Merged on the way there (all gate-green): #47 module enumeration, #48 `VICTORY_SKIP_TITLE_INT3` honoured on the native path (it was documented and only ever read on Windows), #49 `VICTORY_PEEK` read through the kernel instead of through a register (a run wrote 1.8 M `fatal signal 11` lines, 118 MB, instead of the fault it was reporting), #52 the first-chance line names twelve registers. Still unimplemented and worth picking up: `dbghelp.dll!MiniDumpW` (the title's breakpad asks for it through `GetProcAddress` and gets null, so every crash report it uploads has no minidump).
AnastasisKon commented 2026-11-28 17:13:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T17:13:56Z.


The image+0x1330a44 trap is a machine difference, not a regression — and the stall behind it is one event nobody sets (Session 4f9c68)

Cross-checked against a working run of the same title build (b99f876b…, console Series X) on an M4 Max 128 GB: the log attached to #614, 934 s, frame 3678, no first-chance exception at all.

  1. Not a regression. 26817285 — the commit that log was made with — fails here in exactly the same place (int3 at image+0x1330a44, then the 0xc0000005 write at image+0x1455e56f8), built and run from a worktree of that commit. So the 249 commits since are not what changed.
  2. The two runs are identical up to the first HDR mode: disabled line, and diverge at the next instruction. On the M4 Max the title then calls D3D12XboxCreateDevice (victory_hle::modules::d3d12x: hr=0, five command queues, frame interval 33.333ms, xmem allocation hooks found=true, then frames 1, 2, 4, 8 within a second). Here it takes the assert instead, and with VICTORY_SKIP_TITLE_INT3=1330a44 it never reaches any of that: in 18 s of stepped-over running there is no D3D12XboxCreateDevice, no XMemSetAllocationHooks, no WriteFile, no fwrite in VICTORY_TRACE_IMPORTS=1.
  3. What the run is actually stuck on — VICTORY_TRACE_IMPORTS end with the same pair, about sixty times a second, for the rest of the run: Sleep(0xa) then WaitForSingleObject(0x738, 0xa) returning 0x102 (WAIT_TIMEOUT), both from image+0x5441bec. With handle tracing on every set and release (VICTORY_TRACE_HANDLES, after #56), nothing ever sets 0x738: the only sync traffic in a 15 s run is six release/wait got it pairs on 0x6f8.
  4. Ruled out as the cause: the reported budgets — VICTORY_METAL_TEXTURE_BUDGET_MB=96276 (the M4's suggested budget, vs 24992 here) changes nothing; --console series-s (7 776 MiB title memory) changes nothing; windowed vs --headless changes nothing. Their run reports 110 100 MiB working set and 96 276 MiB suggested texture budget, ours 32 768 and 24 992, so the title does see a much smaller GPU budget here, but neither switch moves it.

So the machine difference is real and worth knowing when reading any tester report of this trap, and the thing to chase is who owns handle 0x738 — the writer thread asserts while the main thread polls an event that no thread in the run ever signals.

Method note for whoever picks this up: the working log in #614 downloads with a plain curl (https://github.com/user-attachments/files/35548682/victory-20261128-142713-11441.log.gz) and is the cheapest ground truth we have for "what a good run looks like" at this stage of bring-up.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7242856227 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/338#issuecomment-7242856227). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T17:13:56Z. --- **The `image+0x1330a44` trap is a machine difference, not a regression — and the stall behind it is one event nobody sets (Session 4f9c68)** Cross-checked against a *working* run of the same title build (`b99f876b…`, console Series X) on an M4 Max 128 GB: the log attached to #614, 934 s, frame 3678, **no first-chance exception at all**. 1. **Not a regression.** `26817285` — the commit that log was made with — fails here in exactly the same place (`int3` at `image+0x1330a44`, then the `0xc0000005` write at `image+0x1455e56f8`), built and run from a worktree of that commit. So the 249 commits since are not what changed. 2. **The two runs are identical up to the first `HDR mode: disabled` line, and diverge at the next instruction.** On the M4 Max the title then calls `D3D12XboxCreateDevice` (`victory_hle::modules::d3d12x: hr=0`, five command queues, `frame interval 33.333ms`, `xmem allocation hooks found=true`, then frames 1, 2, 4, 8 within a second). Here it takes the assert instead, and with `VICTORY_SKIP_TITLE_INT3=1330a44` it never reaches any of that: in 18 s of stepped-over running there is **no `D3D12XboxCreateDevice`, no `XMemSetAllocationHooks`, no `WriteFile`, no `fwrite`** in `VICTORY_TRACE_IMPORTS=1`. 3. **What the run is actually stuck on** — `VICTORY_TRACE_IMPORTS` end with the same pair, about sixty times a second, for the rest of the run: `Sleep(0xa)` then `WaitForSingleObject(0x738, 0xa)` returning `0x102` (WAIT_TIMEOUT), both from `image+0x5441bec`. With handle tracing on every set and release (`VICTORY_TRACE_HANDLES`, after #56), **nothing ever sets `0x738`**: the only sync traffic in a 15 s run is six `release`/`wait got it` pairs on `0x6f8`. 4. **Ruled out as the cause:** the reported budgets — `VICTORY_METAL_TEXTURE_BUDGET_MB=96276` (the M4's suggested budget, vs 24992 here) changes nothing; `--console series-s` (7 776 MiB title memory) changes nothing; windowed vs `--headless` changes nothing. Their run reports 110 100 MiB working set and 96 276 MiB suggested texture budget, ours 32 768 and 24 992, so the title does see a much smaller GPU budget here, but neither switch moves it. So the machine difference is real and worth knowing when reading any tester report of this trap, and the thing to chase is who owns handle `0x738` — the writer thread asserts while the main thread polls an event that no thread in the run ever signals. Method note for whoever picks this up: the working log in #614 downloads with a plain `curl` (`https://github.com/user-attachments/files/35548682/victory-20261128-142713-11441.log.gz`) and is the cheapest ground truth we have for "what a good run looks like" at this stage of bring-up.
AnastasisKon commented 2026-11-28 17:14:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T17:14:24Z.


Correction to the note above, from VICTORY_TRACE_HANDLES: the object the main thread polls is a semaphore, not an event —

handle 0x738 (semaphore) made at image+ [166245a, 5ca7b69, 23ceeda, 2241177, 81b253, 53ec04f, 53ebf3a, 661f0, 1d109c9, 5a91c0d, 56a1e5a, …]
semaphore 0x738 initial 0 max 32767

initial 0, max 32767, and ReleaseSemaphore is never called on it in a whole run (the handle trace logs every release now, and a 15 s run has six release/wait got it pairs on 0x6f8 and nothing else). So the shape is: a worker thread takes the assert at image+0x1330a44, never releases 0x738, and the main thread polls it — Sleep(0xa) then WaitForSingleObject(0x738, 0xa) → 0x102 — about sixty times a second until the title gives up ~31 s later.

The title's storage in ~/.cache/victory/data/7952987A holds nothing but our crash logs after a dozen runs, so whatever wants to be written there (the SGD5 database the writer hands out in 0x10000 chunks) is never written at all — which is also why a second run behaves exactly like the first, cold or warm.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7242862041 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/338#issuecomment-7242862041). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T17:14:24Z. --- Correction to the note above, from `VICTORY_TRACE_HANDLES`: the object the main thread polls is a **semaphore**, not an event — ``` handle 0x738 (semaphore) made at image+ [166245a, 5ca7b69, 23ceeda, 2241177, 81b253, 53ec04f, 53ebf3a, 661f0, 1d109c9, 5a91c0d, 56a1e5a, …] semaphore 0x738 initial 0 max 32767 ``` `initial 0, max 32767`, and **`ReleaseSemaphore` is never called on it** in a whole run (the handle trace logs every release now, and a 15 s run has six `release`/`wait got it` pairs on `0x6f8` and nothing else). So the shape is: a worker thread takes the assert at `image+0x1330a44`, never releases `0x738`, and the main thread polls it — `Sleep(0xa)` then `WaitForSingleObject(0x738, 0xa)` → `0x102` — about sixty times a second until the title gives up ~31 s later. The title's storage in `~/.cache/victory/data/7952987A` holds nothing but our crash logs after a dozen runs, so whatever wants to be written there (the SGD5 database the writer hands out in `0x10000` chunks) is never written at all — which is also why a second run behaves exactly like the first, cold or warm.
AnastasisKon commented 2026-11-28 17:27:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T17:27:10Z.


Two notes from a run on today's main, both about reading the trap's own state rather than guessing across runs.

Heap addresses do move between runs. rsi at the trap has been 0x1478f6a50 in five runs and 0x147906a50 in another, so a VICTORY_DUMP_MEM/VICTORY_PEEK address carried from one run to the next proves nothing — that is what made the manager look like a zeroed page earlier today. Read it in the same run, or not at all: VICTORY_PEEK takes reg+offset now (#58), which is exactly the same-run form.

What the writer holds at the trap, read in the faulting frame (VICTORY_PEEK=rsi+0x10020,rsi+0x10018,rsi+0x10008):

peek 0x147906a70 = 0x181b1ec00     ; [manager+0x10020] = the request, live, not zero
peek 0x147906a68 = 0x10000         ; remaining
peek 0x147906a58 = 0x40000         ; the whole buffer = 33 x 0x840, the SGD5 database

So the request is real, 64 KiB is still outstanding of a 256 KiB total, and the loop is waiting for the record it holds to be accepted — consistent with the SGD5 analysis already in docs/native-host.md.

Also: main was unbuildable for a while today (the peek merge committed its conflict markers into dispatch.rs); #62 resolves it, and #64 makes verify.sh run -p victory-gpu one test thread at a time on a Mac the way test-native.sh already did, so a gate run cannot hang WindowServer again (#548).

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7243027013 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/338#issuecomment-7243027013). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T17:27:10Z. --- Two notes from a run on today's main, both about reading the trap's own state rather than guessing across runs. **Heap addresses do move between runs.** `rsi` at the trap has been `0x1478f6a50` in five runs and `0x147906a50` in another, so a `VICTORY_DUMP_MEM`/`VICTORY_PEEK` address carried from one run to the next proves nothing — that is what made the manager look like a zeroed page earlier today. Read it in the same run, or not at all: `VICTORY_PEEK` takes `reg+offset` now (#58), which is exactly the same-run form. **What the writer holds at the trap, read in the faulting frame** (`VICTORY_PEEK=rsi+0x10020,rsi+0x10018,rsi+0x10008`): ``` peek 0x147906a70 = 0x181b1ec00 ; [manager+0x10020] = the request, live, not zero peek 0x147906a68 = 0x10000 ; remaining peek 0x147906a58 = 0x40000 ; the whole buffer = 33 x 0x840, the SGD5 database ``` So the request is real, 64 KiB is still outstanding of a 256 KiB total, and the loop is waiting for the record it holds to be accepted — consistent with the `SGD5` analysis already in `docs/native-host.md`. Also: `main` was unbuildable for a while today (the peek merge committed its conflict markers into `dispatch.rs`); #62 resolves it, and #64 makes `verify.sh` run `-p victory-gpu` one test thread at a time on a Mac the way `test-native.sh` already did, so a gate run cannot hang WindowServer again (#548).
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS#338
No description provided.