Clear error logs when starting a new link process
This patch intends to fix a bug in logging link errors.
OpenGL ES requires glGetProgramInfoLog return a string
that contains information about last link or validation
attempt on a program object (GLES 2.0 Chapter 6.1.8,
GLES 3.0 Chapter 6.1.12). So all the link error logs
should be cleared when a new link process is begun.
This patch also removes several redundant allocations
of mLazyStream in ProgramD3D::compileProgramExecutables.
Calling "<<" on InfoLog objects will initialize its
member mLazyStream from heap, so we will skip using "<<"
if there is actually nothing to output.
BUG=angleproject:2295
TEST=angle_end2end_tests
Change-Id: Ib81fffd3d05919a8ebccd9145ff780548ca86a70
Reviewed-on: https://chromium-review.googlesource.com/848324
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Program.h b/src/libANGLE/Program.h
index 0dd8fb9..a2e53cf 100644
--- a/src/libANGLE/Program.h
+++ b/src/libANGLE/Program.h
@@ -119,6 +119,8 @@
std::string str() const { return mLazyStream ? mLazyStream->str() : ""; }
+ bool empty() const;
+
private:
void ensureInitialized()
{