test: skip host CreateHeap comparison when the host refuses every heap #1721

Closed
kotekompotek wants to merge 1 commit from upstream-pr/1721 into main
kotekompotek commented 2026-11-25 09:35:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-25T09:35:18Z.


Item: TEST-CREATEHEAP-HOST-PROBE — claimed in the coordination issue

d3d12_vulkan_device_test compares the layer's answers with a host D3D12 device. On a GTX 1050 (driver 582.28, Windows 11 24H2) that host runtime answers E_INVALIDARG for every CreateHeap, including the canonical 64 KiB default heap, so:

  • compare_heap_neighbours read each valid-neighbour case as a mismatch (line 7359: heap_mismatches <= 0), and
  • compare_placed_reserved collapsed every placed case to the host's E_UNEXPECTED (line 7371: placed_mismatches <= 0).

A native probe on the same box shows the contrast: the GTX 1050 runtime refuses even the plain default/upload heaps, while Intel UHD 630 and WARP accept them (all three refuse the genuinely-invalid cases like zero-size). So the layer's S_OK answers are right; the host is just not comparable.

Both functions now probe the canonical 64 KiB heap once after create_host_device and return the existing "no host D3D12 device to compare with, skipped" path when the host cannot create one. On a host that can, nothing changes — same comparability-gate shape as windows10_refuses/host_ray_tracing.

AI-assisted.

Tested: d3d12_vulkan_device_test.exe (Debug, MSVC 19.43) on NVIDIA GeForce GTX 1050, driver 582.28, Windows 11 — full run passes; both sections report the skip, and every other host-comparison section (FORMAT_INFO 195 queries, CheckFeatureSupport 32 queries, FORMAT_SUPPORT 97 formats, placed castable formats, proxy semantics) still compares and matches.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5488746799 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1721). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T09:35:18Z. --- Item: TEST-CREATEHEAP-HOST-PROBE — [claimed in the coordination issue](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7158530499) `d3d12_vulkan_device_test` compares the layer's answers with a host D3D12 device. On a GTX 1050 (driver 582.28, Windows 11 24H2) that host runtime answers `E_INVALIDARG` for **every** `CreateHeap`, including the canonical 64 KiB default heap, so: - `compare_heap_neighbours` read each valid-neighbour case as a mismatch (`line 7359: heap_mismatches <= 0`), and - `compare_placed_reserved` collapsed every placed case to the host's `E_UNEXPECTED` (`line 7371: placed_mismatches <= 0`). A native probe on the same box shows the contrast: the GTX 1050 runtime refuses even the plain default/upload heaps, while Intel UHD 630 and WARP accept them (all three refuse the genuinely-invalid cases like zero-size). So the layer's `S_OK` answers are right; the host is just not comparable. Both functions now probe the canonical 64 KiB heap once after `create_host_device` and return the existing "no host D3D12 device to compare with, skipped" path when the host cannot create one. On a host that can, nothing changes — same comparability-gate shape as `windows10_refuses`/`host_ray_tracing`. AI-assisted. Tested: `d3d12_vulkan_device_test.exe` (Debug, MSVC 19.43) on NVIDIA GeForce GTX 1050, driver 582.28, Windows 11 — full run passes; both sections report the skip, and every other host-comparison section (FORMAT_INFO 195 queries, CheckFeatureSupport 32 queries, FORMAT_SUPPORT 97 formats, placed castable formats, proxy semantics) still compares and matches.
potatoe0100 commented 2026-11-25 11:46:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by potatoe0100 on 2026-11-25T11:46:13Z.


Tested 97707b786 merged onto main bcaa13dad (clean), native Windows 11 Pro 26H2 (build 26300), NVIDIA GeForce RTX 4060, driver 621.14, VS 2022 RelWithDebInfo + Ninja (D3D12Core.dll 10.0.26100.9818).

  • A host that can create heaps: d3d12_vulkan_device passes on main and with this PR, so the new probe keeps the comparison on here. Full ctest -j 6: 409 of 409 passed, same as main.

AI-assisted testing (non-developer tester).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7161476224 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1721#issuecomment-7161476224). Originally posted by [potatoe0100](https://github.com/potatoe0100) on 2026-11-25T11:46:13Z. --- Tested `97707b786` merged onto `main` `bcaa13dad` (clean), native Windows 11 Pro 26H2 (build 26300), NVIDIA GeForce RTX 4060, driver 621.14, VS 2022 RelWithDebInfo + Ninja (`D3D12Core.dll` 10.0.26100.9818). - A host that can create heaps: `d3d12_vulkan_device` passes on `main` and with this PR, so the new probe keeps the comparison on here. Full `ctest -j 6`: 409 of 409 passed, same as `main`. AI-assisted testing (non-developer tester).
PierreEbele commented 2026-11-25 18:08:23 +00:00 (Migrated from github.com)

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


Reviewed 97707b78 on arm64 Linux; d3d12_vulkan_device_test needs Windows/MSVC and a live d3d12 host, so it
could not run here - I ran the repo gates plus the probe below instead. Extracted your two sections and their
helpers verbatim from the tree and drove them with mock devices: a healthy host matches everything on both trees
(0 mismatches), and the GTX 1050 of your commit makes main report 9 + 80 false mismatches (two EXPECT failures)
while your guards skip both sections as intended; compare_heap_descs tolerates that host already (0/20) and is
untouched. No findings; two notes: the skip text says "no host D3D12 device" although a host exists, and the
placed_reserved skip is section-wide (the committed/null-heap/reserved cases stop being compared on such a host).
AI-assisted review.
Recommendation: Merge

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7170494090 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1721#issuecomment-7170494090). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-25T18:08:23Z. --- Reviewed 97707b78 on arm64 Linux; d3d12_vulkan_device_test needs Windows/MSVC and a live d3d12 host, so it could not run here - I ran the repo gates plus the probe below instead. Extracted your two sections and their helpers verbatim from the tree and drove them with mock devices: a healthy host matches everything on both trees (0 mismatches), and the GTX 1050 of your commit makes main report 9 + 80 false mismatches (two EXPECT failures) while your guards skip both sections as intended; compare_heap_descs tolerates that host already (0/20) and is untouched. No findings; two notes: the skip text says "no host D3D12 device" although a host exists, and the placed_reserved skip is section-wide (the committed/null-heap/reserved cases stop being compared on such a host). AI-assisted review. **Recommendation:** Merge
zmasi commented 2026-11-29 01:25:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T01:25:54Z.


Windows 11 + MSVC 19.44 + RTX 3090 Verification — PASS (97707b7862)

Verified 97707b7862 merged onto origin/main (5825b02ff8 / 53b77df14f, 0 conflicts) on native Windows 11 (10.0.26200.9974) with MSVC 19.44.35228, NVIDIA GeForce RTX 3090, and VK_LAYER_KHRONOS_validation 1.4.363.1.

Checks Run

  • Native d3d12_vulkan_device_test.exe on NVIDIA GeForce RTX 3090 (LEONIDA_VK_VALIDATION=1):
    • Compiled cleanly (/std:c++20 /O2 /MD /EHsc /W4 /permissive- /utf-8 /bigobj) and passed all checks (rc=0, 0 mismatches, 0 VUID- / validation errors).
  • Red -> Green simulated GTX 1050 CreateHeap refusal (E_INVALIDARG on all host heaps):
    • Forced heap_create(host, ...) to return E_INVALIDARG (including the canonical 64 KiB D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT heap):
      • Red (origin/main): compare_heap_neighbours and compare_placed_reserved reported false mismatches (rc=1).
      • Green (#1721 + origin/main): both compare_heap_neighbours and compare_placed_reserved returned -1 (skipped cleanly, matching compare_heap_descs) and the suite exited 0.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248777760 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1721#issuecomment-7248777760). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T01:25:54Z. --- ## Windows 11 + MSVC `19.44` + RTX 3090 Verification — PASS (`97707b7862`) Verified `97707b7862` merged onto `origin/main` (`5825b02ff8` / `53b77df14f`, `0` conflicts) on native Windows 11 (`10.0.26200.9974`) with MSVC `19.44.35228`, **NVIDIA GeForce RTX 3090**, and `VK_LAYER_KHRONOS_validation` `1.4.363.1`. ### Checks Run - **Native `d3d12_vulkan_device_test.exe` on NVIDIA GeForce RTX 3090 (`LEONIDA_VK_VALIDATION=1`)**: - Compiled cleanly (`/std:c++20 /O2 /MD /EHsc /W4 /permissive- /utf-8 /bigobj`) and passed all checks (`rc=0`, `0` mismatches, `0` `VUID-` / validation errors). - **Red -> Green simulated GTX 1050 `CreateHeap` refusal (`E_INVALIDARG` on all host heaps)**: - Forced `heap_create(host, ...)` to return `E_INVALIDARG` (including the canonical `64 KiB` `D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT` heap): - **Red (`origin/main`)**: `compare_heap_neighbours` and `compare_placed_reserved` reported false mismatches (`rc=1`). - **Green (`#1721 + origin/main`)**: both `compare_heap_neighbours` and `compare_placed_reserved` returned `-1` (skipped cleanly, matching `compare_heap_descs`) and the suite exited **`0`**. AI-assisted.
enlight3d commented 2026-11-29 08:56:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T08:56:52Z.


Validation run of this PR on a Windows PC with a real GPU.

  • PR head: 97707b7862
  • main: 54b2a81e95
  • Tested merged: yes, git merge --no-ff of the PR head into main was clean.

Commands (RelWithDebInfo, Ninja, LEONIDA_REQUIRE_VULKAN=ON):

git fetch origin pull/1721/head:pr-1721
git checkout --detach origin/main && git merge --no-edit --no-ff pr-1721
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$" --output-on-failure -j1
  • Green: d3d12_vulkan_device passed (1/1) on the merged tree.
  • Red: not reproducible here. The PR only changes the test, for a host whose D3D12 runtime refuses every CreateHeap (reported on a GTX 1050). On this RTX 3090 the host accepts heaps, so the new early return is not taken and main's version of the test also passes (same command, test file reverted to main: passed). So this run shows no regression on a host that can CreateHeap; it cannot confirm the skip path.
  • Link: no new imports vs main (dumpbin /imports of gta6rt.exe, 703 DLL!symbol entries, identical to a main build).

Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7253435100 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1721#issuecomment-7253435100). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T08:56:52Z. --- Validation run of this PR on a Windows PC with a real GPU. - PR head: 97707b786262de75161654b1ac6f426fc1440c34 - main: 54b2a81e95c470c953ddee6177fd6255cbaf041d - Tested merged: yes, `git merge --no-ff` of the PR head into main was clean. Commands (RelWithDebInfo, Ninja, `LEONIDA_REQUIRE_VULKAN=ON`): ``` git fetch origin pull/1721/head:pr-1721 git checkout --detach origin/main && git merge --no-edit --no-ff pr-1721 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$" --output-on-failure -j1 ``` - Green: `d3d12_vulkan_device` passed (1/1) on the merged tree. - Red: not reproducible here. The PR only changes the test, for a host whose D3D12 runtime refuses every CreateHeap (reported on a GTX 1050). On this RTX 3090 the host accepts heaps, so the new early return is not taken and main's version of the test also passes (same command, test file reverted to main: passed). So this run shows no regression on a host that can CreateHeap; it cannot confirm the skip path. - Link: no new imports vs main (`dumpbin /imports` of `gta6rt.exe`, 703 DLL!symbol entries, identical to a main build). Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44.
aslan2142 commented 2026-12-01 16:37:37 +00:00 (Migrated from github.com)

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


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:7317918421 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1721#issuecomment-7317918421). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:37:37Z. --- 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!1721
No description provided.