| Issue |
75981
|
| Summary |
[DirectX] Rewrite HLSL resource types/globals to be compatible with DXIL
|
| Labels |
backend:DirectX
|
| Assignees |
bogner
|
| Reporter |
bogner
|
In DXIL, the resource metadata includes a ["Pointer to a global constant symbol with the original shape of resource and element type."(https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst#metadata-resource-records). This is an llvm type like so:
```llvm
%"class.RWBuffer<float>" = type { float }
!... = !{i32 0, %"class.RWBuffer<float>"* undef, !"", i32 0, i32 0, i32 1, i32 10, i1 false, i1 false, i1 false, !7}
```
Note that this type corresponds to something like `template <typename T> struct RWBuffer { T element; };`, but in clang's implementation of HLSL we actually have something more like `template <typename T> struct RWBuffer { T *handle; }`.
In order to generate compatible DXIL, we'll need to translate the resource type to something that looks like the way that DXIL treats these types.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs