Fix perf regression with checkStatus.
Returning an Error was costing us performance in extra
error checks. This intead uses the Context to process the
Error immediately, and returns a value from isComplete and
checkStatus.
Improves performance in draw call validation.
Bug: chromium:822235
Change-Id: I0793fc690e86137425fed593d45083e40aee8db9
Reviewed-on: https://chromium-review.googlesource.com/1011370
Reviewed-by: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 27d0d3b..d211970 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -2514,8 +2514,7 @@
}
}
- GLint samples = 0;
- ANGLE_VALIDATION_TRY(readFramebuffer->getSamples(context, &samples));
+ GLint samples = readFramebuffer->getSamples(context);
if (samples != 0 &&
IsPartialBlit(context, readColorAttachment, drawColorAttachment, srcX0, srcY0,
srcX1, srcY1, dstX0, dstY0, dstX1, dstY1))
@@ -2566,7 +2565,7 @@
{
Framebuffer *fbo = context->getGLState().getDrawFramebuffer();
- if (!ValidateFramebufferComplete(context, fbo, true))
+ if (!ValidateFramebufferComplete(context, fbo))
{
return false;
}