Commit 62e73db
committed
Refactor: Address review comments for implicit typed buffer counters
This commit addresses review comments on the initial implementation of implicit typed buffer counters. The changes include:
- Refactored `CGHLSLBuiltins.cpp` to move `HandleTy` declaration into the SPIR-V specific block and add an early exit for the DXIL case.
- Updated `CGHLSLRuntime.cpp` to use a `const char *` for `CreateMethodName` to avoid string allocation.
- In `HLSLBuiltinTypeDeclBuilder.cpp`, replaced `if (Record->isCompleteDefinition())` with an assert and added descriptive comments to `addCreateFromBindingWithImplicitCounter` and `addCreateFromImplicitBindingWithImplicitCounter`.
- In `StructuredBuffers-constructors.hlsl`, updated the alignment check to be more specific and re-inserted a removed comment block.
- In `SemaHLSL.cpp`, changed `CreateMethodName` to `const char *`, removed a debug print, moved the re-creation of the binding object into the `else` block, and used `AST.getHLSLAttributedResourceType` for consistency.1 parent 35d1352 commit 62e73db
File tree
5 files changed
+68
-38
lines changed- clang
- lib
- CodeGen
- Sema
- test/CodeGenHLSL/resources
5 files changed
+68
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
357 | 356 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
157 | 155 | | |
158 | 156 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
166 | 161 | | |
167 | 162 | | |
168 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
941 | 956 | | |
942 | 957 | | |
943 | | - | |
944 | | - | |
| 958 | + | |
945 | 959 | | |
946 | 960 | | |
947 | 961 | | |
| |||
971 | 985 | | |
972 | 986 | | |
973 | 987 | | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
974 | 1004 | | |
975 | 1005 | | |
976 | | - | |
977 | | - | |
| 1006 | + | |
978 | 1007 | | |
979 | 1008 | | |
980 | 1009 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3000 | 3000 | | |
3001 | 3001 | | |
3002 | 3002 | | |
3003 | | - | |
| 3003 | + | |
3004 | 3004 | | |
3005 | 3005 | | |
3006 | 3006 | | |
| |||
3813 | 3813 | | |
3814 | 3814 | | |
3815 | 3815 | | |
3816 | | - | |
| 3816 | + | |
3817 | 3817 | | |
3818 | 3818 | | |
3819 | 3819 | | |
3820 | | - | |
3821 | | - | |
| 3820 | + | |
| 3821 | + | |
| 3822 | + | |
3822 | 3823 | | |
3823 | 3824 | | |
3824 | 3825 | | |
| |||
3855 | 3856 | | |
3856 | 3857 | | |
3857 | 3858 | | |
3858 | | - | |
| 3859 | + | |
3859 | 3860 | | |
3860 | 3861 | | |
3861 | 3862 | | |
| |||
3866 | 3867 | | |
3867 | 3868 | | |
3868 | 3869 | | |
3869 | | - | |
3870 | | - | |
3871 | | - | |
3872 | | - | |
3873 | 3870 | | |
3874 | 3871 | | |
3875 | 3872 | | |
| |||
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
80 | 89 | | |
81 | 90 | | |
82 | 91 | | |
| |||
0 commit comments