Inline ValidateBindBuffer.
This method is only called in one place. Inlining reduces the need to
make a jump and push/pop variables from the stack.
It also adds a specialized error handler for validation errors. This
reduces the amount of code generated for errors. The prior method
generates a lot of code when dealing with string streams.
Improves performance of the binding performance test.
Bug: angleproject:2763
Change-Id: I52af7046b398072975bf5bda583efac9a9b9a8cb
Reviewed-on: https://chromium-review.googlesource.com/c/1270219
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index ca4643d..ee7ab9d 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -2628,6 +2628,11 @@
mErrors.handleError(errorCode, message, file, function, line);
}
+void Context::validationError(GLenum errorCode, const char *message)
+{
+ mErrors.validationError(errorCode, message);
+}
+
// Get one of the recorded errors and clear its flag, if any.
// [OpenGL ES 2.0.24] section 2.5 page 13.
GLenum Context::getError()
@@ -7977,6 +7982,11 @@
handleError(gl::Error(errorCode, errorCode, errorStream.str()));
}
+void ErrorSet::validationError(GLenum errorCode, const char *message)
+{
+ handleError(gl::Error(errorCode, message));
+}
+
bool ErrorSet::empty() const
{
return mErrors.empty();