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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Calculate implicit resource binding information
        </td>
    </tr>

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

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

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

<pre>
    This is the implicit bindings part of the bindings approach originally described in #58051, and is a follow up to #110719.

We need to handle implicit bindings in step 3 of #110719's binding handling, as part of `SemaHLSL::handleBindings`.

There are two approaches to this:
1. Mark the bindings as "implicit" and calculate their actual locations later in the compiler
2. Fill out the bindings as we go.

Approach (2) would be a departure from DXC. There is some discussion of this starting in https://github.com/llvm/llvm-project/issues/58051#issuecomment-2239952237 but we need to discuss this in further detail if we want to pursue it. We would probably need to do some reachability analysis if we wanted to do this.

Some parts of approach (1) are probably necessary regardless of whether we adopt approach (2), because explicitly unbound resources exist in library shaders.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVDuP4zYQ_jV0MzhDpC0_ChV7uzBSXKo94NIOyZE0CUUKfJzP_z6g_Nh1kiqNDVDD7zUzxJR48ESdaL-K9m2FJY8hdjoMnuJKB3vpvo-cgBPkkYCn2bHhDJq9ZT8kmDFmCP3y9XGI8xwDmhFC5IE9OncBS8lE1mSBPQi1aQ9NK4V6BfS2wiP0wblwhjJDDrVCymYvj2vRvInm5fr7g8AT2VoworfuvxSxh5Rphk2V9YARap_uNde77IeF_sOD2DXvNOFv396_ic2L2LxcOb7ekMWueRLzfaRIgJEgn8PDM6WqLo-cKsZSKNfwO8a__pFRAqHUXb5QagnCoDPFYaZazBHQ5IIOXDCYOfgE9VusHiuYCdPMjuKVRq3hxM5BKPlfVGeCITypf7n3SKiDEuoI51CcBU2AYKlGUiJBH8MEb3-8ruHqlhOkMBFYTqakxMFfm1_PM8Zc02UPY87z4l-dhDoNnMei1yZMQp2c-3n_-zLH8CeZLNSJUyqUhDrdxmKzHJgwTeTzF6U2x2Or1GYPuuRq5j4FNx1XBeyhLzGPFMFSRnbAfS0-o8-1eC4xFQLOa_hBN79zDBq1u3wghqvDSGhG1Ow4XwA9ukuqFA_AR3Wlfkr2vV6vAaaaDX7KWdac68B8YjWUEsYLRBowWkdpuXUeafFxJkAb5vwEU9tVR1eTwZII6Nd1iNwFiteheAuRUijRUAL6xSnXaBzrWInSiJbis-SV7Tb2uDniijq5V_tDc5TNbjV22JJulWzMtt8r1eK-RWUOspdSW6n77Yo71aitbBopD-1B7dbS6ANtZbvdHkn3u73YNjQhu3Xt-DrEYbW0tqtrqdTKoSaXludHqWXzlKoPUeyWCdFlSGLbOE45fSBkzm55spYL7Ru8Ptbm8R7cE3gsPfs-xGlZo1WJrvv_M3qT_rNTfwcAAP__rhy-JA">