| Issue |
166458
|
| Summary |
[HLSL] Static resources should be assignable
|
| Labels |
HLSL
|
| Assignees |
hekota
|
| Reporter |
hekota
|
It should be possible to assign a resource instance into a static resource variable.
Clang currently reports `error: assignment to global resource variable 'R' is not allowed`.
DXC compiles this fine.
```
RWStructuredBuffer<float> Array[4][2] : register(u10, space6);
RWStructuredBuffer<float> B : register(u1, space5);
static RWStructuredBuffer<float> Mine;
[numthreads(4,1,1)]
void main(uint GI : SV_GroupIndex) {
static RWStructuredBuffer<float> MineToo;
Mine = Array[2][0];
MineToo = B;
Mine[0] = 123;
MineToo[0] = 456;
}
```
https://godbolt.org/z/cd9EG98nM
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs