Initial switch to root constants for cbuffer resource
このコミットが含まれているのは:
1 親
2f6bf05c1b
コミット
1ed6a49210
7ファイル変更
+28
-54
検索条件に一致するファイルはありません
@@ -70,21 +70,21 @@ namespace ComputeSharp.Shaders.Translation.Models
|
||||
/// <summary>
|
||||
/// Gets a <see cref="ReadOnlySpan{T}"/> with the padded data representing all the captured variables.
|
||||
/// </summary>
|
||||
public unsafe ReadOnlySpan<Int4> Variables
|
||||
public unsafe ReadOnlySpan<uint> Variables
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
#if NET5_0
|
||||
ref byte r0 = ref MemoryMarshal.GetArrayDataReference(this.variablesArray);
|
||||
ref Int4 r1 = ref Unsafe.As<byte, Int4>(ref r0);
|
||||
int length = (int)((uint)this.variablesByteSize / (uint)sizeof(Int4));
|
||||
ref uint r1 = ref Unsafe.As<byte, uint>(ref r0);
|
||||
int length = (int)((uint)this.variablesByteSize / sizeof(uint));
|
||||
|
||||
return MemoryMarshal.CreateReadOnlySpan(ref r1, length);
|
||||
#else
|
||||
Span<byte> span = this.variablesArray.AsSpan(0, this.variablesByteSize);
|
||||
|
||||
return MemoryMarshal.Cast<byte, Int4>(span);
|
||||
return MemoryMarshal.Cast<byte, uint>(span);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする