diff --git a/lib/graphics_engine/src/ge_vulkan_draw_call.hpp b/lib/graphics_engine/src/ge_vulkan_draw_call.hpp index a8cc2eebb..efbf6c7c6 100644 --- a/lib/graphics_engine/src/ge_vulkan_draw_call.hpp +++ b/lib/graphics_engine/src/ge_vulkan_draw_call.hpp @@ -65,6 +65,14 @@ public: void uploadDynamicData(GEVulkanDriver* vk, GEVulkanCameraSceneNode* cam); // ------------------------------------------------------------------------ void render(GEVulkanDriver* vk, GEVulkanCameraSceneNode* cam); + // ------------------------------------------------------------------------ + unsigned getPolyCount() const + { + unsigned result = 0; + for (auto& cmd : m_cmds) + result += (cmd.indexCount / 3) * cmd.instanceCount; + return result; + } }; // GEVulkanDrawCall } diff --git a/lib/graphics_engine/src/ge_vulkan_driver.cpp b/lib/graphics_engine/src/ge_vulkan_driver.cpp index ec5f38849..21ac2f3ef 100644 --- a/lib/graphics_engine/src/ge_vulkan_driver.cpp +++ b/lib/graphics_engine/src/ge_vulkan_driver.cpp @@ -2187,6 +2187,7 @@ void GEVulkanDriver::buildCommandBuffers() m_irrlicht_device->getSceneManager())->getDrawCalls()) { p.second->render(this, p.first); + PrimitivesDrawn += p.second->getPolyCount(); } GEVulkan2dRenderer::render(); diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index e917bfb0f..a1380e862 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -1849,14 +1849,22 @@ void IrrDriver::displayFPS() if (low > kilotris) low = kilotris; if (high < kilotris) high = kilotris; - if ((UserConfigParams::m_artist_debug_mode)&&(CVS->isGLSL())) + if (UserConfigParams::m_artist_debug_mode) { - fps_string = StringUtils::insertValues - (L"FPS: %d/%d/%d - PolyCount: %d Solid, %d Shadows - LightDist: %d\n" - "Complexity %d, Total skinning joints: %d, Ping: %dms", - min, fps, max, SP::sp_solid_poly_count, - SP::sp_shadow_poly_count, m_last_light_bucket_distance, irr_driver->getSceneComplexity(), - m_skinning_joint, ping); + if (CVS->isGLSL()) + { + fps_string = StringUtils::insertValues + (L"FPS: %d/%d/%d - PolyCount: %d Solid, %d Shadows - LightDist: %d\n" + "Complexity %d, Total skinning joints: %d, Ping: %dms", + min, fps, max, SP::sp_solid_poly_count, + SP::sp_shadow_poly_count, m_last_light_bucket_distance, irr_driver->getSceneComplexity(), + m_skinning_joint, ping); + } + else + { + fps_string = StringUtils::insertValues(L"FPS: %d/%d/%d - PolyCount: %d Solid, Ping: %dms", min, fps, + max, m_video_driver->getPrimitiveCountDrawn(0), ping); + } } else {