Fixed buffer accessors to support the new APIs

このコミットが含まれているのは:
Sergio Pedri committed 2019-08-24 23:57:06 +02:00
1 親 63623f4d92
コミット 8f05db321e
2ファイル変更
+3 -7

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

+2 -2
ファイルの表示
@@ -18,9 +18,9 @@ namespace ComputeSharp.Graphics.Buffers
internal ReadOnlyBuffer(GraphicsDevice device, int size) : base(device, size, BufferType.ReadOnly) { }
/// <summary>
/// Gets or sets a single <typeparamref name="T"/> value from the current read write buffer
/// Gets a single <typeparamref name="T"/> value from the current read write buffer
/// </summary>
/// <param name="i">The index of the value to get or set</param>
/// <param name="i">The index of the value to get</param>
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else</remarks>
public T this[uint i] => throw new InvalidExecutionContextException($"{nameof(ReadOnlyBuffer<T>)}<T>[uint i]");
}
+1 -5
ファイルの表示
@@ -22,10 +22,6 @@ namespace ComputeSharp.Graphics.Buffers
/// </summary>
/// <param name="i">The index of the value to get or set</param>
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else</remarks>
public T this[uint i]
{
get => throw new InvalidExecutionContextException($"{nameof(ReadWriteBuffer<T>)}<T>[uint i]");
set => throw new InvalidExecutionContextException($"{nameof(ReadWriteBuffer<T>)}<T>[uint i]");
}
public ref T this[uint i] => throw new InvalidExecutionContextException($"{nameof(ReadWriteBuffer<T>)}<T>[uint i]");
}
}