summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/build_gles2_cmd_buffer.py
diff options
context:
space:
mode:
authorzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-05 00:09:36 +0000
committerzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-05 00:09:36 +0000
commitd6a53e4cba5710d51b1cab1f34d9f76a5fcf04c7 (patch)
treeb11e1e89beb1d7a49df291e99b2a0f253d0a61bf /gpu/command_buffer/build_gles2_cmd_buffer.py
parent439d75cecba1d3947b405c07b41e3986091b688b (diff)
downloadchromium_src-d6a53e4cba5710d51b1cab1f34d9f76a5fcf04c7.zip
chromium_src-d6a53e4cba5710d51b1cab1f34d9f76a5fcf04c7.tar.gz
chromium_src-d6a53e4cba5710d51b1cab1f34d9f76a5fcf04c7.tar.bz2
Implement 'ANGLE_translated_shader_source' extension in command-buffer.
This works with ANGLE r780. So if it's on top of ANGLE, query the translated HLSL using ANGLE's GetTranslatedShaderSource extension; otherwise, return the cached translated shader source from ANGLE shader translator. BUG=95531 TEST=unittest Review URL: http://codereview.chromium.org/8120020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104036 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/build_gles2_cmd_buffer.py')
-rwxr-xr-xgpu/command_buffer/build_gles2_cmd_buffer.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 00c152b..22d22a9 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -223,6 +223,7 @@ GL_APICALL void GL_APIENTRY glPlaceholder447CHROMIUM (void);
GL_APICALL GLuint GL_APIENTRY glCreateStreamTextureCHROMIUM (GLuint texture);
GL_APICALL void GL_APIENTRY glDestroyStreamTextureCHROMIUM (GLuint texture);
GL_APICALL void GL_APIENTRY glPlaceholder453CHROMIUM (void);
+GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLidShader shader, GLsizeiNotNegative bufsize, GLsizei* length, char* source);
"""
# This is the list of all commmands that will be generated and their Id.
@@ -431,6 +432,7 @@ _CMD_ID_TABLE = {
'Placeholder453CHROMIUM': 453,
'GetMultipleIntegervCHROMIUM': 454,
'GetProgramInfoCHROMIUM': 455,
+ 'GetTranslatedShaderSourceANGLE': 456,
}
# This is a list of enum names and their valid values. It is used to map
@@ -831,6 +833,7 @@ _ENUM_LISTS = {
'GL_COMPILE_STATUS',
'GL_INFO_LOG_LENGTH',
'GL_SHADER_SOURCE_LENGTH',
+ 'GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE',
],
},
'ShaderPrecision': {
@@ -1424,6 +1427,12 @@ _FUNCTION_INFO = {
},
'GetTexParameterfv': {'type': 'GETn', 'result': ['SizedResult<GLfloat>']},
'GetTexParameteriv': {'type': 'GETn', 'result': ['SizedResult<GLint>']},
+ 'GetTranslatedShaderSourceANGLE': {
+ 'type': 'STRn',
+ 'get_len_func': 'DoGetShaderiv',
+ 'get_len_enum': 'GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE',
+ 'unit_test': False,
+ },
'GetUniformfv': {
'type': 'Custom',
'immediate': False,
@@ -4169,7 +4178,8 @@ TEST_F(%(test_name)s, %(name)sInvalidArgsBadSharedMemoryId) {
class STRnHandler(TypeHandler):
- """Handler for GetProgramInfoLog, GetShaderInfoLog and GetShaderSource."""
+ """Handler for GetProgramInfoLog, GetShaderInfoLog, GetShaderSource, and
+ GetTranslatedShaderSourceANGLE."""
def __init__(self):
TypeHandler.__init__(self)