summaryrefslogtreecommitdiff
path: root/chromium/gpu/command_buffer/docs/gles2_cmd_format_docs.txt
blob: 67306abe2dbc5348c56f33bb712201a20614a116 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
//! \file
//!
//! The public interface for 3D graphics is based on a command buffer.
//!
//! This was chosen because it provides an easy way to separate the process of
//! writing commands from the process of reading those commands without
//! requiring too much overhead to keep the two processes in sync.
//!
//! You can use this info to write commands yourself. Most developers will use
//! the provided OpenGL ES 2.0 implementation that issues these commands for
//! them.
//!
//! Each command starts with a header. The header is 32 bits, where the first 21
//! bits define the number of 32 bit entries, including the header, the command
//! represents. The last 11 bits specify the command.
//!
//! Commands that send a variable amount of data have 1 to 3 ways to send that
//! data.
//!
//! Many commands can send their data in shared memory. The command will take
//! an id of the shared memory and an offset into that shared memory of where
//! the data lives. Commands are executed asynchronously, so the client
//! program must be careful to leave the data available until the command has
//! executed.
//!
//! Some commands have an 'immediate' version where the data appears directly
//! after the command in memory.
//!
//! A 3rd way of passing data is through Buckets. Buckets are identified by
//! number. You create a bucket with the command SetBucketSize, you can then
//! fill the bucket with SetBucketData commands. Once you've sent all your
//! data you can then issue a command that uses the bucket and takes a bucket
//! id for which bucket to use.
//!
//! Receiving data works similarly. Some commands return their data to shared
//! memory. Other commands return their data through buckets which can then be
//! queried with the GetBucketSize and GetBucketData commands. In either case
//! the data will not be available until the command executes.
//!
//! All commands and arguments are validated. If a command fails validation the
//! service will stop processing commands. It is the responsibility of the
//! client to never issue an invalid command.
//!
//! Examples of invalid commands.
//!  - A command's size does not match the command.
//!  - A command's size would address memory outside the command buffer
//!  - A shared memory id is invalid
//!  - A shared memory offset is out of range for the given shared memory
//!  - The size of the data a command would access in shared memory is out of
//!    range for the given shared memory buffer.
//!  - A result (in the transfer buffer) is not initialized to the
//!    failure case. For example, any command that returns a SizedResult
//!    will take a shared memory id and offset to where to store the result.
//!    That size field of the result must be set to 0 before issuing the
//!    the command. That way, if the command buffer service fails the
//!    client will see a 0 size.
//!
//! The docs are a little terse. For any command that corresponds to an OpenGL
//! ES 2.0 function the arguments should be clear by looking at the OpenGL ES
//! 2.0 documentation with minor caveats.
//!
//!  - Client side arrays are not supported at the command buffer level
//!    so DrawArrays and VertexAttribPointer only take offsets into buffers.
//!  - The commands GenBuffers, GetTextures, CreateProgram, CreateShader, etc
//!    take client side ids and register them with the service. It's up to the
//!    client to make up the ids.
//!  - For shared resources, it's still up to the client to make up ids.
//!    but to help keep them in sync with other threads the commands
//!    GenSharedIds, RegisterSharedIds and DeleteSharedIds can be used.
//!

//! The command header.
struct CommandHeader {
  Uint32 size:21;
  Uint32 command:11;
};


//! Used for some glGetXXX commands that return a result through a pointer. We
//! need to know if the command succeeded or not and the size of the result. If
//! the command failed its result size will 0.  You must set the size to 0
//! before issuing the command.
//!
//! To retrieve the data you might do something like this pseudo code:
//!
//!   GetAttachedShaders::Result* result = address-of-shared-memory
//!   int num_results = result->size / sizeof(GLuint);  // the type returned
//!   GLuint* results = &result->data;
//!   for (int ii = 0; ii < num_results; ++ii) {
//!     printf("%d\n", results[ii]);
//!   }
//!
template <typename T>
struct SizedResult {
  uint32 size;  // in bytes.
  T data;  // this is just here to get an offset.
};


//! A Noop command.
struct Noop {
  static const CommandId kCmdId = 0;

  CommandHeader header;
};

//! The SetToken command puts a token in the command stream that you can
//! use to check if that token has been passed in the command stream.
struct SetToken {
  static const CommandId kCmdId = 1;

  CommandHeader header;
  uint32 token;
};

//! The Jump command jumps to another place in the command buffer.
struct Jump {
  static const CommandId kCmdId = 3;

  CommandHeader header;
  uint32 offset;
};

//! The JumpRelative command jumps to another place in the command buffer
//! relative to the end of this command. In other words. JumpRelative with an
//! offset of zero is effectively a no-op.
struct JumpRelative {
  static const CommandId kCmdId = 4;

  CommandHeader header;
  int32 offset;
};

//! The Call command jumps to a subroutine which can be returned from with the
//! Return command.
struct Call {
  static const CommandId kCmdId = 5;

  CommandHeader header;
  uint32 offset;
};

//! The CallRelative command jumps to a subroutine using a relative offset. The
//! offset is relative to the end of this command..
struct CallRelative {
  static const CommandId kCmdId = 6;

  CommandHeader header;
  int32 offset;
};

//! Returns from a subroutine called by the Call or CallRelative commands.
struct Return {
  static const CommandId kCmdId = 7;

  CommandHeader header;
};

//! Sets the size of a bucket for collecting data on the service side.
//! This is a utility for gathering data on the service side so it can be used
//! all at once when some service side API is called. It removes the need to
//! add special commands just to support a particular API. For example, any API
//! command that needs a string needs a way to send that string to the API over
//! the command buffers. While you can require that the command buffer or
//! transfer buffer be large enough to hold the largest string you can send,
//! using this command removes that restriction by letting you send smaller
//! pieces over and build up the data on the service side.
//!
//! You can clear a bucket on the service side and thereby free memory by
//! sending a size of 0.
struct SetBucketSize {
  static const CommandId kCmdId = 8;

  CommandHeader header;
  uint32 bucket_id;
  uint32 size;
};

//! Sets the contents of a portion of a bucket on the service side from data in
//! shared memory.
//! See SetBucketSize.
struct SetBucketData {
  static const CommandId kCmdId = 9;

  CommandHeader header;
  uint32 bucket_id;
  uint32 offset;
  uint32 size;
  uint32 shared_memory_id;
  uint32 shared_memory_offset;
};

//! Sets the contents of a portion of a bucket on the service side from data in
//! the command buffer.
//! See SetBucketSize.
struct SetBucketDataImmediate {
  static const CommandId kCmdId = 10;

  CommandHeader header;
  uint32 bucket_id;
  uint32 offset;
  uint32 size;
};

//! Gets the size of a bucket the service has available. Sending a variable
//! size result back to the client, for example any API that returns a string,
//! is problematic since the largest thing you can send back is the size of
//! your shared memory. This command along with GetBucketData implements a way
//! to get a result a piece at a time to help solve that problem in a generic
//! way.
struct GetBucketSize {
  static const CommandId kCmdId = 11;

  typedef uint32 Result;

  CommandHeader header;
  uint32 bucket_id;
  uint32 shared_memory_id;
  uint32 shared_memory_offset;
};

//! Gets a piece of a result the service has available.
//! See GetBucketSize.
struct GetBucketData {
  static const CommandId kCmdId = 12;

  CommandHeader header;
  uint32 bucket_id;
  uint32 offset;
  uint32 size;
  uint32 shared_memory_id;
  uint32 shared_memory_offset;
};

// OpenGL ES 2.0 related commands.

//! Command that corresponds to glActiveTexture.
struct ActiveTexture {
  static const CommandId kCmdId = 256;

  CommandHeader header;
  uint32 texture;  //!< GLenum
};

//! Command that corresponds to glAttachShader.
struct AttachShader {
  static const CommandId kCmdId = 257;

  CommandHeader header;
  uint32 program;  //!< GLuint
  uint32 shader;  //!< GLuint
};

//! Command that corresponds to glBindAttribLocation.
struct BindAttribLocation {
  static const CommandId kCmdId = 258;

  CommandHeader header;
  uint32 program;  //!< GLuint
  uint32 index;  //!< GLuint
  uint32 name_shm_id;  //!< uint32
  uint32 name_shm_offset;  //!< uint32
  uint32 data_size;  //!< uint32
};

//! Immediate version of command that corresponds to glBindAttribLocation.
struct BindAttribLocationImmediate {
  static const CommandId kCmdId = 259;

  CommandHeader header;
  uint32 program;  //!< GLuint
  uint32 index;  //!< GLuint
  uint32 data_size;  //!< uint32
};

//! Bucket version of command that corresponds to glBindAttribLocation.
struct BindAttribLocationBucket {
  static const CommandId kCmdId = 432;

  CommandHeader header;
  uint32 program;  //!< GLuint
  uint32 index;  //!< GLuint
  uint32 name_bucket_id;  //!< uint32
};

//! Command that corresponds to glBindBuffer.
struct BindBuffer {
  static const CommandId kCmdId = 260;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 buffer;  //!< GLuint
};

//! Command that corresponds to glBindFramebuffer.
struct BindFramebuffer {
  static const CommandId kCmdId = 261;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 framebuffer;  //!< GLuint
};

//! Command that corresponds to glBindRenderbuffer.
struct BindRenderbuffer {
  static const CommandId kCmdId = 262;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 renderbuffer;  //!< GLuint
};

//! Command that corresponds to glBindTexture.
struct BindTexture {
  static const CommandId kCmdId = 263;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 texture;  //!< GLuint
};

//! Command that corresponds to glBlendColor.
struct BlendColor {
  static const CommandId kCmdId = 264;

  CommandHeader header;
  float red;  //!< GLclampf
  float green;  //!< GLclampf
  float blue;  //!< GLclampf
  float alpha;  //!< GLclampf
};

//! Command that corresponds to glBlendEquation.
struct BlendEquation {
  static const CommandId kCmdId = 265;

  CommandHeader header;
  uint32 mode;  //!< GLenum
};

//! Command that corresponds to glBlendEquationSeparate.
struct BlendEquationSeparate {
  static const CommandId kCmdId = 266;

  CommandHeader header;
  uint32 modeRGB;  //!< GLenum
  uint32 modeAlpha;  //!< GLenum
};

//! Command that corresponds to glBlendFunc.
struct BlendFunc {
  static const CommandId kCmdId = 267;

  CommandHeader header;
  uint32 sfactor;  //!< GLenum
  uint32 dfactor;  //!< GLenum
};

//! Command that corresponds to glBlendFuncSeparate.
struct BlendFuncSeparate {
  static const CommandId kCmdId = 268;

  CommandHeader header;
  uint32 srcRGB;  //!< GLenum
  uint32 dstRGB;  //!< GLenum
  uint32 srcAlpha;  //!< GLenum
  uint32 dstAlpha;  //!< GLenum
};

//! Command that corresponds to glBufferData.
struct BufferData {
  static const CommandId kCmdId = 269;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 size;  //!< GLsizeiptr
  uint32 data_shm_id;  //!< uint32
  uint32 data_shm_offset;  //!< uint32
  uint32 usage;  //!< GLenum
};

//! Immediate version of command that corresponds to glBufferData.
struct BufferDataImmediate {
  static const CommandId kCmdId = 270;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 size;  //!< GLsizeiptr
  uint32 usage;  //!< GLenum
};

//! Command that corresponds to glBufferSubData.
struct BufferSubData {
  static const CommandId kCmdId = 271;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 offset;  //!< GLintptr
  int32 size;  //!< GLsizeiptr
  uint32 data_shm_id;  //!< uint32
  uint32 data_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glBufferSubData.
struct BufferSubDataImmediate {
  static const CommandId kCmdId = 272;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 offset;  //!< GLintptr
  int32 size;  //!< GLsizeiptr
};

//! Command that corresponds to glCheckFramebufferStatus.
struct CheckFramebufferStatus {
  static const CommandId kCmdId = 273;

  typedef GLenum Result;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that corresponds to glClear.
struct Clear {
  static const CommandId kCmdId = 274;

  CommandHeader header;
  uint32 mask;  //!< GLbitfield
};

//! Command that corresponds to glClearColor.
struct ClearColor {
  static const CommandId kCmdId = 275;

  CommandHeader header;
  float red;  //!< GLclampf
  float green;  //!< GLclampf
  float blue;  //!< GLclampf
  float alpha;  //!< GLclampf
};

//! Command that corresponds to glClearDepthf.
struct ClearDepthf {
  static const CommandId kCmdId = 276;

  CommandHeader header;
  float depth;  //!< GLclampf
};

//! Command that corresponds to glClearStencil.
struct ClearStencil {
  static const CommandId kCmdId = 277;

  CommandHeader header;
  int32 s;  //!< GLint
};

//! Command that corresponds to glColorMask.
struct ColorMask {
  static const CommandId kCmdId = 278;

  CommandHeader header;
  uint32 red;  //!< GLboolean
  uint32 green;  //!< GLboolean
  uint32 blue;  //!< GLboolean
  uint32 alpha;  //!< GLboolean
};

//! Command that corresponds to glCompileShader.
struct CompileShader {
  static const CommandId kCmdId = 279;

  CommandHeader header;
  uint32 shader;  //!< GLuint
};

//! Command that corresponds to glCompressedTexImage2D.
struct CompressedTexImage2D {
  static const CommandId kCmdId = 280;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 level;  //!< GLint
  uint32 internalformat;  //!< GLenum
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
  int32 border;  //!< GLint
  int32 imageSize;  //!< GLsizei
  uint32 data_shm_id;  //!< uint32
  uint32 data_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glCompressedTexImage2D.
struct CompressedTexImage2DImmediate {
  static const CommandId kCmdId = 281;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 level;  //!< GLint
  uint32 internalformat;  //!< GLenum
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
  int32 border;  //!< GLint
  int32 imageSize;  //!< GLsizei
};

//! Bucket version of command that corresponds to glCompressedTexImage2D.
struct CompressedTexImage2DBucket {
  static const CommandId kCmdId = 443;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 level;  //!< GLint
  uint32 internalformat;  //!< GLenum
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
  int32 border;  //!< GLint
  uint32 bucket_id;  //!< GLuint
};

//! Command that corresponds to glCompressedTexSubImage2D.
struct CompressedTexSubImage2D {
  static const CommandId kCmdId = 282;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 level;  //!< GLint
  int32 xoffset;  //!< GLint
  int32 yoffset;  //!< GLint
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
  uint32 format;  //!< GLenum
  int32 imageSize;  //!< GLsizei
  uint32 data_shm_id;  //!< uint32
  uint32 data_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glCompressedTexSubImage2D.
struct CompressedTexSubImage2DImmediate {
  static const CommandId kCmdId = 283;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 level;  //!< GLint
  int32 xoffset;  //!< GLint
  int32 yoffset;  //!< GLint
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
  uint32 format;  //!< GLenum
  int32 imageSize;  //!< GLsizei
};

//! Bucket version of command that corresponds to glCompressedTexSubImage2D.
struct CompressedTexSubImage2DBucket {
  static const CommandId kCmdId = 444;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 level;  //!< GLint
  int32 xoffset;  //!< GLint
  int32 yoffset;  //!< GLint
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
  uint32 format;  //!< GLenum
  uint32 bucket_id;  //!< GLuint
};

//! Command that corresponds to glCopyTexImage2D.
struct CopyTexImage2D {
  static const CommandId kCmdId = 284;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 level;  //!< GLint
  uint32 internalformat;  //!< GLenum
  int32 x;  //!< GLint
  int32 y;  //!< GLint
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
  int32 border;  //!< GLint
};

//! Command that corresponds to glCopyTexSubImage2D.
struct CopyTexSubImage2D {
  static const CommandId kCmdId = 285;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 level;  //!< GLint
  int32 xoffset;  //!< GLint
  int32 yoffset;  //!< GLint
  int32 x;  //!< GLint
  int32 y;  //!< GLint
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
};

//! Command that corresponds to glCreateProgram.
struct CreateProgram {
  static const CommandId kCmdId = 286;

  CommandHeader header;
  uint32 client_id;  //!< uint32
};

//! Command that corresponds to glCreateShader.
struct CreateShader {
  static const CommandId kCmdId = 287;

  CommandHeader header;
  uint32 type;  //!< GLenum
  uint32 client_id;  //!< uint32
};

//! Command that corresponds to glCullFace.
struct CullFace {
  static const CommandId kCmdId = 288;

  CommandHeader header;
  uint32 mode;  //!< GLenum
};

//! Command that corresponds to glDeleteBuffers.
struct DeleteBuffers {
  static const CommandId kCmdId = 289;

  CommandHeader header;
  int32 n;  //!< GLsizei
  uint32 buffers_shm_id;  //!< uint32
  uint32 buffers_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glDeleteBuffers.
struct DeleteBuffersImmediate {
  static const CommandId kCmdId = 290;

  CommandHeader header;
  int32 n;  //!< GLsizei
};

//! Command that corresponds to glDeleteFramebuffers.
struct DeleteFramebuffers {
  static const CommandId kCmdId = 291;

  CommandHeader header;
  int32 n;  //!< GLsizei
  uint32 framebuffers_shm_id;  //!< uint32
  uint32 framebuffers_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glDeleteFramebuffers.
struct DeleteFramebuffersImmediate {
  static const CommandId kCmdId = 292;

  CommandHeader header;
  int32 n;  //!< GLsizei
};

//! Command that corresponds to glDeleteProgram.
struct DeleteProgram {
  static const CommandId kCmdId = 293;

  CommandHeader header;
  uint32 program;  //!< GLuint
};

//! Command that corresponds to glDeleteRenderbuffers.
struct DeleteRenderbuffers {
  static const CommandId kCmdId = 294;

  CommandHeader header;
  int32 n;  //!< GLsizei
  uint32 renderbuffers_shm_id;  //!< uint32
  uint32 renderbuffers_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glDeleteRenderbuffers.
struct DeleteRenderbuffersImmediate {
  static const CommandId kCmdId = 295;

  CommandHeader header;
  int32 n;  //!< GLsizei
};

//! Command that corresponds to glDeleteShader.
struct DeleteShader {
  static const CommandId kCmdId = 296;

  CommandHeader header;
  uint32 shader;  //!< GLuint
};

//! Command that corresponds to glDeleteTextures.
struct DeleteTextures {
  static const CommandId kCmdId = 297;

  CommandHeader header;
  int32 n;  //!< GLsizei
  uint32 textures_shm_id;  //!< uint32
  uint32 textures_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glDeleteTextures.
struct DeleteTexturesImmediate {
  static const CommandId kCmdId = 298;

  CommandHeader header;
  int32 n;  //!< GLsizei
};

//! Command that corresponds to glDepthFunc.
struct DepthFunc {
  static const CommandId kCmdId = 299;

  CommandHeader header;
  uint32 func;  //!< GLenum
};

//! Command that corresponds to glDepthMask.
struct DepthMask {
  static const CommandId kCmdId = 300;

  CommandHeader header;
  uint32 flag;  //!< GLboolean
};

//! Command that corresponds to glDepthRangef.
struct DepthRangef {
  static const CommandId kCmdId = 301;

  CommandHeader header;
  float zNear;  //!< GLclampf
  float zFar;  //!< GLclampf
};

//! Command that corresponds to glDetachShader.
struct DetachShader {
  static const CommandId kCmdId = 302;

  CommandHeader header;
  uint32 program;  //!< GLuint
  uint32 shader;  //!< GLuint
};

//! Command that corresponds to glDisable.
struct Disable {
  static const CommandId kCmdId = 303;

  CommandHeader header;
  uint32 cap;  //!< GLenum
};

//! Command that corresponds to glDisableVertexAttribArray.
struct DisableVertexAttribArray {
  static const CommandId kCmdId = 304;

  CommandHeader header;
  uint32 index;  //!< GLuint
};

//! Command that corresponds to glDrawArrays.
struct DrawArrays {
  static const CommandId kCmdId = 305;

  CommandHeader header;
  uint32 mode;  //!< GLenum
  int32 first;  //!< GLint
  int32 count;  //!< GLsizei
};

//! Command that corresponds to glDrawElements.
struct DrawElements {
  static const CommandId kCmdId = 306;

  CommandHeader header;
  uint32 mode;  //!< GLenum
  int32 count;  //!< GLsizei
  uint32 type;  //!< GLenum
  uint32 index_offset;  //!< GLuint
};

//! Command that corresponds to glEnable.
struct Enable {
  static const CommandId kCmdId = 307;

  CommandHeader header;
  uint32 cap;  //!< GLenum
};

//! Command that corresponds to glEnableVertexAttribArray.
struct EnableVertexAttribArray {
  static const CommandId kCmdId = 308;

  CommandHeader header;
  uint32 index;  //!< GLuint
};

//! Command that corresponds to glFinish.
struct Finish {
  static const CommandId kCmdId = 309;

  CommandHeader header;
};

//! Command that corresponds to glFlush.
struct Flush {
  static const CommandId kCmdId = 310;

  CommandHeader header;
};

//! Command that corresponds to glFramebufferRenderbuffer.
struct FramebufferRenderbuffer {
  static const CommandId kCmdId = 311;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 attachment;  //!< GLenum
  uint32 renderbuffertarget;  //!< GLenum
  uint32 renderbuffer;  //!< GLuint
};

//! Command that corresponds to glFramebufferTexture2D.
struct FramebufferTexture2D {
  static const CommandId kCmdId = 312;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 attachment;  //!< GLenum
  uint32 textarget;  //!< GLenum
  uint32 texture;  //!< GLuint
  int32 level;  //!< GLint
};

//! Command that corresponds to glFrontFace.
struct FrontFace {
  static const CommandId kCmdId = 313;

  CommandHeader header;
  uint32 mode;  //!< GLenum
};

//! Command that corresponds to glGenBuffers.
struct GenBuffers {
  static const CommandId kCmdId = 314;

  CommandHeader header;
  int32 n;  //!< GLsizei
  uint32 buffers_shm_id;  //!< uint32
  uint32 buffers_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glGenBuffers.
struct GenBuffersImmediate {
  static const CommandId kCmdId = 315;

  CommandHeader header;
  int32 n;  //!< GLsizei
};

//! Command that corresponds to glGenerateMipmap.
struct GenerateMipmap {
  static const CommandId kCmdId = 316;

  CommandHeader header;
  uint32 target;  //!< GLenum
};

//! Command that corresponds to glGenFramebuffers.
struct GenFramebuffers {
  static const CommandId kCmdId = 317;

  CommandHeader header;
  int32 n;  //!< GLsizei
  uint32 framebuffers_shm_id;  //!< uint32
  uint32 framebuffers_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glGenFramebuffers.
struct GenFramebuffersImmediate {
  static const CommandId kCmdId = 318;

  CommandHeader header;
  int32 n;  //!< GLsizei
};

//! Command that corresponds to glGenRenderbuffers.
struct GenRenderbuffers {
  static const CommandId kCmdId = 319;

  CommandHeader header;
  int32 n;  //!< GLsizei
  uint32 renderbuffers_shm_id;  //!< uint32
  uint32 renderbuffers_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glGenRenderbuffers.
struct GenRenderbuffersImmediate {
  static const CommandId kCmdId = 320;

  CommandHeader header;
  int32 n;  //!< GLsizei
};

//! Command that corresponds to glGenTextures.
struct GenTextures {
  static const CommandId kCmdId = 321;

  CommandHeader header;
  int32 n;  //!< GLsizei
  uint32 textures_shm_id;  //!< uint32
  uint32 textures_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glGenTextures.
struct GenTexturesImmediate {
  static const CommandId kCmdId = 322;

  CommandHeader header;
  int32 n;  //!< GLsizei
};

//! Command that corresponds to glGetActiveAttrib.
struct GetActiveAttrib {
  static const CommandId kCmdId = 323;

  struct Result {
    int32 success;
    int32 size;
    uint32 type;
  };

  CommandHeader header;
  uint32 program;  //!< GLuint
  uint32 index;  //!< GLuint
  uint32 name_bucket_id;  //!< uint32
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetActiveUniform.
struct GetActiveUniform {
  static const CommandId kCmdId = 324;

  struct Result {
    int32 success;
    int32 size;
    uint32 type;
  };

  CommandHeader header;
  uint32 program;  //!< GLuint
  uint32 index;  //!< GLuint
  uint32 name_bucket_id;  //!< uint32
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetAttachedShaders.
struct GetAttachedShaders {
  static const CommandId kCmdId = 325;

  typedef SizedResult<GLuint> Result;

  CommandHeader header;
  uint32 program;  //!< GLuint
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
  uint32 result_size;  //!< uint32
};

//! Command that corresponds to glGetAttribLocation.
struct GetAttribLocation {
  static const CommandId kCmdId = 326;

  typedef GLint Result;

  CommandHeader header;
  uint32 program;
  uint32 name_shm_id;
  uint32 name_shm_offset;
  uint32 location_shm_id;
  uint32 location_shm_offset;
  uint32 data_size;
};

//! Immediate version of command that corresponds to glGetAttribLocation.
struct GetAttribLocationImmediate {
  static const CommandId kCmdId = 327;

  typedef GLint Result;

  CommandHeader header;
  uint32 program;
  uint32 location_shm_id;
  uint32 location_shm_offset;
  uint32 data_size;
};

//! Bucket version of command that corresponds to glGetAttribLocation.
struct GetAttribLocationBucket {
  static const CommandId kCmdId = 434;

  typedef GLint Result;

  CommandHeader header;
  uint32 program;
  uint32 name_bucket_id;
  uint32 location_shm_id;
  uint32 location_shm_offset;
};

//! Command that corresponds to glGetBooleanv.
struct GetBooleanv {
  static const CommandId kCmdId = 328;

  typedef SizedResult<GLboolean> Result;

  CommandHeader header;
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetBufferParameteriv.
struct GetBufferParameteriv {
  static const CommandId kCmdId = 329;

  typedef SizedResult<GLint> Result;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetError.
struct GetError {
  static const CommandId kCmdId = 330;

  typedef GLenum Result;

  CommandHeader header;
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetFloatv.
struct GetFloatv {
  static const CommandId kCmdId = 331;

  typedef SizedResult<GLfloat> Result;

  CommandHeader header;
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetFramebufferAttachmentParameteriv.
struct GetFramebufferAttachmentParameteriv {
  static const CommandId kCmdId = 332;

  typedef SizedResult<GLint> Result;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 attachment;  //!< GLenum
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetIntegerv.
struct GetIntegerv {
  static const CommandId kCmdId = 333;

  typedef SizedResult<GLint> Result;

  CommandHeader header;
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetProgramiv.
struct GetProgramiv {
  static const CommandId kCmdId = 334;

  typedef SizedResult<GLint> Result;

  CommandHeader header;
  uint32 program;  //!< GLuint
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetProgramInfoLog.
struct GetProgramInfoLog {
  static const CommandId kCmdId = 335;

  CommandHeader header;
  uint32 program;  //!< GLuint
  uint32 bucket_id;  //!< uint32
};

//! Command that corresponds to glGetRenderbufferParameteriv.
struct GetRenderbufferParameteriv {
  static const CommandId kCmdId = 336;

  typedef SizedResult<GLint> Result;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetShaderiv.
struct GetShaderiv {
  static const CommandId kCmdId = 337;

  typedef SizedResult<GLint> Result;

  CommandHeader header;
  uint32 shader;  //!< GLuint
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetShaderInfoLog.
struct GetShaderInfoLog {
  static const CommandId kCmdId = 338;

  CommandHeader header;
  uint32 shader;  //!< GLuint
  uint32 bucket_id;  //!< uint32
};

//! Command that corresponds to glGetShaderPrecisionFormat.
struct GetShaderPrecisionFormat {
  static const CommandId kCmdId = 339;

  struct Result {
    int32 success;
    int32 min_range;
    int32 max_range;
    int32 precision;
  };

  CommandHeader header;
  uint32 shadertype;  //!< GLenum
  uint32 precisiontype;  //!< GLenum
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetShaderSource.
struct GetShaderSource {
  static const CommandId kCmdId = 340;

  CommandHeader header;
  uint32 shader;  //!< GLuint
  uint32 bucket_id;  //!< uint32
};

//! Command that corresponds to glGetString.
struct GetString {
  static const CommandId kCmdId = 341;

  CommandHeader header;
  uint32 name;  //!< GLenum
  uint32 bucket_id;  //!< uint32
};

//! Command that corresponds to glGetTexParameterfv.
struct GetTexParameterfv {
  static const CommandId kCmdId = 342;

  typedef SizedResult<GLfloat> Result;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetTexParameteriv.
struct GetTexParameteriv {
  static const CommandId kCmdId = 343;

  typedef SizedResult<GLint> Result;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetUniformLocation.
struct GetUniformLocation {
  static const CommandId kCmdId = 346;

  typedef GLint Result;

  CommandHeader header;
  uint32 program;
  uint32 name_shm_id;
  uint32 name_shm_offset;
  uint32 location_shm_id;
  uint32 location_shm_offset;
  uint32 data_size;
};

//! Immediate version of command that corresponds to glGetUniformLocation.
struct GetUniformLocationImmediate {
  static const CommandId kCmdId = 347;

  typedef GLint Result;

  CommandHeader header;
  uint32 program;
  uint32 location_shm_id;
  uint32 location_shm_offset;
  uint32 data_size;
};

//! Bucket version of command that corresponds to glGetUniformLocation.
struct GetUniformLocationBucket {
  static const CommandId kCmdId = 433;

  typedef GLint Result;

  CommandHeader header;
  uint32 program;
  uint32 name_bucket_id;
  uint32 location_shm_id;
  uint32 location_shm_offset;
};


//! Command that corresponds to glGetUniformfv.
struct GetUniformfv {
  static const CommandId kCmdId = 344;

  typedef SizedResult<GLfloat> Result;

  CommandHeader header;
  uint32 program;  //!< GLuint
  int32 location;  //!< GLint
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetUniformiv.
struct GetUniformiv {
  static const CommandId kCmdId = 345;

  typedef SizedResult<GLint> Result;

  CommandHeader header;
  uint32 program;  //!< GLuint
  int32 location;  //!< GLint
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetVertexAttribfv.
struct GetVertexAttribfv {
  static const CommandId kCmdId = 348;

  typedef SizedResult<GLfloat> Result;

  CommandHeader header;
  uint32 index;  //!< GLuint
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetVertexAttribiv.
struct GetVertexAttribiv {
  static const CommandId kCmdId = 349;

  typedef SizedResult<GLint> Result;

  CommandHeader header;
  uint32 index;  //!< GLuint
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Command that corresponds to glGetVertexAttribPointerv.
struct GetVertexAttribPointerv {
  static const CommandId kCmdId = 350;

  typedef SizedResult<GLuint> Result;

  CommandHeader header;
  uint32 index;  //!< GLuint
  uint32 pname;  //!< GLenum
  uint32 pointer_shm_id;  //!< uint32
  uint32 pointer_shm_offset;  //!< uint32
};

//! Command that corresponds to glHint.
struct Hint {
  static const CommandId kCmdId = 351;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 mode;  //!< GLenum
};

//! Command that corresponds to glIsBuffer.
struct IsBuffer {
  static const CommandId kCmdId = 352;

  typedef uint32 Result;

  CommandHeader header;
  uint32 buffer;  //!< GLuint
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that corresponds to glIsEnabled.
struct IsEnabled {
  static const CommandId kCmdId = 353;

  typedef uint32 Result;

  CommandHeader header;
  uint32 cap;  //!< GLenum
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that corresponds to glIsFramebuffer.
struct IsFramebuffer {
  static const CommandId kCmdId = 354;

  typedef uint32 Result;

  CommandHeader header;
  uint32 framebuffer;  //!< GLuint
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that corresponds to glIsProgram.
struct IsProgram {
  static const CommandId kCmdId = 355;

  typedef uint32 Result;

  CommandHeader header;
  uint32 program;  //!< GLuint
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that corresponds to glIsRenderbuffer.
struct IsRenderbuffer {
  static const CommandId kCmdId = 356;

  typedef uint32 Result;

  CommandHeader header;
  uint32 renderbuffer;  //!< GLuint
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that corresponds to glIsShader.
struct IsShader {
  static const CommandId kCmdId = 357;

  typedef uint32 Result;

  CommandHeader header;
  uint32 shader;  //!< GLuint
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that corresponds to glIsTexture.
struct IsTexture {
  static const CommandId kCmdId = 358;

  typedef uint32 Result;

  CommandHeader header;
  uint32 texture;  //!< GLuint
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that corresponds to glLineWidth.
struct LineWidth {
  static const CommandId kCmdId = 359;

  CommandHeader header;
  float width;  //!< GLfloat
};

//! Command that corresponds to glLinkProgram.
struct LinkProgram {
  static const CommandId kCmdId = 360;

  CommandHeader header;
  uint32 program;  //!< GLuint
};

//! Command that corresponds to glPixelStorei.
struct PixelStorei {
  static const CommandId kCmdId = 361;

  CommandHeader header;
  uint32 pname;  //!< GLenum
  int32 param;  //!< GLint
};

//! Command that corresponds to glPolygonOffset.
struct PolygonOffset {
  static const CommandId kCmdId = 362;

  CommandHeader header;
  float factor;  //!< GLfloat
  float units;  //!< GLfloat
};

//! Command that corresponds to glReadPixels.
//! ReadPixels has the result separated from the pixel buffer so that
//! it is easier to specify the result going to some specific place
//! that exactly fits the rectangle of pixels.
struct ReadPixels {
  static const CommandId kCmdId = 363;

  typedef uint32 Result;

  CommandHeader header;
  int32 x;  //!< GLint
  int32 y;  //!< GLint
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
  uint32 format;  //!< GLenum
  uint32 type;  //!< GLenum
  uint32 pixels_shm_id;  //!< uint32
  uint32 pixels_shm_offset;  //!< uint32
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that corresponds to glReleaseShaderCompiler.
struct ReleaseShaderCompiler {
  static const CommandId kCmdId = 437;

  CommandHeader header;
};

//! Command that corresponds to glRenderbufferStorage.
struct RenderbufferStorage {
  static const CommandId kCmdId = 364;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 internalformat;  //!< GLenum
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
};

//! Command that corresponds to glSampleCoverage.
struct SampleCoverage {
  static const CommandId kCmdId = 365;

  CommandHeader header;
  float value;  //!< GLclampf
  uint32 invert;  //!< GLboolean
};

//! Command that corresponds to glScissor.
struct Scissor {
  static const CommandId kCmdId = 366;

  CommandHeader header;
  int32 x;  //!< GLint
  int32 y;  //!< GLint
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
};

//! Command that corresponds to glShaderBinary.
struct ShaderBinary {
  static const CommandId kCmdId = 436;

  CommandHeader header;
  int32 n;  //!< GLsizei
  uint32 shaders_shm_id;  //!< uint32
  uint32 shaders_shm_offset;  //!< uint32
  uint32 binaryformat;  //!< GLenum
  uint32 binary_shm_id;  //!< uint32
  uint32 binary_shm_offset;  //!< uint32
  int32 length;  //!< GLsizei
};

//! Command that corresponds to glShaderSource.
struct ShaderSource {
  static const CommandId kCmdId = 367;

  CommandHeader header;
  uint32 shader;  //!< GLuint
  uint32 data_shm_id;  //!< uint32
  uint32 data_shm_offset;  //!< uint32
  uint32 data_size;  //!< uint32
};

//! Immediate version of command that corresponds to glShaderSource.
struct ShaderSourceImmediate {
  static const CommandId kCmdId = 368;

  CommandHeader header;
  uint32 shader;  //!< GLuint
  uint32 data_size;  //!< uint32
};

//! Bucket version of command that corresponds to glShaderSource.
struct ShaderSourceBucket {
  static const CommandId kCmdId = 435;

  CommandHeader header;
  uint32 shader;  //!< GLuint
  uint32 data_bucket_id;  //!< uint32
};

//! Command that corresponds to glStencilFunc.
struct StencilFunc {
  static const CommandId kCmdId = 369;

  CommandHeader header;
  uint32 func;  //!< GLenum
  int32 ref;  //!< GLint
  uint32 mask;  //!< GLuint
};

//! Command that corresponds to glStencilFuncSeparate.
struct StencilFuncSeparate {
  static const CommandId kCmdId = 370;

  CommandHeader header;
  uint32 face;  //!< GLenum
  uint32 func;  //!< GLenum
  int32 ref;  //!< GLint
  uint32 mask;  //!< GLuint
};

//! Command that corresponds to glStencilMask.
struct StencilMask {
  static const CommandId kCmdId = 371;

  CommandHeader header;
  uint32 mask;  //!< GLuint
};

//! Command that corresponds to glStencilMaskSeparate.
struct StencilMaskSeparate {
  static const CommandId kCmdId = 372;

  CommandHeader header;
  uint32 face;  //!< GLenum
  uint32 mask;  //!< GLuint
};

//! Command that corresponds to glStencilOp.
struct StencilOp {
  static const CommandId kCmdId = 373;

  CommandHeader header;
  uint32 fail;  //!< GLenum
  uint32 zfail;  //!< GLenum
  uint32 zpass;  //!< GLenum
};

//! Command that corresponds to glStencilOpSeparate.
struct StencilOpSeparate {
  static const CommandId kCmdId = 374;

  CommandHeader header;
  uint32 face;  //!< GLenum
  uint32 fail;  //!< GLenum
  uint32 zfail;  //!< GLenum
  uint32 zpass;  //!< GLenum
};

//! Command that corresponds to glTexImage2D.
struct TexImage2D {
  static const CommandId kCmdId = 375;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 level;  //!< GLint
  int32 internalformat;  //!< GLint
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
  int32 border;  //!< GLint
  uint32 format;  //!< GLenum
  uint32 type;  //!< GLenum
  uint32 pixels_shm_id;  //!< uint32
  uint32 pixels_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glTexImage2D.
struct TexImage2DImmediate {
  static const CommandId kCmdId = 376;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 level;  //!< GLint
  int32 internalformat;  //!< GLint
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
  int32 border;  //!< GLint
  uint32 format;  //!< GLenum
  uint32 type;  //!< GLenum
};

//! Command that corresponds to glTexParameterf.
struct TexParameterf {
  static const CommandId kCmdId = 377;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 pname;  //!< GLenum
  float param;  //!< GLfloat
};

//! Command that corresponds to glTexParameterfv.
struct TexParameterfv {
  static const CommandId kCmdId = 378;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glTexParameterfv.
struct TexParameterfvImmediate {
  static const CommandId kCmdId = 379;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 pname;  //!< GLenum
};

//! Command that corresponds to glTexParameteri.
struct TexParameteri {
  static const CommandId kCmdId = 380;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 pname;  //!< GLenum
  int32 param;  //!< GLint
};

//! Command that corresponds to glTexParameteriv.
struct TexParameteriv {
  static const CommandId kCmdId = 381;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 pname;  //!< GLenum
  uint32 params_shm_id;  //!< uint32
  uint32 params_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glTexParameteriv.
struct TexParameterivImmediate {
  static const CommandId kCmdId = 382;

  CommandHeader header;
  uint32 target;  //!< GLenum
  uint32 pname;  //!< GLenum
};

//! Command that corresponds to glTexSubImage2D.
struct TexSubImage2D {
  static const CommandId kCmdId = 383;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 level;  //!< GLint
  int32 xoffset;  //!< GLint
  int32 yoffset;  //!< GLint
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
  uint32 format;  //!< GLenum
  uint32 type;  //!< GLenum
  uint32 pixels_shm_id;  //!< uint32
  uint32 pixels_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glTexSubImage2D.
struct TexSubImage2DImmediate {
  static const CommandId kCmdId = 384;

  CommandHeader header;
  uint32 target;  //!< GLenum
  int32 level;  //!< GLint
  int32 xoffset;  //!< GLint
  int32 yoffset;  //!< GLint
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
  uint32 format;  //!< GLenum
  uint32 type;  //!< GLenum
};

//! Command that corresponds to glUniform1f.
struct Uniform1f {
  static const CommandId kCmdId = 385;

  CommandHeader header;
  int32 location;  //!< GLint
  float x;  //!< GLfloat
};

//! Command that corresponds to glUniform1fv.
struct Uniform1fv {
  static const CommandId kCmdId = 386;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 v_shm_id;  //!< uint32
  uint32 v_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glUniform1fv.
struct Uniform1fvImmediate {
  static const CommandId kCmdId = 387;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
};

//! Command that corresponds to glUniform1i.
struct Uniform1i {
  static const CommandId kCmdId = 388;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 x;  //!< GLint
};

//! Command that corresponds to glUniform1iv.
struct Uniform1iv {
  static const CommandId kCmdId = 389;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 v_shm_id;  //!< uint32
  uint32 v_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glUniform1iv.
struct Uniform1ivImmediate {
  static const CommandId kCmdId = 390;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
};

//! Command that corresponds to glUniform2f.
struct Uniform2f {
  static const CommandId kCmdId = 391;

  CommandHeader header;
  int32 location;  //!< GLint
  float x;  //!< GLfloat
  float y;  //!< GLfloat
};

//! Command that corresponds to glUniform2fv.
struct Uniform2fv {
  static const CommandId kCmdId = 392;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 v_shm_id;  //!< uint32
  uint32 v_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glUniform2fv.
struct Uniform2fvImmediate {
  static const CommandId kCmdId = 393;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
};

//! Command that corresponds to glUniform2i.
struct Uniform2i {
  static const CommandId kCmdId = 394;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 x;  //!< GLint
  int32 y;  //!< GLint
};

//! Command that corresponds to glUniform2iv.
struct Uniform2iv {
  static const CommandId kCmdId = 395;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 v_shm_id;  //!< uint32
  uint32 v_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glUniform2iv.
struct Uniform2ivImmediate {
  static const CommandId kCmdId = 396;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
};

//! Command that corresponds to glUniform3f.
struct Uniform3f {
  static const CommandId kCmdId = 397;

  CommandHeader header;
  int32 location;  //!< GLint
  float x;  //!< GLfloat
  float y;  //!< GLfloat
  float z;  //!< GLfloat
};

//! Command that corresponds to glUniform3fv.
struct Uniform3fv {
  static const CommandId kCmdId = 398;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 v_shm_id;  //!< uint32
  uint32 v_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glUniform3fv.
struct Uniform3fvImmediate {
  static const CommandId kCmdId = 399;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
};

//! Command that corresponds to glUniform3i.
struct Uniform3i {
  static const CommandId kCmdId = 400;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 x;  //!< GLint
  int32 y;  //!< GLint
  int32 z;  //!< GLint
};

//! Command that corresponds to glUniform3iv.
struct Uniform3iv {
  static const CommandId kCmdId = 401;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 v_shm_id;  //!< uint32
  uint32 v_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glUniform3iv.
struct Uniform3ivImmediate {
  static const CommandId kCmdId = 402;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
};

//! Command that corresponds to glUniform4f.
struct Uniform4f {
  static const CommandId kCmdId = 403;

  CommandHeader header;
  int32 location;  //!< GLint
  float x;  //!< GLfloat
  float y;  //!< GLfloat
  float z;  //!< GLfloat
  float w;  //!< GLfloat
};

//! Command that corresponds to glUniform4fv.
struct Uniform4fv {
  static const CommandId kCmdId = 404;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 v_shm_id;  //!< uint32
  uint32 v_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glUniform4fv.
struct Uniform4fvImmediate {
  static const CommandId kCmdId = 405;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
};

//! Command that corresponds to glUniform4i.
struct Uniform4i {
  static const CommandId kCmdId = 406;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 x;  //!< GLint
  int32 y;  //!< GLint
  int32 z;  //!< GLint
  int32 w;  //!< GLint
};

//! Command that corresponds to glUniform4iv.
struct Uniform4iv {
  static const CommandId kCmdId = 407;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 v_shm_id;  //!< uint32
  uint32 v_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glUniform4iv.
struct Uniform4ivImmediate {
  static const CommandId kCmdId = 408;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
};

//! Command that corresponds to glUniformMatrix2fv.
struct UniformMatrix2fv {
  static const CommandId kCmdId = 409;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 transpose;  //!< GLboolean
  uint32 value_shm_id;  //!< uint32
  uint32 value_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glUniformMatrix2fv.
struct UniformMatrix2fvImmediate {
  static const CommandId kCmdId = 410;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 transpose;  //!< GLboolean
};

//! Command that corresponds to glUniformMatrix3fv.
struct UniformMatrix3fv {
  static const CommandId kCmdId = 411;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 transpose;  //!< GLboolean
  uint32 value_shm_id;  //!< uint32
  uint32 value_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glUniformMatrix3fv.
struct UniformMatrix3fvImmediate {
  static const CommandId kCmdId = 412;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 transpose;  //!< GLboolean
};

//! Command that corresponds to glUniformMatrix4fv.
struct UniformMatrix4fv {
  static const CommandId kCmdId = 413;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 transpose;  //!< GLboolean
  uint32 value_shm_id;  //!< uint32
  uint32 value_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glUniformMatrix4fv.
struct UniformMatrix4fvImmediate {
  static const CommandId kCmdId = 414;

  CommandHeader header;
  int32 location;  //!< GLint
  int32 count;  //!< GLsizei
  uint32 transpose;  //!< GLboolean
};

//! Command that corresponds to glUseProgram.
struct UseProgram {
  static const CommandId kCmdId = 415;

  CommandHeader header;
  uint32 program;  //!< GLuint
};

//! Command that corresponds to glValidateProgram.
struct ValidateProgram {
  static const CommandId kCmdId = 416;

  CommandHeader header;
  uint32 program;  //!< GLuint
};

//! Command that corresponds to glVertexAttrib1f.
struct VertexAttrib1f {
  static const CommandId kCmdId = 417;

  CommandHeader header;
  uint32 indx;  //!< GLuint
  float x;  //!< GLfloat
};

//! Command that corresponds to glVertexAttrib1fv.
struct VertexAttrib1fv {
  static const CommandId kCmdId = 418;

  CommandHeader header;
  uint32 indx;  //!< GLuint
  uint32 values_shm_id;  //!< uint32
  uint32 values_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glVertexAttrib1fv.
struct VertexAttrib1fvImmediate {
  static const CommandId kCmdId = 419;

  CommandHeader header;
  uint32 indx;  //!< GLuint
};

//! Command that corresponds to glVertexAttrib2f.
struct VertexAttrib2f {
  static const CommandId kCmdId = 420;

  CommandHeader header;
  uint32 indx;  //!< GLuint
  float x;  //!< GLfloat
  float y;  //!< GLfloat
};

//! Command that corresponds to glVertexAttrib2fv.
struct VertexAttrib2fv {
  static const CommandId kCmdId = 421;

  CommandHeader header;
  uint32 indx;  //!< GLuint
  uint32 values_shm_id;  //!< uint32
  uint32 values_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glVertexAttrib2fv.
struct VertexAttrib2fvImmediate {
  static const CommandId kCmdId = 422;

  CommandHeader header;
  uint32 indx;  //!< GLuint
};

//! Command that corresponds to glVertexAttrib3f.
struct VertexAttrib3f {
  static const CommandId kCmdId = 423;

  CommandHeader header;
  uint32 indx;  //!< GLuint
  float x;  //!< GLfloat
  float y;  //!< GLfloat
  float z;  //!< GLfloat
};

//! Command that corresponds to glVertexAttrib3fv.
struct VertexAttrib3fv {
  static const CommandId kCmdId = 424;

  CommandHeader header;
  uint32 indx;  //!< GLuint
  uint32 values_shm_id;  //!< uint32
  uint32 values_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glVertexAttrib3fv.
struct VertexAttrib3fvImmediate {
  static const CommandId kCmdId = 425;

  CommandHeader header;
  uint32 indx;  //!< GLuint
};

//! Command that corresponds to glVertexAttrib4f.
struct VertexAttrib4f {
  static const CommandId kCmdId = 426;

  CommandHeader header;
  uint32 indx;  //!< GLuint
  float x;  //!< GLfloat
  float y;  //!< GLfloat
  float z;  //!< GLfloat
  float w;  //!< GLfloat
};

//! Command that corresponds to glVertexAttrib4fv.
struct VertexAttrib4fv {
  static const CommandId kCmdId = 427;

  CommandHeader header;
  uint32 indx;  //!< GLuint
  uint32 values_shm_id;  //!< uint32
  uint32 values_shm_offset;  //!< uint32
};

//! Immediate version of command that corresponds to glVertexAttrib4fv.
struct VertexAttrib4fvImmediate {
  static const CommandId kCmdId = 428;

  CommandHeader header;
  uint32 indx;  //!< GLuint
};

//! Command that corresponds to glVertexAttribPointer.
struct VertexAttribPointer {
  static const CommandId kCmdId = 429;

  CommandHeader header;
  uint32 indx;  //!< GLuint
  int32 size;  //!< GLint
  uint32 type;  //!< GLenum
  uint32 normalized;  //!< GLboolean
  int32 stride;  //!< GLsizei
  uint32 offset;  //!< GLuint
};

//! Command that corresponds to glViewport.
struct Viewport {
  static const CommandId kCmdId = 430;

  CommandHeader header;
  int32 x;  //!< GLint
  int32 y;  //!< GLint
  int32 width;  //!< GLsizei
  int32 height;  //!< GLsizei
};

//! Command that corresponds to SwapBuffers.
struct SwapBuffers {
  static const CommandId kCmdId = 431;

  CommandHeader header;
};

//! Command that corresponds to GetMaxValueInBuffer.
struct GetMaxValueInBuffer {
  static const CommandId kCmdId = 436;

  typedef GLuint Result;

  CommandHeader header;
  uint32 buffer_id;  //!< GLuint
  int32 count;  //!< GLsizei
  uint32 type;  //!< GLenum
  uint32 offset;  //!< GLuint
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};

//! Command that generates shared ids for contexts that share resources.
struct GenSharedIds {
  static const CommandId kCmdId = 439;

  CommandHeader header;
  uint32 namespace_id;  //!< GLuint
  uint32 id_offset;  //!< GLuint
  int32 n;  //!< GLsizei
  uint32 ids_shm_id;  //!< uint32
  uint32 ids_shm_offset;  //!< uint32
};

//! Command that deletes shared ids.
struct DeleteSharedIds {
  static const CommandId kCmdId = 440;

  CommandHeader header;
  uint32 namespace_id;  //!< GLuint
  int32 n;  //!< GLsizei
  uint32 ids_shm_id;  //!< uint32
  uint32 ids_shm_offset;  //!< uint32
};

//! Command that registers shared ids. It is an error to attempt
//! to register an id that is already registered.
struct RegisterSharedIds {
  static const CommandId kCmdId = 441;

  CommandHeader header;
  uint32 namespace_id;  //!< GLuint
  int32 n;  //!< GLsizei
  uint32 ids_shm_id;  //!< uint32
  uint32 ids_shm_offset;  //!< uint32
};

//! Command that enables features. The bucket should contain the feature string.
struct CommandBufferEnable {
  static const CommandId kCmdId = 442;

  typedef GLint Result;

  CommandHeader header;
  uint32 bucket_id;  //!< GLuint
  uint32 result_shm_id;  //!< uint32
  uint32 result_shm_offset;  //!< uint32
};