Skip to content

Commit

Permalink
Update to latest WebGPU headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Beyley committed Sep 23, 2023
1 parent 647e73d commit 3387780
Show file tree
Hide file tree
Showing 86 changed files with 3,766 additions and 895 deletions.
Binary file modified build/cache/webgpu.json.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion build/submodules/dawn
Submodule dawn updated 18440 files
2 changes: 1 addition & 1 deletion build/submodules/webgpu-headers
3 changes: 2 additions & 1 deletion generator.json
Original file line number Diff line number Diff line change
Expand Up @@ -2364,7 +2364,8 @@
"WGPUMapModeFlags": "Silk.NET.WebGPU.MapMode",
"WGPUShaderStageFlags": "Silk.NET.WebGPU.ShaderStage",
"WGPUTextureUsageFlags": "Silk.NET.WebGPU.TextureUsage",
"WGPUInstanceBackendFlags": "Silk.NET.WebGPU.Extensions.WGPU.InstanceBackend"
"WGPUInstanceBackendFlags": "Silk.NET.WebGPU.Extensions.WGPU.InstanceBackend",
"WGPUBool": "Silk.NET.Core.Bool32"
},
{
"$include.commonTypeMap": "build/csharp_typemap.json",
Expand Down
375 changes: 255 additions & 120 deletions src/WebGPU/Extensions/Silk.NET.WebGPU.Extensions.Dawn/Dawn.gen.cs

Large diffs are not rendered by default.

Large diffs are not rendered by default.

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,
}
}
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,
}
}
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,
}
}
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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ public CopyTextureForBrowserOptions
[NativeName("Name", "nextInChain")]
public ChainedStruct* NextInChain;

[NativeName("Type", "bool")]
[NativeName("Type.Name", "bool")]
[NativeName("Type", "WGPUBool")]
[NativeName("Type.Name", "WGPUBool")]
[NativeName("Name", "flipY")]
public Silk.NET.Core.Bool32 FlipY;

[NativeName("Type", "bool")]
[NativeName("Type.Name", "bool")]
[NativeName("Type", "WGPUBool")]
[NativeName("Type.Name", "WGPUBool")]
[NativeName("Name", "needsColorSpaceConversion")]
public Silk.NET.Core.Bool32 NeedsColorSpaceConversion;

Expand Down Expand Up @@ -119,8 +119,8 @@ public CopyTextureForBrowserOptions
[NativeName("Name", "dstAlphaMode")]
public AlphaMode DstAlphaMode;

[NativeName("Type", "bool")]
[NativeName("Type.Name", "bool")]
[NativeName("Type", "WGPUBool")]
[NativeName("Type.Name", "WGPUBool")]
[NativeName("Name", "internalUsage")]
public Silk.NET.Core.Bool32 InternalUsage;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public DawnBufferDescriptorErrorInfoFromWireClient
[NativeName("Name", "chain")]
public ChainedStruct Chain;

[NativeName("Type", "bool")]
[NativeName("Type.Name", "bool")]
[NativeName("Type", "WGPUBool")]
[NativeName("Type.Name", "WGPUBool")]
[NativeName("Name", "outOfMemory")]
public Silk.NET.Core.Bool32 OutOfMemory;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public DawnEncoderInternalUsageDescriptor
[NativeName("Name", "chain")]
public ChainedStruct Chain;

[NativeName("Type", "bool")]
[NativeName("Type.Name", "bool")]
[NativeName("Type", "WGPUBool")]
[NativeName("Type.Name", "WGPUBool")]
[NativeName("Name", "useInternalUsages")]
public Silk.NET.Core.Bool32 UseInternalUsages;
}
Expand Down
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;
}
}
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;
}
}
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;
}
}
Loading

0 comments on commit 3387780

Please sign in to comment.