diff options
| author | tedin7 <tommasoderosa94@gmail.com> | 2026-11-23 17:34:42 +0100 |
|---|---|---|
| committer | tedin7 <tommasoderosa94@gmail.com> | 2026-11-23 17:34:42 +0100 |
| commit | d7451f9d9b0ef8881219979a4a9c538e4939b134 (patch) | |
| tree | f650015b84f22807711c94773a0d5b12f2e4dcbd /runtime/test/device_proxy_test.cpp | |
| parent | aeb253754c1d4fc42a5f4419120cc65047b1465b (diff) | |
test: device_proxy_test expects slot 25 to answer for the cleaned description, the PC device's answer for the console layout word is UINT64_MAX (found by devnull34 on #7110)
Diffstat (limited to 'runtime/test/device_proxy_test.cpp')
| -rw-r--r-- | runtime/test/device_proxy_test.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/test/device_proxy_test.cpp b/runtime/test/device_proxy_test.cpp index 3cf5ff5c0..7e27c6ee8 100644 --- a/runtime/test/device_proxy_test.cpp +++ b/runtime/test/device_proxy_test.cpp | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <wrl/client.h> | 23 | #include <wrl/client.h> |
| 24 | 24 | ||
| 25 | #include "d3d12_trace.h" | 25 | #include "d3d12_trace.h" |
| 26 | #include "d3d12_xs_desc_clean.h" | ||
| 26 | #include "d3d12_xs_device.h" | 27 | #include "d3d12_xs_device.h" |
| 27 | #include "shims.h" | 28 | #include "shims.h" |
| 28 | 29 | ||
| @@ -212,7 +213,10 @@ int main(int argc, char** argv) { | |||
| 212 | const D3D12_RESOURCE_DESC desc = buffer_desc(); | 213 | const D3D12_RESOURCE_DESC desc = buffer_desc(); |
| 213 | D3D12_RESOURCE_ALLOCATION_INFO got{~0ull, ~0ull}; | 214 | D3D12_RESOURCE_ALLOCATION_INFO got{~0ull, ~0ull}; |
| 214 | D3D12_RESOURCE_ALLOCATION_INFO* returned = get_alloc_info(&got, device.Get(), 0, 1, &desc); | 215 | D3D12_RESOURCE_ALLOCATION_INFO* returned = get_alloc_info(&got, device.Get(), 0, 1, &desc); |
| 215 | const D3D12_RESOURCE_ALLOCATION_INFO want = real->GetResourceAllocationInfo(0, 1, &desc); | 216 | // The proxy cleans the console layout word and flag bits before the PC call (stop 16), so the expected answer is |
| 217 | // the PC device's for the cleaned description (the raw 0x101 layout makes WARP answer UINT64_MAX). | ||
| 218 | const D3D12_RESOURCE_DESC clean = rt::d3d12_xs::pc_resource_desc(desc); | ||
| 219 | const D3D12_RESOURCE_ALLOCATION_INFO want = real->GetResourceAllocationInfo(0, 1, &clean); | ||
| 216 | check(returned == &got, "slot 25 returns the caller's buffer in RAX"); | 220 | check(returned == &got, "slot 25 returns the caller's buffer in RAX"); |
| 217 | check(got.SizeInBytes == want.SizeInBytes && got.Alignment == want.Alignment, | 221 | check(got.SizeInBytes == want.SizeInBytes && got.Alignment == want.Alignment, |
| 218 | "slot 25 (C ABI) writes the PC device's GetResourceAllocationInfo into the caller's buffer"); | 222 | "slot 25 (C ABI) writes the PC device's GetResourceAllocationInfo into the caller's buffer"); |