Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ Possible sections in each release:
Downstream code should capture that error and skip the frame, optionally invoking some sort of sleep to save energy.
See https://github.com/pygfx/wgpu-py/pull/820 for context.

### Fixed:
* `GPUQueue.on_submitted_work_done_async()` no longer raises `TypeError` when
building its callback struct. The ffi callback was missing the
`WGPUStringView message` argument that the `WGPUQueueWorkDoneCallback` typedef
requires, so any call to it crashed. Also un-shadowed the test that covers
Comment thread
almarklein marked this conversation as resolved.
this path (it was named `make_pipeline_async` so pytest never collected it).


## [v0.31.1] - 23-06-2026

Expand Down
4 changes: 2 additions & 2 deletions tests/test_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ async def test_buffer_map_async():

@mark.skipif(not can_use_wgpu_lib, reason="Needs wgpu lib")
@mark.anyio
async def make_pipeline_async():
async def test_pipeline_async():
device = wgpu.utils.get_default_device()

shader_source = """
Expand Down Expand Up @@ -799,7 +799,7 @@ async def create_render_pipeline():
vertex={
"module": shader,
},
depth_stencil={"format": TextureFormat.rgba8unorm},
depth_stencil={"format": TextureFormat.depth32float},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this change?

)

tg.start_soon(create_compute_pipeline)
Expand Down
4 changes: 2 additions & 2 deletions wgpu/backends/wgpu_native/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4080,8 +4080,8 @@ def read_texture(
return data

def on_submitted_work_done_async(self) -> GPUPromise[None]:
@ffi.callback("void(WGPUQueueWorkDoneStatus, void *, void *)")
def work_done_callback(status, _userdata1, _userdata2):
@ffi.callback("void(WGPUQueueWorkDoneStatus, WGPUStringView, void *, void *)")
def work_done_callback(status, _message, _userdata1, _userdata2):
token.set_done()
if status == lib.WGPUQueueWorkDoneStatus_Success:
promise._wgpu_set_input(True)
Expand Down
Loading