Updated test harness to match dali-core, Pipeline VxFmt 25/253125/7
authorDavid Steele <david.steele@samsung.com>
Thu, 4 Feb 2021 17:56:42 +0000 (17:56 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 11 Feb 2021 18:06:06 +0000 (18:06 +0000)
Change-Id: I9b5e59e29e890cad7e1a66b2557b1d0c61a2808c

16 files changed:
automated-tests/src/dali-adaptor-internal/CMakeLists.txt
automated-tests/src/dali-adaptor/CMakeLists.txt
automated-tests/src/dali-adaptor/dali-test-suite-utils/mesh-builder.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-buffer.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-command-buffer.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-command-buffer.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.cpp [new file with mode: 0644]
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.h [new file with mode: 0644]
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-trace-call-stack.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-trace-call-stack.h
automated-tests/src/dali-graphics/CMakeLists.txt
automated-tests/src/dali-platform-abstraction/CMakeLists.txt

index 5cd4a89756ccafde1389a4d6947cfb35eb0652c7..2db965130b70010b55c0333eeefc7f5a5da258b8 100644 (file)
@@ -33,6 +33,7 @@ LIST(APPEND TC_SOURCES
     ../dali-adaptor/dali-test-suite-utils/test-graphics-command-buffer.cpp
     ../dali-adaptor/dali-test-suite-utils/test-graphics-controller.cpp
     ../dali-adaptor/dali-test-suite-utils/test-graphics-texture.cpp
+    ../dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.cpp
     ../dali-adaptor/dali-test-suite-utils/test-graphics-sampler.cpp
     ../dali-adaptor/dali-test-suite-utils/test-native-image.cpp
     ../dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp
index 7f94ef130672226bfe689ed1ff9a19a3c9b8492d..9fc9c2041e6283e8f1b1ac859937c6b61da64c7c 100644 (file)
@@ -31,6 +31,7 @@ LIST(APPEND TC_SOURCES
     dali-test-suite-utils/test-graphics-buffer.cpp
     dali-test-suite-utils/test-graphics-command-buffer.cpp
     dali-test-suite-utils/test-graphics-controller.cpp
+    dali-test-suite-utils/test-graphics-pipeline.cpp
     dali-test-suite-utils/test-graphics-texture.cpp
     dali-test-suite-utils/test-graphics-sampler.cpp
     dali-test-suite-utils/test-native-image.cpp
index 0693c439e77beec38a6065f2c1962692c2eaeaa7..e678074e030bfe241df94831c7444a048a95df2d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
@@ -40,8 +40,8 @@ TextureSet CreateTextureSet(Texture texture)
 VertexBuffer CreateVertexBuffer()
 {
   Property::Map texturedQuadVertexFormat;
-  texturedQuadVertexFormat["aPosition"]    = Property::VECTOR2;
-  texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
+  texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
+  texturedQuadVertexFormat["aTexCoord"] = Property::VECTOR2;
 
   VertexBuffer vertexData = VertexBuffer::New(texturedQuadVertexFormat);
   return vertexData;
index 9e8c7a87ff62928e27dbc2623ecc489e0e687206..eac9db5c21b3d56d8e62b7bf8dbaab295b3f2a54 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
 namespace Dali
 {
 TestGlAbstraction::TestGlAbstraction()
+: mBufferTrace(true, "gl"),
+  mTextureTrace(true, "gl"),
+  mTexParameterTrace(true, "gl"),
+  mDrawTrace(true, "gl")
 {
   Initialize();
 }
@@ -34,7 +38,6 @@ void TestGlAbstraction::Initialize()
   mCompileStatus                   = GL_TRUE;
   mLinkStatus                      = GL_TRUE;
   mNumberOfActiveUniforms          = 0;
-  mGetAttribLocationResult         = 0;
   mGetErrorResult                  = 0;
   mGetStringResult                 = NULL;
   mIsBufferResult                  = 0;
@@ -83,6 +86,9 @@ void TestGlAbstraction::Initialize()
   mProgramUniforms3f.clear();
   mProgramUniforms4f.clear();
 
+  mAttribLocs.clear();
+  mAttribLocs.push_back("aPosition");
+  mAttribLocs.push_back("aTexCoord");
   mCullFaceTrace.Reset();
   mDepthFunctionTrace.Reset();
   mEnableDisableTrace.Reset();
@@ -90,7 +96,7 @@ void TestGlAbstraction::Initialize()
   mStencilFunctionTrace.Reset();
   mScissorTrace.Reset();
   mTextureTrace.Reset();
-  mTexParamaterTrace.Reset();
+  mTexParameterTrace.Reset();
   mDrawTrace.Reset();
 
   for(unsigned int i = 0; i < MAX_ATTRIBUTE_CACHE_SIZE; ++i)
index 4e14dd94eb848cace66ba3321494b6709780598b..b414084f4e682a49fe1dd0693fada84bdb1b2aec 100644 (file)
 
 namespace Dali
 {
-static const unsigned int MAX_ATTRIBUTE_CACHE_SIZE = 64;
-static const char*        mStdAttribs[MAX_ATTRIBUTE_CACHE_SIZE] =
-  {
-    "aPosition",    // ATTRIB_POSITION
-    "aNormal",      // ATTRIB_NORMAL
-    "aTexCoord",    // ATTRIB_TEXCOORD
-    "aColor",       // ATTRIB_COLOR
-    "aBoneWeights", // ATTRIB_BONE_WEIGHTS
-    "aBoneIndices"  // ATTRIB_BONE_INDICES
-};
-
 class DALI_CORE_API TestGlAbstraction : public Dali::Integration::GlAbstraction
 {
 public:
+  static const int MAX_ATTRIBUTE_CACHE_SIZE{64};
+
   TestGlAbstraction();
   ~TestGlAbstraction() override;
   void Initialize();
@@ -91,8 +82,8 @@ public:
     out << program << ", " << shader;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["program"] = ToString(program);
-    namedParams["shader"]  = ToString(shader);
+    namedParams["program"] << program;
+    namedParams["shader"] << shader;
     mShaderTrace.PushCall("AttachShader", out.str(), namedParams);
   }
 
@@ -105,8 +96,8 @@ public:
     std::ostringstream o;
     o << std::hex << target << ", " << buffer;
     TraceCallStack::NamedParams namedParams;
-    namedParams["target"] = target;
-    namedParams["buffer"] = buffer;
+    namedParams["target"] << target;
+    namedParams["buffer"] << buffer;
     mBufferTrace.PushCall("BindBuffer", o.str(), namedParams);
   }
 
@@ -169,8 +160,8 @@ public:
     out << target << ", " << texture;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["target"]  = ToString(target);
-    namedParams["texture"] = ToString(texture);
+    namedParams["target"] << target;
+    namedParams["texture"] << texture;
 
     mTextureTrace.PushCall("BindTexture", out.str(), namedParams);
   }
@@ -251,9 +242,9 @@ public:
     std::ostringstream o;
     o << std::hex << target << ", " << size << ", " << data << ", " << usage;
     TraceCallStack::NamedParams namedParams;
-    namedParams["target"] = target;
-    namedParams["size"]   = size;
-    namedParams["usage"]  = usage;
+    namedParams["target"] << std::hex << target;
+    namedParams["size"] << size;
+    namedParams["usage"] << usage;
 
     mBufferTrace.PushCall("BufferData", o.str(), namedParams);
 
@@ -265,9 +256,9 @@ public:
     std::ostringstream o;
     o << std::hex << target << ", " << offset << ", " << size << ", " << data;
     TraceCallStack::NamedParams namedParams;
-    namedParams["target"] = target;
-    namedParams["offset"] = offset;
-    namedParams["size"]   = size;
+    namedParams["target"] << std::hex << target;
+    namedParams["offset"] << offset;
+    namedParams["size"] << size;
     mBufferTrace.PushCall("BufferSubData", o.str());
 
     mBufferSubDataCalls.push_back(size);
@@ -329,7 +320,7 @@ public:
     out << s;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["s"] = ToString(s);
+    namedParams["s"] << s;
 
     mStencilFunctionTrace.PushCall("ClearStencil", out.str(), namedParams);
   }
@@ -347,7 +338,7 @@ public:
     std::stringstream out;
     out << shader;
     TraceCallStack::NamedParams namedParams;
-    namedParams["shader"] = ToString(shader);
+    namedParams["shader"] << shader;
 
     mShaderTrace.PushCall("CompileShader", out.str(), namedParams);
   }
@@ -358,13 +349,13 @@ public:
     out << target << ", " << level << ", " << width << ", " << height;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["target"]         = ToString(target);
-    namedParams["level"]          = ToString(level);
-    namedParams["internalformat"] = ToString(internalformat);
-    namedParams["width"]          = ToString(width);
-    namedParams["height"]         = ToString(height);
-    namedParams["border"]         = ToString(border);
-    namedParams["size"]           = ToString(imageSize);
+    namedParams["target"] << std::hex << target;
+    namedParams["level"] << level;
+    namedParams["internalformat"] << internalformat;
+    namedParams["width"] << width;
+    namedParams["height"] << height;
+    namedParams["border"] << border;
+    namedParams["size"] << imageSize;
 
     mTextureTrace.PushCall("CompressedTexImage2D", out.str(), namedParams);
   }
@@ -375,12 +366,12 @@ public:
     out << target << ", " << level << ", " << xoffset << ", " << yoffset << ", " << width << ", " << height;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["target"]  = ToString(target);
-    namedParams["level"]   = ToString(level);
-    namedParams["xoffset"] = ToString(xoffset);
-    namedParams["yoffset"] = ToString(yoffset);
-    namedParams["width"]   = ToString(width);
-    namedParams["height"]  = ToString(height);
+    namedParams["target"] << std::hex << target;
+    namedParams["level"] << level;
+    namedParams["xoffset"] << xoffset;
+    namedParams["yoffset"] << yoffset;
+    namedParams["width"] << width;
+    namedParams["height"] << height;
     mTextureTrace.PushCall("CompressedTexSubImage2D", out.str(), namedParams);
   }
 
@@ -407,7 +398,7 @@ public:
     out << type;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["type"] = ToString(type);
+    namedParams["type"] << std::hex << type;
     mShaderTrace.PushCall("CreateShader", out.str(), namedParams);
 
     return ++mLastShaderIdUsed;
@@ -419,7 +410,7 @@ public:
     out << mode;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["program"] = ToString(mode);
+    namedParams["program"] << mode;
 
     mCullFaceTrace.PushCall("CullFace", out.str(), namedParams);
   }
@@ -438,7 +429,7 @@ public:
     out << program;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["program"] = ToString(program);
+    namedParams["program"] << program;
 
     mShaderTrace.PushCall("DeleteProgram", out.str(), namedParams);
   }
@@ -453,7 +444,7 @@ public:
     out << shader;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["shader"] = ToString(shader);
+    namedParams["shader"] << shader;
 
     mShaderTrace.PushCall("DeleteShader", out.str(), namedParams);
   }
@@ -470,7 +461,7 @@ public:
       out << (i > 0 ? ", " : "") << textures[i];
       std::stringstream paramName;
       paramName << "texture[" << i << "]";
-      namedParams[paramName.str()] = ToString(textures[i]);
+      namedParams[paramName.str()] << textures[i];
       mDeletedTextureIds.push_back(textures[i]);
       mNumGeneratedTextures--;
     }
@@ -510,7 +501,7 @@ public:
     out << func;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["func"] = ToString(func);
+    namedParams["func"] << std::hex << func;
 
     mDepthFunctionTrace.PushCall("DepthFunc", out.str(), namedParams);
   }
@@ -534,8 +525,8 @@ public:
     std::stringstream out;
     out << program << ", " << shader;
     TraceCallStack::NamedParams namedParams;
-    namedParams["program"] = ToString(program);
-    namedParams["shader"]  = ToString(shader);
+    namedParams["program"] << program;
+    namedParams["shader"] << shader;
     mShaderTrace.PushCall("DetachShader", out.str(), namedParams);
   }
 
@@ -544,12 +535,17 @@ public:
     std::stringstream out;
     out << cap;
     TraceCallStack::NamedParams namedParams;
-    namedParams["cap"] = ToString(cap);
+    namedParams["cap"] << std::hex << cap;
     mEnableDisableTrace.PushCall("Disable", out.str(), namedParams);
   }
 
   inline void DisableVertexAttribArray(GLuint index) override
   {
+    std::stringstream out;
+    out << index;
+    TraceCallStack::NamedParams namedParams;
+    namedParams["index"] << index;
+    mBufferTrace.PushCall("DisableVertexAttribArray", out.str(), namedParams);
     SetVertexAttribArray(index, false);
   }
 
@@ -558,9 +554,9 @@ public:
     std::stringstream out;
     out << mode << ", " << first << ", " << count;
     TraceCallStack::NamedParams namedParams;
-    namedParams["mode"]  = ToString(mode);
-    namedParams["first"] = ToString(first);
-    namedParams["count"] = ToString(count);
+    namedParams["mode"] << std::hex << mode;
+    namedParams["first"] << first;
+    namedParams["count"] << count;
     mDrawTrace.PushCall("DrawArrays", out.str(), namedParams);
   }
 
@@ -570,9 +566,9 @@ public:
     out << mode << ", " << count << ", " << type << ", indices";
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["mode"]  = ToString(mode);
-    namedParams["count"] = ToString(count);
-    namedParams["type"]  = ToString(type);
+    namedParams["mode"] << std::hex << mode;
+    namedParams["count"] << count;
+    namedParams["type"] << type;
     // Skip void pointers - are they of any use?
     mDrawTrace.PushCall("DrawElements", out.str(), namedParams);
   }
@@ -582,12 +578,17 @@ public:
     std::stringstream out;
     out << cap;
     TraceCallStack::NamedParams namedParams;
-    namedParams["cap"] = ToString(cap);
+    namedParams["cap"] << std::hex << cap;
     mEnableDisableTrace.PushCall("Enable", out.str(), namedParams);
   }
 
   inline void EnableVertexAttribArray(GLuint index) override
   {
+    std::stringstream out;
+    out << index;
+    TraceCallStack::NamedParams namedParams;
+    namedParams["index"] << index;
+    mBufferTrace.PushCall("EnableVertexAttribArray", out.str(), namedParams);
     SetVertexAttribArray(index, true);
   }
 
@@ -640,7 +641,7 @@ public:
     std::ostringstream o;
     o << n;
     TraceCallStack::NamedParams namedParams;
-    namedParams["n"] = o.str();
+    namedParams["n"] << o.str();
     mBufferTrace.PushCall("GenBuffers", o.str(), namedParams);
   }
 
@@ -649,7 +650,7 @@ public:
     std::stringstream out;
     out << target;
     TraceCallStack::NamedParams namedParams;
-    namedParams["target"] = ToString(target);
+    namedParams["target"] << std::hex << target;
 
     mTextureTrace.PushCall("GenerateMipmap", out.str(), namedParams);
   }
@@ -704,7 +705,7 @@ public:
     }
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["count"] = ToString(count);
+    namedParams["count"] << count;
 
     std::stringstream out;
     for(int i = 0; i < count; i++)
@@ -716,7 +717,7 @@ public:
       }
       std::ostringstream oss;
       oss << "indices[" << i << "]";
-      namedParams[oss.str()] = ToString(textures[i]);
+      namedParams[oss.str()] << textures[i];
     }
 
     mTextureTrace.PushCall("GenTextures", out.str(), namedParams);
@@ -766,18 +767,11 @@ public:
 
   inline int GetAttribLocation(GLuint program, const char* name) override
   {
-    std::string attribName(name);
-
-    for(unsigned int i = 0; i < ATTRIB_TYPE_LAST; ++i)
-    {
-      if(mStdAttribs[i] == attribName)
-      {
-        return i;
-      }
-    }
-
-    // 0 is a valid location
-    return 0;
+    std::string check(name);
+    auto        iter = std::find(mAttribLocs.begin(), mAttribLocs.end(), check);
+    if(iter == mAttribLocs.end())
+      return -1;
+    return iter - mAttribLocs.begin();
   }
 
   inline void GetBooleanv(GLenum pname, GLboolean* params) override
@@ -969,7 +963,7 @@ public:
     out << program;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["program"] = ToString(program);
+    namedParams["program"] << program;
     mShaderTrace.PushCall("LinkProgram", out.str(), namedParams);
 
     mNumberOfActiveUniforms = 3;
@@ -1012,10 +1006,10 @@ public:
     std::stringstream out;
     out << x << ", " << y << ", " << width << ", " << height;
     TraceCallStack::NamedParams namedParams;
-    namedParams["x"]      = ToString(x);
-    namedParams["y"]      = ToString(y);
-    namedParams["width"]  = ToString(width);
-    namedParams["height"] = ToString(height);
+    namedParams["x"] << x;
+    namedParams["y"] << y;
+    namedParams["width"] << width;
+    namedParams["height"] << height;
     mScissorTrace.PushCall("Scissor", out.str(), namedParams);
   }
 
@@ -1062,9 +1056,9 @@ public:
     out << func << ", " << ref << ", " << mask;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["func"] = ToString(func);
-    namedParams["ref"]  = ToString(ref);
-    namedParams["mask"] = ToString(mask);
+    namedParams["func"] << std::hex << func;
+    namedParams["ref"] << ref;
+    namedParams["mask"] << mask;
 
     mStencilFunctionTrace.PushCall("StencilFunc", out.str(), namedParams);
   }
@@ -1075,10 +1069,10 @@ public:
     out << face << ", " << func << ", " << ref << ", " << mask;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["face"] = ToString(face);
-    namedParams["func"] = ToString(func);
-    namedParams["ref"]  = ToString(ref);
-    namedParams["mask"] = ToString(mask);
+    namedParams["face"] << std::hex << face;
+    namedParams["func"] << std::hex << func;
+    namedParams["ref"] << ref;
+    namedParams["mask"] << mask;
 
     mStencilFunctionTrace.PushCall("StencilFuncSeparate", out.str(), namedParams);
   }
@@ -1089,7 +1083,7 @@ public:
     out << mask;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["mask"] = ToString(mask);
+    namedParams["mask"] << mask;
 
     mStencilFunctionTrace.PushCall("StencilMask", out.str(), namedParams);
   }
@@ -1100,8 +1094,8 @@ public:
     out << face << ", " << mask;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["face"] = ToString(face);
-    namedParams["mask"] = ToString(mask);
+    namedParams["face"] << std::hex << face;
+    namedParams["mask"] << mask;
 
     mStencilFunctionTrace.PushCall("StencilMaskSeparate", out.str(), namedParams);
   }
@@ -1112,9 +1106,9 @@ public:
     out << fail << ", " << zfail << ", " << zpass;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["fail"]  = ToString(fail);
-    namedParams["zfail"] = ToString(zfail);
-    namedParams["zpass"] = ToString(zpass);
+    namedParams["fail"] << std::hex << fail;
+    namedParams["zfail"] << std::hex << zfail;
+    namedParams["zpass"] << std::hex << zpass;
 
     mStencilFunctionTrace.PushCall("StencilOp", out.str(), namedParams);
   }
@@ -1125,10 +1119,10 @@ public:
     out << face << ", " << fail << ", " << zfail << "," << zpass;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["face"]  = ToString(face);
-    namedParams["fail"]  = ToString(fail);
-    namedParams["zfail"] = ToString(zfail);
-    namedParams["zpass"] = ToString(zpass);
+    namedParams["face"] << std::hex << face;
+    namedParams["fail"] << std::hex << fail;
+    namedParams["zfail"] << std::hex << zfail;
+    namedParams["zpass"] << std::hex << zpass;
 
     mStencilFunctionTrace.PushCall("StencilOpSeparate", out.str(), namedParams);
   }
@@ -1139,14 +1133,14 @@ public:
     out << target << ", " << level << ", " << width << ", " << height;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["target"]         = ToString(target);
-    namedParams["level"]          = ToString(level);
-    namedParams["internalformat"] = ToString(internalformat);
-    namedParams["width"]          = ToString(width);
-    namedParams["height"]         = ToString(height);
-    namedParams["border"]         = ToString(border);
-    namedParams["format"]         = ToString(format);
-    namedParams["type"]           = ToString(type);
+    namedParams["target"] << std::hex << target;
+    namedParams["level"] << level;
+    namedParams["internalformat"] << internalformat;
+    namedParams["width"] << width;
+    namedParams["height"] << height;
+    namedParams["border"] << border;
+    namedParams["format"] << std::hex << format;
+    namedParams["type"] << std::hex << type;
 
     mTextureTrace.PushCall("TexImage2D", out.str(), namedParams);
   }
@@ -1157,11 +1151,11 @@ public:
     out << target << ", " << pname << ", " << param;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["target"] = ToString(target);
-    namedParams["pname"]  = ToString(pname);
-    namedParams["param"]  = ToString(param);
+    namedParams["target"] << std::hex << target;
+    namedParams["pname"] << std::hex << pname;
+    namedParams["param"] << param;
 
-    mTexParamaterTrace.PushCall("TexParameterf", out.str(), namedParams);
+    mTexParameterTrace.PushCall("TexParameterf", out.str(), namedParams);
   }
 
   inline void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params) override
@@ -1170,11 +1164,11 @@ public:
     out << target << ", " << pname << ", " << params[0];
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["target"]    = ToString(target);
-    namedParams["pname"]     = ToString(pname);
-    namedParams["params[0]"] = ToString(params[0]);
+    namedParams["target"] << std::hex << target;
+    namedParams["pname"] << std::hex << pname;
+    namedParams["params[0]"] << params[0];
 
-    mTexParamaterTrace.PushCall("TexParameterfv", out.str(), namedParams);
+    mTexParameterTrace.PushCall("TexParameterfv", out.str(), namedParams);
   }
 
   inline void TexParameteri(GLenum target, GLenum pname, GLint param) override
@@ -1186,14 +1180,14 @@ public:
     out.str("");
     out << std::hex << target;
     TraceCallStack::NamedParams namedParams;
-    namedParams["target"] = out.str();
+    namedParams["target"] << out.str();
     out.str("");
     out << std::hex << pname;
-    namedParams["pname"] = out.str();
+    namedParams["pname"] << out.str();
     out.str("");
     out << std::hex << param;
-    namedParams["param"] = out.str();
-    mTexParamaterTrace.PushCall("TexParameteri", params, namedParams);
+    namedParams["param"] << out.str();
+    mTexParameterTrace.PushCall("TexParameteri", params, namedParams);
   }
 
   inline void TexParameteriv(GLenum target, GLenum pname, const GLint* params) override
@@ -1201,10 +1195,10 @@ public:
     std::stringstream out;
     out << target << ", " << pname << ", " << params[0];
     TraceCallStack::NamedParams namedParams;
-    namedParams["target"]    = ToString(target);
-    namedParams["pname"]     = ToString(pname);
-    namedParams["params[0]"] = ToString(params[0]);
-    mTexParamaterTrace.PushCall("TexParameteriv", out.str(), namedParams);
+    namedParams["target"] << std::hex << target;
+    namedParams["pname"] << std::hex << pname;
+    namedParams["params[0]"] << params[0];
+    mTexParameterTrace.PushCall("TexParameteriv", out.str(), namedParams);
   }
 
   inline void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) override
@@ -1213,18 +1207,18 @@ public:
     out << target << ", " << level << ", " << xoffset << ", " << yoffset << ", " << width << ", " << height;
 
     TraceCallStack::NamedParams namedParams;
-    namedParams["target"]  = ToString(target);
-    namedParams["level"]   = ToString(level);
-    namedParams["xoffset"] = ToString(xoffset);
-    namedParams["yoffset"] = ToString(yoffset);
-    namedParams["width"]   = ToString(width);
-    namedParams["height"]  = ToString(height);
+    namedParams["target"] << std::hex << target;
+    namedParams["level"] << level;
+    namedParams["xoffset"] << xoffset;
+    namedParams["yoffset"] << yoffset;
+    namedParams["width"] << width;
+    namedParams["height"] << height;
     mTextureTrace.PushCall("TexSubImage2D", out.str(), namedParams);
   }
 
   inline void Uniform1f(GLint location, GLfloat value) override
   {
-    std::string params = ToString(value);
+    std::string params = std::to_string(value);
     AddUniformCallToTraceStack(location, params);
 
     if(!mProgramUniforms1f.SetUniformValue(mCurrentProgram, location, value))
@@ -1238,7 +1232,7 @@ public:
     std::string params;
     for(int i = 0; i < count; ++i)
     {
-      params = params + ToString(v[i]) + ",";
+      params = params + std::to_string(v[i]) + ",";
     }
 
     AddUniformCallToTraceStack(location, params);
@@ -1255,7 +1249,7 @@ public:
 
   inline void Uniform1i(GLint location, GLint x) override
   {
-    std::string params = ToString(x);
+    std::string params = std::to_string(x);
 
     AddUniformCallToTraceStack(location, params);
 
@@ -1267,8 +1261,9 @@ public:
 
   inline void Uniform1iv(GLint location, GLsizei count, const GLint* v) override
   {
-    std::string params = ToString(v);
-    AddUniformCallToTraceStack(location, params);
+    std::ostringstream out;
+    for(GLsizei i = 0; i < count; ++i) out << (!i ? "" : ", ") << v[i];
+    AddUniformCallToTraceStack(location, out.str());
 
     for(int i = 0; i < count; ++i)
     {
@@ -1284,7 +1279,7 @@ public:
 
   inline void Uniform2f(GLint location, GLfloat x, GLfloat y) override
   {
-    std::string params = ToString(x) + "," + ToString(y);
+    std::string params = std::to_string(x) + "," + std::to_string(y);
     AddUniformCallToTraceStack(location, params);
 
     if(!mProgramUniforms2f.SetUniformValue(mCurrentProgram,
@@ -1297,8 +1292,9 @@ public:
 
   inline void Uniform2fv(GLint location, GLsizei count, const GLfloat* v) override
   {
-    std::string params = ToString(v);
-    AddUniformCallToTraceStack(location, params);
+    std::ostringstream out;
+    for(GLsizei i = 0; i < count; ++i) out << (!i ? "" : ", ") << v[i];
+    AddUniformCallToTraceStack(location, out.str());
 
     for(int i = 0; i < count; ++i)
     {
@@ -1314,19 +1310,20 @@ public:
 
   inline void Uniform2i(GLint location, GLint x, GLint y) override
   {
-    std::string params = ToString(x) + "," + ToString(y);
+    std::string params = std::to_string(x) + "," + std::to_string(y);
     AddUniformCallToTraceStack(location, params);
   }
 
   inline void Uniform2iv(GLint location, GLsizei count, const GLint* v) override
   {
-    std::string params = ToString(v);
-    AddUniformCallToTraceStack(location, params);
+    std::ostringstream out;
+    for(GLsizei i = 0; i < count; ++i) out << (!i ? "" : ", ") << v[i];
+    AddUniformCallToTraceStack(location, out.str());
   }
 
   inline void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) override
   {
-    std::string params = ToString(x) + "," + ToString(y) + "," + ToString(z);
+    std::string params = std::to_string(x) + "," + std::to_string(y) + "," + std::to_string(z);
     AddUniformCallToTraceStack(location, params);
 
     if(!mProgramUniforms3f.SetUniformValue(mCurrentProgram,
@@ -1339,8 +1336,9 @@ public:
 
   inline void Uniform3fv(GLint location, GLsizei count, const GLfloat* v) override
   {
-    std::string params = ToString(v);
-    AddUniformCallToTraceStack(location, params);
+    std::ostringstream out;
+    for(GLsizei i = 0; i < count; ++i) out << (!i ? "" : ", ") << v[i];
+    AddUniformCallToTraceStack(location, out.str());
 
     for(int i = 0; i < count; ++i)
     {
@@ -1357,19 +1355,20 @@ public:
 
   inline void Uniform3i(GLint location, GLint x, GLint y, GLint z) override
   {
-    std::string params = ToString(x) + "," + ToString(y) + "," + ToString(z);
+    std::string params = std::to_string(x) + "," + std::to_string(y) + "," + std::to_string(z);
     AddUniformCallToTraceStack(location, params);
   }
 
   inline void Uniform3iv(GLint location, GLsizei count, const GLint* v) override
   {
-    std::string params = ToString(v);
-    AddUniformCallToTraceStack(location, params);
+    std::ostringstream out;
+    for(GLsizei i = 0; i < count; ++i) out << (!i ? "" : ", ") << v[i];
+    AddUniformCallToTraceStack(location, out.str());
   }
 
   inline void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) override
   {
-    std::string params = ToString(x) + "," + ToString(y) + "," + ToString(z) + "," + ToString(w);
+    std::string params = std::to_string(x) + "," + std::to_string(y) + "," + std::to_string(z) + "," + std::to_string(w);
     AddUniformCallToTraceStack(location, params);
 
     if(!mProgramUniforms4f.SetUniformValue(mCurrentProgram,
@@ -1382,8 +1381,9 @@ public:
 
   inline void Uniform4fv(GLint location, GLsizei count, const GLfloat* v) override
   {
-    std::string params = ToString(v);
-    AddUniformCallToTraceStack(location, params);
+    std::ostringstream out;
+    for(GLsizei i = 0; i < count; ++i) out << (!i ? "" : ", ") << v[i];
+    AddUniformCallToTraceStack(location, out.str());
 
     for(int i = 0; i < count; ++i)
     {
@@ -1400,26 +1400,29 @@ public:
 
   inline void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) override
   {
-    std::string params = ToString(x) + "," + ToString(y) + "," + ToString(z) + "," + ToString(w);
+    std::string params = std::to_string(x) + "," + std::to_string(y) + "," + std::to_string(z) + "," + std::to_string(w);
     AddUniformCallToTraceStack(location, params);
   }
 
   inline void Uniform4iv(GLint location, GLsizei count, const GLint* v) override
   {
-    std::string params = ToString(v);
-    AddUniformCallToTraceStack(location, params);
+    std::ostringstream out;
+    for(GLsizei i = 0; i < count; ++i) out << (!i ? "" : ", ") << v[i];
+    AddUniformCallToTraceStack(location, out.str());
   }
 
   inline void UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) override
   {
-    std::string params = ToString(value);
-    AddUniformCallToTraceStack(location, params);
+    std::ostringstream out;
+    for(GLsizei i = 0; i < count; ++i) out << (!i ? "" : ", ") << value[i];
+    AddUniformCallToTraceStack(location, out.str());
   }
 
   inline void UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) override
   {
-    std::string params = ToString(value);
-    AddUniformCallToTraceStack(location, params);
+    std::ostringstream out;
+    for(GLsizei i = 0; i < count; ++i) out << (!i ? "" : ", ") << value[i];
+    AddUniformCallToTraceStack(location, out.str());
 
     for(int i = 0; i < count; ++i)
     {
@@ -1436,8 +1439,9 @@ public:
 
   inline void UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) override
   {
-    std::string params = ToString(value);
-    AddUniformCallToTraceStack(location, params);
+    std::ostringstream out;
+    for(GLsizei i = 0; i < count; ++i) out << (!i ? "" : ", ") << value[i];
+    AddUniformCallToTraceStack(location, out.str());
 
     for(int i = 0; i < count; ++i)
     {
@@ -1493,8 +1497,17 @@ public:
   {
   }
 
-  inline void VertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr) override
+  inline void VertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr) override
   {
+    TraceCallStack::NamedParams namedParams;
+    namedParams["index"] << index;
+    namedParams["size"] << size;
+    namedParams["type"] << std::hex << type;
+    namedParams["normalized"] << (normalized ? "T" : "F");
+    namedParams["stride"] << stride;
+    namedParams["offset"] << std::to_string(reinterpret_cast<unsigned long>(ptr));
+
+    mBufferTrace.PushCall("VertexAttribPointer", namedParams.str(), namedParams);
   }
 
   inline void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) override
@@ -1941,7 +1954,7 @@ public:
   }
 
 private:
-  inline void AddUniformCallToTraceStack(GLint location, std::string& value)
+  inline void AddUniformCallToTraceStack(GLint location, const std::string& value)
   {
     std::string name    = "<not found>";
     bool        matched = false;
@@ -1972,9 +1985,9 @@ public: // TEST FUNCTIONS
   {
     mLinkStatus = value;
   }
-  inline void SetGetAttribLocationResult(int result)
+  inline void SetAttribLocations(std::vector<std::string> locs)
   {
-    mGetAttribLocationResult = result;
+    mAttribLocs = locs;
   }
   inline void SetGetErrorResult(GLenum result)
   {
@@ -2106,15 +2119,15 @@ public: // TEST FUNCTIONS
   //Methods for Texture verification
   inline void EnableTexParameterCallTrace(bool enable)
   {
-    mTexParamaterTrace.Enable(enable);
+    mTexParameterTrace.Enable(enable);
   }
   inline void ResetTexParameterCallStack()
   {
-    mTexParamaterTrace.Reset();
+    mTexParameterTrace.Reset();
   }
   inline TraceCallStack& GetTexParameterTrace()
   {
-    return mTexParamaterTrace;
+    return mTexParameterTrace;
   }
 
   //Methods for Draw verification
@@ -2413,7 +2426,6 @@ private:
   BufferSubDataCalls                    mBufferSubDataCalls;
   GLuint                                mLinkStatus;
   GLint                                 mNumberOfActiveUniforms;
-  GLint                                 mGetAttribLocationResult;
   GLenum                                mGetErrorResult;
   GLubyte*                              mGetStringResult;
   GLboolean                             mIsBufferResult;
@@ -2438,6 +2450,7 @@ private:
   bool                                  mGetProgramBinaryCalled;
   typedef std::map<GLuint, std::string> ShaderSourceMap;
   ShaderSourceMap                       mShaderSources;
+  std::vector<std::string>              mAttribLocs; // should be bound to shader
   GLuint                                mLastShaderCompiled;
   GLbitfield                            mLastClearBitMask;
   Vector4                               mLastClearColor;
@@ -2467,12 +2480,12 @@ private:
 
   ActiveTextureType mActiveTextures[MIN_TEXTURE_UNIT_LIMIT];
 
-  TraceCallStack mBufferTrace{"gl"};
+  TraceCallStack mBufferTrace;
   TraceCallStack mCullFaceTrace;
   TraceCallStack mEnableDisableTrace;
   TraceCallStack mShaderTrace;
-  TraceCallStack mTextureTrace{"gl"};
-  TraceCallStack mTexParamaterTrace;
+  TraceCallStack mTextureTrace;
+  TraceCallStack mTexParameterTrace;
   TraceCallStack mDrawTrace;
   TraceCallStack mDepthFunctionTrace;
   TraceCallStack mStencilFunctionTrace;
index 26960787e4c4493bf9ad9888a140ddc7f21751ef..90640e5f7c71d826274a17bdde23ccd4eb0eac07 100644 (file)
@@ -15,8 +15,8 @@
  */
 
 #include "test-graphics-buffer.h"
-
 #include <sstream>
+#include "dali-test-suite-utils.h"
 
 namespace Dali
 {
@@ -53,8 +53,8 @@ void TestGraphicsBuffer::Upload(uint32_t offset, uint32_t size)
   std::ostringstream o;
   o << offset << ", " << size;
   TraceCallStack::NamedParams namedParams;
-  namedParams["offset"] = offset;
-  namedParams["size"]   = size;
+  namedParams["offset"] << offset;
+  namedParams["size"] << size;
   mCallStack.PushCall("Buffer::Upload", o.str(), namedParams);
   if(size <= memory.size() && mCreated)
   {
index a32eeef2f66a3c32c0e9b071596f50cc4afd2bba..a0dee4ab2e86ed3b207100e5ff6e9044942ecc04 100644 (file)
@@ -28,6 +28,9 @@ void TestGraphicsCommandBuffer::BindVertexBuffers(uint32_t
                                                   std::vector<const Graphics::Buffer*> buffers,
                                                   std::vector<uint32_t>                offsets)
 {
+  mVertexBufferBindings.firstBinding = firstBinding;
+  mVertexBufferBindings.buffers      = buffers; // Copy
+  mVertexBufferBindings.offsets      = offsets; // Copy
   mCallStack.PushCall("BindVertexBuffers", "");
 }
 
@@ -38,6 +41,7 @@ void TestGraphicsCommandBuffer::BindUniformBuffers(const std::vector<Graphics::U
 
 void TestGraphicsCommandBuffer::BindPipeline(const Graphics::Pipeline& pipeline)
 {
+  mPipeline = static_cast<TestGraphicsPipeline*>(const_cast<Graphics::Pipeline*>(&pipeline));
   mCallStack.PushCall("BindPipeline", "");
 }
 
@@ -66,6 +70,9 @@ void TestGraphicsCommandBuffer::BindIndexBuffer(const Graphics::Buffer& buffer,
                                                 uint32_t                offset,
                                                 Graphics::Format        format)
 {
+  mIndexBufferBinding.buffer = &buffer;
+  mIndexBufferBinding.offset = offset;
+  mIndexBufferBinding.format = format;
   mCallStack.PushCall("BindIndexBuffer", "");
 }
 
@@ -89,6 +96,11 @@ void TestGraphicsCommandBuffer::Draw(
   uint32_t firstVertex,
   uint32_t firstInstance)
 {
+  drawCommand.drawType                      = Draw::DrawType::Unindexed;
+  drawCommand.u.unindexedDraw.vertexCount   = vertexCount;
+  drawCommand.u.unindexedDraw.instanceCount = instanceCount;
+  drawCommand.u.unindexedDraw.firstVertex   = firstVertex;
+  drawCommand.u.unindexedDraw.firstInstance = firstInstance;
   mCallStack.PushCall("Draw", "");
 }
 
@@ -99,6 +111,12 @@ void TestGraphicsCommandBuffer::DrawIndexed(
   int32_t  vertexOffset,
   uint32_t firstInstance)
 {
+  drawCommand.drawType                    = TestGraphicsCommandBuffer::Draw::DrawType::Indexed;
+  drawCommand.u.indexedDraw.indexCount    = indexCount;
+  drawCommand.u.indexedDraw.instanceCount = instanceCount;
+  drawCommand.u.indexedDraw.firstIndex    = firstIndex;
+  drawCommand.u.indexedDraw.vertexOffset  = vertexOffset;
+  drawCommand.u.indexedDraw.firstInstance = firstInstance;
   mCallStack.PushCall("DrawIndexed", "");
 }
 
index bd6c83aab5bb78a4a1d360cebed98b9f94b6ebd6..151a9df557d35a9b3e85e2a8134f1d0a5be9e27f 100644 (file)
 
 #include <dali/graphics-api/graphics-command-buffer-create-info.h>
 #include <dali/graphics-api/graphics-command-buffer.h>
+#include <dali/graphics-api/graphics-pipeline.h>
 #include <dali/graphics-api/graphics-types.h>
 #include <cstdint>
 #include <vector>
 #include "test-gl-abstraction.h"
+#include "test-graphics-pipeline.h"
 #include "test-trace-call-stack.h"
 
 namespace Dali
@@ -89,10 +91,53 @@ public:
   void SetViewportEnable(bool value);
 
 public:
-  TraceCallStack     mCallStack;
-  TestGlAbstraction& mGlAbstraction;
-
-  std::vector<Graphics::TextureBinding> mTextureBindings;
+  TraceCallStack&                       mCallStack;
+  TestGlAbstraction&                    mGlAbstraction;
+  TestGraphicsPipeline*                 mPipeline{nullptr};
+  std::vector<Graphics::TextureBinding> mTextureBindings{};
+
+  struct VertexBuffersBinding
+  {
+    uint32_t                             firstBinding;
+    std::vector<const Graphics::Buffer*> buffers;
+    std::vector<uint32_t>                offsets;
+  };
+  VertexBuffersBinding mVertexBufferBindings{};
+
+  struct IndexBufferBinding
+  {
+    const Graphics::Buffer* buffer;
+    uint32_t                offset;
+    Graphics::Format        format;
+  };
+  IndexBufferBinding mIndexBufferBinding{};
+
+  struct Draw
+  {
+    enum class DrawType
+    {
+      Indexed,
+      Unindexed
+    } drawType;
+    union
+    {
+      struct IndexedDraw
+      {
+        uint32_t indexCount;
+        uint32_t instanceCount;
+        uint32_t firstIndex;
+        int32_t  vertexOffset;
+        uint32_t firstInstance;
+      } indexedDraw;
+      struct UnindexedDraw
+      {
+        uint32_t vertexCount;
+        uint32_t instanceCount;
+        uint32_t firstVertex;
+        uint32_t firstInstance;
+      } unindexedDraw;
+    } u;
+  } drawCommand;
 };
 
 } // namespace Dali
index e7f80cd2c7181a0ca1a09a4678b9e7312976fd61..578285bd701315a71830e0a3ff5068d532d1e4e4 100644 (file)
 
 #include "test-graphics-controller.h"
 
-#include "dali-test-suite-utils.h"
 #include "test-graphics-buffer.h"
 #include "test-graphics-command-buffer.h"
 #include "test-graphics-sampler.h"
 #include "test-graphics-texture.h"
 
 #include <dali/integration-api/gl-defines.h>
+#include <cstdio>
 #include <iostream>
 #include <sstream>
 
 namespace Dali
 {
+template<typename T>
+T* Uncast(const Graphics::CommandBuffer* object)
+{
+  return const_cast<T*>(static_cast<const T*>(object));
+}
+
+template<typename T>
+T* Uncast(const Graphics::Texture* object)
+{
+  return const_cast<T*>(static_cast<const T*>(object));
+}
+
+template<typename T>
+T* Uncast(const Graphics::Sampler* object)
+{
+  return const_cast<T*>(static_cast<const T*>(object));
+}
+
+template<typename T>
+T* Uncast(const Graphics::Buffer* object)
+{
+  return const_cast<T*>(static_cast<const T*>(object));
+}
+
 std::ostream& operator<<(std::ostream& o, const Graphics::BufferCreateInfo& bufferCreateInfo)
 {
   return o << "usage:" << std::hex << bufferCreateInfo.usage << ", size:" << std::dec << bufferCreateInfo.size;
@@ -161,7 +185,7 @@ public:
     if(offset > mMappedOffset + mMappedSize ||
        size + offset > mMappedOffset + mMappedSize)
     {
-      tet_infoline("TestGraphics.Memory::LockRegion() Out of bounds");
+      fprintf(stderr, "TestGraphics.Memory::LockRegion() Out of bounds");
       mBuffer.memory.resize(mMappedOffset + offset + size); // Grow to prevent memcpy from crashing
     }
     mLockedOffset = offset;
@@ -195,38 +219,127 @@ public:
 };
 
 TestGraphicsController::TestGraphicsController()
+: mCallStack(true, "TestGraphicsController."),
+  mCommandBufferCallStack(true, "TestCommandBuffer.")
 {
   mCallStack.Enable(true);
-  mCallStack.EnableLogging(true);
   mCommandBufferCallStack.Enable(true);
-  mCommandBufferCallStack.EnableLogging(true);
-  auto& trace = mGlAbstraction.GetTextureTrace();
+  auto& trace = mGl.GetTextureTrace();
   trace.Enable(true);
   trace.EnableLogging(true);
 }
 
+int GetNumComponents(Graphics::VertexInputFormat vertexFormat)
+{
+  switch(vertexFormat)
+  {
+    case Graphics::VertexInputFormat::UNDEFINED:
+    case Graphics::VertexInputFormat::FLOAT:
+    case Graphics::VertexInputFormat::INTEGER:
+      return 1;
+    case Graphics::VertexInputFormat::IVECTOR2:
+    case Graphics::VertexInputFormat::FVECTOR2:
+      return 2;
+    case Graphics::VertexInputFormat::IVECTOR3:
+    case Graphics::VertexInputFormat::FVECTOR3:
+      return 3;
+    case Graphics::VertexInputFormat::FVECTOR4:
+    case Graphics::VertexInputFormat::IVECTOR4:
+      return 4;
+  }
+  return 1;
+}
+
+GLint GetSize(Graphics::VertexInputFormat vertexFormat)
+{
+  switch(vertexFormat)
+  {
+    case Graphics::VertexInputFormat::UNDEFINED:
+      return 1u;
+    case Graphics::VertexInputFormat::INTEGER:
+    case Graphics::VertexInputFormat::IVECTOR2:
+    case Graphics::VertexInputFormat::IVECTOR3:
+    case Graphics::VertexInputFormat::IVECTOR4:
+      return 2u;
+    case Graphics::VertexInputFormat::FLOAT:
+    case Graphics::VertexInputFormat::FVECTOR2:
+    case Graphics::VertexInputFormat::FVECTOR3:
+    case Graphics::VertexInputFormat::FVECTOR4:
+      return 4u;
+  }
+  return 1u;
+}
+
+GLint GetGlType(Graphics::VertexInputFormat vertexFormat)
+{
+  switch(vertexFormat)
+  {
+    case Graphics::VertexInputFormat::UNDEFINED:
+      return GL_BYTE;
+    case Graphics::VertexInputFormat::INTEGER:
+    case Graphics::VertexInputFormat::IVECTOR2:
+    case Graphics::VertexInputFormat::IVECTOR3:
+    case Graphics::VertexInputFormat::IVECTOR4:
+      return GL_SHORT;
+    case Graphics::VertexInputFormat::FLOAT:
+    case Graphics::VertexInputFormat::FVECTOR2:
+    case Graphics::VertexInputFormat::FVECTOR3:
+    case Graphics::VertexInputFormat::FVECTOR4:
+      return GL_FLOAT;
+  }
+  return GL_BYTE;
+}
+
+GLenum GetTopology(Graphics::PrimitiveTopology topology)
+{
+  switch(topology)
+  {
+    case Graphics::PrimitiveTopology::POINT_LIST:
+      return GL_POINTS;
+
+    case Graphics::PrimitiveTopology::LINE_LIST:
+      return GL_LINES;
+
+    case Graphics::PrimitiveTopology::LINE_LOOP:
+      return GL_LINE_LOOP;
+
+    case Graphics::PrimitiveTopology::LINE_STRIP:
+      return GL_LINE_STRIP;
+
+    case Graphics::PrimitiveTopology::TRIANGLE_LIST:
+      return GL_TRIANGLES;
+
+    case Graphics::PrimitiveTopology::TRIANGLE_STRIP:
+      return GL_TRIANGLE_STRIP;
+
+    case Graphics::PrimitiveTopology::TRIANGLE_FAN:
+      return GL_TRIANGLE_FAN;
+  }
+  return GL_TRIANGLES;
+}
+
 void TestGraphicsController::SubmitCommandBuffers(const Graphics::SubmitInfo& submitInfo)
 {
-  std::ostringstream          out;
   TraceCallStack::NamedParams namedParams;
-  out << "cmdBuffer[" << submitInfo.cmdBuffer.size() << "], flags:" << std::hex << submitInfo.flags;
-  namedParams["submitInfo"] = out.str();
+  namedParams["submitInfo"] << "cmdBuffer[" << submitInfo.cmdBuffer.size()
+                            << "], flags:" << std::hex << submitInfo.flags;
 
   mCallStack.PushCall("Controller::SubmitCommandBuffers", "", namedParams);
 
-  for(auto& commandBuffer : submitInfo.cmdBuffer)
+  for(auto& graphicsCommandBuffer : submitInfo.cmdBuffer)
   {
-    for(auto& binding : (static_cast<TestGraphicsCommandBuffer*>(commandBuffer))->mTextureBindings)
+    auto commandBuffer = Uncast<TestGraphicsCommandBuffer>(graphicsCommandBuffer);
+    for(auto& binding : commandBuffer->mTextureBindings)
     {
       if(binding.texture)
       {
-        auto texture = const_cast<TestGraphicsTexture*>(static_cast<const TestGraphicsTexture*>(binding.texture));
+        auto texture = Uncast<TestGraphicsTexture>(binding.texture);
 
         texture->Bind(binding.binding);
 
         if(binding.sampler)
         {
-          auto sampler = const_cast<TestGraphicsSampler*>(static_cast<const TestGraphicsSampler*>(binding.sampler));
+          auto sampler = Uncast<TestGraphicsSampler>(binding.sampler);
           if(sampler)
           {
             sampler->Apply(texture->GetTarget());
@@ -236,6 +349,58 @@ void TestGraphicsController::SubmitCommandBuffers(const Graphics::SubmitInfo& su
         texture->Prepare(); // Ensure native texture is ready
       }
     }
+
+    // IndexBuffer binding,
+    auto& indexBufferBinding = commandBuffer->mIndexBufferBinding;
+    if(indexBufferBinding.buffer)
+    {
+      auto buffer = Uncast<TestGraphicsBuffer>(indexBufferBinding.buffer);
+      buffer->Bind();
+    }
+
+    // VertexBuffer binding,
+    for(auto graphicsBuffer : commandBuffer->mVertexBufferBindings.buffers)
+    {
+      auto vertexBuffer = Uncast<TestGraphicsBuffer>(graphicsBuffer);
+      vertexBuffer->Bind();
+    }
+
+    // Pipeline attribute setup
+    auto& vi = commandBuffer->mPipeline->vertexInputState;
+    for(auto& attribute : vi.attributes)
+    {
+      mGl.EnableVertexAttribArray(attribute.location);
+      uint32_t attributeOffset = attribute.offset;
+      GLsizei  stride          = vi.bufferBindings[attribute.binding].stride;
+
+      mGl.VertexAttribPointer(attribute.location,
+                              GetNumComponents(attribute.format),
+                              GetGlType(attribute.format),
+                              GL_FALSE, // Not normalized
+                              stride,
+                              reinterpret_cast<void*>(attributeOffset));
+    }
+
+    // draw call
+    auto topology = commandBuffer->mPipeline->inputAssemblyState.topology;
+
+    if(commandBuffer->drawCommand.drawType == TestGraphicsCommandBuffer::Draw::DrawType::Indexed)
+    {
+      mGl.DrawElements(GetTopology(topology),
+                       static_cast<GLsizei>(commandBuffer->drawCommand.u.indexedDraw.indexCount),
+                       GL_UNSIGNED_SHORT,
+                       reinterpret_cast<void*>(commandBuffer->drawCommand.u.indexedDraw.firstIndex));
+    }
+    else
+    {
+      mGl.DrawArrays(GetTopology(topology), 0, commandBuffer->drawCommand.u.unindexedDraw.vertexCount);
+    }
+
+    // attribute clear
+    for(auto& attribute : vi.attributes)
+    {
+      mGl.DisableVertexAttribArray(attribute.location);
+    }
   }
 }
 
@@ -245,10 +410,8 @@ void TestGraphicsController::SubmitCommandBuffers(const Graphics::SubmitInfo& su
  */
 void TestGraphicsController::PresentRenderTarget(Graphics::RenderTarget* renderTarget)
 {
-  std::ostringstream          out;
   TraceCallStack::NamedParams namedParams;
-  out << std::hex << renderTarget;
-  namedParams["renderTarget"] = out.str();
+  namedParams["renderTarget"] << std::hex << renderTarget;
   mCallStack.PushCall("Controller::PresentRenderTarget", "", namedParams);
 }
 
@@ -279,13 +442,9 @@ void TestGraphicsController::Resume()
 void TestGraphicsController::UpdateTextures(const std::vector<Graphics::TextureUpdateInfo>&       updateInfoList,
                                             const std::vector<Graphics::TextureUpdateSourceInfo>& sourceList)
 {
-  std::ostringstream          out;
   TraceCallStack::NamedParams namedParams;
-  out << "[" << updateInfoList.size() << "]:";
-  namedParams["updateInfoList"] = out.str();
-  out.str("");
-  out << "[" << sourceList.size() << "]:";
-  namedParams["sourceList"] = out.str();
+  namedParams["updateInfoList"] << "[" << updateInfoList.size() << "]:";
+  namedParams["sourceList"] << "[" << sourceList.size() << "]:";
 
   mCallStack.PushCall("Controller::UpdateTextures", "", namedParams);
 
@@ -304,18 +463,16 @@ void TestGraphicsController::UpdateTextures(const std::vector<Graphics::TextureU
 bool TestGraphicsController::EnableDepthStencilBuffer(bool enableDepth, bool enableStencil)
 {
   TraceCallStack::NamedParams namedParams;
-  namedParams["enableDepth"]   = enableDepth ? "T" : "F";
-  namedParams["enableStencil"] = enableStencil ? "T" : "F";
+  namedParams["enableDepth"] << (enableDepth ? "T" : "F");
+  namedParams["enableStencil"] << (enableStencil ? "T" : "F");
   mCallStack.PushCall("Controller::EnableDepthStencilBuffer", "", namedParams);
   return false;
 }
 
 void TestGraphicsController::RunGarbageCollector(size_t numberOfDiscardedRenderers)
 {
-  std::ostringstream out;
-  out << numberOfDiscardedRenderers;
   TraceCallStack::NamedParams namedParams;
-  namedParams["numberOfDiscardedrenderers"] = out.str();
+  namedParams["numberOfDiscardedRenderers"] << numberOfDiscardedRenderers;
   mCallStack.PushCall("Controller::RunGarbageCollector", "", namedParams);
 }
 
@@ -346,7 +503,7 @@ Graphics::UniquePtr<Graphics::Buffer> TestGraphicsController::CreateBuffer(const
   std::ostringstream oss;
   oss << "bufferCreateInfo:" << createInfo;
   mCallStack.PushCall("Controller::CreateBuffer", oss.str());
-  return Graphics::MakeUnique<TestGraphicsBuffer>(mCallStack, mGlAbstraction, createInfo.size, createInfo.usage);
+  return Graphics::MakeUnique<TestGraphicsBuffer>(mCallStack, mGl, createInfo.size, createInfo.usage);
 }
 
 Graphics::UniquePtr<Graphics::CommandBuffer> TestGraphicsController::CreateCommandBuffer(const Graphics::CommandBufferCreateInfo& commandBufferCreateInfo, Graphics::UniquePtr<Graphics::CommandBuffer>&& oldCommandBuffer)
@@ -354,7 +511,7 @@ Graphics::UniquePtr<Graphics::CommandBuffer> TestGraphicsController::CreateComma
   std::ostringstream oss;
   oss << "commandBufferCreateInfo:" << commandBufferCreateInfo;
   mCallStack.PushCall("Controller::CreateCommandBuffer", oss.str());
-  return Graphics::MakeUnique<TestGraphicsCommandBuffer>(mCommandBufferCallStack, mGlAbstraction);
+  return Graphics::MakeUnique<TestGraphicsCommandBuffer>(mCommandBufferCallStack, mGl);
 }
 
 Graphics::UniquePtr<Graphics::RenderPass> TestGraphicsController::CreateRenderPass(const Graphics::RenderPassCreateInfo& renderPassCreateInfo, Graphics::UniquePtr<Graphics::RenderPass>&& oldRenderPass)
@@ -365,14 +522,11 @@ Graphics::UniquePtr<Graphics::RenderPass> TestGraphicsController::CreateRenderPa
 
 Graphics::UniquePtr<Graphics::Texture> TestGraphicsController::CreateTexture(const Graphics::TextureCreateInfo& textureCreateInfo, Graphics::UniquePtr<Graphics::Texture>&& oldTexture)
 {
-  std::ostringstream params, oss;
-  params << "textureCreateInfo:" << textureCreateInfo;
   TraceCallStack::NamedParams namedParams;
-  oss << textureCreateInfo;
-  namedParams["textureCreateInfo"] = oss.str();
-  mCallStack.PushCall("Controller::CreateTexture", params.str(), namedParams);
+  namedParams["textureCreateInfo"] << textureCreateInfo;
+  mCallStack.PushCall("Controller::CreateTexture", namedParams.str(), namedParams);
 
-  return Graphics::MakeUnique<TestGraphicsTexture>(mGlAbstraction, textureCreateInfo);
+  return Graphics::MakeUnique<TestGraphicsTexture>(mGl, textureCreateInfo);
 }
 
 Graphics::UniquePtr<Graphics::Framebuffer> TestGraphicsController::CreateFramebuffer(const Graphics::FramebufferCreateInfo& framebufferCreateInfo, Graphics::UniquePtr<Graphics::Framebuffer>&& oldFramebuffer)
@@ -384,7 +538,7 @@ Graphics::UniquePtr<Graphics::Framebuffer> TestGraphicsController::CreateFramebu
 Graphics::UniquePtr<Graphics::Pipeline> TestGraphicsController::CreatePipeline(const Graphics::PipelineCreateInfo& pipelineCreateInfo, Graphics::UniquePtr<Graphics::Pipeline>&& oldPipeline)
 {
   mCallStack.PushCall("Controller::CreatePipeline", "");
-  return nullptr;
+  return std::make_unique<TestGraphicsPipeline>(mGl, pipelineCreateInfo);
 }
 
 Graphics::UniquePtr<Graphics::Shader> TestGraphicsController::CreateShader(const Graphics::ShaderCreateInfo& shaderCreateInfo, Graphics::UniquePtr<Graphics::Shader>&& oldShader)
@@ -395,14 +549,11 @@ Graphics::UniquePtr<Graphics::Shader> TestGraphicsController::CreateShader(const
 
 Graphics::UniquePtr<Graphics::Sampler> TestGraphicsController::CreateSampler(const Graphics::SamplerCreateInfo& samplerCreateInfo, Graphics::UniquePtr<Graphics::Sampler>&& oldSampler)
 {
-  std::ostringstream params, oss;
-  params << "samplerCreateInfo:" << samplerCreateInfo;
   TraceCallStack::NamedParams namedParams;
-  oss << samplerCreateInfo;
-  namedParams["samplerCreateInfo"] = oss.str();
-  mCallStack.PushCall("Controller::CreateSampler", params.str(), namedParams);
+  namedParams["samplerCreateInfo"] << samplerCreateInfo;
+  mCallStack.PushCall("Controller::CreateSampler", namedParams.str(), namedParams);
 
-  return Graphics::MakeUnique<TestGraphicsSampler>(mGlAbstraction, samplerCreateInfo);
+  return Graphics::MakeUnique<TestGraphicsSampler>(mGl, samplerCreateInfo);
 }
 
 Graphics::UniquePtr<Graphics::RenderTarget> TestGraphicsController::CreateRenderTarget(const Graphics::RenderTargetCreateInfo& renderTargetCreateInfo, Graphics::UniquePtr<Graphics::RenderTarget>&& oldRenderTarget)
index f2181340382aa18eb7ab8fa6b004d0012512b5fa..e39c1a5c7910675516c78c4dead51dc3f6d87d00 100644 (file)
@@ -43,12 +43,12 @@ public:
 
   void Initialize()
   {
-    mGlAbstraction.Initialize();
+    mGl.Initialize();
   }
 
   Integration::GlAbstraction& GetGlAbstraction() override
   {
-    return mGlAbstraction;
+    return mGl;
   }
 
   Integration::GlSyncAbstraction& GetGlSyncAbstraction() override
@@ -276,10 +276,10 @@ public:
   bool PipelineEquals(const Graphics::Pipeline& pipeline0, const Graphics::Pipeline& pipeline1) const override;
 
 public:
-  mutable TraceCallStack mCallStack{"TestGraphics:"};
-  mutable TraceCallStack mCommandBufferCallStack{"TestCommandBuffer:"};
+  mutable TraceCallStack mCallStack;
+  mutable TraceCallStack mCommandBufferCallStack;
 
-  TestGlAbstraction              mGlAbstraction;
+  TestGlAbstraction              mGl;
   TestGlSyncAbstraction          mGlSyncAbstraction;
   TestGlContextHelperAbstraction mGlContextHelperAbstraction;
 
diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.cpp
new file mode 100644 (file)
index 0000000..0cc4194
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2021 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "test-graphics-pipeline.h"
+
+namespace Dali
+{
+TestGraphicsPipeline::TestGraphicsPipeline(TestGlAbstraction& gl, const Graphics::PipelineCreateInfo& createInfo)
+: mGl(gl)
+{
+  // Need to deep copy, otherwise pointed at memory will go out of scope. Probably should do something about this.
+
+  if(createInfo.colorBlendState)
+    colorBlendState = *createInfo.colorBlendState;
+
+  if(createInfo.shaderState)
+    shaderState = *createInfo.shaderState;
+
+  if(createInfo.viewportState)
+    viewportState = *createInfo.viewportState;
+
+  if(createInfo.framebufferState)
+    framebufferState = *createInfo.framebufferState;
+
+  if(createInfo.depthStencilState)
+    depthStencilState = *createInfo.depthStencilState;
+
+  if(createInfo.rasterizationState)
+    rasterizationState = *createInfo.rasterizationState;
+
+  if(createInfo.vertexInputState)
+    vertexInputState = *createInfo.vertexInputState;
+
+  if(createInfo.inputAssemblyState)
+    inputAssemblyState = *createInfo.inputAssemblyState;
+
+  if(createInfo.dynamicStateMask)
+    dynamicStateMask = createInfo.dynamicStateMask;
+}
+
+} // namespace Dali
diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.h
new file mode 100644 (file)
index 0000000..666e0d4
--- /dev/null
@@ -0,0 +1,47 @@
+#ifndef DALI_TEST_GRAPHICS_PIPELINE_H
+#define DALI_TEST_GRAPHICS_PIPELINE_H
+
+/*
+ * Copyright (c) 2021 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <dali/graphics-api/graphics-pipeline-create-info.h>
+#include <dali/graphics-api/graphics-pipeline.h>
+#include "test-gl-abstraction.h"
+
+namespace Dali
+{
+class TestGraphicsPipeline : public Graphics::Pipeline
+{
+public:
+  TestGraphicsPipeline(TestGlAbstraction& gl, const Graphics::PipelineCreateInfo& createInfo);
+
+  TestGlAbstraction& mGl;
+
+  Graphics::ColorBlendState          colorBlendState;
+  std::vector<Graphics::ShaderState> shaderState;
+  Graphics::ViewportState            viewportState;
+  Graphics::FramebufferState         framebufferState;
+  Graphics::Pipeline                 basePipeline;
+  Graphics::DepthStencilState        depthStencilState;
+  Graphics::RasterizationState       rasterizationState;
+  Graphics::VertexInputState         vertexInputState;
+  Graphics::InputAssemblyState       inputAssemblyState;
+  Graphics::PipelineDynamicStateMask dynamicStateMask{0u};
+};
+
+} // namespace Dali
+
+#endif //DALI_TEST_GRAPHICS_PIPELINE_H
index dd063edfeb3c36e7b43314fb5c716485324f140d..9e4efe8d30f8671bbbbd25ab719b4612ae6a2bc1 100644 (file)
@@ -48,6 +48,14 @@ std::string ToString(float x)
  */
 TraceCallStack::TraceCallStack(std::string prefix)
 : mTraceActive(false),
+  mLogging(false),
+  mPrefix(prefix)
+{
+}
+
+TraceCallStack::TraceCallStack(bool logging, std::string prefix)
+: mTraceActive(false),
+  mLogging(logging),
   mPrefix(prefix)
 {
 }
@@ -209,6 +217,10 @@ int32_t TraceCallStack::FindIndexFromMethodAndParams(std::string method, std::st
       break;
     }
   }
+  if(index == -1)
+  {
+    fprintf(stderr, "Search for %s(%s) failed\n", method.c_str(), params.c_str());
+  }
   return index;
 }
 
@@ -221,10 +233,14 @@ int TraceCallStack::FindIndexFromMethodAndParams(std::string method, const Trace
     {
       // Test each of the passed in parameters:
       bool match = true;
-      for(NamedParams::const_iterator iter = params.begin(); iter != params.end(); ++iter)
+
+      for(auto iter = params.mParams.begin(); iter != params.mParams.end(); ++iter)
       {
-        NamedParams::const_iterator paramIter = mCallStack[i].namedParams.find(iter->first);
-        if(paramIter == params.end() || paramIter->second.compare(iter->second) != 0)
+        auto        paramIter = mCallStack[i].namedParams.find(iter->parameterName);
+        std::string value     = paramIter->value.str();
+        std::string iValue    = iter->value.str();
+
+        if(paramIter == mCallStack[i].namedParams.end() || value.compare(iValue))
         {
           match = false;
           break;
@@ -237,6 +253,12 @@ int TraceCallStack::FindIndexFromMethodAndParams(std::string method, const Trace
       }
     }
   }
+
+  if(index == -1)
+  {
+    fprintf(stderr, "Search for %s(%s) failed\n", method.c_str(), params.str().c_str());
+  }
+
   return index;
 }
 
index cbbdd14a2c4e0a1076e15ed947b3dab34c810544..6b78c864c15251bd3d99ed3c7688d4f85502115f 100644 (file)
@@ -42,12 +42,102 @@ class TraceCallStack
 {
 public:
   /// Typedef for passing and storing named parameters
-  typedef std::map<std::string, std::string> NamedParams;
+  class NamedParams
+  {
+  public:
+    struct NameValue
+    {
+      std::string        parameterName;
+      std::ostringstream value;
+      NameValue(std::string pname, std::string aValue)
+      : parameterName(pname),
+        value(aValue)
+      {
+      }
+      NameValue(const NameValue& rhs)
+      : parameterName(rhs.parameterName),
+        value(rhs.value.str())
+      {
+      }
+      NameValue& operator=(const NameValue& rhs)
+      {
+        if(this != &rhs)
+        {
+          this->parameterName = rhs.parameterName;
+          this->value.str(rhs.value.str());
+        }
+        return *this;
+      }
+
+      bool operator==(const NameValue& rhs)
+      {
+        return !parameterName.compare(rhs.parameterName) && !value.str().compare(rhs.value.str());
+      }
+    };
+
+    auto find(const std::string& param) const
+    {
+      auto iter = mParams.begin();
+      for(; iter != mParams.end(); ++iter)
+      {
+        if(!iter->parameterName.compare(param))
+        {
+          break;
+        }
+      }
+      return iter;
+    }
+
+    auto begin() const
+    {
+      return mParams.begin();
+    }
+    auto end() const
+    {
+      return mParams.end();
+    }
+
+    std::ostringstream& operator[](std::string name)
+    {
+      auto iter = mParams.begin();
+      for(; iter != mParams.end(); ++iter)
+      {
+        if(!iter->parameterName.compare(name))
+        {
+          break;
+        }
+      }
+
+      if(iter != mParams.end())
+      {
+        return iter->value;
+      }
+      else
+      {
+        mParams.push_back(NameValue(name, ""));
+        return mParams.back().value;
+      }
+    }
+
+    std::string str() const
+    {
+      std::ostringstream out;
+      bool               first = true;
+      for(auto& elem : mParams)
+      {
+        out << (first ? "" : " ") << elem.parameterName << ": " << elem.value.str();
+        first = false;
+      }
+      return out.str();
+    }
+    std::vector<NameValue> mParams{};
+  };
 
   /**
    * Constructor
    */
-  TraceCallStack(std::string prefix = "");
+  TraceCallStack(std::string prefix = "gl");
+  TraceCallStack(bool logging, std::string prefix = "gl");
 
   /**
    * Destructor
index 92d2d1eb7a78f3643656e7da8574e08a1b525356..1d54fdd7c36753fd70c456fc098cb15c74581bef 100644 (file)
@@ -19,6 +19,7 @@ LIST(APPEND TC_SOURCES
   ../dali-adaptor/dali-test-suite-utils/test-graphics-controller.cpp
   ../dali-adaptor/dali-test-suite-utils/test-graphics-texture.cpp
   ../dali-adaptor/dali-test-suite-utils/test-graphics-sampler.cpp
+  ../dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.cpp
   ../dali-adaptor/dali-test-suite-utils/test-native-image.cpp
   ../dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp
   ../dali-adaptor/dali-test-suite-utils/test-render-controller.cpp
index a470c5b9b82bc1cc76267ef8c06174bfbda0556c..b0d64b26e4a6ce60b4759dabe81f8052c13eb7e1 100644 (file)
@@ -22,6 +22,7 @@ LIST(APPEND TC_SOURCES
     ../dali-adaptor/dali-test-suite-utils/test-graphics-controller.cpp
     ../dali-adaptor/dali-test-suite-utils/test-graphics-texture.cpp
     ../dali-adaptor/dali-test-suite-utils/test-graphics-sampler.cpp
+    ../dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.cpp
     ../dali-adaptor/dali-test-suite-utils/test-native-image.cpp
     ../dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp
     ../dali-adaptor/dali-test-suite-utils/test-render-controller.cpp