1# Debug Markers 2 3Dawn provides debug tooling integration for each backend. 4 5Debugging markers are exposed through this API: 6``` 7partial GPUProgrammablePassEncoder { 8 void pushDebugGroup(const char * markerLabel); 9 void popDebugGroup(); 10 void insertDebugMarker(const char * markerLabel); 11}; 12``` 13 14These APIs will result in silent no-ops if they are used without setting up 15the execution environment properly. Each backend has a specific process 16for setting up this environment. 17 18## D3D12 19 20Debug markers on D3D12 are implemented with the [PIX Event Runtime](https://blogs.msdn.microsoft.com/pix/winpixeventruntime/). 21 22To enable marker functionality, you must: 231. Click the download link on https://www.nuget.org/packages/WinPixEventRuntime 242. Rename the .nupkg file to a .zip extension, then extract its contents. 253. Copy `bin\WinPixEventRuntime.dll` into the same directory as `libdawn_native.dll`. 264. Launch your application. 27 28You 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. 29 30D3D12 debug markers have been tested with [Microsoft PIX](https://devblogs.microsoft.com/pix/) and [Intel Graphics Frame Analyzer](https://software.intel.com/en-us/gpa/graphics-frame-analyzer). 31 32Unfortunately, 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. 33 34## Vulkan 35 36Debug markers on Vulkan are implemented with [VK_EXT_debug_marker](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VK_EXT_debug_marker). 37 38To enable marker functionality, you must launch your application from your debugging tool. Attaching to an already running application is not supported. 39 40Vulkan markers have been tested with [RenderDoc](https://renderdoc.org/). 41 42## Metal 43 44Debug markers on Metal are used with the XCode debugger. 45 46To enable marker functionality, you must launch your application from XCode and use [GPU Frame Capture](https://developer.apple.com/documentation/metal/tools_profiling_and_debugging/metal_gpu_capture). 47 48## OpenGL 49 50Debug 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.