d3d12: high-performance GPU selection, lock-free wide_each, and -Buil… #3286

Open
dannyhashim08 wants to merge 1 commit from upstream-pr/3286 into main
dannyhashim08 commented 2026-12-03 03:24:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by dannyhashim08 on 2026-12-03T03:24:09Z.


…d play support

  • host.rs: prefer DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE when LEONIDA_ADAPTER is unset and log selected adapter details
  • shadow.rs: use lock-free AtomicUsize completion counter in Left and chunked work-stealing in wide_each
  • play-d3d12.ps1 & play-nvidia.ps1: add -Build play profile option

Claimed in the coordination issue as:

Depends on:

Fixes:

What and why

Tested

GPUs tested:

AI-assisted:

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5619281786 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3286). Originally posted by [dannyhashim08](https://github.com/dannyhashim08) on 2026-12-03T03:24:09Z. --- …d play support - host.rs: prefer DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE when LEONIDA_ADAPTER is unset and log selected adapter details - shadow.rs: use lock-free AtomicUsize completion counter in Left and chunked work-stealing in wide_each - play-d3d12.ps1 & play-nvidia.ps1: add -Build play profile option Claimed in the coordination issue as: <!-- the item ID from the open "Coordinating who works on what" issue, for example TEST-17, or a link to your claim --> Depends on: <!-- #N for every pull request this one builds on or conflicts with (see AGENTS.md; the coordination issue lists the open pull requests); delete the line if it builds on none and conflicts with none --> Fixes: <!-- #N for each issue this closes (GitHub closes it on merge); delete the line if it closes none --> ### What and why <!-- What this changes and the problem it solves. --> ### Tested <!-- What you ran and on which GPU and driver (CONTRIBUTING.md). For the shader translator: how many shaders translate and pass spirv-val, before and after. --> GPUs tested: <!-- vendor, model, driver and OS of each GPU the GPU tests ran on, or n/a --> AI-assisted: <!-- yes or no (AGENTS.md asks a coding agent to say so) --> ### Checklist - [ ] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [ ] One topic; follow-up work goes in a new pull request. - [ ] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
merzleckeier commented 2026-12-03 03:30:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T03:30:28Z.

Review: COMMENTED


Reviewed 8c56cb6b merged onto 516c9eaa.

  • [P2] Build the profile PLAY requested. I ran the public scripts/play-d3d12.ps1 entry point with a synthetic Cargo process and runtime. With a clean target directory, -Build play and -Build release both invoked cargo build --profile diag, reported that the requested executable was missing, and returned 0 without starting it. With an existing play build, -Build play -Rebuild still built diag and launched the old play binary. The default diag flow and a prebuilt play launch worked. Please pass the selected profile to the builder and return a failure if the requested executable is still absent.
  • [P3] Keep the invalid adapter fallback message accurate. chosen_adapter() still logs that Windows’ default card will be used when an explicit selector matches nothing. That now enters the high-performance selection path first. Please align the warning and option documentation with that behavior.

The Windows MSVC build passed under Wine 11.22. The five existing shadow worker tests passed, and a scratch test verified that four concurrent callers each visited every index exactly once before returning with 1, 3 and 7 helpers. The adapter change still needs a hybrid-GPU run. The profile probe used Linux PowerShell 7.7.0.

Please link the coordination claim and split the adapter, worker and launcher changes so each can be verified independently. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6163242024 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3286#pullrequestreview-6163242024). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T03:30:28Z. **Review:** COMMENTED --- Reviewed `8c56cb6b` merged onto `516c9eaa`. - **[P2] Build the profile PLAY requested.** I ran the public `scripts/play-d3d12.ps1` entry point with a synthetic Cargo process and runtime. With a clean target directory, `-Build play` and `-Build release` both invoked `cargo build --profile diag`, reported that the requested executable was missing, and returned 0 without starting it. With an existing `play` build, `-Build play -Rebuild` still built `diag` and launched the old `play` binary. The default `diag` flow and a prebuilt `play` launch worked. Please pass the selected profile to the builder and return a failure if the requested executable is still absent. - **[P3] Keep the invalid adapter fallback message accurate.** `chosen_adapter()` still logs that Windows’ default card will be used when an explicit selector matches nothing. That now enters the high-performance selection path first. Please align the warning and option documentation with that behavior. The Windows MSVC build passed under Wine 11.22. The five existing shadow worker tests passed, and a scratch test verified that four concurrent callers each visited every index exactly once before returning with 1, 3 and 7 helpers. The adapter change still needs a hybrid-GPU run. The profile probe used Linux PowerShell 7.7.0. Please link the coordination claim and split the adapter, worker and launcher changes so each can be verified independently. AI-assisted with OpenAI Codex.
fiestorra commented 2026-12-03 03:41:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T03:41:06Z.


VERIFY-3286 — y esto es lo que más me ha sorprendido esta noche: su PR arregla el rojo de esta máquina

La suite entera, en su head:

cargo test -p leonida-gpu --lib     716 passed; 0 failed; 59 ignored

Cero fallos. Y main tiene 715 y uno. Así que fui a mirar el test concreto, en los dos árboles, con el mismo comando:

con #3286    views_are_made_beside_the_heap_and_copied_in   1 passed
en main      views_are_made_beside_the_heap_and_copied_in   1 failed

El título lo dice: "high-performance GPU selection, lock-free wide_each, and -Buil…" — y host.rs + shadow.rs son la selección de adaptador. El test que falla en esta máquina desde la primera hora de la noche es el que comprueba que un recurso se crea junto al montículo y se copia; aquí falla porque D3D12CreateDevice(None, …) elige la Radeon integrada, y con esta PR la elección cambia.

Lo que eso significa para el repositorio, y es lo que importa más que la PR: ese rojo no era un defecto del test ni del código del port — era una elección de adaptador que asumía «el predeterminado de Windows es la tarjeta buena». En una máquina de escritorio con una sola GPU eso es cierto; en esta —RTX 4090 e iGPU—, no. Y es la razón por la que mi #2995 propone lo mismo desde el lado del test (EnumAdapterByGpuPreference): dos arreglos del mismo supuesto, uno en el runtime y otro en la prueba.

Lo que verifiqué y lo que no: que la suite entera queda verde en esta máquina con su cambio — y que el resto de su diff (lock-free wide_each, -Buil…) no lo he mirado con la misma atención, porque 716 verdes no dicen nada de un unsafe que no se ejecuta en los tests.

Lo que le pediría al autor, en una línea: si #2995 y esta entran las dos, el test quedaría pasando por dos razones a la vez — y eso es aceptable, pero conviene saberlo antes de que alguien atribuya el verde a una sola de ellas.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7366825150 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3286#issuecomment-7366825150). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T03:41:06Z. --- ## VERIFY-3286 — y esto es lo que más me ha sorprendido esta noche: **su PR arregla el rojo de esta máquina** **La suite entera, en su head**: ``` cargo test -p leonida-gpu --lib 716 passed; 0 failed; 59 ignored ``` **Cero fallos.** **Y `main` tiene 715 y uno.** **Así que fui a mirar el test concreto, en los dos árboles, con el mismo comando**: ``` con #3286 views_are_made_beside_the_heap_and_copied_in 1 passed en main views_are_made_beside_the_heap_and_copied_in 1 failed ``` **El título lo dice**: *"high-performance GPU selection, lock-free wide_each, and -Buil…"* — **y `host.rs` + `shadow.rs` son la selección de adaptador**. **El test que falla en esta máquina desde la primera hora de la noche es el que comprueba que un recurso se crea junto al montículo y se copia; aquí falla porque `D3D12CreateDevice(None, …)` elige la Radeon integrada, y con esta PR la elección cambia.** **Lo que eso significa para el repositorio, y es lo que importa más que la PR**: **ese rojo no era un defecto del test ni del código del port** — **era una elección de adaptador que asumía «el predeterminado de Windows es la tarjeta buena»**. **En una máquina de escritorio con una sola GPU eso es cierto; en esta —RTX 4090 *e* iGPU—, no.** **Y es la razón por la que mi `#2995` propone lo mismo desde el lado del test (`EnumAdapterByGpuPreference`): dos arreglos del mismo supuesto, uno en el runtime y otro en la prueba.** **Lo que verifiqué y lo que no**: **que la suite entera queda verde en esta máquina con su cambio** — **y que el resto de su diff (`lock-free wide_each`, `-Buil…`) no lo he mirado con la misma atención**, **porque 716 verdes no dicen nada de un `unsafe` que no se ejecuta en los tests.** **Lo que le pediría al autor, en una línea**: **si `#2995` y esta entran las dos, el test quedaría pasando por dos razones a la vez** — **y eso es aceptable, pero conviene saberlo antes de que alguien atribuya el verde a una sola de ellas.** Written with an AI assistant.
MoonEyes commented 2026-12-03 03:43:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T03:43:41Z.


RUN (in game, batch of three pull requests), each head merged with git merge --no-ff onto main 516c9eaab, in one build: #3031 4e59d46e8, #3284 f9c588760, #3286 8c56cb6b9. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, -Resolution 1080, frame generation 2x, -PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.

What Result
Device lost / device removed 0
Exceptions, panics, hang watchdog, GPU stall, title suspended 0
Process alive at the end yes, stopped by the time limit
Rendered fps, last 240 s (48 samples) median 17.1, mean 17.1
Rendered fps, last 120 s median 16.8
Time under 5 fps in the world 0 %

For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.

Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.

Limits: one run; arrival in the world was driven by keys and not checked on pictures; -PrecompileUsed was used, so the default start (every known pipeline precompiled) was not exercised. #3031 was in an earlier batch on another head; this run covers its current head. #3284 changes what is written to the pipeline book; whether a later start reuses it was not checked. #3286's card selection only matters when the PC has more than one card to pick from, and its build-script change was not exercised: this run covers the default path on one dedicated card.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7366871105 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3286#issuecomment-7366871105). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T03:43:41Z. --- RUN (in game, batch of three pull requests), each head merged with `git merge --no-ff` onto main `516c9eaab`, in one build: #3031 `4e59d46e8`, #3284 `f9c588760`, #3286 `8c56cb6b9`. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, `-Resolution 1080`, frame generation 2x, `-PrecompileUsed`, the same walking route as the other runs on this machine, 330 s after reaching the world. | What | Result | |---|---| | Device lost / device removed | 0 | | Exceptions, panics, hang watchdog, GPU stall, title suspended | 0 | | Process alive at the end | yes, stopped by the time limit | | Rendered fps, last 240 s (48 samples) | median 17.1, mean 17.1 | | Rendered fps, last 120 s | median 16.8 | | Time under 5 fps in the world | 0 % | For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain. Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. Limits: one run; arrival in the world was driven by keys and not checked on pictures; `-PrecompileUsed` was used, so the default start (every known pipeline precompiled) was not exercised. #3031 was in an earlier batch on another head; this run covers its current head. #3284 changes what is written to the pipeline book; whether a later start reuses it was not checked. #3286's card selection only matters when the PC has more than one card to pick from, and its build-script change was not exercised: this run covers the default path on one dedicated card. AI-assisted (Claude Code).
fiestorra commented 2026-12-03 06:19:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T06:19:36Z.


#3286 on today's main: 716 passed; 0 failed — the iGPU red goes away, and that makes my own #2995 redundant

Measured a minute ago:

cherry-pick of #3286 onto d9b618f10     exit 0, 4 files, +72/−19
cargo test -p leonida-gpu --lib
  716 passed; 0 failed; 59 ignored      ← main today is 715/1

That is the whole crate green on this machine for the first time tonight, and it is #3286's change in the runtime and not in a test.

And here is the uncomfortable part: #2995 is mine, and it does the same job from the other side

The two diffs, side by side:

my #2995 #3286
where host.rs, cfg(test) only host.rs runtime + shadow.rs
what chosen_adapter().or_else(test_adapter) high_performance_adapter() first, D3D12CreateDevice(None, …) as fallback
doc says "Outside cfg(test) this is None, so the runtime's own choice of adapter is untouched" "on a hybrid-graphics laptop D3D12CreateDevice(None, …) picks adapter 0 (the integrated GPU)"

Mine fixes the tests by giving them a card; theirs fixes the runtime by asking for the card. And the runtime fix is the one that matters, because the test was only telling the truth: on this machine the runtime really was creating its device on the integrated chip.

So the honest recommendation is on my own PR: if #3286 lands, #2995 should be closed rather than merged. Its mechanism is test-only, and a test-only mechanism that hides the adapter choice is a mechanism that would hide this bug again — which is the opposite of what the hle-visible-style branch I wrote does (that one changes the assertion to say what is true; this one changed the apparatus so the assertion passed).

That distinction is the one thing I would want saved from tonight's 200 reviews: when a test is red, there are three moves — fix the code, fix the assertion, or fix the apparatus — and the third is the one that should need an argument, because it is the one that cannot fail.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7369709672 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3286#issuecomment-7369709672). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T06:19:36Z. --- ## `#3286` on today's `main`: **716 passed; 0 failed** — the iGPU red goes away, and that makes my own `#2995` redundant **Measured a minute ago**: ``` cherry-pick of #3286 onto d9b618f10 exit 0, 4 files, +72/−19 cargo test -p leonida-gpu --lib 716 passed; 0 failed; 59 ignored ← main today is 715/1 ``` **That is the whole crate green on this machine for the first time tonight**, **and it is `#3286`'s change in the runtime and not in a test.** ## And here is the uncomfortable part: **`#2995` is mine, and it does the same job from the other side** **The two diffs, side by side**: | | **my `#2995`** | **`#3286`** | |---|---|---| | where | **`host.rs`, `cfg(test)` only** | **`host.rs` runtime + `shadow.rs`** | | what | **`chosen_adapter().or_else(test_adapter)`** | **`high_performance_adapter()` first, `D3D12CreateDevice(None, …)` as fallback** | | doc says | ***"Outside `cfg(test)` this is `None`, so the runtime's own choice of adapter is untouched"*** | ***"on a hybrid-graphics laptop `D3D12CreateDevice(None, …)` picks adapter 0 (the integrated GPU)"*** | **Mine fixes the *tests* by giving them a card; theirs fixes the *runtime* by asking for the card.** **And the runtime fix is the one that matters**, because **the test was only telling the truth: on this machine the runtime really was creating its device on the integrated chip.** **So the honest recommendation is on my own PR**: **if `#3286` lands, `#2995` should be closed rather than merged.** **Its mechanism is test-only, and a test-only mechanism that hides the adapter choice is a mechanism that would hide this bug again** — **which is the opposite of what the `hle-visible-style` branch I wrote does** (**that one changes the assertion to say what is true; this one changed the apparatus so the assertion passed**). **That distinction is the one thing I would want saved from tonight's 200 reviews**: **when a test is red, there are three moves** — **fix the code, fix the assertion, or fix the apparatus** — **and the third is the one that should need an argument, because it is the one that cannot fail.**
fiestorra commented 2026-12-03 06:27:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T06:27:53Z.


#3286 está BLOCKED por una aprobación y no por CI, y es la que deja el crate entero verde

Estado medido ahora:

gh pr view 3286 --json mergeStateStatus,mergeable,isDraft
  mergeStateStatus: BLOCKED      mergeable: MERGEABLE      draft: false
gh pr checks 3286
  no checks reported on the 'perf/seriesx-rtx5080' branch

Sin checks y BLOCKED significa una sola cosa aquí: la protección de main pide una revisión aprobatoria, y no hay ninguna registrada. No es un conflicto (MERGEABLE), no es CI, no es un borrador.

Y lo que aporta, medido esta tarde:

cherry-pick sobre d9b618f10   exit 0, 4 files, +72/−19
cargo test -p leonida-gpu --lib
  716 passed; 0 failed; 59 ignored      ← main hoy es 715/1

Es el único cambio de la cola que convierte el rojo de leonida-gpu en verde, y el rojo es el que se come el CI de cada PR que toca ese crate. Mientras no entre, cada autor que toque leonida-gpu va a ver un fallo que no es suyo — y el de esta noche lo ha visto en ocho PRs distintos.

Y la pregunta que contesta de paso: #2995 (mío) hace lo mismo desde el aparato de test, así que si esto entra, aquel se cierra. Lo digo porque el orden importa: si se fusiona el mío primero, el rojo desaparece sin que nadie arregle el runtime, que es justo lo que el test estaba señalando.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7369864325 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3286#issuecomment-7369864325). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T06:27:53Z. --- ## `#3286` está `BLOCKED` **por una aprobación y no por CI**, y es la que deja el crate entero verde **Estado medido ahora**: ``` gh pr view 3286 --json mergeStateStatus,mergeable,isDraft mergeStateStatus: BLOCKED mergeable: MERGEABLE draft: false gh pr checks 3286 no checks reported on the 'perf/seriesx-rtx5080' branch ``` **Sin checks y `BLOCKED` significa una sola cosa aquí**: **la protección de `main` pide una revisión aprobatoria, y no hay ninguna registrada.** **No es un conflicto (`MERGEABLE`), no es CI, no es un borrador.** **Y lo que aporta, medido esta tarde**: ``` cherry-pick sobre d9b618f10 exit 0, 4 files, +72/−19 cargo test -p leonida-gpu --lib 716 passed; 0 failed; 59 ignored ← main hoy es 715/1 ``` **Es el único cambio de la cola que convierte el rojo de `leonida-gpu` en verde, y el rojo es el que se come el CI de cada PR que toca ese crate.** **Mientras no entre, cada autor que toque `leonida-gpu` va a ver un fallo que no es suyo** — **y el de esta noche lo ha visto en ocho PRs distintos.** **Y la pregunta que contesta de paso**: **`#2995` (mío) hace lo mismo desde el aparato de test**, **así que si esto entra, aquel se cierra.** **Lo digo porque el orden importa: si se fusiona el mío primero, el rojo desaparece sin que nadie arregle el runtime**, **que es justo lo que el test estaba señalando.**
merzleckeier commented 2026-12-03 06:37:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T06:37:42Z.


I checked the descriptor test separately on main (d9b618f1) and with 8c56cb6b merged in. Both Windows MSVC diag builds ran under Wine 11.22 / VKD3D-Proton 3.1 on an RTX 4070 SUPER and an AMD Raphael iGPU. I made the device/heap setup fail loudly and logged the device LUID's adapter, so none of these runs silently skipped the test.

Device selection Adapter on both builds views_are_made_beside_the_heap_and_copied_in
Automatic RTX 4070 SUPER Same failure on both builds at copied as it was made
LEONIDA_ADAPTER=4070 RTX 4070 SUPER Same failure on both builds
LEONIDA_ADAPTER=Radeon AMD Raphael Same failure on both builds

Both DXGI enumeration methods ranked the NVIDIA adapter first under this Wine setup. A Windows machine that defaults to its iGPU can give a different result. The failed assertion reads and compares 32 bytes at CPU descriptor handles. D3D12 specifies those handles as opaque, with layouts that can vary even on one device. A GPU readback of a known value through the copied view would test whether the copy works. Microsoft's descriptor heap docs

The two launcher profile failures in the earlier review are still present at this head.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7370049184 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3286#issuecomment-7370049184). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T06:37:42Z. --- I checked the descriptor test separately on `main` (`d9b618f1`) and with `8c56cb6b` merged in. Both Windows MSVC diag builds ran under Wine 11.22 / VKD3D-Proton 3.1 on an RTX 4070 SUPER and an AMD Raphael iGPU. I made the device/heap setup fail loudly and logged the device LUID's adapter, so none of these runs silently skipped the test. | Device selection | Adapter on both builds | `views_are_made_beside_the_heap_and_copied_in` | | --- | --- | --- | | Automatic | RTX 4070 SUPER | Same failure on both builds at `copied as it was made` | | `LEONIDA_ADAPTER=4070` | RTX 4070 SUPER | Same failure on both builds | | `LEONIDA_ADAPTER=Radeon` | AMD Raphael | Same failure on both builds | Both DXGI enumeration methods ranked the NVIDIA adapter first under this Wine setup. A Windows machine that defaults to its iGPU can give a different result. The failed assertion reads and compares 32 bytes at CPU descriptor handles. D3D12 specifies those handles as opaque, with layouts that can vary even on one device. A GPU readback of a known value through the copied view would test whether the copy works. [Microsoft's descriptor heap docs](https://learn.microsoft.com/en-us/windows/win32/direct3d12/creating-descriptor-heaps) The two launcher profile failures in the [earlier review](https://github.com/ProjectLeonida/mandy/pull/3286#pullrequestreview-6163242024) are still present at this head.
merzleckeier commented 2026-12-03 11:51:32 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T11:51:32Z.


Integration check on b053a181 with #3286 8c56cb6b and #3325 0162194c. The combination conflicts in the startup logging block. I kept this PR’s adapter preference and #3325’s single log_card() call. In a synthetic D3D12 startup under Wine/vkd3d-proton, automatic selection used the RTX 4070 SUPER and LEONIDA_ADAPTER=Radeon selected the iGPU. The adapter LUID in the metadata matched the actual D3D12 device in both cases. The unrecognized-selector fallback also chose the RTX. Two Wine runs aborted during process teardown after that test had passed.

For the earlier launcher finding, I tested a local fix that passes -Build to build-nvidia.ps1 and uses it for the Cargo profile and built-with.txt path. All five mocked PowerShell cases launched the freshly rebuilt profile, including both pre-existing and missing play and release executables and the default diag case.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7377271730 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3286#issuecomment-7377271730). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T11:51:32Z. --- Integration check on `b053a181` with #3286 `8c56cb6b` and #3325 `0162194c`. The combination conflicts in the startup logging block. I kept this PR’s adapter preference and #3325’s single `log_card()` call. In a synthetic D3D12 startup under Wine/vkd3d-proton, automatic selection used the RTX 4070 SUPER and `LEONIDA_ADAPTER=Radeon` selected the iGPU. The adapter LUID in the metadata matched the actual D3D12 device in both cases. The unrecognized-selector fallback also chose the RTX. Two Wine runs aborted during process teardown after that test had passed. For the earlier launcher finding, I tested a local fix that passes `-Build` to `build-nvidia.ps1` and uses it for the Cargo profile and `built-with.txt` path. All five mocked PowerShell cases launched the freshly rebuilt profile, including both pre-existing and missing `play` and `release` executables and the default `diag` case. AI-assisted with OpenAI Codex.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3286:upstream-pr/3286'
git switch 'upstream-pr/3286'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3286'
git switch 'upstream-pr/3286'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3286'
git switch 'upstream-pr/3286'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3286'
git switch 'main'
git merge --squash 'upstream-pr/3286'
git switch 'main'
git merge --ff-only 'upstream-pr/3286'
git switch 'main'
git merge 'upstream-pr/3286'
git push origin 'main'
Sign in to join this conversation.
No reviewers
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
ProjectLeonida/mandy!3286
No description provided.