This is a short tutorial on how you can disassemble your HLSL shaders into Intel GPU (aka Gen) assembly using the newly released PIX tool.
I suspect many of these steps will be simpler in the future. If you’re reading this guide long after its publishing date, you can probably ignore most of the steps.
Step 1: Installing PIX
Download the PIX Beta: https://blogs.msdn.microsoft.com/pix/download/
Should be nothing surprising here.
Step 2: Installing Beta GPU Drivers
Install Beta Intel GPU drivers.
First, you must disable automatic driver updates, otherwise Windows will automatically uninstall your Beta drivers. There are instructions how to do this here: http://superuser.com/questions/964475/how-do-i-stop-windows-10-from-updating-my-graphics-driver
- Side note: Disabling driver updates seems to be a really convoluted process. Windows is relentless in trying to stop me from using Beta drivers. It’s annoying, but hopefully this won’t be a problem in the future when mainstream drivers have the required features for PIX.
Next, uninstall your current graphics drivers. Open up the Device Manager, go under “Display adapters”, right click your drivers and choose “Uninstall”.
Next, install the Beta graphics drivers.
- Next, download the Beta Intel GPU drivers from here: https://downloadcenter.intel.com/product/80939/Graphics-Drivers
- Download the zip version of the drivers (not the exe), and unzip them.
- Back in the Device Manager, click “Action>Add legacy hardware”.
- Choose “Install the hardware that I manually select from a list (Advanced)”.
- Choose “Display adapters”.
- Click “Have Disk”.
- In the “Install From Disk” window, click “Browse”.
- Pick the inf file (eg: “igdlh64.inf”) from the “Graphics” folder of the drivers.
- Click “OK”, then pick the GPU model that corresponds to your computer.
- Keep clicking Next until it’s done installing.
Step 3: Disassembly in PIX
Run your program with PIX by setting the executable path and working directory. Unless you have a UWP app, you probably want to “Launch Win32”.
From there, click “Launch”.
Next, press print screen, or click the camera button in PIX, to capture a frame of rendering. Double-click on the small picture of your capture that appears in PIX.
If you see an error popup here, it seems probably because your drivers are not updated enough (or more likely, that Windows automatically reverted your Beta update behind your back.)
Once your capture is open, click on the “Pipeline” tab. Then, click the “Click here to start analysis” text that appears in the window in the bottom half of PIX
Next, click on the “Dispatch” or “Draw” event in the Events window at top left (seen in previous screenshot) for which you are interested in seeing the disassembled shaders. Click on the shader stage you want in the bottom left of the window, then click on “Disassembly” (as below). And voila! Gen assembly for your shader!