commit 8f6bd18943a0e6fac3cfdd22267f63801b829606
parent 4a49b703b9c8ff10fcc824da0fc331cae17417aa
Author: Christian Ermann <christian.ermann@joescan.com>
Date: Tue, 15 Jul 2025 19:14:36 -0700
Update to wgpu-native 25.0.2.1
Diffstat:
3 files changed, 43 insertions(+), 5 deletions(-)
diff --git a/include/wgpu.h b/include/wgpu.h
@@ -8,7 +8,7 @@ typedef enum WGPUNativeSType {
WGPUSType_DeviceExtras = 0x00030001,
WGPUSType_NativeLimits = 0x00030002,
WGPUSType_PipelineLayoutExtras = 0x00030003,
- WGPUSType_ShaderModuleGLSLDescriptor = 0x00030004,
+ WGPUSType_ShaderSourceGLSL = 0x00030004,
WGPUSType_InstanceExtras = 0x00030006,
WGPUSType_BindGroupEntryExtras = 0x00030007,
WGPUSType_BindGroupLayoutEntryExtras = 0x00030008,
@@ -118,14 +118,34 @@ typedef enum WGPUNativeQueryType {
WGPUNativeQueryType_Force32 = 0x7FFFFFFF
} WGPUNativeQueryType WGPU_ENUM_ATTRIBUTE;
+typedef enum WGPUDxcMaxShaderModel {
+ WGPUDxcMaxShaderModel_V6_0 = 0x00000000,
+ WGPUDxcMaxShaderModel_V6_1 = 0x00000001,
+ WGPUDxcMaxShaderModel_V6_2 = 0x00000002,
+ WGPUDxcMaxShaderModel_V6_3 = 0x00000003,
+ WGPUDxcMaxShaderModel_V6_4 = 0x00000004,
+ WGPUDxcMaxShaderModel_V6_5 = 0x00000005,
+ WGPUDxcMaxShaderModel_V6_6 = 0x00000006,
+ WGPUDxcMaxShaderModel_V6_7 = 0x00000007,
+ WGPUDxcMaxShaderModel_Force32 = 0x7FFFFFFF
+} WGPUDxcMaxShaderModel;
+
+typedef enum WGPUGLFenceBehaviour {
+ WGPUGLFenceBehaviour_Normal = 0x00000000,
+ WGPUGLFenceBehaviour_AutoFinish = 0x00000001,
+ WGPUGLFenceBehaviour_Force32 = 0x7FFFFFFF
+} WGPUGLFenceBehaviour;
+
typedef struct WGPUInstanceExtras {
WGPUChainedStruct chain;
WGPUInstanceBackend backends;
WGPUInstanceFlag flags;
WGPUDx12Compiler dx12ShaderCompiler;
WGPUGles3MinorVersion gles3MinorVersion;
+ WGPUGLFenceBehaviour glFenceBehaviour;
WGPUStringView dxilPath;
WGPUStringView dxcPath;
+ WGPUDxcMaxShaderModel dxcMaxShaderModel;
} WGPUInstanceExtras;
typedef struct WGPUDeviceExtras {
@@ -159,13 +179,13 @@ typedef struct WGPUShaderDefine {
WGPUStringView value;
} WGPUShaderDefine;
-typedef struct WGPUShaderModuleGLSLDescriptor {
+typedef struct WGPUShaderSourceGLSL {
WGPUChainedStruct chain;
WGPUShaderStage stage;
WGPUStringView code;
uint32_t defineCount;
WGPUShaderDefine * defines;
-} WGPUShaderModuleGLSLDescriptor;
+} WGPUShaderSourceGLSL;
typedef struct WGPUShaderModuleDescriptorSpirV {
WGPUStringView label;
@@ -260,7 +280,7 @@ size_t wgpuInstanceEnumerateAdapters(WGPUInstance instance, WGPU_NULLABLE WGPUIn
WGPUSubmissionIndex wgpuQueueSubmitForIndex(WGPUQueue queue, size_t commandCount, WGPUCommandBuffer const * commands);
// Returns true if the queue is empty, or false if there are more queue submissions still in flight.
-WGPUBool wgpuDevicePoll(WGPUDevice device, WGPUBool wait, WGPU_NULLABLE WGPUSubmissionIndex const * wrappedSubmissionIndex);
+WGPUBool wgpuDevicePoll(WGPUDevice device, WGPUBool wait, WGPU_NULLABLE WGPUSubmissionIndex const * submissionIndex);
WGPUShaderModule wgpuDeviceCreateShaderModuleSpirV(WGPUDevice device, WGPUShaderModuleDescriptorSpirV const * descriptor);
void wgpuSetLogCallback(WGPULogCallback callback, void * userdata);
diff --git a/src/wgpu-bindings/common.zig b/src/wgpu-bindings/common.zig
@@ -17,7 +17,7 @@ pub const SType = enum(u32) {
device_extras = 0x00030001,
native_limits = 0x00030002,
pipeline_layout_extras = 0x00030003,
- shader_module_glsl_descriptor = 0x00030004,
+ shader_source_glsl = 0x00030004,
instance_extras = 0x00030006,
bind_group_entry_extras = 0x00030007,
bind_group_layout_entry_extras = 0x00030008,
diff --git a/src/wgpu-bindings/instance.zig b/src/wgpu-bindings/instance.zig
@@ -90,8 +90,10 @@ pub const Instance = opaque {
flags: Flags,
dx12_compiler: DX12Compiler,
gles3_minor_version: GLES3MinorVersion,
+ gl_fence_behavior: GLFenceBehavior,
dxil_path: ?[*:0]const u8,
dxc_path: ?[*:0]const u8,
+ dxc_max_shader_model: DXCMaxShaderModel,
pub const Backends = enum(u32) {
all = 0x00000000,
@@ -124,6 +126,22 @@ pub const Instance = opaque {
version1 = 0x00000002,
version2 = 0x00000003,
};
+
+ pub const GLFenceBehavior = enum(u32) {
+ normal = 0x00000000,
+ auto_finish = 0x00000001,
+ };
+
+ pub const DXCMaxShaderModel = enum(u32) {
+ dxc_max_shader_model_v6_0 = 0x00000000,
+ dxc_max_shader_model_v6_1 = 0x00000001,
+ dxc_max_shader_model_v6_2 = 0x00000002,
+ dxc_max_shader_model_v6_3 = 0x00000003,
+ dxc_max_shader_model_v6_4 = 0x00000004,
+ dxc_max_shader_model_v6_5 = 0x00000005,
+ dxc_max_shader_model_v6_6 = 0x00000006,
+ dxc_max_shader_model_v6_7 = 0x00000007,
+ };
};
pub const Capabilities = extern struct {