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 ...@@ -228,7 +228,7 @@ ANGLE_INLINE bool ValidateUniformValue(Context *context, GLenum valueType, GLenu
// Do the cheaper test first, for a little extra speed. // Do the cheaper test first, for a little extra speed.
if (valueType != uniformType && VariableBoolVectorType(valueType) != uniformType) if (valueType != uniformType && VariableBoolVectorType(valueType) != uniformType)
{ {
context->validationError(GL_INVALID_OPERATION, kErrorUniformSizeMismatch); context->validationError(GL_INVALID_OPERATION, err::kUniformSizeMismatch);
return false; return false;
} }
return true; return true;
...@@ -605,7 +605,7 @@ ANGLE_INLINE bool ValidateFramebufferComplete(Context *context, Framebuffer *fra ...@@ -605,7 +605,7 @@ ANGLE_INLINE bool ValidateFramebufferComplete(Context *context, Framebuffer *fra
{ {
if (!framebuffer->isComplete(context)) if (!framebuffer->isComplete(context))
{ {
context->validationError(ErrorCode, kErrorFramebufferIncomplete); context->validationError(ErrorCode, err::kFramebufferIncomplete);
return false; return false;
} }
......
...@@ -32,14 +32,14 @@ ANGLE_INLINE bool ValidateBindBuffer(Context *context, BufferBinding target, GLu ...@@ -32,14 +32,14 @@ ANGLE_INLINE bool ValidateBindBuffer(Context *context, BufferBinding target, GLu
{ {
if (!context->isValidBufferBinding(target)) if (!context->isValidBufferBinding(target))
{ {
context->validationError(GL_INVALID_ENUM, kErrorInvalidBufferTypes); context->validationError(GL_INVALID_ENUM, err::kInvalidBufferTypes);
return false; return false;
} }
if (!context->getGLState().isBindGeneratesResourceEnabled() && if (!context->getGLState().isBindGeneratesResourceEnabled() &&
!context->isBufferGenerated(buffer)) !context->isBufferGenerated(buffer))
{ {
context->validationError(GL_INVALID_OPERATION, kErrorObjectNotGenerated); context->validationError(GL_INVALID_OPERATION, err::kObjectNotGenerated);
return false; return false;
} }
......
...@@ -87,7 +87,7 @@ TEST_P(ErrorMessagesTest, ErrorMessages) ...@@ -87,7 +87,7 @@ TEST_P(ErrorMessagesTest, ErrorMessages)
constexpr GLenum type = GL_DEBUG_TYPE_ERROR; constexpr GLenum type = GL_DEBUG_TYPE_ERROR;
constexpr GLenum severity = GL_DEBUG_SEVERITY_HIGH; constexpr GLenum severity = GL_DEBUG_SEVERITY_HIGH;
constexpr GLuint id1 = 1282; constexpr GLuint id1 = 1282;
const std::string message1 = gl::kErrorWebglBindAttribLocationReservedPrefix; const std::string message1 = gl::err::kWebglBindAttribLocationReservedPrefix;
Message expectedMessage; Message expectedMessage;
GLint numMessages = 0; 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