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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Implement resource initialization by constructors
        </td>
    </tr>

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

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

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

<pre>
    1. Add resource constructor for explicit binding to `HLSLExternalSemaSource`.
2. Replace current resource initialization function (in Codegen) with init expression that calls the constructor (in Sema).
3. Update default resource constructor to initialize resource handle to `poison` (needs to happen after # 1, otherwise the initialized handle will get overridden).

Design proposal: llvm/wg-hlsl#197

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8ksFu3CAQhp8GX0axMDbe9cGHbdJVK-XUqA-AYWxoWbBgnE369BXuVttKVW9I_PPPNzO_ytktAXFk8gOTT5XayMY0WvweSVVTNO9jU8PJGEiY45Y0go4hU9o0xQRzTIBvq3faEUwuGBcWoAis55-eX54_vhGmoPwLXtTLXs16XjN-EjV8wdWrYrelhIHu_i44csq7H4pcDDBvQe8PJo4uwGM0uGBgYoCrI7urC0LCnIuKrCLQyvsMZP-G_WVQWJgYCkVbw9fVKEIwOKvN07-HpHhnwrvEqmA83qZdo8sxsJ6XLgHR5PJh1bpiADUTlvYtNEw8QiSL6eoy7oR3a_Pb8uq8hwUJ4ium5IzZ5y3EjJ-esFwM1hTXmJVn7Qm8f70wcb4uD9Znz0TbDAfGT5UZWzO0g6pwbA5d24sDl0Nlx7afxKx408q2kY2WR6mbYZam15Oah26q3Ci4kLzjQnDJ5VBLbDrBj4M-SHM89JJ1HC_K-bq0rmNaKpfzhmPTdo3sKq8m9HnPlBAlCEyIkq40Fv3DtC2Zddy7TPnuQI78nsO9QD7B58vq8fK_bEzvfx4qV1vyoyVaM2tPTJyZOC-O7DbVOpYF3fa0M6wpfkNNTJx38szE-Qb_OoqfAQAA__8-_QiL">