Skip to content

Conversation

eliemichel
Copy link
Contributor

@eliemichel eliemichel commented Sep 24, 2024

Polling all devices

Copy link
Collaborator

@almarklein almarklein left a comment

Choose a reason for hiding this comment

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

Thanks!

@almarklein
Copy link
Collaborator

I happen to look into enabling async support for wgpu-py now, so the timing couldn't be better 😄

@rajveermalviya how does wgpuInstanceProcessEvents (which is in webgpu.h) relate to wgpuDevicePoll (which is in wgpu.h, here)? I presume the latter will be deprecated at some point?

This PR makeswgpuInstanceProcessEvents polls all devices, but is that enough? Does the current call do all the things mentioned here: webgpu-native/webgpu-headers#117?

And then there's webgpu-native/webgpu-headers#199 and webgpu-native/webgpu-headers#314 ... From what I understand, the Future API allows polling for callbacks precisely, while wgpuInstanceProcessEvents is a global "tick" (and does some extra things.

@almarklein almarklein merged commit c89603c into gfx-rs:trunk Mar 20, 2025
16 checks passed
@almarklein
Copy link
Collaborator

Some more info on my own questions:

From what I understand the former is just more precise (allowing polling a specific device, and with a specific submission_index.

@eliemichel eliemichel deleted the eliemichel/wgpuInstanceProcessEvents branch April 7, 2025 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants