From b064b7975f820cce0b498f5cfc142b4cce966d30 Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Mon, 5 Feb 2024 23:50:10 +0900 Subject: [PATCH] Support to get shader language version Let we make shader language version getter as virtual function, so some graphics config can use it. Change-Id: I6752c21b105046b1872ba0e97df7a7ed2d453e8e Signed-off-by: Eunki, Hong --- .../src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.cpp | 7 ++++++- .../src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h | 6 +++++- dali/internal/graphics/gles/gl-implementation.h | 5 +++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.cpp index b861c66..fc1eb65 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.cpp +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 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. @@ -209,6 +209,11 @@ bool TestGlAbstraction::IsBlendEquationSupported(DevelBlendEquation::Type blendE return true; } +uint32_t TestGlAbstraction::GetShaderLanguageVersion() +{ + return mShaderLanguageVersion; +} + std::string TestGlAbstraction::GetShaderVersionPrefix() { return std::string(""); diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h index 3f04a6b..a70c21f 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h @@ -2,7 +2,7 @@ #define TEST_GL_ABSTRACTION_H /* - * Copyright (c) 2023 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. @@ -77,6 +77,8 @@ public: bool IsBlendEquationSupported(DevelBlendEquation::Type blendEquation) override; + uint32_t GetShaderLanguageVersion(); + std::string GetShaderVersionPrefix(); std::string GetVertexShaderPrefix(); @@ -2712,6 +2714,8 @@ public: TraceCallStack mViewportTrace; // Shaders & Uniforms + uint32_t mShaderLanguageVersion{320u}; + GLuint mLastShaderIdUsed; GLuint mLastProgramIdUsed{0u}; GLuint mLastUniformIdUsed; diff --git a/dali/internal/graphics/gles/gl-implementation.h b/dali/internal/graphics/gles/gl-implementation.h index bf40d8c..d7dcfb1 100644 --- a/dali/internal/graphics/gles/gl-implementation.h +++ b/dali/internal/graphics/gles/gl-implementation.h @@ -208,6 +208,11 @@ public: return false; } + uint32_t GetShaderLanguageVersion() override + { + return static_cast(GetShadingLanguageVersion()); + } + std::string GetShaderVersionPrefix() override { if(mShaderVersionPrefix == "") -- 2.7.4