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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] groupshared struct support
        </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>
    Currently, `groupshared` in clang only works on scalars and arrays. If you try to use a struct you run into a number of errors:
```c++
struct S {
    uint4 x;
};

groupshared S a; // error: no matching constructor for initialization of 'groupshared S'
groupshared S b; // error: no matching constructor for initialization of 'groupshared S'

[numthreads(1, 1, 1)]
void main(uint GID : SV_GroupIndex) {
  a = b; // error: no viable overloaded '='
}
```

This issue tracks the work needed to get `groupshared` working for structs.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0k01v2zAMhn8NfSEayPL3wYekRroCvWXYdZBt2dYqSwElZc1-_SAn2zpsOw4g_CGILx-8JIVzajZStlAcoOgSEfxiqe3tbCQlvR2v7WMgksbrK_BHhJLNZMPZLYLkCCVDZXDQwsxojb7iV0uvDq1BNwgtyKEwIwoicXU7fJ7wagN6uqK3GJxEgc5TGPx2TsGgMt6iQBPWXhLaCSWRJQfZHtgeSnaLAfghBtvf008IVfxFRAzK-BzfIIsHUHX3D7Z_B44nFJAdEPgR-PFWBLI9Gour8MOizIyDNTd1SzhZQmWUV0Krb8IrayIb8Oo3TeDVH2X6_1UmRnEwYfULSTE64HUaO_Tj0UDRAdtfrBpxFcoAr6Mz-PTcYWQ4ffr8FFWfzSjfgDc_HRQIWfdP7osSvZZoL5K0FaMcIx5k3R2q6t736Yb5cVEOlXNBoicxvDr0i9wmBY2UUcJbnKX_y3DFS9GkaMzNJbdLxjYbm6wRiWzTqqhKVuV1nSwty-tJNlPD8mnMRJWWU1EMouayn6qyasZEtZzxgjVpmpZpzepdzVKZTXmdN3wq00pCzuQqlN5pfVl3luZkw27Tok5ZlWjRS-22VeH8w8vpBTiPS0NtvP_Qh9lBzrRy3v1S8Mrrbb22hKLD9728j68L57MlnwTS7eL9eZv3zftZ-SX0u8GuwI9R8_56OJP9IgcP_LghOuDHO-Wl5d8DAAD__3mfN5g">