Skip to content

Commit af96ea8

Browse files
committed
Adding TransformFunctions
-and fixing issues with how it works
1 parent b2cbb69 commit af96ea8

File tree

9 files changed

+428
-188
lines changed

9 files changed

+428
-188
lines changed

Silk.NET.sln

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,10 @@ Global
152152
{AF6C70ED-D6A8-4C57-8DB3-EAFF94396049}.Release|Any CPU.Build.0 = Release|Any CPU
153153
{9625C977-25BE-48F3-9B6F-BC94B8B799A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
154154
{9625C977-25BE-48F3-9B6F-BC94B8B799A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
155-
{9625C977-25BE-48F3-9B6F-BC94B8B799A6}.Release|Any CPU.Build.0 = Release|Any CPU
156155
{19B05730-F97E-43D4-B922-DF4697E5CE5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
157156
{19B05730-F97E-43D4-B922-DF4697E5CE5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
158-
{19B05730-F97E-43D4-B922-DF4697E5CE5F}.Release|Any CPU.Build.0 = Release|Any CPU
159157
{D2B9C43F-A80D-4C9A-9643-BC1AC1B4E807}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
160158
{D2B9C43F-A80D-4C9A-9643-BC1AC1B4E807}.Release|Any CPU.ActiveCfg = Release|Any CPU
161-
{D2B9C43F-A80D-4C9A-9643-BC1AC1B4E807}.Release|Any CPU.Build.0 = Release|Any CPU
162159
{3CADD95A-179F-4ECF-A49D-4B753832C63C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
163160
{3CADD95A-179F-4ECF-A49D-4B753832C63C}.Debug|Any CPU.Build.0 = Debug|Any CPU
164161
{3CADD95A-179F-4ECF-A49D-4B753832C63C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -176,7 +173,6 @@ Global
176173
{EF07CBB5-D253-4CA9-A5DA-8B3DF2B0DF8E}.Release|Any CPU.Build.0 = Release|Any CPU
177174
{BB33CC4A-EA3A-4D4F-879A-F93C617C5E63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
178175
{BB33CC4A-EA3A-4D4F-879A-F93C617C5E63}.Release|Any CPU.ActiveCfg = Release|Any CPU
179-
{BB33CC4A-EA3A-4D4F-879A-F93C617C5E63}.Release|Any CPU.Build.0 = Release|Any CPU
180176
{C8F32825-1F93-44F0-AB88-26167C21CADF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
181177
{C8F32825-1F93-44F0-AB88-26167C21CADF}.Release|Any CPU.ActiveCfg = Release|Any CPU
182178
{C8F32825-1F93-44F0-AB88-26167C21CADF}.Release|Any CPU.Build.0 = Release|Any CPU

generator.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"ChangeNamespace",
1111
"TransformInterfaces",
1212
"TransformCOM",
13-
"DisableWarnings"
13+
"DisableWarnings",
14+
"TransformFunctions"
1415
],
1516
"ClangScraper": {
1617
"ClangSharpResponseFiles": [
@@ -75,8 +76,13 @@
7576
"CS1589", //XML Comments missing (due to missing docs)
7677
"CS0419", //Inheritdoc issue (due to bug)
7778
"CA1416", //Function available outside of target os (intended)
78-
"CS0618" //Obsolete Warnings
79+
"CS0618" //Obsolete Warnings (intended)
7980
]
81+
},
82+
"TransformFunctions": {
83+
"BoolTypes": {
84+
"BOOL": null
85+
}
8086
}
8187
},
8288
"SDL": {

sources/SilkTouch/SilkTouch/Mods/TransformFunctions.cs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Diagnostics;
34
using System.Linq;
45
using System.Threading;
56
using System.Threading.Tasks;
@@ -56,14 +57,14 @@ public async Task ExecuteAsync(IModContext ctx, CancellationToken ct = default)
5657
var proj = ctx.SourceProject;
5758
foreach (var docId in ctx.SourceProject?.DocumentIds ?? [])
5859
{
60+
UsingsToAdd.Clear();
5961
var doc =
6062
proj!.GetDocument(docId) ?? throw new InvalidOperationException("Document missing");
6163
if (await doc.GetSyntaxRootAsync(ct) is { } root)
6264
{
6365
proj = doc.WithSyntaxRoot(Visit(root).NormalizeWhitespace()).Project;
6466
}
6567
}
66-
6768
ctx.SourceProject = proj;
6869
}
6970

@@ -85,6 +86,24 @@ public async Task ExecuteAsync(IModContext ctx, CancellationToken ct = default)
8586
)
8687
: node;
8788

89+
/// <inheritdoc />
90+
public override SyntaxNode? VisitStructDeclaration(StructDeclarationSyntax node) =>
91+
base.VisitStructDeclaration(node) is StructDeclarationSyntax cd
92+
? cd.WithMembers(
93+
List(
94+
cd.Members.Where(x => x is not MethodDeclarationSyntax)
95+
.Concat(
96+
ft.GetTransformedFunctions(
97+
_jobKey.Value,
98+
cd.Members.OfType<MethodDeclarationSyntax>(),
99+
this
100+
)
101+
.OrderBy(x => x.Identifier.ToString())
102+
)
103+
)
104+
)
105+
: node;
106+
88107
/// <inheritdoc />
89108
public override SyntaxNode? VisitInterfaceDeclaration(InterfaceDeclarationSyntax node) =>
90109
base.VisitInterfaceDeclaration(node) is InterfaceDeclarationSyntax id

sources/SilkTouch/SilkTouch/Mods/Transformation/FunctionTransformer.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ meth.Body.Statements[0] as ExpressionStatementSyntax
153153
}
154154

155155
ctx.Original = function;
156-
if (TransformFunctions(function, transform) is not null && includeOriginal)
156+
MethodDeclarationSyntax? transformedFunc = TransformFunctions(function, transform);
157+
if (transformedFunc is not null && includeOriginal)
157158
{
158159
// Try to add the original function as-is
159160
if (discrims.Add(discrim))
@@ -193,6 +194,10 @@ meth.Body.Statements[0] as ExpressionStatementSyntax
193194
}
194195
}
195196
}
197+
else if (transformedFunc is null)
198+
{
199+
ret.Add(function);
200+
}
196201

197202
ctx.Original = null;
198203
}
Lines changed: 114 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
22
// Ported from d3dcommon.h in microsoft/DirectX-Headers tag v1.614.0
33
// Original source is Copyright © Microsoft. Licensed under the MIT license
4+
using System.Runtime.CompilerServices;
45
using Silk.NET.Win32;
56
using System;
6-
using System.Runtime.CompilerServices;
77
using System.Runtime.InteropServices;
88
using static Silk.NET.Win32.IID;
99

@@ -18,30 +18,6 @@ public unsafe partial struct ID3DBlob : ID3DBlob.Native.Interface, IComInterface
1818
public Native* lpVtbl;
1919
static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID3D10Blob));
2020

21-
/// <inheritdoc cref = "IUnknown.QueryInterface"/>
22-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
23-
[VtblIndex(0)]
24-
public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) => lpVtbl->QueryInterface(riid, ppvObject);
25-
/// <inheritdoc cref = "IUnknown.AddRef"/>
26-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
27-
[VtblIndex(1)]
28-
[return: NativeTypeName("ULONG")]
29-
public uint AddRef() => lpVtbl->AddRef();
30-
/// <inheritdoc cref = "IUnknown.Release"/>
31-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
32-
[VtblIndex(2)]
33-
[return: NativeTypeName("ULONG")]
34-
public uint Release() => lpVtbl->Release();
35-
/// <include file='ID3DBlob.xml' path='doc/member[@name="ID3DBlob.GetBufferPointer"]/*'/>
36-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
37-
[VtblIndex(3)]
38-
[return: NativeTypeName("LPVOID")]
39-
public void* GetBufferPointer() => lpVtbl->GetBufferPointer();
40-
/// <include file='ID3DBlob.xml' path='doc/member[@name="ID3DBlob.GetBufferSize"]/*'/>
41-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
42-
[VtblIndex(4)]
43-
[return: NativeTypeName("SIZE_T")]
44-
public nuint GetBufferSize() => lpVtbl->GetBufferSize();
4521
/// <include file='ID3DBlob.xml' path='doc/member[@name="ID3DBlob"]/*'/>
4622
[Guid("8BA5FB08-5195-40E2-AC58-0D989C3A0102")]
4723
[NativeTypeName("struct ID3D10Blob : IUnknown")]
@@ -51,12 +27,29 @@ public unsafe partial struct Native : ID3DBlob.Native.Interface, INativeGuid
5127
static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID3D10Blob));
5228

5329
public void** lpVtbl;
54-
/// <inheritdoc cref = "IUnknown.QueryInterface"/>
55-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
56-
[VtblIndex(0)]
57-
public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
30+
public interface Interface : IUnknown.Native.Interface
5831
{
59-
return ((delegate* unmanaged<ID3DBlob.Native*, Guid*, void**, int> )(lpVtbl[0]))((ID3DBlob.Native*)Unsafe.AsPointer(ref this), riid, ppvObject);
32+
[VtblIndex(3)]
33+
[return: NativeTypeName("LPVOID")]
34+
void* GetBufferPointer();
35+
[VtblIndex(4)]
36+
[return: NativeTypeName("SIZE_T")]
37+
nuint GetBufferSize();
38+
}
39+
40+
public partial struct Vtbl<TSelf>
41+
where TSelf : unmanaged, Interface
42+
{
43+
[NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")]
44+
public delegate* unmanaged<TSelf*, Guid*, void**, int> QueryInterface;
45+
[NativeTypeName("ULONG () __attribute__((stdcall))")]
46+
public delegate* unmanaged<TSelf*, uint> AddRef;
47+
[NativeTypeName("ULONG () __attribute__((stdcall))")]
48+
public delegate* unmanaged<TSelf*, uint> Release;
49+
[NativeTypeName("LPVOID () __attribute__((stdcall))")]
50+
public delegate* unmanaged<TSelf*, void*> GetBufferPointer;
51+
[NativeTypeName("SIZE_T () __attribute__((stdcall))")]
52+
public delegate* unmanaged<TSelf*, nuint> GetBufferSize;
6053
}
6154

6255
/// <inheritdoc cref = "IUnknown.AddRef"/>
@@ -68,20 +61,16 @@ public uint AddRef()
6861
return ((delegate* unmanaged<ID3DBlob.Native*, uint> )(lpVtbl[1]))((ID3DBlob.Native*)Unsafe.AsPointer(ref this));
6962
}
7063

71-
/// <inheritdoc cref = "IUnknown.Release"/>
72-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
73-
[VtblIndex(2)]
74-
[return: NativeTypeName("ULONG")]
75-
public uint Release()
76-
{
77-
return ((delegate* unmanaged<ID3DBlob.Native*, uint> )(lpVtbl[2]))((ID3DBlob.Native*)Unsafe.AsPointer(ref this));
78-
}
79-
64+
[VtblIndex(3)]
65+
[return: NativeTypeName("LPVOID")]
66+
[Transformed]
67+
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
68+
public Ptr GetBufferPointer() => (void*)GetBufferPointerRaw();
8069
/// <include file='ID3DBlob.xml' path='doc/member[@name="ID3DBlob.GetBufferPointer"]/*'/>
8170
[MethodImpl(MethodImplOptions.AggressiveInlining)]
8271
[VtblIndex(3)]
8372
[return: NativeTypeName("LPVOID")]
84-
public void* GetBufferPointer()
73+
public void* GetBufferPointerRaw()
8574
{
8675
return ((delegate* unmanaged<ID3DBlob.Native*, void*> )(lpVtbl[3]))((ID3DBlob.Native*)Unsafe.AsPointer(ref this));
8776
}
@@ -95,29 +84,24 @@ public nuint GetBufferSize()
9584
return ((delegate* unmanaged<ID3DBlob.Native*, nuint> )(lpVtbl[4]))((ID3DBlob.Native*)Unsafe.AsPointer(ref this));
9685
}
9786

98-
public interface Interface : IUnknown.Native.Interface
87+
/// <inheritdoc cref = "IUnknown.QueryInterface"/>
88+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
89+
[VtblIndex(0)]
90+
public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
9991
{
100-
[VtblIndex(3)]
101-
[return: NativeTypeName("LPVOID")]
102-
void* GetBufferPointer();
103-
[VtblIndex(4)]
104-
[return: NativeTypeName("SIZE_T")]
105-
nuint GetBufferSize();
92+
return ((delegate* unmanaged<ID3DBlob.Native*, Guid*, void**, int> )(lpVtbl[0]))((ID3DBlob.Native*)Unsafe.AsPointer(ref this), riid, ppvObject);
10693
}
10794

108-
public partial struct Vtbl<TSelf>
109-
where TSelf : unmanaged, Interface
95+
[VtblIndex(0)]
96+
[Transformed]
97+
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
98+
public HRESULT QueryInterface([NativeTypeName("const IID &")] Ref<Guid> riid, Ref2D ppvObject)
11099
{
111-
[NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")]
112-
public delegate* unmanaged<TSelf*, Guid*, void**, int> QueryInterface;
113-
[NativeTypeName("ULONG () __attribute__((stdcall))")]
114-
public delegate* unmanaged<TSelf*, uint> AddRef;
115-
[NativeTypeName("ULONG () __attribute__((stdcall))")]
116-
public delegate* unmanaged<TSelf*, uint> Release;
117-
[NativeTypeName("LPVOID () __attribute__((stdcall))")]
118-
public delegate* unmanaged<TSelf*, void*> GetBufferPointer;
119-
[NativeTypeName("SIZE_T () __attribute__((stdcall))")]
120-
public delegate* unmanaged<TSelf*, nuint> GetBufferSize;
100+
fixed (void** __dsl_ppvObject = ppvObject)
101+
fixed (Guid* __dsl_riid = riid)
102+
{
103+
return (HRESULT)QueryInterface(__dsl_riid, __dsl_ppvObject);
104+
}
121105
}
122106

123107
/// <inheritdoc cref = "IUnknown.QueryInterface"/>
@@ -129,6 +113,15 @@ public HRESULT QueryInterface<TCom>(out TCom ppvObject)
129113
ppvObject = default(TCom);
130114
return QueryInterface(TCom.NativeGuid, ppvObject.GetAddressOf());
131115
}
116+
117+
/// <inheritdoc cref = "IUnknown.Release"/>
118+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
119+
[VtblIndex(2)]
120+
[return: NativeTypeName("ULONG")]
121+
public uint Release()
122+
{
123+
return ((delegate* unmanaged<ID3DBlob.Native*, uint> )(lpVtbl[2]))((ID3DBlob.Native*)Unsafe.AsPointer(ref this));
124+
}
132125
}
133126

134127
/// <summary>Initializes a new instance of the <see cref = "ID3DBlob"/> struct with the specified virtual table pointer.</summary>
@@ -137,11 +130,6 @@ public HRESULT QueryInterface<TCom>(out TCom ppvObject)
137130
/// <summary>Initializes a new instance of the <see cref = "ID3DBlob"/> struct with the specified virtual table pointer.</summary>
138131
/// <param name = "vtbl">The pointer to virtual table.</param>
139132
public ID3DBlob(ID3DBlob.Native* vtbl) => lpVtbl = vtbl;
140-
/// <inheritdoc cref = "INativeInterface.GetAddressOf{TNativeInterface}()"></inheritdoc>
141-
public readonly TNativeInterface** GetAddressOf<TNativeInterface>()
142-
where TNativeInterface : unmanaged => (TNativeInterface**)Unsafe.AsPointer(ref Unsafe.AsRef(in this));
143-
/// <inheritdoc cref = "INativeInterface.GetAddressOf()"></inheritdoc>
144-
public readonly void** GetAddressOf() => (void**)Unsafe.AsPointer(ref Unsafe.AsRef(in this));
145133
/// <summary>casts <see cref = "ID3DBlob.Native"/> to <see cref = "ID3DBlob"/>.</summary>
146134
/// <param name = "value">The <see cref = "ID3DBlob.Native"/> instance to be converted </param>
147135
public static implicit operator ID3DBlob(ID3DBlob.Native* value) => new ID3DBlob(value);
@@ -166,6 +154,63 @@ public HRESULT QueryInterface<TCom>(out TCom ppvObject)
166154
/// <summary>casts <see cref = "ID3DBlob"/> to nuint</summary>
167155
/// <param name = "value">The <see cref = "ID3DBlob"/> instance to be converted </param>
168156
public static implicit operator nuint(ID3DBlob value) => (nuint)value.lpVtbl;
157+
/// <summary>Downcasts <see cref = "Silk.NET.Win32.IUnknown"/> to <see cref = "ID3DBlob"/>.</summary>
158+
/// <param name = "value">The <see cref = "Silk.NET.Win32.IUnknown"/> instance to be converted </param>
159+
public static explicit operator ID3DBlob(Silk.NET.Win32.IUnknown value) => new ID3DBlob((ID3DBlob.Native*)value.lpVtbl);
160+
/// <summary>Upcasts <see cref = "ID3DBlob"/> to <see cref = "Silk.NET.Win32.IUnknown"/>.</summary>
161+
/// <param name = "value">The <see cref = "ID3DBlob"/> instance to be converted </param>
162+
public static implicit operator Silk.NET.Win32.IUnknown(ID3DBlob value) => new Silk.NET.Win32.IUnknown((Silk.NET.Win32.IUnknown.Native*)value.lpVtbl);
163+
/// <inheritdoc cref = "IUnknown.AddRef"/>
164+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
165+
[VtblIndex(1)]
166+
[return: NativeTypeName("ULONG")]
167+
public uint AddRef() => lpVtbl->AddRef();
168+
public void Dispose() => Release();
169+
[Transformed]
170+
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
171+
/// <inheritdoc cref = "INativeInterface.GetAddressOf{TNativeInterface}()"></inheritdoc>
172+
public readonly Ptr2D<TNativeInterface> GetAddressOf<TNativeInterface>()
173+
where TNativeInterface : unmanaged => (TNativeInterface**)GetAddressOfRaw();
174+
[Transformed]
175+
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
176+
/// <inheritdoc cref = "INativeInterface.GetAddressOf()"></inheritdoc>
177+
public readonly Ptr2D GetAddressOf() => (void**)GetAddressOfRaw();
178+
/// <inheritdoc cref = "INativeInterface.GetAddressOf{TNativeInterface}()"></inheritdoc>
179+
public readonly TNativeInterface** GetAddressOfRaw<TNativeInterface>()
180+
where TNativeInterface : unmanaged => (TNativeInterface**)Unsafe.AsPointer(ref Unsafe.AsRef(in this));
181+
/// <inheritdoc cref = "INativeInterface.GetAddressOf()"></inheritdoc>
182+
public readonly void** GetAddressOfRaw() => (void**)Unsafe.AsPointer(ref Unsafe.AsRef(in this));
183+
[VtblIndex(3)]
184+
[return: NativeTypeName("LPVOID")]
185+
[Transformed]
186+
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
187+
public Ptr GetBufferPointer() => (void*)GetBufferPointerRaw();
188+
/// <include file='ID3DBlob.xml' path='doc/member[@name="ID3DBlob.GetBufferPointer"]/*'/>
189+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
190+
[VtblIndex(3)]
191+
[return: NativeTypeName("LPVOID")]
192+
public void* GetBufferPointerRaw() => lpVtbl->GetBufferPointer();
193+
/// <include file='ID3DBlob.xml' path='doc/member[@name="ID3DBlob.GetBufferSize"]/*'/>
194+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
195+
[VtblIndex(4)]
196+
[return: NativeTypeName("SIZE_T")]
197+
public nuint GetBufferSize() => lpVtbl->GetBufferSize();
198+
/// <inheritdoc cref = "IUnknown.QueryInterface"/>
199+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
200+
[VtblIndex(0)]
201+
public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) => lpVtbl->QueryInterface(riid, ppvObject);
202+
[VtblIndex(0)]
203+
[Transformed]
204+
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
205+
public HRESULT QueryInterface([NativeTypeName("const IID &")] Ref<Guid> riid, Ref2D ppvObject)
206+
{
207+
fixed (void** __dsl_ppvObject = ppvObject)
208+
fixed (Guid* __dsl_riid = riid)
209+
{
210+
return (HRESULT)QueryInterface(__dsl_riid, __dsl_ppvObject);
211+
}
212+
}
213+
169214
/// <inheritdoc cref = "IUnknown.QueryInterface"/>
170215
[MethodImpl(MethodImplOptions.AggressiveInlining)]
171216
[VtblIndex(0)]
@@ -176,11 +221,9 @@ public HRESULT QueryInterface<TCom>(out TCom ppvObject)
176221
return QueryInterface(TCom.NativeGuid, ppvObject.GetAddressOf());
177222
}
178223

179-
public void Dispose() => Release();
180-
/// <summary>Downcasts <see cref = "Silk.NET.Win32.IUnknown"/> to <see cref = "ID3DBlob"/>.</summary>
181-
/// <param name = "value">The <see cref = "Silk.NET.Win32.IUnknown"/> instance to be converted </param>
182-
public static explicit operator ID3DBlob(Silk.NET.Win32.IUnknown value) => new ID3DBlob((ID3DBlob.Native*)value.lpVtbl);
183-
/// <summary>Upcasts <see cref = "ID3DBlob"/> to <see cref = "Silk.NET.Win32.IUnknown"/>.</summary>
184-
/// <param name = "value">The <see cref = "ID3DBlob"/> instance to be converted </param>
185-
public static implicit operator Silk.NET.Win32.IUnknown(ID3DBlob value) => new Silk.NET.Win32.IUnknown((Silk.NET.Win32.IUnknown.Native*)value.lpVtbl);
224+
/// <inheritdoc cref = "IUnknown.Release"/>
225+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
226+
[VtblIndex(2)]
227+
[return: NativeTypeName("ULONG")]
228+
public uint Release() => lpVtbl->Release();
186229
}

0 commit comments

Comments
 (0)