Skip to content

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

Open
Diegobecker07 wants to merge 1 commit into
ProjectLeonida:mainfrom
Diegobecker07:test-vk-alloc-info-output
Open

Diegobecker07 wants to merge 1 commit into
ProjectLeonida:mainfrom
Diegobecker07:test-vk-alloc-info-output

Conversation

@Diegobecker07

Copy link
Copy Markdown

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

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)

…and the comparison ends with a count (TEST-VK-ALLOC-INFO-OUTPUT)

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.
@Diegobecker07

Copy link
Copy Markdown
Author

Re-checked against current main (0d80bc5), 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

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants