Issue |
145438
|
Summary |
[DirectX] RootSignature's `v2::DescriptorRange` is misordered
|
Labels |
backend:DirectX
|
Assignees |
|
Reporter |
bogner
|
We currently have the `v2::DescriptorRange` inherit from the `v1::DescriptorRange` and add a `Flags` field, but this is incorrect. In both the 1.0 and 1.1 root signature formats, the `OffsetInDescriptorsFromTableStart` comes last. That is, `v1::DescriptorRange` is laid out as follows:
```c++
struct DescriptorRange {
uint32_t RangeType;
uint32_t NumDescriptors;
uint32_t BaseShaderRegister;
uint32_t RegisterSpace;
uint32_t OffsetInDescriptorsFromTableStart;
};
```
This matches what we have today, but `v2::DescriptorRange` is laid out like so:
```c++
struct DescriptorRange {
uint32_t RangeType;
uint32_t NumDescriptors;
uint32_t BaseShaderRegister;
uint32_t RegisterSpace;
uint32_t Flags;
uint32_t OffsetInDescriptorsFromTableStart;
};
```
This *does not* match what we have today, as we have the `OffsetInDescriptorsFromTableStart` and `Flags` fields reversed. This causes obvious issues when we feed shaders that have root signatures with descriptor ranges into any driver.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs