You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When debugging a complex graphical application, having named marker groups/events is essential. On GL, these are glPushGroupMarker and friends. Other APIs supposedly provide similar functionality, and if not - we can always just have a blanket implementation.
Rough design:
let marker = encoder.push_marker("Alpha entities");
...encoder.pop_marker(marker);
Here, marker is set to #[must_use] and potentially asserting/erroring in the destructor to make it pseudo-linear.
We also need to ensure the things are pushed/popped in the right order. Perhaps, something like a one-use phantom type would be sufficient? E.g.
enumMarkerAll{};enumMarkerAlpha{};let marker_all = encoder.push_marker::<MarkerAll>(());// type `Marker1<MarkerAll>`;let marker_alpha = encoder.push_marker::<MarkerAlpha>(marker_all);// type `Marker2<MarkerAlpha, MarkerAll>`;// draw stuff herelet marker_all = encoder.pop_marker(marker_alpha);
encoder.pop_marker(marker_all);
The text was updated successfully, but these errors were encountered:
Other interesting concepts added by the vulkan debug extension and also supported by some OpenGL implementation, which could be taken into consideration:
Non-region markers / Event markers (mark a single place in the trace)
When debugging a complex graphical application, having named marker groups/events is essential. On GL, these are
glPushGroupMarker
and friends. Other APIs supposedly provide similar functionality, and if not - we can always just have a blanket implementation.Rough design:
Here,
marker
is set to#[must_use]
and potentially asserting/erroring in the destructor to make it pseudo-linear.We also need to ensure the things are pushed/popped in the right order. Perhaps, something like a one-use phantom type would be sufficient? E.g.
The text was updated successfully, but these errors were encountered: