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.