mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-23 18:19:21 +01:00
renderer_opengl: Add debug scopes to logging (#6650)
This commit is contained in:
parent
d26dcc8e31
commit
ca2d87e5e3
@ -44,6 +44,8 @@ inline std::string_view GetType(GLenum type) {
|
||||
RET(PERFORMANCE);
|
||||
RET(OTHER);
|
||||
RET(MARKER);
|
||||
RET(POP_GROUP);
|
||||
RET(PUSH_GROUP);
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/scope_exit.h"
|
||||
#include "common/settings.h"
|
||||
#include "video_core/custom_textures/material.h"
|
||||
#include "video_core/regs.h"
|
||||
#include "video_core/renderer_base.h"
|
||||
@ -702,10 +703,16 @@ Sampler::~Sampler() = default;
|
||||
|
||||
DebugScope::DebugScope(TextureRuntime& runtime, Common::Vec4f, std::string_view label)
|
||||
: local_scope_depth{global_scope_depth++} {
|
||||
if (!Settings::values.renderer_debug) {
|
||||
return;
|
||||
}
|
||||
glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, local_scope_depth, label.size(), label.data());
|
||||
}
|
||||
|
||||
DebugScope::~DebugScope() {
|
||||
if (!Settings::values.renderer_debug) {
|
||||
return;
|
||||
}
|
||||
glPopDebugGroup();
|
||||
global_scope_depth--;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user