Dawn provides debug tooling integration for each backend.
Debugging markers are exposed through this API:
partial GPUProgrammablePassEncoder { void pushDebugGroup(const char * markerLabel); void popDebugGroup(); void insertDebugMarker(const char * markerLabel); };
These APIs will result in silent no-ops if they are used without setting up the execution environment properly. Each backend has a specific process for setting up this environment.
Debug markers on D3D12 are implemented with the PIX Event Runtime.
To enable marker functionality, you must:
bin\WinPixEventRuntime.dll
into the same directory as libdawn_native.dll
.You may now call the debug marker APIs mentioned above and see them from your GPU debugging tool. When using your tool, it is supported to both launch your application with the debugger attached, or attach the debugger while your application is running.
D3D12 debug markers have been tested with Microsoft PIX and Intel Graphics Frame Analyzer.
Unfortunately, PIX's UI does does not lend itself to capturing single frame applications like tests. You must enable capture from within your application. To do this in Dawn tests, pass the --begin-capture-on-startup flag to dawn_end2end_tests.exe.
Debug markers on Vulkan are implemented with VK_EXT_debug_marker.
To enable marker functionality, you must launch your application from your debugging tool. Attaching to an already running application is not supported.
Vulkan markers have been tested with RenderDoc.
Debug markers on Metal are used with the XCode debugger.
To enable marker functionality, you must launch your application from XCode and use GPU Frame Capture.
Debug markers on OpenGL are not implemented and will result in a silent no-op. This is due to low adoption of the GL_EXT_debug_marker extension in Linux device drivers.