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

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 333303002: generate GetAttribLocation/GetUniformLocation by build_gles2_cmd_buffer.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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_cmd_helper.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 a9e13bc2cde4075ee83139a89d5add42554ebb71..d74d64a455a897e9cbbe6be7b3c5b431bffa40a2 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -1239,8 +1239,6 @@ _PEPPER_INTERFACES = [
# gl_test_func: GL function that is expected to be called when testing.
# cmd_args: The arguments to use for the command. This overrides generating
# them based on the GL function arguments.
-# a NonImmediate type is a type that stays a pointer even in
-# and immediate version of acommand.
# gen_cmd: Whether or not this function geneates a command. Default = True.
# data_transfer_methods: Array of methods that are used for transfering the
# pointer data. Possible values: 'immediate', 'shm', 'bucket'.
@@ -1709,10 +1707,10 @@ _FUNCTION_INFO = {
'result': ['SizedResult<GLuint>'],
},
'GetAttribLocation': {
- 'type': 'HandWritten',
- 'needs_size': True,
+ 'type': 'Custom',
+ 'data_transfer_methods': ['shm'],
'cmd_args':
- 'GLidProgram program, const char* name, NonImmediate GLint* location',
+ 'GLidProgram program, uint32_t name_bucket_id, GLint* location',
'result': ['GLint'],
'error_return': -1, # http://www.opengl.org/sdk/docs/man/xhtml/glGetAttribLocation.xml
},
@@ -1866,10 +1864,10 @@ _FUNCTION_INFO = {
'result': ['SizedResult<GLint>'],
},
'GetUniformLocation': {
- 'type': 'HandWritten',
- 'needs_size': True,
+ 'type': 'Custom',
+ 'data_transfer_methods': ['shm'],
'cmd_args':
- 'GLidProgram program, const char* name, NonImmediate GLint* location',
+ 'GLidProgram program, uint32_t name_bucket_id, GLint* location',
'result': ['GLint'],
'error_return': -1, # http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformLocation.xml
},
@@ -6530,21 +6528,6 @@ class InputStringBucketArgument(Argument):
return "_"
-class NonImmediatePointerArgument(PointerArgument):
- """A pointer argument that stays a pointer even in an immediate cmd."""
-
- def __init__(self, name, type):
- PointerArgument.__init__(self, name, type)
-
- def IsPointer(self):
- """Returns true if argument is a pointer."""
- return False
-
- def GetImmediateVersion(self):
- """Overridden from Argument."""
- return self
-
-
class ResourceIdArgument(Argument):
"""A class that represents a resource id argument to a function."""
@@ -7202,14 +7185,9 @@ def CreateArg(arg_string):
return None
# Is this a pointer argument?
elif arg_string.find('*') >= 0:
- if arg_parts[0] == 'NonImmediate':
- return NonImmediatePointerArgument(
- arg_parts[-1],
- " ".join(arg_parts[1:-1]))
- else:
- return PointerArgument(
- arg_parts[-1],
- " ".join(arg_parts[0:-1]))
+ return PointerArgument(
+ arg_parts[-1],
+ " ".join(arg_parts[0:-1]))
# Is this a resource argument? Must come after pointer check.
elif arg_parts[0].startswith('GLidBind'):
return ResourceIdBindArgument(arg_parts[-1], " ".join(arg_parts[0:-1]))
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_cmd_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698