Test sync for vertex range 43/293443/3
authorDavid Steele <david.steele@samsung.com>
Fri, 26 May 2023 13:23:28 +0000 (14:23 +0100)
committerDavid Steele <david.steele@samsung.com>
Wed, 31 May 2023 11:11:49 +0000 (12:11 +0100)
Change-Id: I866ffdec46f66574becfda16a150992226a8247a

automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-command-buffer.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.cpp

index 407dadefb9fac71018aff54d63a78714e38cbadb..84480ef83d14593f9e671a1bc4aa2a5767f50d51 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TEST_GRAPHICS_COMMAND_BUFFER_H
 
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -843,7 +843,12 @@ public:
     cmd.draw.instanceCount = instanceCount;
     cmd.draw.firstInstance = firstInstance;
     cmd.draw.firstVertex   = firstVertex;
-    mCallStack.PushCall("Draw", "");
+    TraceCallStack::NamedParams namedParams;
+    namedParams["vertexCount"] << vertexCount;
+    namedParams["instanceCount"] << instanceCount;
+    namedParams["firstInstance"] << firstInstance;
+    namedParams["firstVertex"] << firstVertex;
+    mCallStack.PushCall("Draw", namedParams.str(), namedParams);
   }
 
   void DrawIndexed(
@@ -862,7 +867,13 @@ public:
     cmd.drawIndexed.indexCount    = indexCount;
     cmd.drawIndexed.vertexOffset  = vertexOffset;
     cmd.drawIndexed.instanceCount = instanceCount;
-    mCallStack.PushCall("DrawIndexed", "");
+    TraceCallStack::NamedParams namedParams;
+    namedParams["firstIndex"] << firstIndex;
+    namedParams["firstInstance"] << firstInstance;
+    namedParams["indexCount"] << indexCount;
+    namedParams["vertexOffset"] << vertexOffset;
+    namedParams["instanceCount"] << instanceCount;
+    mCallStack.PushCall("DrawIndexed", namedParams.str(), namedParams);
   }
 
   void DrawIndexedIndirect(
@@ -879,7 +890,11 @@ public:
     cmd.drawIndexedIndirect.offset    = offset;
     cmd.drawIndexedIndirect.drawCount = drawCount;
     cmd.drawIndexedIndirect.stride    = stride;
-    mCallStack.PushCall("DrawIndexedIndirect", "");
+    TraceCallStack::NamedParams namedParams;
+    namedParams["offset"] << offset;
+    namedParams["drawCount"] << drawCount;
+    namedParams["stride"] << stride;
+    mCallStack.PushCall("DrawIndexedIndirect", namedParams.str(), namedParams);
   }
 
   void Reset() override
index 3cc464cc502d1036210740e4d57089f53f9a1509..14c6d5089932b6e1449546bea443089bd2c259dc 100644 (file)
@@ -715,13 +715,13 @@ void TestGraphicsController::ProcessCommandBuffer(TestGraphicsCommandBuffer& com
           if(cmd.data.draw.draw.instanceCount == 0)
           {
             mGl.DrawArrays(GetTopology(currentPipeline->inputAssemblyState.topology),
-                           0,
+                           cmd.data.draw.draw.firstVertex,
                            cmd.data.draw.draw.vertexCount);
           }
           else
           {
             mGl.DrawArraysInstanced(GetTopology(currentPipeline->inputAssemblyState.topology),
-                                    0,
+                                    cmd.data.draw.draw.firstVertex,
                                     cmd.data.draw.draw.vertexCount,
                                     cmd.data.draw.draw.instanceCount);
           }