Merge "[ATSPI] Introduce GetMatchesInMatches API" into tizen_7.0 accepted/tizen/7.0/unified/20240216.161223
authorkim hosang <hosang12.kim@samsung.com>
Fri, 16 Feb 2024 04:20:04 +0000 (04:20 +0000)
committerGerrit Code Review <gerrit@review>
Fri, 16 Feb 2024 04:20:04 +0000 (04:20 +0000)
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
dali/internal/graphics/gles/gl-implementation.h
dali/internal/graphics/gles/gles2-implementation.h

index 6021026..0c545e0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -176,6 +176,11 @@ bool TestGlAbstraction::IsBlendEquationSupported(DevelBlendEquation::Type blendE
   return true;
 }
 
+uint32_t TestGlAbstraction::GetShaderLanguageVersion()
+{
+  return mShaderLanguageVersion;
+}
+
 std::string TestGlAbstraction::GetShaderVersionPrefix()
 {
   return std::string("");
index 5e5fde3..9051695 100644 (file)
@@ -2,7 +2,7 @@
 #define TEST_GL_ABSTRACTION_H
 
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -76,6 +76,8 @@ public:
 
   bool IsBlendEquationSupported(DevelBlendEquation::Type blendEquation) override;
 
+  uint32_t GetShaderLanguageVersion();
+
   std::string GetShaderVersionPrefix();
 
   std::string GetVertexShaderPrefix();
@@ -2592,6 +2594,8 @@ public:
   TraceCallStack mViewportTrace;
 
   // Shaders & Uniforms
+  uint32_t mShaderLanguageVersion{320u};
+
   GLuint                                 mLastShaderIdUsed;
   GLuint                                 mLastProgramIdUsed{0u};
   GLuint                                 mLastUniformIdUsed;
index 39217ce..5f540da 100644 (file)
@@ -172,6 +172,11 @@ public:
     return false;
   }
 
+  uint32_t GetShaderLanguageVersion() override
+  {
+    return static_cast<uint32_t>(GetShadingLanguageVersion());
+  }
+
   std::string GetShaderVersionPrefix() override
   {
     if(mShaderVersionPrefix == "")
index 527cebf..57cb40f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_GLES2_IMPLEMENTATION_H
 
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -371,6 +371,40 @@ public:
   void GetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) override
   {
     DALI_LOG_ERROR("glGetActiveUniformsiv is not supported in OpenGL es 2.0\n");
+
+    int maxUniformNameLength = 0;
+    glGetProgramiv(program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxUniformNameLength);
+    char* name = new char[maxUniformNameLength + 1];
+
+    for(auto i = 0; i < uniformCount; ++i)
+    {
+      GLint  elementCount;
+      GLint  written;
+      GLenum type;
+      glGetActiveUniform(program, uniformIndices[i], maxUniformNameLength, &written, &elementCount, &type, name);
+
+      if(pname == GL_UNIFORM_TYPE)
+      {
+        params[i] = type;
+      }
+      else if(pname == GL_UNIFORM_SIZE)
+      {
+        params[i] = elementCount;
+      }
+      else if(pname == GL_UNIFORM_NAME_LENGTH)
+      {
+        params[i] = written;
+      }
+      else if(pname == GL_UNIFORM_BLOCK_INDEX)
+      {
+        params[i] = -1; // Not support
+      }
+      else if(pname == GL_UNIFORM_OFFSET)
+      {
+        params[i] = 0; // Not support
+      }
+    }
+    delete[] name;
   }
 
   GLuint GetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName) override