Keep debug labels out of the ImGui passes in normal builds

Aurora's own debug groups only exist when AURORA_GFX_DEBUG_GROUPS is
defined, but the three ImGui passes (desktop overlay, host-frame overlay
and the headset settings panel) pushed and popped theirs in every build.
An Adreno 740 Android driver (512.676) faults in
vkCmdEndDebugUtilsLabelEXT on the first overlay pass (KartPad #321); the
Quest 3 uses the same GPU. Gate all three like the rest of Aurora.

Ported from chrissotraidis/wiicompiled (KartPad) 420b828, extended to the
two extra passes this fork has.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019rLZ24cFcqTNBmb4w2dpSq
This commit is contained in:
Claude committed 2026-10-05 15:55:43 +00:00
1 parent c5f9ca3e2d
commit f7ca5ecbd6
1 file changed
+12
+12
View File
@@ -221,9 +221,13 @@ void render(const wgpu::RenderPassEncoder& pass) noexcept {
ImGui_ImplSDLRenderer3_RenderDrawData(data, renderer); ImGui_ImplSDLRenderer3_RenderDrawData(data, renderer);
SDL_RenderPresent(renderer); SDL_RenderPresent(renderer);
} else { } else {
#ifdef AURORA_GFX_DEBUG_GROUPS
pass.PushDebugGroup("Aurora: Dear Imgui"); pass.PushDebugGroup("Aurora: Dear Imgui");
#endif
ImGui_ImplWGPU_RenderDrawData(data, pass.Get()); ImGui_ImplWGPU_RenderDrawData(data, pass.Get());
#ifdef AURORA_GFX_DEBUG_GROUPS
pass.PopDebugGroup(); pass.PopDebugGroup();
#endif
} }
} }
@@ -287,9 +291,13 @@ void render(const wgpu::RenderPassEncoder& pass, const ImDrawData* data) noexcep
if (g_useSdlRenderer || data == nullptr) { if (g_useSdlRenderer || data == nullptr) {
return; return;
} }
#ifdef AURORA_GFX_DEBUG_GROUPS
pass.PushDebugGroup("Aurora: Dear Imgui"); pass.PushDebugGroup("Aurora: Dear Imgui");
#endif
ImGui_ImplWGPU_RenderDrawData(const_cast<ImDrawData*>(data), pass.Get()); ImGui_ImplWGPU_RenderDrawData(const_cast<ImDrawData*>(data), pass.Get());
#ifdef AURORA_GFX_DEBUG_GROUPS
pass.PopDebugGroup(); pass.PopDebugGroup();
#endif
} }
StereoOverlay latch_stereo_overlay() noexcept { StereoOverlay latch_stereo_overlay() noexcept {
@@ -303,9 +311,13 @@ bool render_draw_data(const wgpu::RenderPassEncoder& pass, ImDrawData* data) noe
if (g_useSdlRenderer || data == nullptr || ImGui::GetCurrentContext() == nullptr) { if (g_useSdlRenderer || data == nullptr || ImGui::GetCurrentContext() == nullptr) {
return false; return false;
} }
#ifdef AURORA_GFX_DEBUG_GROUPS
pass.PushDebugGroup("Aurora: Dear Imgui headset panel"); pass.PushDebugGroup("Aurora: Dear Imgui headset panel");
#endif
ImGui_ImplWGPU_RenderDrawData(data, pass.Get()); ImGui_ImplWGPU_RenderDrawData(data, pass.Get());
#ifdef AURORA_GFX_DEBUG_GROUPS
pass.PopDebugGroup(); pass.PopDebugGroup();
#endif
return true; return true;
} }