mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-05 18:23:39 -04:00
renderer_gl: Fix DebugScope unconditional incrementing of global_scope_depth
`global_scope_depth` was being incremented unconditionally in the ctor, but the dtor was decrementing it conditionally based on `Settings::values.renderer_debug`, allowing an imbalanced scope-depth hazard in the case that `Settings::values.renderer_debug` is operated at runtime during a debug-scope.
This commit is contained in:
parent
de15a7c79a
commit
60be8ced99
1 changed files with 1 additions and 1 deletions
|
|
@ -716,7 +716,7 @@ Sampler::Sampler(TextureRuntime&, VideoCore::SamplerParams params) {
|
||||||
Sampler::~Sampler() = default;
|
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{Settings::values.renderer_debug ? global_scope_depth++ : 0} {
|
||||||
if (!Settings::values.renderer_debug) {
|
if (!Settings::values.renderer_debug) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue