dxil-reader 0.12.0

DXIL reader: decodes Direct3D Shader Model 6 programs (LLVM bitcode in a DXBC container) to modules, with resource, signature and RDAT reflection records
Documentation
1
2
3
4
5
6
7
8
9
10
11
// dxc: -T ps_6_0 -E main -Fo hints.ps.dxil
// Control flow with hints and loops (the branches that close them carry the attachments dx.controlflow.hints and llvm.loop). Compiled with dxc -T ps_6_0 -E main (hints.ps.dxil).
Texture2D<float4> t : register(t0);
float4 main(float4 p : SV_Position, uint k : K) : SV_Target {
    float4 r = 0;
    [loop] for (uint i = 0; i < k; i++) { r += t.Load(int3(i, 0, 0)); }
    [branch] if (p.x > 1) { r *= 2; }
    [flatten] if (p.y > 1) { r += 3; }
    [unroll(2)] for (uint j = 0; j < 2; j++) { r += j; }
    return r;
}