Closed danielchasehooper closed 1 year ago
Yes good idea, question is: only in debug mode, or also for release? I tend towards 'only in debug mode'.
Ok, I'll only do it in debug mode. I also implemented sg_push/pop_debug_group()
, but only inside a render pass (because these are MTLCommandEncoder methods in Metal).
In some cases I'm adding a post-fix to the label (where sokol-gfx may create multiple Metal objects for a single sokol-gfx object). For the texcube-sapp it looks like this:
PS: also make sure to run your sokol-gfx frame inside an @autoreleasepool
, not sure if I have mentioned that anywhere (sokol_app.h does this automatically).
I'll put the changes into a PR and close this ticket when merged.
Ok, fixed in a4d1119d09c3f1a54f851d9af32e974ab2a56a2b
Awesome! Thank you! I was also thinking only in debug mode.
It would be useful if all the
.label
strings were passed on to the underlying MTLResource'slabel
property, for easier debugging in the Metal Debugger.