Remove ComPtr<T>.GetVoidAddressOf from D2D1 projects

このコミットが含まれているのは:
Sergio Pedri committed 2023-10-12 23:13:51 +02:00
1 親 960ce21899
コミット e89433da46
5ファイル変更
+7 -22

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

-14
ファイルの表示
@@ -9,20 +9,6 @@ namespace ComputeSharp.D2D1.Extensions;
/// <remarks>Trimmed down version of the same file in <c>ComputeSharp</c>.</remarks>
internal static class ComPtrExtensions
{
/// <summary>
/// Gets the address of the current <see cref="ComPtr{T}"/> instance as a raw <see langword="void"/> double pointer.
/// </summary>
/// <typeparam name="T">The type to wrap in the current <see cref="ComPtr{T}"/> instance.</typeparam>
/// <param name="ptr">The input <see cref="ComPtr{T}"/> instance to get the address for.</param>
/// <returns>The raw pointer to the input <see cref="ComPtr{T}"/> instance.</returns>
/// <remarks>This method is only valid when the current <see cref="ComPtr{T}"/> instance is on the stack or pinned.</remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void** GetVoidAddressOf<T>(this in ComPtr<T> ptr)
where T : unmanaged
{
return (void**)Unsafe.AsPointer(ref Unsafe.AsRef(in ptr));
}
/// <summary>
/// Moves the current <see cref="ComPtr{T}"/> instance and resets it without releasing the reference.
/// </summary>
+2 -2
ファイルの表示
@@ -44,7 +44,7 @@ public static class D2D1ReflectionServices
pSrcData: hlslBytecodePtr,
SrcDataSize: (nuint)hlslBytecode.Length,
pInterface: Windows.__uuidof<ID3D11ShaderReflection>(),
ppReflector: d3D11ShaderReflection.GetVoidAddressOf()).Assert();
ppReflector: (void**)d3D11ShaderReflection.GetAddressOf()).Assert();
}
}
else
@@ -59,7 +59,7 @@ public static class D2D1ReflectionServices
pSrcData: (byte*)dynamicBytecode.Get()->GetBufferPointer(),
SrcDataSize: dynamicBytecode.Get()->GetBufferSize(),
pInterface: Windows.__uuidof<ID3D11ShaderReflection>(),
ppReflector: d3D11ShaderReflection.GetVoidAddressOf()).Assert();
ppReflector: (void**)d3D11ShaderReflection.GetAddressOf()).Assert();
}
D3D11_SHADER_DESC d3D11ShaderDescription;
+1 -2
ファイルの表示
@@ -1,6 +1,5 @@
using System;
using System.Runtime.CompilerServices;
using ComputeSharp.D2D1.Extensions;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
@@ -89,7 +88,7 @@ internal static unsafe class ID2D1EffectContextExtensions
pSrcData: bytecode,
SrcDataSize: (uint)bytecodeSize,
pInterface: Windows.__uuidof<ID3D11ShaderReflection>(),
ppReflector: d3D11ShaderReflection.GetVoidAddressOf());
ppReflector: (void**)d3D11ShaderReflection.GetAddressOf());
if (!Windows.SUCCEEDED(hresult))
{