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

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 10860082: Remove overly agressive ASSERTs on output GL parameters. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
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 340278b27c90073785f11b5080a4b600ab7ce052..d0eb566509f55c93929a8229dd2d7d6d91f01cab 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -4632,6 +4632,10 @@ class Argument(object):
def __init__(self, name, type):
self.name = name
+ self.optional = type.endswith("Optional*")
+ if self.optional:
+ type = type[:-9] + "*"
+ print name, type
self.type = type
if type in self.cmd_type_map_:
@@ -4712,8 +4716,9 @@ class Argument(object):
if len(parts) > 1:
return
if parts[0] in self.need_validation_:
- file.Write(" GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION(%s, %s);\n" %
- (self.type[:-1], self.name))
+ file.Write(
+ " GPU_CLIENT_VALIDATE_DESTINATION_%sINITALIZATION(%s, %s);\n" %
+ ("OPTIONAL_" if self.optional else "", self.type[:-1], self.name))
def WriteGetAddress(self, file):
« 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