From 3dd497087ffcb2e1fa894d96d338a8b7333d65c7 Mon Sep 17 00:00:00 2001 From: Almar Klein Date: Tue, 23 Dec 2025 11:03:01 +0100 Subject: [PATCH 1/4] Update wgpu-native --- wgpu/backends/wgpu_native/__init__.py | 4 ++-- wgpu/resources/wgpu.h | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/wgpu/backends/wgpu_native/__init__.py b/wgpu/backends/wgpu_native/__init__.py index ab2ac6b7..f4654657 100644 --- a/wgpu/backends/wgpu_native/__init__.py +++ b/wgpu/backends/wgpu_native/__init__.py @@ -11,8 +11,8 @@ # The wgpu-native version that we target/expect -__version__ = "27.0.2.0" -__commit_sha__ = "74f8c24c903b6352d09f1928c56962ce06f77a4d" +__version__ = "27.0.4.0" +__commit_sha__ = "768f15f6ace8e4ec8e8720d5732b29e0b34250a8" version_info = tuple(map(int, __version__.split("."))) # noqa: RUF048 _check_expected_version(version_info) # produces a warning on mismatch diff --git a/wgpu/resources/wgpu.h b/wgpu/resources/wgpu.h index 272ed23a..f9ab1827 100644 --- a/wgpu/resources/wgpu.h +++ b/wgpu/resources/wgpu.h @@ -137,6 +137,13 @@ typedef enum WGPUGLFenceBehaviour { WGPUGLFenceBehaviour_Force32 = 0x7FFFFFFF } WGPUGLFenceBehaviour; +typedef enum WGPUDx12SwapchainKind { + WGPUDx12SwapchainKind_Undefined = 0x00000000, + WGPUDx12SwapchainKind_DxgiFromHwnd = 0x00000001, + WGPUDx12SwapchainKind_DxgiFromVisual = 0x00000002, + WGPUDx12SwapchainKind_Force32 = 0x7FFFFFFF +} WGPUDx12SwapchainKind; + typedef struct WGPUInstanceExtras { WGPUChainedStruct chain; WGPUInstanceBackend backends; @@ -146,6 +153,7 @@ typedef struct WGPUInstanceExtras { WGPUGLFenceBehaviour glFenceBehaviour; WGPUStringView dxcPath; WGPUDxcMaxShaderModel dxcMaxShaderModel; + WGPUDx12SwapchainKind dx12PresentationSystem; WGPU_NULLABLE const uint8_t* budgetForDeviceCreation; WGPU_NULLABLE const uint8_t* budgetForDeviceLoss; @@ -307,6 +315,7 @@ void wgpuGenerateReport(WGPUInstance instance, WGPUGlobalReport * report); size_t wgpuInstanceEnumerateAdapters(WGPUInstance instance, WGPU_NULLABLE WGPUInstanceEnumerateAdapterOptions const * options, WGPUAdapter * adapters); WGPUSubmissionIndex wgpuQueueSubmitForIndex(WGPUQueue queue, size_t commandCount, WGPUCommandBuffer const * commands); +float wgpuQueueGetTimestampPeriod(WGPUQueue queue); // 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 * submissionIndex); From 414ff258e823ade7f282dfe1cf8e8cb1a1c90b17 Mon Sep 17 00:00:00 2001 From: Almar Klein Date: Thu, 5 Feb 2026 14:58:56 +0100 Subject: [PATCH 2/4] codegen --- wgpu/resources/codegen_report.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wgpu/resources/codegen_report.md b/wgpu/resources/codegen_report.md index 97deccec..7b2b233b 100644 --- a/wgpu/resources/codegen_report.md +++ b/wgpu/resources/codegen_report.md @@ -2,8 +2,8 @@ ## Preparing * The webgpu.idl defines 37 classes with 76 functions * The webgpu.idl defines 5 flags, 34 enums, 60 structs -* webgpu.h/wgpu.h define 211 functions -* webgpu.h/wgpu.h define 7 flags, 61 enums, 103 structs +* webgpu.h/wgpu.h define 212 functions +* webgpu.h/wgpu.h define 7 flags, 62 enums, 103 structs ## Updating API * Wrote 5 flags to flags.py * Wrote 34 enums to enums.py @@ -41,5 +41,5 @@ * Enum CanvasToneMappingMode missing in webgpu.h/wgpu.h * Wrote 255 enum mappings and 47 struct-field mappings to wgpu_native/_mappings.py * Validated 154 C function calls -* Not using 68 C functions +* Not using 69 C functions * Validated 97 C structs From ac9696c873aac09dbfeb67f000f29ace189f7241 Mon Sep 17 00:00:00 2001 From: Almar Klein Date: Tue, 10 Feb 2026 22:25:14 +0100 Subject: [PATCH 3/4] skip failing tests because it also sometimes hangs --- tests/test_wgpu_native_query_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_wgpu_native_query_set.py b/tests/test_wgpu_native_query_set.py index 940cde09..e43ce56e 100644 --- a/tests/test_wgpu_native_query_set.py +++ b/tests/test_wgpu_native_query_set.py @@ -297,7 +297,7 @@ def test_render_timestamps_inside_passes(): runner.run_write_timestamp_inside_passes_test(render=True) -@pytest.mark.xfail(sys.platform == "darwin", reason="Known to currently fail on MacOS") +@pytest.mark.skipif(sys.platform == "darwin", reason="Known to currently fail (and sometimes hang) on MacOS") def test_render_timestamps_inside_encoder(): runner = Runner() if "timestamp-query-inside-encoders" not in runner.device.features: From 2a66aae56b65e6219f3b2405a5c36d7d1b7fbba4 Mon Sep 17 00:00:00 2001 From: Almar Klein Date: Tue, 10 Feb 2026 22:27:04 +0100 Subject: [PATCH 4/4] ruff --- tests/test_wgpu_native_query_set.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_wgpu_native_query_set.py b/tests/test_wgpu_native_query_set.py index e43ce56e..72e70313 100644 --- a/tests/test_wgpu_native_query_set.py +++ b/tests/test_wgpu_native_query_set.py @@ -297,7 +297,10 @@ def test_render_timestamps_inside_passes(): runner.run_write_timestamp_inside_passes_test(render=True) -@pytest.mark.skipif(sys.platform == "darwin", reason="Known to currently fail (and sometimes hang) on MacOS") +@pytest.mark.skipif( + sys.platform == "darwin", + reason="Known to currently fail (and sometimes hang) on MacOS", +) def test_render_timestamps_inside_encoder(): runner = Runner() if "timestamp-query-inside-encoders" not in runner.device.features: