gl: Fix crash when renderdoc compatibility is enabled on some hardware

This commit is contained in:
kd-11 2026-04-24 02:18:29 +03:00 committed by kd-11
parent 3574677b66
commit a60734e27b

View File

@ -99,7 +99,10 @@ namespace gl
// Very useful util when capturing traces with RenderDoc
static inline void push_debug_label(std::string_view label)
{
glInsertEventMarkerEXT(static_cast<GLsizei>(label.size()), label.data());
if (glInsertEventMarkerEXT)
{
glInsertEventMarkerEXT(static_cast<GLsizei>(label.size()), label.data());
}
}
// Checks if GL state is still valid