diff options
| author | kingzzim7-create <275977600+kingzzim7-create@users.noreply.github.com> | 2026-11-23 08:42:50 +0500 |
|---|---|---|
| committer | kingzzim7-create <275977600+kingzzim7-create@users.noreply.github.com> | 2026-11-23 08:42:50 +0500 |
| commit | 0eb3a7698cccdbb5bbad1247b4e527435e942a9b (patch) | |
| tree | 9e00897740a996a02622e7aa155d7c9af55800a3 /runtime/test/device_proxy_test.cpp | |
| parent | d0835dd9f9ec0a88faee510126436f2427854c2e (diff) | |
d3d12_xs: print D3D12XboxCreateDevice's parameter words with --trace-d3d12 too (RT-310)
Diffstat (limited to 'runtime/test/device_proxy_test.cpp')
| -rw-r--r-- | runtime/test/device_proxy_test.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/test/device_proxy_test.cpp b/runtime/test/device_proxy_test.cpp index 70cae9a89..b1f339fff 100644 --- a/runtime/test/device_proxy_test.cpp +++ b/runtime/test/device_proxy_test.cpp | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | #include <wrl/client.h> | 22 | #include <wrl/client.h> |
| 23 | 23 | ||
| 24 | #include "d3d12_trace.h" | ||
| 24 | #include "d3d12_xs_device.h" | 25 | #include "d3d12_xs_device.h" |
| 25 | #include "shims.h" | 26 | #include "shims.h" |
| 26 | 27 | ||
| @@ -107,7 +108,9 @@ bool load_compute_shader(ComPtr<ID3DBlob>& bytecode) { | |||
| 107 | 108 | ||
| 108 | } // namespace | 109 | } // namespace |
| 109 | 110 | ||
| 110 | int main() { | 111 | int main(int argc, char** argv) { |
| 112 | // --trace-d3d12, as gta6rt takes it: device_proxy_trace checks that the parameter words still print then. | ||
| 113 | if (argc == 2 && std::strcmp(argv[1], "--trace-d3d12") == 0) rt::d3d12_trace::set_enabled(true); | ||
| 111 | std::setvbuf(stdout, nullptr, _IONBF, 0); | 114 | std::setvbuf(stdout, nullptr, _IONBF, 0); |
| 112 | std::printf("device_proxy_test: Xbox-ABI device proxy over WARP\n"); | 115 | std::printf("device_proxy_test: Xbox-ABI device proxy over WARP\n"); |
| 113 | 116 | ||
| @@ -132,7 +135,7 @@ int main() { | |||
| 132 | check(create_device != nullptr, "shim registry exposes d3d12_xs!D3D12XboxCreateDevice"); | 135 | check(create_device != nullptr, "shim registry exposes d3d12_xs!D3D12XboxCreateDevice"); |
| 133 | if (!create_device) return 1; | 136 | if (!create_device) return 1; |
| 134 | 137 | ||
| 135 | std::uint32_t params[24] = {}; // logged only; the measured layout is not decoded | 138 | std::uint32_t params[24] = {0x1234abcd}; // logged only, not decoded; word 0 is device_proxy_trace's marker |
| 136 | const IID iid_device = __uuidof(ID3D12Device); | 139 | const IID iid_device = __uuidof(ID3D12Device); |
| 137 | void* created = nullptr; | 140 | void* created = nullptr; |
| 138 | hr = create_device(warp.Get(), params, &iid_device, &created); | 141 | hr = create_device(warp.Get(), params, &iid_device, &created); |