Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 10893034: Add ENUM value to synthesized GL_INVALID_ENUM errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/build_gles2_cmd_buffer.py
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index bf2038fb012489b063d1982be2936ca6fa88ee2f..85cdc078f3fcb2ec176858270122fbda5c300fd8 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -4846,8 +4846,14 @@ class EnumBaseArgument(Argument):
def WriteValidationCode(self, file, func):
file.Write(" if (!validators_->%s.IsValid(%s)) {\n" %
(ToUnderscore(self.type_name), self.name))
- file.Write(" SetGLError(%s, \"gl%s\", \"%s %s\");\n" %
- (self.gl_error, func.original_name, self.name, self.gl_error))
+ if self.gl_error == "GL_INVALID_ENUM":
+ file.Write(
+ " SetGLErrorInvalidEnum(\"gl%s\", %s, \"%s\");\n" %
+ (func.original_name, self.name, self.name))
+ else:
+ file.Write(
+ " SetGLError(%s, \"gl%s\", \"%s %s\");\n" %
+ (self.gl_error, func.original_name, self.name, self.gl_error))
file.Write(" return error::kNoError;\n")
file.Write(" }\n")
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698