Help wanted: the world is still black. The culling compute now runs but writes zero counts into the mesh records #258
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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)What is established
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.What we tried, and what it showed
Open candidates
Bugs found on the way, each with its own issue
v_readfirstlane_b32ignores EXEC on a split wave (confirmed; it is in all six cullers' tails).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=1turns the depth test off.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
A short comment saying which item you are taking avoids double work.
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
38786fd, the intro audio now starts playing properly.Environment:
main(<commit_hash>)tools/macos/run-native.shvictory.log
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_NOTIMPLto 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
[0x20, 0x11], heap entry 17 here). It is one view of 174 MiB over the title's arena.PoolTable::resolverefused the range and the heap entry got a null view. The cullers read zeros and nothing passed their test.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.mach_vm_remap), oneMTLBufferwraps 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, soremirror_tablesnever revisits it.2. The cullers were dropped at submission for root parameter 255
VIEW_STRIDESinemit/shader.rs), which a shader that takes a buffer view from the heap itself looks up before it reads the entry.translated_argsfails withroot parameter 255 was never setand the dispatch is dropped by itself atexecute(). 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.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 poolwith 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=0torecords=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.
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:
0x178a0000+0xae00000(174 MiB)0xd03f80000+0x3200000(50 MiB)0x0+0x00x7fd67a010000+0x14122000x7fd6e89b0000+0x20000So 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 255line 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
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_b32ignoring 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".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:
execute()innative/host.rs, in the block whose comment says "255 observed".translated_argsreturnsroot parameter 255 was never set, that one command is dropped, and only theunset_rootscounter moves. Nothing printed that counter.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 withVICTORY_TRACE_TARGETS=1.255and 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.
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::mirrorwrites 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:ff826810673a0198has 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 withs_buffer_load.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.0xd0eab0000, 52 MB. Entry 9937 (26 MB) is mirrored correctly.min(4 texels, 1.0)), a zero pyramid occludes nothing.v_cmp_ngeis 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.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:
remirror_tablesnever 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.
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 poolwith 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.
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:
remirror_tablesnever 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_ngetrue 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 thenot in a mapped poollines change with it? I have not checked.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.rson main and it is as you say. The command is dropped inexecute(), only theunset_rootscounter moves, and the warning is written once and only withVICTORY_TRACE_TARGETS=1. That explains why our log has noroot parameter 255line. 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.
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.
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=1crashed the host with SIGSEGV at the first world frame in 2 of 3 runs. The system crash report showsglue::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_viewsreads a resource object from a table that is already stale, and callsresource::buffer_byteson it through its vtable. Separately, #267 now caches the wrapped title ranges by a signature of their mappings, so a remap is picked up.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_withand the native host's options (wave32_host,zero_copy_memory) and compared by outcome and by a fingerprint of the DXIL plus everything else inHostShader. Two sweeps of one build are identical. On main2a3b03d1: 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):3cee03b, and4b87810after today's rebase)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:
One class that is not a translation refusal. 179 guessed pipelines of the world frame draw into
[Rgba16Float, R32Uint]withD32FloatS8and 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
e85d0ba6846a5b5ehas 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.
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 asroot parameter 255 was never set; without it onlyunset_rootsmoves. 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.
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 32is not in a mapped poollines 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
# commitline from the top of the log.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_ngeon the projected depth cull every lane) stays open until the first two are settled.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.
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:
On the 179 pipelines with
Rgba16FloatandR32Uint: 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.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.
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. WithVICTORY_SHOW_GBUFFER=1andVICTORY_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
5cfd461606ae6eaanow 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.
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:
root parameter 255 was never setwithVICTORY_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.v_cmp_ngeculling every lane) is a hypothesis from reading the culler. It isn't shown, and it's parked until #264 is tested.not in a mapped poollines: not checked. #100 is held and behind main; I'll count them if we rebase it.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.
2a3b03d1)c1b95875, with #260)What I take from it:
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 five merged cleanly onto main in the order above. The review questions on #264, #267 and #278 (memory, unmapped pages) still stand.
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:
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:
We haven't looked at the images yet, only these numbers.
Other observations:
root parameter 255line, anddropped_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.0x7ff1647a0000+0x8000), and the 21 MiB…+0x1412200view from your table is one of them. That's a separate lead, and we haven't touched it.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.
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.s_or_saveexecto -1.v_min_u32/v_max_u32reduction over DPP andv_permlanex16.v_readlane_b32of the last lane: lane 63 in six of them (wave64), lane 31 in three (wave32).s_lshr_b32 …, 5to index a bit mask.The
s_lshronly 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
Rgba16Floatlighting 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.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) orv_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.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.
5cfd461606ae6eaais 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.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.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Ketan-Kapse on 2026-11-27T10:40:25Z.
Update from our branch (main at
2a3b03d1merged 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:R9G9B9E5(DXGI 67) shader resource view in the captured frames (57 of 57) sits at the address of anR32_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.p1 + p2 - p0from 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.
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.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 #26352e4647, #253834f730c, #2645ec1d4e7and #278bff96ea6applied 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.
c1b9587with #263 only, the world was black and only the UI drew.The rest of the run:
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.command buffer failedand no compiler failures.One run, so the timings are a single sample.
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:
R32_UINTobject, read through theR9G9B9E5view, check the numbers; for 3: the fourth corner and the interpolants of a rectangle list);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.
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:
target dumped ... lit=for the G-buffer targets, so we can compare the covered share with the numbers on this issue.Please do not post pictures of the game; the description in words and the counts are enough.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by theappartment on 2026-11-27T11:54:47Z.
@Olima34 pr opened! Do your stuff! 😀
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:
ca62cc7380fe92dfis refused ("a lane-mask join of an untracked mask"). #304 makes it translate; I am checking the 50 shaders whose output #304 changes.Confirmed from @Ketan-Kapse's report: 53 of 54
R9G9B9E5views in a frame are placed over anR32_UINTtexture 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):
B5G5R5A1texture written by compute through an unordered view; I have not found its writer in my trace;Counts and ids only, please; no pictures of the game.
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_readlane31/63 shapes, plus an all-shaders set. We'll post gained, lost and changed counts by stage on the PR.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?
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
B5G5R5A1texture 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.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
c5d7f4d0with #296 and #301 on top):target dumped ... lit=for the G-buffer targets: not yet. I ran withVICTORY_DUMP_TARGETS=<dir>,95,15andVICTORY_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.VICTORY_HOLD_BYTE=1471b6330:1instead of the patch, and all texture levels): the run ended before the world at +93 s, render frame 1408, on an access violation atimage+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.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)Where it is lost
Run 2: a local branch with fixes for all of the above (
053e5993, on mainc5d7f4d0)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).
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by 4TheDoctor on 2026-11-27T13:03:22Z.
Update: fixed on current main. On
d35ba927the 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 in2a3b03d1and 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 withnative-setup.shand 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=1uses the existingSilentoutput incoreaudio.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-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=0to the end). The audio stream ran.VICTORY_KEYSfor the menus, warm cache): 900 s at about 16 fps, up to frame 14,592. Stillmesh=0, and DirectStorage stopped opening files about 1 minute in, so it never started story mode. Manya descriptor was not mirrored ... is not in a mapped poollines, the case @Ketan-Kapse described above.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.
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
SV_Targetoutputs 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.s_lshr_b32class) and stale descriptor values at a join that the path proves dead (about 12,000 pixel draws a world run were dropped for that).VICTORY_TRACE_PASSES).Result in a world run (Series S, headless, 240 s, no crash)
vertex 7a7f9ab1d7449a22 / pixel 41e09588771fe7a0into f10 1920x1080: it runs and writes exactly 0.image_loadaddress. 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.Still open here
compute d3ff71633430b06dnext to the tile classifier is refused ("a lane-mask join of an untracked mask").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
86786a72plus 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_TARGETSlists UAV textures only for dropped dispatches, through the first 32 table entries, asView::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 withuavs [], 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.
c7557e82a8889611113d9502b615d6df22dfa146f648e42810e0fca4b7654380,67e290ca8506de9b,73badb39030948dc,7a4db0f35278deed,7df5467e5cf1a7d5,94c051820454d80a,9e4cfbfcfb3f69e7,b00825313cb610e3,b8abb99528579377,d8f399520433d6cf,db595784f5b445c6"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.
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:c7557e82a8889611113d9502b615d6df,22dfa146f648e428So 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=….traced texture contents texture=… nonzero distinct a_set r_mean g_mean b_meanat each present (fmt 86 decoded).VICTORY_DEBUG_SKIP_COMPUTE=<hash>[,…]: macOS counterpart of the Windows-onlyVICTORY_SKIP_PIPELINES, for compute. The dispatch is counted as dropped.Counts and ids only.
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:mesh=43957by the end).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 fromGameInputCreate), 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:Enterreaches LEGAL NOTICES' Next; two Downs only reach Photosensitivity.82:Enter,85:Down,88:Enter,91:Down,94:Enterpasses 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.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 throughR16_UNORMviews 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.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 #258in its description within 24 hours, or the claim expires.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(60baf130included) 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, 0PASSFAIL, 437PASSUPLOAD.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:
…06b0): 25% non-zero. Written bycompute cb3a48538c1ba173,compute d078e2d7992bf56a(indirect) andcompute 36b7d9a2859ad83b(indirect), allran.…e1a0): 0.2% non-zero. Its only writer isvertex 7a7f9ab1d7449a22 / pixel 1dade93f8f5a7235,out="a draw without a host render pipeline", refused withtranslation: GFX10 code at 0xf4: a hardware SGPR input is not supported. It is the only shader refused for that reason in the run.41e09588771fe7a0does 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
PASSUPLOADlines 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). On86786a72it 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+0x55e56f8access violation only happened in runs withVICTORY_DEBUG_SKIP_COMPUTE. That was wrong. A later normal windowed run on86786a72, 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. Onb639c175the run above had no crash.Counts and ids only.
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
SPI_PS_INPUT_ENAfrom 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 isx | y << 16, and line stipple reads 0.VICTORY_PRESENT_PLANE=nstill shows one plane alone. docs/macos.md said the 4K plane was the picture; that is corrected.What a windowed run shows now
Why it is grey, in pass order
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 f1a0f42fc6c79ad7andcompute 3ade34337c5736e1("a lane-mask join of an untracked mask: data, at a join of several edges"). I am on these two.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=1did not avoid it here.VICTORY_METAL_RESIDENCY_SETS=0did (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.
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 inLower::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.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.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:
s_and_b64 s[16:17], s[18:19], execread 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.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.
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:
VICTORY_TRACE_HEAP_SET.4cf84c83): an indirect dispatch or mesh dispatch of more than 2^22 groups runs nothing.Open findings, free for anyone (please
/claimfirst):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.22bac47e…has the same shape.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 inWaitForSingleObject. The cause isn't found; it looks like a timing-sensitive wait on the title's side.cc5cecb4c1cd7099/ pixel8a427476328f0f35). Onbe7dc1b5its table entries wereuntracked(0.1, 0.3, 0.4, 0.7, 0.9, 1.0, 1.1) andplaced-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).Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T16:21:59Z.
For the
eee76bf6design discussion, the prototype mentioned above is on a branch: https://github.com/Olima34/Native-Victory-macOS/tree/wip/relay-eee76bf6 (69b22e24, on728845d1). 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 makeeee76bf6translate on its own (it lacks the per-wave lockstep reading), but it's a starting point if someone takes that design.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T16:23:19Z.
Testers: please try main at
4cf84c83A lot landed on main in the last day. If you have tested before, please pull and run again.
What changed
What is still wrong (no need to report these)
How to test
Add
--headlessif you do not want a window. Stop with Ctrl-C once, then wait for it to exit.What I would like to know
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.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by oandrosz on 2026-11-27T16:44:24Z.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by theappartment on 2026-11-27T16:54:17Z.
Retested main at
b998bb65in 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.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.
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 onmainyet.mainonly 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
VICTORY_DEPTH_TWINS=0.How to try it
What is still wrong (please do not report these again)
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.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 viaVICTORY_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:
So
898d9c1a5605ad81never 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 whate85d0ba6846a5b5eleft them at, which is 0. Consistent withmesh=6260draws all reading zero counts.World perf / survival (no crash, no watchdog the whole time, same as your headless results but windowed):
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)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.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 535draws 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
898d9c1a5605ad81refusal (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?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), commitb998bb65, windowed story mode, defaultseries-x.1. The sole holder of the mesh record buffers, on every sampled present, is the refused shader — dropped:
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. Thefmt 41 1024x512texture 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 withVICTORY_NO_LOCKSTEP=1for an A/B of what the lockstep fallback actually rescues here.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T21:10:18Z.
On the depth twins (
VICTORY_DEPTH_TWINS=0on 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.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.
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:VICTORY_DEPTH_TWINS=0So 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.
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):
VICTORY_DEPTH_TWINS=0)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_PASSEScrashed the game here at the last present (a placed texture's key read as an object). A small fix with a test will follow.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_PASSESat 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.
Ruled out:
addr::buildlimit 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.VICTORY_TRACE_ROOT_SPANlogs 4,077 lines, allthrough="table", so the per-page lookups apply. No heap view "with a gap" either.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 withv_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:
VICTORY_TRACE_PASSEScrashes the host (SIGSEGV inglue::present) when a texture named in the window was released before the last present.PASSTEXcallsresource::texture_infoon the stale object. Guarding withresource::is_resource(key)before that call, and falling back toinfo_of, fixed it locally.VICTORY_DEBUG_PS=idon 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.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:
6d947f878466d04fculls 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.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.d3ff71633430b06d, then the indirect dispatches0af6bb55,52f01bcb,67662685,caa50df7(and 11 more), thenb8abb995. All of them run, yet it holds nothing.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
eee76bf6is 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 behindVICTORY_LOCKSTEP_WAVES=1). We're checking whether #438 translates it, then a run of the interior with it.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=0until 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.
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.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, defaultseries-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):
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 Mpasses,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-3is still fetchable from this repo — your 01:03 note says outdoors is "right" there; if the banding is expected on main I will runbase-3next and report the same before/after. Happy to A/B it withVICTORY_TRACE_PASSESif that helps place the pass that drops the deinterlace/aspect-restore step.