diff --git a/src/ComputeSharp/Core/Attributes/GeneratedComputeShaderDescriptorAttribute.cs b/src/ComputeSharp/Core/Attributes/GeneratedComputeShaderDescriptorAttribute.cs new file mode 100644 index 00000000..f92c1fe2 --- /dev/null +++ b/src/ComputeSharp/Core/Attributes/GeneratedComputeShaderDescriptorAttribute.cs @@ -0,0 +1,27 @@ +using System; + +namespace ComputeSharp; + +/// +/// An attribute that indicates that a given compute shader should have its associated descriptor code being generated. +/// +/// This attribute can be used on shader types that are declared as : +/// +/// [GeneratedComputeShaderDescriptor] +/// partial struct MyShader : IComputeShader +/// { +/// } +/// +/// +/// +/// The shader type must implement either or . +/// +/// +/// When a shader is annotated with , the source generator will also add +/// to its implemented interfaces, and implement its APIs automatically. +/// +/// +[AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)] +public sealed class GeneratedComputeShaderDescriptorAttribute : Attribute +{ +} \ No newline at end of file