gpu-dawn: Renderdoc integration
It'd be nice if mach had some integration with graphics debuggers like RenderDoc.
RenderDoc has a C API for applications, which could be wrapped as part of a debug package in mach. It's useful for things like recording specific parts of a frame, allowing the application to hide or modify the RenderDoc overlay, triggering captures based on application-specific events, etc.
I'd love to have something like this. I think debugging WebGPU is still a bit of an up-in-the-air topic, I haven't had time to look into this deeply at all yet, though.
Having spent the last few days playing with mach/gpu, I can at least say that RenderDoc works great with Dawn's Vulkan backend on Linux :) I imagine it'd be the same with the DirectX backend on Windows, but if not, using Vulkan is always an option there too.
Unfortunately, RenderDoc doesn't support macOS - maybe there's another option that could be used there?
One thing that was slightly annoying is that Dawn doesn't appear to include user-defined labels in debug names by default - looks like there's a toggle for it (use_user_defined_labels_in_backend), but I'm not sure how feasible it is for mach to expose that option. Perhaps mach/gpu-dawn could just set it unconditionally? Maybe just in debug mode.
Looks like it does indeed just work with DirectX on Windows:

Looks like Dawn now hides this behind a #define DAWN_USE_VKTRACE and DAWN_USE_RENDERDOC, should add these to our builds