Issue 124696
Summary [HLSL] Invalid error reported for `int3` vector with packoffset
Labels HLSL
Assignees
Reporter hekota
    The following code reports `error: packoffset cannot cross register boundary` in Clang while DXC compiles it fine. 

```
cbuffer CB  {
  int2 c : packoffset(c1.y);
};

[numthreads(4,1,1)]
void main() {}
```
https://godbolt.org/z/4as9ebned

The problem is that in Clang the width and alignment of the `int3` type is 128 bits because it must be a power of 2. HLSL seems to align vectors based on the width of a single element.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to