Output error log on shader link failure 19/300019/2
authorDavid Steele <david.steele@samsung.com>
Fri, 13 Oct 2023 14:52:47 +0000 (15:52 +0100)
committerDavid Steele <david.steele@samsung.com>
Tue, 7 Nov 2023 13:46:30 +0000 (13:46 +0000)
Change-Id: Ic7bd0439c71cb76be91f506f7c93d81195579cf7

dali/internal/graphics/gles-impl/gles-graphics-pipeline-cache.cpp
dali/internal/graphics/gles-impl/gles-graphics-program.cpp
dali/internal/graphics/gles-impl/gles-graphics-shader.cpp

index ccf7e61..e35faaa 100755 (executable)
@@ -442,7 +442,7 @@ Graphics::UniquePtr<Graphics::Program> PipelineCache::GetProgram(const ProgramCr
     // create new pipeline
     auto program = MakeUnique<GLES::ProgramImpl>(programCreateInfo, mImpl->controller);
 
-    program->Create();
+    program->Create(); // Don't currently handle failure.
 
     cachedProgram = program.get();
 
index af1baa4..d7fc0a7 100644 (file)
@@ -164,7 +164,7 @@ bool ProgramImpl::Create()
     gl->GetProgramInfoLog(program, 4096, &size, output);
 
     // log on error
-    DALI_LOG_INFO(gGraphicsProgramLogFilter, Debug::Verbose, "Log: %s\n", output);
+    DALI_LOG_ERROR("glLinkProgam failed:\n%s\n", output);
     gl->DeleteProgram(program);
     return false;
   }
@@ -172,8 +172,8 @@ bool ProgramImpl::Create()
   mImpl->glProgram = program;
 
   // Initialize reflection
-  mImpl->reflection->BuildUniformBlockReflection();
   mImpl->reflection->BuildVertexAttributeReflection();
+  mImpl->reflection->BuildUniformBlockReflection();
 
   // populate uniform cache memory for standalone uniforms (it's not needed
   // for real UBOs as real UBOs work with whole memory blocks)
index e8eb2c8..5e46e97 100644 (file)
@@ -116,13 +116,11 @@ bool Shader::Compile() const
         char    output[4096];
         GLsizei size{0u};
         gl->GetShaderInfoLog(shader, 4096, &size, output);
-        DALI_LOG_RENDER_INFO("Code: %s\n", reinterpret_cast<const char*>(GetCreateInfo().sourceData));
-        DALI_LOG_RENDER_INFO("Log: %s\n", output);
+        DALI_LOG_ERROR("Code: %s\n", reinterpret_cast<const char*>(GetCreateInfo().sourceData));
+        DALI_LOG_ERROR("glCompileShader() failed: \n%s\n", output);
         gl->DeleteShader(shader);
         return false;
       }
-
-      // TODO: check error
       mImpl->glShader = shader;
     }
     return true;