Issue 147109
Summary [DirectX] Validation errors: `Pointer type bitcast must be have same size` and `Bitcast on struct types is not allowed`
Labels new issue
Assignees
Reporter Icohedron
    ## The Problem
After resolving #146974, validation errors of the form `Pointer type bitcast must be have same size` and `Bitcast on struct types is not allowed` appear.
There are 16 occurrences of both errors in total, and they all originate from two DML shaders: `OneHot_256_uint16_native_int64_emulated_4` and `OneHot_256_uint16_native_int32_native_4`

## Reproducing the problem
Validate one of the problematic DML shaders mentioned.
```
dxv validation/OneHot_256_uint16_native_int32_native_4.dat
``` 

This minimal shader also reproduces the validation error when validated after being compiled
```hlsl
// compile args: -E CSMain -T cs_6_2 -enable-16bit-types 
RWStructuredBuffer<uint> output;
struct MyStruct {
  uint arr[2];
};
[numthreads(1, 1, 1)]
void CSMain(uint3 Tid: SV_DispatchThreadID) {
  MyStruct s = {Tid.x, 0};
  uint d = s.arr[Tid.y];
  output[0] = d ;
}
```
https://godbolt.org/z/GexqvYc1d




_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to