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

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 10635011: Add glBindUniformLocationCHROMIUM (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
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 aec198480699f7a659164e3b9bfef2b071ca0f9f..d3417d86b2e423561e562757410b8754a01a6bfb 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -1701,11 +1701,11 @@ _FUNCTION_INFO = {
'gl_test_func': 'glGetQueryObjectuiv',
'pepper_interface': 'Query',
},
- 'GetUniformLocationsCHROMIUM': {
- 'gen_cmd': False,
- 'extension': True,
- 'chromium': True,
- 'client_test': False,
+ 'BindUniformLocationCHROMIUM': {
+ 'type': 'GLchar',
+ 'bucket': True,
+ 'needs_size': True,
+ 'gl_test_func': 'DoBindUniformLocationCHROMIUM',
},
}
@@ -3837,9 +3837,7 @@ TEST_F(%(test_name)s, %(name)sValidArgsCountTooLarge) {
# the location of the second element of the 2nd uniform.
# defined in GLES2DecoderBase::SetupShaderForUniform
gl_arg_strings.append("3")
- arg_strings.append(
- "GLES2Util::SwizzleLocation("
- "GLES2Util::MakeFakeLocation(1, 1))")
+ arg_strings.append("ProgramManager::MakeFakeLocation(1, 1)")
elif count == 1:
# the number of elements that gl will be called with.
gl_arg_strings.append("3")
@@ -4695,14 +4693,13 @@ class UniformLocationArgument(Argument):
def WriteGetCode(self, file):
"""Writes the code to get an argument from a command structure."""
- code = """ %s %s = GLES2Util::UnswizzleLocation(
- static_cast<%s>(c.%s));
+ code = """ %s %s = static_cast<%s>(c.%s);
"""
file.Write(code % (self.type, self.name, self.type, self.name))
def GetValidArg(self, func, offset, index):
"""Gets a valid value for this argument."""
- return "GLES2Util::SwizzleLocation(%d)" % (offset + 1)
+ return "%d" % (offset + 1)
class DataSizeArgument(Argument):

Powered by Google App Engine
This is Rietveld 408576698