| Issue |
124551
|
| Summary |
[SPIR-V] Handle vector types in HLSL RWBuffers
|
| Labels |
backend:SPIR-V
|
| Assignees |
s-perron
|
| Reporter |
s-perron
|
The representation of a RWBuffer in llvm-ir uses a `spirv.Image` target extension type. That target extension type corresponds exactly with the `OpTypeImage` instruction. The instruction has a sampled type, but it must be a scalar type. The difference between `RWBuffer` with a scalar template and one with a vector template is the result type on the load and the type of the object being stored in a store. See https://godbolt.org/z/b99G474TE for an example with a vector template.
We need to fix the type scavenging for the calls to `@lvm.spv.resource.getpointer`. They currently set the type of the pointer to the scalar type. It would look at the use to determine the type.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs