Cleanup pass for public/internal APIs
このコミットが含まれているのは:
1 親
f1bdcf2fdf
コミット
88eaf3e273
21ファイル変更
+29
-26
検索条件に一致するファイルはありません
@@ -25,7 +25,7 @@ namespace ComputeSharp.Graphics.Buffers.Abstract
|
||||
/// <summary>
|
||||
/// Gets the <see cref="IntPtr"/> associated to the currently mapped resource
|
||||
/// </summary>
|
||||
public IntPtr MappedResource { get; private set; }
|
||||
internal IntPtr MappedResource { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="Resource"/> object currently mapped
|
||||
@@ -47,7 +47,7 @@ namespace ComputeSharp.Graphics.Buffers.Abstract
|
||||
/// </summary>
|
||||
/// <param name="subresource">The index of the target subresource to map</param>
|
||||
/// <returns>An <see cref="IntPtr"/> for the newly mapped resource</returns>
|
||||
public IntPtr Map(int subresource)
|
||||
internal IntPtr Map(int subresource)
|
||||
{
|
||||
IntPtr mappedResource = NativeResource?.Map(subresource) ?? throw new InvalidOperationException("Missing resource");
|
||||
MappedResource = mappedResource;
|
||||
@@ -58,7 +58,7 @@ namespace ComputeSharp.Graphics.Buffers.Abstract
|
||||
/// Unmaps a subresource specified by a given index
|
||||
/// </summary>
|
||||
/// <param name="subresource">The index of the subresource to unmap</param>
|
||||
public void Unmap(int subresource)
|
||||
internal void Unmap(int subresource)
|
||||
{
|
||||
NativeResource?.Unmap(subresource);
|
||||
MappedResource = IntPtr.Zero;
|
||||
|
||||
@@ -21,8 +21,8 @@ namespace ComputeSharp.Graphics.Buffers
|
||||
protected internal Buffer(GraphicsDevice device, int size, int sizeInBytes, HeapType heapType) : base(device)
|
||||
{
|
||||
Size = size;
|
||||
ElementSizeInBytes = Unsafe.SizeOf<T>();
|
||||
SizeInBytes = sizeInBytes; // Not necessarily a multiple of the element size, as there could be padding
|
||||
ElementSizeInBytes = Unsafe.SizeOf<T>();
|
||||
HeapType = heapType;
|
||||
|
||||
ResourceFlags flags = heapType == HeapType.Default ? ResourceFlags.AllowUnorderedAccess : ResourceFlags.None;
|
||||
@@ -59,6 +59,11 @@ namespace ComputeSharp.Graphics.Buffers
|
||||
/// </summary>
|
||||
protected int ElementSizeInBytes { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the heap type being targeted by the current buffer
|
||||
/// </summary>
|
||||
internal HeapType HeapType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates the descriptors for a constant buffer
|
||||
/// </summary>
|
||||
@@ -101,10 +106,5 @@ namespace ComputeSharp.Graphics.Buffers
|
||||
|
||||
return (cpuHandle, gpuHandle);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the heap type being targeted by the current buffer
|
||||
/// </summary>
|
||||
public HeapType HeapType { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Buffers;
|
||||
using System.Runtime.CompilerServices;
|
||||
using ComputeSharp.Graphics.Buffers.Abstract;
|
||||
using ComputeSharp.Graphics.Helpers;
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace ComputeSharp.Graphics.Commands
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> representing a custom pipeline state for a compute operation
|
||||
/// </summary>
|
||||
public sealed class PipelineState : ComputePipelineStateDescription
|
||||
internal sealed class PipelineState : ComputePipelineStateDescription
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="PipelineState"/> instance with the specified parameters
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace ComputeSharp.Graphics
|
||||
/// </summary>
|
||||
/// <param name="rootSignatureDescription">A <see cref="RootSignatureDescription"/> instance with the info for the new <see cref="RootSignature"/> object to create</param>
|
||||
/// <returns>A new <see cref="RootSignature"/> instance to use in a compute shader</returns>
|
||||
public RootSignature CreateRootSignature(RootSignatureDescription rootSignatureDescription)
|
||||
internal RootSignature CreateRootSignature(RootSignatureDescription rootSignatureDescription)
|
||||
{
|
||||
return NativeDevice.CreateRootSignature(rootSignatureDescription.Serialize());
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace ComputeSharp.Graphics.Helpers
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> with methods to inspect the available devices on the current machine
|
||||
/// </summary>
|
||||
public static class DeviceHelper
|
||||
internal static class DeviceHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a collection of all the supported devices on the current machine
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace ComputeSharp.Graphics.Helpers
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> with some helper methods to copy data between memory areas
|
||||
/// </summary>
|
||||
public static class MemoryHelper
|
||||
internal static class MemoryHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Copies the content of a <see cref="Span{T}"/> to the area pointed by an input <see cref="IntPtr"/> value
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: InternalsVisibleTo("ComputeSharp")]
|
||||
[assembly: InternalsVisibleTo("ComputeSharp.Shaders")]
|
||||
[assembly: InternalsVisibleTo("ComputeSharp.NetCore.Tests")]
|
||||
@@ -10,7 +10,7 @@ namespace ComputeSharp.Shaders.Extensions
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> with some extension methods for C# syntax nodes
|
||||
/// </summary>
|
||||
public static class SyntaxNodeExtensions
|
||||
internal static class SyntaxNodeExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Checks a <see cref="SyntaxNode"/> value and replaces the value type to be HLSL compatible, if needed
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: InternalsVisibleTo("ComputeSharp")]
|
||||
@@ -3,7 +3,7 @@
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that contains info on a shader field
|
||||
/// </summary>
|
||||
public abstract class FieldInfoBase
|
||||
internal abstract class FieldInfoBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the current field
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace ComputeSharp.Shaders.Renderer.Models.Fields
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that contains info on a constant buffer field
|
||||
/// </summary>
|
||||
public sealed class ConstantBufferFieldInfo : FieldInfoBase
|
||||
internal sealed class ConstantBufferFieldInfo : FieldInfoBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets whether or not the current <see cref="FieldInfoBase"/> instance represents a constant buffer (always <see langword="true"/>)
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace ComputeSharp.Shaders.Renderer.Models.Fields
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that contains info on a read write buffer field
|
||||
/// </summary>
|
||||
public sealed class ReadWriteBufferFieldInfo : FieldInfoBase
|
||||
internal sealed class ReadWriteBufferFieldInfo : FieldInfoBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets whether or not the current <see cref="FieldInfoBase"/> instance represents a read write buffer (always <see langword="true"/>)
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace ComputeSharp.Shaders.Renderer.Models.Fields
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that contains info on a static scalar field
|
||||
/// </summary>
|
||||
public sealed class StaticScalarFieldInfo : FieldInfoBase
|
||||
internal sealed class StaticScalarFieldInfo : FieldInfoBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets whether or not the current <see cref="FieldInfoBase"/> instance represents a static scalar value (always <see langword="true"/>)
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace ComputeSharp.Shaders.Renderer.Models
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that contains info to render a shader source to compile
|
||||
/// </summary>
|
||||
public sealed class ShaderInfo
|
||||
internal sealed class ShaderInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the list of fields being present in the current shader
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace ComputeSharp.Shaders.Renderer
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that uses the mustache templating system to render HLSL shaders
|
||||
/// </summary>
|
||||
public sealed class ShaderRenderer
|
||||
internal sealed class ShaderRenderer
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the singleton <see cref="ShaderRenderer"/> instance to use
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace ComputeSharp.Shaders
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> responsible for performing all the necessary operations to compile and run a compute shader
|
||||
/// </summary>
|
||||
public static class ShaderRunner
|
||||
internal static class ShaderRunner
|
||||
{
|
||||
/// <summary>
|
||||
/// Compiles and runs the input shader on a target <see cref="GraphicsDevice"/> instance, with the specified parameters
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace ComputeSharp.Shaders.Translation
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that is able to decompile arbitrary methods
|
||||
/// </summary>
|
||||
public sealed class MethodDecompiler
|
||||
internal sealed class MethodDecompiler
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the singleton <see cref="MethodDecompiler"/> instance to use
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace ComputeSharp.Shaders.Translation
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that uses the <see cref="HlslDxcLib"/> APIs to compile compute shaders
|
||||
/// </summary>
|
||||
public sealed class ShaderCompiler
|
||||
internal sealed class ShaderCompiler
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the singleton <see cref="ShaderCompiler"/> instance to use
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace ComputeSharp.Shaders.Translation
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> responsible for loading and processing <see cref="Action{T}"/> instances
|
||||
/// </summary>
|
||||
public sealed class ShaderLoader
|
||||
internal sealed class ShaderLoader
|
||||
{
|
||||
/// <summary>
|
||||
/// The <see cref="Action{T}"/> that represents the shader to load
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace ComputeSharp.Shaders.Translation
|
||||
/// <summary>
|
||||
/// A custom <see cref="CSharpSyntaxRewriter"/> <see langword="class"/> that processes C# methods to convert to HLSL
|
||||
/// </summary>
|
||||
public class ShaderSyntaxRewriter : CSharpSyntaxRewriter
|
||||
internal class ShaderSyntaxRewriter : CSharpSyntaxRewriter
|
||||
{
|
||||
/// <summary>
|
||||
/// The <see cref="Microsoft.CodeAnalysis.SemanticModel"/> instance to use to rewrite the decompiled code
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする