-
-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
86 changed files
with
3,766 additions
and
895 deletions.
There are no files selected for viewing
Binary file not shown.
Submodule dawn
updated
18440 files
Submodule webgpu-headers
updated
4 files
+11 −0 | .github/workflows/compile.yml | |
+10 −0 | tests/compile/Makefile | |
+3 −0 | tests/compile/main.c | |
+95 −51 | webgpu.h |
Submodule wgpu-native
updated
14 files
+3 −12 | .github/workflows/cd.yml | |
+76 −59 | Cargo.lock | |
+14 −13 | Cargo.toml | |
+2 −1 | README.md | |
+0 −1 | build.rs | |
+2 −1 | examples/capture/main.c | |
+2 −1 | examples/compute/main.c | |
+1 −2 | examples/enumerate_adapters/main.c | |
+80 −84 | examples/triangle/main.c | |
+1 −1 | ffi/webgpu-headers | |
+13 −42 | ffi/wgpu.h | |
+102 −98 | src/conv.rs | |
+370 −288 | src/lib.rs | |
+39 −31 | src/utils.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
375 changes: 255 additions & 120 deletions
375
src/WebGPU/Extensions/Silk.NET.WebGPU.Extensions.Dawn/Dawn.gen.cs
Large diffs are not rendered by default.
Oops, something went wrong.
230 changes: 131 additions & 99 deletions
230
src/WebGPU/Extensions/Silk.NET.WebGPU.Extensions.Dawn/DawnOverloads.gen.cs
Large diffs are not rendered by default.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
src/WebGPU/Extensions/Silk.NET.WebGPU.Extensions.Dawn/Enums/CallbackMode.gen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
|
||
using System; | ||
using Silk.NET.Core.Attributes; | ||
|
||
#pragma warning disable 1591 | ||
|
||
namespace Silk.NET.WebGPU.Extensions.Dawn | ||
{ | ||
[NativeName("Name", "WGPUCallbackMode")] | ||
public enum CallbackMode : int | ||
{ | ||
[NativeName("Name", "WGPUCallbackMode_WaitAnyOnly")] | ||
WaitAnyOnly = 0x0, | ||
[NativeName("Name", "WGPUCallbackMode_AllowProcessEvents")] | ||
AllowProcessEvents = 0x1, | ||
[NativeName("Name", "WGPUCallbackMode_AllowSpontaneous")] | ||
AllowSpontaneous = 0x2, | ||
[NativeName("Name", "WGPUCallbackMode_Force32")] | ||
Force32 = 0x7FFFFFFF, | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/WebGPU/Extensions/Silk.NET.WebGPU.Extensions.Dawn/Enums/SharedFenceType.gen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
|
||
using System; | ||
using Silk.NET.Core.Attributes; | ||
|
||
#pragma warning disable 1591 | ||
|
||
namespace Silk.NET.WebGPU.Extensions.Dawn | ||
{ | ||
[NativeName("Name", "WGPUSharedFenceType")] | ||
public enum SharedFenceType : int | ||
{ | ||
[NativeName("Name", "WGPUSharedFenceType_DXGISharedHandle")] | ||
DxgiSharedHandle = 0x4, | ||
[NativeName("Name", "WGPUSharedFenceType_MTLSharedEvent")] | ||
MtlSharedEvent = 0x5, | ||
[NativeName("Name", "WGPUSharedFenceType_Undefined")] | ||
Undefined = 0x0, | ||
[NativeName("Name", "WGPUSharedFenceType_VkSemaphoreOpaqueFD")] | ||
VkSemaphoreOpaqueFD = 0x1, | ||
[NativeName("Name", "WGPUSharedFenceType_VkSemaphoreSyncFD")] | ||
VkSemaphoreSyncFD = 0x2, | ||
[NativeName("Name", "WGPUSharedFenceType_VkSemaphoreZirconHandle")] | ||
VkSemaphoreZirconHandle = 0x3, | ||
[Obsolete("Deprecated in favour of \"DxgiSharedHandle\"")] | ||
[NativeName("Name", "WGPUSharedFenceType_DXGISharedHandle")] | ||
DxgisharedHandle = 0x4, | ||
[Obsolete("Deprecated in favour of \"MtlSharedEvent\"")] | ||
[NativeName("Name", "WGPUSharedFenceType_MTLSharedEvent")] | ||
MtlsharedEvent = 0x5, | ||
[NativeName("Name", "WGPUSharedFenceType_Force32")] | ||
Force32 = 0x7FFFFFFF, | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/WebGPU/Extensions/Silk.NET.WebGPU.Extensions.Dawn/Enums/WaitStatus.gen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
|
||
using System; | ||
using Silk.NET.Core.Attributes; | ||
|
||
#pragma warning disable 1591 | ||
|
||
namespace Silk.NET.WebGPU.Extensions.Dawn | ||
{ | ||
[NativeName("Name", "WGPUWaitStatus")] | ||
public enum WaitStatus : int | ||
{ | ||
[NativeName("Name", "WGPUWaitStatus_Success")] | ||
Success = 0x0, | ||
[NativeName("Name", "WGPUWaitStatus_TimedOut")] | ||
TimedOut = 0x1, | ||
[NativeName("Name", "WGPUWaitStatus_UnsupportedTimeout")] | ||
UnsupportedTimeout = 0x2, | ||
[NativeName("Name", "WGPUWaitStatus_UnsupportedCount")] | ||
UnsupportedCount = 0x3, | ||
[NativeName("Name", "WGPUWaitStatus_UnsupportedMixedSources")] | ||
UnsupportedMixedSources = 0x4, | ||
[NativeName("Name", "WGPUWaitStatus_Unknown")] | ||
Unknown = 0x5, | ||
[NativeName("Name", "WGPUWaitStatus_Force32")] | ||
Force32 = 0x7FFFFFFF, | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
src/WebGPU/Extensions/Silk.NET.WebGPU.Extensions.Dawn/Structs/BufferHostMappedPointer.gen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.Runtime.CompilerServices; | ||
using System.Text; | ||
using Silk.NET.Core; | ||
using Silk.NET.Core.Native; | ||
using Silk.NET.Core.Attributes; | ||
using Silk.NET.Core.Contexts; | ||
using Silk.NET.Core.Loader; | ||
|
||
#pragma warning disable 1591 | ||
|
||
namespace Silk.NET.WebGPU.Extensions.Dawn | ||
{ | ||
[NativeName("Name", "WGPUBufferHostMappedPointer")] | ||
public unsafe partial struct BufferHostMappedPointer | ||
{ | ||
public BufferHostMappedPointer | ||
( | ||
ChainedStruct? chain = null, | ||
void* pointer = null, | ||
PfnCallback? disposeCallback = null, | ||
void* userdata = null | ||
) : this() | ||
{ | ||
if (chain is not null) | ||
{ | ||
Chain = chain.Value; | ||
} | ||
|
||
if (pointer is not null) | ||
{ | ||
Pointer = pointer; | ||
} | ||
|
||
if (disposeCallback is not null) | ||
{ | ||
DisposeCallback = disposeCallback.Value; | ||
} | ||
|
||
if (userdata is not null) | ||
{ | ||
Userdata = userdata; | ||
} | ||
} | ||
|
||
|
||
[NativeName("Type", "WGPUChainedStruct")] | ||
[NativeName("Type.Name", "WGPUChainedStruct")] | ||
[NativeName("Name", "chain")] | ||
public ChainedStruct Chain; | ||
|
||
[NativeName("Type", "void *")] | ||
[NativeName("Type.Name", "void *")] | ||
[NativeName("Name", "pointer")] | ||
public void* Pointer; | ||
|
||
[NativeName("Type", "WGPUCallback")] | ||
[NativeName("Type.Name", "WGPUCallback")] | ||
[NativeName("Name", "disposeCallback")] | ||
public PfnCallback DisposeCallback; | ||
|
||
[NativeName("Type", "void *")] | ||
[NativeName("Type.Name", "void *")] | ||
[NativeName("Name", "userdata")] | ||
public void* Userdata; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
.../Extensions/Silk.NET.WebGPU.Extensions.Dawn/Structs/DawnExperimentalSubgroupLimits.gen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.Runtime.CompilerServices; | ||
using System.Text; | ||
using Silk.NET.Core; | ||
using Silk.NET.Core.Native; | ||
using Silk.NET.Core.Attributes; | ||
using Silk.NET.Core.Contexts; | ||
using Silk.NET.Core.Loader; | ||
|
||
#pragma warning disable 1591 | ||
|
||
namespace Silk.NET.WebGPU.Extensions.Dawn | ||
{ | ||
[NativeName("Name", "WGPUDawnExperimentalSubgroupLimits")] | ||
public unsafe partial struct DawnExperimentalSubgroupLimits | ||
{ | ||
public DawnExperimentalSubgroupLimits | ||
( | ||
ChainedStructOut? chain = null, | ||
uint? minSubgroupSize = null, | ||
uint? maxSubgroupSize = null | ||
) : this() | ||
{ | ||
if (chain is not null) | ||
{ | ||
Chain = chain.Value; | ||
} | ||
|
||
if (minSubgroupSize is not null) | ||
{ | ||
MinSubgroupSize = minSubgroupSize.Value; | ||
} | ||
|
||
if (maxSubgroupSize is not null) | ||
{ | ||
MaxSubgroupSize = maxSubgroupSize.Value; | ||
} | ||
} | ||
|
||
|
||
[NativeName("Type", "WGPUChainedStructOut")] | ||
[NativeName("Type.Name", "WGPUChainedStructOut")] | ||
[NativeName("Name", "chain")] | ||
public ChainedStructOut Chain; | ||
|
||
[NativeName("Type", "uint32_t")] | ||
[NativeName("Type.Name", "uint32_t")] | ||
[NativeName("Name", "minSubgroupSize")] | ||
public uint MinSubgroupSize; | ||
|
||
[NativeName("Type", "uint32_t")] | ||
[NativeName("Type.Name", "uint32_t")] | ||
[NativeName("Name", "maxSubgroupSize")] | ||
public uint MaxSubgroupSize; | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
.../Silk.NET.WebGPU.Extensions.Dawn/Structs/DawnMultisampleStateRenderToSingleSampled.gen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.Runtime.CompilerServices; | ||
using System.Text; | ||
using Silk.NET.Core; | ||
using Silk.NET.Core.Native; | ||
using Silk.NET.Core.Attributes; | ||
using Silk.NET.Core.Contexts; | ||
using Silk.NET.Core.Loader; | ||
|
||
#pragma warning disable 1591 | ||
|
||
namespace Silk.NET.WebGPU.Extensions.Dawn | ||
{ | ||
[NativeName("Name", "WGPUDawnMultisampleStateRenderToSingleSampled")] | ||
public unsafe partial struct DawnMultisampleStateRenderToSingleSampled | ||
{ | ||
public DawnMultisampleStateRenderToSingleSampled | ||
( | ||
ChainedStruct? chain = null, | ||
Silk.NET.Core.Bool32? enabled = null | ||
) : this() | ||
{ | ||
if (chain is not null) | ||
{ | ||
Chain = chain.Value; | ||
} | ||
|
||
if (enabled is not null) | ||
{ | ||
Enabled = enabled.Value; | ||
} | ||
} | ||
|
||
|
||
[NativeName("Type", "WGPUChainedStruct")] | ||
[NativeName("Type.Name", "WGPUChainedStruct")] | ||
[NativeName("Name", "chain")] | ||
public ChainedStruct Chain; | ||
|
||
[NativeName("Type", "WGPUBool")] | ||
[NativeName("Type.Name", "WGPUBool")] | ||
[NativeName("Name", "enabled")] | ||
public Silk.NET.Core.Bool32 Enabled; | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
....WebGPU.Extensions.Dawn/Structs/DawnRenderPassColorAttachmentRenderToSingleSampled.gen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.Runtime.CompilerServices; | ||
using System.Text; | ||
using Silk.NET.Core; | ||
using Silk.NET.Core.Native; | ||
using Silk.NET.Core.Attributes; | ||
using Silk.NET.Core.Contexts; | ||
using Silk.NET.Core.Loader; | ||
|
||
#pragma warning disable 1591 | ||
|
||
namespace Silk.NET.WebGPU.Extensions.Dawn | ||
{ | ||
[NativeName("Name", "WGPUDawnRenderPassColorAttachmentRenderToSingleSampled")] | ||
public unsafe partial struct DawnRenderPassColorAttachmentRenderToSingleSampled | ||
{ | ||
public DawnRenderPassColorAttachmentRenderToSingleSampled | ||
( | ||
ChainedStruct? chain = null, | ||
uint? implicitSampleCount = null | ||
) : this() | ||
{ | ||
if (chain is not null) | ||
{ | ||
Chain = chain.Value; | ||
} | ||
|
||
if (implicitSampleCount is not null) | ||
{ | ||
ImplicitSampleCount = implicitSampleCount.Value; | ||
} | ||
} | ||
|
||
|
||
[NativeName("Type", "WGPUChainedStruct")] | ||
[NativeName("Type.Name", "WGPUChainedStruct")] | ||
[NativeName("Name", "chain")] | ||
public ChainedStruct Chain; | ||
|
||
[NativeName("Type", "uint32_t")] | ||
[NativeName("Type.Name", "uint32_t")] | ||
[NativeName("Name", "implicitSampleCount")] | ||
public uint ImplicitSampleCount; | ||
} | ||
} |
Oops, something went wrong.