Commit 610640fa by Jamie Madill Committed by Commit Bot

Don't use gl::Error in validation.

Instead pass error code and error message directly to the Context. As a side effect every validation error has an associated message now. Reduces binary size by almost 100k. Bug: angleproject:2957 Change-Id: I045e8ab57f8f9d787654a32f6f037011fe3a9f24 Reviewed-on: https://chromium-review.googlesource.com/c/1335890 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org>
parent dc65c5bd
......@@ -98,14 +98,6 @@ using ErrorStream = angle::ErrorStreamBase<Error, GLenum, GL_NO_ERROR, GLenum, E
} // namespace priv
using InvalidEnum = priv::ErrorStream<GL_INVALID_ENUM>;
using InvalidValue = priv::ErrorStream<GL_INVALID_VALUE>;
using InvalidOperation = priv::ErrorStream<GL_INVALID_OPERATION>;
using StackOverflow = priv::ErrorStream<GL_STACK_OVERFLOW>;
using StackUnderflow = priv::ErrorStream<GL_STACK_UNDERFLOW>;
using OutOfMemory = priv::ErrorStream<GL_OUT_OF_MEMORY>;
using InvalidFramebufferOperation = priv::ErrorStream<GL_INVALID_FRAMEBUFFER_OPERATION>;
inline Error NoError()
{
return Error::NoError();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -600,12 +600,12 @@ bool ValidateES3TexStorage3DParameters(Context *context,
// implementation format info for incomplete framebuffers. It seems like these queries are
// incongruent with the other errors.
// Inlined for speed.
template <typename ErrorStream = InvalidFramebufferOperation>
template <GLenum ErrorCode = GL_INVALID_FRAMEBUFFER_OPERATION>
ANGLE_INLINE bool ValidateFramebufferComplete(Context *context, Framebuffer *framebuffer)
{
if (!framebuffer->isComplete(context))
{
context->handleError(ErrorStream());
context->validationError(ErrorCode, kErrorFramebufferIncomplete);
return false;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment