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

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 7099007: Enforce RGB even on buggy drivers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add checks for reading GL_ALPHA_BITS etc. Created 9 years, 6 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/service/framebuffer_manager.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 4d8d9247349fe88c45934098f749424c3e3f65c2..5e00aa057715260fc6e52d1f501f8f38893eaaa8 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -1134,7 +1134,7 @@ _FUNCTION_INFO = {
'decoder_func': 'DoClearDepthf',
'gl_test_func': 'glClearDepth',
},
- 'ColorMask': {'decoder_func': 'DoColorMask'},
+ 'ColorMask': {'decoder_func': 'DoColorMask', 'expectation': False},
'ClearStencil': {'decoder_func': 'DoClearStencil'},
'CommandBufferEnableCHROMIUM': {
'type': 'Custom',
@@ -1192,7 +1192,7 @@ _FUNCTION_INFO = {
},
'DeleteTextures': {'type': 'DELn'},
'DepthRangef': {'decoder_func': 'glDepthRange'},
- 'DepthMask': {'decoder_func': 'DoDepthMask'},
+ 'DepthMask': {'decoder_func': 'DoDepthMask', 'expectation': False},
'DetachShader': {'decoder_func': 'DoDetachShader'},
'Disable': {
'decoder_func': 'DoDisable',
@@ -1507,8 +1507,11 @@ _FUNCTION_INFO = {
'cmd_args':
'GLuint shader, const char* data',
},
- 'StencilMask': {'decoder_func': 'DoStencilMask'},
- 'StencilMaskSeparate': {'decoder_func': 'DoStencilMaskSeparate'},
+ 'StencilMask': {'decoder_func': 'DoStencilMask', 'expectation': False},
+ 'StencilMaskSeparate': {
+ 'decoder_func': 'DoStencilMaskSeparate',
+ 'expectation': False,
+ },
'SwapBuffers': {
'type': 'Custom',
'impl_func': False,
@@ -4271,6 +4274,22 @@ class Argument(object):
"""Gets the bucket version of this argument."""
return self
+
+class BoolArgument(Argument):
+ """class for GLboolean"""
+
+ def __init__(self, name, type):
+ Argument.__init__(self, name, 'GLboolean')
+
+ def GetValidArg(self, func, offset, index):
+ """Gets a valid value for this argument."""
+ return 'true'
+
+ def GetValidGLArg(self, func, offset, index):
+ """Gets a valid GL value for this argument."""
+ return 'true'
+
+
class DataSizeArgument(Argument):
"""class for data_size which Bucket commands do not need."""
@@ -4335,7 +4354,7 @@ class SizeNotNegativeArgument(SizeArgument):
class EnumBaseArgument(Argument):
- """Base class for EnumArgument, IntArgument and BoolArgument"""
+ """Base class for EnumArgument, IntArgument and ValidatedBoolArgument"""
def __init__(self, name, gl_type, type, gl_error):
Argument.__init__(self, name, gl_type)
@@ -4405,7 +4424,7 @@ class IntArgument(EnumBaseArgument):
EnumBaseArgument.__init__(self, name, "GLint", type, "GL_INVALID_VALUE")
-class BoolArgument(EnumBaseArgument):
+class ValidatedBoolArgument(EnumBaseArgument):
"""A class for a GLboolean argument that can only except specific values.
For example glUniformMatrix takes a GLboolean for it's transpose but it
@@ -5059,6 +5078,8 @@ def CreateArg(arg_string):
elif arg_parts[0].startswith('GLenum') and len(arg_parts[0]) > 6:
return EnumArgument(arg_parts[-1], " ".join(arg_parts[0:-1]))
elif arg_parts[0].startswith('GLboolean') and len(arg_parts[0]) > 9:
+ return ValidatedBoolArgument(arg_parts[-1], " ".join(arg_parts[0:-1]))
+ elif arg_parts[0].startswith('GLboolean'):
return BoolArgument(arg_parts[-1], " ".join(arg_parts[0:-1]))
elif (arg_parts[0].startswith('GLint') and len(arg_parts[0]) > 5 and
not arg_parts[0].startswith('GLintptr')):
« no previous file with comments | « no previous file | gpu/command_buffer/service/framebuffer_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698