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

Open
github-bot wants to merge 1 commit from github-bot/gh-1369 into main AGit
Owner

@⁠Diegobecker07 on GitHub · 2026-11-24 22:45 UTC · original
Diegobecker07:test-vk-alloc-info-output → main · +20 −3 · 1 files · 1 commits · open

Claimed in the coordination issue as: TEST-VK-ALLOC-INFO-OUTPUT (#14)

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)
**@⁠Diegobecker07** on GitHub · 2026-11-24 22:45 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1369) `Diegobecker07:test-vk-alloc-info-output` → `main` · +20 −3 · 1 files · 1 commits · open Claimed in the coordination issue as: TEST-VK-ALLOC-INFO-OUTPUT (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### 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)
compare_allocation_info printed its mismatch line (stderr) and the line it prints for every compared texture
(stdout) with the same "allocation info <case>:" prefix, so "no allocation info lines" read like a pass criterion
although a run with a host device always prints dozens of the second kind. A mismatch now starts with
"allocation info MISMATCH", as does the Device4/Device8 layout one, and the comparison ends like the other host
comparisons: "GetResourceAllocationInfo against the host on <adapter>: N compared, M mismatches". Test output
only; what is compared and what counts as a mismatch are unchanged.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:49:08 +00:00
Author
Owner

@⁠Diegobecker07 on GitHub · 2026-11-25 13:13 UTC · original

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.

**@⁠Diegobecker07** on GitHub · 2026-11-25 13:13 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1369#issuecomment-7163469330) 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.
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 15:08 UTC · original

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

**@⁠PierreEbele** on GitHub · 2026-11-25 15:08 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1369#issuecomment-7166361527) 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
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1369/head:github-bot/gh-1369'
git switch 'github-bot/gh-1369'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1369'
git switch 'github-bot/gh-1369'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1369'
git switch 'github-bot/gh-1369'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1369'
git switch 'main'
git merge --squash 'github-bot/gh-1369'
git switch 'main'
git merge --ff-only 'github-bot/gh-1369'
git switch 'main'
git merge 'github-bot/gh-1369'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.