diff --git a/src/d3d11/d3d11_swapchain.cpp b/src/d3d11/d3d11_swapchain.cpp index 7cc89725..686f87d9 100644 --- a/src/d3d11/d3d11_swapchain.cpp +++ b/src/d3d11/d3d11_swapchain.cpp @@ -679,6 +679,9 @@ namespace dxvk { void D3D11SwapChain::CreateHud() { m_hud = hud::Hud::createHud(m_device); + + if (m_hud != nullptr) + m_hud->addItem("api", 1, GetApiName()); } @@ -869,4 +872,18 @@ namespace dxvk { : VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT; } + + std::string D3D11SwapChain::GetApiName() const { + Com device; + m_parent->QueryInterface(__uuidof(IDXGIDXVKDevice), reinterpret_cast(&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); + } + } \ No newline at end of file diff --git a/src/d3d11/d3d11_swapchain.h b/src/d3d11/d3d11_swapchain.h index 30cc13aa..4bc23b91 100644 --- a/src/d3d11/d3d11_swapchain.h +++ b/src/d3d11/d3d11_swapchain.h @@ -188,6 +188,8 @@ namespace dxvk { VkFullScreenExclusiveEXT PickFullscreenMode(); + std::string GetApiName() const; + }; } \ No newline at end of file