diff options
| author | Kevin Morales <32549527+kmorales13@users.noreply.github.com> | 2026-11-22 14:17:49 -0700 |
|---|---|---|
| committer | Kevin Morales <32549527+kmorales13@users.noreply.github.com> | 2026-11-22 20:40:59 -0700 |
| commit | b136ee4680c4a04c44653da4325d83cee130fbfe (patch) | |
| tree | 1b47a7d388f66c31e26d5208cb0102bc91e7577e /runtime/test/d3d12_method_variants_test.cpp | |
| parent | 7b7d73f890f9fbbf5967bbb694390bbc99e33ba6 (diff) | |
Tests: check Microsoft's recorded answers where Wine and Proton have no reference
Under Wine the host D3D12 is vkd3d and under Proton vkd3d-proton, and
Proton's EnumWarpAdapter returns the hardware adapter, so the host and
WARP references six tests compare with are not Microsoft's runtime:
d3d12_r9g9b9e5_uav, d3d12_method_variants and d3d12_sampler2 fail under
Proton (the last two crash inside vkd3d-proton), d3d12_fence_timing and
d3d12_subresource_copy under both, d3d12_private_data under Wine.
The six skip the host comparison there with hostwine::host_is_wine() and
check the layer against Microsoft's answers recorded in the test instead,
so Wine and Proton still check values. d3d12_r9g9b9e5_uav gets WARP's
words for its six clear cases, from the packing rule in
docs/d3d12_vulkan.md. d3d12_subresource_copy and d3d12_private_data get
answer tables, taken from the records that Windows runs on NVIDIA and AMD
compared with Microsoft's runtime with no mismatches; LEONIDA_D3D49_DUMP=1
prints the host's record on Windows to regenerate them. The other three
already had recorded answers. Windows still compares with the live
runtime too.
Diffstat (limited to 'runtime/test/d3d12_method_variants_test.cpp')
| -rw-r--r-- | runtime/test/d3d12_method_variants_test.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/test/d3d12_method_variants_test.cpp b/runtime/test/d3d12_method_variants_test.cpp index d1b8edf4a..fcb19ec80 100644 --- a/runtime/test/d3d12_method_variants_test.cpp +++ b/runtime/test/d3d12_method_variants_test.cpp | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | // a D3D12 device. A texture from CreateCommittedResource3 goes through an upload, a copy and a readback on a queue | 7 | // a D3D12 device. A texture from CreateCommittedResource3 goes through an upload, a copy and a readback on a queue |
| 8 | // from CreateCommandQueue1. No shaders or game data. Set LEONIDA_VK_VALIDATION=1 to run under VK_LAYER_KHRONOS_validation; any validation error fails. | 8 | // from CreateCommandQueue1. No shaders or game data. Set LEONIDA_VK_VALIDATION=1 to run under VK_LAYER_KHRONOS_validation; any validation error fails. |
| 9 | #include "vk_test_device.h" | 9 | #include "vk_test_device.h" |
| 10 | #include "host_wine.h" | ||
| 10 | #include "../shims/d3d12_com.h" | 11 | #include "../shims/d3d12_com.h" |
| 11 | 12 | ||
| 12 | #include <cstdint> | 13 | #include <cstdint> |
| @@ -533,8 +534,8 @@ int main() { | |||
| 533 | reinterpret_cast<void*>(GetProcAddress(d3d12, "D3D12CreateDevice"))) | 534 | reinterpret_cast<void*>(GetProcAddress(d3d12, "D3D12CreateDevice"))) |
| 534 | : nullptr; | 535 | : nullptr; |
| 535 | Ref<ID3D12Device10> host; | 536 | Ref<ID3D12Device10> host; |
| 536 | const bool have_host = | 537 | const bool have_host = create_host && !hostwine::host_is_wine() && |
| 537 | create_host && SUCCEEDED(create_host(nullptr, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&host.p))); | 538 | SUCCEEDED(create_host(nullptr, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&host.p))); |
| 538 | Ref<ID3D12Device> standalone_base; | 539 | Ref<ID3D12Device> standalone_base; |
| 539 | Ref<ID3D12Device10> standalone_device; | 540 | Ref<ID3D12Device10> standalone_device; |
| 540 | EXPECT(SUCCEEDED(rt::d3d12::create_vulkan_device_standalone(IID_PPV_ARGS(&standalone_base.p)))); | 541 | EXPECT(SUCCEEDED(rt::d3d12::create_vulkan_device_standalone(IID_PPV_ARGS(&standalone_base.p)))); |