Repository navigation
D3D12: refuse query calls the list type can't hold, and CreateQueryHeap node masks above 1 - #1212
Conversation
…ap node masks above 1
|
Tested be0e227 on Windows 11 with two GPUs on one machine (runtime built from this PR's head, MSVC 14.51): pass. |
|
Tested be0e227 on NVIDIA GeForce RTX 4070 SUPER, driver 621.01, Windows 11 Home 25H2 (26200.9974), VS 2022 Build Tools, Vulkan SDK 1.4.363.1: pass.
AI-assisted. No game files. |
|
Tested be0e227 on AMD Radeon RX 9070 (RDNA4), AMD 26.11.2 + WARP, Windows 11 Pro 26300, MSVC 14.44,
The 15 in the control are the same set as on the RTX 5070:
So AMD's runtime and NVIDIA's agree on every case the test measures. Full AI-assisted (Claude Code). |
- vulkan_backend.h: #1212's query_heap_type locked mutex_, which VulkanContext no longer has; query_pools_ is guarded by resource_mutex_ (add/remove take it unique), so the lookup takes it shared. The runtime didn't build. - test_salu64_bitwise_data (#1207): its wave64 store went through a V# with word3 = 0 (OOB_SELECT 0, stride 0), out of range since #1104; it now uses the raw-buffer word3 the other semantic tests use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Heads-up: The new std::uint32_t query_heap_type(QueryHeapId id) {
std::shared_lock lock(resource_mutex_);
...With only that line changed, on Windows 11 Home, NVIDIA GeForce RTX 4060 Ti, driver 621.24 (32.0.16.2124), Vulkan SDK 1.4.363, MSVC (VS 2022), RelWithDebInfo + Ninja:
So the PR itself looks right; it just needs a rebase onto main with that lock updated. AI-assisted (Claude Code). |
Windows D3D12 refuses several query uses that the Vulkan layer accepted. The new test measures each case against the host runtime on the default adapter and on WARP, and both give the same answers.
NodeMask > 1, because there is only one node. This overlaps Runtime: invalid-argument HRESULTs as the host runtime (D3D-49) #558, which handles node masks for other creation calls.query_allowed(type)helper. Direct lists take any query type, compute and copy lists take only TIMESTAMP, and bundles take none. A refused call makes Close fail, as on the host.invalid_querythere and submits nothing.VulkanContext::query_heap_type(QueryHeapId)provides the lookup. The test checks only our side of these 3 cases; the host's answer for them isn't measured here.New test:
runtime/test/d3d12_query_rules_test.cpp. HRESULT codes are compared only as success or failure, because the layer returns E_INVALIDARG where the host sometimes returns E_FAIL. Pipeline-statistics heaps are left out because the test device doesn't enablepipelineStatisticsQuery.Results (RTX 5070 + WARP, validation on):
AI-assisted.