1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-13 19:29:14 +01:00

[d3d11] Re-introduce client API HUD item

This commit is contained in:
Philip Rebohle 2020-01-28 13:45:15 +01:00 committed by Joshie
parent be16da37d7
commit c560ec44b5
2 changed files with 19 additions and 0 deletions

View File

@ -679,6 +679,9 @@ namespace dxvk {
void D3D11SwapChain::CreateHud() {
m_hud = hud::Hud::createHud(m_device);
if (m_hud != nullptr)
m_hud->addItem<hud::HudClientApiItem>("api", 1, GetApiName());
}
@ -869,4 +872,18 @@ namespace dxvk {
: VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT;
}
std::string D3D11SwapChain::GetApiName() const {
Com<IDXGIDXVKDevice> device;
m_parent->QueryInterface(__uuidof(IDXGIDXVKDevice), reinterpret_cast<void**>(&device));
uint32_t apiVersion = device->GetAPIVersion();
uint32_t featureLevel = m_parent->GetFeatureLevel();
uint32_t flHi = (featureLevel >> 12);
uint32_t flLo = (featureLevel >> 8) & 0x7;
return str::format("D3D", apiVersion, " FL", flHi, "_", flLo);
}
}

View File

@ -188,6 +188,8 @@ namespace dxvk {
VkFullScreenExclusiveEXT PickFullscreenMode();
std::string GetApiName() const;
};
}