Make Precompile shader make same prefix with general shader of toolkit 91/318191/2
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 25 Sep 2024 10:18:34 +0000 (19:18 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 25 Sep 2024 10:34:03 +0000 (19:34 +0900)
Let we make pre compiled shader also use GenerateTaggedShaderPrefix()

Change-Id: I85299cb212a3130ed6c37a37bf866fe20dab8ea5
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/adaptor/common/combined-update-render-controller.cpp

index c94bffb8d52f4bad61350478e1d46d3ed7410bc8..1d7b8ba9dcaed801add4dc4bf864e70736a174be 100644 (file)
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/platform-abstraction.h>
+#include <dali/integration-api/shader-integ.h>
+#include <dali/public-api/common/dali-common.h>
 #include <errno.h>
 #include <unistd.h>
-#include "dali/public-api/common/dali-common.h"
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/adaptor-framework/shader-precompiler.h>
@@ -611,13 +612,13 @@ void CombinedUpdateRenderController::UpdateRenderThread()
           std::string fragmentShader;
           if(precompiledShader->custom)
           {
-            vertexShader = precompiledShader->vertexPrefix[i].data();
+            vertexShader   = precompiledShader->vertexPrefix[i].data();
             fragmentShader = precompiledShader->fragmentPrefix[i].data();
           }
           else
           {
-            vertexShader   = graphics.GetController().GetGraphicsConfig().GetVertexShaderPrefix() + std::string(precompiledShader->vertexPrefix[i].data()) + std::string(precompiledShader->vertexShader.data());
-            fragmentShader = graphics.GetController().GetGraphicsConfig().GetFragmentShaderPrefix() + std::string(precompiledShader->fragmentPrefix[i].data()) + std::string(precompiledShader->fragmentShader.data());
+            vertexShader   = Dali::Integration::GenerateTaggedShaderPrefix(graphics.GetController().GetGraphicsConfig().GetVertexShaderPrefix()) + std::string(precompiledShader->vertexPrefix[i].data()) + std::string(precompiledShader->vertexShader.data());
+            fragmentShader = Dali::Integration::GenerateTaggedShaderPrefix(graphics.GetController().GetGraphicsConfig().GetFragmentShaderPrefix()) + std::string(precompiledShader->fragmentPrefix[i].data()) + std::string(precompiledShader->fragmentShader.data());
           }
 
           PreCompileShader(std::move(vertexShader), std::move(fragmentShader), static_cast<uint32_t>(i) < precompiledShader->shaderName.size() ? std::string(precompiledShader->shaderName[i]) : "");