diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index 163629875..2436bd1be 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -4055,7 +4055,7 @@ void GPU_HW::DownsampleFramebuffer() void GPU_HW::DownsampleFramebufferAdaptive(GPUTexture* source, u32 left, u32 top, u32 width, u32 height) { - GL_PUSH_FMT("DownsampleFramebufferAdaptive ({},{} => {},{})", left, top, left + width, left + height); + GL_SCOPE_FMT("DownsampleFramebufferAdaptive ({},{} => {},{})", left, top, left + width, left + height); struct SmoothingUBOData { @@ -4081,7 +4081,6 @@ void GPU_HW::DownsampleFramebufferAdaptive(GPUTexture* source, u32 left, u32 top if (!m_downsample_texture || !level_texture || !weight_texture) { ERROR_LOG("Failed to create {}x{} RTs for adaptive downsampling", width, height); - GL_POP(); return; } @@ -4166,8 +4165,6 @@ void GPU_HW::DownsampleFramebufferAdaptive(GPUTexture* source, u32 left, u32 top m_downsample_texture->MakeReadyForSampling(); } - GL_POP(); - RestoreDeviceContext(); m_presenter.SetDisplayTexture(m_downsample_texture.get(), 0, 0, width, height); diff --git a/src/util/gpu_device.h b/src/util/gpu_device.h index aecfdd605..9ef02d6fe 100644 --- a/src/util/gpu_device.h +++ b/src/util/gpu_device.h @@ -1030,18 +1030,6 @@ struct GLAutoPop }; #define GL_SCOPE(name) GLAutoPop GL_TOKEN_PASTE2(gl_auto_pop_, __LINE__)(name) -#define GL_PUSH(name) \ - do \ - { \ - if (g_gpu_device->IsDebugDevice()) [[unlikely]] \ - g_gpu_device->PushDebugGroup(name); \ - } while (0) -#define GL_POP() \ - do \ - { \ - if (g_gpu_device->IsDebugDevice()) [[unlikely]] \ - g_gpu_device->PopDebugGroup(); \ - } while (0) #define GL_INS(msg) \ do \ { \ @@ -1056,12 +1044,6 @@ struct GLAutoPop } while (0) #define GL_SCOPE_FMT(...) GLAutoPop GL_TOKEN_PASTE2(gl_auto_pop_, __LINE__)(__VA_ARGS__) -#define GL_PUSH_FMT(...) \ - do \ - { \ - if (g_gpu_device->IsDebugDevice()) [[unlikely]] \ - g_gpu_device->PushDebugGroup(__VA_ARGS__); \ - } while (0) #define GL_INS_FMT(...) \ do \ { \ @@ -1076,13 +1058,10 @@ struct GLAutoPop } while (0) #else #define GL_SCOPE(name) (void)0 -#define GL_PUSH(name) (void)0 -#define GL_POP() (void)0 #define GL_INS(msg) (void)0 #define GL_OBJECT_NAME(obj, name) (void)0 #define GL_SCOPE_FMT(...) (void)0 -#define GL_PUSH_FMT(...) (void)0 #define GL_INS_FMT(...) (void)0 #define GL_OBJECT_NAME_FMT(obj, ...) (void)0 #endif diff --git a/src/util/postprocessing_shader_fx.cpp b/src/util/postprocessing_shader_fx.cpp index a5d733e97..9a5eb2b74 100644 --- a/src/util/postprocessing_shader_fx.cpp +++ b/src/util/postprocessing_shader_fx.cpp @@ -1472,7 +1472,7 @@ GPUDevice::PresentResult PostProcessing::ReShadeFXShader::Apply(GPUTexture* inpu s32 native_height, u32 target_width, u32 target_height, float time) { - GL_PUSH_FMT("PostProcessingShaderFX {}", m_name); + GL_SCOPE_FMT("PostProcessingShaderFX {}", m_name); m_frame_count++; @@ -1764,10 +1764,7 @@ GPUDevice::PresentResult PostProcessing::ReShadeFXShader::Apply(GPUTexture* inpu // Special case: drawing to final buffer. const GPUDevice::PresentResult pres = g_gpu_device->BeginPresent(g_gpu_device->GetMainSwapChain()); if (pres != GPUDevice::PresentResult::OK) - { - GL_POP(); return pres; - } } else { @@ -1820,7 +1817,6 @@ GPUDevice::PresentResult PostProcessing::ReShadeFXShader::Apply(GPUTexture* inpu for (u32 i = 0; i < GPUDevice::MAX_TEXTURE_SAMPLERS; i++) g_gpu_device->SetTextureSampler(i, nullptr, nullptr); - GL_POP(); m_frame_timer.Reset(); return GPUDevice::PresentResult::OK; }