Skip to content
Draft
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions src/Features/PerformanceOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ void PerformanceOverlay::DrawSettings()
ImGui::Indent();

ImGui::Checkbox("Show FPS Counter", &this->settings.ShowFPS);
ImGui::Checkbox("Show Draw Calls", &this->settings.ShowDrawCalls);
// Show Draw Calls setting is only available in developer mode
if (globals::state->IsDeveloperMode()) {
ImGui::Checkbox("Show Draw Calls", &this->settings.ShowDrawCalls);
}
ImGui::Checkbox("Show VRAM Usage", &this->settings.ShowVRAM);

bool isFrameGenerationActive = globals::upscaling && globals::upscaling->IsFrameGenerationActive();
Expand Down Expand Up @@ -297,7 +300,7 @@ void PerformanceOverlay::DrawOverlay()
float fpsWidth = ImGui::CalcTextSize(fpsText.c_str()).x;
minWidth = std::max(minWidth, fpsWidth + PerformanceOverlay::Settings::kLabelPadding); // Add padding for labels
}
if (this->settings.ShowDrawCalls) {
if (this->settings.ShowDrawCalls && globals::state->IsDeveloperMode()) {
// Draw calls table needs significant width for all columns
minWidth = std::max(minWidth, PerformanceOverlay::Settings::kDrawCallsTableWidth * this->settings.TextSize);
}
Expand Down Expand Up @@ -347,8 +350,8 @@ void PerformanceOverlay::DrawOverlay()
}
}

// Show Draw Calls if enabled
if (this->settings.ShowDrawCalls) {
// Show Draw Calls if enabled and in developer mode
if (this->settings.ShowDrawCalls && globals::state->IsDeveloperMode()) {
static bool drawCallsExpanded = true;
if (showCollapsibleSections) {
Util::DrawSectionHeader("Draw Calls & Shader Performance", false, true, &drawCallsExpanded);
Expand All @@ -373,7 +376,10 @@ void PerformanceOverlay::DrawOverlay()
ImGui::SetWindowFontScale(1.0f); // Reset font scale

// --- A/B Test Section ---
DrawABTestSection(allRows, showCollapsibleSections);
// A/B testing shows detailed per-shader performance data, so it should also be developer-only
if (globals::state->IsDeveloperMode()) {
DrawABTestSection(allRows, showCollapsibleSections);
}

ImGui::End();
ImGui::PopStyleVar(); // WindowBorderSize
Expand Down