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

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 1335243002: Improve Uniform*ui{v} command handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/gles2_cmd_decoder.cc » ('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 902aca01ef122f59a3007247ac804caac991ad21..04fca663e3c1d5b2dcf52437235a942f800a43ea 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -3475,11 +3475,14 @@ _FUNCTION_INFO = {
'Uniform1ui': {
'type': 'PUTXn',
'count': 1,
+ 'unit_test': False,
'unsafe': True,
},
'Uniform1uiv': {
'type': 'PUTn',
'count': 1,
+ 'decoder_func': 'DoUniform1uiv',
+ 'unit_test': False,
'unsafe': True,
},
'Uniform2i': {'type': 'PUTXn', 'count': 2},
@@ -3497,11 +3500,14 @@ _FUNCTION_INFO = {
'Uniform2ui': {
'type': 'PUTXn',
'count': 2,
+ 'unit_test': False,
'unsafe': True,
},
'Uniform2uiv': {
'type': 'PUTn',
'count': 2,
+ 'decoder_func': 'DoUniform2uiv',
+ 'unit_test': False,
'unsafe': True,
},
'Uniform3i': {'type': 'PUTXn', 'count': 3},
@@ -3519,11 +3525,14 @@ _FUNCTION_INFO = {
'Uniform3ui': {
'type': 'PUTXn',
'count': 3,
+ 'unit_test': False,
'unsafe': True,
},
'Uniform3uiv': {
'type': 'PUTn',
'count': 3,
+ 'decoder_func': 'DoUniform3uiv',
+ 'unit_test': False,
'unsafe': True,
},
'Uniform4i': {'type': 'PUTXn', 'count': 4},
@@ -3541,11 +3550,14 @@ _FUNCTION_INFO = {
'Uniform4ui': {
'type': 'PUTXn',
'count': 4,
+ 'unit_test': False,
'unsafe': True,
},
'Uniform4uiv': {
'type': 'PUTn',
'count': 4,
+ 'decoder_func': 'DoUniform4uiv',
+ 'unit_test': False,
'unsafe': True,
},
'UniformMatrix2fv': {
@@ -7726,13 +7738,7 @@ class PUTXnHandler(ArrayArgTypeHandler):
def WriteHandlerImplementation(self, func, f):
"""Overrriden from TypeHandler."""
- code = """ %(type)s temp[%(count)s] = { %(values)s};"""
- if func.IsUnsafe():
- code += """
- gl%(name)sv(%(location)s, 1, &temp[0]);
-"""
- else:
- code += """
+ code = """ %(type)s temp[%(count)s] = { %(values)s};
Do%(name)sv(%(location)s, 1, &temp[0]);
"""
values = ""
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698