summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/build_gles2_cmd_buffer.py
diff options
context:
space:
mode:
authorskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-04 17:12:02 +0000
committerskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-04 17:12:02 +0000
commitfcf1e7bef3c4c727998ee7e058a2d9b4249f5c70 (patch)
treea493b4c7a9c1b6158630311f8e005ea5c5065ff0 /gpu/command_buffer/build_gles2_cmd_buffer.py
parent1dd8c4036c596bc9ad7c45a6f16d9c1f1a8bdff4 (diff)
downloadchromium_src-fcf1e7bef3c4c727998ee7e058a2d9b4249f5c70.zip
chromium_src-fcf1e7bef3c4c727998ee7e058a2d9b4249f5c70.tar.gz
chromium_src-fcf1e7bef3c4c727998ee7e058a2d9b4249f5c70.tar.bz2
gpu: Make pack/unpack alignment part of autogenerated state
This patch makes GL_PACK_ALIGNMENT and GL_UNPACK_ALIGNMENT part of the autogenerated GL state. Review URL: https://chromiumcodereview.appspot.com/16240016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203990 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.py24
1 files changed, 20 insertions, 4 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 9bc5823..ba91dc0 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -361,10 +361,26 @@ _STATES = {
}
],
},
+ 'PixelStore': {
+ 'type': 'NamedParameter',
+ 'func': 'PixelStorei',
+ 'states': [
+ {
+ 'name': 'pack_alignment',
+ 'type': 'GLint',
+ 'enum': 'GL_PACK_ALIGNMENT',
+ 'default': '4'
+ },
+ {
+ 'name': 'unpack_alignment',
+ 'type': 'GLint',
+ 'enum': 'GL_UNPACK_ALIGNMENT',
+ 'default': '4'
+ }
+ ],
+ },
# TODO: Consider implemenenting these states
- # GL_ACTIVE_TEXTURE,
- # GL_PACK_ALIGNMENT,
- # GL_UNPACK_ALIGNMENT
+ # GL_ACTIVE_TEXTURE
'LineWidth': {
'type': 'Normal',
'func': 'LineWidth',
@@ -7031,7 +7047,7 @@ bool %s::GetStateAs%s(
GLenum pname, %s* params, GLsizei* num_written) const {
switch (pname) {
""" % (class_name, gl_type, gl_type))
- for state_name in _STATES.keys():
+ for state_name in sorted(_STATES.keys()):
state = _STATES[state_name]
if 'enum' in state:
file.Write(" case %s:\n" % state['enum'])