Merge pull request #669 from Sergio0694/dev/native-guid
Replace all typeof(T).GUID uses with RVA fields
このコミットが含まれているのは:
104ファイル変更
+1282
-399
検索条件に一致するファイルはありません
@@ -231,13 +231,12 @@ jobs:
|
||||
path: samples\ComputeSharp.SwapChain.Cli\bin\Release\net8.0\win-x64\publish\computesharp.cli.exe
|
||||
if-no-files-found: error
|
||||
|
||||
# Publish the NativeAOT CLI sample (optimized for size, and reflection-free).
|
||||
# Temporarily skip COMPUTESHARP_SWAPCHAIN_CLI_DISABLE_REFLECTION unti code is
|
||||
# refactored to replace typeof(T).GUID with hardcoded IIDs, or it won't work.
|
||||
# Publish the NativeAOT CLI sample (optimized for size, and reflection-free)
|
||||
- name: Publish ComputeSharp.SwapChain.Cli with NativeAOT (size)
|
||||
run: >
|
||||
$env:COMPUTESHARP_SWAPCHAIN_CLI_PUBLISH_AOT='true';
|
||||
$env:COMPUTESHARP_SWAPCHAIN_CLI_SIZE_OPTIMIZED='true';
|
||||
$env:COMPUTESHARP_SWAPCHAIN_CLI_DISABLE_REFLECTION='true';
|
||||
git clean -fdx;
|
||||
dotnet publish samples\ComputeSharp.SwapChain.Cli\ComputeSharp.SwapChain.Cli.csproj -r win-${{matrix.platform}} -v n
|
||||
|
||||
|
||||
+4
-4
@@ -6,14 +6,13 @@ using TerraFX.Interop;
|
||||
using WinRT;
|
||||
using WinRT.Interop;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
#pragma warning disable CS0649, IDE0055, IDE1006
|
||||
|
||||
namespace ABI.Microsoft.Graphics.Canvas;
|
||||
|
||||
/// <summary>
|
||||
/// Raw bindings for the interop interface for the <see cref="CanvasDevice"/> activation factory.
|
||||
/// </summary>
|
||||
[Guid("695C440D-04B3-4EDD-BFD9-63E51E9F7202")]
|
||||
internal unsafe struct ICanvasFactoryNative : IUnknown.Interface
|
||||
{
|
||||
public void** lpVtbl;
|
||||
@@ -23,7 +22,8 @@ internal unsafe struct ICanvasFactoryNative : IUnknown.Interface
|
||||
{
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x0D, 0x44, 0x5C, 0x69,
|
||||
0xB3, 0x04,
|
||||
0xDD, 0x4E,
|
||||
@@ -34,7 +34,7 @@ internal unsafe struct ICanvasFactoryNative : IUnknown.Interface
|
||||
0x9F,
|
||||
0x72,
|
||||
0x02
|
||||
};
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
@@ -10,7 +9,6 @@ namespace ABI.Microsoft.Graphics.Canvas;
|
||||
/// <summary>
|
||||
/// The native WinRT interface for <see cref="global::Microsoft.Graphics.Canvas.CanvasDevice"/> objects.
|
||||
/// </summary>
|
||||
[Guid("A27F0B5D-EC2C-4D4F-948F-0AA1E95E33E6")]
|
||||
[NativeTypeName("class ICanvasDevice : IInspectable")]
|
||||
[NativeInheritance("IInspectable")]
|
||||
internal unsafe struct ICanvasDevice
|
||||
|
||||
@@ -3,18 +3,42 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
#pragma warning disable CS0649, IDE0055, IDE1006
|
||||
|
||||
namespace ABI.Microsoft.Graphics.Canvas.Effects;
|
||||
|
||||
/// <summary>
|
||||
/// The native WinRT interface for <see cref="global::Microsoft.Graphics.Canvas.Effects.ICanvasEffect"/> objects.
|
||||
/// </summary>
|
||||
[Guid("0EF96F8C-9B5E-4BF0-A399-AAD8CE53DB55")]
|
||||
[NativeTypeName("class ICanvasEffect : IInspectable")]
|
||||
[NativeInheritance("IInspectable")]
|
||||
internal unsafe struct ICanvasEffect
|
||||
internal unsafe struct ICanvasEffect : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x8C, 0x6F, 0xF9, 0x0E,
|
||||
0x5E, 0x9B,
|
||||
0xF0, 0x4B,
|
||||
0x99,
|
||||
0xA3,
|
||||
0xAA,
|
||||
0xD8,
|
||||
0xCE,
|
||||
0x53,
|
||||
0xDB,
|
||||
0x55
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
/// <inheritdoc cref="IUnknown.QueryInterface"/>
|
||||
|
||||
+26
-3
@@ -6,18 +6,41 @@ using WinRT;
|
||||
using WinRT.Interop;
|
||||
using IInspectable = ComputeSharp.Win32.IInspectable;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
#pragma warning disable CS0649, IDE0055, IDE1006
|
||||
|
||||
namespace ABI.Microsoft.Graphics.Canvas;
|
||||
|
||||
/// <summary>
|
||||
/// The interop Win2D interface for factories of external effects.
|
||||
/// </summary>
|
||||
[Guid("29BA1A1F-1CFE-44C3-984D-426D61B51427")]
|
||||
[NativeTypeName("class ICanvasEffectFactoryNative : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe struct ICanvasEffectFactoryNative
|
||||
internal unsafe struct ICanvasEffectFactoryNative : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x1F, 0x1A, 0xBA, 0x29,
|
||||
0xFE, 0x1C,
|
||||
0xC3, 0x44,
|
||||
0x98, 0x4D,
|
||||
0x42,
|
||||
0x6D,
|
||||
0x61,
|
||||
0xB5,
|
||||
0x14,
|
||||
0x27
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
/// <inheritdoc cref="IUnknown.QueryInterface"/>
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace ABI.Microsoft.Graphics.Canvas;
|
||||
/// <summary>
|
||||
/// The activation factory for <see cref="global::Microsoft.Graphics.Canvas.CanvasDevice"/>.
|
||||
/// </summary>
|
||||
[Guid("695C440D-04B3-4EDD-BFD9-63E51E9F7202")]
|
||||
[NativeTypeName("class ICanvasFactoryNative : public IInspectable")]
|
||||
[NativeInheritance("IInspectable")]
|
||||
internal unsafe struct ICanvasFactoryNative
|
||||
|
||||
@@ -5,18 +5,41 @@ using ComputeSharp.Win32;
|
||||
using WinRT;
|
||||
using WinRT.Interop;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
#pragma warning disable CS0649, IDE0055, IDE1006
|
||||
|
||||
namespace ABI.Microsoft.Graphics.Canvas;
|
||||
|
||||
/// <summary>
|
||||
/// An interop Win2D interface for all images and effects that can be drawn.
|
||||
/// </summary>
|
||||
[Guid("E042D1F7-F9AD-4479-A713-67627EA31863")]
|
||||
[NativeTypeName("class ICanvasImageInterop : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe struct ICanvasImageInterop
|
||||
internal unsafe struct ICanvasImageInterop : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xF7, 0xD1, 0x42, 0xE0,
|
||||
0xAD, 0xF9,
|
||||
0x79, 0x44,
|
||||
0xA7, 0x13,
|
||||
0x67,
|
||||
0x62,
|
||||
0x7E,
|
||||
0xA3,
|
||||
0x18,
|
||||
0x63
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -3,18 +3,42 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
#pragma warning disable CS0649, IDE0055, IDE1006
|
||||
|
||||
namespace ABI.Microsoft.Graphics.Canvas;
|
||||
|
||||
/// <summary>
|
||||
/// The native WinRT interface for <see cref="global::Microsoft.Graphics.Canvas.ICanvasResourceCreator"/> objects.
|
||||
/// </summary>
|
||||
[Guid("8F6D8AA8-492F-4BC6-B3D0-E7F5EAE84B11")]
|
||||
[NativeTypeName("class ICanvasResourceCreator : IInspectable")]
|
||||
[NativeInheritance("IInspectable")]
|
||||
internal unsafe struct ICanvasResourceCreator
|
||||
internal unsafe struct ICanvasResourceCreator : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xA8, 0x8A, 0x6D, 0x8F,
|
||||
0x2F, 0x49,
|
||||
0xC6, 0x4B,
|
||||
0xB3,
|
||||
0xD0,
|
||||
0xE7,
|
||||
0xF5,
|
||||
0xEA,
|
||||
0xE8,
|
||||
0x4B,
|
||||
0x11
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
/// <inheritdoc cref="IUnknown.QueryInterface"/>
|
||||
|
||||
+27
-3
@@ -3,18 +3,42 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
#pragma warning disable CS0649, IDE0055, IDE1006
|
||||
|
||||
namespace ABI.Microsoft.Graphics.Canvas;
|
||||
|
||||
/// <summary>
|
||||
/// The native WinRT interface for <see cref="global::Microsoft.Graphics.Canvas.ICanvasResourceCreatorWithDpi"/> objects.
|
||||
/// </summary>
|
||||
[Guid("1A75B512-E9FA-49E6-A876-38CAE194013E")]
|
||||
[NativeTypeName("class ICanvasResourceCreatorWithDpi : IInspectable")]
|
||||
[NativeInheritance("IInspectable")]
|
||||
internal unsafe struct ICanvasResourceCreatorWithDpi
|
||||
internal unsafe struct ICanvasResourceCreatorWithDpi : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x12, 0xB5, 0x75, 0x1A,
|
||||
0xFA, 0xE9,
|
||||
0xE6, 0x49,
|
||||
0xA8,
|
||||
0x76,
|
||||
0x38,
|
||||
0xCA,
|
||||
0xE1,
|
||||
0x94,
|
||||
0x01,
|
||||
0x3E
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
/// <inheritdoc cref="IUnknown.QueryInterface"/>
|
||||
|
||||
+27
-3
@@ -3,18 +3,42 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
#pragma warning disable CS0649, IDE0055, IDE1006
|
||||
|
||||
namespace ABI.Microsoft.Graphics.Canvas;
|
||||
|
||||
/// <summary>
|
||||
/// An interop wrapper type for Win2D objects (see <see href="https://microsoft.github.io/Win2D/WinUI3/html/Interop.htm"/>).
|
||||
/// </summary>
|
||||
[Guid("5F10688D-EA55-4D55-A3B0-4DDB55C0C20A")]
|
||||
[NativeTypeName("class ICanvasResourceWrapperNative : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe struct ICanvasResourceWrapperNative
|
||||
internal unsafe struct ICanvasResourceWrapperNative : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x8D, 0x68, 0x10, 0x5F,
|
||||
0x55, 0xEA,
|
||||
0x55, 0x4D,
|
||||
0xA3,
|
||||
0xB0,
|
||||
0x4D,
|
||||
0xDB,
|
||||
0x55,
|
||||
0xC0,
|
||||
0xC2,
|
||||
0x0A
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
/// <inheritdoc cref="IUnknown.QueryInterface"/>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
@@ -10,7 +9,6 @@ namespace ABI.Microsoft.Graphics.Canvas;
|
||||
/// <summary>
|
||||
/// An interface for a COM object that provides access to a pooled <see cref="ID2D1DeviceContext"/> object.
|
||||
/// </summary>
|
||||
[Guid("A0928F38-F7D5-44DD-A5C9-E23D94734BBB")]
|
||||
[NativeTypeName("class ID2D1DeviceContextLease : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe struct ID2D1DeviceContextLease
|
||||
|
||||
@@ -3,18 +3,42 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
#pragma warning disable CS0649, IDE0055, IDE1006
|
||||
|
||||
namespace ABI.Microsoft.Graphics.Canvas;
|
||||
|
||||
/// <summary>
|
||||
/// An interface for an object that provides access to pooled <see cref="ID2D1DeviceContext"/> objects.
|
||||
/// </summary>
|
||||
[Guid("454A82A1-F024-40DB-BD5B-8F527FD58AD0")]
|
||||
[NativeTypeName("class ID2D1DeviceContextPool : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe struct ID2D1DeviceContextPool
|
||||
internal unsafe struct ID2D1DeviceContextPool : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xA1, 0x82, 0x4A, 0x45,
|
||||
0x24, 0xF0,
|
||||
0xDB, 0x40,
|
||||
0xBD,
|
||||
0x5B,
|
||||
0x8F,
|
||||
0x52,
|
||||
0x7F,
|
||||
0xD5,
|
||||
0x8A,
|
||||
0xD0
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
/// <inheritdoc cref="IUnknown.QueryInterface"/>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
|
||||
@@ -14,7 +13,6 @@ namespace ComputeSharp.Win32;
|
||||
/// <summary>
|
||||
/// The native WinRT interface for <see href="https://learn.microsoft.com/windows/win32/api/inspectable/nn-inspectable-iinspectable"><c>IInspectable</c></see> objects.
|
||||
/// </summary>
|
||||
[Guid("AF86E2E0-B12D-4C6A-9C5A-D7AA65101E90")]
|
||||
[NativeTypeName("struct IInspectable : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe struct IInspectable
|
||||
|
||||
@@ -71,7 +71,7 @@ internal static unsafe class IUnknownExtensions
|
||||
/// <returns>The <see cref="HRESULT"/> for the operation.</returns>
|
||||
public static HRESULT CopyTo<T, U>(this ref T source, U** destination)
|
||||
where T : unmanaged // IUnknown
|
||||
where U : unmanaged // IUnknown
|
||||
where U : unmanaged, IComObject
|
||||
{
|
||||
using ComPtr<T> temporary = new((T*)Unsafe.AsPointer(ref source));
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ internal static unsafe class RcwMarshaller
|
||||
/// <remarks>This method should only be called with <typeparamref name="TFrom"/> being a projected interface type.</remarks>
|
||||
public static HRESULT GetNativeInterface<TFrom, TTo>(TFrom managedObject, TTo** nativeObject)
|
||||
where TFrom : class
|
||||
where TTo : unmanaged // IUnknown
|
||||
where TTo : unmanaged, IComObject
|
||||
{
|
||||
using ComPtr<IUnknown> unknownObject = default;
|
||||
|
||||
|
||||
+2
-2
@@ -167,7 +167,7 @@ internal unsafe partial struct D2D1ResourceTextureManagerImpl
|
||||
|
||||
// ID2D1ResourceTextureManager
|
||||
if (riid->Equals(Windows.__uuidof<IUnknown>()) ||
|
||||
riid->Equals(ID2D1ResourceTextureManager.Guid))
|
||||
riid->Equals(Windows.__uuidof<ID2D1ResourceTextureManager>()))
|
||||
{
|
||||
_ = Interlocked.Increment(ref this.referenceCount);
|
||||
|
||||
@@ -177,7 +177,7 @@ internal unsafe partial struct D2D1ResourceTextureManagerImpl
|
||||
}
|
||||
|
||||
// ID2D1ResourceTextureManagerInternal
|
||||
if (riid->Equals(ID2D1ResourceTextureManagerInternal.Guid))
|
||||
if (riid->Equals(Windows.__uuidof<ID2D1ResourceTextureManagerInternal>()))
|
||||
{
|
||||
_ = Interlocked.Increment(ref this.referenceCount);
|
||||
|
||||
|
||||
+9
-10
@@ -3,24 +3,23 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable CS0649
|
||||
#pragma warning disable CS0649, IDE0055
|
||||
|
||||
namespace ComputeSharp.D2D1.Shaders.Interop.Effects.ResourceManagers;
|
||||
|
||||
/// <summary>
|
||||
/// The resource texture manager type to use with built-in effects.
|
||||
/// </summary>
|
||||
[Guid("3C4FC7E4-A419-46CA-B5F6-66EB4FF18D64")]
|
||||
internal unsafe struct ID2D1ResourceTextureManager
|
||||
internal unsafe struct ID2D1ResourceTextureManager : IComObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the <see cref="System.Guid"/> for <see cref="ID2D1ResourceTextureManager"/> (<c>3C4FC7E4-A419-46CA-B5F6-66EB4FF18D64</c>).
|
||||
/// </summary>
|
||||
public static ref readonly Guid Guid
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xE4, 0xC7, 0x4F, 0x3C,
|
||||
0x19, 0xA4,
|
||||
0xCA, 0x46,
|
||||
@@ -31,9 +30,9 @@ internal unsafe struct ID2D1ResourceTextureManager
|
||||
0xF1,
|
||||
0x8D,
|
||||
0x64
|
||||
};
|
||||
];
|
||||
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
-10
@@ -3,24 +3,23 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable CS0649
|
||||
#pragma warning disable CS0649, IDE0055
|
||||
|
||||
namespace ComputeSharp.D2D1.Shaders.Interop.Effects.ResourceManagers;
|
||||
|
||||
/// <summary>
|
||||
/// The internal resource texture manager type to use with built-in effects.
|
||||
/// </summary>
|
||||
[Guid("5CBB1024-8EA1-4689-81BF-8AD190B5EF5D")]
|
||||
internal unsafe struct ID2D1ResourceTextureManagerInternal
|
||||
internal unsafe struct ID2D1ResourceTextureManagerInternal : IComObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the <see cref="System.Guid"/> for <see cref="ID2D1ResourceTextureManagerInternal"/> (<c>5CBB1024-8EA1-4689-81BF-8AD190B5EF5D</c>).
|
||||
/// </summary>
|
||||
public static ref readonly Guid Guid
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x24, 0x10, 0xBB, 0x5C,
|
||||
0xA1, 0x8E,
|
||||
0x89, 0x46,
|
||||
@@ -31,9 +30,9 @@ internal unsafe struct ID2D1ResourceTextureManagerInternal
|
||||
0xB5,
|
||||
0xEF,
|
||||
0x5D
|
||||
};
|
||||
];
|
||||
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -132,7 +132,7 @@ internal unsafe partial struct D2D1DrawInfoUpdateContextImpl
|
||||
|
||||
// ID2D1DrawInfoUpdateContext
|
||||
if (riid->Equals(Windows.__uuidof<IUnknown>()) ||
|
||||
riid->Equals(ID2D1DrawInfoUpdateContext.Guid))
|
||||
riid->Equals(Windows.__uuidof<ID2D1DrawInfoUpdateContext>()))
|
||||
{
|
||||
_ = Interlocked.Increment(ref this.referenceCount);
|
||||
|
||||
@@ -142,7 +142,7 @@ internal unsafe partial struct D2D1DrawInfoUpdateContextImpl
|
||||
}
|
||||
|
||||
// ID2D1DrawInfoUpdateContextInternal
|
||||
if (riid->Equals(ID2D1DrawInfoUpdateContextInternal.Guid))
|
||||
if (riid->Equals(Windows.__uuidof<ID2D1DrawInfoUpdateContextInternal>()))
|
||||
{
|
||||
_ = Interlocked.Increment(ref this.referenceCount);
|
||||
|
||||
|
||||
+2
-2
@@ -139,7 +139,7 @@ internal unsafe partial struct D2D1TransformMapperImpl
|
||||
|
||||
// ID2D1TransformMapper
|
||||
if (riid->Equals(Windows.__uuidof<IUnknown>()) ||
|
||||
riid->Equals(ID2D1TransformMapper.Guid))
|
||||
riid->Equals(Windows.__uuidof<ID2D1TransformMapper>()))
|
||||
{
|
||||
this.referenceCount++;
|
||||
|
||||
@@ -149,7 +149,7 @@ internal unsafe partial struct D2D1TransformMapperImpl
|
||||
}
|
||||
|
||||
// ID2D1TransformMapperInternal
|
||||
if (riid->Equals(ID2D1TransformMapperInternal.Guid))
|
||||
if (riid->Equals(Windows.__uuidof<ID2D1TransformMapperInternal>()))
|
||||
{
|
||||
this.referenceCount++;
|
||||
|
||||
|
||||
+9
-10
@@ -3,24 +3,23 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable CS0649
|
||||
#pragma warning disable CS0649, IDE0055
|
||||
|
||||
namespace ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers;
|
||||
|
||||
/// <summary>
|
||||
/// The updater for <see cref="ID2D1DrawInfo"/> type to use with built-in effects.
|
||||
/// </summary>
|
||||
[Guid("430C5B40-AE16-485F-90E6-4FA4915144B6")]
|
||||
internal unsafe struct ID2D1DrawInfoUpdateContext
|
||||
internal unsafe struct ID2D1DrawInfoUpdateContext : IComObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the <see cref="System.Guid"/> for <see cref="ID2D1DrawInfoUpdateContext"/> (<c>430C5B40-AE16-485F-90E6-4FA4915144B6</c>).
|
||||
/// </summary>
|
||||
public static ref readonly Guid Guid
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x40, 0x5B, 0x0C, 0x43,
|
||||
0x16, 0xAE,
|
||||
0x5F, 0x48,
|
||||
@@ -31,9 +30,9 @@ internal unsafe struct ID2D1DrawInfoUpdateContext
|
||||
0x51,
|
||||
0x44,
|
||||
0xB6
|
||||
};
|
||||
];
|
||||
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
-10
@@ -3,24 +3,23 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable CS0649
|
||||
#pragma warning disable CS0649, IDE0055
|
||||
|
||||
namespace ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers;
|
||||
|
||||
/// <summary>
|
||||
/// An internal version of <see cref="ID2D1DrawInfoUpdateContext"/> that supports being closed, to manage lifetime scopes.
|
||||
/// </summary>
|
||||
[Guid("CF2F5BB0-3F5E-4D6E-8FF1-D9A7EB6C0250")]
|
||||
internal unsafe struct ID2D1DrawInfoUpdateContextInternal
|
||||
internal unsafe struct ID2D1DrawInfoUpdateContextInternal : IComObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the <see cref="System.Guid"/> for <see cref="ID2D1DrawInfoUpdateContextInternal"/> (<c>CF2F5BB0-3F5E-4D6E-8FF1-D9A7EB6C0250</c>).
|
||||
/// </summary>
|
||||
public static ref readonly Guid Guid
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xB0, 0x5B, 0x2F, 0xCF,
|
||||
0x5E, 0x3F,
|
||||
0x6E, 0x4D,
|
||||
@@ -31,9 +30,9 @@ internal unsafe struct ID2D1DrawInfoUpdateContextInternal
|
||||
0x6C,
|
||||
0x02,
|
||||
0x50
|
||||
};
|
||||
];
|
||||
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
-10
@@ -3,24 +3,23 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable CS0649
|
||||
#pragma warning disable CS0649, IDE0055
|
||||
|
||||
namespace ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers;
|
||||
|
||||
/// <summary>
|
||||
/// The transform mapper manager type to use with built-in effects.
|
||||
/// </summary>
|
||||
[Guid("02E6D48D-B892-4FBC-AA54-119203BAB802")]
|
||||
internal unsafe struct ID2D1TransformMapper
|
||||
internal unsafe struct ID2D1TransformMapper : IComObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the <see cref="System.Guid"/> for <see cref="ID2D1TransformMapper"/> (<c>02E6D48D-B892-4FBC-AA54-119203BAB802</c>).
|
||||
/// </summary>
|
||||
public static ref readonly Guid Guid
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x8D, 0xD4, 0xE6, 0x02,
|
||||
0x92, 0xB8,
|
||||
0xBC, 0x4F,
|
||||
@@ -31,9 +30,9 @@ internal unsafe struct ID2D1TransformMapper
|
||||
0xBA,
|
||||
0xB8,
|
||||
0x02
|
||||
};
|
||||
];
|
||||
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
-10
@@ -3,24 +3,23 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.Win32;
|
||||
|
||||
#pragma warning disable CS0649
|
||||
#pragma warning disable CS0649, IDE0055
|
||||
|
||||
namespace ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers;
|
||||
|
||||
/// <summary>
|
||||
/// The internal transform mapper manager interface.
|
||||
/// </summary>
|
||||
[Guid("C5D8FC65-FB86-4C2D-9EF5-95AEC639C952")]
|
||||
internal unsafe struct ID2D1TransformMapperInternal
|
||||
internal unsafe struct ID2D1TransformMapperInternal : IComObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the <see cref="System.Guid"/> for <see cref="ID2D1TransformMapper"/> (<c>C5D8FC65-FB86-4C2D-9EF5-95AEC639C952</c>).
|
||||
/// </summary>
|
||||
public static ref readonly Guid Guid
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x65, 0xFC, 0xD8, 0xC5,
|
||||
0x86, 0xFB,
|
||||
0x2D, 0x4C,
|
||||
@@ -31,9 +30,9 @@ internal unsafe struct ID2D1TransformMapperInternal
|
||||
0x39,
|
||||
0xC9,
|
||||
0x52
|
||||
};
|
||||
];
|
||||
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ internal unsafe struct ID3D12AllocationImpl
|
||||
}
|
||||
|
||||
if (riid->Equals(Windows.__uuidof<IUnknown>()) ||
|
||||
riid->Equals(ID3D12Allocation.Guid))
|
||||
riid->Equals(Windows.__uuidof<ID3D12Allocation>()))
|
||||
{
|
||||
_ = Interlocked.Increment(ref @this->referenceCount);
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ internal unsafe struct ID3D12MemoryAllocatorFactoryImpl
|
||||
}
|
||||
|
||||
if (riid->Equals(Windows.__uuidof<IUnknown>()) ||
|
||||
riid->Equals(ID3D12MemoryAllocatorFactory.Guid))
|
||||
riid->Equals(Windows.__uuidof<ID3D12MemoryAllocatorFactory>()))
|
||||
{
|
||||
_ = Interlocked.Increment(ref this.referenceCount);
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ internal unsafe struct ID3D12MemoryAllocatorImpl
|
||||
}
|
||||
|
||||
if (riid->Equals(Windows.__uuidof<IUnknown>()) ||
|
||||
riid->Equals(ID3D12MemoryAllocator.Guid))
|
||||
riid->Equals(Windows.__uuidof<ID3D12MemoryAllocator>()))
|
||||
{
|
||||
_ = Interlocked.Increment(ref @this->referenceCount);
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ dotnet_diagnostic.IDE0032.severity = none
|
||||
dotnet_diagnostic.IDE0045.severity = none
|
||||
dotnet_diagnostic.IDE0046.severity = none
|
||||
dotnet_diagnostic.IDE0047.severity = none
|
||||
dotnet_diagnostic.IDE0055.severity = none
|
||||
dotnet_diagnostic.IDE0060.severity = none
|
||||
dotnet_diagnostic.IDE0090.severity = none
|
||||
dotnet_diagnostic.IDE0160.severity = none
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)..\ComputeSharp.Win32.D3D12\DirectX\um\d3dcommon\D3D_TESSELLATOR_DOMAIN.cs" Link="DirectX\um\d3dcommon\D3D_TESSELLATOR_DOMAIN.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)DirectX\um\d3d11shader\ID3D11ShaderReflection.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)DirectX\um\dcommon\D2D_VECTOR_2F.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)..\ComputeSharp.Win32.D3D12\Windows\other\helper-types\IComObject.cs" Link="Windows\other\helper-types\IComObject.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\other\helper-types\HSTRING.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)..\ComputeSharp.Win32.D3D12\Windows\shared\uuids\Windows.Manual.cs" Link="Windows\shared\uuids\Windows.Manual.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)..\ComputeSharp.Win32.D3D12\ComPtr`1.cs" Link="ComPtr`1.cs" />
|
||||
|
||||
@@ -3,12 +3,8 @@
|
||||
// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.22000.0
|
||||
// Original source is Copyright © Microsoft. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("06152247-6F50-465A-9245-118BFD3B6007")]
|
||||
[NativeTypeName("struct ID2D1Factory : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ID2D1Factory
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("65019F75-8DA2-497C-B32C-DFA34E48EDE6")]
|
||||
[NativeTypeName("struct ID2D1Image : ID2D1Resource")]
|
||||
[NativeInheritance("ID2D1Resource")]
|
||||
internal unsafe partial struct ID2D1Image
|
||||
internal unsafe partial struct ID2D1Image : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x75, 0x9F, 0x01, 0x65,
|
||||
0xA2, 0x8D,
|
||||
0x7C, 0x49,
|
||||
0xB3,
|
||||
0x2C,
|
||||
0xDF,
|
||||
0xA3,
|
||||
0x4E,
|
||||
0x48,
|
||||
0xED,
|
||||
0xE6
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
/// <inheritdoc cref="IUnknown.QueryInterface" />
|
||||
|
||||
@@ -4,14 +4,39 @@
|
||||
// Original source is Copyright © Microsoft. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("B4F34A19-2383-4D76-94F6-EC343657C3DC")]
|
||||
[NativeTypeName("struct ID2D1CommandList : ID2D1Image")]
|
||||
[NativeInheritance("ID2D1Image")]
|
||||
internal unsafe partial struct ID2D1CommandList
|
||||
internal unsafe partial struct ID2D1CommandList : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x19, 0x4A, 0xF3, 0xB4,
|
||||
0x83, 0x23,
|
||||
0x76, 0x4D,
|
||||
0x94,
|
||||
0xF6,
|
||||
0xEC,
|
||||
0x34,
|
||||
0x36,
|
||||
0x57,
|
||||
0xC3,
|
||||
0xDC
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
}
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("E8F7FE7A-191C-466D-AD95-975678BDA998")]
|
||||
[NativeTypeName("struct ID2D1DeviceContext : ID2D1RenderTarget")]
|
||||
[NativeInheritance("ID2D1RenderTarget")]
|
||||
internal unsafe partial struct ID2D1DeviceContext
|
||||
|
||||
@@ -3,13 +3,10 @@
|
||||
// Ported from um/d2d1_1.h in the Windows SDK for Windows 10.0.22000.0
|
||||
// Original source is Copyright © Microsoft. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("28211A43-7D89-476F-8181-2D6159B220AD")]
|
||||
[NativeTypeName("struct ID2D1Effect : ID2D1Properties")]
|
||||
[NativeInheritance("ID2D1Properties")]
|
||||
internal unsafe partial struct ID2D1Effect
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("BB12D362-DAEE-4B9A-AA1D-14BA401CFA1F")]
|
||||
[NativeTypeName("struct ID2D1Factory1 : ID2D1Factory")]
|
||||
[NativeInheritance("ID2D1Factory")]
|
||||
internal unsafe partial struct ID2D1Factory1
|
||||
internal unsafe partial struct ID2D1Factory1 : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x62, 0xD3, 0x12, 0xBB,
|
||||
0xEE, 0xDA,
|
||||
0x9A, 0x4B,
|
||||
0xAA,
|
||||
0x1D,
|
||||
0x14,
|
||||
0xBA,
|
||||
0x40,
|
||||
0x1C,
|
||||
0xFA,
|
||||
0x1F
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("31E6E7BC-E0FF-4D46-8C64-A0A8C41C15D3")]
|
||||
[NativeTypeName("struct ID2D1Multithread : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ID2D1Multithread
|
||||
internal unsafe partial struct ID2D1Multithread : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xBC, 0xE7, 0xE6, 0x31,
|
||||
0xFF, 0xE0,
|
||||
0x46, 0x4D,
|
||||
0x8C,
|
||||
0x64,
|
||||
0xA0,
|
||||
0xA8,
|
||||
0xC4,
|
||||
0x1C,
|
||||
0x15,
|
||||
0xD3
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
/// <inheritdoc cref="IUnknown.QueryInterface" />
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("D21768E1-23A4-4823-A14B-7C3EBA85D658")]
|
||||
[NativeTypeName("struct ID2D1Device1 : ID2D1Device")]
|
||||
[NativeInheritance("ID2D1Device")]
|
||||
internal unsafe partial struct ID2D1Device1
|
||||
internal unsafe partial struct ID2D1Device1 : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xE1, 0x68, 0x17, 0xD2,
|
||||
0xA4, 0x23,
|
||||
0x23, 0x48,
|
||||
0xA1,
|
||||
0x4B,
|
||||
0x7C,
|
||||
0x3E,
|
||||
0xBA,
|
||||
0x85,
|
||||
0xD6,
|
||||
0x58
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
/// <inheritdoc cref="IUnknown.QueryInterface" />
|
||||
|
||||
@@ -5,12 +5,10 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using static ComputeSharp.Win32.D2D1_PIXEL_OPTIONS;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("693CE632-7F2F-45DE-93FE-18D88B37AA21")]
|
||||
[NativeTypeName("struct ID2D1DrawInfo : ID2D1RenderInfo")]
|
||||
[NativeInheritance("ID2D1RenderInfo")]
|
||||
internal unsafe partial struct ID2D1DrawInfo
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("36BFDCB6-9739-435D-A30D-A653BEFF6A6F")]
|
||||
[NativeTypeName("struct ID2D1DrawTransform : ID2D1Transform")]
|
||||
[NativeInheritance("ID2D1Transform")]
|
||||
internal unsafe partial struct ID2D1DrawTransform
|
||||
internal unsafe partial struct ID2D1DrawTransform : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xB6, 0xDC, 0xBF, 0x36,
|
||||
0x39, 0x97,
|
||||
0x5D, 0x43,
|
||||
0xA3,
|
||||
0x0D,
|
||||
0xA6,
|
||||
0x53,
|
||||
0xBE,
|
||||
0xFF,
|
||||
0x6A,
|
||||
0x6F
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("3D9F916B-27DC-4AD7-B4F1-64945340F563")]
|
||||
[NativeTypeName("struct ID2D1EffectContext : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ID2D1EffectContext
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("A248FD3F-3E6C-4E63-9F03-7F68ECC91DB9")]
|
||||
[NativeTypeName("struct ID2D1EffectImpl : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ID2D1EffectImpl
|
||||
internal unsafe partial struct ID2D1EffectImpl : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x3F, 0xFD, 0x48, 0xA2,
|
||||
0x6C, 0x3E,
|
||||
0x63, 0x4E,
|
||||
0x9F,
|
||||
0x03,
|
||||
0x7F,
|
||||
0x68,
|
||||
0xEC,
|
||||
0xC9,
|
||||
0x1D,
|
||||
0xB9
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("688D15C3-02B0-438D-B13A-D1B44C32C39A")]
|
||||
[NativeTypeName("struct ID2D1ResourceTexture : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ID2D1ResourceTexture
|
||||
|
||||
@@ -4,14 +4,39 @@
|
||||
// Original source is Copyright © Microsoft. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("EF1A287D-342A-4F76-8FDB-DA0D6EA9F92B")]
|
||||
[NativeTypeName("struct ID2D1Transform : ID2D1TransformNode")]
|
||||
[NativeInheritance("ID2D1TransformNode")]
|
||||
internal unsafe partial struct ID2D1Transform
|
||||
internal unsafe partial struct ID2D1Transform : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x7D, 0x28, 0x1A, 0xEF,
|
||||
0x2A, 0x34,
|
||||
0x76, 0x4F,
|
||||
0x8F,
|
||||
0xDB,
|
||||
0xDA,
|
||||
0x0D,
|
||||
0x6E,
|
||||
0xA9,
|
||||
0xF9,
|
||||
0x2B
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
}
|
||||
@@ -3,13 +3,10 @@
|
||||
// Ported from um/d2d1effectauthor.h in the Windows SDK for Windows 10.0.22000.0
|
||||
// Original source is Copyright © Microsoft. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("13D29038-C3E6-4034-9081-13B53A417992")]
|
||||
[NativeTypeName("struct ID2D1TransformGraph : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ID2D1TransformGraph
|
||||
|
||||
@@ -4,14 +4,39 @@
|
||||
// Original source is Copyright © Microsoft. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("B2EFE1E7-729F-4102-949F-505FA21BF666")]
|
||||
[NativeTypeName("struct ID2D1TransformNode : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ID2D1TransformNode
|
||||
internal unsafe partial struct ID2D1TransformNode : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xE7, 0xE1, 0xEF, 0xB2,
|
||||
0x9F, 0x72,
|
||||
0x02, 0x41,
|
||||
0x94,
|
||||
0x9F,
|
||||
0x50,
|
||||
0x5F,
|
||||
0xA2,
|
||||
0x1B,
|
||||
0xF6,
|
||||
0x66
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
}
|
||||
@@ -17,7 +17,8 @@ internal static partial class CLSID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x20, 0x3C, 0xC2, 0x61,
|
||||
0x69, 0xAE,
|
||||
0x8E, 0x4D,
|
||||
@@ -29,7 +30,7 @@ internal static partial class CLSID
|
||||
0xF6,
|
||||
0x38,
|
||||
0xF2
|
||||
};
|
||||
];
|
||||
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
@@ -41,7 +42,8 @@ internal static partial class CLSID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xC7, 0xC5, 0x26, 0x6C,
|
||||
0xE0, 0x34,
|
||||
0xFC, 0x46,
|
||||
@@ -53,7 +55,7 @@ internal static partial class CLSID
|
||||
0x06,
|
||||
0xE2,
|
||||
0x28
|
||||
};
|
||||
];
|
||||
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("8D536CA1-0CCA-4956-A837-786963755584")]
|
||||
[NativeTypeName("struct ID3D11ShaderReflection : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ID3D11ShaderReflection
|
||||
internal unsafe partial struct ID3D11ShaderReflection : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xA1, 0x6C, 0x53, 0x8D,
|
||||
0xCA, 0x0C,
|
||||
0x56, 0x49,
|
||||
0xA8,
|
||||
0x37,
|
||||
0x78,
|
||||
0x69,
|
||||
0x63,
|
||||
0x75,
|
||||
0x55,
|
||||
0x84
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
/// <inheritdoc cref="IUnknown.QueryInterface" />
|
||||
|
||||
@@ -34,6 +34,7 @@ dotnet_diagnostic.IDE0032.severity = none
|
||||
dotnet_diagnostic.IDE0045.severity = none
|
||||
dotnet_diagnostic.IDE0046.severity = none
|
||||
dotnet_diagnostic.IDE0047.severity = none
|
||||
dotnet_diagnostic.IDE0055.severity = none
|
||||
dotnet_diagnostic.IDE0060.severity = none
|
||||
dotnet_diagnostic.IDE0090.severity = none
|
||||
dotnet_diagnostic.IDE0160.severity = none
|
||||
|
||||
@@ -87,7 +87,7 @@ internal unsafe struct ComPtr<T> : IDisposable
|
||||
/// <param name="ptr">The target raw pointer to copy the address of the current COM object to.</param>
|
||||
/// <returns>The result of <see cref="IUnknown.QueryInterface"/> for the target type <typeparamref name="U"/>.</returns>
|
||||
public readonly HRESULT CopyTo<U>(U** ptr)
|
||||
where U : unmanaged
|
||||
where U : unmanaged, IComObject
|
||||
{
|
||||
return ((IUnknown*)ptr_)->QueryInterface(__uuidof<U>(), (void**)ptr);
|
||||
}
|
||||
@@ -96,7 +96,7 @@ internal unsafe struct ComPtr<T> : IDisposable
|
||||
/// <param name="p">The target raw pointer to copy the address of the current COM object to.</param>
|
||||
/// <returns>The result of <see cref="IUnknown.QueryInterface"/> for the target type <typeparamref name="U"/>.</returns>
|
||||
public readonly HRESULT CopyTo<U>(ComPtr<U>* p)
|
||||
where U : unmanaged
|
||||
where U : unmanaged, IComObject
|
||||
{
|
||||
return ((IUnknown*)ptr_)->QueryInterface(__uuidof<U>(), (void**)p->ReleaseAndGetAddressOf());
|
||||
}
|
||||
@@ -105,7 +105,7 @@ internal unsafe struct ComPtr<T> : IDisposable
|
||||
/// <param name="other">The target reference to copy the address of the current COM object to.</param>
|
||||
/// <returns>The result of <see cref="IUnknown.QueryInterface"/> for the target type <typeparamref name="U"/>.</returns>
|
||||
public readonly HRESULT CopyTo<U>(ref ComPtr<U> other)
|
||||
where U : unmanaged
|
||||
where U : unmanaged, IComObject
|
||||
{
|
||||
U* ptr;
|
||||
HRESULT result = ((IUnknown*)ptr_)->QueryInterface(__uuidof<U>(), (void**)&ptr);
|
||||
|
||||
@@ -215,6 +215,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\other\helper-types\BOOL.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\other\helper-types\HANDLE.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\other\helper-types\HRESULT.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\other\helper-types\IComObject.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\other\helper-types\NativeInheritanceAttribute.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\other\helper-types\NativeTypeNameAttribute.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\other\helper-types\VtblIndexAttribute.cs" />
|
||||
@@ -237,7 +238,6 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\um\objidlbase\STGTY.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\um\handleapi\Windows.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\um\synchapi\Windows.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\um\Unknwnbase\IID.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\um\Unknwnbase\IUnknown.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\um\WinBase\Windows.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows\um\wincodec\CLSID.cs" />
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("2411E7E1-12AC-4CCF-BD14-9798E8534DC0")]
|
||||
[NativeTypeName("struct IDXGIAdapter : IDXGIObject")]
|
||||
[NativeInheritance("IDXGIObject")]
|
||||
internal unsafe partial struct IDXGIAdapter
|
||||
internal unsafe partial struct IDXGIAdapter : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xE1, 0xE7, 0x11, 0x24,
|
||||
0xAC, 0x12,
|
||||
0xCF, 0x4C,
|
||||
0xBD,
|
||||
0x14,
|
||||
0x97,
|
||||
0x98,
|
||||
0xE8,
|
||||
0x53,
|
||||
0x4D,
|
||||
0xC0
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("29038F61-3839-4626-91FD-086879011A05")]
|
||||
[NativeTypeName("struct IDXGIAdapter1 : IDXGIAdapter")]
|
||||
[NativeInheritance("IDXGIAdapter")]
|
||||
internal unsafe partial struct IDXGIAdapter1
|
||||
internal unsafe partial struct IDXGIAdapter1 : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x61, 0x8F, 0x03, 0x29,
|
||||
0x39, 0x38,
|
||||
0x26, 0x46,
|
||||
0x91,
|
||||
0xFD,
|
||||
0x08,
|
||||
0x68,
|
||||
0x79,
|
||||
0x01,
|
||||
0x1A,
|
||||
0x05
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("7B7166EC-21C7-44AE-B21A-C9AE321AE369")]
|
||||
[NativeTypeName("struct IDXGIFactory : IDXGIObject")]
|
||||
[NativeInheritance("IDXGIObject")]
|
||||
internal unsafe partial struct IDXGIFactory
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("AE02EEDB-C735-4690-8D52-5A8DC20213AA")]
|
||||
[NativeTypeName("struct IDXGIOutput : IDXGIObject")]
|
||||
[NativeInheritance("IDXGIObject")]
|
||||
internal unsafe partial struct IDXGIOutput
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("310D36A0-D2E7-4C0A-AA04-6A9D23B8886A")]
|
||||
[NativeTypeName("struct IDXGISwapChain : IDXGIDeviceSubObject")]
|
||||
[NativeInheritance("IDXGIDeviceSubObject")]
|
||||
internal unsafe partial struct IDXGISwapChain
|
||||
internal unsafe partial struct IDXGISwapChain : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xA0, 0x36, 0x0D, 0x31,
|
||||
0xE7, 0xD2,
|
||||
0x0A, 0x4C,
|
||||
0xAA,
|
||||
0x04,
|
||||
0x6A,
|
||||
0x9D,
|
||||
0x23,
|
||||
0xB8,
|
||||
0x88,
|
||||
0x6A
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("00CDDEA8-939B-4B83-A340-A685226666CC")]
|
||||
[NativeTypeName("struct IDXGIOutput1 : IDXGIOutput")]
|
||||
[NativeInheritance("IDXGIOutput")]
|
||||
internal unsafe partial struct IDXGIOutput1
|
||||
internal unsafe partial struct IDXGIOutput1 : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xA8, 0xDE, 0xCD, 0x00,
|
||||
0x9B, 0x93,
|
||||
0x83, 0x4B,
|
||||
0xA3,
|
||||
0x40,
|
||||
0xA6,
|
||||
0x85,
|
||||
0x22,
|
||||
0x66,
|
||||
0x66,
|
||||
0xCC
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("50C83A1C-E072-4C48-87B0-3630FA36A6D0")]
|
||||
[NativeTypeName("struct IDXGIFactory2 : IDXGIFactory1")]
|
||||
[NativeInheritance("IDXGIFactory1")]
|
||||
internal unsafe partial struct IDXGIFactory2
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("790A45F7-0D42-4876-983A-0A55CFE6F4AA")]
|
||||
[NativeTypeName("struct IDXGISwapChain1 : IDXGISwapChain")]
|
||||
[NativeInheritance("IDXGISwapChain")]
|
||||
internal unsafe partial struct IDXGISwapChain1
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("1BC6EA02-EF36-464F-BF0C-21CA39E5168A")]
|
||||
[NativeTypeName("struct IDXGIFactory4 : IDXGIFactory3")]
|
||||
[NativeInheritance("IDXGIFactory3")]
|
||||
internal unsafe partial struct IDXGIFactory4
|
||||
internal unsafe partial struct IDXGIFactory4 : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x02, 0xEA, 0xC6, 0x1B,
|
||||
0x36, 0xEF,
|
||||
0x4F, 0x46,
|
||||
0xBF,
|
||||
0x0C,
|
||||
0x21,
|
||||
0xCA,
|
||||
0x39,
|
||||
0xE5,
|
||||
0x16,
|
||||
0x8A
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -11,11 +11,35 @@ using System.Runtime.Versioning;
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[SupportedOSPlatform("windows10.0")]
|
||||
[Guid("94D99BDB-F1F8-4AB0-B236-7DA0170EDAB1")]
|
||||
[NativeTypeName("struct IDXGISwapChain3 : IDXGISwapChain2")]
|
||||
[NativeInheritance("IDXGISwapChain2")]
|
||||
internal unsafe partial struct IDXGISwapChain3
|
||||
internal unsafe partial struct IDXGISwapChain3 : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xDB, 0x9B, 0xD9, 0x94,
|
||||
0xF8, 0xF1,
|
||||
0xB0, 0x4A,
|
||||
0xB2,
|
||||
0x36,
|
||||
0x7D,
|
||||
0xA0,
|
||||
0x17,
|
||||
0x0E,
|
||||
0xDA,
|
||||
0xB1
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -11,11 +11,35 @@ using System.Runtime.Versioning;
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[SupportedOSPlatform("windows10.0.17134.0")]
|
||||
[Guid("C1B6694F-FF09-44A9-B03C-77900A0A1D17")]
|
||||
[NativeTypeName("struct IDXGIFactory6 : IDXGIFactory5")]
|
||||
[NativeInheritance("IDXGIFactory5")]
|
||||
internal unsafe partial struct IDXGIFactory6
|
||||
internal unsafe partial struct IDXGIFactory6 : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x4F, 0x69, 0xB6, 0xC1,
|
||||
0x09, 0xFF,
|
||||
0xA9, 0x44,
|
||||
0xB0,
|
||||
0x3C,
|
||||
0x77,
|
||||
0x90,
|
||||
0x0A,
|
||||
0x0A,
|
||||
0x1D,
|
||||
0x17
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("6102DEE4-AF59-4B09-B999-B44D73F09B24")]
|
||||
[NativeTypeName("struct ID3D12CommandAllocator : ID3D12Pageable")]
|
||||
[NativeInheritance("ID3D12Pageable")]
|
||||
internal unsafe partial struct ID3D12CommandAllocator
|
||||
internal unsafe partial struct ID3D12CommandAllocator : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xE4, 0xDE, 0x02, 0x61,
|
||||
0x59, 0xAF,
|
||||
0x09, 0x4B,
|
||||
0xB9,
|
||||
0x99,
|
||||
0xB4,
|
||||
0x4D,
|
||||
0x73,
|
||||
0xF0,
|
||||
0x9B,
|
||||
0x24
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("7116D91C-E7E4-47CE-B8C6-EC8168F437E5")]
|
||||
[NativeTypeName("struct ID3D12CommandList : ID3D12DeviceChild")]
|
||||
[NativeInheritance("ID3D12DeviceChild")]
|
||||
internal unsafe partial struct ID3D12CommandList
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("0EC870A6-5D7E-4C22-8CFC-5BAAE07616ED")]
|
||||
[NativeTypeName("struct ID3D12CommandQueue : ID3D12Pageable")]
|
||||
[NativeInheritance("ID3D12Pageable")]
|
||||
internal unsafe partial struct ID3D12CommandQueue
|
||||
internal unsafe partial struct ID3D12CommandQueue : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xA6, 0x70, 0xC8, 0x0E,
|
||||
0x7E, 0x5D,
|
||||
0x22, 0x4C,
|
||||
0x8C,
|
||||
0xFC,
|
||||
0x5B,
|
||||
0xAA,
|
||||
0xE0,
|
||||
0x76,
|
||||
0x16,
|
||||
0xED
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("8EFB471D-616C-4F49-90F7-127BB763FA51")]
|
||||
[NativeTypeName("struct ID3D12DescriptorHeap : ID3D12Pageable")]
|
||||
[NativeInheritance("ID3D12Pageable")]
|
||||
internal unsafe partial struct ID3D12DescriptorHeap
|
||||
internal unsafe partial struct ID3D12DescriptorHeap : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x1D, 0x47, 0xFB, 0x8E,
|
||||
0x6C, 0x61,
|
||||
0x49, 0x4F,
|
||||
0x90,
|
||||
0xF7,
|
||||
0x12,
|
||||
0x7B,
|
||||
0xB7,
|
||||
0x63,
|
||||
0xFA,
|
||||
0x51
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("189819F1-1DB6-4B57-BE54-1821339B85F7")]
|
||||
[NativeTypeName("struct ID3D12Device : ID3D12Object")]
|
||||
[NativeInheritance("ID3D12Object")]
|
||||
internal unsafe partial struct ID3D12Device
|
||||
internal unsafe partial struct ID3D12Device : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xF1, 0x19, 0x98, 0x18,
|
||||
0xB6, 0x1D,
|
||||
0x57, 0x4B,
|
||||
0xBE,
|
||||
0x54,
|
||||
0x18,
|
||||
0x21,
|
||||
0x33,
|
||||
0x9B,
|
||||
0x85,
|
||||
0xF7
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("9727A022-CF1D-4DDA-9EBA-EFFA653FC506")]
|
||||
[NativeTypeName("struct ID3D12DeviceRemovedExtendedData1 : ID3D12DeviceRemovedExtendedData")]
|
||||
[NativeInheritance("ID3D12DeviceRemovedExtendedData")]
|
||||
internal unsafe partial struct ID3D12DeviceRemovedExtendedData1
|
||||
internal unsafe partial struct ID3D12DeviceRemovedExtendedData1 : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x22, 0xA0, 0x27, 0x97,
|
||||
0x1D, 0xCF,
|
||||
0xDA, 0x4D,
|
||||
0x9E,
|
||||
0xBA,
|
||||
0xEF,
|
||||
0xFA,
|
||||
0x65,
|
||||
0x3F,
|
||||
0xC5,
|
||||
0x06
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
+26
-2
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("DBD5AE51-3317-4F0A-ADF9-1D7CEDCAAE0B")]
|
||||
[NativeTypeName("struct ID3D12DeviceRemovedExtendedDataSettings1 : ID3D12DeviceRemovedExtendedDataSettings")]
|
||||
[NativeInheritance("ID3D12DeviceRemovedExtendedDataSettings")]
|
||||
internal unsafe partial struct ID3D12DeviceRemovedExtendedDataSettings1
|
||||
internal unsafe partial struct ID3D12DeviceRemovedExtendedDataSettings1 : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x51, 0xAE, 0xD5, 0xDB,
|
||||
0x17, 0x33,
|
||||
0x0A, 0x4F,
|
||||
0xAD,
|
||||
0xF9,
|
||||
0x1D,
|
||||
0x7C,
|
||||
0xED,
|
||||
0xCA,
|
||||
0xAE,
|
||||
0x0B
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("0A753DCF-C4D8-4B91-ADF6-BE5A60D95A76")]
|
||||
[NativeTypeName("struct ID3D12Fence : ID3D12Pageable")]
|
||||
[NativeInheritance("ID3D12Pageable")]
|
||||
internal unsafe partial struct ID3D12Fence
|
||||
internal unsafe partial struct ID3D12Fence : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xCF, 0x3D, 0x75, 0x0A,
|
||||
0xD8, 0xC4,
|
||||
0x91, 0x4B,
|
||||
0xAD,
|
||||
0xF6,
|
||||
0xBE,
|
||||
0x5A,
|
||||
0x60,
|
||||
0xD9,
|
||||
0x5A,
|
||||
0x76
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("5B160D0F-AC1B-4185-8BA8-B3AE42A5A455")]
|
||||
[NativeTypeName("struct ID3D12GraphicsCommandList : ID3D12CommandList")]
|
||||
[NativeInheritance("ID3D12CommandList")]
|
||||
internal unsafe partial struct ID3D12GraphicsCommandList
|
||||
internal unsafe partial struct ID3D12GraphicsCommandList : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x0F, 0x0D, 0x16, 0x5B,
|
||||
0x1B, 0xAC,
|
||||
0x85, 0x41,
|
||||
0x8B,
|
||||
0xA8,
|
||||
0xB3,
|
||||
0xAE,
|
||||
0x42,
|
||||
0xA5,
|
||||
0xA4,
|
||||
0x55
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("6B3B2502-6E51-45B3-90EE-9884265E8DF3")]
|
||||
[NativeTypeName("struct ID3D12Heap : ID3D12Pageable")]
|
||||
[NativeInheritance("ID3D12Pageable")]
|
||||
internal unsafe partial struct ID3D12Heap
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("765A30F3-F624-4C6F-A828-ACE948622445")]
|
||||
[NativeTypeName("struct ID3D12PipelineState : ID3D12Pageable")]
|
||||
[NativeInheritance("ID3D12Pageable")]
|
||||
internal unsafe partial struct ID3D12PipelineState
|
||||
internal unsafe partial struct ID3D12PipelineState : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xF3, 0x30, 0x5A, 0x76,
|
||||
0x24, 0xF6,
|
||||
0x6F, 0x4C,
|
||||
0xA8,
|
||||
0x28,
|
||||
0xAC,
|
||||
0xE9,
|
||||
0x48,
|
||||
0x62,
|
||||
0x24,
|
||||
0x45
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("696442BE-A72E-4059-BC79-5B5C98040FAD")]
|
||||
[NativeTypeName("struct ID3D12Resource : ID3D12Pageable")]
|
||||
[NativeInheritance("ID3D12Pageable")]
|
||||
internal unsafe partial struct ID3D12Resource
|
||||
internal unsafe partial struct ID3D12Resource : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xBE, 0x42, 0x64, 0x69,
|
||||
0x2E, 0xA7,
|
||||
0x59, 0x40,
|
||||
0xBC,
|
||||
0x79,
|
||||
0x5B,
|
||||
0x5C,
|
||||
0x98,
|
||||
0x04,
|
||||
0x0F,
|
||||
0xAD
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("C54A6B66-72DF-4EE8-8BE5-A946A1429214")]
|
||||
[NativeTypeName("struct ID3D12RootSignature : ID3D12DeviceChild")]
|
||||
[NativeInheritance("ID3D12DeviceChild")]
|
||||
internal unsafe partial struct ID3D12RootSignature
|
||||
internal unsafe partial struct ID3D12RootSignature : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x66, 0x6B, 0x4A, 0xC5,
|
||||
0xDF, 0x72,
|
||||
0xE8, 0x4E,
|
||||
0x8B,
|
||||
0xE5,
|
||||
0xA9,
|
||||
0x46,
|
||||
0xA1,
|
||||
0x42,
|
||||
0x92,
|
||||
0x14
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("344488B7-6846-474B-B989-F027448245E0")]
|
||||
[NativeTypeName("struct ID3D12Debug : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ID3D12Debug
|
||||
internal unsafe partial struct ID3D12Debug : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xB7, 0x88, 0x44, 0x34,
|
||||
0x46, 0x68,
|
||||
0x4B, 0x47,
|
||||
0xB9,
|
||||
0x89,
|
||||
0xF0,
|
||||
0x27,
|
||||
0x44,
|
||||
0x82,
|
||||
0x45,
|
||||
0xE0
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("AFFAA4CA-63FE-4D8E-B8AD-159000AF4304")]
|
||||
[NativeTypeName("struct ID3D12Debug1 : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ID3D12Debug1
|
||||
internal unsafe partial struct ID3D12Debug1 : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xCA, 0xA4, 0xFA, 0xAF,
|
||||
0xFE, 0x63,
|
||||
0x8E, 0x4D,
|
||||
0xB8,
|
||||
0xAD,
|
||||
0x15,
|
||||
0x90,
|
||||
0x00,
|
||||
0xAF,
|
||||
0x43,
|
||||
0x04
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("0742A90B-C387-483F-B946-30A7E4E61458")]
|
||||
[NativeTypeName("struct ID3D12InfoQueue : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ID3D12InfoQueue
|
||||
internal unsafe partial struct ID3D12InfoQueue : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x0B, 0xA9, 0x42, 0x07,
|
||||
0x87, 0xC3,
|
||||
0x3F, 0x48,
|
||||
0xB9,
|
||||
0x46,
|
||||
0x30,
|
||||
0xA7,
|
||||
0xE4,
|
||||
0xE6,
|
||||
0x14,
|
||||
0x58
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("5A58797D-A72C-478D-8BA2-EFC6B0EFE88E")]
|
||||
[NativeTypeName("struct ID3D12ShaderReflection : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ID3D12ShaderReflection
|
||||
internal unsafe partial struct ID3D12ShaderReflection : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x7D, 0x79, 0x58, 0x5A,
|
||||
0x2C, 0xA7,
|
||||
0x8D, 0x47,
|
||||
0x8B,
|
||||
0xA2,
|
||||
0xEF,
|
||||
0xC6,
|
||||
0xB0,
|
||||
0xEF,
|
||||
0xE8,
|
||||
0x8E
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("8BA5FB08-5195-40E2-AC58-0D989C3A0102")]
|
||||
[NativeTypeName("struct ID3D10Blob : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ID3DBlob
|
||||
|
||||
@@ -18,7 +18,8 @@ internal static partial class CLSID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xAF, 0xD6, 0x45, 0x62,
|
||||
0xE0, 0x66,
|
||||
0xFD, 0x48,
|
||||
@@ -30,7 +31,7 @@ internal static partial class CLSID
|
||||
0x96,
|
||||
0x74,
|
||||
0x8C
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
|
||||
@@ -9,11 +9,35 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("4605C4CB-2019-492A-ADA4-65F20BB7D67F")]
|
||||
[NativeTypeName("struct IDxcUtils : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct IDxcUtils
|
||||
internal unsafe partial struct IDxcUtils : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xCB, 0xC4, 0x05, 0x46,
|
||||
0x19, 0x20,
|
||||
0x2A, 0x49,
|
||||
0xAD,
|
||||
0xA4,
|
||||
0x65,
|
||||
0xF2,
|
||||
0x0B,
|
||||
0xB7,
|
||||
0xD6,
|
||||
0x7F
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
-2
@@ -5,13 +5,11 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[SupportedOSPlatform("windows8.1")]
|
||||
[Guid("F92F19D2-3ADE-45A6-A20C-F6F1EA90554B")]
|
||||
[NativeTypeName("struct ISwapChainPanelNative : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct ISwapChainPanelNative
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
/// <summary>
|
||||
/// An interface for a COM object, with a specific IID.
|
||||
/// </summary>
|
||||
internal unsafe interface IComObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a pointer to the IID for the object type.
|
||||
/// </summary>
|
||||
static abstract Guid* IID { get; }
|
||||
}
|
||||
@@ -7,50 +7,28 @@ using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
#pragma warning disable IDE1006
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
internal static partial class Windows
|
||||
{
|
||||
/// <summary>Retrieves the GUID of of a specified type.</summary>
|
||||
/// <param name="value">A value of type <typeparamref name="T"/>.</param>
|
||||
/// <typeparam name="T">The type to retrieve the GUID for.</typeparam>
|
||||
/// <returns>A <see cref="UuidOfType"/> value wrapping a pointer to the GUID data for the input type. This value can be either converted to a <see cref="Guid"/> pointer, or implicitly assigned to a <see cref="Guid"/> value.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static unsafe UuidOfType __uuidof<T>(T value) // for type inference similar to C++'s __uuidof
|
||||
where T : unmanaged
|
||||
{
|
||||
return new UuidOfType(UUID<T>.RIID);
|
||||
}
|
||||
|
||||
/// <summary>Retrieves the GUID of of a specified type.</summary>
|
||||
/// <param name="value">A pointer to a value of type <typeparamref name="T"/>.</param>
|
||||
/// <typeparam name="T">The type to retrieve the GUID for.</typeparam>
|
||||
/// <returns>A <see cref="UuidOfType"/> value wrapping a pointer to the GUID data for the input type. This value can be either converted to a <see cref="Guid"/> pointer, or implicitly assigned to a <see cref="Guid"/> value.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static unsafe UuidOfType __uuidof<T>(T* value) // for type inference similar to C++'s __uuidof
|
||||
where T : unmanaged
|
||||
{
|
||||
return new UuidOfType(UUID<T>.RIID);
|
||||
}
|
||||
|
||||
/// <summary>Retrieves the GUID of of a specified type.</summary>
|
||||
/// <typeparam name="T">The type to retrieve the GUID for.</typeparam>
|
||||
/// <returns>A <see cref="UuidOfType"/> value wrapping a pointer to the GUID data for the input type. This value can be either converted to a <see cref="Guid"/> pointer, or implicitly assigned to a <see cref="Guid"/> value.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static unsafe UuidOfType __uuidof<T>()
|
||||
where T : unmanaged
|
||||
where T : unmanaged, IComObject
|
||||
{
|
||||
return new UuidOfType(UUID<T>.RIID);
|
||||
return new UuidOfType(T.IID);
|
||||
}
|
||||
|
||||
/// <summary>A proxy type that wraps a pointer to GUID data. Values of this type can be implicitly converted to and assigned to <see cref="Guid"/>* or <see cref="Guid"/> parameters.</summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
|
||||
public readonly unsafe ref struct UuidOfType
|
||||
{
|
||||
private readonly Guid* riid;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal UuidOfType(Guid* riid)
|
||||
{
|
||||
this.riid = riid;
|
||||
@@ -58,29 +36,12 @@ internal static partial class Windows
|
||||
|
||||
/// <summary>Reads a <see cref="Guid"/> value from the GUID buffer for a given <see cref="UuidOfType"/> instance.</summary>
|
||||
/// <param name="guid">The input <see cref="UuidOfType"/> instance to read data for.</param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static implicit operator Guid(UuidOfType guid) => *guid.riid;
|
||||
|
||||
/// <summary>Returns the <see cref="Guid"/>* pointer to the GUID buffer for a given <see cref="UuidOfType"/> instance.</summary>
|
||||
/// <param name="guid">The input <see cref="UuidOfType"/> instance to read data for.</param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static implicit operator Guid*(UuidOfType guid) => guid.riid;
|
||||
}
|
||||
|
||||
/// <summary>A helper type to provide static GUID buffers for specific types.</summary>
|
||||
/// <typeparam name="T">The type to allocate a GUID buffer for.</typeparam>
|
||||
private static unsafe class UUID<T>
|
||||
where T : unmanaged
|
||||
{
|
||||
/// <summary>The pointer to the <see cref="Guid"/> value for the current type.</summary>
|
||||
/// <remarks>The target memory area should never be written to.</remarks>
|
||||
public static readonly Guid* RIID = CreateRIID();
|
||||
|
||||
/// <summary>Allocates memory for a <see cref="Guid"/> value and initializes it.</summary>
|
||||
/// <returns>A pointer to memory holding the <see cref="Guid"/> value for the current type.</returns>
|
||||
private static Guid* CreateRIID()
|
||||
{
|
||||
var p = (Guid*)RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(T), sizeof(Guid));
|
||||
*p = typeof(T).GUID;
|
||||
return p;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from um/Unknwnbase.h in the Windows SDK for Windows 10.0.20348.0
|
||||
// Original source is Copyright © Microsoft. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
internal static partial class IID
|
||||
{
|
||||
public static ref readonly Guid IID_IUnknown
|
||||
{
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0xC0,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x46
|
||||
};
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,33 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("00000000-0000-0000-C000-000000000046")]
|
||||
internal unsafe partial struct IUnknown
|
||||
internal unsafe partial struct IUnknown : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0xC0,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x46
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -14,9 +14,11 @@ internal static partial class IID
|
||||
{
|
||||
public static ref readonly Guid IID_ISequentialStream
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x30, 0x3A, 0x73, 0x0C,
|
||||
0x1C, 0x2A,
|
||||
0xCE, 0x11,
|
||||
@@ -28,7 +30,7 @@ internal static partial class IID
|
||||
0x44,
|
||||
0x77,
|
||||
0x3D
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
@@ -37,9 +39,11 @@ internal static partial class IID
|
||||
|
||||
public static ref readonly Guid IID_IStream
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x0C, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
@@ -51,7 +55,7 @@ internal static partial class IID
|
||||
0x00,
|
||||
0x00,
|
||||
0x46
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("0000000C-0000-0000-C000-000000000046")]
|
||||
[NativeTypeName("struct IStream : ISequentialStream")]
|
||||
[NativeInheritance("ISequentialStream")]
|
||||
internal unsafe partial struct IStream
|
||||
|
||||
@@ -18,7 +18,8 @@ internal static partial class GUID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x7E, 0xD8, 0xF1, 0x0A,
|
||||
0xFE, 0xFC,
|
||||
0x88, 0x41,
|
||||
@@ -30,7 +31,7 @@ internal static partial class GUID
|
||||
0x71,
|
||||
0xCB,
|
||||
0xE3
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
@@ -43,7 +44,8 @@ internal static partial class GUID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xF4, 0xFA, 0x7C, 0x1B,
|
||||
0x3F, 0x71,
|
||||
0x3C, 0x47,
|
||||
@@ -55,7 +57,7 @@ internal static partial class GUID
|
||||
0x5F,
|
||||
0xAE,
|
||||
0xAF
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
@@ -68,7 +70,8 @@ internal static partial class GUID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xAA, 0xA5, 0xE4, 0x19,
|
||||
0x62, 0x56,
|
||||
0xC5, 0x4F,
|
||||
@@ -80,7 +83,7 @@ internal static partial class GUID
|
||||
0x8E,
|
||||
0x10,
|
||||
0x57
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
@@ -93,7 +96,8 @@ internal static partial class GUID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x30, 0xCC, 0x3B, 0x16,
|
||||
0xE9, 0xE2,
|
||||
0x0B, 0x4F,
|
||||
@@ -105,7 +109,7 @@ internal static partial class GUID
|
||||
0xB7,
|
||||
0x88,
|
||||
0xA3
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
@@ -118,7 +122,8 @@ internal static partial class GUID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0xAA, 0x7C, 0xA3, 0x57,
|
||||
0x7A, 0x36,
|
||||
0x40, 0x45,
|
||||
@@ -130,7 +135,7 @@ internal static partial class GUID
|
||||
0x09,
|
||||
0x3A,
|
||||
0x4B
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
@@ -143,7 +148,8 @@ internal static partial class GUID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x95, 0xCB, 0x67, 0x99,
|
||||
0x85, 0x2E,
|
||||
0xC8, 0x4A,
|
||||
@@ -155,7 +161,7 @@ internal static partial class GUID
|
||||
0xD4,
|
||||
0x25,
|
||||
0xC9
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
@@ -168,7 +174,8 @@ internal static partial class GUID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x24, 0xC3, 0xDD, 0x6F,
|
||||
0x03, 0x4E,
|
||||
0xFE, 0x4B,
|
||||
@@ -180,7 +187,7 @@ internal static partial class GUID
|
||||
0x8D,
|
||||
0xC9,
|
||||
0x08
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
@@ -193,7 +200,8 @@ internal static partial class GUID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x24, 0xC3, 0xDD, 0x6F,
|
||||
0x03, 0x4E,
|
||||
0xFE, 0x4B,
|
||||
@@ -205,7 +213,7 @@ internal static partial class GUID
|
||||
0x8D,
|
||||
0xC9,
|
||||
0x0B
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
@@ -218,7 +226,8 @@ internal static partial class GUID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x24, 0xC3, 0xDD, 0x6F,
|
||||
0x03, 0x4E,
|
||||
0xFE, 0x4B,
|
||||
@@ -230,7 +239,7 @@ internal static partial class GUID
|
||||
0x8D,
|
||||
0xC9,
|
||||
0x0C
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
@@ -243,7 +252,8 @@ internal static partial class GUID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x24, 0xC3, 0xDD, 0x6F,
|
||||
0x03, 0x4E,
|
||||
0xFE, 0x4B,
|
||||
@@ -255,7 +265,7 @@ internal static partial class GUID
|
||||
0x8D,
|
||||
0xC9,
|
||||
0x0F
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
@@ -268,7 +278,8 @@ internal static partial class GUID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x2D, 0xAD, 0xC7, 0xF5,
|
||||
0x8D, 0x6A,
|
||||
0xDD, 0x43,
|
||||
@@ -280,7 +291,7 @@ internal static partial class GUID
|
||||
0x26,
|
||||
0x1A,
|
||||
0xE9
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
@@ -293,7 +304,8 @@ internal static partial class GUID
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x24, 0xC3, 0xDD, 0x6F,
|
||||
0x03, 0x4E,
|
||||
0xFE, 0x4B,
|
||||
@@ -305,7 +317,7 @@ internal static partial class GUID
|
||||
0x8D,
|
||||
0xC9,
|
||||
0x16
|
||||
};
|
||||
];
|
||||
|
||||
Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("00000121-A8F2-4877-BA0A-FD2B6645FB94")]
|
||||
[NativeTypeName("struct IWICBitmap : IWICBitmapSource")]
|
||||
[NativeInheritance("IWICBitmapSource")]
|
||||
internal unsafe partial struct IWICBitmap
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("9EDDE9E7-8DEE-47EA-99DF-E6FAF2ED44BF")]
|
||||
[NativeTypeName("struct IWICBitmapDecoder : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct IWICBitmapDecoder
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("00000103-A8F2-4877-BA0A-FD2B6645FB94")]
|
||||
[NativeTypeName("struct IWICBitmapEncoder : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct IWICBitmapEncoder
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("3B16811B-6A43-4EC9-A813-3D930C13B940")]
|
||||
[NativeTypeName("struct IWICBitmapFrameDecode : IWICBitmapSource")]
|
||||
[NativeInheritance("IWICBitmapSource")]
|
||||
internal unsafe partial struct IWICBitmapFrameDecode
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("00000105-A8F2-4877-BA0A-FD2B6645FB94")]
|
||||
[NativeTypeName("struct IWICBitmapFrameEncode : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct IWICBitmapFrameEncode
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("00000120-A8F2-4877-BA0A-FD2B6645FB94")]
|
||||
[NativeTypeName("struct IWICBitmapSource : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct IWICBitmapSource
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("00000301-A8F2-4877-BA0A-FD2B6645FB94")]
|
||||
[NativeTypeName("struct IWICFormatConverter : IWICBitmapSource")]
|
||||
[NativeInheritance("IWICBitmapSource")]
|
||||
internal unsafe partial struct IWICFormatConverter
|
||||
|
||||
@@ -11,11 +11,35 @@ using System.Runtime.Versioning;
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[SupportedOSPlatform("windows8.0")]
|
||||
[Guid("7B816B45-1996-4476-B132-DE9E247C8AF0")]
|
||||
[NativeTypeName("struct IWICImagingFactory2 : IWICImagingFactory")]
|
||||
[NativeInheritance("IWICImagingFactory")]
|
||||
internal unsafe partial struct IWICImagingFactory2
|
||||
internal unsafe partial struct IWICImagingFactory2 : IComObject
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
static Guid* IComObject.IID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data =
|
||||
[
|
||||
0x45, 0x6B, 0x81, 0x7B,
|
||||
0x96, 0x19,
|
||||
0x76, 0x44,
|
||||
0xB1,
|
||||
0x32,
|
||||
0xDE,
|
||||
0x9E,
|
||||
0x24,
|
||||
0x7C,
|
||||
0x8A,
|
||||
0xF0
|
||||
];
|
||||
|
||||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
public void** lpVtbl;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("00000040-A8F2-4877-BA0A-FD2B6645FB94")]
|
||||
[NativeTypeName("struct IWICPalette : IUnknown")]
|
||||
[NativeInheritance("IUnknown")]
|
||||
internal unsafe partial struct IWICPalette
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ComputeSharp.Win32;
|
||||
|
||||
[Guid("135FF860-22B7-4DDF-B0F6-218F4F299A43")]
|
||||
[NativeTypeName("struct IWICStream : IStream")]
|
||||
[NativeInheritance("IStream")]
|
||||
internal unsafe partial struct IWICStream
|
||||
|
||||
@@ -35,11 +35,8 @@ unsafe partial class IWICStreamExtensions
|
||||
/// <summary>
|
||||
/// A manual CCW implementation for an <see cref="IStream"/> object wrapping an <see cref="IBufferWriter{T}"/> instance.
|
||||
/// </summary>
|
||||
private unsafe partial struct IBufferWriterWrapper //: IUnknown.Interface
|
||||
private unsafe partial struct IBufferWriterWrapper
|
||||
{
|
||||
///// <inheritdoc/>
|
||||
//static Guid* INativeGuid.NativeGuid => (Guid*)default(NotSupportedException).Throw<nint>();
|
||||
|
||||
/// <summary>
|
||||
/// The shared vtable pointer for <see cref="IBufferWriterWrapper"/> instances.
|
||||
/// </summary>
|
||||
@@ -139,7 +136,7 @@ unsafe partial class IWICStreamExtensions
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
if (riid->Equals(IID_IUnknown) ||
|
||||
if (riid->Equals(Windows.__uuidof<IUnknown>()) ||
|
||||
riid->Equals(IID_ISequentialStream) ||
|
||||
riid->Equals(IID_IStream))
|
||||
{
|
||||
|
||||
104ファイル中100ファイルを読み込みました。 変更されたファイルが多すぎるため、それ以降のファイルは表示していません。
さらに表示
新しいイシューから参照
ユーザーをブロックする