Fixed a method name

このコミットが含まれているのは:
Sergio Pedri committed 2019-08-15 15:23:19 +02:00
1 親 e292d5513f
コミット 5cb56aa8eb
3ファイル変更
+4 -4

検索条件に一致するファイルはありません

+1 -1
ファイルの表示
@@ -25,7 +25,7 @@ namespace ComputeSharp.Graphics.Buffers.Extensions
/// <param name="data">The input <see cref="object"/> to copy to the allocated buffer</param>
/// <returns>A constant <see cref="ConstantBuffer{T}"/> instance (as a <see cref="GraphicsResource"/>) with the input data</returns>
[Pure]
public static GraphicsResource AllocateReadOnlyBufferFromReflectedSingleValue(this GraphicsDevice device, object data)
public static GraphicsResource AllocateConstantBufferFromReflectedSingleValue(this GraphicsDevice device, object data)
{
Type dataType = data.GetType();
if (!TypeMapping.TryGetValue(dataType, out var info))
+1 -1
ファイルの表示
@@ -99,7 +99,7 @@ namespace ComputeSharp.Shaders
List<GraphicsResource> buffers = new List<GraphicsResource>();
foreach (var variable in shaderLoader.CapturedConstantBufferValues)
{
GraphicsResource resource = device.AllocateReadOnlyBufferFromReflectedSingleValue(variable.Value);
GraphicsResource resource = device.AllocateConstantBufferFromReflectedSingleValue(variable.Value);
commandList.SetComputeRootDescriptorTable(variable.Index, resource);
buffers.Add(resource);
}
+2 -2
ファイルの表示
@@ -14,7 +14,7 @@ namespace ComputeSharp.NetCore.Tests.Internals
{
object value = 77;
using ConstantBuffer<int> buffer = (ConstantBuffer<int>)Gpu.Default.AllocateReadOnlyBufferFromReflectedSingleValue(value);
using ConstantBuffer<int> buffer = (ConstantBuffer<int>)Gpu.Default.AllocateConstantBufferFromReflectedSingleValue(value);
int[] result = buffer.GetData();
Assert.IsTrue(result.Length == 1);
@@ -26,7 +26,7 @@ namespace ComputeSharp.NetCore.Tests.Internals
{
object value = 3.14f;
using ConstantBuffer<float> buffer = (ConstantBuffer<float>)Gpu.Default.AllocateReadOnlyBufferFromReflectedSingleValue(value);
using ConstantBuffer<float> buffer = (ConstantBuffer<float>)Gpu.Default.AllocateConstantBufferFromReflectedSingleValue(value);
float[] result = buffer.GetData();
Assert.IsTrue(result.Length == 1);