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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Generate createHandle with all required information
        </td>
    </tr>

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

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

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

<pre>
    
Now llvm.dx.create.handle only have 1 parameter which is missing resource ID and resource INDEX.
It should match the format for createHandle in DXIL except for the opcode parameter.

CreateHandle : dxil_op< "CreateHandle", 57, CreateHandleClass, Resources, "creates the handle to a resource",
  "void;", "ro",
  [
    dxil_param<0, "dx.types.Handle", "", "the handle to the resource">,
    dxil_param<1, "i32",  "opcode",  "DXIL opcode">,
    dxil_param<2, "i8", "resourceClass", "the class of resource to create (SRV, UAV, CBuffer, Sampler)", 1>, // maps to DxilResourceBase::Class
    dxil_param<3, "i32", "rangeId", "range identifier for resource", 1>,
    dxil_param<4, "i32", "index", "zero-based index into range">,
    dxil_param<5, "i1", "nonUniformIndex", "non-uniform resource index", 1>
  ]>;
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFVFFvmzAQ_jXwYhUBhgYeeGiSdo1U9aFVp75NBi7Bm4OZbdp0v35nmzSk6zaBbJ_vfPd9d2fXsn2rgngdxFf38pUI8bKP2kPUKGAGoo71rQAie_FGOvYCJCEDU2wPBhR57XjTEa7JnmvN-x1RoOWoGiCbNcGDM_l-ff0c-SgbQ3QnR9GSPTN43nRAtlKhYCfiA9_6uLwn6-fNHYFDA4PXW3M5NLKFE5LJsx9XcwcBvSLtgYtvcgjoigRpOlejGKQrki_sOFesBNPabj5MDJyA5h6ddiim3BhJ2DtT79EDIfbAi-RtQJdTJJyU_GCTL49L4qE6Wog2nk5gNczbADo6A-2m4-ocjpXmgOj1LN6HIMnkgdOjOyv5BM82XBVOu__yeMTEixnpCc2U1znsxm4RuT01CzLwaUaT4vHhqzV-unLTajlut6Ds8pHtB2GX5eQv8ajw0A3-2FyDtq7WiO1YxSXTgB2BvwfyOQH6R0osA9bvYNN-2CC8hd7wLcfbYJvzvA2OkP4SJ_ssDu9bOJzEX6DkRY2wW-I0OCInF_t_dciPHpOTu172Tz23t21zHgcVF6PXnAoxx-KovLfs2kp0GUKVXF5mNM1oUYRtRduSliw03AiosLFv7x7v0Jh8gR6ULejZ5X7lpiNMCAz4c-TKUfQPAZd9OCpRdcYM2hbMlXSH9mMdNXKPgn2npuliUPI7NAZFfIdGe1dv8iKmSdhVNaV5tqhTgJqxuMUvLUtomkVeN2WSL0LBahDagkWiDi_yzdchr9I4TeMyLeI4KbMiotkCFkVcx_llW8YZDbIY9oyLyL2YUu1CVTk09bjTqBRcG31SYrvxXQ8uLdY_G00nVTW84dTTHzsGoQNfOeS_ATn7r38">