When debugging shaders it can be helpful to be able to read HLSL assembly. There are three steps of code for a HLSL shader.

    • HLSL: The code you write in HLSL form.

    • DXBC: The DirectX bytecode generated by the directx shader compiler from the HLSL. It can be shown as HLSL assembly.

    • ISA: The DXBC code compiled by the GPU to it's instruction set architecture. This is what runs on the GPU in the end.




Shaders use registers to work on data. The register has names in the form of a tag (a single letter) and a number. The tag is the type of the register that limit what they can contain and how they can be used. The number start at 0 and go up to a shader model dependent required minimum number. Dimension is how many elements each register contain. Each register use need to be declared with a dcl statement before the instructions.