Commit e7d80f33 by Jamie Madill Committed by Commit Bot

Refactor ValidateDrawBase.

Split the parameter-dependent and parameter-independent validation. This will more easily let us cache independent validation in Context. Bug: angleproject:2747 Change-Id: I78a12798cd03a398392ca213bf51e2079295b97e Reviewed-on: https://chromium-review.googlesource.com/1158610 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarFrank Henigman <fjhenigman@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent cc1dc5ee
...@@ -171,6 +171,17 @@ ERRMSG(MismatchedTypeAndFormat, "Invalid format and type combination."); ...@@ -171,6 +171,17 @@ ERRMSG(MismatchedTypeAndFormat, "Invalid format and type combination.");
ERRMSG(MismatchedVariableProgram, "Variable is not part of the current program."); ERRMSG(MismatchedVariableProgram, "Variable is not part of the current program.");
ERRMSG(MissingReadAttachment, "Missing read attachment."); ERRMSG(MissingReadAttachment, "Missing read attachment.");
ERRMSG(MustHaveElementArrayBinding, "Must have element array buffer binding."); ERRMSG(MustHaveElementArrayBinding, "Must have element array buffer binding.");
ERRMSG(MultiviewMismatch,
"The number of views in the active program and draw "
"framebuffer does not match.");
ERRMSG(MultiviewTransformFeedback,
"There is an active transform feedback object when "
"the number of views in the active draw framebuffer "
"is greater than 1.");
ERRMSG(MultiviewTimerQuery,
"There is an active query for target "
"GL_TIME_ELAPSED_EXT when the number of views in the "
"active draw framebuffer is greater than 1.");
ERRMSG(NameBeginsWithGL, "Attributes that begin with 'gl_' are not allowed."); ERRMSG(NameBeginsWithGL, "Attributes that begin with 'gl_' are not allowed.");
ERRMSG(NegativeAttachments, "Negative number of attachments."); ERRMSG(NegativeAttachments, "Negative number of attachments.");
ERRMSG(NegativeBufferSize, "Negative buffer size."); ERRMSG(NegativeBufferSize, "Negative buffer size.");
...@@ -184,6 +195,9 @@ ERRMSG(NegativeStart, "Cannot have negative start."); ...@@ -184,6 +195,9 @@ ERRMSG(NegativeStart, "Cannot have negative start.");
ERRMSG(NegativeStride, "Cannot have negative stride."); ERRMSG(NegativeStride, "Cannot have negative stride.");
ERRMSG(NoActiveComputeShaderStage, "No active compute shader stage in this program."); ERRMSG(NoActiveComputeShaderStage, "No active compute shader stage in this program.");
ERRMSG(NoActiveGeometryShaderStage, "No active geometry shader stage in this program."); ERRMSG(NoActiveGeometryShaderStage, "No active geometry shader stage in this program.");
ERRMSG(
NoActiveGraphicsShaderStage,
"It is a undefined behaviour to render without vertex shader stage or fragment shader stage.");
ERRMSG(NoActiveProgramWithComputeShader, "No active program for the compute shader stage."); ERRMSG(NoActiveProgramWithComputeShader, "No active program for the compute shader stage.");
ERRMSG(NonPositiveDrawTextureDimension, ERRMSG(NonPositiveDrawTextureDimension,
"Both width and height argument of drawn texture must be positive."); "Both width and height argument of drawn texture must be positive.");
...@@ -236,6 +250,10 @@ ERRMSG(TypeMismatch, ...@@ -236,6 +250,10 @@ ERRMSG(TypeMismatch,
ERRMSG(TypeNotUnsignedShortByte, "Only UNSIGNED_SHORT and UNSIGNED_BYTE types are supported."); ERRMSG(TypeNotUnsignedShortByte, "Only UNSIGNED_SHORT and UNSIGNED_BYTE types are supported.");
ERRMSG(UniformBufferBoundForTransformFeedback, ERRMSG(UniformBufferBoundForTransformFeedback,
"It is undefined behavior to use an uniform buffer that is bound for transform feedback."); "It is undefined behavior to use an uniform buffer that is bound for transform feedback.");
ERRMSG(UniformBufferTooSmall,
"It is undefined behaviour to use a uniform buffer that is too small.");
ERRMSG(UniformBufferUnbound,
"It is undefined behaviour to have a used but unbound uniform buffer.");
ERRMSG(UniformSizeMismatch, "Uniform size does not match uniform method."); ERRMSG(UniformSizeMismatch, "Uniform size does not match uniform method.");
ERRMSG(UnknownParameter, "Unknown parameter value."); ERRMSG(UnknownParameter, "Unknown parameter value.");
ERRMSG(UnsupportedDrawModeForTransformFeedback, ERRMSG(UnsupportedDrawModeForTransformFeedback,
......
...@@ -704,6 +704,12 @@ ANGLE_INLINE bool ValidateFramebufferComplete(Context *context, Framebuffer *fra ...@@ -704,6 +704,12 @@ ANGLE_INLINE bool ValidateFramebufferComplete(Context *context, Framebuffer *fra
return true; return true;
} }
struct ErrorAndMessage
{
GLenum errorType;
const char *message;
};
} // namespace gl } // namespace gl
#endif // LIBANGLE_VALIDATION_ES_H_ #endif // LIBANGLE_VALIDATION_ES_H_
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