Commit 227a6c0
committed
Fix type annotation serialization for resources in HL modules
This broke for -fcgl when adding resource type annotations in DXIL 1.8. It broke because the dx.types.ResourceProperties type was created by the DxilModule DxilOperations class (hlsl::OP), and the code tried to get this class from the DxilModule, which was nullptr because it was serializing an HLModule, not a DxilModule.
The fix moves dx.types.ResourceProperties type creation to hlsl::resource_helper, which is where it seems to fit best. The local member and accessor in hlsl::OP is left as this will cache the type, as it did before, instead of looking it up by name frequently when for each dxil op. Only the initialization of the hlsl::OP member is changed to use the resource_helper function instead.
Fixes #84401 parent 348fc78 commit 227a6c0
5 files changed
Lines changed: 38 additions & 5 deletions
File tree
- include/dxc/DXIL
- lib/DXIL
- tools/clang/test/CodeGenDXIL/hlsl/functions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1345 | 1345 | | |
1346 | 1346 | | |
1347 | 1347 | | |
1348 | | - | |
1349 | | - | |
| 1348 | + | |
1350 | 1349 | | |
1351 | 1350 | | |
1352 | 1351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4118 | 4118 | | |
4119 | 4119 | | |
4120 | 4120 | | |
4121 | | - | |
4122 | | - | |
4123 | | - | |
| 4121 | + | |
| 4122 | + | |
4124 | 4123 | | |
4125 | 4124 | | |
4126 | 4125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
107 | 119 | | |
108 | 120 | | |
109 | 121 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments