[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

Helena Kotas via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 8 18:04:18 PST 2024


================
@@ -4883,6 +4882,12 @@ def HLSLRadians : LangBuiltin<"HLSL_LANG"> {
   let Prototype = "void(...)";
 }
 
+def HLSLBufferUpdateCounter : LangBuiltin<"HLSL_LANG"> {
+  let Spellings = ["__builtin_hlsl_buffer_update_counter"];
+  let Attributes = [NoThrow];
+  let Prototype = "uint32_t(...)";
----------------
hekota wrote:

It is overloaded. The intrinsic takes `__hlsl_resource_t` decorated with a resource type attributes and every unique combination of the attributes means a different resource type. And I don't think the attributes can be expressed here anyway even if there was just one overload.

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


More information about the cfe-commits mailing list