1bf215546Sopenharmony_ciD3D12
2bf215546Sopenharmony_ci=====
3bf215546Sopenharmony_ci
4bf215546Sopenharmony_ciOverview
5bf215546Sopenharmony_ci--------
6bf215546Sopenharmony_ci
7bf215546Sopenharmony_ciThe D3D12 driver is a Gallium driver that emits API calls for Microsoft's
8bf215546Sopenharmony_ci:abbr:`D3D12 (Direct3D 12)` API instead of targeting a specific GPU
9bf215546Sopenharmony_ciarchitecture. This can be used to get full desktop OpenGL 3.3 support on
10bf215546Sopenharmony_cidevices that only support D3D12.
11bf215546Sopenharmony_ci
12bf215546Sopenharmony_ciDebugging
13bf215546Sopenharmony_ci---------
14bf215546Sopenharmony_ci
15bf215546Sopenharmony_ciThere's a few tools that are useful for debugging D3D12, such as these
16bf215546Sopenharmony_cienvironment variables:
17bf215546Sopenharmony_ci
18bf215546Sopenharmony_ci.. envvar:: D3D12_DEBUG <flags> ("")
19bf215546Sopenharmony_ci
20bf215546Sopenharmony_ci``verbose``
21bf215546Sopenharmony_ci   Enable verbose output to stdout
22bf215546Sopenharmony_ci``blit``
23bf215546Sopenharmony_ci   Trace blit and copy resource calls
24bf215546Sopenharmony_ci``experimental``
25bf215546Sopenharmony_ci   Enable experimental shader models feature
26bf215546Sopenharmony_ci``dxil``
27bf215546Sopenharmony_ci   Dump DXIL during program compile
28bf215546Sopenharmony_ci``disass``
29bf215546Sopenharmony_ci   Dump disassambly of created DXIL shader
30bf215546Sopenharmony_ci``res``
31bf215546Sopenharmony_ci   Debug resources
32bf215546Sopenharmony_ci``debuglayer``
33bf215546Sopenharmony_ci   Enable `debug layer`_
34bf215546Sopenharmony_ci``gpuvalidator``
35bf215546Sopenharmony_ci   Enable `GPU validator`_
36bf215546Sopenharmony_ci
37bf215546Sopenharmony_ci.. envvar:: DXIL_DEBUG <flags> ("")
38bf215546Sopenharmony_ci
39bf215546Sopenharmony_ci``verbose``
40bf215546Sopenharmony_ci   Enable verbose output to stdout
41bf215546Sopenharmony_ci``dump_blob``
42bf215546Sopenharmony_ci   Write shader blobs
43bf215546Sopenharmony_ci``trace``
44bf215546Sopenharmony_ci   Trace instruction conversion
45bf215546Sopenharmony_ci``dump_module``
46bf215546Sopenharmony_ci   dump module tree to stderr
47bf215546Sopenharmony_ci
48bf215546Sopenharmony_ci.. _debug layer: https://docs.microsoft.com/en-us/windows/win32/direct3d12/understanding-the-d3d12-debug-layer
49bf215546Sopenharmony_ci.. _GPU validator: https://docs.microsoft.com/en-us/windows/win32/direct3d12/using-d3d12-debug-layer-gpu-based-validation
50bf215546Sopenharmony_ci
51bf215546Sopenharmony_ciUtilities
52bf215546Sopenharmony_ci---------
53bf215546Sopenharmony_ci
54bf215546Sopenharmony_ciEnvironment variables that control the behavior of the D3D12 driver.
55bf215546Sopenharmony_ci
56bf215546Sopenharmony_ci.. envvar:: MESA_D3D12_DEFAULT_ADAPTER_NAME <string> ("")
57bf215546Sopenharmony_ci
58bf215546Sopenharmony_ciSpecifies a substring to search for when chosing a default adapter to run on. 
59bf215546Sopenharmony_ciThe first adapter matching the substring is chosen. The substring is not
60bf215546Sopenharmony_cicase sensitive.
61bf215546Sopenharmony_ci
62