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")]
|
||||
新しいイシューから参照
ユーザーをブロックする