Prologue interior is black: the light-list compute shaders are refused (0c028454, eae3498e, b8f3f797) #526

Open
opened 2026-11-28 01:02:21 +00:00 by LakshanSivakumar · 4 comments
LakshanSivakumar commented 2026-11-28 01:02:21 +00:00 (Migrated from github.com)
Contributor

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


What you see

In the prologue's first shot (the man at the fenced window) the outdoors is right: tower, building, yard, sunset. The room he stands in is black. You can just make out a chair and wall edges, so the room is drawn but gets almost no light.

What I know

I traced one world frame with VICTORY_TRACE_PASSES and followed the passes from the G-buffer to the composite. The deferred light draws run. The first targets that come out empty are in the light tile and culling passes, before indirect lighting:

  • Compute 0c028454 (256 threads) is refused. It is the only writer of the first empty full-resolution target (R32F 853x480). It also leaves an R16U 426x240 target empty that 110 draws read.
  • Compute 0c028454, eae3498e and b8f3f797 (1024 threads) all write the light-list buffer. 29 light-list computes read it, and they feed a buffer that all 261 light draws read. All three are refused.
  • 18 dispatches in a row a little later (191ecaed and its family) write that same buffer and are refused too.
  • The 27x15, 54x30 and 7x4 tile masks are empty although their writers ran. I think that follows from the above, but I have not proven it.

All of these are refused with a cross-lane operation between host waves in divergent code. eae3498e and b8f3f797 refuse at an LDS write.

What it is not, in this shot: the screen-probe programs (67f67eda, 4ed2a910, 52a7a2d2, 2b93182d, 0145ad5f) and eee76bf6265f33bb with its ray-traced passes are never bound here, so they cannot be the cause in this shot. Running with VICTORY_DEPTH_TWINS=0 did not light the room either.

What would help

  • A correct lowering for these three small programs. They look much simpler than the big cross-lane family (see the issue on votes used as a branch).
  • Anyone who has a lit interior on any branch: which branch, which switches, which Mac.
  • A second trace of this shot from another Mac, to confirm the first empty target.

Not checked

That fixing the light list is enough. It is the first place the light is lost, not proven to be the only one.

How to see it

Branch lit-world/base-3 (commit 9a0d811d). It is #437 with fixes on top: #518, the cross-page loads, texture fixes, the page table for described pipelines and the image null-view test. It is not main, and one upstream test fails on it by design (wave32_tests::a_branch_on_a_first_lane_read_is_not_uniform_across_the_halves).

VICTORY_CONSOLE_PIPELINES=0 VICTORY_METAL_RESIDENCY_SETS=1 VICTORY_TEXTURE_DROP_TOP_MIP=1 \
VICTORY_OUTPUT=1280x720 VICTORY_UPSCALER=6 VICTORY_STEP_OVER=pool VICTORY_PIPELINE_TIMEOUT_S=15 \
tools/macos/run-native.sh --console series-s <game folder>

Apple Silicon Mac with 48 GB, Series S profile. The world shows about 4.5 minutes after start on a cold shader cache.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6656989621 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/526). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-28T01:02:21Z. --- ### What you see In the prologue's first shot (the man at the fenced window) the outdoors is right: tower, building, yard, sunset. The room he stands in is black. You can just make out a chair and wall edges, so the room is drawn but gets almost no light. ### What I know I traced one world frame with `VICTORY_TRACE_PASSES` and followed the passes from the G-buffer to the composite. The deferred light draws run. The first targets that come out empty are in the light tile and culling passes, before indirect lighting: - Compute `0c028454` (256 threads) is refused. It is the only writer of the first empty full-resolution target (R32F 853x480). It also leaves an R16U 426x240 target empty that 110 draws read. - Compute `0c028454`, `eae3498e` and `b8f3f797` (1024 threads) all write the light-list buffer. 29 light-list computes read it, and they feed a buffer that all 261 light draws read. All three are refused. - 18 dispatches in a row a little later (`191ecaed` and its family) write that same buffer and are refused too. - The 27x15, 54x30 and 7x4 tile masks are empty although their writers ran. I think that follows from the above, but I have not proven it. All of these are refused with `a cross-lane operation between host waves in divergent code`. `eae3498e` and `b8f3f797` refuse at an LDS write. What it is not, in this shot: the screen-probe programs (`67f67eda`, `4ed2a910`, `52a7a2d2`, `2b93182d`, `0145ad5f`) and `eee76bf6265f33bb` with its ray-traced passes are never bound here, so they cannot be the cause in this shot. Running with `VICTORY_DEPTH_TWINS=0` did not light the room either. ### What would help - A correct lowering for these three small programs. They look much simpler than the big cross-lane family (see the issue on votes used as a branch). - Anyone who has a lit interior on any branch: which branch, which switches, which Mac. - A second trace of this shot from another Mac, to confirm the first empty target. ### Not checked That fixing the light list is enough. It is the first place the light is lost, not proven to be the only one. ### How to see it Branch [`lit-world/base-3`](https://github.com/LakshanSivakumar/Native-Victory-macOS/tree/lit-world/base-3) (commit `9a0d811d`). It is #437 with fixes on top: #518, the cross-page loads, texture fixes, the page table for described pipelines and the image null-view test. It is not main, and one upstream test fails on it by design (`wave32_tests::a_branch_on_a_first_lane_read_is_not_uniform_across_the_halves`). ```bash VICTORY_CONSOLE_PIPELINES=0 VICTORY_METAL_RESIDENCY_SETS=1 VICTORY_TEXTURE_DROP_TOP_MIP=1 \ VICTORY_OUTPUT=1280x720 VICTORY_UPSCALER=6 VICTORY_STEP_OVER=pool VICTORY_PIPELINE_TIMEOUT_S=15 \ tools/macos/run-native.sh --console series-s <game folder> ``` Apple Silicon Mac with 48 GB, Series S profile. The world shows about 4.5 minutes after start on a cold shader cache.
Olima34 commented 2026-11-28 01:40:45 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-28T01:40:45Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7231840771 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/526#issuecomment-7231840771). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-28T01:40:45Z. --- /claim
github-actions[bot] commented 2026-11-28 01:40:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T01:40:56Z.


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

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7231842931 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/526#issuecomment-7231842931). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T01:40:56Z. --- Claimed by @Olima34. Open a draft pull request with `Refs #526` in its description within 24 hours, or the claim expires.
fruvs commented 2026-11-28 02:20:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by fruvs on 2026-11-28T02:20:33Z.


I reproduced the empty outputs on an M5 Pro with the Series S title configuration. In an early world trace before the visible fenced-window shot, the refused 0c028454 dispatch declared an 853 × 480 R32_FLOAT output and a 426 × 240 R16_UINT output. Both read back as all zeros. The trace included executed consumers of both textures.

A narrow lowering change allows the fixed-trip single-block loops in eae3498e and b8f3f797 to translate. Both passed Metal pipeline creation with their normal native layouts. The synthetic test compares independently varying votes across console waves at 128 and 1,024 threads per group. It also checks that a runtime loop bound still refuses. On current main with the patch, the Metal test passed and the shader suite reported 420 unit tests and five integration tests passed.

0c028454 still refuses at its wave-dependent branch, and I have yet to verify restored lighting in the displayed scene. @Olima34, the patch is available on my fork if it helps your existing work. Counted loop patch and synthetic test

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7232297444 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/526#issuecomment-7232297444). Originally posted by [fruvs](https://github.com/fruvs) on 2026-11-28T02:20:33Z. --- I reproduced the empty outputs on an M5 Pro with the Series S title configuration. In an early world trace before the visible fenced-window shot, the refused `0c028454` dispatch declared an 853 × 480 R32_FLOAT output and a 426 × 240 R16_UINT output. Both read back as all zeros. The trace included executed consumers of both textures. A narrow lowering change allows the fixed-trip single-block loops in `eae3498e` and `b8f3f797` to translate. Both passed Metal pipeline creation with their normal native layouts. The synthetic test compares independently varying votes across console waves at 128 and 1,024 threads per group. It also checks that a runtime loop bound still refuses. On current main with the patch, the Metal test passed and the shader suite reported 420 unit tests and five integration tests passed. `0c028454` still refuses at its wave-dependent branch, and I have yet to verify restored lighting in the displayed scene. @Olima34, the patch is available on my fork if it helps your existing work. [Counted loop patch and synthetic test](https://github.com/fruvs/Native-Victory-macOS/commit/fb8ba0d3)
Olima34 commented 2026-11-28 03:52:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-28T03:52:10Z.


Thanks @fruvs, that's a big step: the reproduction matches the maintainer's trace, and the fixed-trip loops in eae3498e and b8f3f797 were exactly the part we hadn't started. Please open your commit (fb8ba0d3) as its own PR with Refs #526, so it lands under your name. We'll test it in game on an M5 Pro tonight, at the same present as the issue's shot: the light-list buffer, the 27x15 / 54x30 / 7x4 tile masks and the interior's lighting, with and without it. We'll post the counts on your PR. On our side we'll take what's left, 0c028454's wave-dependent branch, and keep you posted here so we don't overlap. If you'd rather take that too, say so.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7233462894 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/526#issuecomment-7233462894). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-28T03:52:10Z. --- Thanks @fruvs, that's a big step: the reproduction matches the maintainer's trace, and the fixed-trip loops in `eae3498e` and `b8f3f797` were exactly the part we hadn't started. Please open your commit (fb8ba0d3) as its own PR with `Refs #526`, so it lands under your name. We'll test it in game on an M5 Pro tonight, at the same present as the issue's shot: the light-list buffer, the 27x15 / 54x30 / 7x4 tile masks and the interior's lighting, with and without it. We'll post the counts on your PR. On our side we'll take what's left, `0c028454`'s wave-dependent branch, and keep you posted here so we don't overlap. If you'd rather take that too, say so.
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#526
No description provided.