mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[hud] Add new HUD entry to show shader compiler activity
This commit is contained in:
parent
8b84d002f8
commit
7dc449ac55
@ -14,6 +14,7 @@ namespace dxvk::hud {
|
|||||||
{ "memory", HudElement::StatMemory },
|
{ "memory", HudElement::StatMemory },
|
||||||
{ "version", HudElement::DxvkVersion },
|
{ "version", HudElement::DxvkVersion },
|
||||||
{ "api", HudElement::DxvkClientApi },
|
{ "api", HudElement::DxvkClientApi },
|
||||||
|
{ "compiler", HudElement::CompilerActivity },
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ namespace dxvk::hud {
|
|||||||
StatMemory = 6,
|
StatMemory = 6,
|
||||||
DxvkVersion = 7,
|
DxvkVersion = 7,
|
||||||
DxvkClientApi = 8,
|
DxvkClientApi = 8,
|
||||||
|
CompilerActivity = 9,
|
||||||
};
|
};
|
||||||
|
|
||||||
using HudElements = Flags<HudElement>;
|
using HudElements = Flags<HudElement>;
|
||||||
|
@ -39,6 +39,11 @@ namespace dxvk::hud {
|
|||||||
if (m_elements.test(HudElement::StatMemory))
|
if (m_elements.test(HudElement::StatMemory))
|
||||||
position = this->printMemoryStats(context, renderer, position);
|
position = this->printMemoryStats(context, renderer, position);
|
||||||
|
|
||||||
|
if (m_elements.test(HudElement::CompilerActivity)) {
|
||||||
|
this->printCompilerActivity(context, renderer,
|
||||||
|
{ position.x, float(renderer.surfaceSize().height) - 20.0f });
|
||||||
|
}
|
||||||
|
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,6 +147,22 @@ namespace dxvk::hud {
|
|||||||
|
|
||||||
return { position.x, position.y + 44.0f };
|
return { position.x, position.y + 44.0f };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HudPos HudStats::printCompilerActivity(
|
||||||
|
const Rc<DxvkContext>& context,
|
||||||
|
HudRenderer& renderer,
|
||||||
|
HudPos position) {
|
||||||
|
|
||||||
|
if (m_prevCounters.getCtr(DxvkStatCounter::PipeCompilerBusy)) {
|
||||||
|
renderer.drawText(context, 16.0f,
|
||||||
|
{ position.x, position.y },
|
||||||
|
{ 1.0f, 1.0f, 1.0f, 1.0f },
|
||||||
|
"Compiling shaders...");
|
||||||
|
}
|
||||||
|
|
||||||
|
return { position.x, position.y + 24.0f };
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
HudElements HudStats::filterElements(HudElements elements) {
|
HudElements HudStats::filterElements(HudElements elements) {
|
||||||
@ -149,7 +170,8 @@ namespace dxvk::hud {
|
|||||||
HudElement::StatDrawCalls,
|
HudElement::StatDrawCalls,
|
||||||
HudElement::StatSubmissions,
|
HudElement::StatSubmissions,
|
||||||
HudElement::StatPipelines,
|
HudElement::StatPipelines,
|
||||||
HudElement::StatMemory);
|
HudElement::StatMemory,
|
||||||
|
HudElement::CompilerActivity);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,11 @@ namespace dxvk::hud {
|
|||||||
HudRenderer& renderer,
|
HudRenderer& renderer,
|
||||||
HudPos position);
|
HudPos position);
|
||||||
|
|
||||||
|
HudPos printCompilerActivity(
|
||||||
|
const Rc<DxvkContext>& context,
|
||||||
|
HudRenderer& renderer,
|
||||||
|
HudPos position);
|
||||||
|
|
||||||
static HudElements filterElements(HudElements elements);
|
static HudElements filterElements(HudElements elements);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user