Debugging render scene 38/321238/3
authorDavid Steele <david.steele@samsung.com>
Tue, 11 Mar 2025 18:36:18 +0000 (18:36 +0000)
committerDavid Steele <david.steele@samsung.com>
Fri, 21 Mar 2025 11:00:34 +0000 (11:00 +0000)
Added more debug to RenderScene under LOG_RENDER_MANAGER tag

Change-Id: Id6ea7306dc166a438abe8033b7015e1f057a16e8

dali/integration-api/core.h
dali/internal/render/common/render-manager.cpp
dali/internal/render/common/render-manager.h
dali/internal/update/manager/render-task-processor.cpp
dali/internal/update/render-tasks/scene-graph-render-task-debug.h
dali/internal/update/render-tasks/scene-graph-render-task.cpp

index ec5aec26629e30bfbabffb05786cdac247e931bf..b0f09746b502b54384f888c5e0b5d7cfb43a988d 100644 (file)
@@ -371,7 +371,7 @@ public:
   void RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo);
 
   /**
-   * Render a scene in the next frame. This method should be preceded by a call up PreRender.
+   * Render a scene in the next frame. This method should be preceded by a call to PreRender.
    * This method should be called twice. The first pass to render off-screen frame buffers if any,
    * and the second pass to render the surface.
    * Multi-threading note: this method should be called from a dedicated rendering thread.
@@ -385,7 +385,7 @@ public:
 
   /**
    * This is called after rendering all the scenes in the next frame. This method should be
-   * followed by a call up RenderScene.
+   * followed by a call to RenderScene.
    * Multi-threading note: this method should be called from a dedicated rendering thread.
    * @pre The GL context must have been created, and made current.
    */
index 4650e18ef0b69a7d22181f11818b7085a2925d7b..1f0a039481e1e3c5e37ce2c0156faa9c16f1f977 100644 (file)
@@ -979,8 +979,11 @@ void RenderManager::RenderScene(Integration::RenderStatus& status, Integration::
 
 void RenderManager::RenderScene(Integration::RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect<int>& clippingRect)
 {
+  DALI_LOG_INFO(gLogFilter, Debug::General, "Rendering to %s\n", renderToFbo ? "Framebuffer" : "Surface");
+
   if(mImpl->partialUpdateAvailable == Integration::PartialUpdateAvailable::TRUE && !renderToFbo && clippingRect.IsEmpty())
   {
+    DALI_LOG_INFO(gLogFilter, Debug::General, "PartialUpdate and no clip\n");
     DALI_LOG_DEBUG_INFO("ClippingRect was empty. Skip rendering\n");
     return;
   }
@@ -992,6 +995,7 @@ void RenderManager::RenderScene(Integration::RenderStatus& status, Integration::
     DALI_LOG_ERROR("Scene was empty handle. Skip rendering\n");
     return;
   }
+  DALI_LOG_INFO(gLogFilter, Debug::General, "No early out\n");
 
   // @todo These should be members of scene
   const Integration::DepthBufferAvailable   depthBufferAvailable   = mImpl->depthBufferAvailable;
@@ -1017,6 +1021,8 @@ void RenderManager::RenderScene(Integration::RenderStatus& status, Integration::
 
   bool sceneNeedsDepthBuffer   = false;
   bool sceneNeedsStencilBuffer = false;
+
+  DALI_LOG_INFO(gLogFilter, Debug::General, "Instruction count: %d\n", instructionCount);
   for(uint32_t i = 0; i < instructionCount; ++i)
   {
     RenderInstruction& instruction = sceneObject->GetRenderInstructions().At(mImpl->renderBufferIndex, i);
@@ -1272,10 +1278,6 @@ void RenderManager::RenderScene(Integration::RenderStatus& status, Integration::
       }
     }
 
-    // Set surface orientation
-    // @todo Inform graphics impl by another route.
-    // was: mImpl->currentContext->SetSurfaceOrientation(surfaceOrientation);
-
     /*** Clear region of framebuffer or surface before drawing ***/
     bool clearFullFrameRect = (surfaceRect == viewportRect);
     if(instruction.mFrameBuffer != nullptr)
@@ -1364,6 +1366,8 @@ void RenderManager::RenderScene(Integration::RenderStatus& status, Integration::
     submitInfo.cmdBuffer.push_back(commandBuffer);
   }
 
+  DALI_LOG_INFO(gLogFilter, Debug::General, "CmdBuffer count: %u\n", submitInfo.cmdBuffer.size());
+
   if(!submitInfo.cmdBuffer.empty())
   {
     mImpl->graphicsController.SubmitCommandBuffers(submitInfo);
@@ -1373,6 +1377,8 @@ void RenderManager::RenderScene(Integration::RenderStatus& status, Integration::
   // present render target (if main scene)
   if(!renderToFbo)
   {
+    DALI_LOG_INFO(gLogFilter, Debug::General, "Present\n");
+
     DALI_TRACE_BEGIN(gTraceFilter, "DALI_RENDER_FINISHED");
     auto renderTarget = sceneObject->GetSurfaceRenderTarget();
     mImpl->graphicsController.PresentRenderTarget(renderTarget);
index c58bdc4d7c13ad2f9b98ff1304b80948fe4afd50..a0a43df4c4b0c9a7a758e9aa944bcdafd506fea7 100644 (file)
@@ -402,7 +402,7 @@ public:
   void RenderScene(Integration::RenderStatus& status, Integration::Scene& scene, bool renderToFbo);
 
   /**
-   * Render a scene in the next frame. This method should be preceded by a call up PreRender.
+   * Render a scene in the next frame. This method should be preceded by a call to PreRender.
    * This method should be called twice. The first pass to render off-screen frame buffers if any,
    * and the second pass to render the surface.
    * Multi-threading note: this method should be called from a dedicated rendering thread.
index 6cb5573159bb78ca45a7568aeda07c6d8b869b0f..cf7816fd2f973c9b5cf88fbb4af237657387deef 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -258,6 +258,7 @@ void ProcessTasks(BufferIndex                          updateBufferIndex,
        !renderTask.ReadyToRender(updateBufferIndex))
     {
       // Skip to next task.
+      DALI_LOG_INFO(gRenderTaskLogFilter, Debug::General, "  Skip to next task\n");
       continue;
     }
 
index 9a84b33d8c55d074a03371e149443f71f83b95c2..f763a057ec54c691f68c6075f3ba21a8939f86b4 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_SCENE_GRAPH_RENDER_TASK_DEBUG_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,9 +25,9 @@ Debug::Filter* gRenderTaskLogFilter = Debug::Filter::New(Debug::NoLogging, false
   (state == RENDER_CONTINUOUSLY ? "RenderContinuously" : (state == RENDER_ONCE_WAITING_FOR_RESOURCES ? "RenderOnceWaiting" : (state == RENDERED_ONCE ? "RenderedOnce" : (state == RENDERED_ONCE_AND_NOTIFIED ? "RenderedOnceAndNotified" : "Unknown"))))
 
 #define TASK_LOG(level) \
-  DALI_LOG_INFO(gRenderTaskLogFilter, level, "SceneGraph::RenderTask::%s: this:%p\n", __FUNCTION__, this)
+  DALI_LOG_INFO(gRenderTaskLogFilter, level, "this:%p\n", this)
 #define TASK_LOG_FMT(level, format, ...) \
-  DALI_LOG_INFO(gRenderTaskLogFilter, level, "SceneGraph::RenderTask::%s: this:%p " format, __FUNCTION__, this, ##__VA_ARGS__)
+  DALI_LOG_INFO(gRenderTaskLogFilter, level, "this:%p " format, this, ##__VA_ARGS__)
 #else
 
 #define TASK_LOG(level)
index c5b65cae663ea9cc46ddc0a0cc0418b58dedfaf1..333e183b6ecda12fbfc744c43df645e304062c14 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -260,6 +260,7 @@ uint32_t RenderTask::GetRefreshRate() const
 
 bool RenderTask::ReadyToRender(BufferIndex updateBufferIndex)
 {
+  TASK_LOG_FMT(Debug::General, " Active(ReadyToRender):%s\n", mActive ? "T" : "F");
   return mActive;
 }