diff options
| author | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 23:21:41 +0100 |
|---|---|---|
| committer | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 23:21:41 +0100 |
| commit | 3986b50821272791333c00df80bdb8526a8fdb9c (patch) | |
| tree | eef468ac670636d2736815da64982834b289ee84 /runtime/test/d3d12_query_rules_test.cpp | |
| parent | dd0abd45b33e77b887e8f910a0a74f8cb5b0a32a (diff) | |
| parent | aa2988cc555bad7ecd508b48a702adbb32fe7c95 (diff) | |
Merge main into hw4-ps-oracle (#3061)
docs/shader_validation.md
AI-assisted.
Diffstat (limited to 'runtime/test/d3d12_query_rules_test.cpp')
| -rw-r--r-- | runtime/test/d3d12_query_rules_test.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/test/d3d12_query_rules_test.cpp b/runtime/test/d3d12_query_rules_test.cpp index f50536b6f..6d51ab704 100644 --- a/runtime/test/d3d12_query_rules_test.cpp +++ b/runtime/test/d3d12_query_rules_test.cpp | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | // Query heaps and query calls on the Vulkan-backed device against Windows D3D12 (the default adapter and WARP): | 1 | // Query heaps and query calls on the Vulkan-backed device against Windows D3D12 (the layer's own adapter and WARP): |
| 2 | // CreateQueryHeap results by type, count and node mask, Close() results of lists that use queries on each list type, | 2 | // CreateQueryHeap results by type, count and node mask, Close() results of lists that use queries on each list type, |
| 3 | // and timestamps resolved on direct, compute and copy queues (pipeline statistics heaps are left out: the test | 3 | // and timestamps resolved on direct, compute and copy queues (pipeline statistics heaps are left out: the test |
| 4 | // device does not enable pipelineStatisticsQuery). No game data or shaders. Run explicitly (needs Vulkan | 4 | // device does not enable pipelineStatisticsQuery). No game data or shaders. Run explicitly (needs Vulkan |
| 5 | // hardware); LEONIDA_VK_VALIDATION=1 checks Vulkan usage. | 5 | // hardware); LEONIDA_VK_VALIDATION=1 checks Vulkan usage. |
| 6 | #include "vk_test_device.h" | 6 | #include "vk_test_device.h" |
| 7 | #include "host_adapter.h" | ||
| 7 | #include "host_wine.h" | 8 | #include "host_wine.h" |
| 8 | #include "../shims/d3d12_com.h" | 9 | #include "../shims/d3d12_com.h" |
| 9 | #include <dxgi1_4.h> | 10 | #include <dxgi1_4.h> |
| @@ -289,14 +290,15 @@ int main() { | |||
| 289 | if (hostwine::host_is_wine()) break; | 290 | if (hostwine::host_is_wine()) break; |
| 290 | Ref<IDXGIAdapter> adapter; | 291 | Ref<IDXGIAdapter> adapter; |
| 291 | Ref<ID3D12Device> host; | 292 | Ref<ID3D12Device> host; |
| 292 | if (warp && FAILED(factory->EnumWarpAdapter(IID_PPV_ARGS(&adapter.p)))) continue; | 293 | std::string adapter_name; |
| 294 | if (!hostadapter::reference(factory.p, vk, warp, &adapter.p, adapter_name)) continue; | ||
| 293 | if (FAILED(D3D12CreateDevice(adapter.p, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&host.p)))) continue; | 295 | if (FAILED(D3D12CreateDevice(adapter.p, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&host.p)))) continue; |
| 294 | const auto a = lines(mine), b = lines(all_cases(host.p)); | 296 | const auto a = lines(mine), b = lines(all_cases(host.p)); |
| 295 | for (size_t i = 0; i < a.size() || i < b.size(); ++i) { | 297 | for (size_t i = 0; i < a.size() || i < b.size(); ++i) { |
| 296 | const std::string x = i < a.size() ? a[i] : "", y = i < b.size() ? b[i] : ""; | 298 | const std::string x = i < a.size() ? a[i] : "", y = i < b.size() ? b[i] : ""; |
| 297 | if (x != y) { | 299 | if (x != y) { |
| 298 | ++differ; | 300 | ++differ; |
| 299 | std::printf("[%s] ours: %s | host: %s\n", warp ? "WARP" : "GPU", x.c_str(), y.c_str()); | 301 | std::printf("[%s] ours: %s | host: %s\n", adapter_name.c_str(), x.c_str(), y.c_str()); |
| 300 | } else if (!warp) { | 302 | } else if (!warp) { |
| 301 | std::printf("same: %s\n", x.c_str()); | 303 | std::printf("same: %s\n", x.c_str()); |
| 302 | } | 304 | } |