d3d12_vulkan_device_test: an allocation-info mismatch says MISMATCH, and the comparison ends with a count (TEST-VK-ALLOC-INFO-OUTPUT) #1369

Closed
Diegobecker07 wants to merge 1 commit from upstream-pr/1369 into main
Diegobecker07 commented 2026-11-24 22:45:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Diegobecker07 on 2026-11-24T22:45:10Z.


Claimed in the coordination issue as: TEST-VK-ALLOC-INFO-OUTPUT (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7146425273)

What and why

compare_allocation_info in runtime/test/d3d12_vulkan_device_test.cpp printed two kinds of line with the same allocation info <case>: prefix:

  • a mismatch, on stderr: allocation info <case>: ours size … alignment …, host size … alignment …;
  • the informational line for every compared texture, matching or not, on stdout: allocation info <case>: alignment …, size ours … host ….

So "no allocation info lines" reads like a pass criterion (it was given as one in the #375 merge note), although a run with a host device always prints dozens of the second kind: 46 on an RTX 5070 Ti, with 0 mismatches.

This PR changes the test output only:

  • A mismatch line now starts with allocation info MISMATCH, and so does the Device4/Device8 per-resource layout one.
  • The comparison ends like the other host comparisons in this test (FORMAT_INFO on …: … mismatches): GetResourceAllocationInfo against the host on <adapter>: N compared, M mismatches.
  • The function's comment says which line is which.

What is compared and what counts as a mismatch are unchanged. Without a host device the function still returns -1 before printing anything.

Tested

  • scripts\build_runtime.ps1 (MSVC 19.44, VS 2022 Build Tools, CMake 3.31.6 + Ninja, Vulkan SDK 1.4.363.0): builds; no new warning in the changed lines.
  • ctest -R "^d3d12_vulkan_device$" -V: passed (17.6 s). It prints GetResourceAllocationInfo against the host on NVIDIA GeForce RTX 5070 Ti: 153 compared, 0 mismatches, 46 informational lines and no allocation info MISMATCH line. Before this change, on main 51a6074d2, the same machine printed the same 46 informational lines and no mismatch.

GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 621.24, Vulkan 1.4.357, Windows 11 Pro 26300

AI-assisted: yes

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. (n/a: no translator change)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5481585719 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1369). Originally posted by [Diegobecker07](https://github.com/Diegobecker07) on 2026-11-24T22:45:10Z. --- Claimed in the coordination issue as: TEST-VK-ALLOC-INFO-OUTPUT (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7146425273) ### What and why `compare_allocation_info` in `runtime/test/d3d12_vulkan_device_test.cpp` printed two kinds of line with the same `allocation info <case>:` prefix: - a mismatch, on stderr: `allocation info <case>: ours size … alignment …, host size … alignment …`; - the informational line for every compared texture, matching or not, on stdout: `allocation info <case>: alignment …, size ours … host …`. So "no `allocation info` lines" reads like a pass criterion (it was given as one in the #375 merge note), although a run with a host device always prints dozens of the second kind: 46 on an RTX 5070 Ti, with 0 mismatches. This PR changes the test output only: - A mismatch line now starts with `allocation info MISMATCH`, and so does the Device4/Device8 per-resource layout one. - The comparison ends like the other host comparisons in this test (`FORMAT_INFO on …: … mismatches`): `GetResourceAllocationInfo against the host on <adapter>: N compared, M mismatches`. - The function's comment says which line is which. What is compared and what counts as a mismatch are unchanged. Without a host device the function still returns -1 before printing anything. ### Tested - `scripts\build_runtime.ps1` (MSVC 19.44, VS 2022 Build Tools, CMake 3.31.6 + Ninja, Vulkan SDK 1.4.363.0): builds; no new warning in the changed lines. - `ctest -R "^d3d12_vulkan_device$" -V`: passed (17.6 s). It prints `GetResourceAllocationInfo against the host on NVIDIA GeForce RTX 5070 Ti: 153 compared, 0 mismatches`, 46 informational lines and no `allocation info MISMATCH` line. Before this change, on `main` `51a6074d2`, the same machine printed the same 46 informational lines and no mismatch. GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 621.24, Vulkan 1.4.357, Windows 11 Pro 26300 AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] 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. (n/a: no translator change)
Diegobecker07 commented 2026-11-25 13:13:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Diegobecker07 on 2026-11-25T13:13:34Z.


Re-checked against current main (0d80bc5df), which also changed runtime/test/d3d12_vulkan_device_test.cpp. The PR merges cleanly, so I did not rebase it. On the merged tree (full runtime build, Windows 11 Pro 26300, NVIDIA RTX 5070 Ti, driver 621.24), d3d12_vulkan_device passes and prints GetResourceAllocationInfo against the host on NVIDIA GeForce RTX 5070 Ti: 153 compared, 0 mismatches.

The rest of ctest also passed except d3d12_shader_cache. It failed once because two other ctest runs on the same machine used its fixed %TEMP%\leonida_shader_cache_disk_test directory at the same time, and it passes 3/3 alone. This PR does not touch that test.

CI is waiting for workflow approval (first-time contributor).

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7163469330 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1369#issuecomment-7163469330). Originally posted by [Diegobecker07](https://github.com/Diegobecker07) on 2026-11-25T13:13:34Z. --- Re-checked against current main (0d80bc5df), which also changed `runtime/test/d3d12_vulkan_device_test.cpp`. The PR merges cleanly, so I did not rebase it. On the merged tree (full runtime build, Windows 11 Pro 26300, NVIDIA RTX 5070 Ti, driver 621.24), `d3d12_vulkan_device` passes and prints `GetResourceAllocationInfo against the host on NVIDIA GeForce RTX 5070 Ti: 153 compared, 0 mismatches`. The rest of ctest also passed except `d3d12_shader_cache`. It failed once because two other ctest runs on the same machine used its fixed `%TEMP%\leonida_shader_cache_disk_test` directory at the same time, and it passes 3/3 alone. This PR does not touch that test. CI is waiting for workflow approval (first-time contributor). AI-assisted.
PierreEbele commented 2026-11-25 15:08:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T15:08:15Z.


Reviewed 8d14c29: test-output-only change; the test builds only under Windows/MSVC and needs a host D3D12
device, so nothing was executed here. Checked the diff hunk by hunk: create_host_device's adapter-name out-param
already exists on main, every ++compared follows the comparison it counts, the skipped branch is unchanged, the
MISMATCH wording matches the other device tests, nothing greps the old lines, and it merges cleanly into current
main. Nit, no action: a mismatch in the skipped branch counts in the final total but not "compared". No finding.
AI-assisted review.

Recommendation: Merge

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7166361527 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1369#issuecomment-7166361527). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-25T15:08:15Z. --- Reviewed 8d14c29: test-output-only change; the test builds only under Windows/MSVC and needs a host D3D12 device, so nothing was executed here. Checked the diff hunk by hunk: create_host_device's adapter-name out-param already exists on main, every ++compared follows the comparison it counts, the skipped branch is unchanged, the MISMATCH wording matches the other device tests, nothing greps the old lines, and it merges cleanly into current main. Nit, no action: a mismatch in the skipped branch counts in the final total but not "compared". No finding. AI-assisted review. **Recommendation:** Merge
zmasi commented 2026-11-28 23:58:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T23:58:08Z.


Windows 11 + RTX 3090 Verification Report (8d14c29c54 merged onto origin/main a9e247cd69)

  • Merge Status: Clean merge onto origin/main (a9e247cd69) and clean combined merge alongside #732, #1223, #1449, and #2414.
  • Environment: Windows 11 (10.0.26200, x64), MSVC 19.44.35228, NVIDIA GeForce RTX 3090, VK_LAYER_KHRONOS_validation 1.4.363.1 (LEONIDA_VK_VALIDATION=1, VK_VALIDATE_SYNC=1).

Diff Audit (1 file, +20/-3)

  • runtime/test/d3d12_vulkan_device_test.cpp:
    • Prefixes stderr failure lines in compare_allocation_info with allocation info MISMATCH ... so failure lines are unambiguous next to normal stdout allocation info <case>: ... lines.
    • Tracks unsigned compared across every host-compared allocation-info, visible-mask (GetResourceAllocationInfo / Info1 / Info2), multisample quality-level, and Device4/Device8 layout case, and prints a final GetResourceAllocationInfo against the host on <adapter>: <compared> compared, <mismatches> mismatches summary line.

Red -> Green Verification on RTX 3090

  1. Red (origin/main a9e247cd69):
    • d3d12_vulkan_device_test.exe on RTX 3090 (17.02 s, rc=0) printed per-texture allocation info ... lines with 0 summary lines on stdout and lacked MISMATCH in compare_allocation_info's stderr format strings.
  2. Green (#1369 + origin/main):
    • d3d12_vulkan_device_test.exe (/O2 /MD /EHsc /W4 /permissive- /utf-8, 0 new warnings) passed on RTX 3090 (14.96 s, rc=0, 0 VUID- / validation errors) and printed:
      GetResourceAllocationInfo against the host on NVIDIA GeForce RTX 3090: 153 compared, 0 mismatches
    • Combined merge with #732 (d3d12_vulkan_device_test.exe): rc=0 (15.06 s, 153 compared, 0 mismatches, 0 VUID- errors).

Verdict: PASS — ready to merge.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247782153 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1369#issuecomment-7247782153). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T23:58:08Z. --- ### Windows 11 + RTX 3090 Verification Report (`8d14c29c54` merged onto `origin/main` `a9e247cd69`) - **Merge Status**: Clean merge onto `origin/main` (`a9e247cd69`) and clean combined merge alongside `#732`, `#1223`, `#1449`, and `#2414`. - **Environment**: Windows 11 (`10.0.26200`, x64), MSVC `19.44.35228`, NVIDIA GeForce RTX 3090, `VK_LAYER_KHRONOS_validation` `1.4.363.1` (`LEONIDA_VK_VALIDATION=1`, `VK_VALIDATE_SYNC=1`). #### Diff Audit (`1` file, `+20/-3`) - `runtime/test/d3d12_vulkan_device_test.cpp`: - Prefixes `stderr` failure lines in `compare_allocation_info` with `allocation info MISMATCH ...` so failure lines are unambiguous next to normal `stdout` `allocation info <case>: ...` lines. - Tracks `unsigned compared` across every host-compared allocation-info, visible-mask (`GetResourceAllocationInfo` / `Info1` / `Info2`), multisample quality-level, and `Device4`/`Device8` layout case, and prints a final `GetResourceAllocationInfo against the host on <adapter>: <compared> compared, <mismatches> mismatches` summary line. #### Red -> Green Verification on RTX 3090 1. **Red (`origin/main` `a9e247cd69`)**: - `d3d12_vulkan_device_test.exe` on RTX 3090 (`17.02 s`, `rc=0`) printed per-texture `allocation info ...` lines with **`0`** summary lines on `stdout` and lacked `MISMATCH` in `compare_allocation_info`'s `stderr` format strings. 2. **Green (`#1369` + `origin/main`)**: - `d3d12_vulkan_device_test.exe` (`/O2 /MD /EHsc /W4 /permissive- /utf-8`, `0` new warnings) passed on RTX 3090 (`14.96 s`, `rc=0`, **`0` `VUID-` / validation errors**) and printed: `GetResourceAllocationInfo against the host on NVIDIA GeForce RTX 3090: 153 compared, 0 mismatches` - Combined merge with `#732` (`d3d12_vulkan_device_test.exe`): `rc=0` (`15.06 s`, `153 compared, 0 mismatches`, `0` `VUID-` errors). **Verdict**: **PASS** — ready to merge. AI-assisted.
enlight3d commented 2026-11-29 09:04:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T09:04:38Z.


RUN of #1369 (before/after output check, GPU box, merged build)

Heads: PR head 8d14c29c54b9, main 54b2a81e95c4. Tested as main + PR head (git merge --no-ff, local only): merged cleanly, no conflicts.

This PR changes only what d3d12_vulkan_device_test prints, not what it checks, so there is no test that can go red for a bug. What I compared is the test's output with the PR's test file and with main's, in the same merged tree.

Commands (VS 2022 x64 environment, from the worktree root):
cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON
cmake --build runtime/build -j 8 --target d3d12_vulkan_device_test gta6rt
ctest -R "^d3d12_vulkan_device$" -V -j1

  • "Red" (the PR's test file reverted to main's, same build): ctest Passed, 45 allocation info <case>: informational lines, no allocation info MISMATCH line, and no final count line.
  • Green (merged): ctest Passed, the same 45 informational lines, 0 allocation info MISMATCH lines, and the new last line GetResourceAllocationInfo against the host on NVIDIA GeForce RTX 3090: 153 compared, 0 mismatches.
  • So the new output is there and nothing changes in pass/fail; I could not check the MISMATCH wording itself because this GPU has no mismatch to trigger it (that line is only read, not exercised).
  • Link: no new imports vs main (dumpbin /imports of gta6rt.exe, DLL!symbol, sorted: 700 entries on main and on main + PR, identical; the PR only touches a test file).

Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44 (VS 2022 Build Tools), CMake + Ninja, RelWithDebInfo, -DLEONIDA_REQUIRE_VULKAN=ON, Vulkan SDK 1.4.363.1.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7253520444 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1369#issuecomment-7253520444). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T09:04:38Z. --- RUN of #1369 (before/after output check, GPU box, merged build) Heads: PR head `8d14c29c54b9`, main `54b2a81e95c4`. Tested as main + PR head (`git merge --no-ff`, local only): merged cleanly, no conflicts. This PR changes only what `d3d12_vulkan_device_test` prints, not what it checks, so there is no test that can go red for a bug. What I compared is the test's output with the PR's test file and with main's, in the same merged tree. Commands (VS 2022 x64 environment, from the worktree root): `cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON` `cmake --build runtime/build -j 8 --target d3d12_vulkan_device_test gta6rt` `ctest -R "^d3d12_vulkan_device$" -V -j1` - "Red" (the PR's test file reverted to main's, same build): ctest Passed, 45 `allocation info <case>:` informational lines, no `allocation info MISMATCH` line, and no final count line. - Green (merged): ctest Passed, the same 45 informational lines, 0 `allocation info MISMATCH` lines, and the new last line `GetResourceAllocationInfo against the host on NVIDIA GeForce RTX 3090: 153 compared, 0 mismatches`. - So the new output is there and nothing changes in pass/fail; I could not check the MISMATCH wording itself because this GPU has no mismatch to trigger it (that line is only read, not exercised). - Link: no new imports vs main (`dumpbin /imports` of `gta6rt.exe`, DLL!symbol, sorted: 700 entries on main and on main + PR, identical; the PR only touches a test file). Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44 (VS 2022 Build Tools), CMake + Ninja, RelWithDebInfo, `-DLEONIDA_REQUIRE_VULKAN=ON`, Vulkan SDK 1.4.363.1.
aslan2142 commented 2026-12-01 16:35:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:35:04Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317847261 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1369#issuecomment-7317847261). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:35:04Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

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!1369
No description provided.