Improve generation and manually add D3D12 agility SDK stuff.

This commit is contained in:
Amer Koleci
2022-11-28 10:45:05 +01:00
parent cee7905599
commit 3ca1ac082d
549 changed files with 3320 additions and 1597 deletions

View File

@@ -2294,7 +2294,7 @@ public static class Program
writer.WriteLine("[VtblIndex(0)]");
using (writer.PushBlock($"public HResult QueryInterface([NativeTypeName(\"const IID &\")] Guid* riid, void** ppvObject)"))
{
writer.WriteLine("return ((delegate* unmanaged[Stdcall]<IUnknown*, Guid*, void**, int>)(lpVtbl[0]))((IUnknown*)Unsafe.AsPointer(ref this), riid, ppvObject);");
writer.WriteLine($"return ((delegate* unmanaged[Stdcall]<{comType.Name}*, Guid*, void**, int>)(lpVtbl[0]))(({comType.Name}*)Unsafe.AsPointer(ref this), riid, ppvObject);");
}
writer.WriteLine();
@@ -2305,7 +2305,7 @@ public static class Program
writer.WriteLine("[return: NativeTypeName(\"ULONG\")]");
using (writer.PushBlock($"public uint AddRef()"))
{
writer.WriteLine("return ((delegate* unmanaged[Stdcall]<IUnknown*, uint>)(lpVtbl[1]))((IUnknown*)Unsafe.AsPointer(ref this));");
writer.WriteLine($"return ((delegate* unmanaged[Stdcall]<{comType.Name}*, uint>)(lpVtbl[1]))(({comType.Name}*)Unsafe.AsPointer(ref this));");
}
writer.WriteLine();
@@ -2316,7 +2316,7 @@ public static class Program
writer.WriteLine("[return: NativeTypeName(\"ULONG\")]");
using (writer.PushBlock($"public uint Release()"))
{
writer.WriteLine("return ((delegate* unmanaged[Stdcall]<IUnknown*, uint>)(lpVtbl[2]))((IUnknown*)Unsafe.AsPointer(ref this));");
writer.WriteLine($"return ((delegate* unmanaged[Stdcall]<{comType.Name}*, uint>)(lpVtbl[2]))(({comType.Name}*)Unsafe.AsPointer(ref this));");
}
writer.WriteLine();
vtblIndex = 3;