Slimmed down WEBGL_debug with just object labels and debug groups
Opened this issue · 1 comments
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.
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.