<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/90129>90129</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [HLSL][DirectX] Compile a runnable shader from clang
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            HLSL
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          damyanp
      </td>
    </tr>
</table>

<pre>
    This is a milestone on the way to getting full HLSL support in Clang.  

For this milestone we need to be able to compile a simple compute shader such that the resulting DXBC container can pass validation and be signed by the DXC validator and can therefore be executed on a non-developer mode Windows desktop PC. The shader compiler binary should come from some kind of nightly build, rather than building locally.

[Sample shader](https://godbolt.org/z/TGKKbEabb)

```hlsl
RWBuffer<int> In;
RWBuffer<int> Out;

[numthreads(8,1,1)]
void main(uint GI : SV_GroupIndex) {
  Out[GI] = In[GI] * In[GI];
}
```

# Work

The work items listed here are expected to be _fully_ completed - even if that means doing more than the bare minimum required to pass this milestone.

> For now, just filling this in with notes, later turn into links to the real issues
 
- [ ] #68006 (resources)
- [ ] #88774 (dx.version metadata)
- [ ] #88778 (generate ISG1, OSG1, PSV0 container parts)
- [ ] Build a demo app that executes this shader
- [ ] Set up nightly build that stores artifacts
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0VNtu2zgQ_Rr6ZRBDpqRIetCDL3E2aIEW66DJW0CJY4sNRWp5seP9-sVIapp2dwEbEqmZM7czR3ivTgaxZvmG5buFiKGzrpaivwozLBorr_VjpzwoDwJ6pdEHaxCsgdAhXMQVgoUThqDMCY5Ra_jj8-Ez-DgM1gVQBrZamNMSgCVrlqz31kEgwJ9YFwSDKAmoQRCNRnptbT8ojSDAq37QOF7EgOA7IdGBj20HoRNhTMShj3rMYfe82UJrTRDKoINWGBiE93AWWkkRlDUgjKRIY-USmuuIsHve_rCxbjQh19Chw6N1SA74hm0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