Skip to content
Chuck Walbourn edited this page Oct 14, 2024 · 27 revisions

This is a repository for the test suite for DirectX Tool Kit for DirectX 12 on GitHub.

Setup

  • Install git
  • Install and initialize git-LFS
  • Install CMake, Ninja, and MSVC or clang/LLVM for Windows
git clone https://github.com/Microsoft/DirectXTK12.git
cd DirectXTK12
git clone https://github.com/walbourn/directxtk12test.git Tests
git clone https://github.com/Microsoft/DirectXTK12.wiki.git wiki

Optionally some tests can also consume extra test image files from DirectXTex.

git clone https://github.com/walbourn/directxtexmedia.git  (requires git-LFS)

Create an environment variable DIRECTXTEX_MEDIA_PATH to point to the clone of directxtexmedia.

Running tests

CTest is supported

cd DirectXTK12
cmake --preset=x64-Debug
cmake build out\build\x64-Debug
ctest --preset=x64-Debug

Coverage

The BasicAudio and SimpleMath tests are in the DirectX Tool Kit for DirectX 11 Test Suite.

DirectXTK_Tests_Desktop_201x_Win10

This test covers the DirectX 12 graphics components for Windows desktop (aka Windows classic) on Windows 10 along with input and audio.

DirectXTK_Tests_Windows10

This covers the DirectX 12 graphics components for Universal Windows Platform (UWP) apps along with input and audio.

When run on UWP on Xbox One, you must have Game Mode enabled for DirectX 12 to work correctly (otherwise on a development machine it will fall back to WARP12, and on a retail machine it will fail to run at all). It's recommended you set the option Treat UWP apps as games by default in the Device Portal for your development & testing Xbox One consoles. See this blog post for more information.

Xbox

This repo does contains the Xbox One XDK / Game Development Kit (GDK) test artifacts, but building them requires access to the XDK / GDK.

They are built using individual x_XboxOneXDK_201x.sln / x_GXDK_201x.sln solutions.

Command line options

The PC versions of the test suite support the following command-line switches:

  • -forcewarp Forces the use of the WARP12 software device. Normally this only gets used as a fallback if no hardware is found.

Note that WARP12 is only available on Developer Systems with the Windows 10 Graphics Tools optional feature enabled. It's not supported for retail systems.

  • -minpower When run on Windows 10 April 2018 Update (Version 1803) and built using VS 2017 (15.7 update) with the Windows 10 SDK (17134), the test suite will prefer the use of DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE devices by default. If this switch is provided, then it will prefer the use of DXGI_GPU_PREFERENCE_MINIMUM_POWER instead. This primarily impacts hybrid graphics systems to force selection between AMD/NVIDIA discrete vs. Intel integrated devices.

  • -adapter:n Forces the use of a particular adapter at index n (0-based). If the adapter index is invalid, you'll end up with WARP12 if it's available.

Cleanup

The UWP tests are all deployed for testing, and will remain on your system until they are uninstalled. To remove them, you can use the following PowerShell script:

$directxtk12tests = @(
"1a6f4dda-154e-454c-804d-3c415bb007f0",
"a87d6952-750e-443e-9862-1e6199009116",
"79b4320b-4ee4-4f6d-8744-635cc277854a",
"9adc30a6-2c8b-4aa5-8fa2-ea38daaab77b",
"26f04fce-0939-4a02-9e7e-d5311d51d842",
"524cf67a-b0e8-4f0f-986c-427cea55db59",
"cf525cb2-6b84-40ad-b8af-9ca6ce6c7650",
"a5fc16db-e6d1-49af-9cad-7c97c0c46449",
"dfb8069a-cead-4f73-8750-bd81e4b65ea5",
"fda1cc39-3005-4512-ab08-ed383869d808",
"39f480b4-a3c3-41ae-a506-d5232215b9db",
"bc65c826-264c-40fa-af7f-5ee9d35cf5b5",
"d67e2c4d-6f17-4211-a433-7879ad7be0c3",
"ac3d2d4b-e01a-46f9-8db9-30236784b9a0",
"1675c2a1-d1e8-4225-8dd5-4fc4b263c342",
"e557f50d-3031-4040-9873-d183b71dd215",
"f6a1b043-9f2a-4511-bd10-daa4398be85f",
"3d3b3052-30c0-4e30-ae55-fab0179eb0ef",
"3f669d8c-b221-4612-abc3-61183c2fb353"
)
$directxtk12tests | % { Get-AppxPackage -Name $_ } | Remove-AppxPackage