Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out a plan for native webgpu deubgging #34

Open
greggman opened this issue Feb 22, 2023 · 0 comments
Open

Figure out a plan for native webgpu deubgging #34

greggman opened this issue Feb 22, 2023 · 0 comments

Comments

@greggman
Copy link
Collaborator

There's a larger webgpu community than just the browser and it would be sad to duplicate work or make something that a large number of webgpu developers can't use (all the rust/c++ and other languages using webgpu)

An obvious idea would be to write the trace/capture portion in some native language with a C api that outputs a compatible trace. Then, any other language can output a trace. Maybe we can make the library launch the browser based debugger with the trace so it feels integrated.

Intercepting webgpu calls in the browser is trivial and requires zero co-operation of the app being debugged. Intercepting webgpu calls in other languages in native apps would require some form of indirection compiled into those apps. I wonder if some affordance for that could be added to webgpu.h (if that even makes sense). The hope would be that if you used webgpu.h then, other than some #define and inclusion of some trace library from this repo you wouldn't need to change much to enable traces. By affordance, just the ability to indirect the calls via some compile time flag might be enough and so not require every native project to build its own indirection system.

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

No branches or pull requests

1 participant