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

Slimmed down WEBGL_debug with just object labels and debug groups #3514

Open
magcius opened this issue Jan 24, 2023 · 1 comment
Open

Slimmed down WEBGL_debug with just object labels and debug groups #3514

magcius opened this issue Jan 24, 2023 · 1 comment

Comments

@magcius
Copy link

magcius commented Jan 24, 2023

The WEBGL_debug extension exists, however it is not supported among any implementors right now. I have heard through conversation that this is because the debug message infrastructure is relatively painful to support.

In my experience with debugging a lot of WebGL projects, the message infrastructure is not important for my use case.

Maybe it makes sense to spec a version of WEBGL_debug with only these endpoints:

  • pushDebugGroupKHR(DOMString name)
  • popDebugGroup()
  • objectLabelKHR(WebGLObject? object, DOMString label)
  • Optional: getObjectLabelKHR(WebGLObject? object) (this is easy enough to stash on the application side)

What I would really want is for these debug groups and labels to be passed through to the underlying API. Currently, the most effective technique for debugging WebGL is to use a native API debugger (e.g. RenderDoc), and try to correlate the GL commands to the frame in some other way.

Also: this also isn't in the current version of WEBGL_debug, but another big bonus would be some ability to turn on "debug" shader support, e.g. running fxc.exe with /Od /Zi. This will put the shader text and debuginfo inside the generated DXBC, which helps a lot when doing detailed shader debugging.

@magcius
Copy link
Author

magcius commented May 18, 2024

Object labels were accomplished in a49331a. Nice, thank you!

I would still like pushDebugGroup/popDebugGroup. Also, while it's not strictly necessary, an equivalent to WebGPU's "insertDebugMarker" would be appreciated as well. GL has this in the form of EXT_debug_marker; glInsertEventMarkerEXT.

I'm happy to do the spec work, assuming implementations are able to implement. Tagging @kdashg for visibility.

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