<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/138997>138997</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[DirectX] DXIL container shader flags are incorrect when using native low precision
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:DirectX
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bogner
</td>
</tr>
</table>
<pre>
If we build any shader with `clang-dxc -enable-16bit-types`, we fail the validator.
Given `x.hlsl`:
```hlsl
RWBuffer<half> Out : register(u0);
[numthreads(1,1,1)] void main() {
Out[0] = 0;
}
```
We see:
```
$ clang-dxc -enable-16bit-types -T cs_6_4 -Fo x.o x.hlsl
error: Container part 'Feature Info' does not match expected for module.
Validation failed.
clang-dxc: error: dxv command failed with exit code 1 (use -v to see invocation)
```
This looks like a problem with `NativeLowPrecision` vs `UseNativeLowPrecision` in `DXContainerConstants.def`
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8k92O6yYQx58G34wcYYjt-MIX-WiqlY7aqjrt2bsjDGObLoYIsJN9-wqvN63aqpKRETD_mfnNjAhBDxaxJeWJlJdMzHF0vu3cYNFnnVPv7UsPd4Ru1kaBsO8QRqHQw13HEUhFpRF2yNVDQo5WdAbzoup0zOP7DQOpKGHnZN8LbSCOCIswWono_I7QI6HHH_WCNgk9dqMJJlnwdJ4267ee0uOv305z36Mn_DwK0xP-A_w8RyD8CB4HHSJ6wg4zJawh_JQEypOdpzh6FCoQdigIO2-rIeUFFqcVTEJbwg6ENUDqZAVJlZQnmp4QfgG6qdWXvwf1Efs3hID4j3jTnu3hf7lA_hVk-F5930N-dfDYpbUlit47n9I6OxuFtujhJnwEwuorijh7hBfbO8JqUA4DWBdhElGOgI8byogKeudhcmo2mCD__kFcO7tWAdVG_hlhcvb0qh4LSDdNwqrt-Uep8aEjSKcQCkigA0K-QHSJAGi7OLm6SHD_xenrqAMY594CGP2GIODmXWdwenbRTyLqBb-4-y8epQ5JqKKwhHT3W8D_vtZr31xen6DOzoYobAw7hT2paKZarhreiAzbot5XVbVnrMrGtpNNwcsGS1lK3he4RyUY71Dxvil4VWa6ZZSVtKQHSjll1a6pq6KuVMlE3VdlU5I9xUloszNmmXbOD5kOYca24IemqTMjOjRhnSrGOiHf0CrCjxftUcZXwlgaNt8m47ybh0D21OgQw19yUUezjuWnTXmBy-vLF5DPttgmsTdiCCB8KoN0Pr2G-4gW5qDtAHZlB8bd4fZJL5u9accYbyE1L7sSdh10HOduJ91E2DVFsf3ym3d_oIyEXdcMA2HXLcmlZX8GAAD__4j0Vgo">