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