17ec681f3SmrgD3D12 27ec681f3Smrg===== 37ec681f3Smrg 47ec681f3SmrgOverview 57ec681f3Smrg-------- 67ec681f3Smrg 77ec681f3SmrgThe D3D12 driver is a Gallium driver that emits API calls for Microsoft's 87ec681f3Smrg:abbr:`D3D12 (Direct3D 12)` API instead of targeting a specific GPU 97ec681f3Smrgarchitecture. This can be used to get full desktop OpenGL 3.3 support on 107ec681f3Smrgdevices that only support D3D12. 117ec681f3Smrg 127ec681f3SmrgDebugging 137ec681f3Smrg--------- 147ec681f3Smrg 157ec681f3SmrgThere's a few tools that are useful for debugging D3D12, such as these 167ec681f3Smrgenvironment variables: 177ec681f3Smrg 187ec681f3Smrg.. envvar:: D3D12_DEBUG <flags> ("") 197ec681f3Smrg 207ec681f3Smrg``verbose`` 217ec681f3Smrg Enable verbose output to stdout 227ec681f3Smrg``blit`` 237ec681f3Smrg Trace blit and copy resource calls 247ec681f3Smrg``experimental`` 257ec681f3Smrg Enable experimental shader models feature 267ec681f3Smrg``dxil`` 277ec681f3Smrg Dump DXIL during program compile 287ec681f3Smrg``disass`` 297ec681f3Smrg Dump disassambly of created DXIL shader 307ec681f3Smrg``res`` 317ec681f3Smrg Debug resources 327ec681f3Smrg``debuglayer`` 337ec681f3Smrg Enable `debug layer`_ 347ec681f3Smrg``gpuvalidator`` 357ec681f3Smrg Enable `GPU validator`_ 367ec681f3Smrg 377ec681f3Smrg.. envvar:: DXIL_DEBUG <flags> ("") 387ec681f3Smrg 397ec681f3Smrg``verbose`` 407ec681f3Smrg Enable verbose output to stdout 417ec681f3Smrg``dump_blob`` 427ec681f3Smrg Write shader blobs 437ec681f3Smrg``trace`` 447ec681f3Smrg Trace instruction conversion 457ec681f3Smrg``dump_module`` 467ec681f3Smrg dump module tree to stderr 477ec681f3Smrg 487ec681f3Smrg.. _debug layer: https://docs.microsoft.com/en-us/windows/win32/direct3d12/understanding-the-d3d12-debug-layer 497ec681f3Smrg.. _GPU validator: https://docs.microsoft.com/en-us/windows/win32/direct3d12/using-d3d12-debug-layer-gpu-based-validation 507ec681f3Smrg 517ec681f3SmrgUtilities 527ec681f3Smrg--------- 537ec681f3Smrg 547ec681f3SmrgEnvironment variables that control the behavior of the D3D12 driver. 557ec681f3Smrg 567ec681f3Smrg.. envvar:: MESA_D3D12_DEFAULT_ADAPTER_NAME <string> ("") 577ec681f3Smrg 587ec681f3SmrgSpecifies a substring to search for when chosing a default adapter to run on. 597ec681f3SmrgThe first adapter matching the substring is chosen. The substring is not 607ec681f3Smrgcase sensitive. 617ec681f3Smrg 62