d3d12: log the host adapter selected by the device #2948

Open
wrexik wants to merge 4 commits from upstream-pr/2948 into main
wrexik commented 2026-12-01 20:49:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by wrexik on 2026-12-01T20:49:08Z.


Claimed in the coordination issue: D3D12-HOST-GPU-ADAPTER-STARTUP-DIAGNOSTIC

What and why

After creating the host D3D12 device, identify its adapter by the device LUID and log the adapter name, hardware/software classification, vendor and device IDs, and dedicated video memory. Log DXGI errors if adapter lookup or description fails. This improves startup diagnostics for reports such as #2914; it does not fix or close that issue.

Tested

  • From d3d12/: cargo test -p leonida-gpu host::tests::adapter_details_report_name_class_ids_and_video_memory --locked — passed (1 test).
  • python -I scripts/check_no_game_data.py — passed.
  • git diff --check origin/main...HEAD — passed.
  • python -I scripts/red_green.py HEAD --base origin/main --no-fetch --crate leonida-gpu --json — returned green fails: the red test-only build cannot compile because AdapterDetails does not exist on origin/main; the green full-crate run failed the alias-cast integration test during parallel execution. That test passed in isolation on current origin/main and the feature branch with cargo test -p leonida-gpu --locked committed_and_placed_r32_uint_textures_cast_to_r9g9b9e5_under_legacy_barriers (1 test each).
  • From d3d12/: cargo fmt --all -- --check — failed on pre-existing workspace formatting differences; no unrelated formatting changes are included.

GPUs tested: n/a (synthetic DXGI descriptor test only; no GPU or game-copy test was run).

AI-assisted: yes — Copilot Auto (underlying model unavailable); reviewer model not surfaced.

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption, including in logs or reports quoted here.
  • Translator contract table update (N/A; no translator rule added).
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5594279032 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2948). Originally posted by [wrexik](https://github.com/wrexik) on 2026-12-01T20:49:08Z. --- Claimed in the coordination issue: [D3D12-HOST-GPU-ADAPTER-STARTUP-DIAGNOSTIC](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7321093278) ### What and why After creating the host D3D12 device, identify its adapter by the device LUID and log the adapter name, hardware/software classification, vendor and device IDs, and dedicated video memory. Log DXGI errors if adapter lookup or description fails. This improves startup diagnostics for reports such as #2914; it does not fix or close that issue. ### Tested - From `d3d12/`: `cargo test -p leonida-gpu host::tests::adapter_details_report_name_class_ids_and_video_memory --locked` — passed (1 test). - `python -I scripts/check_no_game_data.py` — passed. - `git diff --check origin/main...HEAD` — passed. - `python -I scripts/red_green.py HEAD --base origin/main --no-fetch --crate leonida-gpu --json` — returned `green fails`: the red test-only build cannot compile because `AdapterDetails` does not exist on `origin/main`; the green full-crate run failed the alias-cast integration test during parallel execution. That test passed in isolation on current `origin/main` and the feature branch with `cargo test -p leonida-gpu --locked committed_and_placed_r32_uint_textures_cast_to_r9g9b9e5_under_legacy_barriers` (1 test each). - From `d3d12/`: `cargo fmt --all -- --check` — failed on pre-existing workspace formatting differences; no unrelated formatting changes are included. GPUs tested: n/a (synthetic DXGI descriptor test only; no GPU or game-copy test was run). AI-assisted: yes — Copilot Auto (underlying model unavailable); reviewer model not surfaced. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption, including in logs or reports quoted here. - [x] Translator contract table update (N/A; no translator rule added).
wrexik commented 2026-12-01 20:52:01 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by wrexik on 2026-12-01T20:52:01Z.


Could an independent maintainer please approve the pending GitHub Actions runs for this PR? The D3D12 runtime, No Game Data, and CI runs are all ction_required with no jobs started, and no checks are reported yet. I have not attempted to approve or bypass these workflow gates.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7325392227 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2948#issuecomment-7325392227). Originally posted by [wrexik](https://github.com/wrexik) on 2026-12-01T20:52:01Z. --- Could an independent maintainer please approve the pending GitHub Actions runs for this PR? The D3D12 runtime, No Game Data, and CI runs are all ction_required with no jobs started, and no checks are reported yet. I have not attempted to approve or bypass these workflow gates.
merzleckeier commented 2026-12-01 21:01:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T21:01:35Z.


Live selected-adapter diagnostic check on Wine on 5284c6ea merged into bc332322e. I captured the original tracing events around actual D3D12 host creation. Thirty successful hardware starts across control and PR checked that the selected DXGI descriptor LUID matched the D3D12 device LUID. In all 15 PR hardware starts, the new event occurred once before device-ready and its name, class, IDs and dedicated-memory field matched a direct DXGI query. Control emitted the existing ready event only.

With both Vulkan ICDs exposed, LEONIDA_ADAPTER selected the requested device on both trees. The PR printed RTX 4070 SUPER, 10de:2783, 12,282 MiB for NVIDIA, and AMD Radeon(TM) Graphics, 1002:164e, 512 MiB for the iGPU. With DXVK NVIDIA hiding enabled, the physical card was still the RTX 4070 SUPER and the event correctly reflected DXGI’s 1002:73df descriptor. These are DXGI-reported fields. The six no-ICD starts produced no adapter event, and the stock formatter test passed including the simulated software flag. A working WARP device and post-creation query errors were outside this run.

MEASURED with Win64 Wine 11.22, VKD3D-Proton 3.1.0, NVIDIA 620.73.4 and RADV 26.3.1. Synthetic inputs, OpenAI Codex and a separate read-only review.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7325630178 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2948#issuecomment-7325630178). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-01T21:01:35Z. --- Live selected-adapter diagnostic check on Wine on `5284c6ea` merged into `bc332322e`. I captured the original tracing events around actual D3D12 host creation. Thirty successful hardware starts across control and PR checked that the selected DXGI descriptor LUID matched the D3D12 device LUID. In all 15 PR hardware starts, the new event occurred once before device-ready and its name, class, IDs and dedicated-memory field matched a direct DXGI query. Control emitted the existing ready event only. With both Vulkan ICDs exposed, `LEONIDA_ADAPTER` selected the requested device on both trees. The PR printed `RTX 4070 SUPER`, `10de:2783`, 12,282 MiB for NVIDIA, and `AMD Radeon(TM) Graphics`, `1002:164e`, 512 MiB for the iGPU. With DXVK NVIDIA hiding enabled, the physical card was still the RTX 4070 SUPER and the event correctly reflected DXGI’s `1002:73df` descriptor. These are DXGI-reported fields. The six no-ICD starts produced no adapter event, and the stock formatter test passed including the simulated software flag. A working WARP device and post-creation query errors were outside this run. MEASURED with Win64 Wine 11.22, VKD3D-Proton 3.1.0, NVIDIA 620.73.4 and RADV 26.3.1. Synthetic inputs, OpenAI Codex and a separate read-only review.
andrew-ai commented 2026-12-01 21:05:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by andrew-ai on 2026-12-01T21:05:22Z.


Verified the selected-adapter diagnostic on native Windows with NVIDIA driver 616.92. I built base 1e3e316c5 and PR head 5284c6eae with the same diagnostics profile. On each I ran leonida.exe warm --limit 0 with an empty cache, once on the default device and once with LEONIDA_D3D12_WARP=1. All four processes initialized D3D12 and exited successfully. The base emitted zero structured adapter reports. The PR emitted exactly one per process.

Device selected Kind Vendor:device Dedicated memory reported by DXGI
NVIDIA GeForce RTX 5070 hardware 10de:2f04 11,943 MiB
Microsoft Basic Render Driver (WARP) software 1414:008c 0 MiB

The hardware name and PCI IDs agree with nvidia-smi. Its memory total was 12,227 MiB, so the logged field should be read as the DXGI descriptor value. The PR's exact host::tests::adapter_details_report_name_class_ids_and_video_memory test also passed (1/1). This covers both device selections with no game files. I did not exercise DXGI lookup failures.

Coordination claim. AI-assisted with OpenAI Codex (GPT-6).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7325725706 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2948#issuecomment-7325725706). Originally posted by [andrew-ai](https://github.com/andrew-ai) on 2026-12-01T21:05:22Z. --- Verified the selected-adapter diagnostic on native Windows with NVIDIA driver 616.92. I built base `1e3e316c5` and PR head `5284c6eae` with the same diagnostics profile. On each I ran `leonida.exe warm --limit 0` with an empty cache, once on the default device and once with `LEONIDA_D3D12_WARP=1`. All four processes initialized D3D12 and exited successfully. The base emitted zero structured adapter reports. The PR emitted exactly one per process. | Device selected | Kind | Vendor:device | Dedicated memory reported by DXGI | | --- | --- | --- | ---: | | NVIDIA GeForce RTX 5070 | hardware | 10de:2f04 | 11,943 MiB | | Microsoft Basic Render Driver (WARP) | software | 1414:008c | 0 MiB | The hardware name and PCI IDs agree with nvidia-smi. Its memory total was 12,227 MiB, so the logged field should be read as the DXGI descriptor value. The PR's exact `host::tests::adapter_details_report_name_class_ids_and_video_memory` test also passed (1/1). This covers both device selections with no game files. I did not exercise DXGI lookup failures. [Coordination claim](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7325399478). AI-assisted with OpenAI Codex (GPT-6).
KelboLive commented 2026-12-01 21:29:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T21:29:27Z.

Review: COMMENTED


Reviewed 5284c6eae: the event is emitted once per process from the host() singleton, and it identifies the adapter via EnumAdapterByLuid(device.GetAdapterLuid()), so it reports the device actually created rather than the first enumerated adapter — including the D3D12CreateDevice(None, …) default path. It logs only DXGI descriptor fields (name, hardware/software flag, vendor:device IDs, dedicated VRAM), with no LUID, path, user or game data, and leaves the existing host D3D12 device ready line intact, so the existing log consumer still matches. Lookup and GetDesc1 failures degrade to warnings rather than blocking startup.

cargo test --locked -p leonida-gpu --lib is 645/0 including the new test, the software-classification mutation is caught (kind: "software" vs "hardware"), check_no_game_data is clean, and merge-tree against current main is clean.

Non-blocking nit: the UTF-16 name-trim logic duplicates chosen_adapter (host.rs:1671-1672); a small shared helper would keep the two from drifting.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6140489685 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2948#pullrequestreview-6140489685). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T21:29:27Z. **Review:** COMMENTED --- Reviewed `5284c6eae`: the event is emitted **once per process** from the `host()` singleton, and it identifies the adapter via `EnumAdapterByLuid(device.GetAdapterLuid())`, so it reports the device actually created rather than the first enumerated adapter — including the `D3D12CreateDevice(None, …)` default path. It logs only DXGI descriptor fields (name, hardware/software flag, vendor:device IDs, dedicated VRAM), with no LUID, path, user or game data, and leaves the existing `host D3D12 device ready` line intact, so the existing log consumer still matches. Lookup and `GetDesc1` failures degrade to warnings rather than blocking startup. `cargo test --locked -p leonida-gpu --lib` is 645/0 including the new test, the software-classification mutation is caught (`kind: "software"` vs `"hardware"`), `check_no_game_data` is clean, and `merge-tree` against current main is clean. Non-blocking nit: the UTF-16 name-trim logic duplicates `chosen_adapter` (`host.rs:1671-1672`); a small shared helper would keep the two from drifting.
wrexik commented 2026-12-01 21:44:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by wrexik on 2026-12-01T21:44:53Z.


Run the workflows @KelboLive

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7326724104 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2948#issuecomment-7326724104). Originally posted by [wrexik](https://github.com/wrexik) on 2026-12-01T21:44:53Z. --- Run the workflows @KelboLive
MoonEyes commented 2026-12-02 12:32:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:32:19Z.


This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).

Could you, or anyone with a working setup, post a run report on the current head merged onto current main:

  • the head SHA and the main SHA it was merged onto;
  • GPU, driver and OS;
  • at least 300 s in the world after loading;
  • device lost / crashes (count), and rendered fps (median) if you have them;
  • the same run on main alone for comparison, if you can.

Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7345488344 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2948#issuecomment-7345488344). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T12:32:19Z. --- This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists). Could you, or anyone with a working setup, post a run report on the **current head** merged onto current `main`: - the head SHA and the `main` SHA it was merged onto; - GPU, driver and OS; - at least 300 s in the world after loading; - device lost / crashes (count), and rendered fps (median) if you have them; - the same run on `main` alone for comparison, if you can. Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough. AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 18:19:03 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:19:03Z.


Verification of #2948 (third party, code review on Linux; not built: Windows-only leonida-gpu)

  • Head verified: 5284c6eae7f765930ebab18dc5e929036a2a3bc6 (1 file, d3d12/crates/leonida-gpu/src/host.rs, +77/-3).
  • Merge base 1e3e316c5. git merge-tree --write-tree origin/main pr/2948 against main 45dc41f95 is clean
    (340 commits behind).
  • CI: no check runs on this head. The fork workflows are waiting for maintainer approval (action_required).
  • python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/host.rs: exit 0.

Review

  • host.rs:1565-1573: the adapter is found by the device's LUID, as before, and only the logging is new. On
    failure, adapter is still None as on main, so behaviour is unchanged. Startup cost: one GetDesc1 and one
    tracing::info!, called once.
  • adapter_details (:1606-1621) trims Description at the first NUL, classifies with
    DXGI_ADAPTER_FLAG_SOFTWARE, and reports MiB. This is correct. The unit test (:1834-1855) covers name, ids,
    memory and the software flag.
  • Overlap: main already logs the chosen card when LEONIDA_ADAPTER is set
    (host.rs:1632, "host device on the card LEONIDA_ADAPTER names"). This PR adds the line for the default-adapter
    case, which is what #2914 and #3011 need. That is fine, but with LEONIDA_ADAPTER set there are now two adapter
    lines. Not blocking.
  • There is no red/green to show for a log line. merzleckeier's Wine run and andrew-ai's native run confirmed that
    the event fires once and the LUID matches.

Process

  • Disclosure: "Copilot Auto (underlying model unavailable); reviewer model not surfaced". CONTRIBUTING.md asks for
    the specific models, including the reviewer agent, from the list for new code. This does not meet it.
  • MoonEyes's render-path gate asks for an in-game run on the current head. None was posted yet.

Verdict: ready on review (not built here). It is blocked on CI that a maintainer needs to approve, on the
in-game gate run, and on a model disclosure that meets CONTRIBUTING.md.

AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7354356827 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2948#issuecomment-7354356827). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:19:03Z. --- **Verification of #2948 (third party, code review on Linux; not built: Windows-only `leonida-gpu`)** - Head verified: `5284c6eae7f765930ebab18dc5e929036a2a3bc6` (1 file, `d3d12/crates/leonida-gpu/src/host.rs`, +77/-3). - Merge base `1e3e316c5`. `git merge-tree --write-tree origin/main pr/2948` against `main` `45dc41f95` is clean (340 commits behind). - CI: no check runs on this head. The fork workflows are waiting for maintainer approval (`action_required`). - `python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/host.rs`: exit 0. **Review** - `host.rs:1565-1573`: the adapter is found by the device's LUID, as before, and only the logging is new. On failure, `adapter` is still `None` as on `main`, so behaviour is unchanged. Startup cost: one `GetDesc1` and one `tracing::info!`, called once. - `adapter_details` (`:1606-1621`) trims `Description` at the first NUL, classifies with `DXGI_ADAPTER_FLAG_SOFTWARE`, and reports MiB. This is correct. The unit test (`:1834-1855`) covers name, ids, memory and the software flag. - Overlap: `main` already logs the chosen card when `LEONIDA_ADAPTER` is set (`host.rs:1632`, "host device on the card LEONIDA_ADAPTER names"). This PR adds the line for the default-adapter case, which is what #2914 and #3011 need. That is fine, but with `LEONIDA_ADAPTER` set there are now two adapter lines. Not blocking. - There is no red/green to show for a log line. merzleckeier's Wine run and andrew-ai's native run confirmed that the event fires once and the LUID matches. **Process** - Disclosure: "Copilot Auto (underlying model unavailable); reviewer model not surfaced". CONTRIBUTING.md asks for the specific models, including the reviewer agent, from the list for new code. This does not meet it. - MoonEyes's render-path gate asks for an in-game run on the current head. None was posted yet. **Verdict: ready on review** (not built here). It is blocked on CI that a maintainer needs to approve, on the in-game gate run, and on a model disclosure that meets CONTRIBUTING.md. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
MoonEyes commented 2026-12-02 18:21:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:21:02Z.


RUN (in game, batch of seventeen render-path pull requests), each head merged with git merge --no-ff onto main 3c106eb2f, in one build: #3111 15b579756, #2948 5284c6eae, #2698 1f188c4f7, #2946 44bf554fe, #3001 d924cbb65, #2832 0c861595a, #2915 58e8535cf, #2822 d359a2f85, #2896 c9c6b103d, #2983 8278ef1b9, #3115 ba5121192, #2945 d2c08c14f, #2975 74512d658, #2951 26da88e8e, #2800 b6ebcedd4, #2893 7c7e99b48, #3113 fa1460b6b (and #3097 0d7a451ab, merged since). RTX 4060 8 GB, driver 610.88, Windows 11. Series S, -Resolution 1080, frame generation 2x, 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 (43 samples) median 14.6, mean 12.7
Rendered fps, last 120 s median 13.7
Time under 5 fps in the world 13 % (short drops, lowest sample 0.3 fps)

The drops under 5 fps line up with shaders being translated while walking (about 500 translations in the last 330 s): this batch changes the shader translation, so the shader cache built by earlier runs did not apply and the pipeline precompile alone took about 45 minutes. The batch-5 run on the same machine and route had no sample under 5 fps (median 16.4). I read this as cold-cache stutter, not as a regression of a single pull request, but this run cannot tell them apart.

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. A first attempt of this batch is not counted: the run script gave up waiting for the game window after 40 minutes of precompile.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7354423656 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2948#issuecomment-7354423656). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:21:02Z. --- RUN (in game, batch of seventeen render-path pull requests), each head merged with `git merge --no-ff` onto main `3c106eb2f`, in one build: #3111 `15b579756`, #2948 `5284c6eae`, #2698 `1f188c4f7`, #2946 `44bf554fe`, #3001 `d924cbb65`, #2832 `0c861595a`, #2915 `58e8535cf`, #2822 `d359a2f85`, #2896 `c9c6b103d`, #2983 `8278ef1b9`, #3115 `ba5121192`, #2945 `d2c08c14f`, #2975 `74512d658`, #2951 `26da88e8e`, #2800 `b6ebcedd4`, #2893 `7c7e99b48`, #3113 `fa1460b6b` (and #3097 `0d7a451ab`, merged since). RTX 4060 8 GB, driver 610.88, Windows 11. Series S, `-Resolution 1080`, frame generation 2x, 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 (43 samples) | median 14.6, mean 12.7 | | Rendered fps, last 120 s | median 13.7 | | Time under 5 fps in the world | 13 % (short drops, lowest sample 0.3 fps) | The drops under 5 fps line up with shaders being translated while walking (about 500 translations in the last 330 s): this batch changes the shader translation, so the shader cache built by earlier runs did not apply and the pipeline precompile alone took about 45 minutes. The batch-5 run on the same machine and route had no sample under 5 fps (median 16.4). I read this as cold-cache stutter, not as a regression of a single pull request, but this run cannot tell them apart. 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. A first attempt of this batch is not counted: the run script gave up waiting for the game window after 40 minutes of precompile. AI-assisted (Claude Code).
fiestorra commented 2026-12-03 04:17:19 +00:00 (Migrated from github.com)

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


VERIFY-2948 — cherry-pick sobre main y 716/1, donde el 1 es el rojo de esta máquina

Un fichero, host.rs +77, con un conflicto declarado contra main. Pero el conflicto es de merge, no del parche, así que lo medí como el AGENTS.md del repositorio manda: cherry-pick del commit sobre origin/main —

git cherry-pick  (sobre 516c9eaab)     exit 0, sin conflicto
cargo test -p leonida-gpu --lib        716 passed; 1 failed; 59 ignored

El 1 es descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in, el de la iGPU, que en main sin esta PR también falla. Y 716 contra los 715 de main es el test que este PR añade.

Así que: aplica limpio, no rompe nada, y añade un test. Lo que el conflicto de git merge-tree decía era cierto y era sobre el otro fichero del mismo tema — host.rs también lo toca #3286, y por eso dos PRs que se llevan bien por separado chocan entre sí.

Y el cambio es el que más falta hacía en una máquina como esta: registra en el log el adaptador que el dispositivo eligió — lo que convierte «los tests fallan en mi portátil» en un número que se puede leer. Es exactamente la información que me faltó durante media noche con el rojo de la iGPU, y por eso lo digo sin ironía: esto habría ahorrado una hora.

Lo que no verifiqué: el log de verdad en una máquina con dos adaptadores, porque el test comprueba la función que formatea la elección, no que se escriba en el tracing del proceso.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7367472004 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2948#issuecomment-7367472004). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T04:17:19Z. --- ## VERIFY-2948 — cherry-pick sobre `main` y 716/1, donde el 1 es el rojo de esta máquina **Un fichero, `host.rs` +77, con un conflicto declarado contra `main`.** **Pero el conflicto es de *merge*, no del parche**, así que lo medí como el `AGENTS.md` del repositorio manda: **cherry-pick del commit sobre `origin/main`** — ``` git cherry-pick (sobre 516c9eaab) exit 0, sin conflicto cargo test -p leonida-gpu --lib 716 passed; 1 failed; 59 ignored ``` **El 1 es `descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in`**, **el de la iGPU**, **que en `main` sin esta PR también falla**. **Y 716 contra los 715 de `main` es el test que este PR añade.** **Así que: aplica limpio, no rompe nada, y añade un test.** **Lo que el conflicto de `git merge-tree` decía era cierto y era sobre el otro fichero del mismo tema — `host.rs` también lo toca `#3286`**, **y por eso dos PRs que se llevan bien por separado chocan entre sí.** **Y el cambio es el que más falta hacía en una máquina como esta**: **registra en el log el adaptador que el dispositivo eligió** — **lo que convierte «los tests fallan en mi portátil» en un número que se puede leer.** **Es exactamente la información que me faltó durante media noche con el rojo de la iGPU**, **y por eso lo digo sin ironía: esto habría ahorrado una hora.** **Lo que no verifiqué**: **el log de verdad en una máquina con dos adaptadores**, **porque el test comprueba la función que formatea la elección, no que se escriba en el `tracing` del proceso.**
fiestorra commented 2026-12-03 04:17:36 +00:00 (Migrated from github.com)

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


Corrección de una frase mía en el comentario de arriba: #2948 no tiene conflicto

Escribí «con un conflicto declarado contra main» y era falso. Medido ahora:

git merge-tree --write-tree origin/main refs/remotes/pr/2948    →  limpio

Y el único de los 32 viejos que choca es #2958, no este. Confundí el fichero (host.rs, que también toca #3286) con un conflicto real, y son dos cosas distintas: dos PRs que tocan el mismo fichero chocan entre sí, no con main.

Lo que queda en pie del comentario: el cherry-pick aplica limpio, 716/1, el 1 es el de la iGPU, y el log del adaptador es la información que me faltó media noche.

Lo que se cae: la frase «pero el conflicto es de merge, no del parche» — no había tal conflicto que explicar. Y es el mismo error de forma que cometí con #3209 hace unas horas: describir el fichero que toqué, no el que choca.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7367477654 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2948#issuecomment-7367477654). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T04:17:36Z. --- ## Corrección de una frase mía en el comentario de arriba: **`#2948` no tiene conflicto** **Escribí «con un conflicto declarado contra `main`» y era falso.** **Medido ahora**: ``` git merge-tree --write-tree origin/main refs/remotes/pr/2948 → limpio ``` **Y el único de los 32 viejos que choca es `#2958`, no este.** **Confundí el fichero (`host.rs`, que también toca `#3286`) con un conflicto real, y son dos cosas distintas: dos PRs que tocan el mismo fichero chocan *entre sí*, no con `main`.** **Lo que queda en pie del comentario**: **el cherry-pick aplica limpio, 716/1, el 1 es el de la iGPU, y el log del adaptador es la información que me faltó media noche.** **Lo que se cae**: **la frase «pero el conflicto es de merge, no del parche»** — **no había tal conflicto que explicar.** **Y es el mismo error de forma que cometí con `#3209` hace unas horas: describir el fichero que toqué, no el que choca.**
merzleckeier commented 2026-12-03 04:28:08 +00:00 (Migrated from github.com)

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


Integration check on main 516c9eaa, #2948 5284c6ea, and #3286 8c56cb6b. #2948 merges cleanly with main. With #3286 there is one content conflict in Host::create, in the startup log block just after dsv_size.

I kept #2948’s LUID lookup and structured diagnostic there and #3286’s high-performance selection and fallback earlier in create. The resulting code queries the device’s actual LUID regardless of how its adapter was selected. It passes cargo xwin check -p leonida-gpu --tests for x86_64-pc-windows-msvc with Rust 1.98.1. The Windows test binary’s adapter_details_report_name_class_ids_and_video_memory also passed under Wine.

That was a local integration check with a synthetic descriptor. Adapter selection on hybrid hardware was outside this run. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7367679091 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2948#issuecomment-7367679091). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T04:28:08Z. --- Integration check on `main` `516c9eaa`, #2948 `5284c6ea`, and #3286 `8c56cb6b`. #2948 merges cleanly with `main`. With #3286 there is one content conflict in `Host::create`, in the startup log block just after `dsv_size`. I kept #2948’s LUID lookup and structured diagnostic there and #3286’s high-performance selection and fallback earlier in `create`. The resulting code queries the device’s actual LUID regardless of how its adapter was selected. It passes `cargo xwin check -p leonida-gpu --tests` for `x86_64-pc-windows-msvc` with Rust 1.98.1. The Windows test binary’s `adapter_details_report_name_class_ids_and_video_memory` also passed under Wine. That was a local integration check with a synthetic descriptor. Adapter selection on hybrid hardware was outside this run. 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/2948:upstream-pr/2948'
git switch 'upstream-pr/2948'

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/2948'
git switch 'upstream-pr/2948'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2948'
git switch 'upstream-pr/2948'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2948'
git switch 'main'
git merge --squash 'upstream-pr/2948'
git switch 'main'
git merge --ff-only 'upstream-pr/2948'
git switch 'main'
git merge 'upstream-pr/2948'
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!2948
No description provided.