Ported command list execution code

このコミットが含まれているのは:
Sergio Pedri committed 2020-11-17 00:51:42 +01:00
1 親 fa63f3d5f0
コミット 0defb1cf25
3ファイル変更
+91 -34

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

+2 -6
ファイルの表示
@@ -69,15 +69,11 @@ namespace ComputeSharp
/// </remarks>
[Pure]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe ComPtr<U> Upcast<T, U>(this in ComPtr<T> ptr)
public static unsafe ref readonly ComPtr<U> Upcast<T, U>(this in ComPtr<T> ptr)
where T : unmanaged
where U : unmanaged
{
ComPtr<U> copy = default;
*(T**)Unsafe.AsPointer(ref copy) = ptr.Get();
return copy;
return ref Unsafe.As<ComPtr<T>, ComPtr<U>>(ref Unsafe.AsRef(in ptr));
}
}
}