(Automated Tests) Tests Sync 37/256037/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 26 Mar 2021 20:14:15 +0000 (20:14 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 26 Mar 2021 20:14:15 +0000 (20:14 +0000)
Change-Id: I01f0f418aaa065a7061dfe3e1a04b8d1432dae52

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

index 6338457..c10c3f1 100644 (file)
@@ -339,10 +339,12 @@ struct Command
   union CommandData
   {
     CommandData()
-    {}
+    {
+    }
 
     ~CommandData()
-    {} // do nothing
+    {
+    } // do nothing
 
     struct
     {
@@ -467,7 +469,7 @@ public:
   void BindPipeline(const Graphics::Pipeline& pipeline) override
   {
     mCommands.emplace_back();
-    mCommands.back().type                  = CommandType::BIND_PIPELINE;
+    mCommands.back().type                       = CommandType::BIND_PIPELINE;
     mCommands.back().data.bindPipeline.pipeline = static_cast<const TestGraphicsPipeline*>(&pipeline);
     mCallStack.PushCall("BindPipeline", "");
   }
@@ -475,7 +477,7 @@ public:
   void BindTextures(std::vector<Graphics::TextureBinding>& textureBindings) override
   {
     mCommands.emplace_back();
-    mCommands.back().type                         = CommandType::BIND_TEXTURES;
+    mCommands.back().type                              = CommandType::BIND_TEXTURES;
     mCommands.back().data.bindTextures.textureBindings = std::move(textureBindings);
     mCallStack.PushCall("BindTextures", "");
   }
@@ -499,7 +501,7 @@ public:
                        Graphics::Format        format) override
   {
     mCommands.emplace_back();
-    mCommands.back().type                   = CommandType::BIND_INDEX_BUFFER;
+    mCommands.back().type                        = CommandType::BIND_INDEX_BUFFER;
     mCommands.back().data.bindIndexBuffer.buffer = static_cast<const TestGraphicsBuffer*>(&buffer);
     mCommands.back().data.bindIndexBuffer.offset = offset;
     mCommands.back().data.bindIndexBuffer.format = format;
@@ -598,7 +600,7 @@ public:
     mCallStack.PushCall("SetScissor", params.str(), params);
 
     mCommands.emplace_back();
-    mCommands.back().type           = CommandType::SET_SCISSOR;
+    mCommands.back().type                = CommandType::SET_SCISSOR;
     mCommands.back().data.scissor.region = value;
   }
 
@@ -609,7 +611,7 @@ public:
     mCallStack.PushCall("SetScissorTestEnable", params.str(), params);
 
     mCommands.emplace_back();
-    mCommands.back().type               = CommandType::SET_SCISSOR_TEST;
+    mCommands.back().type                    = CommandType::SET_SCISSOR_TEST;
     mCommands.back().data.scissorTest.enable = value;
   }
 
@@ -625,7 +627,7 @@ public:
     mCallStack.PushCall("SetViewport", params.str(), params);
 
     mCommands.emplace_back();
-    mCommands.back().type            = CommandType::SET_VIEWPORT;
+    mCommands.back().type                 = CommandType::SET_VIEWPORT;
     mCommands.back().data.viewport.region = value;
   }
 
@@ -636,7 +638,7 @@ public:
     mCallStack.PushCall("SetViewportEnable", params.str(), params);
 
     mCommands.emplace_back();
-    mCommands.back().type                = CommandType::SET_VIEWPORT_TEST;
+    mCommands.back().type                     = CommandType::SET_VIEWPORT_TEST;
     mCommands.back().data.viewportTest.enable = value;
   }
 
index 9af1d26..48d6912 100644 (file)
@@ -463,7 +463,7 @@ void TestGraphicsController::SubmitCommandBuffers(const Graphics::SubmitInfo& su
     if(!value.empty())
     {
       // must be fixed
-      for (auto& binding : value[0]->data.bindTextures.textureBindings)
+      for(auto& binding : value[0]->data.bindTextures.textureBindings)
       {
         if(binding.texture)
         {
@@ -489,7 +489,7 @@ void TestGraphicsController::SubmitCommandBuffers(const Graphics::SubmitInfo& su
     auto bindIndexBufferCmds = commandBuffer->GetCommandsByType(0 | CommandType::BIND_INDEX_BUFFER);
     if(!bindIndexBufferCmds.empty())
     {
-      auto &indexBufferBinding = bindIndexBufferCmds[0]->data.bindIndexBuffer;
+      autoindexBufferBinding = bindIndexBufferCmds[0]->data.bindIndexBuffer;
       if(indexBufferBinding.buffer)
       {
         auto buffer = Uncast<TestGraphicsBuffer>(indexBufferBinding.buffer);
@@ -501,7 +501,7 @@ void TestGraphicsController::SubmitCommandBuffers(const Graphics::SubmitInfo& su
     auto bindVertexBufferCmds = commandBuffer->GetCommandsByType(0 | CommandType::BIND_VERTEX_BUFFERS);
     if(!bindVertexBufferCmds.empty())
     {
-      for (auto &binding : bindVertexBufferCmds[0]->data.bindVertexBuffers.vertexBufferBindings)
+      for(auto& binding : bindVertexBufferCmds[0]->data.bindVertexBuffers.vertexBufferBindings)
       {
         auto graphicsBuffer = binding.buffer;
         auto vertexBuffer   = Uncast<TestGraphicsBuffer>(graphicsBuffer);
@@ -544,7 +544,7 @@ void TestGraphicsController::SubmitCommandBuffers(const Graphics::SubmitInfo& su
     auto bindPipelineCmds = commandBuffer->GetCommandsByType(0 | CommandType::BIND_PIPELINE);
     if(!bindPipelineCmds.empty())
     {
-      auto      pipeline = bindPipelineCmds[0]->data.bindPipeline.pipeline;
+      auto  pipeline = bindPipelineCmds[0]->data.bindPipeline.pipeline;
       auto& vi       = pipeline->vertexInputState;
       for(auto& attribute : vi.attributes)
       {
@@ -624,12 +624,12 @@ void TestGraphicsController::SubmitCommandBuffers(const Graphics::SubmitInfo& su
 
       if(!drawCmds.empty())
       {
-        if (drawCmds[0]->data.draw.type == DrawCallDescriptor::Type::DRAW_INDEXED )
+        if(drawCmds[0]->data.draw.type == DrawCallDescriptor::Type::DRAW_INDEXED)
         {
           mGl.DrawElements(GetTopology(topology),
                            static_cast<GLsizei>(drawCmds[0]->data.draw.drawIndexed.indexCount),
                            GL_UNSIGNED_SHORT,
-                           reinterpret_cast<void *>(drawCmds[0]->data.draw.drawIndexed.firstIndex));
+                           reinterpret_cast<void*>(drawCmds[0]->data.draw.drawIndexed.firstIndex));
         }
         else
         {