mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +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 },
|
||||
{ "version", HudElement::DxvkVersion },
|
||||
{ "api", HudElement::DxvkClientApi },
|
||||
{ "compiler", HudElement::CompilerActivity },
|
||||
}};
|
||||
|
||||
|
||||
|
@ -20,6 +20,7 @@ namespace dxvk::hud {
|
||||
StatMemory = 6,
|
||||
DxvkVersion = 7,
|
||||
DxvkClientApi = 8,
|
||||
CompilerActivity = 9,
|
||||
};
|
||||
|
||||
using HudElements = Flags<HudElement>;
|
||||
|
@ -39,6 +39,11 @@ namespace dxvk::hud {
|
||||
if (m_elements.test(HudElement::StatMemory))
|
||||
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;
|
||||
}
|
||||
|
||||
@ -142,6 +147,22 @@ namespace dxvk::hud {
|
||||
|
||||
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) {
|
||||
@ -149,7 +170,8 @@ namespace dxvk::hud {
|
||||
HudElement::StatDrawCalls,
|
||||
HudElement::StatSubmissions,
|
||||
HudElement::StatPipelines,
|
||||
HudElement::StatMemory);
|
||||
HudElement::StatMemory,
|
||||
HudElement::CompilerActivity);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -56,6 +56,11 @@ namespace dxvk::hud {
|
||||
HudRenderer& renderer,
|
||||
HudPos position);
|
||||
|
||||
HudPos printCompilerActivity(
|
||||
const Rc<DxvkContext>& context,
|
||||
HudRenderer& renderer,
|
||||
HudPos position);
|
||||
|
||||
static HudElements filterElements(HudElements elements);
|
||||
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user