Skip to content

Commit 54e0d8b

Browse files
committed
Revert WebGPU/SDL updates
1 parent 6176dfb commit 54e0d8b

File tree

224 files changed

+10031
-7370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+10031
-7370
lines changed

src/WebGPU/Extensions/Silk.NET.WebGPU.Extensions.Dawn/Dawn.gen.cs

Lines changed: 143 additions & 723 deletions
Large diffs are not rendered by default.

src/WebGPU/Extensions/Silk.NET.WebGPU.Extensions.Dawn/DawnOverloads.gen.cs

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ namespace Silk.NET.WebGPU.Extensions.Dawn
1717
public static class DawnOverloads
1818
{
1919
/// <summary>To be documented.</summary>
20-
[NativeName("Src", "Line 3779, Column 24 in dawn-webgpu.h")]
21-
public static unsafe Device* AdapterCreateDevice(this Dawn thisApi, Adapter* adapter, [Flow(Silk.NET.Core.Native.FlowDirection.In)] ReadOnlySpan<DeviceDescriptor> descriptor)
20+
[NativeName("Src", "Line 3772, Column 24 in dawn-webgpu.h")]
21+
public static unsafe Status GetInstanceFeatures(this Dawn thisApi, Span<InstanceFeatures> features)
2222
{
2323
// SpanOverloader
24-
return thisApi.AdapterCreateDevice(adapter, in descriptor.GetPinnableReference());
24+
return thisApi.GetInstanceFeatures(ref features.GetPinnableReference());
2525
}
2626

2727
/// <summary>To be documented.</summary>
28-
[NativeName("Src", "Line 3780, Column 20 in dawn-webgpu.h")]
29-
public static unsafe nuint AdapterEnumerateFeatures(this Dawn thisApi, Adapter* adapter, Span<FeatureName> features)
28+
[NativeName("Src", "Line 3779, Column 24 in dawn-webgpu.h")]
29+
public static unsafe Device* AdapterCreateDevice(this Dawn thisApi, Adapter* adapter, [Flow(Silk.NET.Core.Native.FlowDirection.In)] ReadOnlySpan<DeviceDescriptor> descriptor)
3030
{
3131
// SpanOverloader
32-
return thisApi.AdapterEnumerateFeatures(adapter, ref features.GetPinnableReference());
32+
return thisApi.AdapterCreateDevice(adapter, in descriptor.GetPinnableReference());
3333
}
3434

3535
/// <summary>To be documented.</summary>
@@ -40,14 +40,6 @@ public static unsafe Status AdapterGetFormatCapabilities(this Dawn thisApi, Adap
4040
return thisApi.AdapterGetFormatCapabilities(adapter, format, ref capabilities.GetPinnableReference());
4141
}
4242

43-
/// <summary>To be documented.</summary>
44-
[NativeName("Src", "Line 3784, Column 24 in dawn-webgpu.h")]
45-
public static unsafe Status AdapterGetProperties(this Dawn thisApi, Adapter* adapter, Span<AdapterProperties> properties)
46-
{
47-
// SpanOverloader
48-
return thisApi.AdapterGetProperties(adapter, ref properties.GetPinnableReference());
49-
}
50-
5143
/// <summary>To be documented.</summary>
5244
[NativeName("Src", "Line 3787, Column 24 in dawn-webgpu.h")]
5345
public static unsafe Future AdapterRequestDevice2(this Dawn thisApi, Adapter* adapter, [Flow(Silk.NET.Core.Native.FlowDirection.In)] ReadOnlySpan<DeviceDescriptor> options, RequestDeviceCallbackInfo2 callbackInfo)
@@ -160,14 +152,6 @@ public static unsafe Future DeviceCreateRenderPipelineAsyncF(this Dawn thisApi,
160152
return thisApi.DeviceCreateSwapChain(device, surface, in descriptor.GetPinnableReference());
161153
}
162154

163-
/// <summary>To be documented.</summary>
164-
[NativeName("Src", "Line 3885, Column 20 in dawn-webgpu.h")]
165-
public static unsafe nuint DeviceEnumerateFeatures(this Dawn thisApi, Device* device, Span<FeatureName> features)
166-
{
167-
// SpanOverloader
168-
return thisApi.DeviceEnumerateFeatures(device, ref features.GetPinnableReference());
169-
}
170-
171155
/// <summary>To be documented.</summary>
172156
[NativeName("Src", "Line 3886, Column 18 in dawn-webgpu.h")]
173157
public static unsafe void DeviceForceLoss(this Dawn thisApi, Device* device, DeviceLostReason type, [Flow(Silk.NET.Core.Native.FlowDirection.In)] ReadOnlySpan<byte> message)
@@ -224,14 +208,6 @@ public static unsafe void DeviceSetLoggingCallback<T0>(this Dawn thisApi, Device
224208
thisApi.DeviceSetLoggingCallback(device, callback, ref userdata.GetPinnableReference());
225209
}
226210

227-
/// <summary>To be documented.</summary>
228-
[NativeName("Src", "Line 3903, Column 18 in dawn-webgpu.h")]
229-
public static unsafe void DeviceSetUncapturedErrorCallback<T0>(this Dawn thisApi, Device* device, PfnErrorCallback callback, Span<T0> userdata) where T0 : unmanaged
230-
{
231-
// SpanOverloader
232-
thisApi.DeviceSetUncapturedErrorCallback(device, callback, ref userdata.GetPinnableReference());
233-
}
234-
235211
/// <summary>To be documented.</summary>
236212
[NativeName("Src", "Line 3905, Column 18 in dawn-webgpu.h")]
237213
public static unsafe void DeviceValidateTextureDescriptor(this Dawn thisApi, Device* device, [Flow(Silk.NET.Core.Native.FlowDirection.In)] ReadOnlySpan<TextureDescriptor> descriptor)
@@ -272,6 +248,14 @@ public static unsafe Future InstanceRequestAdapterF(this Dawn thisApi, Instance*
272248
return thisApi.InstanceRequestAdapterF(instance, in options.GetPinnableReference(), callbackInfo);
273249
}
274250

251+
/// <summary>To be documented.</summary>
252+
[NativeName("Src", "Line 3925, Column 28 in dawn-webgpu.h")]
253+
public static unsafe WaitStatus InstanceWaitAny(this Dawn thisApi, Instance* instance, nuint futureCount, Span<FutureWaitInfo> futures, ulong timeoutNS)
254+
{
255+
// SpanOverloader
256+
return thisApi.InstanceWaitAny(instance, futureCount, ref futures.GetPinnableReference(), timeoutNS);
257+
}
258+
275259
/// <summary>To be documented.</summary>
276260
[NativeName("Src", "Line 3943, Column 18 in dawn-webgpu.h")]
277261
public static unsafe void QueueCopyExternalTextureForBrowser(this Dawn thisApi, Queue* queue, [Flow(Silk.NET.Core.Native.FlowDirection.In)] ImageCopyExternalTexture* source, [Flow(Silk.NET.Core.Native.FlowDirection.In)] ImageCopyTexture* destination, [Flow(Silk.NET.Core.Native.FlowDirection.In)] Extent3D* copySize, [Flow(Silk.NET.Core.Native.FlowDirection.In)] ReadOnlySpan<CopyTextureForBrowserOptions> options)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
5+
using System;
6+
using Silk.NET.Core.Attributes;
7+
8+
#pragma warning disable 1591
9+
10+
namespace Silk.NET.WebGPU.Extensions.Dawn
11+
{
12+
[NativeName("Name", "WGPUCallbackMode")]
13+
public enum CallbackMode : int
14+
{
15+
[NativeName("Name", "WGPUCallbackMode_WaitAnyOnly")]
16+
WaitAnyOnly = 0x1,
17+
[NativeName("Name", "WGPUCallbackMode_AllowProcessEvents")]
18+
AllowProcessEvents = 0x2,
19+
[NativeName("Name", "WGPUCallbackMode_AllowSpontaneous")]
20+
AllowSpontaneous = 0x3,
21+
[NativeName("Name", "WGPUCallbackMode_Force32")]
22+
Force32 = 0x7FFFFFFF,
23+
}
24+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
5+
using System;
6+
using Silk.NET.Core.Attributes;
7+
8+
#pragma warning disable 1591
9+
10+
namespace Silk.NET.WebGPU.Extensions.Dawn
11+
{
12+
[NativeName("Name", "WGPUPopErrorScopeStatus")]
13+
public enum PopErrorScopeStatus : int
14+
{
15+
[NativeName("Name", "WGPUPopErrorScopeStatus_Success")]
16+
Success = 0x0,
17+
[NativeName("Name", "WGPUPopErrorScopeStatus_InstanceDropped")]
18+
InstanceDropped = 0x1,
19+
[NativeName("Name", "WGPUPopErrorScopeStatus_Force32")]
20+
Force32 = 0x7FFFFFFF,
21+
}
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
5+
using System;
6+
using Silk.NET.Core.Attributes;
7+
8+
#pragma warning disable 1591
9+
10+
namespace Silk.NET.WebGPU.Extensions.Dawn
11+
{
12+
[NativeName("Name", "WGPUStatus")]
13+
public enum Status : int
14+
{
15+
[NativeName("Name", "WGPUStatus_Success")]
16+
Success = 0x0,
17+
[NativeName("Name", "WGPUStatus_Error")]
18+
Error = 0x1,
19+
[NativeName("Name", "WGPUStatus_Force32")]
20+
Force32 = 0x7FFFFFFF,
21+
}
22+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
5+
using System;
6+
using Silk.NET.Core.Attributes;
7+
8+
#pragma warning disable 1591
9+
10+
namespace Silk.NET.WebGPU.Extensions.Dawn
11+
{
12+
[NativeName("Name", "WGPUWaitStatus")]
13+
public enum WaitStatus : int
14+
{
15+
[NativeName("Name", "WGPUWaitStatus_Success")]
16+
Success = 0x0,
17+
[NativeName("Name", "WGPUWaitStatus_TimedOut")]
18+
TimedOut = 0x1,
19+
[NativeName("Name", "WGPUWaitStatus_UnsupportedTimeout")]
20+
UnsupportedTimeout = 0x2,
21+
[NativeName("Name", "WGPUWaitStatus_UnsupportedCount")]
22+
UnsupportedCount = 0x3,
23+
[NativeName("Name", "WGPUWaitStatus_UnsupportedMixedSources")]
24+
UnsupportedMixedSources = 0x4,
25+
[NativeName("Name", "WGPUWaitStatus_Unknown")]
26+
Unknown = 0x5,
27+
[NativeName("Name", "WGPUWaitStatus_Force32")]
28+
Force32 = 0x7FFFFFFF,
29+
}
30+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
5+
using System;
6+
using System.Runtime.InteropServices;
7+
using System.Runtime.CompilerServices;
8+
using System.Text;
9+
using Silk.NET.Core;
10+
using Silk.NET.Core.Native;
11+
using Silk.NET.Core.Attributes;
12+
using Silk.NET.Core.Contexts;
13+
using Silk.NET.Core.Loader;
14+
15+
#pragma warning disable 1591
16+
17+
namespace Silk.NET.WebGPU.Extensions.Dawn
18+
{
19+
[NativeName("Name", "WGPUBufferMapCallbackInfo")]
20+
public unsafe partial struct BufferMapCallbackInfo
21+
{
22+
public BufferMapCallbackInfo
23+
(
24+
ChainedStruct* nextInChain = null,
25+
CallbackMode? mode = null,
26+
PfnBufferMapCallback? callback = null,
27+
void* userdata = null
28+
) : this()
29+
{
30+
if (nextInChain is not null)
31+
{
32+
NextInChain = nextInChain;
33+
}
34+
35+
if (mode is not null)
36+
{
37+
Mode = mode.Value;
38+
}
39+
40+
if (callback is not null)
41+
{
42+
Callback = callback.Value;
43+
}
44+
45+
if (userdata is not null)
46+
{
47+
Userdata = userdata;
48+
}
49+
}
50+
51+
52+
[NativeName("Type", "const WGPUChainedStruct *")]
53+
[NativeName("Type.Name", "const WGPUChainedStruct *")]
54+
[NativeName("Name", "nextInChain")]
55+
public ChainedStruct* NextInChain;
56+
57+
[NativeName("Type", "WGPUCallbackMode")]
58+
[NativeName("Type.Name", "WGPUCallbackMode")]
59+
[NativeName("Name", "mode")]
60+
public CallbackMode Mode;
61+
62+
[NativeName("Type", "WGPUBufferMapCallback")]
63+
[NativeName("Type.Name", "WGPUBufferMapCallback")]
64+
[NativeName("Name", "callback")]
65+
public PfnBufferMapCallback Callback;
66+
67+
[NativeName("Type", "void *")]
68+
[NativeName("Type.Name", "void *")]
69+
[NativeName("Name", "userdata")]
70+
public void* Userdata;
71+
}
72+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
5+
using System;
6+
using System.Runtime.InteropServices;
7+
using System.Runtime.CompilerServices;
8+
using System.Text;
9+
using Silk.NET.Core;
10+
using Silk.NET.Core.Native;
11+
using Silk.NET.Core.Attributes;
12+
using Silk.NET.Core.Contexts;
13+
using Silk.NET.Core.Loader;
14+
15+
#pragma warning disable 1591
16+
17+
namespace Silk.NET.WebGPU.Extensions.Dawn
18+
{
19+
[NativeName("Name", "WGPUCompilationInfoCallbackInfo")]
20+
public unsafe partial struct CompilationInfoCallbackInfo
21+
{
22+
public CompilationInfoCallbackInfo
23+
(
24+
ChainedStruct* nextInChain = null,
25+
CallbackMode? mode = null,
26+
PfnCompilationInfoCallback? callback = null,
27+
void* userdata = null
28+
) : this()
29+
{
30+
if (nextInChain is not null)
31+
{
32+
NextInChain = nextInChain;
33+
}
34+
35+
if (mode is not null)
36+
{
37+
Mode = mode.Value;
38+
}
39+
40+
if (callback is not null)
41+
{
42+
Callback = callback.Value;
43+
}
44+
45+
if (userdata is not null)
46+
{
47+
Userdata = userdata;
48+
}
49+
}
50+
51+
52+
[NativeName("Type", "const WGPUChainedStruct *")]
53+
[NativeName("Type.Name", "const WGPUChainedStruct *")]
54+
[NativeName("Name", "nextInChain")]
55+
public ChainedStruct* NextInChain;
56+
57+
[NativeName("Type", "WGPUCallbackMode")]
58+
[NativeName("Type.Name", "WGPUCallbackMode")]
59+
[NativeName("Name", "mode")]
60+
public CallbackMode Mode;
61+
62+
[NativeName("Type", "WGPUCompilationInfoCallback")]
63+
[NativeName("Type.Name", "WGPUCompilationInfoCallback")]
64+
[NativeName("Name", "callback")]
65+
public PfnCompilationInfoCallback Callback;
66+
67+
[NativeName("Type", "void *")]
68+
[NativeName("Type.Name", "void *")]
69+
[NativeName("Name", "userdata")]
70+
public void* Userdata;
71+
}
72+
}

0 commit comments

Comments
 (0)