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

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 16240016: gpu: Make pack/unpack alignment part of autogenerated state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sort states. Created 7 years, 7 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/common/gles2_cmd_utils_implementation_autogen.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 9bc5823a1b9311ffd3917da1cfdff543f8ed3ac8..ba91dc0ffbd5faba7eed197711dd57763fa20fca 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'])
« no previous file with comments | « no previous file | gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698