[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

Helena Kotas via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 6 10:59:25 PST 2024


================
@@ -5,17 +5,27 @@
 
 StructuredBuffer<float> Buf : register(t10);
 RWStructuredBuffer<float> Buf2 : register(u5, space1);
+AppendStructuredBuffer<float> Buf3 : register(u3);
+ConsumeStructuredBuffer<float> Buf4 : register(u4);
 
-// CHECK: %"class.hlsl::StructuredBuffer" = type { target("dx.RawBuffer", float, 0, 0), float }
-// CHECK: %"class.hlsl::RWStructuredBuffer" = type { target("dx.RawBuffer", float, 1, 0), float }
+// CHECK: %"class.hlsl::StructuredBuffer" = type { target("dx.RawBuffer", float, 0, 0)
----------------
hekota wrote:

The trailing float is a field temporarily added to resource buffer declarations and it is used in a placeholder implementation of the subscript operators. It will go away once llvm/llvm-project#95956 is implemented. I am removing it from the baseline to minimize the test changes when that happens.

https://github.com/llvm/llvm-project/pull/113643


More information about the cfe-commits mailing list