From b340dc633d31a2ea383726013e2906a7d1e92fb3 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 14 Jan 2021 14:42:48 +0100 Subject: [PATCH] Fixed some XML docs --- .../__Internals/ShaderMethodSourceAttribute.cs | 6 +++--- src/ComputeSharp.Core/PixelTypes/Rg16.cs | 4 ++-- src/ComputeSharp.Core/PixelTypes/Rg32.cs | 4 ++-- src/ComputeSharp.Core/Primitives/Float/Float3.cs | 4 ++-- src/ComputeSharp.Core/Primitives/Float/Float4.cs | 4 ++-- .../Commands/CommandList.cs | 3 ++- .../Interop/ID3D12DescriptorHandleAllocator.cs | 4 ++-- .../Commands/PipelineData.cs | 7 +++---- .../Extensions/ID3D12DeviceExtensions.cs | 1 + src/ComputeSharp.Graphics/GraphicsDevice.cs | 10 +++++----- src/ComputeSharp.Graphics/GraphicsDeviceInfo.cs | 2 +- .../Helpers/MemoryHelper.cs | 2 -- .../Interfaces/IReadOnlyTexture3D{TPixel}.cs | 2 +- .../Resources/ReadOnlyTexture3D{T}.cs | 2 +- .../Renderer/HlslShaderRenderer.cs | 4 ++-- .../Renderer/Models/HlslResourceInfo.cs | 1 + .../Translation/ShaderLoader{T}.cs | 4 ++-- .../Extensions/Buffers/BufferExtensions.cs | 2 +- .../Extensions/Buffers/Texture2DExtensions.cs | 6 +++--- .../Extensions/Buffers/Texture3DExtensions.cs | 10 +++++----- .../Extensions/GraphicsDeviceExtensions.cs | 16 ++++++++-------- 21 files changed, 49 insertions(+), 49 deletions(-) diff --git a/src/ComputeSharp.Core/Attributes/__Internals/ShaderMethodSourceAttribute.cs b/src/ComputeSharp.Core/Attributes/__Internals/ShaderMethodSourceAttribute.cs index 97104dfd..8d0bbce3 100644 --- a/src/ComputeSharp.Core/Attributes/__Internals/ShaderMethodSourceAttribute.cs +++ b/src/ComputeSharp.Core/Attributes/__Internals/ShaderMethodSourceAttribute.cs @@ -79,10 +79,10 @@ namespace ComputeSharp.__Internals } /// - /// Gets the associated instance for a specified type. + /// Gets the associated instance for a specified delegate. /// - /// The shader type to get the attribute for. - /// The associated instance for type . + /// The input instance to get info for. + /// The associated instance for the given delegate. [Pure] internal static ShaderMethodSourceAttribute GetForDelegate(Delegate function) { diff --git a/src/ComputeSharp.Core/PixelTypes/Rg16.cs b/src/ComputeSharp.Core/PixelTypes/Rg16.cs index dd3b6ce9..5da5ce6d 100644 --- a/src/ComputeSharp.Core/PixelTypes/Rg16.cs +++ b/src/ComputeSharp.Core/PixelTypes/Rg16.cs @@ -30,8 +30,8 @@ namespace ComputeSharp /// /// Initializes a new instance of the struct. /// - /// The x-component - /// The y-component + /// The red component. + /// The green component. public Rg16(byte r, byte g) { R = r; diff --git a/src/ComputeSharp.Core/PixelTypes/Rg32.cs b/src/ComputeSharp.Core/PixelTypes/Rg32.cs index 10f5a7c1..8d0e39ba 100644 --- a/src/ComputeSharp.Core/PixelTypes/Rg32.cs +++ b/src/ComputeSharp.Core/PixelTypes/Rg32.cs @@ -30,8 +30,8 @@ namespace ComputeSharp /// /// Initializes a new instance of the struct. /// - /// The x-component - /// The y-component + /// The red component. + /// The green component. public Rg32(ushort r, ushort g) { R = r; diff --git a/src/ComputeSharp.Core/Primitives/Float/Float3.cs b/src/ComputeSharp.Core/Primitives/Float/Float3.cs index eeeea995..4c1893c6 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float3.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float3.cs @@ -567,13 +567,13 @@ namespace ComputeSharp /// /// Casts a value to a one. /// - /// The input value to cast. + /// The input value to cast. public static unsafe implicit operator Vector3(Float3 xyz) => *(Vector3*)&xyz; /// /// Casts a value to a one. /// - /// The input value to cast. + /// The input value to cast. public static unsafe implicit operator Float3(Vector3 xyz) => *(Float3*)&xyz; /// diff --git a/src/ComputeSharp.Core/Primitives/Float/Float4.cs b/src/ComputeSharp.Core/Primitives/Float/Float4.cs index 5b7904a6..f6192624 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float4.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float4.cs @@ -3972,13 +3972,13 @@ namespace ComputeSharp /// /// Casts a value to a one. /// - /// The input value to cast. + /// The input value to cast. public static unsafe implicit operator Vector4(Float4 xyzw) => *(Vector4*)&xyzw; /// /// Casts a value to a one. /// - /// The input value to cast. + /// The input value to cast. public static unsafe implicit operator Float4(Vector4 xyzw) => *(Float4*)&xyzw; /// diff --git a/src/ComputeSharp.Graphics/Commands/CommandList.cs b/src/ComputeSharp.Graphics/Commands/CommandList.cs index f75edc4f..58bd809a 100644 --- a/src/ComputeSharp.Graphics/Commands/CommandList.cs +++ b/src/ComputeSharp.Graphics/Commands/CommandList.cs @@ -120,6 +120,7 @@ namespace ComputeSharp.Graphics.Commands /// The source (a texture) to read from. /// The horizontal offset in the destination texture. /// The vertical offset in the destination texture. + /// The depthwise offset in the destination texture. /// The width of the memory area to read from. /// The height of the memory area to read from. /// The depth of the memory area to read from. @@ -166,7 +167,7 @@ namespace ComputeSharp.Graphics.Commands /// /// Sets a given object ready to be executed. /// - /// The input to setup. + /// The input to setup. public readonly void SetPipelineData(PipelineData pipelineData) { this.d3D12GraphicsCommandList.Get()->SetComputeRootSignature(pipelineData.D3D12RootSignature); diff --git a/src/ComputeSharp.Graphics/Commands/Interop/ID3D12DescriptorHandleAllocator.cs b/src/ComputeSharp.Graphics/Commands/Interop/ID3D12DescriptorHandleAllocator.cs index f41b8007..5b869e48 100644 --- a/src/ComputeSharp.Graphics/Commands/Interop/ID3D12DescriptorHandleAllocator.cs +++ b/src/ComputeSharp.Graphics/Commands/Interop/ID3D12DescriptorHandleAllocator.cs @@ -79,7 +79,7 @@ namespace ComputeSharp.Graphics.Commands.Interop /// Rents a new CPU and GPU handle pair to use in a memory buffer. /// /// The resulting value. - /// The resulting value. + /// The resulting value. public void Rent( out D3D12_CPU_DESCRIPTOR_HANDLE d3D12CpuDescriptorHandle, out D3D12_GPU_DESCRIPTOR_HANDLE d3D12GpuDescriptorHandle) @@ -106,7 +106,7 @@ namespace ComputeSharp.Graphics.Commands.Interop /// Returns a CPU and GPU handle pair for later use. /// /// The returned value. - /// The returned value. + /// The returned value. public void Return( D3D12_CPU_DESCRIPTOR_HANDLE d3D12CpuDescriptorHandle, D3D12_GPU_DESCRIPTOR_HANDLE d3D12GpuDescriptorHandle) diff --git a/src/ComputeSharp.Graphics/Commands/PipelineData.cs b/src/ComputeSharp.Graphics/Commands/PipelineData.cs index d25c1fe0..be6ad0eb 100644 --- a/src/ComputeSharp.Graphics/Commands/PipelineData.cs +++ b/src/ComputeSharp.Graphics/Commands/PipelineData.cs @@ -19,11 +19,10 @@ namespace ComputeSharp.Graphics.Commands private ComPtr d3D12PipelineState; /// - /// Creates a new instance with the specified parameters. + /// Creates a new instance with the specified parameters. /// - /// The to use. - /// The value for the current shader. - /// The bytecode for the compute shader to run. + /// The value for the current shader. + /// The compiled pipeline state to reuse for the current shader. public PipelineData(ComPtr d3D12RootSignature, ComPtr d3D12PipelineState) { this.d3D12RootSignature = d3D12RootSignature; diff --git a/src/ComputeSharp.Graphics/Extensions/ID3D12DeviceExtensions.cs b/src/ComputeSharp.Graphics/Extensions/ID3D12DeviceExtensions.cs index 6d177f7c..971f3db3 100644 --- a/src/ComputeSharp.Graphics/Extensions/ID3D12DeviceExtensions.cs +++ b/src/ComputeSharp.Graphics/Extensions/ID3D12DeviceExtensions.cs @@ -423,6 +423,7 @@ namespace ComputeSharp.Graphics.Extensions /// /// The target to use to create the command list. /// The type of command list to create. + /// The command allocator to use to create the command list. /// A pointer to the newly allocated instance. /// Thrown when the creation of the command list fails. public static ComPtr CreateCommandList( diff --git a/src/ComputeSharp.Graphics/GraphicsDevice.cs b/src/ComputeSharp.Graphics/GraphicsDevice.cs index 824becaf..600ded21 100644 --- a/src/ComputeSharp.Graphics/GraphicsDevice.cs +++ b/src/ComputeSharp.Graphics/GraphicsDevice.cs @@ -152,11 +152,11 @@ namespace ComputeSharp internal bool IsCacheCoherentUMA { get; } /// - /// Checks whether the current device supports the creation of + /// Checks whether the current device supports the creation of /// resources for a specified type . /// /// The type of values to check support for. - /// Whether instances can be created by the current device. + /// Whether instances can be created by the current device. [Pure] public bool IsTexture2DSupportedForType() where T : unmanaged @@ -167,11 +167,11 @@ namespace ComputeSharp } /// - /// Checks whether the current device supports the creation of + /// Checks whether the current device supports the creation of /// resources for a specified type . /// /// The type of values to check support for. - /// Whether instances can be created by the current device. + /// Whether instances can be created by the current device. [Pure] public bool IsTexture3DSupportedForType() where T : unmanaged @@ -181,7 +181,7 @@ namespace ComputeSharp return this.d3D12Device.Get()->IsDxgiFormatSupported(DXGIFormatHelper.GetForType(), D3D12_FORMAT_SUPPORT1_TEXTURE3D); } - /// + /// internal void RentShaderResourceViewDescriptorHandles( out D3D12_CPU_DESCRIPTOR_HANDLE d3D12CpuDescriptorHandle, out D3D12_GPU_DESCRIPTOR_HANDLE d3D12GpuDescriptorHandle) diff --git a/src/ComputeSharp.Graphics/GraphicsDeviceInfo.cs b/src/ComputeSharp.Graphics/GraphicsDeviceInfo.cs index 71a5c06a..5c4b7f48 100644 --- a/src/ComputeSharp.Graphics/GraphicsDeviceInfo.cs +++ b/src/ComputeSharp.Graphics/GraphicsDeviceInfo.cs @@ -11,7 +11,7 @@ namespace ComputeSharp /// /// Creates a new instance with the specified parameters. /// - /// The available info for the associate device. + /// The available info for the associated device. internal unsafe GraphicsDeviceInfo(DXGI_ADAPTER_DESC1* dxgiDescription1) { Luid = Luid.FromLUID(dxgiDescription1->AdapterLuid); diff --git a/src/ComputeSharp.Graphics/Helpers/MemoryHelper.cs b/src/ComputeSharp.Graphics/Helpers/MemoryHelper.cs index 4842f413..4a30f2b8 100644 --- a/src/ComputeSharp.Graphics/Helpers/MemoryHelper.cs +++ b/src/ComputeSharp.Graphics/Helpers/MemoryHelper.cs @@ -174,7 +174,6 @@ namespace ComputeSharp.Graphics.Helpers /// Copies the content of a source memory area to the 3D area pointed by an input pointer. /// The destination memory area has padding in each row, while the source does not. /// - /// The type of values to read. /// The source memory area to read from. /// The pointer that indicates the 3D memory area to write to. /// The height of the 3D memory area to write to. @@ -219,7 +218,6 @@ namespace ComputeSharp.Graphics.Helpers /// Copies a 3D memory area pointed by a pointer value to a target memory area. /// The source memory area has padding in each row, while the target does not. /// - /// The type of values to read. /// The pointer that indicates the memory area to read from. /// The height of the 3D memory area to read. /// The depth of the 3D memory area to read. diff --git a/src/ComputeSharp.Graphics/Resources/Interfaces/IReadOnlyTexture3D{TPixel}.cs b/src/ComputeSharp.Graphics/Resources/Interfaces/IReadOnlyTexture3D{TPixel}.cs index df101b43..74725b0a 100644 --- a/src/ComputeSharp.Graphics/Resources/Interfaces/IReadOnlyTexture3D{TPixel}.cs +++ b/src/ComputeSharp.Graphics/Resources/Interfaces/IReadOnlyTexture3D{TPixel}.cs @@ -28,7 +28,7 @@ /// /// The horizontal offset of the value to get. /// The vertical offset of the value to get. - /// The depthwise offset of the value to get. + /// The depthwise offset of the value to get. /// This API can only be used from a compute shader, and will always throw if used anywhere else. public TPixel this[int x, int y, int z] { get; } diff --git a/src/ComputeSharp.Graphics/Resources/ReadOnlyTexture3D{T}.cs b/src/ComputeSharp.Graphics/Resources/ReadOnlyTexture3D{T}.cs index 044a069a..7dc1995e 100644 --- a/src/ComputeSharp.Graphics/Resources/ReadOnlyTexture3D{T}.cs +++ b/src/ComputeSharp.Graphics/Resources/ReadOnlyTexture3D{T}.cs @@ -32,7 +32,7 @@ namespace ComputeSharp /// /// The horizontal offset of the value to get. /// The vertical offset of the value to get. - /// The depthwise offset of the value to get. + /// The depthwise offset of the value to get. /// This API can only be used from a compute shader, and will always throw if used anywhere else. public T this[int x, int y, int z] => throw new InvalidExecutionContextException($"{nameof(ReadOnlyTexture3D)}[int,int,int]"); diff --git a/src/ComputeSharp.Shaders/Renderer/HlslShaderRenderer.cs b/src/ComputeSharp.Shaders/Renderer/HlslShaderRenderer.cs index 337325d7..3c2731b6 100644 --- a/src/ComputeSharp.Shaders/Renderer/HlslShaderRenderer.cs +++ b/src/ComputeSharp.Shaders/Renderer/HlslShaderRenderer.cs @@ -251,7 +251,7 @@ namespace ComputeSharp.Shaders.Renderer /// /// Ensures that has enough free space to contain a given number of new items. /// - /// The minimum number of items to ensure space for in . + /// The minimum number of items to ensure space for in . [MethodImpl(MethodImplOptions.AggressiveInlining)] private void EnsureCapacity(int requestedSize) { @@ -297,7 +297,7 @@ namespace ComputeSharp.Shaders.Renderer internal sealed class DebugView { /// - /// Initializes a new instance of the class with the specified parameters. + /// Initializes a new instance of the class with the specified parameters. /// /// The input instance to display. public DebugView(ArrayPoolStringBuilder builder) diff --git a/src/ComputeSharp.Shaders/Renderer/Models/HlslResourceInfo.cs b/src/ComputeSharp.Shaders/Renderer/Models/HlslResourceInfo.cs index f89cb615..cbde91bb 100644 --- a/src/ComputeSharp.Shaders/Renderer/Models/HlslResourceInfo.cs +++ b/src/ComputeSharp.Shaders/Renderer/Models/HlslResourceInfo.cs @@ -5,6 +5,7 @@ /// /// The type of the current field in the HLSL shader. /// The name to use for the current field. + /// The register index to bind the resource to. internal abstract record HlslResourceInfo(string FieldType, string FieldName, int BufferIndex) : CapturedFieldInfo(FieldType, FieldName) { diff --git a/src/ComputeSharp.Shaders/Translation/ShaderLoader{T}.cs b/src/ComputeSharp.Shaders/Translation/ShaderLoader{T}.cs index af601973..1d6f6257 100644 --- a/src/ComputeSharp.Shaders/Translation/ShaderLoader{T}.cs +++ b/src/ComputeSharp.Shaders/Translation/ShaderLoader{T}.cs @@ -111,7 +111,7 @@ namespace ComputeSharp.Shaders.Translation /// Loads and processes an input shadeer. /// /// The instance to use to build the shader. - /// A new instance representing the input shader. + /// A new instance representing the input shader. [Pure] public static ShaderLoader Load(in T shader) { @@ -179,7 +179,7 @@ namespace ComputeSharp.Shaders.Translation } /// - /// Loads a specified and adds it to the shader model. + /// Loads a specified and adds it to the shader model. /// /// The boxed instance to use to build the shader. /// The target to load. diff --git a/src/ComputeSharp/Extensions/Buffers/BufferExtensions.cs b/src/ComputeSharp/Extensions/Buffers/BufferExtensions.cs index a838cc5b..256c57a2 100644 --- a/src/ComputeSharp/Extensions/Buffers/BufferExtensions.cs +++ b/src/ComputeSharp/Extensions/Buffers/BufferExtensions.cs @@ -68,7 +68,7 @@ namespace ComputeSharp /// The type of items stored on the buffer. /// The input instance to read data from. /// The input array to write data to. - /// The starting offset within to write data to. + /// The starting offset within to write data to. /// The offset to start reading data from. /// The number of items to read. public static void GetData(this Buffer buffer, T[] destination, int destinationOffset, int bufferOffset, int count) diff --git a/src/ComputeSharp/Extensions/Buffers/Texture2DExtensions.cs b/src/ComputeSharp/Extensions/Buffers/Texture2DExtensions.cs index 50ee8172..ae58b6b7 100644 --- a/src/ComputeSharp/Extensions/Buffers/Texture2DExtensions.cs +++ b/src/ComputeSharp/Extensions/Buffers/Texture2DExtensions.cs @@ -93,7 +93,7 @@ namespace ComputeSharp /// The type of items stored on the texture. /// The input instance to read data from. /// The input array to write data to. - /// The starting offset within to write data to. + /// The starting offset within to write data to. public static void GetData(this Texture2D texture, T[] destination, int offset) where T : unmanaged { @@ -107,7 +107,7 @@ namespace ComputeSharp /// The type of items stored on the texture. /// The input instance to read data from. /// The input array to write data to. - /// The starting offset within to write data to. + /// The starting offset within to write data to. /// The horizontal range of items to copy. /// The vertical range of items to copy. public static void GetData(this Texture2D texture, T[] destination, int offset, Range x, Range y) @@ -123,7 +123,7 @@ namespace ComputeSharp /// The type of items stored on the texture. /// The input instance to read data from. /// The input array to write data to. - /// The starting offset within to write data to. + /// The starting offset within to write data to. /// The horizontal offset in the source texture. /// The vertical offset in the source texture. /// The width of the memory area to copy. diff --git a/src/ComputeSharp/Extensions/Buffers/Texture3DExtensions.cs b/src/ComputeSharp/Extensions/Buffers/Texture3DExtensions.cs index 3e0ccfe6..6c16d91a 100644 --- a/src/ComputeSharp/Extensions/Buffers/Texture3DExtensions.cs +++ b/src/ComputeSharp/Extensions/Buffers/Texture3DExtensions.cs @@ -41,7 +41,7 @@ namespace ComputeSharp /// The input array to write data to. /// /// The input 3D array needs to have each 2D plane stacked on the depth axis. That is, the expected - /// layout of the input array has to be [, , ]. + /// layout of the input array has to be of shape [depth, height, width]. /// public static void GetData(this Texture3D texture, T[,,] destination) where T : unmanaged @@ -59,7 +59,7 @@ namespace ComputeSharp /// The type of items stored on the texture. /// The input instance to read data from. /// The input array to write data to. - /// The starting offset within to write data to. + /// The starting offset within to write data to. public static void GetData(this Texture3D texture, T[] destination, int offset) where T : unmanaged { @@ -73,7 +73,7 @@ namespace ComputeSharp /// The type of items stored on the texture. /// The input instance to read data from. /// The input array to write data to. - /// The starting offset within to write data to. + /// The starting offset within to write data to. /// The horizontal range of items to copy. /// The vertical range of items to copy. /// The depthwise range of items to copy. @@ -90,7 +90,7 @@ namespace ComputeSharp /// The type of items stored on the texture. /// The input instance to read data from. /// The input array to write data to. - /// The starting offset within to write data to. + /// The starting offset within to write data to. /// The horizontal offset in the source texture. /// The vertical offset in the source texture. /// The depthwise offset in the source texture. @@ -162,7 +162,7 @@ namespace ComputeSharp /// The input array to read data from. /// /// The source 3D array needs to have each 2D plane stacked on the depth axis. That is, the expected - /// layout of the input array has to be [, , ]. + /// layout of the input array has to be of shape [depth, height, width]. /// public static void SetData(this Texture3D texture, T[,,] source) where T : unmanaged diff --git a/src/ComputeSharp/Extensions/GraphicsDeviceExtensions.cs b/src/ComputeSharp/Extensions/GraphicsDeviceExtensions.cs index 60492b1b..078e2ca4 100644 --- a/src/ComputeSharp/Extensions/GraphicsDeviceExtensions.cs +++ b/src/ComputeSharp/Extensions/GraphicsDeviceExtensions.cs @@ -178,7 +178,7 @@ namespace ComputeSharp /// The type of items to store in the texture. /// The instance to use to allocate the texture. /// The input array with the data to copy on the allocated texture. - /// The starting offset within to read data from. + /// The starting offset within to read data from. /// The width of the texture. /// The height of the texture. /// A instance with the contents of the input array. @@ -269,7 +269,7 @@ namespace ComputeSharp /// The type of pixels used on the GPU side. /// The instance to use to allocate the texture. /// The input array with the data to copy on the allocated texture. - /// The starting offset within to read data from. + /// The starting offset within to read data from. /// The width of the texture. /// The height of the texture. /// A instance with the contents of the input array. @@ -362,7 +362,7 @@ namespace ComputeSharp /// The type of items to store in the texture. /// The instance to use to allocate the texture. /// The input array with the data to copy on the allocated texture. - /// The starting offset within to read data from. + /// The starting offset within to read data from. /// The width of the texture. /// The height of the texture. /// The depth of the texture. @@ -461,7 +461,7 @@ namespace ComputeSharp /// The type of pixels used on the GPU side. /// The instance to use to allocate the texture. /// The input array with the data to copy on the allocated texture. - /// The starting offset within to read data from. + /// The starting offset within to read data from. /// The width of the texture. /// The height of the texture. /// The depth of the texture. @@ -622,7 +622,7 @@ namespace ComputeSharp /// The type of items to store in the texture. /// The instance to use to allocate the texture. /// The input array with the data to copy on the allocated texture. - /// The starting offset within to read data from. + /// The starting offset within to read data from. /// The width of the texture. /// The height of the texture. /// A instance with the contents of the input array. @@ -713,7 +713,7 @@ namespace ComputeSharp /// The type of pixels used on the GPU side. /// The instance to use to allocate the texture. /// The input array with the data to copy on the allocated texture. - /// The starting offset within to read data from. + /// The starting offset within to read data from. /// The width of the texture. /// The height of the texture. /// A instance with the contents of the input array. @@ -806,7 +806,7 @@ namespace ComputeSharp /// The type of items to store in the texture. /// The instance to use to allocate the texture. /// The input array with the data to copy on the allocated texture. - /// The starting offset within to read data from. + /// The starting offset within to read data from. /// The width of the texture. /// The height of the texture. /// The depth of the texture. @@ -905,7 +905,7 @@ namespace ComputeSharp /// The type of pixels used on the GPU side. /// The instance to use to allocate the texture. /// The input array with the data to copy on the allocated texture. - /// The starting offset within to read data from. + /// The starting offset within to read data from. /// The width of the texture. /// The height of the texture. /// The depth of the texture.