<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/145820>145820</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[HLSL][RootSignature] `HLSLRootSignatureParser` should initialize default `flags` values based on version.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
HLSL
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
inbelic
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
inbelic
</td>
</tr>
</table>
<pre>
When adding `RootSignatureVersion` to the compiler options, it was forgotten to also update `setDefaultFlags` [here](https://github.com/llvm/llvm-project/blob/b413bea4355e51e3f3ff248b7d62b4d5d712c743/llvm/include/llvm/Frontend/HLSL/HLSLRootSignature.h#L172), to set the default values of `RootDescriptorFlags` and `DescriptorRangeFlags` dependent on the version.
This requires an update to `RootSignatureParser` to be given the version and initialize accordingly.
AC:
- [ ] Update `RootSignatureParser` to have a `Version` member
- [ ] Use this version member to correctly invoke `setDefaultFlags`
- [ ] Update `setDefaultFlags` to initialize the flags correctly from the updated specs
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUUztv2zAQ_jXUQsSgKVG2Bg1ODKFDhiLpY-bjJLGlSZU8uUh_fUHZjmOkGToR0J2-u-9xMiU7eICWiHvCufUKnNWEcyL2hZxxDLE9fyxUMC_t9xE8lcZYP1BSs6cQ8NkOXuIc4RvEZIMnNaMYKI5AdThM1kGkYUIbfCL8gVqkv2WifYhDQASfe6VLgc6TkQgZNQHuoZezw87JIWVAIu5HiEDEnvDtiDglUu4I7wjvBovjrFY6HAjvnDtenrsphh-gkfBOuaDyU61LBbIqhQCxhrIv-55XW7UxNVeVEWaz5npTlVcc67WbDVw_dDF4BG8I7z49Pj-enxsZViPh5eN6wwlvMmEMNAEuepgTK3qUboZEQ3_RcA9JRzthiK-MpTe5eq08ST_Aa9nABN6ARxr8gn08qb8ibEfY7stoE43wa7YREpX-oi6Gd7Z9ljFBPLumgA72CDeQyyrWW7TS2T9ApdYh5gS4l_O03UN2g-3usk-UiD39-mrmx7NGeQQqc8-b5BzgoCDeYiWgmPlc9jn1ZAgdYgSN7oVafww_P0jPB5v9I2YY3hLNGvS59GZOH8NhKZwENTRNoFNh2tI0ZSMLaNcbwbZNLRpejK1RG6MrKDWrjTSbhldMbZtGN42EbQO6sC1nXLCa14yxRvCVMKzs-xK2va4bpXpSMThI61Y5gasQh8KmNEO7rsSWs8JJBS6d7_cUyeV4Y7vcgJqHRCrmbMJ0RUCLbrn55QexJ-L-xqasE6nZu2hf7UtjmN1NKi7ZJjXrL3Kec65kApNzesloMUfX_vcVL7wT4d2Z-rHlfwMAAP__ewaRvA">