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(PERFORMANCE);
|
||||||
RET(OTHER);
|
RET(OTHER);
|
||||||
RET(MARKER);
|
RET(MARKER);
|
||||||
|
RET(POP_GROUP);
|
||||||
|
RET(PUSH_GROUP);
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "common/scope_exit.h"
|
#include "common/scope_exit.h"
|
||||||
|
#include "common/settings.h"
|
||||||
#include "video_core/custom_textures/material.h"
|
#include "video_core/custom_textures/material.h"
|
||||||
#include "video_core/regs.h"
|
#include "video_core/regs.h"
|
||||||
#include "video_core/renderer_base.h"
|
#include "video_core/renderer_base.h"
|
||||||
@ -702,10 +703,16 @@ Sampler::~Sampler() = default;
|
|||||||
|
|
||||||
DebugScope::DebugScope(TextureRuntime& runtime, Common::Vec4f, std::string_view label)
|
DebugScope::DebugScope(TextureRuntime& runtime, Common::Vec4f, std::string_view label)
|
||||||
: local_scope_depth{global_scope_depth++} {
|
: local_scope_depth{global_scope_depth++} {
|
||||||
|
if (!Settings::values.renderer_debug) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, local_scope_depth, label.size(), label.data());
|
glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, local_scope_depth, label.size(), label.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
DebugScope::~DebugScope() {
|
DebugScope::~DebugScope() {
|
||||||
|
if (!Settings::values.renderer_debug) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
glPopDebugGroup();
|
glPopDebugGroup();
|
||||||
global_scope_depth--;
|
global_scope_depth--;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user