diff --git a/src/ComputeSharp.Shaders/Renderer/Models/Fields/ReadOnlyBufferFieldInfo.cs b/src/ComputeSharp.Shaders/Renderer/Models/Fields/ReadOnlyBufferFieldInfo.cs new file mode 100644 index 00000000..87f6f4e1 --- /dev/null +++ b/src/ComputeSharp.Shaders/Renderer/Models/Fields/ReadOnlyBufferFieldInfo.cs @@ -0,0 +1,31 @@ +using ComputeSharp.Shaders.Renderer.Models.Fields.Abstract; + +namespace ComputeSharp.Shaders.Renderer.Models.Fields +{ + /// + /// A that contains info on a readonly buffer field + /// + internal sealed class ReadOnlyBufferFieldInfo : FieldInfoBase + { + /// + /// Gets whether or not the current instance represents a readonly buffer (always ) + /// + public bool IsReadOnlyBuffer { get; } = true; + + /// + /// Gets the index of the current constant buffer field + /// + public int ReadOnlyBufferIndex { get; } + + /// + /// Creates a new instance with the specified parameters + /// + /// The type of the current field + /// The name of the current field + /// The index of the current readonly buffer field + public ReadOnlyBufferFieldInfo(string fieldType, string fieldName, int bufferIndex) : base(fieldType, fieldName) + { + ReadOnlyBufferIndex = bufferIndex; + } + } +}