Metal's compiler service crashes on some world pipelines (macOS 15 and 27); the first run still pays each crash #181

Open
opened 2026-11-26 23:14:58 +00:00 by LakshanSivakumar · 13 comments
LakshanSivakumar commented 2026-11-26 23:14:58 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T23:14:58Z.


Reported by @alicans in #15 (M4 Pro 24 GB, macOS 15.8.2, commits 561e783 and 0133b82).

At the first world frame, a few graphics pipelines fail with title shader refused … reason=conversion: Compiler encountered an internal error. Each one takes about 30 s, and they fail one after another. Each failure matches an MTLCompilerService crash report: EXC_BAD_ACCESS at 0x0, in libLLVM.dylib under llvm::RegAllocBase::allocatePhysRegs(). It's the same with D3DMetal's converter and with Apple's Metal Shader Converter 4.0.3, so the bug is in the OS's Metal backend compiler. The macOS 27 testers don't see it.

Four of these in a row hold the first world frame past the title's 30 s watchdog.

Pipelines seen failing (vertex / pixel): 6eedbc0771df10ab/615820c53854c962, 76d4606196dfd196/5a1c651829a060de, 08ebaafa2f409986/59c5abdcb23974a7, 26e9f04a4c9c8146/725962e1f1be4855, 9cb2687cedff2979/5d85e2176433f3af, a1785729710c22b3/80b896aafd2ec5f4.

Plan:

  • A pipeline whose Metal compile fails or crashes should never hold the frame: compile it off the frame, or give up early.
  • Possibly retry with different compile options.
  • Possibly add a switch to skip given pipelines (like VICTORY_SKIP_PIPELINES on Windows).

macOS 15 testers: the crash reports in ~/Library/Logs/DiagnosticReports/ (MTLCompilerService*) and the refused hashes from your log help.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6636633518 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-26T23:14:58Z. --- Reported by @alicans in #15 (M4 Pro 24 GB, macOS 15.8.2, commits `561e783` and `0133b82`). At the first world frame, a few graphics pipelines fail with `title shader refused … reason=conversion: Compiler encountered an internal error`. Each one takes about 30 s, and they fail one after another. Each failure matches an `MTLCompilerService` crash report: `EXC_BAD_ACCESS` at 0x0, in `libLLVM.dylib` under `llvm::RegAllocBase::allocatePhysRegs()`. It's the same with D3DMetal's converter and with Apple's Metal Shader Converter 4.0.3, so the bug is in the OS's Metal backend compiler. The macOS 27 testers don't see it. Four of these in a row hold the first world frame past the title's 30 s watchdog. Pipelines seen failing (vertex / pixel): `6eedbc0771df10ab`/`615820c53854c962`, `76d4606196dfd196`/`5a1c651829a060de`, `08ebaafa2f409986`/`59c5abdcb23974a7`, `26e9f04a4c9c8146`/`725962e1f1be4855`, `9cb2687cedff2979`/`5d85e2176433f3af`, `a1785729710c22b3`/`80b896aafd2ec5f4`. Plan: - A pipeline whose Metal compile fails or crashes should never hold the frame: compile it off the frame, or give up early. - Possibly retry with different compile options. - Possibly add a switch to skip given pipelines (like `VICTORY_SKIP_PIPELINES` on Windows). macOS 15 testers: the crash reports in `~/Library/Logs/DiagnosticReports/` (`MTLCompilerService*`) and the refused hashes from your log help.
alicans commented 2026-11-26 23:20:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by alicans on 2026-11-26T23:20:15Z.


Here are four more pipelines whose pixel shader crashes MTLCompilerService on macOS 15, beyond the six listed above (same allocatePhysRegs stack): 3f04c18f62a176a0, 215b7ef6f2a22dd7, f5fa188ea38ad066, d4ad36beb4d0ead9 (the last is also in the macOS 27 reports in #15).

When I skipped the first six with a local build switch, the frame moved on until these four crashed, so a skip list keeps growing. A fix that stops a failed compile from holding the frame looks like the right fix.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7205455897 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181#issuecomment-7205455897). Originally posted by [alicans](https://github.com/alicans) on 2026-11-26T23:20:15Z. --- Here are four more pipelines whose pixel shader crashes `MTLCompilerService` on macOS 15, beyond the six listed above (same `allocatePhysRegs` stack): `3f04c18f62a176a0`, `215b7ef6f2a22dd7`, `f5fa188ea38ad066`, `d4ad36beb4d0ead9` (the last is also in the macOS 27 reports in #15). When I skipped the first six with a local build switch, the frame moved on until these four crashed, so a skip list keeps growing. A fix that stops a failed compile from holding the frame looks like the right fix.
cocobailey commented 2026-11-27 00:16:43 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by cocobailey on 2026-11-27T00:16:43Z.


Data point: this also happens on macOS 27.2.1 (M2 Pro, 19-core GPU, 32 GB, Series X, main at b16bd61, Apple Metal Shader Converter 4.0.3). The first-world-frame stall from this issue is what ended my run.

  • Timeline: the run went through setup and the story load. At the first world frame (frame about 5,114, 273 first binds in that frame), 26 graphics pipelines were refused in a row over about 26 s (00:05:09 to 00:05:35 in the log). All 26 failed with:
    conversion: Compilation failed due to an interrupted connection: XPC_ERROR_CONNECTION_INTERRUPTED. This error occurred after multiple retries.
    Then came the title's watchdog: the first-chance fault at image+0x23cf683 and the follow-on at image+0x55e56f8, 240 s into the run.
  • Same compiler crash as on macOS 15: ~/Library/Logs/DiagnosticReports/ holds 25 MTLCompilerService-*.ips reports from that minute. The one I opened is EXC_BAD_ACCESS / KERN_INVALID_ADDRESS at 0x0 in RegAllocBase::allocatePhysRegs(). On this Mac each failure takes about 1 s, not about 30 s, but 26 of them plus the first binds still hold the frame past 30 s.
  • The pipelines overlap with the list above: 615820c53854c962, 80b896aafd2ec5f4, 5a1c651829a060de, 725962e1f1be4855, 3f04c18f62a176a0, 215b7ef6f2a22dd7 and d4ad36beb4d0ead9 are all in my set. The full set, vertex/pixel:
    11a9c30cfe1f8d12/dac2fa6fb7f3e7f4 20087581f0415fa3/c0141d556080a583 24c08e1708a0a35a/215b7ef6f2a22dd7 26e9f04a4c9c8146/3f04c18f62a176a0 26e9f04a4c9c8146/725962e1f1be4855 26e9f04a4c9c8146/f93f9dd97ec58cdb 40fcb7bed95171e7/a883ec641fc32851 461e914e41ceff00/de25dd4df5ce8892 5ab3b2f9f61f41ba/7eb47ca32a9d272a 63383a23c604b343/332f4d557a5040bc 6eedbc0771df10ab/615820c53854c962 6eedbc0771df10ab/6edf5167026e3dbe 75cbf35d42189e84/a8606222a786b0f4 76d4606196dfd196/5a1c651829a060de 90fb900a17eef1c3/57b7d350d98fb065 987c0ba37de4efa3/f7e5ddc993c9948a 994ca610d79bc72a/874ee2389903bc24 a083f468ac884062/0be26eda600f00fe a1785729710c22b3/80b896aafd2ec5f4 a2aff0c4c911c4d2/75cb9d761d620c68 bd0d61e5418dbf0e/19d4b5ed6d255361 bd0d61e5418dbf0e/5925af9ef95a3699 c0cf126f21be23b4/3783b66b70b44479 e68ea4e1af3889fb/396c5139187e803b e68ea4e1af3889fb/51420b6138ab50d8 f88583f4d9c5f9bb/d4ad36beb4d0ead9

Reproduced on a second run (setup already done, so straight to the story load): 28 pipelines refused with the same XPC error from about 154 s, 26 of them the same pixel shaders as the first run, then the same watchdog pair at about 183 s.

So "macOS 27 testers don't see it" doesn't hold for every Mac. It may depend on the GPU family (Apple8 here) as well as the OS version. That supports the plan's first point: a failed compile shouldn't hold the frame. I'm happy to test a branch that compiles these off the frame or gives up early.

AI-assisted testing and write-up, prepared with Claude Code. No game data attached.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7206326842 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181#issuecomment-7206326842). Originally posted by [cocobailey](https://github.com/cocobailey) on 2026-11-27T00:16:43Z. --- Data point: this also happens on **macOS 27.2.1** (M2 Pro, 19-core GPU, 32 GB, Series X, `main` at `b16bd61`, Apple Metal Shader Converter 4.0.3). The first-world-frame stall from this issue is what ended my run. - **Timeline:** the run went through setup and the story load. At the first world frame (frame about 5,114, 273 first binds in that frame), 26 graphics pipelines were refused in a row over about 26 s (`00:05:09` to `00:05:35` in the log). All 26 failed with: `conversion: Compilation failed due to an interrupted connection: XPC_ERROR_CONNECTION_INTERRUPTED. This error occurred after multiple retries.` Then came the title's watchdog: the first-chance fault at `image+0x23cf683` and the follow-on at `image+0x55e56f8`, 240 s into the run. - **Same compiler crash as on macOS 15:** `~/Library/Logs/DiagnosticReports/` holds 25 `MTLCompilerService-*.ips` reports from that minute. The one I opened is `EXC_BAD_ACCESS` / `KERN_INVALID_ADDRESS at 0x0` in `RegAllocBase::allocatePhysRegs()`. On this Mac each failure takes about 1 s, not about 30 s, but 26 of them plus the first binds still hold the frame past 30 s. - **The pipelines overlap with the list above:** `615820c53854c962`, `80b896aafd2ec5f4`, `5a1c651829a060de`, `725962e1f1be4855`, `3f04c18f62a176a0`, `215b7ef6f2a22dd7` and `d4ad36beb4d0ead9` are all in my set. The full set, vertex/pixel: `11a9c30cfe1f8d12`/`dac2fa6fb7f3e7f4` `20087581f0415fa3`/`c0141d556080a583` `24c08e1708a0a35a`/`215b7ef6f2a22dd7` `26e9f04a4c9c8146`/`3f04c18f62a176a0` `26e9f04a4c9c8146`/`725962e1f1be4855` `26e9f04a4c9c8146`/`f93f9dd97ec58cdb` `40fcb7bed95171e7`/`a883ec641fc32851` `461e914e41ceff00`/`de25dd4df5ce8892` `5ab3b2f9f61f41ba`/`7eb47ca32a9d272a` `63383a23c604b343`/`332f4d557a5040bc` `6eedbc0771df10ab`/`615820c53854c962` `6eedbc0771df10ab`/`6edf5167026e3dbe` `75cbf35d42189e84`/`a8606222a786b0f4` `76d4606196dfd196`/`5a1c651829a060de` `90fb900a17eef1c3`/`57b7d350d98fb065` `987c0ba37de4efa3`/`f7e5ddc993c9948a` `994ca610d79bc72a`/`874ee2389903bc24` `a083f468ac884062`/`0be26eda600f00fe` `a1785729710c22b3`/`80b896aafd2ec5f4` `a2aff0c4c911c4d2`/`75cb9d761d620c68` `bd0d61e5418dbf0e`/`19d4b5ed6d255361` `bd0d61e5418dbf0e`/`5925af9ef95a3699` `c0cf126f21be23b4`/`3783b66b70b44479` `e68ea4e1af3889fb`/`396c5139187e803b` `e68ea4e1af3889fb`/`51420b6138ab50d8` `f88583f4d9c5f9bb`/`d4ad36beb4d0ead9` **Reproduced on a second run** (setup already done, so straight to the story load): 28 pipelines refused with the same XPC error from about 154 s, 26 of them the same pixel shaders as the first run, then the same watchdog pair at about 183 s. So "macOS 27 testers don't see it" doesn't hold for every Mac. It may depend on the GPU family (Apple8 here) as well as the OS version. That supports the plan's first point: a failed compile shouldn't hold the frame. I'm happy to test a branch that compiles these off the frame or gives up early. _AI-assisted testing and write-up, prepared with Claude Code. No game data attached._
LakshanSivakumar commented 2026-11-27 00:20:11 +00:00 (Migrated from github.com)
Author
Contributor

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


Partial fix on main fd861760: a render pipeline whose compile crashes Metal's compiler service (XPC_ERROR_CONNECTION_INTERRUPTED) is now recorded in the cache, keyed by the pipeline and the macOS build, and later runs refuse it at once instead of crashing the service again. The first run still pays each crash once; making that fail fast is next. macOS 15 testers: a cold run then a warm run on current main would show whether the second run gets past the first world frame.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7206374827 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181#issuecomment-7206374827). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T00:20:11Z. --- Partial fix on main fd861760: a render pipeline whose compile crashes Metal's compiler service (`XPC_ERROR_CONNECTION_INTERRUPTED`) is now recorded in the cache, keyed by the pipeline and the macOS build, and later runs refuse it at once instead of crashing the service again. The first run still pays each crash once; making that fail fast is next. macOS 15 testers: a cold run then a warm run on current main would show whether the second run gets past the first world frame.
Ketan-Kapse commented 2026-11-27 06:00:26 +00:00 (Migrated from github.com)
Author
Contributor

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


A cause and a fix for this from a fork (M4 Pro, 24 GB, macOS 27, Series S, Metal Shader Converter 4.0 beta 3). On our side it was not the OS compiler choking on valid input: the converted library was already invalid IR, and the translator's export loop is what made the converter produce it.

How we saw it

  • We dumped the converted Metal libraries of failing and passing mesh + pixel pairs and built them outside the game. Failing pairs reproduced XPC_ERROR_CONNECTION_INTERRUPTED every time (same RegAllocBase::allocatePhysRegs stack as here). The same mesh library with a trivial fragment function, or with no colour attachments, built fine, and a passing mesh with the failing pair's pixel shader built fine. So the mesh program is at fault once its outputs are live.
  • metal-objdump -d <lib>.metallib gives the IR, and metal-as refuses it: Instruction does not dominate all uses!, for example
%2829 = insertelement <2 x float> %2828, float %2830, i64 1
...
%2830 = bitcast i32 %2721 to float

and the same with air.convert.f.f32.f.f16 results. All 66 failing libraries we dumped had such errors (33 of 110 passing ones too, where the code is dead or tolerated).

Cause

The converter gathers the component stores of one output into a vector at the first store of that output. The export loop in emit/lower.rs (the storeOutput / storeVertexOutput / storePrimitiveOutput loop) makes each component's value (the float cast, legacyF16ToF32) between the stores, so later components are defined after the gathered vector uses them.

Fix

Make every component's value first, then emit the stores back to back:

+        let mut ready: Vec<(usize, u8, &'static str, V)> = Vec::with_capacity(stores.len());
         for (id, col, value, half) in stores {
             let mut x = self.i32_of(value)?;
             ...
-            let mut args = vec![
+            ready.push((id, col, suffix, x));
+        }
+        let thread = if mesh { Some(self.mesh_thread()) } else { None };
+        for (id, col, suffix, x) in ready {
+            let mut args = vec![
                 self.s.m.i32(id as u32),
                 self.s.m.i32(0),
                 self.s.m.i8(col),
                 x,
             ];
-            if mesh {
-                args.push(self.mesh_thread());
-            }
+            args.extend(thread);

Result here

  • Compiler failures went from 44 to 104 per run to 0, and all 143 dumped pairs built. Every library dumped after the change passes metal-as (0 dominance errors).
  • An A/B run with the old and the new order showed the same geometry, so the order changes nothing but the validity of the IR.

What I have not checked

Our failing pipelines were mesh + pixel pairs on the stream-pipeline path (we answer E_NOTIMPL to the console pipeline methods, so the title falls back to described stages). The pipelines listed in this issue are vertex / pixel pairs on macOS 15. The same loop emits storeOutput for vertex shaders, so I expect the same fault, but I have not run those hashes. metal-as on one of the failing libraries would confirm it in a few seconds.

Happy to send this as a PR if that is easier.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211132533 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181#issuecomment-7211132533). Originally posted by [Ketan-Kapse](https://github.com/Ketan-Kapse) on 2026-11-27T06:00:26Z. --- A cause and a fix for this from a fork (M4 Pro, 24 GB, macOS 27, Series S, Metal Shader Converter 4.0 beta 3). On our side it was not the OS compiler choking on valid input: the converted library was already invalid IR, and the translator's export loop is what made the converter produce it. **How we saw it** - We dumped the converted Metal libraries of failing and passing mesh + pixel pairs and built them outside the game. Failing pairs reproduced `XPC_ERROR_CONNECTION_INTERRUPTED` every time (same `RegAllocBase::allocatePhysRegs` stack as here). The same mesh library with a trivial fragment function, or with no colour attachments, built fine, and a passing mesh with the failing pair's pixel shader built fine. So the mesh program is at fault once its outputs are live. - `metal-objdump -d <lib>.metallib` gives the IR, and `metal-as` refuses it: `Instruction does not dominate all uses!`, for example ``` %2829 = insertelement <2 x float> %2828, float %2830, i64 1 ... %2830 = bitcast i32 %2721 to float ``` and the same with `air.convert.f.f32.f.f16` results. All 66 failing libraries we dumped had such errors (33 of 110 passing ones too, where the code is dead or tolerated). **Cause** The converter gathers the component stores of one output into a vector at the first store of that output. The export loop in `emit/lower.rs` (the `storeOutput` / `storeVertexOutput` / `storePrimitiveOutput` loop) makes each component's value (the float cast, `legacyF16ToF32`) between the stores, so later components are defined after the gathered vector uses them. **Fix** Make every component's value first, then emit the stores back to back: ```diff + let mut ready: Vec<(usize, u8, &'static str, V)> = Vec::with_capacity(stores.len()); for (id, col, value, half) in stores { let mut x = self.i32_of(value)?; ... - let mut args = vec![ + ready.push((id, col, suffix, x)); + } + let thread = if mesh { Some(self.mesh_thread()) } else { None }; + for (id, col, suffix, x) in ready { + let mut args = vec![ self.s.m.i32(id as u32), self.s.m.i32(0), self.s.m.i8(col), x, ]; - if mesh { - args.push(self.mesh_thread()); - } + args.extend(thread); ``` **Result here** - Compiler failures went from 44 to 104 per run to 0, and all 143 dumped pairs built. Every library dumped after the change passes `metal-as` (0 dominance errors). - An A/B run with the old and the new order showed the same geometry, so the order changes nothing but the validity of the IR. **What I have not checked** Our failing pipelines were mesh + pixel pairs on the stream-pipeline path (we answer `E_NOTIMPL` to the console pipeline methods, so the title falls back to described stages). The pipelines listed in this issue are vertex / pixel pairs on macOS 15. The same loop emits `storeOutput` for vertex shaders, so I expect the same fault, but I have not run those hashes. `metal-as` on one of the failing libraries would confirm it in a few seconds. Happy to send this as a PR if that is easier.
LakshanSivakumar commented 2026-11-27 06:05:30 +00:00 (Migrated from github.com)
Author
Contributor

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


@Ketan-Kapse thank you, this reads right: a build that fails only when the mesh program's outputs are live, and IR that metal-as rejects with a dominance error, is a far better explanation than the OS compiler choking on valid input. Yes please, send it as a PR.

What I will check on our side, on the console-pipeline path:

  • metal-objdump and metal-as on the converted libraries of the vertex / pixel pairs listed in this issue, before and after your change. Our runs still log conversions that end in XPC interrupted (12 lines in the last 600 s world run), so there is something to measure.
  • The compiler failure count per run, cold, before and after.

For the PR:

  • A test that pins the order: every component's value is made before the first store of that output, for storeOutput, storeVertexOutput and storePrimitiveOutput. If a small synthetic program can be converted and passed through metal-as in a test that skips when the tools are absent, better still.
  • The change reorders emitted IR, so output fingerprints over the corpus will change for most shaders with exports. Please say so in the PR, and give the count of shaders whose outcome changes (it should be none: same translated or refused, only the order differs).
  • If you have it, the number of failing libraries before and after from your dump (66 failing, 33 of 110 passing with dead errors) is worth putting in the PR body as the evidence.

One question: the 33 passing libraries that also had dominance errors, did they stop having them after the change too? If any error remains after it, there is a second site that makes values between stores.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211207899 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181#issuecomment-7211207899). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T06:05:30Z. --- @Ketan-Kapse thank you, this reads right: a build that fails only when the mesh program's outputs are live, and IR that `metal-as` rejects with a dominance error, is a far better explanation than the OS compiler choking on valid input. Yes please, send it as a PR. What I will check on our side, on the console-pipeline path: - `metal-objdump` and `metal-as` on the converted libraries of the vertex / pixel pairs listed in this issue, before and after your change. Our runs still log conversions that end in `XPC interrupted` (12 lines in the last 600 s world run), so there is something to measure. - The compiler failure count per run, cold, before and after. For the PR: - A test that pins the order: every component's value is made before the first store of that output, for `storeOutput`, `storeVertexOutput` and `storePrimitiveOutput`. If a small synthetic program can be converted and passed through `metal-as` in a test that skips when the tools are absent, better still. - The change reorders emitted IR, so output fingerprints over the corpus will change for most shaders with exports. Please say so in the PR, and give the count of shaders whose outcome changes (it should be none: same translated or refused, only the order differs). - If you have it, the number of failing libraries before and after from your dump (66 failing, 33 of 110 passing with dead errors) is worth putting in the PR body as the evidence. One question: the 33 passing libraries that also had dominance errors, did they stop having them after the change too? If any error remains after it, there is a second site that makes values between stores.
Ketan-Kapse commented 2026-11-27 06:08:21 +00:00 (Migrated from github.com)
Author
Contributor

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


PR coming, with a test that pins the order for all three store kinds.

On your question: yes. Every library dumped after the change passed metal-as with 0 dominance errors, 143 of 143, and that set includes the shaders that were among the 33 "passing but invalid" before. I matched 122 old/new pairs by their DXIL sizes and compared the IR: the output calls and declared output types are identical, and what differs is 0 to 33 lines per shader where the same values are carried as float instead of i32. So I see no second site, at least in the mesh and pixel pairs this scene uses. I will put the before and after counts in the PR and say that fingerprints change while outcomes do not.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211250704 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181#issuecomment-7211250704). Originally posted by [Ketan-Kapse](https://github.com/Ketan-Kapse) on 2026-11-27T06:08:21Z. --- PR coming, with a test that pins the order for all three store kinds. On your question: yes. Every library dumped after the change passed `metal-as` with 0 dominance errors, 143 of 143, and that set includes the shaders that were among the 33 "passing but invalid" before. I matched 122 old/new pairs by their DXIL sizes and compared the IR: the output calls and declared output types are identical, and what differs is 0 to 33 lines per shader where the same values are carried as float instead of i32. So I see no second site, at least in the mesh and pixel pairs this scene uses. I will put the before and after counts in the PR and say that fingerprints change while outcomes do not.
LakshanSivakumar commented 2026-11-27 06:48:29 +00:00 (Migrated from github.com)
Author
Contributor

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


Thank you, that answers my question: no dominance error left in 143 of 143 libraries means there is no second site that makes values between stores, at least for the mesh and pixel pairs you dumped.

For the pull request, please put in the body the counts you gave here (66 failing and 33 of 110 passing before, 0 of 143 after) and the number of shaders whose outcome changes, which should be none. I will run the vertex and pixel pairs listed in this issue on the console-pipeline path and post the compiler failure count per run, cold, before and after.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7211865257 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181#issuecomment-7211865257). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T06:48:29Z. --- Thank you, that answers my question: no dominance error left in 143 of 143 libraries means there is no second site that makes values between stores, at least for the mesh and pixel pairs you dumped. For the pull request, please put in the body the counts you gave here (66 failing and 33 of 110 passing before, 0 of 143 after) and the number of shaders whose outcome changes, which should be none. I will run the vertex and pixel pairs listed in this issue on the console-pipeline path and post the compiler failure count per run, cold, before and after.
ShadyUnderLight commented 2026-11-27 10:40:55 +00:00 (Migrated from github.com)
Author
Contributor

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


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7216177173 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181#issuecomment-7216177173). Originally posted by [ShadyUnderLight](https://github.com/ShadyUnderLight) on 2026-11-27T10:40:55Z. --- /claim
github-actions[bot] commented 2026-11-27 10:41:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T10:41:06Z.


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

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7216180766 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181#issuecomment-7216180766). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-27T10:41:06Z. --- Claimed by @ShadyUnderLight. Open a draft pull request with `Refs #181` in its description within 24 hours, or the claim expires.
ShadyUnderLight commented 2026-11-27 10:41:11 +00:00 (Migrated from github.com)
Author
Contributor

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


Claiming the second half of the plan in the issue, not the root cause: a compile that fails or crashes must not hold the frame (give up early), on the console-pipeline path.

I read #263 as the fix for the cause (invalid IR from the export order), with tests, and I will not touch it. What I am taking is the safety net for the cases #263 does not explain — the vertex/pixel pairs listed here on macOS 15 were never confirmed to have the same cause — plus the 1 s × 26s stall itself.

Scope: when the converter reports a compiler crash, or a compile has not finished by the time the draw needs it, the draw is dropped and counted for this run instead of waiting; the pipeline is remembered so later frames do not retry it in the frame. Nothing changes for compiles that succeed.

I will post the design and the numbers before opening a draft pull request.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7216182389 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181#issuecomment-7216182389). Originally posted by [ShadyUnderLight](https://github.com/ShadyUnderLight) on 2026-11-27T10:41:11Z. --- Claiming the second half of the plan in the issue, not the root cause: **a compile that fails or crashes must not hold the frame (give up early)**, on the console-pipeline path. I read #263 as the fix for the cause (invalid IR from the export order), with tests, and I will not touch it. What I am taking is the safety net for the cases #263 does not explain — the vertex/pixel pairs listed here on macOS 15 were never confirmed to have the same cause — plus the 1 s × 26s stall itself. Scope: when the converter reports a compiler crash, or a compile has not finished by the time the draw needs it, the draw is dropped and counted for this run instead of waiting; the pipeline is remembered so later frames do not retry it in the frame. Nothing changes for compiles that succeed. I will post the design and the numbers before opening a draft pull request.
maaalrey commented 2026-11-27 13:19:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by maaalrey on 2026-11-27T13:19:05Z.


Tester data for #263: its merge commit against the commit just before it.

M4 Max, 128 GB, macOS 27.2.1, Apple's Metal Shader Converter 4.0 beta 3, Series X, windowed. New game from an empty data folder, keys scripted through the setup screens, 200 s per run. Each build got a new, empty shader cache folder, and its three runs share it. One local change on both builds: the sound output is replaced by the silent one.

b54fab42 (parent), runs 1 / 2 / 3 e2f211a8 (#263 merged), runs 1 / 2 / 3
XPC_ERROR_CONNECTION_INTERRUPTED refusals 74 / 13 / 0 0 / 0 / 0
"crashed on it on an earlier run" refusals 22 / 76 / 86 0 / 0 / 0
all title shader refused lines 697 / 742 / 736 604 / 629 / 648
MTLCompilerService crash reports written during the run 5 / 2 / 0 0 / 0 / 0
world frames logged (world starts at 113 to 116 s) 192 / 192 / 256 192 / 192 / 192

So on this Mac the parent crashes Metal's compiler in the first two runs and then refuses about 86 pipelines from its crash list, and with #263 there is no compiler crash and no crash refusal in three runs. Three more runs on 86786a7 showed the same zeros.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7219327677 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181#issuecomment-7219327677). Originally posted by [maaalrey](https://github.com/maaalrey) on 2026-11-27T13:19:05Z. --- Tester data for #263: its merge commit against the commit just before it. M4 Max, 128 GB, macOS 27.2.1, Apple's Metal Shader Converter 4.0 beta 3, Series X, windowed. New game from an empty data folder, keys scripted through the setup screens, 200 s per run. Each build got a new, empty shader cache folder, and its three runs share it. One local change on both builds: the sound output is replaced by the silent one. | | b54fab42 (parent), runs 1 / 2 / 3 | e2f211a8 (#263 merged), runs 1 / 2 / 3 | |---|---|---| | `XPC_ERROR_CONNECTION_INTERRUPTED` refusals | 74 / 13 / 0 | 0 / 0 / 0 | | "crashed on it on an earlier run" refusals | 22 / 76 / 86 | 0 / 0 / 0 | | all `title shader refused` lines | 697 / 742 / 736 | 604 / 629 / 648 | | MTLCompilerService crash reports written during the run | 5 / 2 / 0 | 0 / 0 / 0 | | world frames logged (world starts at 113 to 116 s) | 192 / 192 / 256 | 192 / 192 / 192 | So on this Mac the parent crashes Metal's compiler in the first two runs and then refuses about 86 pipelines from its crash list, and with #263 there is no compiler crash and no crash refusal in three runs. Three more runs on 86786a7 showed the same zeros.
ShadyUnderLight commented 2026-11-27 13:44:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by ShadyUnderLight on 2026-11-27T13:44:17Z.


One more line for that table, from a different machine and a different build: M5 Max, 128 GB, macOS 27.2.1, Apple's Metal Shader Converter, series-x, headless, 400 s, on the latest main as of tonight (5a7fb278, which has #263 and the pipeline-budget fix merged as 3a03e6ed): 454 title shader refused lines, 0 XPC_ERROR_CONNECTION_INTERRUPTED and 0 "crashed on it on an earlier run". The two zeros reproduce here.

For the record on the budget fix: with #263 in it has no crash left to spend a frame on. It stays as the backstop for a crash from another cause, since the macOS 15 allocatePhysRegs reports in this issue were never confirmed to be the same fault as the ones #263 explains.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7219881883 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181#issuecomment-7219881883). Originally posted by [ShadyUnderLight](https://github.com/ShadyUnderLight) on 2026-11-27T13:44:17Z. --- One more line for that table, from a different machine and a different build: M5 Max, 128 GB, macOS 27.2.1, Apple's Metal Shader Converter, series-x, headless, 400 s, on the latest main as of tonight (`5a7fb278`, which has #263 and the pipeline-budget fix merged as `3a03e6ed`): 454 `title shader refused` lines, **0 `XPC_ERROR_CONNECTION_INTERRUPTED` and 0 "crashed on it on an earlier run"**. The two zeros reproduce here. For the record on the budget fix: with #263 in it has no crash left to spend a frame on. It stays as the backstop for a crash from another cause, since the macOS 15 `allocatePhysRegs` reports in this issue were never confirmed to be the same fault as the ones #263 explains.
github-actions[bot] commented 2026-11-28 18:59:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T18:59:33Z.


The claim by @ShadyUnderLight has expired: no pull request referenced it within 24 hours. This issue is free to claim.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7244206839 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/181#issuecomment-7244206839). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T18:59:33Z. --- The claim by @ShadyUnderLight has expired: no pull request referenced it within 24 hours. This issue is free to claim.
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#181
No description provided.