Help wanted: the world is still black. The culling compute now runs but writes zero counts into the mesh records #258

Open
opened 2026-11-27 05:32:07 +00:00 by LakshanSivakumar · 67 comments
LakshanSivakumar commented 2026-11-27 05:32:07 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T05:32:07Z.


@brainbudt @Sheffy007 @Olima34 @lucasferreira1610 @evan-kolberg you have landed most of what is on main, so this is a direct ask: we are stuck on why the world is black, and fresh eyes would help. Anyone else is just as welcome.

Where main is (2a3b03d1)

  • The title no longer dies at the first world frame: pipelines compile off the frame thread (#180). Headless runs go the full time, cold and warm.
  • The world then runs at 1 to 2 fps and is black. This issue is about the black. It continues #182.

What is established

  • World geometry is drawn through indirect mesh draws. Each draw reads a record with a group count. About 98% of those records hold a count of 0, so the draws run and rasterise nothing.
  • One compute shader (e85d0ba6846a5b5e) resets every record's count to 0 each frame. Six culling compute shaders are meant to fill them in: 5833c0c20c5bec9b, b30937e9de066fa9, ff826810673a0198, f44473ebe75e0047, 4e2edbd69fe414f1, 898d9c1a5605ad81. Each does four depth gathers, one atomic add on the count and one buffer store.
  • Depth state and position invariance are ruled out: with the depth test off the G-buffer is no better lit.

What we tried, and what it showed

  • We made all six cullers translate (#245 for three of them, two local branches for the rest). In a 600 s run all six ran in every one of 285 world frames, with no faults or GPU errors. Their record buffers were still 100% zero, and 98.1% of all mesh records were zero. G-buffer targets were 0.6 to 0.7% lit. So dropped cullers were a real problem but not the cause.
  • A GPU test that copies one culler's tail instruction for instruction (first-set-bit and bit count of EXEC, the atomic add, read-first-lane, the store) writes the right count in all three lane layouts. So the count write itself is translated correctly: in the game, no lane reaches the atomic.

Open candidates

  1. The cullers' inputs are empty. They gather from a depth pyramid and read instance and bounds buffers that other compute passes fill. About 830 compute dispatches and 489 of 921 G-buffer draws per frame are still dropped, and 385 compute shaders are still refused (206 of them for "an address into a descriptor heap with an untracked high half"; #250 targets that class). We have not yet identified which texture is the depth pyramid or which pass builds it.
  2. A store that writes nothing, #255 (unconfirmed).
  3. A wrong translation inside the cullers' visibility test, before the tail. Not examined yet.
  4. We read the records at the wrong moment, after a reset. Unlikely, since the frame itself stays black.

Bugs found on the way, each with its own issue

  • #254 v_readfirstlane_b32 ignores EXEC on a split wave (confirmed; it is in all six cullers' tails).
  • #255 a formatted buffer store through a structured or typed writable view stores nothing (unconfirmed).
  • #256 a guarded write that keeps a refused value reads 0 in the other lanes (confirmed wrong accept; counts in the issue).
  • #257 a loop-carried lane mask read after a divergent loop (confirmed wrong accept).

How to look at it yourself

  • VICTORY_TRACE_RECORD_WRITERS=1 (on main) prints, per present, how many indirect mesh records had a count of 0, and each compute program, run or dropped, that holds a record buffer for unordered access, with the textures it reads.
  • VICTORY_DEBUG_NO_DEPTH=1 turns the depth test off.
  • Run headless as docs/ describes; you need your own copy of the title. Please do not attach title files, dumps, shader bytes or disassembly to issues or PRs; shader hashes and log lines from the host are fine.

Where help would move things most

  1. Identify the depth pyramid the six cullers gather from and the pass that builds it, and say whether that pass runs, is dropped, or is refused.
  2. Settle #255 with the view format the title really binds.
  3. Review or beat us to the fix for #254.
  4. Any refusal class from a world frame that you can lift with a corpus comparison by output fingerprint, not only by translated-or-refused counts. Two of our own rule changes this week looked fine by counts and were wrong by output.
  5. If you have a theory we have not listed, say so here, even without a patch.

A short comment saying which item you are taking avoids double work.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6640633504 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T05:32:07Z. --- @brainbudt @Sheffy007 @Olima34 @lucasferreira1610 @evan-kolberg you have landed most of what is on main, so this is a direct ask: we are stuck on why the world is black, and fresh eyes would help. Anyone else is just as welcome. **Where main is (2a3b03d1)** - The title no longer dies at the first world frame: pipelines compile off the frame thread (#180). Headless runs go the full time, cold and warm. - The world then runs at 1 to 2 fps and is black. This issue is about the black. It continues #182. **What is established** - World geometry is drawn through indirect mesh draws. Each draw reads a record with a group count. About 98% of those records hold a count of 0, so the draws run and rasterise nothing. - One compute shader (`e85d0ba6846a5b5e`) resets every record's count to 0 each frame. Six culling compute shaders are meant to fill them in: `5833c0c20c5bec9b`, `b30937e9de066fa9`, `ff826810673a0198`, `f44473ebe75e0047`, `4e2edbd69fe414f1`, `898d9c1a5605ad81`. Each does four depth gathers, one atomic add on the count and one buffer store. - Depth state and position invariance are ruled out: with the depth test off the G-buffer is no better lit. **What we tried, and what it showed** - We made all six cullers translate (#245 for three of them, two local branches for the rest). In a 600 s run all six ran in every one of 285 world frames, with no faults or GPU errors. Their record buffers were still 100% zero, and 98.1% of all mesh records were zero. G-buffer targets were 0.6 to 0.7% lit. So dropped cullers were a real problem but not the cause. - A GPU test that copies one culler's tail instruction for instruction (first-set-bit and bit count of EXEC, the atomic add, read-first-lane, the store) writes the right count in all three lane layouts. So the count write itself is translated correctly: in the game, no lane reaches the atomic. **Open candidates** 1. **The cullers' inputs are empty.** They gather from a depth pyramid and read instance and bounds buffers that other compute passes fill. About 830 compute dispatches and 489 of 921 G-buffer draws per frame are still dropped, and 385 compute shaders are still refused (206 of them for "an address into a descriptor heap with an untracked high half"; #250 targets that class). We have not yet identified which texture is the depth pyramid or which pass builds it. 2. **A store that writes nothing**, #255 (unconfirmed). 3. **A wrong translation inside the cullers' visibility test**, before the tail. Not examined yet. 4. **We read the records at the wrong moment**, after a reset. Unlikely, since the frame itself stays black. **Bugs found on the way, each with its own issue** - #254 `v_readfirstlane_b32` ignores EXEC on a split wave (confirmed; it is in all six cullers' tails). - #255 a formatted buffer store through a structured or typed writable view stores nothing (unconfirmed). - #256 a guarded write that keeps a refused value reads 0 in the other lanes (confirmed wrong accept; counts in the issue). - #257 a loop-carried lane mask read after a divergent loop (confirmed wrong accept). **How to look at it yourself** - `VICTORY_TRACE_RECORD_WRITERS=1` (on main) prints, per present, how many indirect mesh records had a count of 0, and each compute program, run or dropped, that holds a record buffer for unordered access, with the textures it reads. - `VICTORY_DEBUG_NO_DEPTH=1` turns the depth test off. - Run headless as `docs/` describes; you need your own copy of the title. Please do not attach title files, dumps, shader bytes or disassembly to issues or PRs; shader hashes and log lines from the host are fine. **Where help would move things most** 1. Identify the depth pyramid the six cullers gather from and the pass that builds it, and say whether that pass runs, is dropped, or is refused. 2. Settle #255 with the view format the title really binds. 3. Review or beat us to the fix for #254. 4. Any refusal class from a world frame that you can lift with a corpus comparison by output fingerprint, not only by translated-or-refused counts. Two of our own rule changes this week looked fine by counts and were wrong by output. 5. If you have a theory we have not listed, say so here, even without a patch. A short comment saying which item you are taking avoids double work.
Animacustoms commented 2026-11-27 05:51:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Animacustoms on 2026-11-27T05:51:35Z.


Follow-up to #246 after updating to the latest main (tested on MacBook Pro M1 Max, 32 GB, macOS, native runner):

What changed

  • Audio now plays: Unlike the earlier build before 38786fd, the intro audio now starts playing properly.
  • Video is still black: The display window remains completely black throughout the intro, even while the audio is playing.

Environment:

  • Hardware: MacBook Pro (Apple M1 Max, 32-core GPU, 32 GB unified memory)
  • Branch / Commit: main (<commit_hash>)
  • Runner: tools/macos/run-native.sh

victory.log

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211007596 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7211007596). Originally posted by [Animacustoms](https://github.com/Animacustoms) on 2026-11-27T05:51:35Z. --- Follow-up to #246 after updating to the latest `main` (tested on MacBook Pro M1 Max, 32 GB, macOS, native runner): ### What changed * **Audio now plays:** Unlike the earlier build before `38786fd`, the intro audio now starts playing properly. * **Video is still black:** The display window remains completely black throughout the intro, even while the audio is playing. **Environment:** * Hardware: MacBook Pro (Apple M1 Max, 32-core GPU, 32 GB unified memory) * Branch / Commit: `main` (`<commit_hash>`) * Runner: `tools/macos/run-native.sh` [victory.log](https://github.com/user-attachments/files/35497784/victory.log)
Ketan-Kapse commented 2026-11-27 06:00:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Ketan-Kapse on 2026-11-27T06:00:25Z.


We were stuck at exactly this point on a fork (M4 Pro, 24 GB, macOS 27, Series S) and got past it: the six cullers now fill the records and the G-buffer holds a recognisable scene (853x480 colour targets went from 0.6% to about 41% written, the shadow atlas to about 50%). Two host-side causes, both under your candidate 1 ("the cullers' inputs are empty"). Neither was a translation fault in the cullers.

One difference to keep in mind: we answer E_NOTIMPL to the console pipeline methods, so the title uses stream pipelines and our shader hashes are not yours. The cullers are compute either way, and the mechanisms below are in the host.

1. The cullers' scene buffer was a null view

  • The cullers take a buffer view from the resource heap themselves (root constants [0x20, 0x11], heap entry 17 here). It is one view of 174 MiB over the title's arena.
  • The arena's pages are three runs of one pool that are not next to each other, so PoolTable::resolve refused the range and the heap entry got a null view. The cullers read zeros and nothing passed their test.
  • Sign in the log, 982 times in one run: a descriptor was not mirrored error=title address 0x18a40000+0xae00000 is not in a mapped pool. A second range (0xd044a0000+0x3200000) and several smaller ones failed the same way.
  • Fix: a buffer view over several pool runs gets a buffer of its own. The range's 64 KiB pages are placed side by side in an alias (mach_vm_remap), one MTLBuffer wraps it, unmapped pages read zero. It has to follow the title: when the pool table's generation changes, spans whose layout changed are rebuilt and the heap entries that show them are mirrored again. That last part matters because an entry a shader loads itself is in no bound table, so remirror_tables never revisits it.

2. The cullers were dropped at submission for root parameter 255

  • All six cullers and one per-frame record writer translate with root SRV 255. That is the translator's own view-stride table (VIEW_STRIDES in emit/shader.rs), which a shader that takes a buffer view from the heap itself looks up before it reads the entry.
  • The native host never binds it, so translated_args fails with root parameter 255 was never set and the dispatch is dropped by itself at execute(). The comment there already notes "255 observed". These dispatches still count as encoded when they are recorded, which is why they look as if they ran.
  • The reset shader has no such read, so it runs and zeroes the records. That gives exactly the picture in this issue.
  • Fix: one stride table per resource heap (one dword per index a shader can compute: the buffer view's element size at the title's entries, 0 elsewhere), built at first use, kept current where entries are mirrored, bound where the shader has t255.

Since your cullers do run now, cause 1 is the one I would check first: grep a world run for is not in a mapped pool with a length in the megabytes.

A note on measuring

Reading the persistent record buffers from the CPU when the mesh execution is recorded always shows zeros, also in runs where they demonstrably drive draws: the reset pass and the cullers rewrite them every frame and the GPU runs behind the recording. What worked was a GPU copy of the record page encoded just before the first mesh execution that uses it, read back at a later present. With that, the main-view set went from records=24 with_groups=0 to records=79 with_groups=49 groups=409.

Where we are now, for honesty

The window is still black here too. The G-buffer has the scene, but the tiled lighting draws (VS_TiledLighting + the per-material pixel shaders, about 358 draws a frame, none dropped) leave the HDR target empty. That is what we are on now; it looks like the material depth/stencil those draws test against. Skinned cloth is also drawn with its vertices in the wrong place.

Both fixes are on a branch with GPU tests (a view over pages of two pools, a heap entry outside every table that follows pages mapped later, a compute shader reading through the stride table). I can open PRs against main if you want them.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211132229 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7211132229). Originally posted by [Ketan-Kapse](https://github.com/Ketan-Kapse) on 2026-11-27T06:00:25Z. --- We were stuck at exactly this point on a fork (M4 Pro, 24 GB, macOS 27, Series S) and got past it: the six cullers now fill the records and the G-buffer holds a recognisable scene (853x480 colour targets went from 0.6% to about 41% written, the shadow atlas to about 50%). Two host-side causes, both under your candidate 1 ("the cullers' inputs are empty"). Neither was a translation fault in the cullers. One difference to keep in mind: we answer `E_NOTIMPL` to the console pipeline methods, so the title uses stream pipelines and our shader hashes are not yours. The cullers are compute either way, and the mechanisms below are in the host. **1. The cullers' scene buffer was a null view** - The cullers take a buffer view from the resource heap themselves (root constants `[0x20, 0x11]`, heap entry 17 here). It is one view of 174 MiB over the title's arena. - The arena's pages are three runs of one pool that are not next to each other, so `PoolTable::resolve` refused the range and the heap entry got a null view. The cullers read zeros and nothing passed their test. - Sign in the log, 982 times in one run: `a descriptor was not mirrored error=title address 0x18a40000+0xae00000 is not in a mapped pool`. A second range (`0xd044a0000+0x3200000`) and several smaller ones failed the same way. - Fix: a buffer view over several pool runs gets a buffer of its own. The range's 64 KiB pages are placed side by side in an alias (`mach_vm_remap`), one `MTLBuffer` wraps it, unmapped pages read zero. It has to follow the title: when the pool table's generation changes, spans whose layout changed are rebuilt and the heap entries that show them are mirrored again. That last part matters because an entry a shader loads itself is in no bound table, so `remirror_tables` never revisits it. **2. The cullers were dropped at submission for root parameter 255** - All six cullers and one per-frame record writer translate with root SRV 255. That is the translator's own view-stride table (`VIEW_STRIDES` in `emit/shader.rs`), which a shader that takes a buffer view from the heap itself looks up before it reads the entry. - The native host never binds it, so `translated_args` fails with `root parameter 255 was never set` and the dispatch is dropped by itself at `execute()`. The comment there already notes "255 observed". These dispatches still count as encoded when they are recorded, which is why they look as if they ran. - The reset shader has no such read, so it runs and zeroes the records. That gives exactly the picture in this issue. - Fix: one stride table per resource heap (one dword per index a shader can compute: the buffer view's element size at the title's entries, 0 elsewhere), built at first use, kept current where entries are mirrored, bound where the shader has `t255`. Since your cullers do run now, cause 1 is the one I would check first: grep a world run for `is not in a mapped pool` with a length in the megabytes. **A note on measuring** Reading the persistent record buffers from the CPU when the mesh execution is recorded always shows zeros, also in runs where they demonstrably drive draws: the reset pass and the cullers rewrite them every frame and the GPU runs behind the recording. What worked was a GPU copy of the record page encoded just before the first mesh execution that uses it, read back at a later present. With that, the main-view set went from `records=24 with_groups=0` to `records=79 with_groups=49 groups=409`. **Where we are now, for honesty** The window is still black here too. The G-buffer has the scene, but the tiled lighting draws (`VS_TiledLighting` + the per-material pixel shaders, about 358 draws a frame, none dropped) leave the HDR target empty. That is what we are on now; it looks like the material depth/stencil those draws test against. Skinned cloth is also drawn with its vertices in the wrong place. Both fixes are on a branch with GPU tests (a view over pages of two pools, a heap entry outside every table that follows pages mapped later, a compute shader reading through the stride table). I can open PRs against main if you want them.
LakshanSivakumar commented 2026-11-27 06:05:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T06:05:29Z.


@Ketan-Kapse this is the most useful thing anyone has posted on this, thank you. Yes please, open the PRs against main.

Cause 1 matches our logs exactly. Our last 600 s world run (main plus the culler fixes, 285 world frames) has 3,005 "not in a mapped pool" lines, and the two big ones are the same sizes as yours:

Count Range
606 0x178a0000+0xae00000 (174 MiB)
134 0xd03f80000+0x3200000 (50 MiB)
789 0x0+0x0
399 0x7fd67a010000+0x1412200
231 0x7fd6e89b0000+0x20000

So the scene buffer view is null here too, on the console-pipeline path with different hashes. We had these lines down as upload blocks (#100) and never looked at the lengths.

Cause 2 I cannot confirm yet. That run has no root parameter 255 line at all. Either our cullers do not take that path, or the drop is silent here. If you know which log line or counter shows it on your side, say so and I will look for the equivalent. Our trace said the cullers "ran" on the strength of the dispatch being recorded, which is exactly the trap you describe.

On measuring: you are right, and it retracts part of this issue. Our "the cullers' buffers are 100% zero" was read from the CPU as each mesh execution was recorded. By your account that reads zero even when the records drive draws, so that number proved nothing. The low G-buffer coverage (0.6 to 0.7%) still stands as the symptom. A GPU copy of the record page before the first mesh execution, read back at a later present, is the right probe; if yours is small, it would be welcome as its own PR or inside the first one, behind a switch.

For the PRs

  • Two PRs, please: the view over several pool runs (with the rebuild on a pool-table generation change and the re-mirror of entries outside every table), and the per-heap stride table. They can be reviewed and run apart.
  • The GPU tests you describe are exactly what we want. No title files, dumps or shader bytes in the PR, as usual.
  • For the alias: say what happens when a page inside the span is unmapped later, and what the span costs in address space for a 174 MiB view. 16 GB machines are already tight (#8, #79).
  • I will run each one on the console-pipeline path with the record-writers trace and post G-buffer coverage before and after.

Where you are now is where we will be next, so two things from our side in case they help: #256 is a confirmed wrong accept in the translator where a guarded write keeps a value we could not translate and the other lanes read 0; one known victim multiplies colours by that 0. And #254 (v_readfirstlane_b32 ignoring EXEC on a split wave) sits in the cullers' tails and would misplace the visible-instance entries. Neither explains an empty HDR target by itself, but both produce wrong values without a refusal, which is the kind of thing that hides behind "none dropped".

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211207531 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7211207531). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T06:05:29Z. --- @Ketan-Kapse this is the most useful thing anyone has posted on this, thank you. Yes please, open the PRs against main. **Cause 1 matches our logs exactly.** Our last 600 s world run (main plus the culler fixes, 285 world frames) has 3,005 "not in a mapped pool" lines, and the two big ones are the same sizes as yours: | Count | Range | |---|---| | 606 | `0x178a0000+0xae00000` (174 MiB) | | 134 | `0xd03f80000+0x3200000` (50 MiB) | | 789 | `0x0+0x0` | | 399 | `0x7fd67a010000+0x1412200` | | 231 | `0x7fd6e89b0000+0x20000` | So the scene buffer view is null here too, on the console-pipeline path with different hashes. We had these lines down as upload blocks (#100) and never looked at the lengths. **Cause 2 I cannot confirm yet.** That run has no `root parameter 255` line at all. Either our cullers do not take that path, or the drop is silent here. If you know which log line or counter shows it on your side, say so and I will look for the equivalent. Our trace said the cullers "ran" on the strength of the dispatch being recorded, which is exactly the trap you describe. **On measuring: you are right, and it retracts part of this issue.** Our "the cullers' buffers are 100% zero" was read from the CPU as each mesh execution was recorded. By your account that reads zero even when the records drive draws, so that number proved nothing. The low G-buffer coverage (0.6 to 0.7%) still stands as the symptom. A GPU copy of the record page before the first mesh execution, read back at a later present, is the right probe; if yours is small, it would be welcome as its own PR or inside the first one, behind a switch. **For the PRs** - Two PRs, please: the view over several pool runs (with the rebuild on a pool-table generation change and the re-mirror of entries outside every table), and the per-heap stride table. They can be reviewed and run apart. - The GPU tests you describe are exactly what we want. No title files, dumps or shader bytes in the PR, as usual. - For the alias: say what happens when a page inside the span is unmapped later, and what the span costs in address space for a 174 MiB view. 16 GB machines are already tight (#8, #79). - I will run each one on the console-pipeline path with the record-writers trace and post G-buffer coverage before and after. **Where you are now** is where we will be next, so two things from our side in case they help: #256 is a confirmed wrong accept in the translator where a guarded write keeps a value we could not translate and the other lanes read 0; one known victim multiplies colours by that 0. And #254 (`v_readfirstlane_b32` ignoring EXEC on a split wave) sits in the cullers' tails and would misplace the visible-instance entries. Neither explains an empty HDR target by itself, but both produce wrong values without a refusal, which is the kind of thing that hides behind "none dropped".
Ketan-Kapse commented 2026-11-27 06:08:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Ketan-Kapse on 2026-11-27T06:08:20Z.


Will do: two PRs as you describe (the view over several pool runs with its rebuild and re-mirror; the per-heap stride table), tests only, no title bytes. The record-page probe can follow as a third, behind a switch.

On cause 2, where to look. On our side the drop is silent unless the target trace is on, which may be why your log has no line:

  • It happens in execute() in native/host.rs, in the block whose comment says "255 observed". translated_args returns root parameter 255 was never set, that one command is dropped, and only the unset_roots counter moves. Nothing printed that counter.
  • The one-time warning is native host drops work: a draw or dispatch that reads a root parameter the title never set (first time) error=root parameter 255 was never set, and it is only logged with VICTORY_TRACE_TARGETS=1.
  • Offline check that needs no run: translate one of your cullers and look at its root SRVs. Ours all list 255 and have the heap flag set; the reset shader lists none.

If your cullers show no SRV 255, then they reach their buffers another way on the console-pipeline path and cause 1 is your whole story.

I will answer the alias questions (a page unmapped later, address space for the 174 MiB view) in the PR text with numbers from a run.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211250444 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7211250444). Originally posted by [Ketan-Kapse](https://github.com/Ketan-Kapse) on 2026-11-27T06:08:20Z. --- Will do: two PRs as you describe (the view over several pool runs with its rebuild and re-mirror; the per-heap stride table), tests only, no title bytes. The record-page probe can follow as a third, behind a switch. **On cause 2, where to look.** On our side the drop is silent unless the target trace is on, which may be why your log has no line: - It happens in `execute()` in `native/host.rs`, in the block whose comment says "255 observed". `translated_args` returns `root parameter 255 was never set`, that one command is dropped, and only the `unset_roots` counter moves. Nothing printed that counter. - The one-time warning is `native host drops work: a draw or dispatch that reads a root parameter the title never set (first time) error=root parameter 255 was never set`, and it is only logged with `VICTORY_TRACE_TARGETS=1`. - Offline check that needs no run: translate one of your cullers and look at its root SRVs. Ours all list `255` and have the heap flag set; the reset shader lists none. If your cullers show no SRV 255, then they reach their buffers another way on the console-pipeline path and cause 1 is your whole story. I will answer the alias questions (a page unmapped later, address space for the 174 MiB view) in the PR text with numbers from a run.
Olima34 commented 2026-11-27 06:22:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T06:22:04Z.


Answering item 1 (the cullers' inputs are empty). One input is nulled by the host: the cullers read their instance data from a heap buffer view that NativeHost::mirror writes as the null view.

Measured on 2a3b03d1 + #253 (M5 Pro, Series S, windowed), with a local trace of what given compute programs read when they're encoded:

  • What the culler reads: ff826810673a0198 has root constants [32, 17] (later [32, 17, 9937, 9936]). It loads a buffer descriptor from the resource heap at index 17 (s_load_dwordx4 s[20:23], heap base + 17<<5), then reads its instance data from it with s_buffer_load.
  • Heap entry 17 is nulled: it is title buffer 0x24010000, 182,452,224 bytes. That's the "174 MB … not mirrored … not in a mapped pool" line in every run. Its range isn't linear in one pool, because the pool pages are scattered or in descending order. So the host writes the null view and the culler reads zeros. On the CPU, the same title memory holds real data: 31.6% of its first 64 KiB is non-zero.
  • Entry 9936 is nulled too: 0xd0eab0000, 52 MB. Entry 9937 (26 MB) is mirrored correctly.
  • The other inputs look sane:
    • The pass constants hold plausible camera values (1280x720, a 10,000 far plane, matrices).
    • The depth pyramid (fmt 41, 512x256, 9 mips, table entry 2) is about 97% zeros. With reverse Z, as the test reads it (it culls where the object's depth is below min(4 texels, 1.0)), a zero pyramid occludes nothing.
  • The chain: the instance bounds read as 0, so the projected depth comes out 0 or NaN. v_cmp_nge is true on NaN, so every instance is culled. No lane reaches the atomic, the records stay 0, and the G-buffer is black.

The fix we're doing is host-only, with no translator change. When a heap buffer view's range isn't linear in one pool but the title's own address range is fully mapped, we wrap that title VA range (wrap_title_memory) instead of writing the null view. A PR with a Metal test and a G-buffer measurement will follow. Before that, I won't call it the whole answer: the 640x360 R32F/R32UI inputs still hold zeros and garbage, and their candidate writers are refused.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211463124 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7211463124). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T06:22:04Z. --- Answering item 1 (the cullers' inputs are empty). One input is nulled by the host: the cullers read their instance data from a heap buffer view that `NativeHost::mirror` writes as the null view. Measured on 2a3b03d1 + #253 (M5 Pro, Series S, windowed), with a local trace of what given compute programs read when they're encoded: - **What the culler reads:** `ff826810673a0198` has root constants `[32, 17]` (later `[32, 17, 9937, 9936]`). It loads a buffer descriptor from the resource heap at index 17 (`s_load_dwordx4 s[20:23]`, heap base + `17<<5`), then reads its instance data from it with `s_buffer_load`. - **Heap entry 17 is nulled:** it is title buffer `0x24010000`, 182,452,224 bytes. That's the "174 MB … not mirrored … not in a mapped pool" line in every run. Its range isn't linear in one pool, because the pool pages are scattered or in descending order. So the host writes the null view and the culler reads zeros. On the CPU, the same title memory holds real data: 31.6% of its first 64 KiB is non-zero. - **Entry 9936 is nulled too:** `0xd0eab0000`, 52 MB. Entry 9937 (26 MB) is mirrored correctly. - **The other inputs look sane:** - The pass constants hold plausible camera values (1280x720, a 10,000 far plane, matrices). - The depth pyramid (fmt 41, 512x256, 9 mips, table entry 2) is about 97% zeros. With reverse Z, as the test reads it (it culls where the object's depth is below `min(4 texels, 1.0)`), a zero pyramid occludes nothing. - **The chain:** the instance bounds read as 0, so the projected depth comes out 0 or NaN. `v_cmp_nge` is true on NaN, so every instance is culled. No lane reaches the atomic, the records stay 0, and the G-buffer is black. The fix we're doing is host-only, with no translator change. When a heap buffer view's range isn't linear in one pool but the title's own address range is fully mapped, we wrap that title VA range (`wrap_title_memory`) instead of writing the null view. A PR with a Metal test and a G-buffer measurement will follow. Before that, I won't call it the whole answer: the 640x360 R32F/R32UI inputs still hold zeros and garbage, and their candidate writers are refused.
Ketan-Kapse commented 2026-11-27 06:26:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Ketan-Kapse on 2026-11-27T06:26:17Z.


@Olima34 that is the same entry and the same chain we found, good to see it measured independently on the console-pipeline path.

To avoid two PRs for one fix: go ahead with yours for the null view. I will hold our version of it and send only what yours does not cover once it is up. We built it as an alias of the pool pages side by side; wrapping the title's own address range is simpler if Metal takes it, and I have no reason to prefer ours.

Two things cost us runs after the first version worked, in case they save you one:

  • The range is not fully mapped when the view is made. The arena's entry was written once, early, and the title kept mapping pages into that range for minutes afterwards. Whatever was unmapped at that moment read zero for the rest of the run, which showed up as geometry with some vertices at the origin (long spikes in the shadow atlas). A "fully mapped" condition would also have left the entry null here at first, with nothing to retry it.
  • Nothing revisits that entry. It is loaded by the shader itself, so it is in no bound table and remirror_tables never mirrors it again. We ended up checking at the start of each submission whether the pool table's generation changed, and then mirroring again the entries whose range changed or that were left null because their memory was unmapped. Cheap when nothing changed (one comparison).

Still coming from here: the stride table (root SRV 255) and the export-order fix for #181.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211526558 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7211526558). Originally posted by [Ketan-Kapse](https://github.com/Ketan-Kapse) on 2026-11-27T06:26:17Z. --- @Olima34 that is the same entry and the same chain we found, good to see it measured independently on the console-pipeline path. To avoid two PRs for one fix: go ahead with yours for the null view. I will hold our version of it and send only what yours does not cover once it is up. We built it as an alias of the pool pages side by side; wrapping the title's own address range is simpler if Metal takes it, and I have no reason to prefer ours. Two things cost us runs after the first version worked, in case they save you one: - **The range is not fully mapped when the view is made.** The arena's entry was written once, early, and the title kept mapping pages into that range for minutes afterwards. Whatever was unmapped at that moment read zero for the rest of the run, which showed up as geometry with some vertices at the origin (long spikes in the shadow atlas). A "fully mapped" condition would also have left the entry null here at first, with nothing to retry it. - **Nothing revisits that entry.** It is loaded by the shader itself, so it is in no bound table and `remirror_tables` never mirrors it again. We ended up checking at the start of each submission whether the pool table's generation changed, and then mirroring again the entries whose range changed or that were left null because their memory was unmapped. Cheap when nothing changed (one comparison). Still coming from here: the stride table (root SRV 255) and the export-order fix for #181.
LakshanSivakumar commented 2026-11-27 06:48:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T06:48:25Z.


Thank you for retesting on current main. Audio playing now matches the watchdog fix.

This is the right place for the black picture. The current lead is in the comments below: a buffer view over several pool runs is refused, and the log says so. Could you count, in your victory.log, the lines that contain is not in a mapped pool with a length in megabytes (for example +0xae00000)? Please post the count and the three most frequent ranges.

Please also give the real commit hash; the report still shows <commit_hash>.

A separate pull request, #260, says it fixes a black picture in the menus and boot movie. It is not merged and I have not run it. If you build that branch and the intro changes, please say so here.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211864103 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7211864103). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T06:48:25Z. --- Thank you for retesting on current main. Audio playing now matches the watchdog fix. This is the right place for the black picture. The current lead is in the comments below: a buffer view over several pool runs is refused, and the log says so. Could you count, in your victory.log, the lines that contain `is not in a mapped pool` with a length in megabytes (for example `+0xae00000`)? Please post the count and the three most frequent ranges. Please also give the real commit hash; the report still shows `<commit_hash>`. A separate pull request, #260, says it fixes a black picture in the menus and boot movie. It is not merged and I have not run it. If you build that branch and the intro changes, please say so here.
LakshanSivakumar commented 2026-11-27 06:48:26 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T06:48:26Z.


Thank you for measuring this independently. Entry 17 at 182,452,224 bytes is the same buffer as the 174 MiB range in our log, and it is good to have the second nulled entry (9936) named.

Ketan-Kapse has said in this thread that you should go ahead with the null view and that he holds his alias version. Please keep to that so we do not get two pull requests. His comment above lists two problems that cost him runs after his first version worked, and I would like your pull request to answer both:

  • The range was not fully mapped when the entry was written. The title kept mapping pages into it afterwards, and whatever was unmapped at that moment read zero. A "fully mapped" condition would leave the entry null with nothing to retry it.
  • The entry is loaded by the shader itself, so it is in no bound table and remirror_tables never visits it again.

Please say in the text what happens to a page inside the wrapped range that is unmapped later, and what the wrap costs in address space for a 174 MiB view, because 16 GB machines are tight (#8, #79). A Metal test and the G-buffer coverage before and after are what I will look for.

Two questions. The NaN step in your chain (v_cmp_nge true on NaN, so every instance is culled) is the one I cannot check from the log: could the test show it? And pull request #100 changes how the pool arena is built: do the not in a mapped pool lines change with it? I have not checked.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211864462 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7211864462). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T06:48:26Z. --- Thank you for measuring this independently. Entry 17 at 182,452,224 bytes is the same buffer as the 174 MiB range in our log, and it is good to have the second nulled entry (9936) named. Ketan-Kapse has said in this thread that you should go ahead with the null view and that he holds his alias version. Please keep to that so we do not get two pull requests. His comment above lists two problems that cost him runs after his first version worked, and I would like your pull request to answer both: - The range was not fully mapped when the entry was written. The title kept mapping pages into it afterwards, and whatever was unmapped at that moment read zero. A "fully mapped" condition would leave the entry null with nothing to retry it. - The entry is loaded by the shader itself, so it is in no bound table and `remirror_tables` never visits it again. Please say in the text what happens to a page inside the wrapped range that is unmapped later, and what the wrap costs in address space for a 174 MiB view, because 16 GB machines are tight (#8, #79). A Metal test and the G-buffer coverage before and after are what I will look for. Two questions. The NaN step in your chain (`v_cmp_nge` true on NaN, so every instance is culled) is the one I cannot check from the log: could the test show it? And pull request #100 changes how the pool arena is built: do the `not in a mapped pool` lines change with it? I have not checked.
LakshanSivakumar commented 2026-11-27 06:48:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T06:48:28Z.


Thank you, that settles who does what: Olima34 sends the null view, you send the stride table (root SRV 255) and the export-order change for #181, and the record-page probe can follow behind a switch.

On the drop being silent: I read native/host.rs on main and it is as you say. The command is dropped in execute(), only the unset_roots counter moves, and the warning is written once and only with VICTORY_TRACE_TARGETS=1. That explains why our log has no root parameter 255 line. I have not yet run it with the trace on, and I have not yet looked at the root SRVs of our cullers.

marcus-4 has a test in #255 that fails on main for the same missing table. Please look at it; it may belong in your stride table pull request.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211864872 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7211864872). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T06:48:28Z. --- Thank you, that settles who does what: Olima34 sends the null view, you send the stride table (root SRV 255) and the export-order change for #181, and the record-page probe can follow behind a switch. On the drop being silent: I read `native/host.rs` on main and it is as you say. The command is dropped in `execute()`, only the `unset_roots` counter moves, and the warning is written once and only with `VICTORY_TRACE_TARGETS=1`. That explains why our log has no `root parameter 255` line. I have not yet run it with the trace on, and I have not yet looked at the root SRVs of our cullers. marcus-4 has a test in #255 that fails on main for the same missing table. Please look at it; it may belong in your stride table pull request.
Olima34 commented 2026-11-27 06:52:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T06:52:15Z.


Update: the fix for the nulled culler input is #267. With it, heap entry 17 is wrapped and read with no GPU errors, but mesh record buffer A is still 100% zero after the GPU has run the frame, so this was one missing input, not the last gate. The cullers do run groups (indirect counts at encode time: 248, 81, 64, 62, 129, 2,389, 1,750). We're now looking at item 3: per-lane values of the projected-depth test in one real culler dispatch.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211923595 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7211923595). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T06:52:15Z. --- Update: the fix for the nulled culler input is #267. With it, heap entry 17 is wrapped and read with no GPU errors, but mesh record buffer A is still 100% zero after the GPU has run the frame, so this was one missing input, not the last gate. The cullers do run groups (indirect counts at encode time: 248, 81, 64, 62, 129, 2,389, 1,750). We're now looking at item 3: per-lane values of the projected-depth test in one real culler dispatch.
Olima34 commented 2026-11-27 07:03:51 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T07:03:51Z.


A note on the diagnostic: on 2a3b03d1, VICTORY_TRACE_RECORD_WRITERS=1 crashed the host with SIGSEGV at the first world frame in 2 of 3 runs. The system crash report shows glue::dispatch → glue::trace_record_dispatch + 99, then a jump to a title address (KERN_INVALID_ADDRESS 0x61). Runs without the switch don't crash. A guess I haven't checked: table_views reads a resource object from a table that is already stale, and calls resource::buffer_bytes on it through its vtable. Separately, #267 now caches the wrapped title ranges by a signature of their mappings, so a remap is picked up.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7212106253 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7212106253). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T07:03:51Z. --- A note on the diagnostic: on 2a3b03d1, `VICTORY_TRACE_RECORD_WRITERS=1` crashed the host with SIGSEGV at the first world frame in 2 of 3 runs. The system crash report shows `glue::dispatch` → `glue::trace_record_dispatch` + 99, then a jump to a title address (KERN_INVALID_ADDRESS 0x61). Runs without the switch don't crash. A guess I haven't checked: `table_views` reads a resource object from a table that is already stale, and calls `resource::buffer_bytes` on it through its vtable. Separately, #267 now caches the wrapped title ranges by a signature of their mappings, so a remap is picked up.
Sandile-0511 commented 2026-11-27 07:20:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Sandile-0511 on 2026-11-27T07:20:23Z.


Taking item 4 (refusal classes from a world frame, compared by output), and I have numbers for the open shader PRs that may save you some runs.

Corpus. 21,608 containers: every shader the title registered in one run that reached the prologue world (M5, 24 GB, Series S, title build 1.0.2.1; compute 2,761, pixel 10,000, vertex 8,847). 2,232 of them were first bound from the first world frame on. Each is translated with emit::translate_with and the native host's options (wave32_host, zero_copy_memory) and compared by outcome and by a fingerprint of the DXIL plus everything else in HostShader. Two sweeps of one build are identical. On main 2a3b03d1: 17,479 translate and 4,129 are refused; of the 2,232 world shaders, 481 are refused.

The open PRs against that baseline (each PR's diff applied to 2a3b03d1; all applied cleanly):

Newly translated Output changed Newly refused Also
#250 (both revisions: 3cee03b, and 4b87810 after today's rebase) 0 0 0 one compute shader no longer finishes translating (details on the PR)
#253 4 compute (3 in the world) 0 0 as its description says
#259 0 0 0 no shader of this corpus changes
#261 2 compute 0 0 347 (346 pixel) stop at another refusal
#262 64 (52 pixel, 9 vertex, 3 compute; 2 in the world) 17 compute (8 in the world) 0 55 stop at another refusal
the branch proposed on #254 0 351 compute (127 in the world) 32 compute (14 in the world) numbers on #254

For candidate 1. "An address into a descriptor heap with an untracked high half" is 798 shaders here (776 compute, 22 vertex), 205 of them bound in the world: the largest class of the world frame. #250 lifts none of them on this corpus, in either revision. So that class is still open. I am grouping the 798 by shape and will post the groups on #250, so the work is not done twice.

What I am taking, each with a corpus comparison by fingerprint before anything is proposed:

  • "a descriptor neither loaded nor built" (299; 88 in the world);
  • a descriptor's words read as data (675; 47 in the world) and "a descriptor built around a table in the code" (115; 23);
  • the pixel-input refusals "barycentrics read directly" and "the first half of an interpolation" (604; 24);
  • settling #255 with a Metal test.

One class that is not a translation refusal. 179 guessed pipelines of the world frame draw into [Rgba16Float, R32Uint] with D32FloatS8 and are refused by Metal: "output of type float4 is not compatible with a MTLPixelFormatR32Uint color attachment" (D3D12 takes a float output for an integer target). I have a change that translates the pixel shader with those outputs unsigned when the targets bound at the draw are integer formats; in a run the 179 refusals go to 0. I will open a PR once its Metal test is in.

On cause 2. Offline, all six cullers translate with root SRV 255 and the heap flag set on the console-pipeline path too (the three that need #253, with it applied); the reset shader e85d0ba6846a5b5e has neither. So #264 applies to main's path.

AI-assisted: sweeps and summary done with Claude Code on my own machine; I reviewed the text.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7212375584 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7212375584). Originally posted by [Sandile-0511](https://github.com/Sandile-0511) on 2026-11-27T07:20:23Z. --- Taking item 4 (refusal classes from a world frame, compared by output), and I have numbers for the open shader PRs that may save you some runs. **Corpus.** 21,608 containers: every shader the title registered in one run that reached the prologue world (M5, 24 GB, Series S, title build 1.0.2.1; compute 2,761, pixel 10,000, vertex 8,847). 2,232 of them were first bound from the first world frame on. Each is translated with `emit::translate_with` and the native host's options (`wave32_host`, `zero_copy_memory`) and compared by outcome and by a fingerprint of the DXIL plus everything else in `HostShader`. Two sweeps of one build are identical. On main `2a3b03d1`: 17,479 translate and 4,129 are refused; of the 2,232 world shaders, 481 are refused. **The open PRs against that baseline** (each PR's diff applied to `2a3b03d1`; all applied cleanly): | | Newly translated | Output changed | Newly refused | Also | |---|---|---|---|---| | #250 (both revisions: `3cee03b`, and `4b87810` after today's rebase) | 0 | 0 | 0 | one compute shader no longer finishes translating (details on the PR) | | #253 | 4 compute (3 in the world) | 0 | 0 | as its description says | | #259 | 0 | 0 | 0 | no shader of this corpus changes | | #261 | 2 compute | 0 | 0 | 347 (346 pixel) stop at another refusal | | #262 | 64 (52 pixel, 9 vertex, 3 compute; 2 in the world) | 17 compute (8 in the world) | 0 | 55 stop at another refusal | | the branch proposed on #254 | 0 | 351 compute (127 in the world) | 32 compute (14 in the world) | numbers on #254 | **For candidate 1.** "An address into a descriptor heap with an untracked high half" is 798 shaders here (776 compute, 22 vertex), 205 of them bound in the world: the largest class of the world frame. #250 lifts none of them on this corpus, in either revision. So that class is still open. I am grouping the 798 by shape and will post the groups on #250, so the work is not done twice. **What I am taking**, each with a corpus comparison by fingerprint before anything is proposed: - "a descriptor neither loaded nor built" (299; 88 in the world); - a descriptor's words read as data (675; 47 in the world) and "a descriptor built around a table in the code" (115; 23); - the pixel-input refusals "barycentrics read directly" and "the first half of an interpolation" (604; 24); - settling #255 with a Metal test. **One class that is not a translation refusal.** 179 guessed pipelines of the world frame draw into `[Rgba16Float, R32Uint]` with `D32FloatS8` and are refused by Metal: "output of type float4 is not compatible with a MTLPixelFormatR32Uint color attachment" (D3D12 takes a float output for an integer target). I have a change that translates the pixel shader with those outputs unsigned when the targets bound at the draw are integer formats; in a run the 179 refusals go to 0. I will open a PR once its Metal test is in. **On cause 2.** Offline, all six cullers translate with root SRV 255 and the heap flag set on the console-pipeline path too (the three that need #253, with it applied); the reset shader `e85d0ba6846a5b5e` has neither. So #264 applies to main's path. *AI-assisted: sweeps and summary done with Claude Code on my own machine; I reviewed the text.*
Ketan-Kapse commented 2026-11-27 07:55:49 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Ketan-Kapse on 2026-11-27T07:55:49Z.


@Olima34 that is the same state we had after our first version of the null-view fix: entry 17 readable, records still empty. What opened it here was the second cause, the stride table at root SRV 255, which is now up as #264 (and the export-order change for #181 as #263). With the trace on (VICTORY_TRACE_TARGETS=1) the drop shows as root parameter 255 was never set; without it only unset_roots moves. If your cullers list SRV 255, #267 plus #264 together should be what fills the records; either alone did not here.

One caution on "100% zero after the GPU has run the frame": the reset pass zeroes the persistent record buffers every frame, so a read at any time other than between the cullers and the mesh executions can still show zeros. The copy encoded just before the first mesh execution that uses the page was the only read we could trust.

I will look at the test in #255 for the stride table PR.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7212959859 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7212959859). Originally posted by [Ketan-Kapse](https://github.com/Ketan-Kapse) on 2026-11-27T07:55:49Z. --- @Olima34 that is the same state we had after our first version of the null-view fix: entry 17 readable, records still empty. What opened it here was the second cause, the stride table at root SRV 255, which is now up as #264 (and the export-order change for #181 as #263). With the trace on (`VICTORY_TRACE_TARGETS=1`) the drop shows as `root parameter 255 was never set`; without it only `unset_roots` moves. If your cullers list SRV 255, #267 plus #264 together should be what fills the records; either alone did not here. One caution on "100% zero after the GPU has run the frame": the reset pass zeroes the persistent record buffers every frame, so a read at any time other than between the cullers and the mesh executions can still show zeros. The copy encoded just before the first mesh execution that uses the page was the only read we could trust. I will look at the test in #255 for the stride table PR.
LakshanSivakumar commented 2026-11-27 08:07:45 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T08:07:45Z.


Thank you for the log. I counted it, so you do not need to.

It is a good log, and it shows your black picture is not the world problem. It is commit 2a3b03d, the run is the intro only (about two and a half minutes, no world frame, no mesh draws), and there are 32 is not in a mapped pool lines in 16 ranges, each twice. The largest is 24 MiB; the 174 MiB range from the world log does not appear. There is one refused shader pair and no command buffer failure.

That matches the cause in pull request #260. Sandile-0511 reports that on the same commit the window stays black, and with #260 the boot movie shows. I have not run it myself. If you can build the branch of #260 and start the game again, please tell me whether the intro shows a picture, and give me the new # commit line from the top of the log.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7213181506 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7213181506). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T08:07:45Z. --- Thank you for the log. I counted it, so you do not need to. It is a good log, and it shows your black picture is not the world problem. It is commit 2a3b03d, the run is the intro only (about two and a half minutes, no world frame, no mesh draws), and there are 32 `is not in a mapped pool` lines in 16 ranges, each twice. The largest is 24 MiB; the 174 MiB range from the world log does not appear. There is one refused shader pair and no command buffer failure. That matches the cause in pull request #260. Sandile-0511 reports that on the same commit the window stays black, and with #260 the boot movie shows. I have not run it myself. If you can build the branch of #260 and start the game again, please tell me whether the intro shows a picture, and give me the new `# commit` line from the top of the log.
LakshanSivakumar commented 2026-11-27 08:07:48 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T08:07:48Z.


Thank you, and thank you for saying plainly that #267 is one input and not the last gate.

Two points before you spend runs on item 3.

First, Ketan-Kapse says in his latest comment that the same thing happened to him after his first null view fix: entry 17 readable, records still empty. What opened it for him was the stride table at root SRV 255, which is his pull request #264. He says #267 and #264 together fill the records and that either alone did not. Please try them together before you look at the depth test. I have not run either.

Second, he says the reset pass zeroes the persistent record buffers every frame, so "100 percent zero after the GPU has run the frame" may be the reset and not the cullers. The read he could trust was the copy encoded just before the first mesh execution that uses the page. Please say where your read happened. I have not checked this myself.

The NaN question (does v_cmp_nge on the projected depth cull every lane) stays open until the first two are settled.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7213182430 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7213182430). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T08:07:48Z. --- Thank you, and thank you for saying plainly that #267 is one input and not the last gate. Two points before you spend runs on item 3. First, Ketan-Kapse says in his latest comment that the same thing happened to him after his first null view fix: entry 17 readable, records still empty. What opened it for him was the stride table at root SRV 255, which is his pull request #264. He says #267 and #264 together fill the records and that either alone did not. Please try them together before you look at the depth test. I have not run either. Second, he says the reset pass zeroes the persistent record buffers every frame, so "100 percent zero after the GPU has run the frame" may be the reset and not the cullers. The read he could trust was the copy encoded just before the first mesh execution that uses the page. Please say where your read happened. I have not checked this myself. The NaN question (does `v_cmp_nge` on the projected depth cull every lane) stays open until the first two are settled.
LakshanSivakumar commented 2026-11-27 08:07:50 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T08:07:50Z.


Thank you for the crash report on the diagnostic. That switch is mine, from 2a3b03d1, so the crash is my bug. Your guess (a resource object read from a stale table) is plausible; I have not checked it yet. Until it is fixed, please do not trust runs made with the switch on.

If you get to it before I do, a pull request that checks the object before the call is enough. Keep it separate from #267.

Also, thank you for the signature on the wrapped ranges. The question I still have for #267 is below, on the pull request.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7213182880 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7213182880). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T08:07:50Z. --- Thank you for the crash report on the diagnostic. That switch is mine, from 2a3b03d1, so the crash is my bug. Your guess (a resource object read from a stale table) is plausible; I have not checked it yet. Until it is fixed, please do not trust runs made with the switch on. If you get to it before I do, a pull request that checks the object before the call is enough. Keep it separate from #267. Also, thank you for the signature on the wrapped ranges. The question I still have for #267 is below, on the pull request.
LakshanSivakumar commented 2026-11-27 08:07:51 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T08:07:51Z.


Thank you. This is the comparison by output that we did not have, and it changes what I ask of the other pull requests.

What I take from it:

  • #250 lifts none of the 798 and one shader no longer finishes. I reply on that pull request. Please do post the groups of the 798 there.
  • #259 changes nothing in this corpus. #253 gains four compute shaders and changes none. #261 and #262 change outputs or move refusals; I ask their author about those on the pull requests.
  • The branch on #254 turns 32 translating shaders into refusals, 14 of them in the world, and changes 351 outputs. I reply there.
  • Your list for item 4 is the right order of work. Please take those, with the fingerprint comparison first, as you say.

On the 179 pipelines with Rgba16Float and R32Uint: this is a wrong-accept risk if done carelessly, so please say in the pull request what the console does with a float output written to an integer target (numeric conversion, or the bits as they are), what your change does, and add a Metal test with values for both a small and a large number. What you measured (179 refusals to 0) is the evidence I need that the class is real.

Two requests. Please keep posting ids and counts only, as you have done, and no shader bytes. And would you put the sweep itself, without any shader data, in a pull request under tools/? I would like others to be able to run it on their own corpus.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7213183271 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7213183271). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T08:07:51Z. --- Thank you. This is the comparison by output that we did not have, and it changes what I ask of the other pull requests. What I take from it: - #250 lifts none of the 798 and one shader no longer finishes. I reply on that pull request. Please do post the groups of the 798 there. - #259 changes nothing in this corpus. #253 gains four compute shaders and changes none. #261 and #262 change outputs or move refusals; I ask their author about those on the pull requests. - The branch on #254 turns 32 translating shaders into refusals, 14 of them in the world, and changes 351 outputs. I reply there. - Your list for item 4 is the right order of work. Please take those, with the fingerprint comparison first, as you say. On the 179 pipelines with `Rgba16Float` and `R32Uint`: this is a wrong-accept risk if done carelessly, so please say in the pull request what the console does with a float output written to an integer target (numeric conversion, or the bits as they are), what your change does, and add a Metal test with values for both a small and a large number. What you measured (179 refusals to 0) is the evidence I need that the class is real. Two requests. Please keep posting ids and counts only, as you have done, and no shader bytes. And would you put the sweep itself, without any shader data, in a pull request under `tools/`? I would like others to be able to run it on their own corpus.
LakshanSivakumar commented 2026-11-27 08:08:06 +00:00 (Migrated from github.com)
Author
Contributor

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


Thank you for the pull requests, and for the warning about when to read the record buffers. I have written the same warning to Olima34 above, so the two of you measure the same thing.

I have reviewed #263 and #264 on the pull requests. I have not run either. The main questions for #264 are the 48 MiB a resource heap now costs on a 16 GB Mac and the case of a record the title zeroes with plain stores (it keeps its stride). Your text names a "span buffers" pull request that is not open. If that is the held alias version, #267 replaced it; please say so.

Please offer marcus-4's test from #255 to #264. A failing test and its fix should arrive together.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7213187943 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7213187943). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T08:08:06Z. --- Thank you for the pull requests, and for the warning about when to read the record buffers. I have written the same warning to Olima34 above, so the two of you measure the same thing. I have reviewed #263 and #264 on the pull requests. I have not run either. The main questions for #264 are the 48 MiB a resource heap now costs on a 16 GB Mac and the case of a record the title zeroes with plain stores (it keeps its stride). Your text names a "span buffers" pull request that is not open. If that is the held alias version, #267 replaced it; please say so. Please offer marcus-4's test from #255 to #264. A failing test and its fix should arrive together.
theappartment commented 2026-11-27 08:26:36 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by theappartment on 2026-11-27T08:26:36Z.


I captured partial prologue geometry in a windowed Series S run on an M4 Max (36 GB), with local changes on top of 2a3b03d. With VICTORY_SHOW_GBUFFER=1 and VICTORY_METAL_RESIDENCY_SETS=heap, the window presented a 1280×720 RGBA8 G-buffer attachment ahead of lighting and composition. The screenshot is from frame 2064. The standard output with the preview disabled is still black, and player control remains unverified.

A local translator change preserves a complete wave reduction when only some lanes write it. A subsequent constant-lane read reuses the result when its lane is proven to hold the complete reduction. Pixel shader 5cfd461606ae6eaa now translates and Metal creates its RGBA16F pipeline. It was the only output change in a local sample of 258 pixel shaders. The 91 previously accepted shaders emitted identical DXIL.

My current mesh counts are CPU-side samples from command recording. I will use a GPU copy immediately before first consumption to compare against the counts discussed here.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7213541980 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7213541980). Originally posted by [theappartment](https://github.com/theappartment) on 2026-11-27T08:26:36Z. --- I captured partial prologue geometry in a windowed Series S run on an M4 Max (36 GB), with local changes on top of `2a3b03d`. With `VICTORY_SHOW_GBUFFER=1` and `VICTORY_METAL_RESIDENCY_SETS=heap`, the window presented a 1280×720 RGBA8 G-buffer attachment ahead of lighting and composition. The screenshot is from frame 2064. The standard output with the preview disabled is still black, and player control remains unverified. A local translator change preserves a complete wave reduction when only some lanes write it. A subsequent constant-lane read reuses the result when its lane is proven to hold the complete reduction. Pixel shader `5cfd461606ae6eaa` now translates and Metal creates its RGBA16F pipeline. It was the only output change in a local sample of 258 pixel shaders. The 91 previously accepted shaders emitted identical DXIL. My current mesh counts are CPU-side samples from command recording. I will use a GPU copy immediately before first consumption to compare against the counts discussed here.
Olima34 commented 2026-11-27 09:04:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T09:04:01Z.


Thanks, @Ketan-Kapse and Lakshan. Answers to the two points:

  • Where our read happened: at record time, on the CPU, like your trace. The local switch that let the GPU finish each frame only finished the previous frame, and the reset pass zeroes the records again before our read. So "100% zero after the GPU has run the frame" proves nothing, and I withdraw it. The symptom that stands is G-buffer coverage: 0 to 8.4% with #267, as noisy 64x64 tiles rather than geometry.
  • Next run: main + #253 + #267 + #264 together. We'll check our cullers for root SRV 255 and look for root parameter 255 was never set with VICTORY_TRACE_TARGETS=1, then post G-buffer coverage before and after. We'll also take a GPU copy of the record page just before the first mesh execution, if we can do it cheaply.
  • The NaN step (v_cmp_nge culling every lane) is a hypothesis from reading the culler. It isn't shown, and it's parked until #264 is tested.
  • #100 and the not in a mapped pool lines: not checked. #100 is held and behind main; I'll count them if we rebase it.
<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7214240045 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7214240045). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T09:04:01Z. --- Thanks, @Ketan-Kapse and Lakshan. Answers to the two points: - **Where our read happened:** at record time, on the CPU, like your trace. The local switch that let the GPU finish each frame only finished the *previous* frame, and the reset pass zeroes the records again before our read. So "100% zero after the GPU has run the frame" proves nothing, and I withdraw it. The symptom that stands is G-buffer coverage: 0 to 8.4% with #267, as noisy 64x64 tiles rather than geometry. - **Next run:** main + #253 + #267 + #264 together. We'll check our cullers for root SRV 255 and look for `root parameter 255 was never set` with `VICTORY_TRACE_TARGETS=1`, then post G-buffer coverage before and after. We'll also take a GPU copy of the record page just before the first mesh execution, if we can do it cheaply. - **The NaN step** (`v_cmp_nge` culling every lane) is a hypothesis from reading the culler. It isn't shown, and it's parked until #264 is tested. - **#100 and the `not in a mapped pool` lines:** not checked. #100 is held and behind main; I'll count them if we rebase it.
LakshanSivakumar commented 2026-11-27 09:10:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T09:10:58Z.


I ran the open pull requests together on my Mac (M5 Pro, 48 GB, Series S, headless, warm cache, one run each unless said). Counts only.

Build Loading screen targets (4K) 1280x720 G-buffer targets written How it ended
main before today (2a3b03d1) black (0%) 0 to 1.4% GPU timeouts, then the title's fault at 0x1423cf683, 110 s into the world
main now (c1b95875, with #260) written (100%), the artwork shows not reached in the run with dumps 2 of 3 runs: the host dies with SIGSEGV 20 to 90 s into the world, no title fault; 1 of 3: GPU timeouts, then the title's fault
main now + #253 + #263 + #267 + #264 + #278 written (100%) 65 to 72% on seven targets, real geometry 3 of 3: GPU timeouts ("never reported on"), then the same title fault, 60 to 100 s into the world

What I take from it:

  • #260 fixes the black loading screen here too. Thank you, Sandile-0511.
  • #267, #264, #278 and #253 together fill the G-buffer: 280 and 264 draws per frame on the two main targets, dropped_unset_root=0. Thank you Olima34, Ketan-Kapse and Sheffy007. I have not run them one at a time, so I cannot say which of them is needed.
  • The next wall is as Ketan-Kapse said: the 1920x1080 float target the lighting writes holds blocks of noise, and the presented frame is a flat grey.
  • Every build dies within two minutes of the world, the old main too, so that is not caused by these pull requests. Heap residency is 18 to 21.6 GB at the end. The SIGSEGV on main alone is new to me and left no crash report; I have not found its cause.

The five merged cleanly onto main in the order above. The review questions on #264, #267 and #278 (memory, unmapped pages) still stand.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7214375679 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7214375679). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T09:10:58Z. --- I ran the open pull requests together on my Mac (M5 Pro, 48 GB, Series S, headless, warm cache, one run each unless said). Counts only. | Build | Loading screen targets (4K) | 1280x720 G-buffer targets written | How it ended | |---|---|---|---| | main before today (2a3b03d1) | black (0%) | 0 to 1.4% | GPU timeouts, then the title's fault at 0x1423cf683, 110 s into the world | | main now (c1b95875, with #260) | written (100%), the artwork shows | not reached in the run with dumps | 2 of 3 runs: the host dies with SIGSEGV 20 to 90 s into the world, no title fault; 1 of 3: GPU timeouts, then the title's fault | | main now + #253 + #263 + #267 + #264 + #278 | written (100%) | 65 to 72% on seven targets, real geometry | 3 of 3: GPU timeouts ("never reported on"), then the same title fault, 60 to 100 s into the world | What I take from it: - #260 fixes the black loading screen here too. Thank you, Sandile-0511. - #267, #264, #278 and #253 together fill the G-buffer: 280 and 264 draws per frame on the two main targets, `dropped_unset_root=0`. Thank you Olima34, Ketan-Kapse and Sheffy007. I have not run them one at a time, so I cannot say which of them is needed. - The next wall is as Ketan-Kapse said: the 1920x1080 float target the lighting writes holds blocks of noise, and the presented frame is a flat grey. - Every build dies within two minutes of the world, the old main too, so that is not caused by these pull requests. Heap residency is 18 to 21.6 GB at the end. The SIGSEGV on main alone is new to me and left no crash report; I have not found its cause. The five merged cleanly onto main in the order above. The review questions on #264, #267 and #278 (memory, unmapped pages) still stand.
Olima34 commented 2026-11-27 09:16:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T09:16:16Z.


Results of the combined run: main c1b95875 + #253 (8ebef857) + #267 (37670bfe) + #264 (5ec1d4e7), merged without conflicts. M5 Pro, Series S, windowed.

The G-buffer lights up partly. On the warm run (alive to its 300 s limit, frame 2560), the coverage of the three G-buffer colour targets (fmt 28, 28, 29) was:

Time Lit
110 s 6%
130 s 74%
150 s 15%
170–290 s 11–13%

Before, it was 0–8.4% with #253 and #267 alone, as noisy 64x64 tiles. Ketan-Kapse's 41% is still well ahead.

The shape is no longer tile noise:

  • The lit pixels form continuous regions over the whole height: 79–83% of them have all four neighbours lit.
  • 117–147 of the 240 64x64 tiles are partly covered.
  • At 130 s, the lit pixels are large uniform regions (98%).

We haven't looked at the images yet, only these numbers.

Other observations:

  • No root parameter 255 line, and dropped_unset_root = 0, so on the console-pipeline path the drop Ketan-Kapse describes doesn't show. We didn't run #264 alone, so we can't say how much of the change is #264 and how much is #267.
  • The 174 MiB view is wrapped from +4 s, because its range was already fully mapped. There were no GPU errors.
  • Each G-buffer target gets 787–821 draws per frame, of which 410–559 are dropped. Per frame we also drop about 2,000 commands without a host pipeline, and about 490 that name memory "outside every mapped pool". Those 490 are host addresses (first 0x7ff1647a0000+0x8000), and the 21 MiB …+0x1412200 view from your table is one of them. That's a separate lead, and we haven't touched it.
  • The world runs very slowly: about 47 frames in 200 s.
  • The cold run died on the watchdog at the first world frame (frame 2513, 1,840 first binds, 165 s), with 1280x720 targets already 23–24% lit at 127 s.

Limit: we have no GPU copy of the record pages yet, so we can't say how full the records are, only that the G-buffer lights up more. #267's revision (unmap test, re-mirror on pool-table generation change, footprint) is in progress.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7214481922 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7214481922). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T09:16:16Z. --- Results of the combined run: main `c1b95875` + #253 (`8ebef857`) + #267 (`37670bfe`) + #264 (`5ec1d4e7`), merged without conflicts. M5 Pro, Series S, windowed. **The G-buffer lights up partly.** On the warm run (alive to its 300 s limit, frame 2560), the coverage of the three G-buffer colour targets (fmt 28, 28, 29) was: | Time | Lit | |---|---| | 110 s | 6% | | 130 s | 74% | | 150 s | 15% | | 170–290 s | 11–13% | Before, it was 0–8.4% with #253 and #267 alone, as noisy 64x64 tiles. Ketan-Kapse's 41% is still well ahead. **The shape is no longer tile noise:** - The lit pixels form continuous regions over the whole height: 79–83% of them have all four neighbours lit. - 117–147 of the 240 64x64 tiles are partly covered. - At 130 s, the lit pixels are large uniform regions (98%). We haven't looked at the images yet, only these numbers. **Other observations:** - No `root parameter 255` line, and `dropped_unset_root` = 0, so on the console-pipeline path the drop Ketan-Kapse describes doesn't show. We didn't run #264 alone, so we can't say how much of the change is #264 and how much is #267. - The 174 MiB view is wrapped from +4 s, because its range was already fully mapped. There were no GPU errors. - Each G-buffer target gets 787–821 draws per frame, of which 410–559 are dropped. Per frame we also drop about 2,000 commands without a host pipeline, and about 490 that name memory "outside every mapped pool". Those 490 are host addresses (first `0x7ff1647a0000+0x8000`), and the 21 MiB `…+0x1412200` view from your table is one of them. That's a separate lead, and we haven't touched it. - The world runs very slowly: about 47 frames in 200 s. - The cold run died on the watchdog at the first world frame (frame 2513, 1,840 first binds, 165 s), with 1280x720 targets already 23–24% lit at 127 s. **Limit:** we have no GPU copy of the record pages yet, so we can't say how full the records are, only that the G-buffer lights up more. #267's revision (unmap test, re-mirror on pool-table generation change, footprint) is in progress.
Olima34 commented 2026-11-27 10:08:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T10:08:30Z.


@theappartment your change for 5cfd461606ae6eaa (#258, 08:26Z) looks like it would also unblock eight more pixel shaders on the lighting path. Here's what we found, offline.

One shape in nine shaders. These nine pixel shaders are refused as "s_lshr_b32 is not supported", all with the same shape: 5cfd461606ae6eaa, 437fc63c4e3944c1, 1be85d7d229161a1, 4995840e2da65a90, d3287b7ace06066b, 7952ad990cd5b84f, d94b89c94d907650, 59ddf4950ed51dbc, bd3dcb2449ee5fea.

  1. s_or_saveexec to -1.
  2. A whole-wave v_min_u32/v_max_u32 reduction over DPP and v_permlanex16.
  3. v_readlane_b32 of the last lane: lane 63 in six of them (wave64), lane 31 in three (wave32).
  4. s_lshr_b32 …, 5 to index a bit mask.

The s_lshr only consumes the result. What fails is the constant-lane read of a full reduction in a pixel shader, which is the case your change handles.

What it costs. In one warm 300 s run (main + #253 + #264 + #267), these nine shaders cost 6,235 draws into the Rgba16Float lighting targets.

Would you open your change as a PR? We'll gladly run it on this list and post the before and after. If you'd rather not, say so and we can take it with your permission.

Side note: the refusal is named after the first consumer (s_lshr_b32) rather than the lane read, which hides this class in tallies.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7215523685 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7215523685). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T10:08:30Z. --- @theappartment your change for `5cfd461606ae6eaa` (#258, 08:26Z) looks like it would also unblock eight more pixel shaders on the lighting path. Here's what we found, offline. **One shape in nine shaders.** These nine pixel shaders are refused as "s_lshr_b32 is not supported", all with the same shape: `5cfd461606ae6eaa`, `437fc63c4e3944c1`, `1be85d7d229161a1`, `4995840e2da65a90`, `d3287b7ace06066b`, `7952ad990cd5b84f`, `d94b89c94d907650`, `59ddf4950ed51dbc`, `bd3dcb2449ee5fea`. 1. `s_or_saveexec` to -1. 2. A whole-wave `v_min_u32`/`v_max_u32` reduction over DPP and `v_permlanex16`. 3. `v_readlane_b32` of the last lane: lane 63 in six of them (wave64), lane 31 in three (wave32). 4. `s_lshr_b32 …, 5` to index a bit mask. The `s_lshr` only consumes the result. What fails is the constant-lane read of a full reduction in a pixel shader, which is the case your change handles. **What it costs.** In one warm 300 s run (main + #253 + #264 + #267), these nine shaders cost 6,235 draws into the `Rgba16Float` lighting targets. **Would you open your change as a PR?** We'll gladly run it on this list and post the before and after. If you'd rather not, say so and we can take it with your permission. Side note: the refusal is named after the first consumer (`s_lshr_b32`) rather than the lane read, which hides this class in tallies.
Olima34 commented 2026-11-27 10:23:34 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T10:23:34Z.


@theappartment one more number for your change. In a 40 s boot-only run (prewarm translates first-bound shaders), 4,129 containers were refused. 819 of them are refused as "s_lshr_b32", and all 819 have the same shape: v_readlane_b32 sN, vN, 31 (424) or v_readlane_b32 sN, vN, 63 (395) of a whole-wave reduction, then a shift by 5. That makes it the largest refusal class in that set, ahead of the 798 "untracked high half". So your PR would reach well beyond the nine lighting-path pixels.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7215830196 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7215830196). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T10:23:34Z. --- @theappartment one more number for your change. In a 40 s boot-only run (prewarm translates first-bound shaders), 4,129 containers were refused. 819 of them are refused as "s_lshr_b32", and all 819 have the same shape: `v_readlane_b32 sN, vN, 31` (424) or `v_readlane_b32 sN, vN, 63` (395) of a whole-wave reduction, then a shift by 5. That makes it the largest refusal class in that set, ahead of the 798 "untracked high half". So your PR would reach well beyond the nine lighting-path pixels.
LakshanSivakumar commented 2026-11-27 10:32:00 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T10:32:00Z.


Thank you for the numbers, and for saying what is local and what is not.

Two things.

  1. Please remove the screenshot from your comment. We do not keep pictures of the game in the repository or in the issues. Counts and ids tell us what we need.
  2. Your change for 5cfd461606ae6eaa is a change to the translator, and Olima34 shows eight more shaders with the same shape (his comment above). Please open it as a pull request. I will need a test with values (a reduction that only some lanes write, then a read of one constant lane), a negative test where the lane read is not proven to hold the whole reduction, and a comparison of every shader by output over a corpus. The sweep in #286 is there for that. I have not run your change.
<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7215997401 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7215997401). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T10:32:00Z. --- Thank you for the numbers, and for saying what is local and what is not. Two things. 1. Please remove the screenshot from your comment. We do not keep pictures of the game in the repository or in the issues. Counts and ids tell us what we need. 2. Your change for `5cfd461606ae6eaa` is a change to the translator, and Olima34 shows eight more shaders with the same shape (his comment above). Please open it as a pull request. I will need a test with values (a reduction that only some lanes write, then a read of one constant lane), a negative test where the lane read is not proven to hold the whole reduction, and a comparison of every shader by output over a corpus. The sweep in #286 is there for that. I have not run your change.
LakshanSivakumar commented 2026-11-27 10:32:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T10:32:01Z.


Thank you for the table, and for the numbers on what is still dropped.

My own run of the open pull requests together (comment above) had two more in it than yours: #263 and #278 (typed buffer views). Mine lit 65 to 72 percent of seven targets; yours lit 11 to 13 percent. I did not run them one at a time, so I do not know which of the two makes the difference. Could you add #278 and #263 to your next run and say what changes?

On the 490 commands a frame that name memory "outside every mapped pool": these are host addresses, so they are not title memory the pool table could ever resolve. Before anything else, please log what they are (which resource, which pipeline, how many draws). I have not looked at it.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7215997959 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7215997959). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T10:32:01Z. --- Thank you for the table, and for the numbers on what is still dropped. My own run of the open pull requests together (comment above) had two more in it than yours: #263 and #278 (typed buffer views). Mine lit 65 to 72 percent of seven targets; yours lit 11 to 13 percent. I did not run them one at a time, so I do not know which of the two makes the difference. Could you add #278 and #263 to your next run and say what changes? On the 490 commands a frame that name memory "outside every mapped pool": these are host addresses, so they are not title memory the pool table could ever resolve. Before anything else, please log what they are (which resource, which pipeline, how many draws). I have not looked at it.
Ketan-Kapse commented 2026-11-27 10:40:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Ketan-Kapse on 2026-11-27T10:40:25Z.


Update from our branch (main at 2a3b03d1 merged in): the prison scene at the first player-control point is now lit and on the window on an M4 Pro, 24 GB (Series S profile, stream pipelines). Three causes sat between "G-buffer written" and "picture", in case they save someone time here:

  1. A placed view of one format over a GPU-written object of another. Every placed R9G9B9E5 (DXGI 67) shader resource view in the captured frames (57 of 57) sits at the address of an R32_UINT (42) unordered-access texture object of the same size: light probe atlases, screen-space indirect diffuse/specular, the sky paraboloids, the scattering targets. The title writes them from compute through the object and reads them through the placed view. The native host gave the placed view its own host texture filled from title memory, which the GPU never writes, so all ambient light read zero and every tiled-lighting pixel came out as exact zero. Making the placed key an alias of the object's host texture (a texture view in the other format) fixed it. The sky (sky_dome) came back with the same change.
  2. Typed buffer loads/stores (#255, Sheffy007's #278). With #278 merged locally, the light probe system's indirect dispatches stop asking for 0 groups (their counts come from a shader that reads a request count with a formatted load and writes with a formatted store), and the fog pass stops multiplying the scene by an empty transmittance. That PR is what took the HDR target from "sky only" to fully lit for us.
  3. Rectangle lists of described pipelines whose vertex shader takes everything from the vertex id (the tiled lighting: corner = id % 3, tile = id / 3, drawn indirect). Drawn as triangles they cover half of each tile; a fourth vertex id is the next tile's first corner, so the fourth corner has to be p1 + p2 - p0 from three evaluations of the shader (same for the interpolants), with the indirect vertex count scaled on the GPU.

Also useful to know: the depth-EQUAL test of the lighting draws against the material depth is bit-exact and fine once compute writes to the depth-format target land (we use a colour twin for that), and PresentX hands two planes there (1280x720 scene, 3840x2160 UI), so showing "the largest" shows a black UI plane.

Still wrong for us: a block of colour noise in one corner, speckle on dark walls, sun shadows (the tiled cascade shaders are refused as cross-lane), and about 0.6 world frames a second. I can open pull requests for 1 and 3 once #263/#264 are settled, if you want them.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7216167321 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7216167321). Originally posted by [Ketan-Kapse](https://github.com/Ketan-Kapse) on 2026-11-27T10:40:25Z. --- Update from our branch (main at 2a3b03d1 merged in): the prison scene at the first player-control point is now lit and on the window on an M4 Pro, 24 GB (Series S profile, stream pipelines). Three causes sat between "G-buffer written" and "picture", in case they save someone time here: 1. **A placed view of one format over a GPU-written object of another.** Every placed `R9G9B9E5` (DXGI 67) shader resource view in the captured frames (57 of 57) sits at the address of an `R32_UINT` (42) unordered-access texture *object* of the same size: light probe atlases, screen-space indirect diffuse/specular, the sky paraboloids, the scattering targets. The title writes them from compute through the object and reads them through the placed view. The native host gave the placed view its own host texture filled from title memory, which the GPU never writes, so all ambient light read zero and every tiled-lighting pixel came out as exact zero. Making the placed key an alias of the object's host texture (a texture view in the other format) fixed it. The sky (`sky_dome`) came back with the same change. 2. **Typed buffer loads/stores** (#255, Sheffy007's #278). With #278 merged locally, the light probe system's indirect dispatches stop asking for 0 groups (their counts come from a shader that reads a request count with a formatted load and writes with a formatted store), and the fog pass stops multiplying the scene by an empty transmittance. That PR is what took the HDR target from "sky only" to fully lit for us. 3. **Rectangle lists of described pipelines whose vertex shader takes everything from the vertex id** (the tiled lighting: corner = id % 3, tile = id / 3, drawn indirect). Drawn as triangles they cover half of each tile; a fourth vertex id is the next tile's first corner, so the fourth corner has to be `p1 + p2 - p0` from three evaluations of the shader (same for the interpolants), with the indirect vertex count scaled on the GPU. Also useful to know: the depth-EQUAL test of the lighting draws against the material depth is bit-exact and fine once compute writes to the depth-format target land (we use a colour twin for that), and PresentX hands two planes there (1280x720 scene, 3840x2160 UI), so showing "the largest" shows a black UI plane. Still wrong for us: a block of colour noise in one corner, speckle on dark walls, sun shadows (the tiled cascade shaders are refused as cross-lane), and about 0.6 world frames a second. I can open pull requests for 1 and 3 once #263/#264 are settled, if you want them.
Olima34 commented 2026-11-27 10:43:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T10:43:15Z.


Thanks. Both requests will go into our next run: adding #263 and #278, and logging the ~490 commands a frame that name host addresses (which resource, which pipeline, how many draws). That run won't happen yet: game runs are paused on our Mac for a few hours. Three of today's world runs ended in command-buffer timeouts and out-of-memory errors (#79), and each time the kernel kept 20–40 GB of GPU memory after exit, which hung WindowServer, so the Mac needed a reboot. We'll post the numbers when runs resume, with #296 in the mix.

Meanwhile, offline: #304 handles the 'program input' lane-mask refusal in the lighting compute 9e5a12054881a74d, the only writer of a 1280x720 R11G11B10 target the host never writes (it keeps title memory, Inf/NaN included). A second change behind it, not pushed yet, makes 28 refused compute shaders translate in our boot dumps. One of them, 2fcb1ef0e54c7df4, writes a 1280x720 fmt 26 HDR target.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7216224022 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7216224022). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T10:43:15Z. --- Thanks. Both requests will go into our next run: adding #263 and #278, and logging the ~490 commands a frame that name host addresses (which resource, which pipeline, how many draws). That run won't happen yet: game runs are paused on our Mac for a few hours. Three of today's world runs ended in command-buffer timeouts and out-of-memory errors (#79), and each time the kernel kept 20–40 GB of GPU memory after exit, which hung WindowServer, so the Mac needed a reboot. We'll post the numbers when runs resume, with #296 in the mix. Meanwhile, offline: #304 handles the 'program input' lane-mask refusal in the lighting compute `9e5a12054881a74d`, the only writer of a 1280x720 R11G11B10 target the host never writes (it keeps title memory, Inf/NaN included). A second change behind it, not pushed yet, makes 28 refused compute shaders translate in our boot dumps. One of them, `2fcb1ef0e54c7df4`, writes a 1280x720 fmt 26 HDR target.
alicans commented 2026-11-27 11:40:34 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by alicans on 2026-11-27T11:40:34Z.


A run with #263 and #278 together, plus #253 and #264, on an M4 Pro with 24 GB, macOS 15.8.2, --console series-s, windowed.

The build was main ce2b786 (so #267 is in) with #263 52e4647, #253 834f730c, #264 5ec1d4e7 and #278 bff96ea6 applied on top. #296 was also applied, at its default of 0. Two local switches were on: the title watchdog patch, and sampled textures without their two most detailed levels, which I need to reach the world on 24 GB.

What changed on screen.

  • Before, on c1b9587 with #263 only, the world was black and only the UI drew.
  • With this set, the world is no longer black. It is full-screen colour noise, horizontal streaks of random colours, with a few dark shapes in it.
  • The title cards between scenes draw correctly.
  • I have not measured how much of the G-buffer is written, so I can't give a figure comparable to your 65 to 72 %.

The rest of the run:

  • The first world frame was render frame 1764, at about +108 s, with 1,826 first binds in that frame.
  • The next 10 frames took about 12.5 s each.
  • After that the GPU fell further behind: work held for a wait that does not hold, with fence signals queued up to 26 s before the GPU reached them. The last frame was 1774, at +233 s, and no frame came in the remaining 67 s of the run.
  • There were no GPU errors, no command buffer failed and no compiler failures.
  • Sound went silent soon after the world began; the audio device kept running.
  • The shader cache was cold, and the memory level fell to 17 % during the world load. The process RSS was 8 GB.

One run, so the timings are a single sample.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7217347056 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7217347056). Originally posted by [alicans](https://github.com/alicans) on 2026-11-27T11:40:34Z. --- A run with #263 and #278 together, plus #253 and #264, on an M4 Pro with 24 GB, macOS 15.8.2, `--console series-s`, windowed. The build was main `ce2b786` (so #267 is in) with #263 `52e4647`, #253 `834f730c`, #264 `5ec1d4e7` and #278 `bff96ea6` applied on top. #296 was also applied, at its default of 0. Two local switches were on: the title watchdog patch, and sampled textures without their two most detailed levels, which I need to reach the world on 24 GB. **What changed on screen.** - Before, on `c1b9587` with #263 only, the world was black and only the UI drew. - With this set, the world is no longer black. It is full-screen colour noise, horizontal streaks of random colours, with a few dark shapes in it. - The title cards between scenes draw correctly. - I have not measured how much of the G-buffer is written, so I can't give a figure comparable to your 65 to 72 %. **The rest of the run:** - The first world frame was render frame 1764, at about +108 s, with 1,826 first binds in that frame. - The next 10 frames took about 12.5 s each. - After that the GPU fell further behind: `work held for a wait that does not hold`, with fence signals queued up to 26 s before the GPU reached them. The last frame was 1774, at +233 s, and no frame came in the remaining 67 s of the run. - There were no GPU errors, no `command buffer failed` and no compiler failures. - Sound went silent soon after the world began; the audio device kept running. - The shader cache was cold, and the memory level fell to 17 % during the world load. The process RSS was 8 GB. One run, so the timings are a single sample.
LakshanSivakumar commented 2026-11-27 11:54:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T11:54:19Z.


Thank you. This is the most useful report so far, and the numbers (57 of 57 views) make it easy to check.

Yes, please open pull requests for 1 and 3, each on its own. There is nothing to wait for: #263 is merged, and I have #264 merged onto current main locally (one small conflict in the draw-count log line), so base your work on main. For each one I need:

  • a test with values (for 1: write through the R32_UINT object, read through the R9G9B9E5 view, check the numbers; for 3: the fourth corner and the interpolants of a rectangle list);
  • the counts that show it matters (how many views or draws it touches in a frame);
  • a note on what this does for a shader or a view that is not in this case (it must not change them).

Please do not post pictures of the game. Counts and ids only. Saying the scene is lit is enough.

On my side, main with #253, #264 and #278 gives a G-buffer that is 60 to 87% covered and a lighting output that is noise, so your points 1 and 3 are the first things I will try.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7217609982 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7217609982). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T11:54:19Z. --- Thank you. This is the most useful report so far, and the numbers (57 of 57 views) make it easy to check. Yes, please open pull requests for 1 and 3, each on its own. There is nothing to wait for: #263 is merged, and I have #264 merged onto current main locally (one small conflict in the draw-count log line), so base your work on main. For each one I need: - a test with values (for 1: write through the `R32_UINT` object, read through the `R9G9B9E5` view, check the numbers; for 3: the fourth corner and the interpolants of a rectangle list); - the counts that show it matters (how many views or draws it touches in a frame); - a note on what this does for a shader or a view that is not in this case (it must not change them). Please do not post pictures of the game. Counts and ids only. Saying the scene is lit is enough. On my side, main with #253, #264 and #278 gives a G-buffer that is 60 to 87% covered and a lighting output that is noise, so your points 1 and 3 are the first things I will try.
LakshanSivakumar commented 2026-11-27 11:54:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T11:54:21Z.


Thank you. A world that is full-screen noise instead of black matches what I see with the same four pull requests, so your run and mine agree.

Two requests, only if you have time:

  1. The line of the form target dumped ... lit= for the G-buffer targets, so we can compare the covered share with the numbers on this issue.
  2. The same run without your two local changes if you can (the watchdog patch is fine to keep). I would like to know whether the noise is the same without the "two most detailed levels" switch.

Please do not post pictures of the game; the description in words and the counts are enough.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7217610531 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7217610531). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T11:54:21Z. --- Thank you. A world that is full-screen noise instead of black matches what I see with the same four pull requests, so your run and mine agree. Two requests, only if you have time: 1. The line of the form `target dumped ... lit=` for the G-buffer targets, so we can compare the covered share with the numbers on this issue. 2. The same run without your two local changes if you can (the watchdog patch is fine to keep). I would like to know whether the noise is the same without the "two most detailed levels" switch. Please do not post pictures of the game; the description in words and the counts are enough.
theappartment commented 2026-11-27 11:54:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by theappartment on 2026-11-27T11:54:47Z.


@Olima34 pr opened! Do your stuff! 😀

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7217618718 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7217618718). Originally posted by [theappartment](https://github.com/theappartment) on 2026-11-27T11:54:47Z. --- @Olima34 pr opened! Do your stuff! 😀
LakshanSivakumar commented 2026-11-27 12:07:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T12:07:58Z.


Update: where the picture stops, measured on my Mac (main plus #253, #263, #264 and #278; Series S, headless). #253 and #263 are merged now.

Everything before lighting runs: depth, G-buffer (60 to 87% covered), shadows. Then:

  1. Deferred lighting writes nothing, for two reasons at once.
    • Its 179 pipelines fail in Metal: "output of type float4 is not compatible with a MTLPixelFormatR32Uint color attachment". About 180 draws a frame into [Rgba16Float, R32Uint] are dropped. The pixel shaders write packed integer bits to the second target, so the output must be declared as an integer and bit-cast. I am working on this.
    • The tile class masks are all zero, because the classifier compute ca62cc7380fe92df is refused ("a lane-mask join of an untracked mask"). #304 makes it translate; I am checking the 50 shaders whose output #304 changes.
  2. The upscaler fails after it. 19 of its 20 dispatches are dropped at prep ("not in a mapped pool"): their root views are in committed-resource memory, which the host does not look up. Its 1920x1080 outputs are all zero, which is the flat grey frame. I am working on this.
  3. The colour noise is separate. Title memory is uploaded again over targets the GPU has written (295 targets in 6 frames). With those uploads off, the 1920x1080 float target goes from a maximum of 130048 to 0.25. I am working on this too.

Confirmed from @Ketan-Kapse's report: 53 of 54 R9G9B9E5 views in a frame are placed over an R32_UINT texture object and get their own copy. Also being worked on here, together with indirect rectangle-list draws (63 to 114 a present are dropped today).

What I do not know: whether these are enough for a picture. Nothing after lighting has run with real input yet.

Where help is most useful now (I have started on the first two as well, so say here if you take one):

  • the remaining refused compute shaders on the path (about 110 dispatches a frame), largest class first;
  • the sun's shadow term: a 2560x1440 B5G5R5A1 texture written by compute through an unordered view; I have not found its writer in my trace;
  • the stall that ends every world run after 2 to 4 minutes (the GPU stops reporting command buffers, then the title's watchdog fires).

Counts and ids only, please; no pictures of the game.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7217877055 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7217877055). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T12:07:58Z. --- Update: where the picture stops, measured on my Mac (main plus #253, #263, #264 and #278; Series S, headless). #253 and #263 are merged now. Everything before lighting runs: depth, G-buffer (60 to 87% covered), shadows. Then: 1. **Deferred lighting writes nothing, for two reasons at once.** - Its 179 pipelines fail in Metal: "output of type float4 is not compatible with a MTLPixelFormatR32Uint color attachment". About 180 draws a frame into [Rgba16Float, R32Uint] are dropped. The pixel shaders write packed integer bits to the second target, so the output must be declared as an integer and bit-cast. I am working on this. - The tile class masks are all zero, because the classifier compute `ca62cc7380fe92df` is refused ("a lane-mask join of an untracked mask"). #304 makes it translate; I am checking the 50 shaders whose output #304 changes. 2. **The upscaler fails after it.** 19 of its 20 dispatches are dropped at prep ("not in a mapped pool"): their root views are in committed-resource memory, which the host does not look up. Its 1920x1080 outputs are all zero, which is the flat grey frame. I am working on this. 3. **The colour noise is separate.** Title memory is uploaded again over targets the GPU has written (295 targets in 6 frames). With those uploads off, the 1920x1080 float target goes from a maximum of 130048 to 0.25. I am working on this too. Confirmed from @Ketan-Kapse's report: 53 of 54 `R9G9B9E5` views in a frame are placed over an `R32_UINT` texture object and get their own copy. Also being worked on here, together with indirect rectangle-list draws (63 to 114 a present are dropped today). What I do not know: whether these are enough for a picture. Nothing after lighting has run with real input yet. Where help is most useful now (I have started on the first two as well, so say here if you take one): - the remaining refused compute shaders on the path (about 110 dispatches a frame), largest class first; - the sun's shadow term: a 2560x1440 `B5G5R5A1` texture written by compute through an unordered view; I have not found its writer in my trace; - the stall that ends every world run after 2 to 4 minutes (the GPU stops reporting command buffers, then the title's watchdog fires). Counts and ids only, please; no pictures of the game.
Olima34 commented 2026-11-27 12:11:54 +00:00 (Migrated from github.com)
Author
Contributor

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


@theappartment thanks for opening #328. We're sweeping it now, offline, over our boot dumps: 4,129 refused containers, including the 819 v_readlane 31/63 shapes, plus an all-shaders set. We'll post gained, lost and changed counts by stage on the PR.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7217953895 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7217953895). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T12:11:54Z. --- @theappartment thanks for opening #328. We're sweeping it now, offline, over our boot dumps: 4,129 refused containers, including the 819 `v_readlane` 31/63 shapes, plus an all-shaders set. We'll post gained, lost and changed counts by stage on the PR.
LakshanSivakumar commented 2026-11-27 12:25:43 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T12:25:43Z.


Has anyone managed to make an actual proper world frame render?

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7218231140 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7218231140). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T12:25:43Z. --- Has anyone managed to make an actual proper world frame render?
alexballvideos-netizen commented 2026-11-27 12:33:28 +00:00 (Migrated from github.com)
Author
Contributor

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


I'll take the sun's shadow term: finding the writer of the 2560x1440 B5G5R5A1 texture written by compute through an unordered view, and whether that pass runs, is dropped, or is refused.

I'll test on an M3 Max, 36 GB, macOS 27.2.1, with the Series X profile on current main (86786a72). Counts and ids only.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7218384231 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7218384231). Originally posted by [alexballvideos-netizen](https://github.com/alexballvideos-netizen) on 2026-11-27T12:33:28Z. --- I'll take the sun's shadow term: finding the writer of the 2560x1440 `B5G5R5A1` texture written by compute through an unordered view, and whether that pass runs, is dropped, or is refused. I'll test on an M3 Max, 36 GB, macOS 27.2.1, with the Series X profile on current main (`86786a72`). Counts and ids only.
alicans commented 2026-11-27 12:54:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by alicans on 2026-11-27T12:54:07Z.


On the two requests (same Mac, M4 Pro 24 GB; main c5d7f4d0 with #296 and #301 on top):

  1. target dumped ... lit= for the G-buffer targets: not yet. I ran with VICTORY_DUMP_TARGETS=<dir>,95,15 and VICTORY_TRACE_TARGETS=1, but neither run reached the world on this build. The one dump that came was on the loading screen: two 8-bit targets, no G-buffer.
  2. Without my two local changes (the watchdog held with VICTORY_HOLD_BYTE=1471b6330:1 instead of the patch, and all texture levels): the run ended before the world at +93 s, render frame 1408, on an access violation at image+0x4dac5bf. I've opened #339 for that crash. It is the same crash I got in runs with both local changes, so it is not caused by them. Memory was fine at the time (level 37 %).

So I can't yet say whether the noise changes without the level switch. I'll try again and post the lit= lines when a run gets through.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7218812867 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7218812867). Originally posted by [alicans](https://github.com/alicans) on 2026-11-27T12:54:07Z. --- On the two requests (same Mac, M4 Pro 24 GB; main `c5d7f4d0` with #296 and #301 on top): 1. **`target dumped ... lit=` for the G-buffer targets:** not yet. I ran with `VICTORY_DUMP_TARGETS=<dir>,95,15` and `VICTORY_TRACE_TARGETS=1`, but neither run reached the world on this build. The one dump that came was on the loading screen: two 8-bit targets, no G-buffer. 2. **Without my two local changes** (the watchdog held with `VICTORY_HOLD_BYTE=1471b6330:1` instead of the patch, and all texture levels): the run ended before the world at +93 s, render frame 1408, on an access violation at `image+0x4dac5bf`. I've opened #339 for that crash. It is the same crash I got in runs with both local changes, so it is not caused by them. Memory was fine at the time (level 37 %). So I can't yet say whether the noise changes without the level switch. I'll try again and post the `lit=` lines when a run gets through.
LakshanSivakumar commented 2026-11-27 13:00:04 +00:00 (Migrated from github.com)
Author
Contributor

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


Status after two windowed runs tonight (M-series, Series S, warm shader cache). The world is still black, but the cause is now narrow.

Run 1: main 86786a72 + #278's new head + a stale-stride fix (fd90430f, local)

  • Menus and intro: 30 fps, picture correct.
  • World: black with HUD text only, 1 to 2 fps. Dialogue plays and the game reaches the "Approach a cellmate" prompt.
  • Ran 375 s with no stall and no crash. Earlier runs all died at 215 to 240 s.
  • The G-buffer targets are 55 to 58 % covered late in the run, so the scene is drawn. It is lost after that.

Where it is lost

  • Deferred lighting: about 180 tile draws a frame go into [Rgba16Float, R32Uint]. Their pipelines fail in Metal with "float4 is not compatible with R32Uint color attachment".
  • Upscaler: most of its dispatches were dropped because their root views sit in committed-resource memory.
  • Title memory was uploaded again over targets the GPU had written.

Run 2: a local branch with fixes for all of the above (053e5993, on main c5d7f4d0)

  • "color attachment" refusals: 180 to 0. Dropped upscaler work: 0. No crash.
  • Still black. The lighting fix re-reads each pixel container from title memory at first draw, and the title has freed them by then, so all 180 lighting pipelines are refused again ("its container is no longer in title memory"). The unit tests kept the container alive, so they did not catch it.
  • Next: keep the pixel containers in memory so the integer-target translation can be made later, then run again.

None of the fix branch is on main yet. I will push it once a run shows it does what it should.

Also ready locally, checks and full-corpus comparison passed (0 regressed): #277 #322 #323 #325 #308 #286 #262 #49 as one branch, and #279 #319 #296 #252 #318 #250 #261 #259 #311 as a second one that still needs a game run.

Not merging for now: #317 and #301 (ordering problems found on review, I will comment on each), #271, #293, #302 (corpus regressions).

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7218934815 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7218934815). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T13:00:04Z. --- Status after two windowed runs tonight (M-series, Series S, warm shader cache). The world is still black, but the cause is now narrow. **Run 1: main 86786a72 + #278's new head + a stale-stride fix (fd90430f, local)** - Menus and intro: 30 fps, picture correct. - World: black with HUD text only, 1 to 2 fps. Dialogue plays and the game reaches the "Approach a cellmate" prompt. - Ran 375 s with no stall and no crash. Earlier runs all died at 215 to 240 s. - The G-buffer targets are 55 to 58 % covered late in the run, so the scene is drawn. It is lost after that. **Where it is lost** - Deferred lighting: about 180 tile draws a frame go into [Rgba16Float, R32Uint]. Their pipelines fail in Metal with "float4 is not compatible with R32Uint color attachment". - Upscaler: most of its dispatches were dropped because their root views sit in committed-resource memory. - Title memory was uploaded again over targets the GPU had written. **Run 2: a local branch with fixes for all of the above (053e5993, on main c5d7f4d0)** - "color attachment" refusals: 180 to 0. Dropped upscaler work: 0. No crash. - Still black. The lighting fix re-reads each pixel container from title memory at first draw, and the title has freed them by then, so all 180 lighting pipelines are refused again ("its container is no longer in title memory"). The unit tests kept the container alive, so they did not catch it. - Next: keep the pixel containers in memory so the integer-target translation can be made later, then run again. None of the fix branch is on main yet. I will push it once a run shows it does what it should. Also ready locally, checks and full-corpus comparison passed (0 regressed): #277 #322 #323 #325 #308 #286 #262 #49 as one branch, and #279 #319 #296 #252 #318 #250 #261 #259 #311 as a second one that still needs a game run. Not merging for now: #317 and #301 (ordering problems found on review, I will comment on each), #271, #293, #302 (corpus regressions).
4TheDoctor commented 2026-11-27 13:03:22 +00:00 (Migrated from github.com)
Author
Contributor

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


Update: fixed on current main. On d35ba927 the boot movie and the menus show correctly on this M3 Max (window captures at 33 s and at the legal notices screen), both in a plain release build and with --features diagnostics. So the black window below was in 2a3b03d1 and something in the commits since fixed it. The rest is kept for the record.


A data point on the black window, from an M3 Max (40-core GPU, 48 GB), macOS 27.2.1, main 2a3b03d1, built with native-setup.sh and Metal Shader Converter 4.0.3, --console series-x (the default here). The only local change is a 6-line mute switch (VICTORY_SILENT_AUDIO=1 uses the existing Silent output in coreaudio.rs; happy to send it as a PR).

Unlike "black after the logo", the window here is black from the first second, boot movie included:

  • Run 1 (run-native.sh --seconds 900, its own Enter presses): 900 s, about 30 fps all along, up to frame 26,688. Never reached the world (mesh=0, indirect=0 to the end). The audio stream ran.
  • Run 2 (same, with VICTORY_KEYS for the menus, warm cache): 900 s at about 16 fps, up to frame 14,592. Still mesh=0, and DirectStorage stopped opening files about 1 minute in, so it never started story mode. Many a descriptor was not mirrored ... is not in a mapped pool lines, the case @Ketan-Kapse described above.
  • The window: I captured it every 30 s (screencapture -l <window id>, 60 captures across both runs), and every capture is black apart from the title bar. The capture method works: the same command on a hidden D3DMetal game window gives the full picture.

So on this Mac the presented frames don't reach the window at all, even before the world. I can run any build or switch you want checked.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7219001724 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7219001724). Originally posted by [4TheDoctor](https://github.com/4TheDoctor) on 2026-11-27T13:03:22Z. --- **Update: fixed on current main.** On `d35ba927` the boot movie and the menus show correctly on this M3 Max (window captures at 33 s and at the legal notices screen), both in a plain release build and with `--features diagnostics`. So the black window below was in `2a3b03d1` and something in the commits since fixed it. The rest is kept for the record. --- A data point on the black window, from an **M3 Max** (40-core GPU, 48 GB), macOS 27.2.1, main `2a3b03d1`, built with `native-setup.sh` and Metal Shader Converter 4.0.3, `--console series-x` (the default here). The only local change is a 6-line mute switch (`VICTORY_SILENT_AUDIO=1` uses the existing `Silent` output in `coreaudio.rs`; happy to send it as a PR). Unlike "black after the logo", the window here is **black from the first second**, boot movie included: - **Run 1** (`run-native.sh --seconds 900`, its own Enter presses): 900 s, about 30 fps all along, up to frame 26,688. Never reached the world (`mesh=0`, `indirect=0` to the end). The audio stream ran. - **Run 2** (same, with `VICTORY_KEYS` for the menus, warm cache): 900 s at about 16 fps, up to frame 14,592. Still `mesh=0`, and DirectStorage stopped opening files about 1 minute in, so it never started story mode. Many `a descriptor was not mirrored ... is not in a mapped pool` lines, the case @Ketan-Kapse described above. - **The window:** I captured it every 30 s (`screencapture -l <window id>`, 60 captures across both runs), and every capture is black apart from the title bar. The capture method works: the same command on a hidden D3DMetal game window gives the full picture. So on this Mac the presented frames don't reach the window at all, even before the world. I can run any build or switch you want checked.
LakshanSivakumar commented 2026-11-27 13:20:39 +00:00 (Migrated from github.com)
Author
Contributor

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


The lighting pass runs now, and it is on main (60baf130).

What landed

  • Integer SV_Target outputs for the lighting pipelines ([Rgba16Float, R32Uint]), and pixel containers are kept in memory so that translation can still be made after the title frees them. All 180 lighting pipelines run; 0 "color attachment" and 0 "integer targets" refusals in a world run.
  • Root views in committed-resource memory (the upscaler's dispatches run now), GPU-written targets are no longer refilled from title memory, placed R9G9B9E5 views over R32_UINT objects share the host texture, indirect rectangle lists are drawn.
  • Two more translator fixes: scalar steps inside whole-wave sections (the s_lshr_b32 class) and stale descriptor values at a join that the path proves dead (about 12,000 pixel draws a world run were dropped for that).
  • #278's new head, the stale-stride fix, and a pass trace (VICTORY_TRACE_PASSES).
  • Corpus against the previous main: 1,486 gained (1,326 pixel, 160 vertex), 0 regressed, 0 changed.

Result in a world run (Series S, headless, 240 s, no crash)

  • Scene colour (f10 1280x720) is 70 to 91 % lit and shows a recognisable lit world: buildings, a tower, the sky. Geometry is torn in places.
  • The window is still black. The first break after scene colour is the draw vertex 7a7f9ab1d7449a22 / pixel 41e09588771fe7a0 into f10 1920x1080: it runs and writes exactly 0.
  • Likely cause, from reading the shader and the translator, not measured yet: the pixel shader takes the packed pixel position (x in the low 16 bits, y in the high 16) in v1 and uses it as an image_load address. The translator does not decode which pixel inputs are enabled (SPI_PS_INPUT_ADDR), guesses v1 is the float y position, and every load falls outside the texture.
  • I am working on decoding the pixel-input enables. Please don't start on that one.

Still open here

  • compute d3ff71633430b06d next to the tile classifier is refused ("a lane-mask join of an untracked mask").
  • Some render targets still take a first upload from title memory before the GPU writes them (noise).
  • World frame rate is still 1 to 2 fps.
<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7219362082 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7219362082). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T13:20:39Z. --- The lighting pass runs now, and it is on main (60baf130). **What landed** - Integer `SV_Target` outputs for the lighting pipelines ([Rgba16Float, R32Uint]), and pixel containers are kept in memory so that translation can still be made after the title frees them. All 180 lighting pipelines run; 0 "color attachment" and 0 "integer targets" refusals in a world run. - Root views in committed-resource memory (the upscaler's dispatches run now), GPU-written targets are no longer refilled from title memory, placed R9G9B9E5 views over R32_UINT objects share the host texture, indirect rectangle lists are drawn. - Two more translator fixes: scalar steps inside whole-wave sections (the `s_lshr_b32` class) and stale descriptor values at a join that the path proves dead (about 12,000 pixel draws a world run were dropped for that). - #278's new head, the stale-stride fix, and a pass trace (`VICTORY_TRACE_PASSES`). - Corpus against the previous main: 1,486 gained (1,326 pixel, 160 vertex), 0 regressed, 0 changed. **Result in a world run (Series S, headless, 240 s, no crash)** - Scene colour (f10 1280x720) is 70 to 91 % lit and shows a recognisable lit world: buildings, a tower, the sky. Geometry is torn in places. - The window is still black. The first break after scene colour is the draw `vertex 7a7f9ab1d7449a22 / pixel 41e09588771fe7a0` into f10 1920x1080: it runs and writes exactly 0. - Likely cause, from reading the shader and the translator, not measured yet: the pixel shader takes the packed pixel position (x in the low 16 bits, y in the high 16) in v1 and uses it as an `image_load` address. The translator does not decode which pixel inputs are enabled (`SPI_PS_INPUT_ADDR`), guesses v1 is the float y position, and every load falls outside the texture. - I am working on decoding the pixel-input enables. Please don't start on that one. **Still open here** - `compute d3ff71633430b06d` next to the tile classifier is refused ("a lane-mask join of an untracked mask"). - Some render targets still take a first upload from title memory before the GPU writes them (noise). - World frame rate is still 1 to 2 fps.
alexballvideos-netizen commented 2026-11-27 13:41:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by alexballvideos-netizen on 2026-11-27T13:41:52Z.


Sun shadow term: first results on the 2560x1440 B5G5R5A1 (fmt 86) texture. Not solved; posting what is measured so far.

Setup. main 86786a72 plus three diagnostics, all off by default (below). M3 Max, 36 GB, macOS 27.2.1, Series X, headless, 300 s, warm cache. There is one fmt 86 2560x1440 texture per run.

1. Why the existing traces don't find a writer. VICTORY_TRACE_TARGETS lists UAV textures only for dropped dispatches, through the first 32 table entries, as View::Unordered. Compute dispatches that ran, placed UAVs and heap-indexing shaders are not covered. Here, the programs that bind this texture were each first dropped with uavs [], and later ran with the texture in a table.

2. What binds it for unordered access. All of these ran; none was dropped or refused. Counts are from a 300 s run.

Program Via Dispatches
c7557e82a8889611 heap (candidate) 155–163, every world frame
113d9502b615d6df heap (candidate) 5–11
22dfa146f648e428 heap (candidate) 3 (one run)
10e0fca4b7654380, 67e290ca8506de9b, 73badb39030948dc, 7a4db0f35278deed, 7df5467e5cf1a7d5, 94c051820454d80a, 9e4cfbfcfb3f69e7, b00825313cb610e3, b8abb99528579377, d8f399520433d6cf, db595784f5b445c6 table 1–4 each, in the first world presents

"heap" means the program indexes the resource heap and may write through it, and the bound heap holds this texture. That makes it a candidate, not proof.

3. What is in it. The texture was read back at each present.

  • It is all zero at world entry.
  • On a normal run it fills very slowly: non-zero texels went 0 → 0.8% → 2.0% → 2.8%, at about +100 s, +115 s and +190 s into the world.
  • At the end, 14,151 distinct values; 1.8% of texels have alpha set; channel means about 0.019.
  • So something writes it, but it never comes close to covering the screen.

4. No single group of these programs is the writer. Each group was skipped in its own run with VICTORY_DEBUG_SKIP_COMPUTE. The texture still filled every time:

Skipped Texture non-zero at the end of the data
nothing (normal run) 2.8% (about +190 s in the world)
c7557e82a8889611 0.34% (+68 s, then the title crashed)
the 11 table programs 1.2% (+145 s)
113d9502b615d6df, 22dfa146f648e428 0.36% (+180 s)
all 14 together no data: the title crashed at +87 s, before the texture was registered by the trace

So either several of these write it, or the fill doesn't come from these dispatches. The second could be title memory uploaded over the texture (your point 3 on re-uploads); I have not checked that.

A side effect to know about. Every run with any skip (5 of 5) ended in the same title access violation, 0xc0000005 at image+0x55e56f8, between 87 and 180 s into the world. The 3 normal runs on this Mac reached the timer. So skipping these programs, any of them, breaks something the title later relies on. That also means the skip runs cover a shorter window than the normal one.

Next steps, if useful: log uploads and copies into this texture's key, and give the skip runs a longer window, for example by skipping only during the first world frames.

Diagnostics (branch on my side, can open as a PR):

  • VICTORY_TRACE_UAV_WRITERS=<fmt>[x<w>x<h>]: per present, uav writer of a traced texture n=… hashes=… outcome=ran|dropped|skipped via=table|heap texture=….
    • It covers direct, indirect and thread-count dispatches.
    • It reads tables to their real length and handles placed UAVs.
    • It scans the bound heap for heap-indexing shaders, once per present.
  • With the above, traced texture contents texture=… nonzero distinct a_set r_mean g_mean b_mean at each present (fmt 86 decoded).
  • VICTORY_DEBUG_SKIP_COMPUTE=<hash>[,…]: macOS counterpart of the Windows-only VICTORY_SKIP_PIPELINES, for compute. The dispatch is counted as dropped.
    • Known gap: a skipped dispatch is checked against its tables only, not the heap.

Counts and ids only.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7219828010 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7219828010). Originally posted by [alexballvideos-netizen](https://github.com/alexballvideos-netizen) on 2026-11-27T13:41:52Z. --- Sun shadow term: first results on the 2560x1440 `B5G5R5A1` (fmt 86) texture. Not solved; posting what is measured so far. **Setup.** main `86786a72` plus three diagnostics, all off by default (below). M3 Max, 36 GB, macOS 27.2.1, Series X, headless, 300 s, warm cache. There is one fmt 86 2560x1440 texture per run. **1. Why the existing traces don't find a writer.** `VICTORY_TRACE_TARGETS` lists UAV textures only for dropped dispatches, through the first 32 table entries, as `View::Unordered`. Compute dispatches that ran, placed UAVs and heap-indexing shaders are not covered. Here, the programs that bind this texture were each first dropped with `uavs []`, and later ran with the texture in a table. **2. What binds it for unordered access.** All of these ran; none was dropped or refused. Counts are from a 300 s run. | Program | Via | Dispatches | | --- | --- | --- | | `c7557e82a8889611` | heap (candidate) | 155–163, every world frame | | `113d9502b615d6df` | heap (candidate) | 5–11 | | `22dfa146f648e428` | heap (candidate) | 3 (one run) | | `10e0fca4b7654380`, `67e290ca8506de9b`, `73badb39030948dc`, `7a4db0f35278deed`, `7df5467e5cf1a7d5`, `94c051820454d80a`, `9e4cfbfcfb3f69e7`, `b00825313cb610e3`, `b8abb99528579377`, `d8f399520433d6cf`, `db595784f5b445c6` | table | 1–4 each, in the first world presents | "heap" means the program indexes the resource heap and may write through it, and the bound heap holds this texture. That makes it a candidate, not proof. **3. What is in it.** The texture was read back at each present. - It is all zero at world entry. - On a normal run it fills very slowly: non-zero texels went 0 → 0.8% → 2.0% → 2.8%, at about +100 s, +115 s and +190 s into the world. - At the end, 14,151 distinct values; 1.8% of texels have alpha set; channel means about 0.019. - So something writes it, but it never comes close to covering the screen. **4. No single group of these programs is the writer.** Each group was skipped in its own run with `VICTORY_DEBUG_SKIP_COMPUTE`. The texture still filled every time: | Skipped | Texture non-zero at the end of the data | | --- | --- | | nothing (normal run) | 2.8% (about +190 s in the world) | | `c7557e82a8889611` | 0.34% (+68 s, then the title crashed) | | the 11 table programs | 1.2% (+145 s) | | `113d9502b615d6df`, `22dfa146f648e428` | 0.36% (+180 s) | | all 14 together | no data: the title crashed at +87 s, before the texture was registered by the trace | So either several of these write it, or the fill doesn't come from these dispatches. The second could be title memory uploaded over the texture (your point 3 on re-uploads); I have not checked that. **A side effect to know about.** Every run with any skip (5 of 5) ended in the same title access violation, `0xc0000005 at image+0x55e56f8`, between 87 and 180 s into the world. The 3 normal runs on this Mac reached the timer. So skipping these programs, any of them, breaks something the title later relies on. That also means the skip runs cover a shorter window than the normal one. **Next steps, if useful:** log uploads and copies into this texture's key, and give the skip runs a longer window, for example by skipping only during the first world frames. **Diagnostics** (branch on my side, can open as a PR): - `VICTORY_TRACE_UAV_WRITERS=<fmt>[x<w>x<h>]`: per present, `uav writer of a traced texture n=… hashes=… outcome=ran|dropped|skipped via=table|heap texture=…`. - It covers direct, indirect and thread-count dispatches. - It reads tables to their real length and handles placed UAVs. - It scans the bound heap for heap-indexing shaders, once per present. - With the above, `traced texture contents texture=… nonzero distinct a_set r_mean g_mean b_mean` at each present (fmt 86 decoded). - `VICTORY_DEBUG_SKIP_COMPUTE=<hash>[,…]`: macOS counterpart of the Windows-only `VICTORY_SKIP_PIPELINES`, for compute. The dispatch is counted as dropped. - Known gap: a skipped dispatch is checked against its tables only, not the heap. Counts and ids only.
4TheDoctor commented 2026-11-27 13:47:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by 4TheDoctor on 2026-11-27T13:47:38Z.


More from the M3 Max (40-core GPU, 48 GB, macOS 27.2.1) on main d35ba927, plain release build, --console series-x, warm cache:

  • Into story mode and the prologue: the loading artwork at ~60 s, then the opening credits in neon ("Character Art Direction", "Vehicles", "Props"...) drawn over a black scene. Mesh draws start at about frame 1,664 (mesh=43957 by the end).
  • Then GPU time-outs and a crash: 20 Caused GPU Timeout Error (kIOGPUCommandBufferCallbackErrorTimeout) within 5 s (13:46:01 to 13:46:06, about 3 min in), and 35 s later the title's own crash handler (WER - Saving t:\game_scarlett_master-...crash.log). The window was black from the first time-out on.

Keys that get from a fresh profile to story mode here (VICTORY_KEYS, counted from GameInputCreate), in case they save other testers time. Enter every 2 s up to 56 s passes the start screen and "Finish setup?". 62:Down,65:Down,68:Down,71:Enter reaches LEGAL NOTICES' Next; two Downs only reach Photosensitivity. 82:Enter,85:Down,88:Enter,91:Down,94:Enter passes the terms screen (it ticks the two in-game acknowledgements). Once the terms are accepted, the profile remembers them and later runs skip those screens, so the same keys then walk further into the menus.

The log is runs/20261127-144303-KGND3S/victory.log, and I can attach it to a tester report if that helps.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7219951232 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7219951232). Originally posted by [4TheDoctor](https://github.com/4TheDoctor) on 2026-11-27T13:47:38Z. --- More from the M3 Max (40-core GPU, 48 GB, macOS 27.2.1) on main `d35ba927`, plain release build, `--console series-x`, warm cache: - **Into story mode and the prologue:** the loading artwork at ~60 s, then the opening credits in neon ("Character Art Direction", "Vehicles", "Props"...) drawn over a black scene. Mesh draws start at about frame 1,664 (`mesh=43957` by the end). - **Then GPU time-outs and a crash:** 20 `Caused GPU Timeout Error (kIOGPUCommandBufferCallbackErrorTimeout)` within 5 s (13:46:01 to 13:46:06, about 3 min in), and 35 s later the title's own crash handler (`WER - Saving t:\game_scarlett_master-...crash.log`). The window was black from the first time-out on. Keys that get from a fresh profile to story mode here (`VICTORY_KEYS`, counted from `GameInputCreate`), in case they save other testers time. Enter every 2 s up to 56 s passes the start screen and "Finish setup?". `62:Down,65:Down,68:Down,71:Enter` reaches LEGAL NOTICES' Next; two Downs only reach Photosensitivity. `82:Enter,85:Down,88:Enter,91:Down,94:Enter` passes the terms screen (it ticks the two in-game acknowledgements). Once the terms are accepted, the profile remembers them and later runs skip those screens, so the same keys then walk further into the menus. The log is `runs/20261127-144303-KGND3S/victory.log`, and I can attach it to a tester report if that helps.
Tarraga commented 2026-11-27 13:50:00 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Tarraga on 2026-11-27T13:50:00Z.


/claim

The piece I'm taking is one part of this issue: depth textures that compute writes through unordered views. The tiled light draws test equal against the 1280x720 material depth (DXGI 118, the console's D16_UNORM_S8_UINT), and compute programs write it through R16_UNORM views of its depth plane. Metal shaders cannot write a depth texture, so those writes never reach what the light draws test. The plan is a colour twin for such a depth texture, with copies between the two where the use changes (before compute, and before a render pass into it). Nothing else in this issue. I'll release the claim as soon as the PR is up, if you'd rather keep the issue free for the other pieces.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7219999959 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7219999959). Originally posted by [Tarraga](https://github.com/Tarraga) on 2026-11-27T13:50:00Z. --- /claim The piece I'm taking is one part of this issue: depth textures that compute writes through unordered views. The tiled light draws test equal against the 1280x720 material depth (DXGI 118, the console's `D16_UNORM_S8_UINT`), and compute programs write it through `R16_UNORM` views of its depth plane. Metal shaders cannot write a depth texture, so those writes never reach what the light draws test. The plan is a colour twin for such a depth texture, with copies between the two where the use changes (before compute, and before a render pass into it). Nothing else in this issue. I'll release the claim as soon as the PR is up, if you'd rather keep the issue free for the other pieces.
github-actions[bot] commented 2026-11-27 13:50:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T13:50:15Z.


Claimed by @Tarraga. Open a draft pull request with Refs #258 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7220005005 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7220005005). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-27T13:50:15Z. --- Claimed by @Tarraga. Open a draft pull request with `Refs #258` in its description within 24 hours, or the claim expires.
alexballvideos-netizen commented 2026-11-27 13:57:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by alexballvideos-netizen on 2026-11-27T13:57:23Z.


Series X on current main, plus a correction to my earlier comment.

Setup. main b639c175 (60baf130 included) plus my diagnostics, all off unless set. M3 Max, 36 GB, macOS 27.2.1, --console series-x, headless, 300 s, warm cache. VICTORY_TRACE_PASSES=<dir>,30,4, VICTORY_TRACE_TARGETS=1, VICTORY_TRACE_UAV_WRITERS=86x2560x1440.

Run. Reached the 300 s timer with no crash and no GPU time-out. Last frame 2599, 14.3 fps overall. The pass window was at present ~2574: 58,201 PASS, 0 PASSFAIL, 437 PASSUPLOAD.

Where the picture stops on Series X. It's the same draw as your 41e09588 case, but with a different pixel shader, and here it is refused instead of running:

  • Scene colour: several f10 1280x720 targets are 93 to 100% non-zero.
  • Upscaled f10 2560x1440 (…06b0): 25% non-zero. Written by compute cb3a48538c1ba173, compute d078e2d7992bf56a (indirect) and compute 36b7d9a2859ad83b (indirect), all ran.
  • The next f10 2560x1440 (…e1a0): 0.2% non-zero. Its only writer is vertex 7a7f9ab1d7449a22 / pixel 1dade93f8f5a7235, out="a draw without a host render pipeline", refused with translation: GFX10 code at 0xf4: a hardware SGPR input is not supported. It is the only shader refused for that reason in the run.
  • 41e09588771fe7a0 does not appear at all on Series X. The output is 2560x1440 here, not 1920x1080, and the presented target is fmt 28 3840x2160.

This looks like the same pixel-input decoding you're working on (SPI_PS_INPUT_*), just a different input, so I'm not touching it. It may be worth checking the Series X variant against your change.

Uploads still seen. In the 4-present window, 437 PASSUPLOAD lines over render-target or UAV textures, blank=false. The largest groups: fmt 28 2560x1440 rt+uav (28 textures), fmt 28 2048x2048 rt+uav (18), fmt 87 3840x2160 rt (16), fmt 26 2560x1440 rt (15) and rt+uav (11), fmt 87 2560x1440 rt (12).

Sun shadow texture (fmt 86 2560x1440) on this main. It stays all zero for the whole run (nonzero=0.0 distinct=1). On 86786a72 it filled slowly, to 2.8%. With 60baf130's "GPU-written targets are no longer refilled from title memory", that suggests the earlier fill was title memory uploaded over it, not compute output. So whatever writes it, through the heap, writes nothing that sticks. The heap-indexing programs that could reach it in this run: c1011b0b4e73a4a1 (2,990 dispatches), 11dca79c65b4aa09 (125), 383aded38e260005 (90), c7557e82a8889611 (77), 33a83b29bbf4fb64 (29). These are candidates only.

Correction to my earlier comment. I said the image+0x55e56f8 access violation only happened in runs with VICTORY_DEBUG_SKIP_COMPUTE. That was wrong. A later normal windowed run on 86786a72, with no switches, ended the same way after GPU time-outs (details on #79). So the skip runs don't prove that anything depends on the skipped programs. On b639c175 the run above had no crash.

Counts and ids only.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7220151852 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7220151852). Originally posted by [alexballvideos-netizen](https://github.com/alexballvideos-netizen) on 2026-11-27T13:57:23Z. --- Series X on current main, plus a correction to my earlier comment. **Setup.** main `b639c175` (60baf130 included) plus my diagnostics, all off unless set. M3 Max, 36 GB, macOS 27.2.1, `--console series-x`, headless, 300 s, warm cache. `VICTORY_TRACE_PASSES=<dir>,30,4`, `VICTORY_TRACE_TARGETS=1`, `VICTORY_TRACE_UAV_WRITERS=86x2560x1440`. **Run.** Reached the 300 s timer with no crash and no GPU time-out. Last frame 2599, 14.3 fps overall. The pass window was at present ~2574: 58,201 `PASS`, 0 `PASSFAIL`, 437 `PASSUPLOAD`. **Where the picture stops on Series X.** It's the same draw as your 41e09588 case, but with a different pixel shader, and here it is refused instead of running: - Scene colour: several f10 1280x720 targets are 93 to 100% non-zero. - Upscaled f10 2560x1440 (`…06b0`): 25% non-zero. Written by `compute cb3a48538c1ba173`, `compute d078e2d7992bf56a` (indirect) and `compute 36b7d9a2859ad83b` (indirect), all `ran`. - The next f10 2560x1440 (`…e1a0`): 0.2% non-zero. Its only writer is `vertex 7a7f9ab1d7449a22 / pixel 1dade93f8f5a7235`, `out="a draw without a host render pipeline"`, refused with `translation: GFX10 code at 0xf4: a hardware SGPR input is not supported`. It is the only shader refused for that reason in the run. - `41e09588771fe7a0` does not appear at all on Series X. The output is 2560x1440 here, not 1920x1080, and the presented target is fmt 28 3840x2160. This looks like the same pixel-input decoding you're working on (`SPI_PS_INPUT_*`), just a different input, so I'm not touching it. It may be worth checking the Series X variant against your change. **Uploads still seen.** In the 4-present window, 437 `PASSUPLOAD` lines over render-target or UAV textures, `blank=false`. The largest groups: fmt 28 2560x1440 rt+uav (28 textures), fmt 28 2048x2048 rt+uav (18), fmt 87 3840x2160 rt (16), fmt 26 2560x1440 rt (15) and rt+uav (11), fmt 87 2560x1440 rt (12). **Sun shadow texture (fmt 86 2560x1440) on this main.** It stays all zero for the whole run (`nonzero=0.0 distinct=1`). On 86786a72 it filled slowly, to 2.8%. With 60baf130's "GPU-written targets are no longer refilled from title memory", that suggests the earlier fill was title memory uploaded over it, not compute output. So whatever writes it, through the heap, writes nothing that sticks. The heap-indexing programs that could reach it in this run: `c1011b0b4e73a4a1` (2,990 dispatches), `11dca79c65b4aa09` (125), `383aded38e260005` (90), `c7557e82a8889611` (77), `33a83b29bbf4fb64` (29). These are candidates only. **Correction to my earlier comment.** I said the `image+0x55e56f8` access violation only happened in runs with `VICTORY_DEBUG_SKIP_COMPUTE`. That was wrong. A later normal windowed run on 86786a72, with no switches, ended the same way after GPU time-outs (details on #79). So the skip runs don't prove that anything depends on the skipped programs. On b639c175 the run above had no crash. Counts and ids only.
LakshanSivakumar commented 2026-11-27 14:09:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T14:09:42Z.


Update, main is at 05396d42. Two more things landed, and the picture has moved from the internal buffers to the window, though not as a lit image yet.

Landed

  • Pixel input enables (SPI_PS_INPUT_ENA from the register image). The translator no longer guesses which inputs a pixel shader has. 3,529 more pixel shaders translate and 3,580 get their inputs in the right registers (69 of those are bound in my world run); 0 regressed. Three guesses are marked in the code and in docs/native-host.md: the decoded word is used as both ENA and ADDR, the packed position is x | y << 16, and line stipple reads 0.
  • Present planes on macOS. The title presents two planes: a 1080p plane with the game picture and a 4K plane with the UI. We only showed the largest one, the UI, which is why the world was black with HUD text. The window now draws plane 0 and blends the later planes over it. VICTORY_PRESENT_PLANE=n still shows one plane alone. docs/macos.md said the 4K plane was the picture; that is corrected.
  • Nine more PRs as one batch: #250 #252 #259 #261 #279 #296 #311 #318 #319.

What a windowed run shows now

  • Menus, intro and the title cards between scenes are right.
  • The world is a flat grey with the HUD on top. Before, it was black.

Why it is grey, in pass order

  1. Scene colour (f10 1280x720) is 95 % lit and recognisable, with ground textures.
  2. The 1080p output draw (pixel 57cc116527a14c26) now writes the picture, but only in about a quarter of its tiles. It skips tiles the 80x45 tile-class texture does not flag. Two of the eight tile-class dispatches are refused: compute f1a0f42fc6c79ad7 and compute 3ade34337c5736e1 ("a lane-mask join of an untracked mask: data, at a join of several edges"). I am on these two.
  3. The tone-map draw (pixel 8a427476328f0f35) gets real inputs and writes one flat colour. The pass trace shows several of its table entries have no host texture (untracked resources and placed resources of dimension 1). I am on this too.

Stability
World runs still end in GPU time-outs on some runs, between about 150 and 260 s; others stay up past 360 s. It is #79, not one shader: the slow buffers show almost no GPU time. VICTORY_PASSES_PER_BUFFER=1 did not avoid it here. VICTORY_METAL_RESIDENCY_SETS=0 did (330 s, no failure), but world frames then take 12 to 14 s. I will put the numbers on #79.

Frame rate in the world is still 1 to 2 fps.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7220423827 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7220423827). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T14:09:42Z. --- Update, main is at 05396d42. Two more things landed, and the picture has moved from the internal buffers to the window, though not as a lit image yet. **Landed** - **Pixel input enables** (`SPI_PS_INPUT_ENA` from the register image). The translator no longer guesses which inputs a pixel shader has. 3,529 more pixel shaders translate and 3,580 get their inputs in the right registers (69 of those are bound in my world run); 0 regressed. Three guesses are marked in the code and in docs/native-host.md: the decoded word is used as both ENA and ADDR, the packed position is `x | y << 16`, and line stipple reads 0. - **Present planes on macOS.** The title presents two planes: a 1080p plane with the game picture and a 4K plane with the UI. We only showed the largest one, the UI, which is why the world was black with HUD text. The window now draws plane 0 and blends the later planes over it. `VICTORY_PRESENT_PLANE=n` still shows one plane alone. docs/macos.md said the 4K plane was the picture; that is corrected. - Nine more PRs as one batch: #250 #252 #259 #261 #279 #296 #311 #318 #319. **What a windowed run shows now** - Menus, intro and the title cards between scenes are right. - The world is a flat grey with the HUD on top. Before, it was black. **Why it is grey, in pass order** 1. Scene colour (f10 1280x720) is 95 % lit and recognisable, with ground textures. 2. The 1080p output draw (`pixel 57cc116527a14c26`) now writes the picture, but only in about a quarter of its tiles. It skips tiles the 80x45 tile-class texture does not flag. Two of the eight tile-class dispatches are refused: `compute f1a0f42fc6c79ad7` and `compute 3ade34337c5736e1` ("a lane-mask join of an untracked mask: data, at a join of several edges"). I am on these two. 3. The tone-map draw (`pixel 8a427476328f0f35`) gets real inputs and writes one flat colour. The pass trace shows several of its table entries have no host texture (untracked resources and placed resources of dimension 1). I am on this too. **Stability** World runs still end in GPU time-outs on some runs, between about 150 and 260 s; others stay up past 360 s. It is #79, not one shader: the slow buffers show almost no GPU time. `VICTORY_PASSES_PER_BUFFER=1` did not avoid it here. `VICTORY_METAL_RESIDENCY_SETS=0` did (330 s, no failure), but world frames then take 12 to 14 s. I will put the numbers on #79. Frame rate in the world is still 1 to 2 fps.
alexballvideos-netizen commented 2026-11-27 14:17:26 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by alexballvideos-netizen on 2026-11-27T14:17:26Z.


I'll take compute d3ff71633430b06d ("a lane-mask join of an untracked mask: a value the translation could not make", next to the tile classifier). It's the #304 execz-skip shape, but the join value is relayed through one unconditional jump to the block where it's ANDed with EXEC. The change is in Lower::unneeded_edges. A local corpus sweep (21,579 shaders) shows 1 gained, 0 regressed, and 4 outputs changed, each a dead value becoming a constant. Draft PR with value tests to follow.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7220594069 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7220594069). Originally posted by [alexballvideos-netizen](https://github.com/alexballvideos-netizen) on 2026-11-27T14:17:26Z. --- I'll take `compute d3ff71633430b06d` ("a lane-mask join of an untracked mask: a value the translation could not make", next to the tile classifier). It's the #304 execz-skip shape, but the join value is relayed through one unconditional jump to the block where it's ANDed with EXEC. The change is in `Lower::unneeded_edges`. A local corpus sweep (21,579 shaders) shows 1 gained, 0 regressed, and 4 outputs changed, each a dead value becoming a constant. Draft PR with value tests to follow.
Olima34 commented 2026-11-27 15:35:51 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T15:35:51Z.


Taking eee76bf6265f33bb (agreed with the maintainer on Discord). It's refused as "a cross-lane operation between host waves in divergent code" at 0x7d0. It writes [0, 1, 1] into 25 indirect dispatch records of the ray-traced passes (0af6bb55, 52f01bcb, 67662685, caa50df7). Since it never runs, those passes never run either, and their records hold stale counts, which is the #79 hang. The guard is #383. Translating this shader is the actual fix, and a PR will follow.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7222250824 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7222250824). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T15:35:51Z. --- Taking `eee76bf6265f33bb` (agreed with the maintainer on Discord). It's refused as "a cross-lane operation between host waves in divergent code" at 0x7d0. It writes [0, 1, 1] into 25 indirect dispatch records of the ray-traced passes (`0af6bb55`, `52f01bcb`, `67662685`, `caa50df7`). Since it never runs, those passes never run either, and their records hold stale counts, which is the #79 hang. The guard is #383. Translating this shader is the actual fix, and a PR will follow.
Olima34 commented 2026-11-27 15:46:48 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T15:46:48Z.


Update on eee76bf6265f33bb: no PR yet. It needs a translator design decision, so here is what we found.

The shape. It runs 16x16 lanes in 64-lane waves, so four console waves per group. The exchanges it needs between host waves sit in two blocks:

  1. 0x6a4, a ballot (s_and_b64 s[16:17], s[18:19], exec read as a number). The block isn't "once" only because of the branch at 0x300, whose SCC is a bit of a constant-buffer dword, so it's the same in every thread of the group. We prototyped counting a block as once when its reach condition holds only such group-uniform SCCs. That makes 0x260, 0x2e0, 0x304, 0x6a4 and 0x778 once, but on its own it gains none of the class's 27 shaders.
  2. 0x6b8, two whole-wave sections (min and max over all 64 lanes, with lanes outside the mask contributing 0). They're reached by the branch at 0x6b4 on the SCC of s_and_b64 mask, exec. The fast path lowers that branch per lane (support [Lane, Lane, Phi]), so only lanes whose own bit is set enter the block. But the sections need every lane of the wave. That's lockstep's reading of the branch, and lockstep exists only for groups of one console wave.

What it would take. Lockstep per wave inside a group of several waves, with each group barrier relayed to the waves that are in the other arm. We prototyped the relay for one acyclic branch: the other arm's threads go through the same barrier blocks before their own code. Without the lockstep reading, though, it has nothing sound to stand on.

Question. Do you want this direction (lockstep for groups of several waves), or do you have another plan for the 27 compute shaders refused as "a cross-lane operation between host waves in divergent code"? 22bac47e… has the same shape. We can share the prototype patch.

Until it translates, #383's guard keeps its 25 records from hanging the GPU, but the four ray-traced passes still don't run.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7222471959 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7222471959). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T15:46:48Z. --- Update on `eee76bf6265f33bb`: no PR yet. It needs a translator design decision, so here is what we found. **The shape.** It runs 16x16 lanes in 64-lane waves, so four console waves per group. The exchanges it needs between host waves sit in two blocks: 1. **0x6a4, a ballot** (`s_and_b64 s[16:17], s[18:19], exec` read as a number). The block isn't "once" only because of the branch at 0x300, whose SCC is a bit of a constant-buffer dword, so it's the same in every thread of the group. We prototyped counting a block as once when its reach condition holds only such group-uniform SCCs. That makes 0x260, 0x2e0, 0x304, 0x6a4 and 0x778 once, but on its own it gains none of the class's 27 shaders. 2. **0x6b8, two whole-wave sections** (min and max over all 64 lanes, with lanes outside the mask contributing 0). They're reached by the branch at 0x6b4 on the SCC of `s_and_b64 mask, exec`. The fast path lowers that branch per lane (support [Lane, Lane, Phi]), so only lanes whose own bit is set enter the block. But the sections need every lane of the wave. That's lockstep's reading of the branch, and lockstep exists only for groups of one console wave. **What it would take.** Lockstep per wave inside a group of several waves, with each group barrier relayed to the waves that are in the other arm. We prototyped the relay for one acyclic branch: the other arm's threads go through the same barrier blocks before their own code. Without the lockstep reading, though, it has nothing sound to stand on. **Question.** Do you want this direction (lockstep for groups of several waves), or do you have another plan for the 27 compute shaders refused as "a cross-lane operation between host waves in divergent code"? `22bac47e…` has the same shape. We can share the prototype patch. Until it translates, #383's guard keeps its 25 records from hanging the GPU, but the four ray-traced passes still don't run.
Olima34 commented 2026-11-27 16:21:02 +00:00 (Migrated from github.com)
Author
Contributor

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


Handoff from our side before a pause, so others can pick these up. Measured on an M5 Pro 48 GB, Series S. Counts and ids only.

Landed today, from us:

  • #253, #267, #304: the G-buffer culling inputs and shaders.
  • #311 / #306: the view-address table, with its zero-field refusal.
  • #319: one walk per wrapped range.
  • #292: VICTORY_TRACE_HEAP_SET.
  • The #79 guard (#383, now in 4cf84c83): an indirect dispatch or mesh dispatch of more than 2^22 groups runs nothing.

Open findings, free for anyone (please /claim first):

  1. eee76bf6265f33bb. It's refused as "a cross-lane operation between host waves in divergent code", so it never writes the [0,1,1] init of 25 indirect dispatch records of the ray-traced passes (0af6bb55, 52f01bcb, 67662685, caa50df7). Those passes therefore never run. The guard only stops them from hanging the GPU.
    • What translating it needs (details above in this thread): lockstep per wave inside groups of several waves, with group barriers relayed to the waves in the other arm. That's a design question for the maintainer.
    • Scale: 27 compute shaders refused in that class; 22bac47e… has the same shape.
  2. A silent 30 s freeze at the first world frames, ending on the title's watchdog with no GPU error. It happened in 5 of 14 runs with VICTORY_TRACE_GPU_FAILS=1, against 0 of 9 without, so the trace makes it likely. During the freeze, no command buffer is in flight, and 46–47 title threads sit in WaitForSingleObject. The cause isn't found; it looks like a timing-sensitive wait on the title's side.
  3. Kernel-time episodes on residency sets. About every 25 s, a few command buffers take 0.31–0.36 s of kernel time each, across 3 queues at once, and hold the queues for 1.5–3.3 s. It looks like the whole set being re-wired, and it's a risk for the 5 s limit (#79). It isn't the fps ceiling: an unchanged set costs 0.03 ms per buffer in an isolated test. The trigger isn't identified.
  4. The tone-map draw (vertex cc5cecb4c1cd7099 / pixel 8a427476328f0f35). On be7dc1b5 its table entries were untracked (0.1, 0.3, 0.4, 0.7, 0.9, 1.0, 1.1) and placed-dim1 (0.0, 0.5, 0.6, 0.8, 1.2, 1.3), and its f24 1920x1080 target was flat (max 0.21). Scene colour was 96%, and the f10 1920x1080 host-memory target 97–98%. The maintainer is on the dark scene, so this is for reference only.

Tools that stay useful: corpus sweeps by output fingerprint (gained / lost / changed per stage), with boot-time dumps via VICTORY_DUMP_REFUSED / VICTORY_DUMP_ALL_SHADERS, and gpu-guard-style checks of the driver's "In use system memory" after every run (#357).

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7223155693 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7223155693). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T16:21:02Z. --- Handoff from our side before a pause, so others can pick these up. Measured on an M5 Pro 48 GB, Series S. Counts and ids only. **Landed today, from us:** - #253, #267, #304: the G-buffer culling inputs and shaders. - #311 / #306: the view-address table, with its zero-field refusal. - #319: one walk per wrapped range. - #292: `VICTORY_TRACE_HEAP_SET`. - The #79 guard (#383, now in 4cf84c83): an indirect dispatch or mesh dispatch of more than 2^22 groups runs nothing. **Open findings, free for anyone (please `/claim` first):** 1. **`eee76bf6265f33bb`.** It's refused as "a cross-lane operation between host waves in divergent code", so it never writes the [0,1,1] init of 25 indirect dispatch records of the ray-traced passes (`0af6bb55`, `52f01bcb`, `67662685`, `caa50df7`). Those passes therefore never run. The guard only stops them from hanging the GPU. - **What translating it needs** (details above in this thread): lockstep per wave inside groups of several waves, with group barriers relayed to the waves in the other arm. That's a design question for the maintainer. - **Scale:** 27 compute shaders refused in that class; `22bac47e…` has the same shape. 2. **A silent 30 s freeze at the first world frames,** ending on the title's watchdog with no GPU error. It happened in 5 of 14 runs with `VICTORY_TRACE_GPU_FAILS=1`, against 0 of 9 without, so the trace makes it likely. During the freeze, no command buffer is in flight, and 46–47 title threads sit in `WaitForSingleObject`. The cause isn't found; it looks like a timing-sensitive wait on the title's side. 3. **Kernel-time episodes on residency sets.** About every 25 s, a few command buffers take 0.31–0.36 s of kernel time each, across 3 queues at once, and hold the queues for 1.5–3.3 s. It looks like the whole set being re-wired, and it's a risk for the 5 s limit (#79). It isn't the fps ceiling: an unchanged set costs 0.03 ms per buffer in an isolated test. The trigger isn't identified. 4. **The tone-map draw** (vertex `cc5cecb4c1cd7099` / pixel `8a427476328f0f35`). On be7dc1b5 its table entries were `untracked` (0.1, 0.3, 0.4, 0.7, 0.9, 1.0, 1.1) and `placed-dim1` (0.0, 0.5, 0.6, 0.8, 1.2, 1.3), and its f24 1920x1080 target was flat (max 0.21). Scene colour was 96%, and the f10 1920x1080 host-memory target 97–98%. The maintainer is on the dark scene, so this is for reference only. **Tools that stay useful:** corpus sweeps by output fingerprint (gained / lost / changed per stage), with boot-time dumps via `VICTORY_DUMP_REFUSED` / `VICTORY_DUMP_ALL_SHADERS`, and gpu-guard-style checks of the driver's "In use system memory" after every run (#357).
Olima34 commented 2026-11-27 16:21:59 +00:00 (Migrated from github.com)
Author
Contributor

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


For the eee76bf6 design discussion, the prototype mentioned above is on a branch: https://github.com/Olima34/Native-Victory-macOS/tree/wip/relay-eee76bf6 (69b22e24, on 728845d1). It adds group-uniform "once" blocks and exchange barriers relayed to the waves in the other arm, with debug prints. It's not for merging, and it doesn't make eee76bf6 translate on its own (it lacks the per-wave lockstep reading), but it's a starting point if someone takes that design.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7223173886 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7223173886). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T16:21:59Z. --- For the `eee76bf6` design discussion, the prototype mentioned above is on a branch: https://github.com/Olima34/Native-Victory-macOS/tree/wip/relay-eee76bf6 (69b22e24, on 728845d1). It adds group-uniform "once" blocks and exchange barriers relayed to the waves in the other arm, with debug prints. It's **not for merging**, and it doesn't make `eee76bf6` translate on its own (it lacks the per-wave lockstep reading), but it's a starting point if someone takes that design.
LakshanSivakumar commented 2026-11-27 16:23:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T16:23:19Z.


Testers: please try main at 4cf84c83

A lot landed on main in the last day. If you have tested before, please pull and run again.

What changed

  • The world is no longer black or flat grey. The prologue now reaches the window as a real picture: the prison cell, the characters and the posters can be recognised.
  • The long freeze after the world loads did not come back in my runs: one windowed run of 330 s (about 200 s of it in the world) and one headless run of 170 s, both with 0 GPU errors. This is the #79 guard from #383 plus other fixes. Two runs is not proof, so more runs on other Macs help a lot.
  • Stopping the game is safe now. Ctrl-C lets the GPU finish its work before the process ends (#358). Before this, a stop could leave about 20 GB of GPU memory stuck until a reboot (#357).
  • Many more shaders translate, and about 15 pull requests from contributors were merged.

What is still wrong (no need to report these)

  • The picture is far too dark most of the time, and sometimes blown out to white.
  • Some objects are broken into long shards, some are missing, and some surfaces have white patches instead of textures.
  • The world runs at about 1 frame per second on my Mac.
  • 16 GB Macs can still run out of GPU memory (#392).

How to test

git pull
tools/macos/run-native.sh --seconds 300

Add --headless if you do not want a window. Stop with Ctrl-C once, then wait for it to exit.

What I would like to know

  • Your Mac (chip, memory, macOS version) and the commit.
  • Did you see a picture after the world loads (about 100 s in)? Was it dark, white, or readable?
  • Did it freeze or crash? At what time, and the last 30 lines of the log.
  • After the run: did your Mac's memory go back to normal?

Please open a tester report issue for it, or add to your earlier one. Please do not attach screenshots, recordings or any game files.

Being worked on now: the darkness, the broken and missing objects, the missing textures, and the frame rate.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7223201827 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7223201827). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T16:23:19Z. --- ## Testers: please try main at 4cf84c83 A lot landed on main in the last day. If you have tested before, please pull and run again. **What changed** - **The world is no longer black or flat grey.** The prologue now reaches the window as a real picture: the prison cell, the characters and the posters can be recognised. - **The long freeze after the world loads did not come back** in my runs: one windowed run of 330 s (about 200 s of it in the world) and one headless run of 170 s, both with 0 GPU errors. This is the #79 guard from #383 plus other fixes. Two runs is not proof, so more runs on other Macs help a lot. - **Stopping the game is safe now.** Ctrl-C lets the GPU finish its work before the process ends (#358). Before this, a stop could leave about 20 GB of GPU memory stuck until a reboot (#357). - Many more shaders translate, and about 15 pull requests from contributors were merged. **What is still wrong (no need to report these)** - The picture is far too dark most of the time, and sometimes blown out to white. - Some objects are broken into long shards, some are missing, and some surfaces have white patches instead of textures. - The world runs at about 1 frame per second on my Mac. - 16 GB Macs can still run out of GPU memory (#392). **How to test** ```bash git pull tools/macos/run-native.sh --seconds 300 ``` Add `--headless` if you do not want a window. Stop with Ctrl-C once, then wait for it to exit. **What I would like to know** - Your Mac (chip, memory, macOS version) and the commit. - Did you see a picture after the world loads (about 100 s in)? Was it dark, white, or readable? - Did it freeze or crash? At what time, and the last 30 lines of the log. - After the run: did your Mac's memory go back to normal? Please open a tester report issue for it, or add to your earlier one. Please do not attach screenshots, recordings or any game files. Being worked on now: the darkness, the broken and missing objects, the missing textures, and the frame rate.
oandrosz commented 2026-11-27 16:44:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by oandrosz on 2026-11-27T16:44:24Z.


image i have another problem ...

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7223614149 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7223614149). Originally posted by [oandrosz](https://github.com/oandrosz) on 2026-11-27T16:44:24Z. --- <img width="1708" height="1066" alt="image" src="https://github.com/user-attachments/assets/bcb380a2-b7cb-4935-b6d2-d3dd7e9c5eb3" /> i have another problem ...
theappartment commented 2026-11-27 16:54:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by theappartment on 2026-11-27T16:54:17Z.


Retested main at b998bb65 in the native Metal window with Series S selected. The prison cell is recognizable, but the picture is still hard to read and the lighting varies noticeably. This retry reached its scheduled stop, whereas the first run ended early. Movement with W is still unconfirmed.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7223803454 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7223803454). Originally posted by [theappartment](https://github.com/theappartment) on 2026-11-27T16:54:17Z. --- Retested main at `b998bb65` in the native Metal window with Series S selected. The prison cell is recognizable, but the picture is still hard to read and the lighting varies noticeably. This retry reached its scheduled stop, whereas the first run ended early. Movement with W is still unconfirmed.
LakshanSivakumar commented 2026-11-27 16:56:11 +00:00 (Migrated from github.com)
Author
Contributor

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


@oandrosz Please do not include any screenshots in this repo. Kindly help to delete. Thank you

@theappartment Yes this is expected. movement is tested to be working on my machine. A lighting fix is coming soon.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7223839386 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7223839386). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T16:56:11Z. --- @oandrosz Please do not include any screenshots in this repo. Kindly help to delete. Thank you @theappartment Yes this is expected. movement is tested to be working on my machine. A lighting fix is coming soon.
LakshanSivakumar commented 2026-11-27 17:59:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T17:59:55Z.


Progress update, 28 Nov: the world is lit now, graphics are the focus

I pushed everything from the last day as a branch for anyone who wants to try it: preview/graphics-2026-11-28. It is not on main yet. main only gets changes after the full shader corpus comparison and a game run, and that is still in progress for these.

What changed on the branch

  • The black world is lit. The lit scene went from about 5 % of pixels filled to about 99 %. The cause is in how the host handles depth "twin" textures. The real fix is not found yet, so for now it needs a switch: VICTORY_DEPTH_TWINS=0.
  • Broken geometry, one root cause fixed. Reads that crossed a 64 KiB page only looked up the first page. Fixed for vertex loads and six other kinds of read and store.
  • Mesh shaders. Two groups that were refused now translate (lane-mask merge under EXEC, and registers past a mesh shader's user data).
  • Compute. Two new rules bring back about 180 of the roughly 677 compute jobs dropped per frame.
  • Textures. Minimum LOD clamp, sampler LOD bias and explicit mip level clamp are honoured. BCPack unpacking was checked and is correct.
  • Exit. The host waits longer for the GPU to finish before quitting, so runs end more cleanly.

How to try it

git fetch origin preview/graphics-2026-11-28 && git checkout FETCH_HEAD
VICTORY_GUESS_GRAPHICS=1 VICTORY_DEPTH_TWINS=0 tools/macos/run-native.sh --console series-s <your game folder>

What is still wrong (please do not report these again)

  • Flying shards, fence panels and rays across the picture. They are drawn into the lit scene itself. Cause not known yet. This is the biggest fault.
  • Some triangles missing on characters and clothing.
  • Fog, exposure and sky are unreliable, because 400 to 500 compute jobs per frame are still dropped.
  • A large share of draws in a world frame is dropped for lack of a pipeline. I am measuring why.
  • It is slow: about 1.3 frames per second in the world. I am leaving speed alone until the picture is right.
  • One run left about 21 GB of GPU memory stuck until a reboot (before the exit fix). If the game will not start after a crash, check memory and reboot.

What I ran and what I did not

Run on an M-series Mac, Series S profile: several headless runs and two windowed runs of this exact commit (b3c1a1b0). Not run: the Series X profile, any other Mac, and the full corpus comparison for the translator changes on this branch as a whole.

If you test it, the most useful report is a screenshot plus the last 50 lines of victory.log.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7225008641 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7225008641). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T17:59:55Z. --- ## Progress update, 28 Nov: the world is lit now, graphics are the focus I pushed everything from the last day as a branch for anyone who wants to try it: [`preview/graphics-2026-11-28`](https://github.com/LakshanSivakumar/Native-Victory-macOS/tree/preview/graphics-2026-11-28). It is not on `main` yet. `main` only gets changes after the full shader corpus comparison and a game run, and that is still in progress for these. **What changed on the branch** - **The black world is lit.** The lit scene went from about 5 % of pixels filled to about 99 %. The cause is in how the host handles depth "twin" textures. The real fix is not found yet, so for now it needs a switch: `VICTORY_DEPTH_TWINS=0`. - **Broken geometry, one root cause fixed.** Reads that crossed a 64 KiB page only looked up the first page. Fixed for vertex loads and six other kinds of read and store. - **Mesh shaders.** Two groups that were refused now translate (lane-mask merge under EXEC, and registers past a mesh shader's user data). - **Compute.** Two new rules bring back about 180 of the roughly 677 compute jobs dropped per frame. - **Textures.** Minimum LOD clamp, sampler LOD bias and explicit mip level clamp are honoured. BCPack unpacking was checked and is correct. - **Exit.** The host waits longer for the GPU to finish before quitting, so runs end more cleanly. **How to try it** ``` git fetch origin preview/graphics-2026-11-28 && git checkout FETCH_HEAD VICTORY_GUESS_GRAPHICS=1 VICTORY_DEPTH_TWINS=0 tools/macos/run-native.sh --console series-s <your game folder> ``` **What is still wrong (please do not report these again)** - Flying shards, fence panels and rays across the picture. They are drawn into the lit scene itself. Cause not known yet. This is the biggest fault. - Some triangles missing on characters and clothing. - Fog, exposure and sky are unreliable, because 400 to 500 compute jobs per frame are still dropped. - A large share of draws in a world frame is dropped for lack of a pipeline. I am measuring why. - It is slow: about 1.3 frames per second in the world. I am leaving speed alone until the picture is right. - One run left about 21 GB of GPU memory stuck until a reboot (before the exit fix). If the game will not start after a crash, check memory and reboot. **What I ran and what I did not** Run on an M-series Mac, Series S profile: several headless runs and two windowed runs of this exact commit (`b3c1a1b0`). Not run: the Series X profile, any other Mac, and the full corpus comparison for the translator changes on this branch as a whole. If you test it, the most useful report is a screenshot plus the last 50 lines of `victory.log`.
FastFatMetal commented 2026-11-27 19:26:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by FastFatMetal on 2026-11-27T19:26:30Z.


Run on current main for you, from the 256 GB box (#147 history: FastFatMetal / M5 Ultra).

Setup: commit b998bb65, windowed, default --console series-x, macOS 27.2.1, MSC 4.0 beta 3 via VICTORY_MSC_DYLIB (no sudo, dylib under home dir).

Headline: the world is black on this box because ONE of the six named culling computes is refused, and its work is silently dropped.

All seven hashes from your list bind on the first world frame (6537), so the title dispatches everything correctly:

19:19:16.167566 INFO first bind frame=6537 compute hash=e85d0ba6846a5b5e   (reset)      -> translated
19:19:16.170490 INFO first bind frame=6537 compute hash=ff826810673a0198                 -> translated
19:19:16.268911 INFO first bind frame=6537 compute hash=898d9c1a5605ad81
19:19:16.268958 WARN title shader refused; its work is dropped shader="compute 898d9c1a5605ad81" reason=translation: GFX10 code at 0xfc4: a cross-lane operation between host waves in divergent code is not supported
19:19:20.287986 INFO first bind frame=6537 compute hash=b30937e9de066fa9                 -> translated
19:19:20.288267 INFO first bind frame=6537 compute hash=4e2edbd69fe414f1                 -> translated
19:19:23.991641 INFO first bind frame=6537 compute hash=5833c0c20c5bec9b                 -> translated
19:19:24.096793 INFO first bind frame=6537 compute hash=f44473ebe75e0047                 -> translated

So 898d9c1a5605ad81 never executes: its atomic-adds/stores into the mesh records are the dropped work. If that shader covers a required cell/layer, its counts can only ever be what e85d0ba6846a5b5e left them at, which is 0. Consistent with mesh=6260 draws all reading zero counts.

World perf / survival (no crash, no watchdog the whole time, same as your headless results but windowed):

  • world enters at frame 6537, still alive at frame 6912 (~10 min in-world), ~0.6-1 fps
  • last line: 2026-11-27T19:25:08.871090Z INFO victory_gpu::native::glue: native draws so far frame=6912 recorded=750509 encoded=670208 no_pipeline=227555 no_texture=0 mesh=19078 mesh_indirect=0 indirect=0 texture_copies=0
  • refused shaders in the whole run: 374. Top reasons verbatim:
    • a view address field the table gives as 0: a buffer's stride or swizzle (~2 x 111)
    • a descriptor neither loaded nor built is not supported (~80)
    • a lane-mask join of an untracked mask (~32)
    • barycentrics read directly is not supported (~12)
    • a cross-lane operation between host waves in divergent code is not supported (~8, the culling one is among them)
  • D32FloatS8 upload skips: 0 (fixed since 49b5521); refused total down from 868 to 374.

Full scrubbed log (hostname/user scrubbed, 20 MB gz, sha256 22d35800299ef9faa4a06afcde34b253510ca5189d9fa6c507acbd6040efbf32):
https://raw.githubusercontent.com/FastFatMetal/victory-tester-logs/main/logs/victory-b998bb65-M5Ultra-anon.log.gz

Suggest grepping the other Macs' logs for 898d9c1a5605ad81 + refused — if it refuses everywhere, the six-shader puzzle has a first suspect.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7226529550 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7226529550). Originally posted by [FastFatMetal](https://github.com/FastFatMetal) on 2026-11-27T19:26:30Z. --- Run on current main for you, from the 256 GB box (#147 history: FastFatMetal / M5 Ultra). **Setup**: commit `b998bb65`, windowed, default `--console series-x`, macOS 27.2.1, MSC 4.0 beta 3 via `VICTORY_MSC_DYLIB` (no sudo, dylib under home dir). **Headline: the world is black on this box because ONE of the six named culling computes is refused, and its work is silently dropped.** All seven hashes from your list bind on the **first world frame (6537)**, so the title dispatches everything correctly: ``` 19:19:16.167566 INFO first bind frame=6537 compute hash=e85d0ba6846a5b5e (reset) -> translated 19:19:16.170490 INFO first bind frame=6537 compute hash=ff826810673a0198 -> translated 19:19:16.268911 INFO first bind frame=6537 compute hash=898d9c1a5605ad81 19:19:16.268958 WARN title shader refused; its work is dropped shader="compute 898d9c1a5605ad81" reason=translation: GFX10 code at 0xfc4: a cross-lane operation between host waves in divergent code is not supported 19:19:20.287986 INFO first bind frame=6537 compute hash=b30937e9de066fa9 -> translated 19:19:20.288267 INFO first bind frame=6537 compute hash=4e2edbd69fe414f1 -> translated 19:19:23.991641 INFO first bind frame=6537 compute hash=5833c0c20c5bec9b -> translated 19:19:24.096793 INFO first bind frame=6537 compute hash=f44473ebe75e0047 -> translated ``` So `898d9c1a5605ad81` never executes: its atomic-adds/stores into the mesh records are the dropped work. If that shader covers a required cell/layer, its counts can only ever be what `e85d0ba6846a5b5e` left them at, which is 0. Consistent with `mesh=6260` draws all reading zero counts. **World perf / survival** (no crash, no watchdog the whole time, same as your headless results but windowed): - world enters at frame 6537, still alive at frame 6912 (~10 min in-world), ~0.6-1 fps - last line: 2026-11-27T19:25:08.871090Z INFO victory_gpu::native::glue: native draws so far frame=6912 recorded=750509 encoded=670208 no_pipeline=227555 no_texture=0 mesh=19078 mesh_indirect=0 indirect=0 texture_copies=0 - refused shaders in the whole run: 374. Top reasons verbatim: - `a view address field the table gives as 0: a buffer's stride or swizzle` (~2 x 111) - `a descriptor neither loaded nor built is not supported` (~80) - `a lane-mask join of an untracked mask` (~32) - `barycentrics read directly is not supported` (~12) - `a cross-lane operation between host waves in divergent code is not supported` (~8, the culling one is among them) - D32FloatS8 upload skips: 0 (fixed since 49b5521); refused total down from 868 to 374. Full scrubbed log (hostname/user scrubbed, 20 MB gz, sha256 `22d35800299ef9faa4a06afcde34b253510ca5189d9fa6c507acbd6040efbf32`): <https://raw.githubusercontent.com/FastFatMetal/victory-tester-logs/main/logs/victory-b998bb65-M5Ultra-anon.log.gz> Suggest grepping the other Macs' logs for `898d9c1a5605ad81` + `refused` — if it refuses everywhere, the six-shader puzzle has a first suspect.
FastFatMetal commented 2026-11-27 19:32:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by FastFatMetal on 2026-11-27T19:32:16Z.


Follow-up on the same always-on run (b998bb65, M5 Ultra 256 GB): 16+ min windowed uptime, no watchdog, no unhandled exception — frame 7 680, encoded=1.84 M, mesh=46 535 draws issued, no_texture=0, refused steady at 488 (new world regions trickle in a few per minute, same reason mix), RAM plateaued at 22.4 GB. Still fully black, consistent with the culling finding above rather than with instability: the world sim and streaming run indefinitely, the frame output is simply starved of non-zero mesh counts.

So on a machine with no memory ceiling, long-run stability is not a factor at all — the zero-count records look like the whole story. The 898d9c1a5605ad81 refusal (cross-lane between host waves in divergent code) is the first suspect I would chase from the Windows side too: is the six-way culling set supposed to run wave64-only paths that our wave32 host split?

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7226624996 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7226624996). Originally posted by [FastFatMetal](https://github.com/FastFatMetal) on 2026-11-27T19:32:16Z. --- Follow-up on the same always-on run (`b998bb65`, M5 Ultra 256 GB): **16+ min windowed uptime, no watchdog, no unhandled exception** — frame 7 680, `encoded=1.84 M`, `mesh=46 535` draws issued, `no_texture=0`, refused steady at 488 (new world regions trickle in a few per minute, same reason mix), RAM plateaued at 22.4 GB. Still fully black, consistent with the culling finding above rather than with instability: the world sim and streaming run indefinitely, the frame output is simply starved of non-zero mesh counts. So on a machine with no memory ceiling, long-run stability is not a factor at all — the zero-count records look like the whole story. The `898d9c1a5605ad81` refusal (cross-lane between host waves in divergent code) is the first suspect I would chase from the Windows side too: is the six-way culling set supposed to run wave64-only paths that our wave32 host split?
FastFatMetal commented 2026-11-27 19:42:37 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by FastFatMetal on 2026-11-27T19:42:37Z.


Traced run for you, using your own tool — VICTORY_TRACE_RECORD_WRITERS=1, same box (M5 Ultra 256 GB, macOS 27.2.1), commit b998bb65, windowed story mode, default series-x.

1. The sole holder of the mesh record buffers, on every sampled present, is the refused shader — dropped:

mesh records records=4046 zero=3774
mesh record buffer holder records=1513 zero=1465 holder="["compute 898d9c1a5605ad81"] dropped" reads=["0x…fmt 41 1024x512"]
mesh record buffer holder records=632  zero=613  holder="["compute 898d9c1a5605ad81"] dropped" reads=["0x…fmt 28 3840x2160", "0x…fmt 41 1024x512"]
mesh record buffer holder records=955  zero=923  holder="["compute 898d9c1a5605ad81"] dropped" reads=["0x…fmt 41 1024x512"]

9 of 11 sampled presents name it dropped; the other five culling hashes from your list never appear as record-buffer holders at all. Zero ratios 90–98 %, matching your 98 % observation independently of my earlier bind/refused timeline. The fmt 41 1024x512 texture it reads lines up with the four depth gathers you described.

2. New wrinkle, reported as-is: with the tracer ON, this run died at 0xc0000005 at image+0x55e56f8 (exit 134) ~5 min into the world. The untraced run on the same commit this morning was alive 16+ min with no exception. So that address is not fully dead in story mode on this box — timing changes the outcome (tracer pacing, or a slow stall that eventually trips the title watchdog?). Flagging it rather than hiding it: #15 may want a reopened look, or the two runs differ in a way I have not pinned.

Full traced log (scrubbed, sha256 4d8fe45e610d61abcc93746eca68f0fac1276ee387ffeebffd1070e2212b4782):
https://raw.githubusercontent.com/FastFatMetal/victory-tester-logs/main/logs/victory-b998bb65-trace-M5Ultra-anon.log.gz

If useful I can run the six culling hashes as VICTORY_TRACE_RECORD_WRITERS=<comma-list> watch mode, and/or the same trace with VICTORY_NO_LOCKSTEP=1 for an A/B of what the lockstep fallback actually rescues here.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7226794109 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7226794109). Originally posted by [FastFatMetal](https://github.com/FastFatMetal) on 2026-11-27T19:42:37Z. --- Traced run for you, using your own tool — `VICTORY_TRACE_RECORD_WRITERS=1`, same box (M5 Ultra 256 GB, macOS 27.2.1), commit `b998bb65`, windowed story mode, default `series-x`. **1. The sole holder of the mesh record buffers, on every sampled present, is the refused shader — dropped:** ``` mesh records records=4046 zero=3774 mesh record buffer holder records=1513 zero=1465 holder="["compute 898d9c1a5605ad81"] dropped" reads=["0x…fmt 41 1024x512"] mesh record buffer holder records=632 zero=613 holder="["compute 898d9c1a5605ad81"] dropped" reads=["0x…fmt 28 3840x2160", "0x…fmt 41 1024x512"] mesh record buffer holder records=955 zero=923 holder="["compute 898d9c1a5605ad81"] dropped" reads=["0x…fmt 41 1024x512"] ``` 9 of 11 sampled presents name it `dropped`; the other five culling hashes from your list never appear as record-buffer holders at all. Zero ratios 90–98 %, matching your 98 % observation independently of my earlier bind/refused timeline. The `fmt 41 1024x512` texture it reads lines up with the four depth gathers you described. **2. New wrinkle, reported as-is:** with the tracer ON, this run died at **`0xc0000005 at image+0x55e56f8`** (exit 134) ~5 min into the world. The untraced run on the same commit this morning was alive 16+ min with no exception. So that address is not fully dead in story mode on this box — timing changes the outcome (tracer pacing, or a slow stall that eventually trips the title watchdog?). Flagging it rather than hiding it: #15 may want a reopened look, or the two runs differ in a way I have not pinned. Full traced log (scrubbed, sha256 `4d8fe45e610d61abcc93746eca68f0fac1276ee387ffeebffd1070e2212b4782`): <https://raw.githubusercontent.com/FastFatMetal/victory-tester-logs/main/logs/victory-b998bb65-trace-M5Ultra-anon.log.gz> If useful I can run the six culling hashes as `VICTORY_TRACE_RECORD_WRITERS=<comma-list>` watch mode, and/or the same trace with `VICTORY_NO_LOCKSTEP=1` for an A/B of what the lockstep fallback actually rescues here.
Olima34 commented 2026-11-27 21:10:18 +00:00 (Migrated from github.com)
Author
Contributor

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


On the depth twins (VICTORY_DEPTH_TWINS=0 on the preview branch): we think we have the real cause, found in the code and in a trace. It isn't verified in game yet, because this Mac needs a reboot first.

  • What goes wrong: the host copies every depth texture into its twin before every compute pass, on that pass's own queue, and the next render pass copies the twin back.
  • Why it breaks: the title has 5 queues (1 graphics, 4 compute-only). In a traced world frame, the 4 compute queues ran 1,360 dispatches in 8 submissions between the graphics queue's 9, and named no depth texture at all (0 views of DXGI 19/20/39/53/118). Queues are ordered only by the title's fences. So those copies read depth the graphics queue was still drawing, and the copy back put older depth under later draws.
  • How many textures: 108 twins in the run (scene depth, material depth and 104 shadow maps).
  • Ruled out: a float mismatch on the Equal test of the 192 light draws. z = k x 0x37800080 on both sides, and Metal keeps it bit for bit (new test).
  • The fix, local for now: a pass copies only the twins its tables name, with 3 states per twin. DXGI 119/21 views get the twin's contents in the depth texture first, and draws that sample the twin get the depth first. There are 3 new tests, 2 of which fail with the old rule.

Next: an A/B in game with twins on, to check whether it reaches the ~99% of VICTORY_DEPTH_TWINS=0, then a PR.

@Sheffy007, a heads-up: #439 changes the same functions but keeps "every twin before every compute pass", so the cross-queue copies stay. The two will conflict, so let's line them up once we have the game numbers.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7228200386 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7228200386). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T21:10:18Z. --- On the depth twins (`VICTORY_DEPTH_TWINS=0` on the preview branch): we think we have the real cause, found in the code and in a trace. It isn't verified in game yet, because this Mac needs a reboot first. - **What goes wrong:** the host copies every depth texture into its twin before every compute pass, on that pass's own queue, and the next render pass copies the twin back. - **Why it breaks:** the title has 5 queues (1 graphics, 4 compute-only). In a traced world frame, the 4 compute queues ran 1,360 dispatches in 8 submissions between the graphics queue's 9, and named no depth texture at all (0 views of DXGI 19/20/39/53/118). Queues are ordered only by the title's fences. So those copies read depth the graphics queue was still drawing, and the copy back put older depth under later draws. - **How many textures:** 108 twins in the run (scene depth, material depth and 104 shadow maps). - **Ruled out:** a float mismatch on the Equal test of the 192 light draws. z = k x 0x37800080 on both sides, and Metal keeps it bit for bit (new test). - **The fix, local for now:** a pass copies only the twins its tables name, with 3 states per twin. DXGI 119/21 views get the twin's contents in the depth texture first, and draws that sample the twin get the depth first. There are 3 new tests, 2 of which fail with the old rule. Next: an A/B in game with twins on, to check whether it reaches the ~99% of `VICTORY_DEPTH_TWINS=0`, then a PR. @Sheffy007, a heads-up: #439 changes the same functions but keeps "every twin before every compute pass", so the cross-queue copies stay. The two will conflict, so let's line them up once we have the game numbers.
Olima34 commented 2026-11-27 21:45:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T21:45:46Z.


A correction to my depth-twin comment above: the cross-queue copy fix does not restore the lit scene. Lit fraction of the lit scene (DXGI 10, 1280x720) at 121 / 146 / 171 / 196 s, on preview b3c1a1b0, Series S headless, with 0 GPU errors in all three runs:

Run 121 s 146 s 171 s 196 s
Twins on 0.040 0.074 0.862 0.923
Twins on + the copy fix 0.000 0.021 0.684 0.799
VICTORY_DEPTH_TWINS=0 0.787 0.791 1.000 1.000

So the 5% vs 99% is the first, interior scene, and it's black with twins whether or not the copies are fixed. The cross-queue copies are real, but they aren't what blacks it out.

Next hypothesis, being tested: once a depth texture has a twin, its colour-format reads see the twin. The 104 twinned shadow maps (DXGI 53) are sampled through such views with a comparison, and Metal compares only against a depth texture. Numbers will follow.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7228731704 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7228731704). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T21:45:46Z. --- A correction to my depth-twin comment above: the cross-queue copy fix does **not** restore the lit scene. Lit fraction of the lit scene (DXGI 10, 1280x720) at 121 / 146 / 171 / 196 s, on preview b3c1a1b0, Series S headless, with 0 GPU errors in all three runs: | Run | 121 s | 146 s | 171 s | 196 s | |---|---|---|---|---| | Twins on | 0.040 | 0.074 | 0.862 | 0.923 | | Twins on + the copy fix | 0.000 | 0.021 | 0.684 | 0.799 | | `VICTORY_DEPTH_TWINS=0` | 0.787 | 0.791 | 1.000 | 1.000 | So the 5% vs 99% is the first, interior scene, and it's black with twins whether or not the copies are fixed. The cross-queue copies are real, but they aren't what blacks it out. **Next hypothesis, being tested:** once a depth texture has a twin, its colour-format reads see the twin. The 104 twinned shadow maps (DXGI 53) are sampled through such views with a comparison, and Metal compares only against a depth texture. Numbers will follow.
Olima34 commented 2026-11-27 22:58:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T22:58:12Z.


On the depth twins, measured on preview b3c1a1b0 (Series S, headless, 10 runs). Our reading of the pictures is the opposite of what the fill numbers suggest.

Fill of the lit scene (DXGI 10, 1280x720, at ~121 / 146 / 171 / 196 s):

Twins 121 s 146 s 171 s 196 s
On 0.040 0.074 0.862 0.923
Off (VICTORY_DEPTH_TWINS=0) 0.787 0.791 1.000 1.000
  • Only the material depth (DXGI 118) gives the dark state. Twinning one class at a time, 118 alone gives 0.163 / 0.088 / 0.682, while 19, 53 or 39 alone look like twins off.
  • The pictures say the opposite of the fill. Twins off is filled but wrong: blue and white slabs, shards and leftovers of earlier frames, because the light draws' Equal test doesn't see the material depth. Twins on gives a coherent outdoor sunset scene. So a large part of "shards drawn into the lit scene" looks like the twins-off picture itself.
  • Indoors with twins on, our first suspect: the scene is only 9% filled, even though the class test works (class 0 is 53% of pixels; the 192 light draws are classes 0–59 x modes 0/1/2). The per-tile R8 10x6 texture that the light vertex program tests is all zero, even though its three writers ran (3e68013d, e87d636e26d301fe, 708cbba88ee4354b). They read the material depth's stencil plane, which compute's R8_UINT writes never reach on the host. We're checking this now.

Separately, VICTORY_TRACE_PASSES crashed the game here at the last present (a placed texture's key read as an object). A small fix with a test will follow.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7229765074 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7229765074). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T22:58:12Z. --- On the depth twins, measured on preview b3c1a1b0 (Series S, headless, 10 runs). Our reading of the pictures is the opposite of what the fill numbers suggest. **Fill of the lit scene** (DXGI 10, 1280x720, at ~121 / 146 / 171 / 196 s): | Twins | 121 s | 146 s | 171 s | 196 s | |---|---|---|---|---| | On | 0.040 | 0.074 | 0.862 | 0.923 | | Off (`VICTORY_DEPTH_TWINS=0`) | 0.787 | 0.791 | 1.000 | 1.000 | - **Only the material depth (DXGI 118) gives the dark state.** Twinning one class at a time, 118 alone gives 0.163 / 0.088 / 0.682, while 19, 53 or 39 alone look like twins off. - **The pictures say the opposite of the fill.** Twins off is filled but wrong: blue and white slabs, shards and leftovers of earlier frames, because the light draws' Equal test doesn't see the material depth. Twins on gives a coherent outdoor sunset scene. So a large part of "shards drawn into the lit scene" looks like the twins-off picture itself. - **Indoors with twins on, our first suspect:** the scene is only 9% filled, even though the class test works (class 0 is 53% of pixels; the 192 light draws are classes 0–59 x modes 0/1/2). The per-tile R8 10x6 texture that the light vertex program tests is all zero, even though its three writers ran (`3e68013d`, `e87d636e26d301fe`, `708cbba88ee4354b`). They read the material depth's stencil plane, which compute's R8_UINT writes never reach on the host. We're checking this now. Separately, `VICTORY_TRACE_PASSES` crashed the game here at the last present (a placed texture's key read as an object). A small fix with a test will follow.
alexballvideos-netizen commented 2026-11-27 23:16:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by alexballvideos-netizen on 2026-11-27T23:16:55Z.


Notes on the flying shards from a day of tracing, so nobody has to repeat the dead ends. Preview branch b3c1a1b0, VICTORY_GUESS_GRAPHICS=1 VICTORY_DEPTH_TWINS=0, M3 Max 36 GB, Series X, VICTORY_TRACE_PASSES at about the 40th world present. Counts and ids only.

Where they are: already in the G-buffer, in the base colour (f29 2560x1440) and the other targets, before any lighting. The lit scene and the presented frame only carry them on.

  • They're on every kind of mesh geometry: characters (long skin-coloured fans), cars, buildings and props.
  • One frame wrote the G-buffer with 1,416 draws, about 1,100 of them mesh draws from 86 vertex programs.

Ruled out:

  • 64 KiB pages split across mappings (the addr::build limit in the docs): 0. I counted fully mapped 64 KiB pages that no single mapping holds over a whole run with about 98,000 mappings.
  • Root views leaving their pool's linear run: VICTORY_TRACE_ROOT_SPAN logs 4,077 lines, all through="table", so the per-page lookups apply. No heap view "with a gap" either.
  • The ordinary vertex-pipeline G-buffer draws (481c8eb108b917f3, 48 draws; 77a530cb52417fee, 26). Dropping them leaves the shards.
  • compute 95343da7c8d286c4. It's refused ("a lane-mask join of an untracked mask: a value the translation could not make", 0x470c) and writes a 512 KiB buffer that 12 G-buffer mesh programs read, plus small ones that dozens read. #466 makes it translate, and it then runs in the game, but the shards stay (timed G-buffer dumps from 140 to 320 s). Worth having anyway; it just isn't this.

Where I'd look next (a guess): the common mesh programs (6eedbc0771df10ab, 35d5616385a0a8f8, 08ebaafa2f409986) are 128-lane NGG groups. They swap data between the group's console waves through LDS around barriers, and take wave-wide values with v_readfirstlane_b32 (7 to 10 each). Outside lockstep, that lowers to one read per 32-lane host wave. Any of those values that isn't uniform across the console wave would give the upper host wave the wrong vertex data, which is the "some triangles right, some fanning from a point" pattern. I haven't proven this.

Two tooling problems found along the way:

  1. VICTORY_TRACE_PASSES crashes the host (SIGSEGV in glue::present) when a texture named in the window was released before the last present. PASSTEX calls resource::texture_info on the stale object. Guarding with resource::is_resource(key) before that call, and falling back to info_of, fixed it locally.
  2. With VICTORY_DEBUG_PS=id on this branch, the G-buffer targets dump as all zeros, even though 343 mesh draws into them "ran", so ID colours couldn't attribute the shards. I haven't looked into why.

I also used a local macOS version of VICTORY_SKIP_PIPELINES (drops draws and dispatches whose shader hash is listed), which made the A/B above possible. I can open a small PR with that and fix 1 if wanted.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7230018678 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7230018678). Originally posted by [alexballvideos-netizen](https://github.com/alexballvideos-netizen) on 2026-11-27T23:16:55Z. --- Notes on the flying shards from a day of tracing, so nobody has to repeat the dead ends. Preview branch b3c1a1b0, `VICTORY_GUESS_GRAPHICS=1 VICTORY_DEPTH_TWINS=0`, M3 Max 36 GB, Series X, `VICTORY_TRACE_PASSES` at about the 40th world present. Counts and ids only. **Where they are:** already in the G-buffer, in the base colour (f29 2560x1440) and the other targets, before any lighting. The lit scene and the presented frame only carry them on. - They're on every kind of mesh geometry: characters (long skin-coloured fans), cars, buildings and props. - One frame wrote the G-buffer with 1,416 draws, about 1,100 of them mesh draws from 86 vertex programs. **Ruled out:** - **64 KiB pages split across mappings** (the `addr::build` limit in the docs): 0. I counted fully mapped 64 KiB pages that no single mapping holds over a whole run with about 98,000 mappings. - **Root views leaving their pool's linear run:** `VICTORY_TRACE_ROOT_SPAN` logs 4,077 lines, all `through="table"`, so the per-page lookups apply. No heap view "with a gap" either. - **The ordinary vertex-pipeline G-buffer draws** (`481c8eb108b917f3`, 48 draws; `77a530cb52417fee`, 26). Dropping them leaves the shards. - **`compute 95343da7c8d286c4`.** It's refused ("a lane-mask join of an untracked mask: a value the translation could not make", 0x470c) and writes a 512 KiB buffer that 12 G-buffer mesh programs read, plus small ones that dozens read. #466 makes it translate, and it then runs in the game, but the shards stay (timed G-buffer dumps from 140 to 320 s). Worth having anyway; it just isn't this. **Where I'd look next (a guess):** the common mesh programs (`6eedbc0771df10ab`, `35d5616385a0a8f8`, `08ebaafa2f409986`) are 128-lane NGG groups. They swap data between the group's console waves through LDS around barriers, and take wave-wide values with `v_readfirstlane_b32` (7 to 10 each). Outside lockstep, that lowers to one read per 32-lane host wave. Any of those values that isn't uniform across the console wave would give the upper host wave the wrong vertex data, which is the "some triangles right, some fanning from a point" pattern. I haven't proven this. **Two tooling problems found along the way:** 1. `VICTORY_TRACE_PASSES` crashes the host (SIGSEGV in `glue::present`) when a texture named in the window was released before the last present. `PASSTEX` calls `resource::texture_info` on the stale object. Guarding with `resource::is_resource(key)` before that call, and falling back to `info_of`, fixed it locally. 2. With `VICTORY_DEBUG_PS=id` on this branch, the G-buffer targets dump as all zeros, even though 343 mesh draws into them "ran", so ID colours couldn't attribute the shards. I haven't looked into why. I also used a local macOS version of `VICTORY_SKIP_PIPELINES` (drops draws and dispatches whose shader hash is listed), which made the A/B above possible. I can open a small PR with that and fix 1 if wanted.
Olima34 commented 2026-11-27 23:17:28 +00:00 (Migrated from github.com)
Author
Contributor

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


A correction to my last comment: the dark interior with twins on is not the stencil plane. A pass trace of the interior (~111 s; preview + twins on) shows this chain instead:

  1. The light draws: 192 of them (classes 0–59 x modes 0/1/2). Vertex program 6d947f878466d04f culls each 128-px tile by an R8 10x6 texture: mode 1 needs it > 0, mode 2 needs it == 0. That texture is all zero, so every tile takes the mode-2 ("no local light") pixel programs.
  2. Where that texture comes from: an R8 80x45 texture written by compute 3e68013d8d128870, also all zero. That program sets a tile only where an R8 1280x720 texture is non-zero, and that texture is all zero too.
  3. Who writes the 1280x720 texture: d3ff71633430b06d, then the indirect dispatches 0af6bb55, 52f01bcb, 67662685, caa50df7 (and 11 more), then b8abb995. All of them run, yet it holds nothing.
  4. What runs just before them: eee76bf6265f33bb, refused ("a cross-lane operation between host waves in divergent code"). It writes the [0,1,1] init of exactly those ray-traced passes' dispatch records, so they get zero groups.

So eee76bf6 is refused, the ray-traced passes run zero groups, the per-pixel R8 mask stays empty, no tile is marked, and the interior is black. Outdoors, the sun path doesn't need it. The material depth itself holds class ids as expected (class 0 on 53% of pixels, 33 classes).

The fix is translating eee76bf6: lockstep for groups of several console waves (#376, marcus-4's #438 behind VICTORY_LOCKSTEP_WAVES=1). We're checking whether #438 translates it, then a run of the interior with it.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7230025769 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7230025769). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-27T23:17:28Z. --- A correction to my last comment: the dark interior with twins on is **not** the stencil plane. A pass trace of the interior (~111 s; preview + twins on) shows this chain instead: 1. **The light draws:** 192 of them (classes 0–59 x modes 0/1/2). Vertex program `6d947f878466d04f` culls each 128-px tile by an R8 10x6 texture: mode 1 needs it > 0, mode 2 needs it == 0. That texture is all zero, so every tile takes the mode-2 ("no local light") pixel programs. 2. **Where that texture comes from:** an R8 80x45 texture written by compute `3e68013d8d128870`, also all zero. That program sets a tile only where an R8 1280x720 texture is non-zero, and that texture is all zero too. 3. **Who writes the 1280x720 texture:** `d3ff71633430b06d`, then the indirect dispatches `0af6bb55`, `52f01bcb`, `67662685`, `caa50df7` (and 11 more), then `b8abb995`. All of them run, yet it holds nothing. 4. **What runs just before them:** `eee76bf6265f33bb`, refused ("a cross-lane operation between host waves in divergent code"). It writes the [0,1,1] init of exactly those ray-traced passes' dispatch records, so they get zero groups. So `eee76bf6` is refused, the ray-traced passes run zero groups, the per-pixel R8 mask stays empty, no tile is marked, and the interior is black. Outdoors, the sun path doesn't need it. The material depth itself holds class ids as expected (class 0 on 53% of pixels, 33 classes). The fix is translating `eee76bf6`: lockstep for groups of several console waves (#376, marcus-4's #438 behind `VICTORY_LOCKSTEP_WAVES=1`). We're checking whether #438 translates it, then a run of the interior with it.
LakshanSivakumar commented 2026-11-27 23:38:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T23:38:56Z.


The graphics fixes from the preview branch are on main now (86cefd22)

Testers can go back to main; the preview branch is no longer needed for these.

What is in: the lit world (still behind VICTORY_DEPTH_TWINS=0 until the real cause is fixed), reads that cross a 64 KiB page, two mesh shader rules, the compute heap-index rule, texture LOD clamp and bias, and the longer GPU drain at exit.

Checked before the push: 1,076 tests pass, CI is green, and a comparison over the 21,600 shader corpus against the old main shows 0 regressed, 448 newly translated, and every changed output traced to one of four rules. One headless game run on Series S ended cleanly. Not run: Series X, other Macs, a long windowed session.

Next: I am going through the open pull requests, graphics and frame rate first, and merging what passes the same checks. Thank you to everyone who sent fixes; several of them solve things I was still hunting.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7230301747 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7230301747). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T23:38:56Z. --- ## The graphics fixes from the preview branch are on main now (`86cefd22`) Testers can go back to `main`; the preview branch is no longer needed for these. What is in: the lit world (still behind `VICTORY_DEPTH_TWINS=0` until the real cause is fixed), reads that cross a 64 KiB page, two mesh shader rules, the compute heap-index rule, texture LOD clamp and bias, and the longer GPU drain at exit. Checked before the push: 1,076 tests pass, CI is green, and a comparison over the 21,600 shader corpus against the old main shows 0 regressed, 448 newly translated, and every changed output traced to one of four rules. One headless game run on Series S ended cleanly. Not run: Series X, other Macs, a long windowed session. Next: I am going through the open pull requests, graphics and frame rate first, and merging what passes the same checks. Thank you to everyone who sent fixes; several of them solve things I was still hunting.
LakshanSivakumar commented 2026-11-28 01:03:02 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-28T01:03:02Z.


Status, 28 November. The fans and spikes are fixed on main (#518). On the #437 base with fixes on top (branch lit-world/base-3) the outdoors of the first prologue shot is right, but the interior is still black. I split what is left into separate issues so each can be picked up on its own: #526 (black interior: light-list computes refused), #527 (cross-lane votes used as a branch), #528 (missing walls: mesh output limit), #529 (speckles and stray triangles), #530 (4.5 minutes to the world, cold cache), #531 (draws with no pipeline), #532 (pass trace writes no pictures). Help on any of them is very welcome.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7231382676 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7231382676). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-28T01:03:02Z. --- Status, 28 November. The fans and spikes are fixed on main (#518). On the #437 base with fixes on top (branch `lit-world/base-3`) the outdoors of the first prologue shot is right, but the interior is still black. I split what is left into separate issues so each can be picked up on its own: #526 (black interior: light-list computes refused), #527 (cross-lane votes used as a branch), #528 (missing walls: mesh output limit), #529 (speckles and stray triangles), #530 (4.5 minutes to the world, cold cache), #531 (draws with no pipeline), #532 (pass trace writes no pictures). Help on any of them is very welcome.
FastFatMetal commented 2026-11-28 12:49:56 +00:00 (Migrated from github.com)
Author
Contributor

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


First non-black world report from the 256 GB box (M5 Ultra, macOS 27.2.1), main 26817285, VICTORY_DEPTH_TWINS=0, windowed story mode, default series-x.

Screenshot: https://raw.githubusercontent.com/FastFatMetal/victory-tester-logs/main/images/prologue-26817285-twins0.png (sha256 ec941e05b470fe1454bd5781105fe7f3fa7e26648c81df391702376ad97be3ba)

What renders: the first prologue outdoor shot is recognisably there — Jason, the sunset, the lamp post, wet road reflections, and the gameplay HUD prompt ("Move around / Move the camera"), so the game had actually taken input. From "fully black" to "the scene is on screen" on this commit.

What is wrong, as accurately as I can describe the picture (please correct my vocabulary):

  1. Fine horizontal banding across the whole frame — every other scanline is a duplicate/alternate sample, like a half-height present being stretched 2x, or the final composite reading the wrong pitch. Uniform, everywhere, not localized.
  2. The right ~third of the frame shows broken terrain: stretched/repeated geometry and shimmering texture, while the left two thirds are structurally right.
  3. ~1 fps in-world, same as before; that part is unchanged.

Run stats, no crash for the whole session (stopped by hand): refused shaders down to 269 (was 374 this morning, 868 two nights ago), encoded=1.42 M passes, frame=7104, zero watchdog, zero unhandled.

Two questions: (a) is the 2x banding the known missing-post-process state on main? (b) lit-world/base-3 is still fetchable from this repo — your 01:03 note says outdoors is "right" there; if the banding is expected on main I will run base-3 next and report the same before/after. Happy to A/B it with VICTORY_TRACE_PASSES if that helps place the pass that drops the deinterlace/aspect-restore step.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7239497323 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/258#issuecomment-7239497323). Originally posted by [FastFatMetal](https://github.com/FastFatMetal) on 2026-11-28T12:49:56Z. --- First **non-black world** report from the 256 GB box (M5 Ultra, macOS 27.2.1), main `26817285`, `VICTORY_DEPTH_TWINS=0`, windowed story mode, default `series-x`. Screenshot: <https://raw.githubusercontent.com/FastFatMetal/victory-tester-logs/main/images/prologue-26817285-twins0.png> (sha256 `ec941e05b470fe1454bd5781105fe7f3fa7e26648c81df391702376ad97be3ba`) **What renders**: the first prologue outdoor shot is recognisably there — Jason, the sunset, the lamp post, wet road reflections, and the gameplay HUD prompt ("Move around / Move the camera"), so the game had actually taken input. From "fully black" to "the scene is on screen" on this commit. **What is wrong, as accurately as I can describe the picture** (please correct my vocabulary): 1. Fine horizontal banding across the **whole frame** — every other scanline is a duplicate/alternate sample, like a half-height present being stretched 2x, or the final composite reading the wrong pitch. Uniform, everywhere, not localized. 2. The right ~third of the frame shows broken terrain: stretched/repeated geometry and shimmering texture, while the left two thirds are structurally right. 3. ~1 fps in-world, same as before; that part is unchanged. Run stats, no crash for the whole session (stopped by hand): refused shaders down to **269** (was 374 this morning, 868 two nights ago), `encoded=1.42 M` passes, `frame=7104`, zero watchdog, zero unhandled. Two questions: (a) is the 2x banding the known missing-post-process state on `main`? (b) `lit-world/base-3` is still fetchable from this repo — your 01:03 note says outdoors is "right" there; if the banding is expected on main I will run `base-3` next and report the same before/after. Happy to A/B it with `VICTORY_TRACE_PASSES` if that helps place the pass that drops the deinterlace/aspect-restore step.
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#258
No description provided.