Skip to content

Commit 136f994

Browse files
authored
[Docs] Update Readme and build instruction docs (microsoft#6185)
This workflow has been around long enough to stop treating it as the "experimental" workflow and just update the documentation to use it. We've gotten numerous issues lately related to problems building, so this will hopefully help. Fixes: microsoft#5762 Related: microsoft#6151
1 parent 3704efb commit 136f994

File tree

2 files changed

+55
-52
lines changed

2 files changed

+55
-52
lines changed

README.md

+1-52
Original file line numberDiff line numberDiff line change
@@ -34,58 +34,7 @@ As an example of community contribution, this project can also target the [SPIR-
3434

3535
## Building Sources
3636

37-
Building DXC requires:
38-
39-
* [Git](http://git-scm.com/downloads).
40-
* [Python](https://www.python.org/downloads/) - version 3.x is required
41-
* [CMake](https://cmake.org/download/) - version >= 3.17.2
42-
* The bundled version with Visual Studio works for Windows.
43-
* The C++ 14 compiler and runtime of your choosing.
44-
* DXC is known to compile with recent versions of GCC, Clang and MSVC.
45-
46-
Building on windows additionally requires:
47-
48-
* [Visual Studio 2019 or later](https://www.visualstudio.com/downloads) - select the following workloads:
49-
* Universal Windows Platform Development
50-
* Desktop Development with C++
51-
* [Windows SDK](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk) - version 10.0.18362.0 or newer
52-
* [Windows Driver Kit](https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk) - same version as the SDK
53-
54-
> A new experimental simplified build and test workflow is documented [here](docs/BuildingAndTestingDXC.rst).
55-
56-
57-
Before you build, you will need to have some additional software installed. This is the most straightforward path - see [Building Sources](https://github.com/microsoft/DirectXShaderCompiler/wiki/Building-Sources) on the Wiki for more options, including Visual Studio 2015 and Ninja support.
58-
59-
* [Git](http://git-scm.com/downloads).
60-
* [Python](https://www.python.org/downloads/) - version 3.x is required
61-
* [Visual Studio 2019](https://www.visualstudio.com/downloads) - select the following workloads:
62-
* Universal Windows Platform Development
63-
* Desktop Development with C++
64-
* [Windows SDK](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk) - version 10.0.18362.0 or newer
65-
* [Windows Driver Kit](https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk) - same version as the SDK
66-
67-
After cloning the project, you can set up a build environment shortcut by double-clicking the `utils\hct\hctshortcut.js` file. This will create a shortcut on your desktop with a default configuration. If your system doesn't have the requisite association for .js files, this may not work. If so, open a cmd window and invoke: `wscript.exe utils\hct\hctshortcut.js`.
68-
69-
Tests are built using the TAEF framework which is included in the Windows Driver Kit.
70-
71-
To build, run this command on the HLSL Console.
72-
73-
hctbuild
74-
75-
You can also run tests with this command.
76-
77-
hcttest
78-
79-
80-
To see a list of additional commands available, run `hcthelp`
81-
82-
## Running Tests
83-
84-
To run tests, open the HLSL Console and run this command after a successful build.
85-
86-
hcttest
87-
88-
Some tests will run shaders and verify their behavior. These tests also involve a driver that can execute these shaders. See the next section on how this should be currently set up.
37+
See the full documentation for [Building and testing DXC](docs/BuildingAndTestingDXC.rst) for detailed instructions.
8938

9039
## Running Shaders
9140

docs/BuildingAndTestingDXC.rst

+54
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,30 @@ generator. In subsequent sections we will describe workflows using Ninja and
2121
Visual Studio. The Ninja workflow should also apply to makefile generators with
2222
minimal adaption.
2323

24+
Prerequisites
25+
-------------
26+
27+
* [Git](http://git-scm.com/downloads).
28+
* [Python](https://www.python.org/downloads/) - version 3.x is required
29+
* [CMake](https://cmake.org/download/) - version >= 3.17.2
30+
* The bundled version with Visual Studio works for Windows.
31+
* The C++ 14 compiler and runtime of your choosing.
32+
* DXC is known to compile with recent versions of GCC, Clang and MSVC.
33+
34+
Building on windows additionally requires:
35+
36+
* [Visual Studio 2019 or later](https://www.visualstudio.com/downloads) - select the following workloads:
37+
* Universal Windows Platform Development
38+
* Desktop Development with C++
39+
* [Windows SDK](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk) - version 10.0.18362.0 or newer
40+
* [Windows Driver Kit](https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk) - same version as the SDK
41+
42+
Note: DXC uses submodules for some external dependencies. You must initialize
43+
the submodules in order to build DXC:
44+
45+
.. code-block:: sh
46+
git submodule update --init --recursive
47+
2448
Basic CMake Usage
2549
-----------------
2650

@@ -149,3 +173,33 @@ four commonly used option prefixes:
149173
code coverage reports. With this setting enabled the
150174
``generate-coverage-report`` target is added to the build which produces a
151175
static HTML page with code coverage analysis results.
176+
177+
Legacy Windows Build Tooling
178+
----------------------------
179+
180+
After cloning the project, you can set up a build environment shortcut by
181+
double-clicking the `utils\hct\hctshortcut.js` file. This will create a shortcut
182+
on your desktop with a default configuration. If your system doesn't have the
183+
requisite association for .js files, this may not work. If so, open a cmd window
184+
and invoke: `wscript.exe utils\hct\hctshortcut.js`.
185+
186+
Tests are built using the TAEF framework which is included in the Windows Driver
187+
Kit.
188+
189+
To build, run this command on the HLSL Console.
190+
191+
.. code-block:: sh
192+
193+
hctbuild
194+
195+
You can also run tests with this command.
196+
197+
.. code-block:: sh
198+
199+
hcttest
200+
201+
Some tests will run shaders and verify their behavior. These tests also involve
202+
a driver that can execute these shaders. See the next section on how this should
203+
be currently set up.
204+
205+
To see a list of additional commands available, run `hcthelp`

0 commit comments

Comments
 (0)