Commit e0472f3d by Jamie Madill Committed by Commit Bot

Slight refactor to ErrorStrings.h.

Allows for better readability. Also sort the error strings by ID. Bug: angleproject:2957 Change-Id: Ib3900a4c90507ac84496fd5ff916417eb768667b Reviewed-on: https://chromium-review.googlesource.com/c/1337461 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org>
parent 752d220a
......@@ -228,7 +228,7 @@ ANGLE_INLINE bool ValidateUniformValue(Context *context, GLenum valueType, GLenu
// Do the cheaper test first, for a little extra speed.
if (valueType != uniformType && VariableBoolVectorType(valueType) != uniformType)
{
context->validationError(GL_INVALID_OPERATION, kErrorUniformSizeMismatch);
context->validationError(GL_INVALID_OPERATION, err::kUniformSizeMismatch);
return false;
}
return true;
......@@ -605,7 +605,7 @@ ANGLE_INLINE bool ValidateFramebufferComplete(Context *context, Framebuffer *fra
{
if (!framebuffer->isComplete(context))
{
context->validationError(ErrorCode, kErrorFramebufferIncomplete);
context->validationError(ErrorCode, err::kFramebufferIncomplete);
return false;
}
......
......@@ -32,14 +32,14 @@ ANGLE_INLINE bool ValidateBindBuffer(Context *context, BufferBinding target, GLu
{
if (!context->isValidBufferBinding(target))
{
context->validationError(GL_INVALID_ENUM, kErrorInvalidBufferTypes);
context->validationError(GL_INVALID_ENUM, err::kInvalidBufferTypes);
return false;
}
if (!context->getGLState().isBindGeneratesResourceEnabled() &&
!context->isBufferGenerated(buffer))
{
context->validationError(GL_INVALID_OPERATION, kErrorObjectNotGenerated);
context->validationError(GL_INVALID_OPERATION, err::kObjectNotGenerated);
return false;
}
......
......@@ -87,7 +87,7 @@ TEST_P(ErrorMessagesTest, ErrorMessages)
constexpr GLenum type = GL_DEBUG_TYPE_ERROR;
constexpr GLenum severity = GL_DEBUG_SEVERITY_HIGH;
constexpr GLuint id1 = 1282;
const std::string message1 = gl::kErrorWebglBindAttribLocationReservedPrefix;
const std::string message1 = gl::err::kWebglBindAttribLocationReservedPrefix;
Message expectedMessage;
GLint numMessages = 0;
......
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