================
@@ -0,0 +1,36 @@
+//===----- hlsl_resources.h - HLSL definitions for resources ----------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _HLSL_HLSL_RESOURCES_H_
+#define _HLSL_HLSL_RESOURCES_H_
+
+namespace hlsl {
+
+#define _HLSL_AVAILABILITY(platform, version)                                  
\
+  __attribute__((availability(platform, introduced = version)))
+
+struct __hlsl_resource_descriptor_heap_struct {
+  __hlsl_heap_resource_info operator[](uint32_t Index) {
+    return __hlsl_heap_resource_info{Index};
+  }
+};
+
+struct __hlsl_sampler_descriptor_heap_struct {
+  __hlsl_heap_sampler_info operator[](uint32_t Index) {
+    return __hlsl_heap_sampler_info{Index};
+  }
+};
----------------
bogner wrote:

These should probably be in a `__detail` namespace rather than introducing 
reserved words in `hlsl::` itself. We can presumably drop `__hlsl_` in that 
case at least though.

https://github.com/llvm/llvm-project/pull/221103
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to