diff options
| author | 3gg <3gg@shellblade.net> | 2025-12-02 16:39:36 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2025-12-02 16:39:36 -0800 |
| commit | 6c8ae19be66cee247980a48e736a4e05d14de179 (patch) | |
| tree | d860767907bf0cbe17ec66422e11bea700cf56d9 /contrib/DirectX-Headers/test/test.cpp | |
| parent | 8f594c8ebd11f0e5f8a0c6369c3fe7383d250cbe (diff) | |
Diffstat (limited to 'contrib/DirectX-Headers/test/test.cpp')
| -rw-r--r-- | contrib/DirectX-Headers/test/test.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/contrib/DirectX-Headers/test/test.cpp b/contrib/DirectX-Headers/test/test.cpp deleted file mode 100644 index 8f34d73..0000000 --- a/contrib/DirectX-Headers/test/test.cpp +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | // Copyright (c) Microsoft Corporation. | ||
| 2 | // Licensed under the MIT License. | ||
| 3 | |||
| 4 | #ifndef _WIN32 | ||
| 5 | #include <wsl/winadapter.h> | ||
| 6 | #endif | ||
| 7 | |||
| 8 | #include <directx/d3d12.h> | ||
| 9 | #include <directx/dxcore.h> | ||
| 10 | #include <directx/d3dx12.h> | ||
| 11 | #include "dxguids/dxguids.h" | ||
| 12 | |||
| 13 | int main() | ||
| 14 | { | ||
| 15 | IDXCoreAdapter *adapter = nullptr; | ||
| 16 | ID3D12Device *device = nullptr; | ||
| 17 | |||
| 18 | { | ||
| 19 | IDXCoreAdapterFactory *factory = nullptr; | ||
| 20 | if (FAILED(DXCoreCreateAdapterFactory(&factory))) | ||
| 21 | return -1; | ||
| 22 | |||
| 23 | IDXCoreAdapterList *list = nullptr; | ||
| 24 | if (FAILED(factory->CreateAdapterList(1, &DXCORE_ADAPTER_ATTRIBUTE_D3D12_CORE_COMPUTE, &list))) | ||
| 25 | return -1; | ||
| 26 | |||
| 27 | if (FAILED(list->GetAdapter(0, &adapter))) | ||
| 28 | return -1; | ||
| 29 | } | ||
| 30 | |||
| 31 | return D3D12CreateDevice(adapter, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&device)); | ||
| 32 | } | ||
