UsingDxc.rst 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ============================
  2. Using DirectX Compiler Tools
  3. ============================
  4. .. contents::
  5. :local:
  6. Introduction
  7. ============
  8. The HLSL on LLVM project provides a number of tools to create and manipulate
  9. DirectX shader programs.
  10. After building the project, the tools described are available under the
  11. Debug\bin or Release\bin subdirectories under the build target directory.
  12. Tools
  13. =====
  14. dxc.exe
  15. This command-line tool is a replacement for fxc, and accepts the same
  16. command-line switches.
  17. dndxc.exe
  18. This tool provides a GUI to compile HLSL programs and examine details of
  19. compilation, including the output assembly, the container structure, and
  20. the optimizer stages run.
  21. dxexp.exe
  22. This command-line tool checks whether the current setup is able to run
  23. experimental shaders, that is, shaders that use a driver's experimental
  24. shader support or that are not properly validated.
  25. dxa.exe
  26. This command-line tool provides a number of options to
  27. assemble/disassemble a shader.
  28. dxr.exe
  29. This command-line tool allows a shader file to be rewritten in a
  30. consistent style, and optionally trim unused declarations.
  31. Running Experimental Shaders
  32. ============================
  33. To run experimental shaders in a process, the following conditions must be
  34. met:
  35. - A recent flight of Windows must be used.
  36. - The 'Use developer features' must be set to 'Developer mode' in the 'For
  37. developers' page of Settings.
  38. - For a 64-bit OS, the process should be a 64-bit process. This will be fixed
  39. to support 32-bit processes on a 64-bit OS.
  40. - The process must call D3D12EnableExperimentalFeatures to enable the
  41. D3D12ExperimentalShaderModelsID setting. The ExecutionTest.cpp file under
  42. tools\clang\unittests\HLSL\ExecutionTest.cpp has an example of how this can
  43. be done.
  44. - The API used must be D3D12.