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

    <tr>
        <th>Summary</th>
        <td>
            [DirectX] Missing verifications of elements
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:DirectX
      </td>
    </tr>

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

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

<pre>
    This issue tracks resolving some discrepancies in verification during `validate` in `DXILRootSignature.cpp`.

Namely,
- `verifyDescriptorFlag` and `verifyDescriptorRangeFlag` should be updated to reflect https://github.com/llvm/wg-hlsl/pull/297
- There is currently no verification that `numDescriptors > 0` which should be added to be compliant with DXC: https://github.com/microsoft/DirectXShaderCompiler/blob/4fcf67f78f7d6ffd286316112694a3ae000860e2/lib/DxilRootSignature/DxilRootSignatureValidator.cpp#L197.

AC:
- [ ] Update `verifyDescriptorFlag` and `verifyDescriptorRangeFlag` such that they correctly reflect the validations documented
- [ ] Add `verifyNumDescriptors` to the validation of `DescriptorRange`s
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyklE1v5CgQhn8NvqC0MP4--ODEa2mlbA5JdpUrhrJhg8EC3Jn-9yPcnUl6FM0c5oSE6-Oh3rfMvFezAWhRcYsoVWYErTiiFBV9wrYgrWsvl8loxal9lspj5f0GODjGXz124K0-KjNjbxfAQnnuYGWGK_BYGXwEpybFWVDWYLG5GIlKcmRaCRYAlSRGoZL0L3_fP1obntRsWNgcHPi6opIcEOkQ6R7YAvqE6B0i3c1eIRY-9eC5U2uwbtBsjtWYEV99fmRmhvcYL-2mBR4Bb2ukEDhY7GDSwAOWIaweZR2iA6LDrILcxgO3C6KD1sd4vM03UnuN6LBuOh60qXasZwkOsPKYb86BCfqEjb0eQZAsRD6zLR9wHqPsL0wi2ptUXH4CZEKc8UbA3C6rVswE_KaCxP3LHcq6X_Euijvr7RQQHXrlgIeXJ8kEuDu7rEqDQ3QYtR0RHfKJT2U1VfVUiXKaBK3LLC3TlJZNzjIGhJC6JEDjFFRM6L8pfaXXV3f_nWW2bheTZvdpU10E7SL8WcziFqOix__uWvyxthuX5ykHCSfMrYvv1qcf-gYJ-GI_ZY3HwvJtARNAXNF04lOvhyu1YptgfyqE7bTb-JoKlcQnos1EkzUsgTatirQsGtrkiWyLuq7SPCtIno88oyWIvCCUiZqyvGB8SlRLCS1IRXJKSJrlh3yivKaQNfU4Vg2tUU5gYUofojMP1s3JvpxtmlcpqRLNRtD-st0j469gBMq6ixUue-7amHwzbrNHOdHKB_9RLqig99_De07R43-U93GNP_vax-eDhjhIn2xOt79fo73t6uz_wKNBd3KP6HCBP7b0ewAAAP__lc2Ibw">