build_gles2_cmd_buffer.py 109 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203
  1. #!/usr/bin/env python3
  2. # Copyright (c) 2012 The Chromium Authors. All rights reserved.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. """code generator for GLES2 command buffers."""
  6. import filecmp
  7. import os
  8. import sys
  9. from optparse import OptionParser
  10. import build_cmd_buffer_lib
  11. # Additional space required after "type" here and elsewhere because otherwise
  12. # pylint detects "# type:" as invalid syntax on Python 3.8, see
  13. # https://github.com/PyCQA/pylint/issues/3556.
  14. # Named type info object represents a named type that is used in OpenGL call
  15. # arguments. Each named type defines a set of valid OpenGL call arguments. The
  16. # named types are used in 'gles2_cmd_buffer_functions.txt'.
  17. # type : The actual GL type of the named type.
  18. # valid: The list of values that are valid for both the client and the service.
  19. # valid_es3: The list of values that are valid in OpenGL ES 3, but not ES 2.
  20. # invalid: Examples of invalid values for the type. At least these values
  21. # should be tested to be invalid.
  22. # deprecated_es3: The list of values that are valid in OpenGL ES 2, but
  23. # deprecated in ES 3.
  24. # is_complete: The list of valid values of type are final and will not be
  25. # modified during runtime.
  26. # validator: If set to False will prevent creation of a ValueValidator. Values
  27. # are still expected to be checked for validity and will be tested.
  28. _NAMED_TYPE_INFO = {
  29. 'BlitFilter': {
  30. 'type': 'GLenum',
  31. 'is_complete': True,
  32. 'valid': [
  33. 'GL_NEAREST',
  34. 'GL_LINEAR',
  35. ],
  36. 'invalid': [
  37. 'GL_LINEAR_MIPMAP_LINEAR',
  38. ],
  39. },
  40. 'CoverageModulationComponents': {
  41. 'type': 'GLenum',
  42. 'valid': [
  43. 'GL_RGB', 'GL_RGBA', 'GL_ALPHA', 'GL_NONE'
  44. ],
  45. },
  46. 'FramebufferTarget': {
  47. 'type': 'GLenum',
  48. 'valid': [
  49. 'GL_FRAMEBUFFER',
  50. ],
  51. 'valid_es3': [
  52. 'GL_DRAW_FRAMEBUFFER' ,
  53. 'GL_READ_FRAMEBUFFER' ,
  54. ],
  55. 'invalid': [
  56. 'GL_RENDERBUFFER',
  57. ],
  58. },
  59. 'RenderBufferTarget': {
  60. 'type': 'GLenum',
  61. 'valid': [
  62. 'GL_RENDERBUFFER',
  63. ],
  64. 'invalid': [
  65. 'GL_FRAMEBUFFER',
  66. ],
  67. },
  68. 'BufferTarget': {
  69. 'type': 'GLenum',
  70. 'is_complete': True,
  71. 'valid': [
  72. 'GL_ARRAY_BUFFER',
  73. 'GL_ELEMENT_ARRAY_BUFFER',
  74. ],
  75. 'valid_es3': [
  76. 'GL_COPY_READ_BUFFER',
  77. 'GL_COPY_WRITE_BUFFER',
  78. 'GL_PIXEL_PACK_BUFFER',
  79. 'GL_PIXEL_UNPACK_BUFFER',
  80. 'GL_TRANSFORM_FEEDBACK_BUFFER',
  81. 'GL_UNIFORM_BUFFER',
  82. ],
  83. 'invalid': [
  84. 'GL_RENDERBUFFER',
  85. ],
  86. },
  87. 'IndexedBufferTarget': {
  88. 'type': 'GLenum',
  89. 'is_complete': True,
  90. 'valid': [
  91. 'GL_TRANSFORM_FEEDBACK_BUFFER',
  92. 'GL_UNIFORM_BUFFER',
  93. ],
  94. 'invalid': [
  95. 'GL_RENDERBUFFER',
  96. ],
  97. },
  98. 'MapBufferAccess': {
  99. 'type': 'GLenum',
  100. 'is_complete': True,
  101. 'valid': [
  102. 'GL_MAP_READ_BIT',
  103. 'GL_MAP_WRITE_BIT',
  104. 'GL_MAP_INVALIDATE_RANGE_BIT',
  105. 'GL_MAP_INVALIDATE_BUFFER_BIT',
  106. 'GL_MAP_FLUSH_EXPLICIT_BIT',
  107. 'GL_MAP_UNSYNCHRONIZED_BIT',
  108. ],
  109. 'invalid': [
  110. 'GL_SYNC_FLUSH_COMMANDS_BIT',
  111. ],
  112. },
  113. 'Bufferiv': {
  114. 'type': 'GLenum',
  115. 'is_complete': True,
  116. 'valid': [
  117. 'GL_COLOR',
  118. 'GL_STENCIL',
  119. ],
  120. 'invalid': [
  121. 'GL_RENDERBUFFER',
  122. ],
  123. },
  124. 'Bufferuiv': {
  125. 'type': 'GLenum',
  126. 'valid': [
  127. 'GL_COLOR',
  128. ],
  129. 'invalid': [
  130. 'GL_RENDERBUFFER',
  131. ],
  132. },
  133. 'Bufferfv': {
  134. 'type': 'GLenum',
  135. 'is_complete': True,
  136. 'valid': [
  137. 'GL_COLOR',
  138. 'GL_DEPTH',
  139. ],
  140. 'invalid': [
  141. 'GL_RENDERBUFFER',
  142. ],
  143. },
  144. 'Bufferfi': {
  145. 'type': 'GLenum',
  146. 'valid': [
  147. 'GL_DEPTH_STENCIL',
  148. ],
  149. 'invalid': [
  150. 'GL_RENDERBUFFER',
  151. ],
  152. },
  153. 'BufferUsage': {
  154. 'type': 'GLenum',
  155. 'is_complete': True,
  156. 'valid': [
  157. 'GL_STREAM_DRAW',
  158. 'GL_STATIC_DRAW',
  159. 'GL_DYNAMIC_DRAW',
  160. ],
  161. 'valid_es3': [
  162. 'GL_STREAM_READ',
  163. 'GL_STREAM_COPY',
  164. 'GL_STATIC_READ',
  165. 'GL_STATIC_COPY',
  166. 'GL_DYNAMIC_READ',
  167. 'GL_DYNAMIC_COPY',
  168. ],
  169. 'invalid': [
  170. 'GL_NONE',
  171. ],
  172. },
  173. 'CompressedTextureFormat': {
  174. 'type': 'GLenum',
  175. 'valid': [
  176. ],
  177. 'valid_es3': [
  178. ],
  179. },
  180. 'GLState': {
  181. 'type': 'GLenum',
  182. 'valid': [
  183. # NOTE: State an Capability entries added later.
  184. 'GL_ACTIVE_TEXTURE',
  185. 'GL_ALIASED_LINE_WIDTH_RANGE',
  186. 'GL_ALIASED_POINT_SIZE_RANGE',
  187. 'GL_ALPHA_BITS',
  188. 'GL_ARRAY_BUFFER_BINDING',
  189. 'GL_BLUE_BITS',
  190. 'GL_COMPRESSED_TEXTURE_FORMATS',
  191. 'GL_CURRENT_PROGRAM',
  192. 'GL_DEPTH_BITS',
  193. 'GL_DEPTH_RANGE',
  194. 'GL_ELEMENT_ARRAY_BUFFER_BINDING',
  195. 'GL_FRAMEBUFFER_BINDING',
  196. 'GL_GENERATE_MIPMAP_HINT',
  197. 'GL_GREEN_BITS',
  198. 'GL_IMPLEMENTATION_COLOR_READ_FORMAT',
  199. 'GL_IMPLEMENTATION_COLOR_READ_TYPE',
  200. 'GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS',
  201. 'GL_MAX_CUBE_MAP_TEXTURE_SIZE',
  202. 'GL_MAX_FRAGMENT_UNIFORM_VECTORS',
  203. 'GL_MAX_RENDERBUFFER_SIZE',
  204. 'GL_MAX_TEXTURE_IMAGE_UNITS',
  205. 'GL_MAX_TEXTURE_SIZE',
  206. 'GL_MAX_VARYING_VECTORS',
  207. 'GL_MAX_VERTEX_ATTRIBS',
  208. 'GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS',
  209. 'GL_MAX_VERTEX_UNIFORM_VECTORS',
  210. 'GL_MAX_VIEWPORT_DIMS',
  211. 'GL_NUM_COMPRESSED_TEXTURE_FORMATS',
  212. 'GL_NUM_SHADER_BINARY_FORMATS',
  213. 'GL_PACK_ALIGNMENT',
  214. 'GL_RED_BITS',
  215. 'GL_RENDERBUFFER_BINDING',
  216. 'GL_SAMPLE_BUFFERS',
  217. 'GL_SAMPLE_COVERAGE_INVERT',
  218. 'GL_SAMPLE_COVERAGE_VALUE',
  219. 'GL_SAMPLES',
  220. 'GL_SCISSOR_BOX',
  221. 'GL_SHADER_BINARY_FORMATS',
  222. 'GL_SHADER_COMPILER',
  223. 'GL_SUBPIXEL_BITS',
  224. 'GL_STENCIL_BITS',
  225. 'GL_TEXTURE_BINDING_2D',
  226. 'GL_TEXTURE_BINDING_CUBE_MAP',
  227. 'GL_TEXTURE_FILTERING_HINT_CHROMIUM',
  228. 'GL_UNPACK_ALIGNMENT',
  229. 'GL_BIND_GENERATES_RESOURCE_CHROMIUM',
  230. # we can add this because we emulate it if the driver does not support it.
  231. 'GL_VERTEX_ARRAY_BINDING_OES',
  232. 'GL_VIEWPORT',
  233. ],
  234. 'valid_es3': [
  235. 'GL_COPY_READ_BUFFER_BINDING',
  236. 'GL_COPY_WRITE_BUFFER_BINDING',
  237. 'GL_DRAW_BUFFER0',
  238. 'GL_DRAW_BUFFER1',
  239. 'GL_DRAW_BUFFER2',
  240. 'GL_DRAW_BUFFER3',
  241. 'GL_DRAW_BUFFER4',
  242. 'GL_DRAW_BUFFER5',
  243. 'GL_DRAW_BUFFER6',
  244. 'GL_DRAW_BUFFER7',
  245. 'GL_DRAW_BUFFER8',
  246. 'GL_DRAW_BUFFER9',
  247. 'GL_DRAW_BUFFER10',
  248. 'GL_DRAW_BUFFER11',
  249. 'GL_DRAW_BUFFER12',
  250. 'GL_DRAW_BUFFER13',
  251. 'GL_DRAW_BUFFER14',
  252. 'GL_DRAW_BUFFER15',
  253. 'GL_DRAW_FRAMEBUFFER_BINDING',
  254. 'GL_FRAGMENT_SHADER_DERIVATIVE_HINT',
  255. 'GL_GPU_DISJOINT_EXT',
  256. 'GL_MAJOR_VERSION',
  257. 'GL_MAX_3D_TEXTURE_SIZE',
  258. 'GL_MAX_ARRAY_TEXTURE_LAYERS',
  259. 'GL_MAX_COLOR_ATTACHMENTS',
  260. 'GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS',
  261. 'GL_MAX_COMBINED_UNIFORM_BLOCKS',
  262. 'GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS',
  263. 'GL_MAX_DRAW_BUFFERS',
  264. 'GL_MAX_ELEMENT_INDEX',
  265. 'GL_MAX_ELEMENTS_INDICES',
  266. 'GL_MAX_ELEMENTS_VERTICES',
  267. 'GL_MAX_FRAGMENT_INPUT_COMPONENTS',
  268. 'GL_MAX_FRAGMENT_UNIFORM_BLOCKS',
  269. 'GL_MAX_FRAGMENT_UNIFORM_COMPONENTS',
  270. 'GL_MAX_PROGRAM_TEXEL_OFFSET',
  271. 'GL_MAX_SAMPLES',
  272. 'GL_MAX_SERVER_WAIT_TIMEOUT',
  273. 'GL_MAX_TEXTURE_LOD_BIAS',
  274. 'GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS',
  275. 'GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS',
  276. 'GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS',
  277. 'GL_MAX_UNIFORM_BLOCK_SIZE',
  278. 'GL_MAX_UNIFORM_BUFFER_BINDINGS',
  279. 'GL_MAX_VARYING_COMPONENTS',
  280. 'GL_MAX_VERTEX_OUTPUT_COMPONENTS',
  281. 'GL_MAX_VERTEX_UNIFORM_BLOCKS',
  282. 'GL_MAX_VERTEX_UNIFORM_COMPONENTS',
  283. 'GL_MIN_PROGRAM_TEXEL_OFFSET',
  284. 'GL_MINOR_VERSION',
  285. 'GL_NUM_EXTENSIONS',
  286. 'GL_NUM_PROGRAM_BINARY_FORMATS',
  287. 'GL_PACK_ROW_LENGTH',
  288. 'GL_PACK_SKIP_PIXELS',
  289. 'GL_PACK_SKIP_ROWS',
  290. 'GL_PIXEL_PACK_BUFFER_BINDING',
  291. 'GL_PIXEL_UNPACK_BUFFER_BINDING',
  292. 'GL_PROGRAM_BINARY_FORMATS',
  293. 'GL_READ_BUFFER',
  294. 'GL_READ_FRAMEBUFFER_BINDING',
  295. 'GL_SAMPLER_BINDING',
  296. 'GL_TIMESTAMP_EXT',
  297. 'GL_TEXTURE_BINDING_2D_ARRAY',
  298. 'GL_TEXTURE_BINDING_3D',
  299. 'GL_TRANSFORM_FEEDBACK_BINDING',
  300. 'GL_TRANSFORM_FEEDBACK_ACTIVE',
  301. 'GL_TRANSFORM_FEEDBACK_BUFFER_BINDING',
  302. 'GL_TRANSFORM_FEEDBACK_PAUSED',
  303. 'GL_UNIFORM_BUFFER_BINDING',
  304. 'GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT',
  305. 'GL_UNPACK_IMAGE_HEIGHT',
  306. 'GL_UNPACK_ROW_LENGTH',
  307. 'GL_UNPACK_SKIP_IMAGES',
  308. 'GL_UNPACK_SKIP_PIXELS',
  309. 'GL_UNPACK_SKIP_ROWS',
  310. 'GL_BLEND_EQUATION_RGB',
  311. 'GL_BLEND_EQUATION_ALPHA',
  312. 'GL_BLEND_SRC_RGB',
  313. 'GL_BLEND_SRC_ALPHA',
  314. 'GL_BLEND_DST_RGB',
  315. 'GL_BLEND_DST_ALPHA',
  316. 'GL_COLOR_WRITEMASK',
  317. # GL_VERTEX_ARRAY_BINDING is the same as GL_VERTEX_ARRAY_BINDING_OES
  318. # 'GL_VERTEX_ARRAY_BINDING',
  319. ],
  320. 'invalid': [
  321. 'GL_FOG_HINT',
  322. ],
  323. },
  324. 'IndexedGLState': {
  325. 'type': 'GLenum',
  326. 'valid': [
  327. 'GL_TRANSFORM_FEEDBACK_BUFFER_BINDING',
  328. 'GL_TRANSFORM_FEEDBACK_BUFFER_SIZE',
  329. 'GL_TRANSFORM_FEEDBACK_BUFFER_START',
  330. 'GL_UNIFORM_BUFFER_BINDING',
  331. 'GL_UNIFORM_BUFFER_SIZE',
  332. 'GL_UNIFORM_BUFFER_START',
  333. 'GL_BLEND_EQUATION_RGB',
  334. 'GL_BLEND_EQUATION_ALPHA',
  335. 'GL_BLEND_SRC_RGB',
  336. 'GL_BLEND_SRC_ALPHA',
  337. 'GL_BLEND_DST_RGB',
  338. 'GL_BLEND_DST_ALPHA',
  339. 'GL_COLOR_WRITEMASK',
  340. ],
  341. 'invalid': [
  342. 'GL_FOG_HINT',
  343. ],
  344. },
  345. 'GetTexParamTarget': {
  346. 'type': 'GLenum',
  347. 'valid': [
  348. 'GL_TEXTURE_2D',
  349. 'GL_TEXTURE_CUBE_MAP',
  350. ],
  351. 'valid_es3': [
  352. 'GL_TEXTURE_2D_ARRAY',
  353. 'GL_TEXTURE_3D',
  354. ],
  355. 'invalid': [
  356. 'GL_PROXY_TEXTURE_CUBE_MAP',
  357. ]
  358. },
  359. 'ReadBuffer': {
  360. 'type': 'GLenum',
  361. 'valid': [
  362. 'GL_NONE',
  363. 'GL_BACK',
  364. 'GL_COLOR_ATTACHMENT0',
  365. 'GL_COLOR_ATTACHMENT1',
  366. 'GL_COLOR_ATTACHMENT2',
  367. 'GL_COLOR_ATTACHMENT3',
  368. 'GL_COLOR_ATTACHMENT4',
  369. 'GL_COLOR_ATTACHMENT5',
  370. 'GL_COLOR_ATTACHMENT6',
  371. 'GL_COLOR_ATTACHMENT7',
  372. 'GL_COLOR_ATTACHMENT8',
  373. 'GL_COLOR_ATTACHMENT9',
  374. 'GL_COLOR_ATTACHMENT10',
  375. 'GL_COLOR_ATTACHMENT11',
  376. 'GL_COLOR_ATTACHMENT12',
  377. 'GL_COLOR_ATTACHMENT13',
  378. 'GL_COLOR_ATTACHMENT14',
  379. 'GL_COLOR_ATTACHMENT15',
  380. ],
  381. 'invalid': [
  382. 'GL_RENDERBUFFER',
  383. ]
  384. },
  385. 'TextureTarget': {
  386. 'type': 'GLenum',
  387. 'valid': [
  388. 'GL_TEXTURE_2D',
  389. 'GL_TEXTURE_CUBE_MAP_POSITIVE_X',
  390. 'GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
  391. 'GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
  392. 'GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
  393. 'GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
  394. 'GL_TEXTURE_CUBE_MAP_NEGATIVE_Z',
  395. ],
  396. 'invalid': [
  397. 'GL_PROXY_TEXTURE_CUBE_MAP',
  398. ]
  399. },
  400. 'TextureFboTarget': {
  401. 'type': 'GLenum',
  402. 'valid': [
  403. 'GL_TEXTURE_2D',
  404. 'GL_TEXTURE_CUBE_MAP_POSITIVE_X',
  405. 'GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
  406. 'GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
  407. 'GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
  408. 'GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
  409. 'GL_TEXTURE_CUBE_MAP_NEGATIVE_Z',
  410. ],
  411. 'invalid': [
  412. 'GL_PROXY_TEXTURE_CUBE_MAP',
  413. ]
  414. },
  415. 'Texture3DTarget': {
  416. 'type': 'GLenum',
  417. 'is_complete': True,
  418. 'valid': [
  419. 'GL_TEXTURE_3D',
  420. 'GL_TEXTURE_2D_ARRAY',
  421. ],
  422. 'invalid': [
  423. 'GL_TEXTURE_2D',
  424. ]
  425. },
  426. 'TextureBindTarget': {
  427. 'type': 'GLenum',
  428. 'valid': [
  429. 'GL_TEXTURE_2D',
  430. 'GL_TEXTURE_CUBE_MAP',
  431. ],
  432. 'valid_es3': [
  433. 'GL_TEXTURE_3D',
  434. 'GL_TEXTURE_2D_ARRAY',
  435. ],
  436. 'invalid': [
  437. 'GL_TEXTURE_1D',
  438. 'GL_TEXTURE_3D',
  439. ],
  440. },
  441. 'TransformFeedbackBindTarget': {
  442. 'type': 'GLenum',
  443. 'valid': [
  444. 'GL_TRANSFORM_FEEDBACK',
  445. ],
  446. 'invalid': [
  447. 'GL_TEXTURE_2D',
  448. ],
  449. },
  450. 'TransformFeedbackPrimitiveMode': {
  451. 'type': 'GLenum',
  452. 'is_complete': True,
  453. 'valid': [
  454. 'GL_POINTS',
  455. 'GL_LINES',
  456. 'GL_TRIANGLES',
  457. ],
  458. 'invalid': [
  459. 'GL_LINE_LOOP',
  460. ],
  461. },
  462. 'ShaderType': {
  463. 'type': 'GLenum',
  464. 'is_complete': True,
  465. 'valid': [
  466. 'GL_VERTEX_SHADER',
  467. 'GL_FRAGMENT_SHADER',
  468. ],
  469. 'invalid': [
  470. 'GL_GEOMETRY_SHADER',
  471. ],
  472. },
  473. 'FaceType': {
  474. 'type': 'GLenum',
  475. 'is_complete': True,
  476. 'valid': [
  477. 'GL_FRONT',
  478. 'GL_BACK',
  479. 'GL_FRONT_AND_BACK',
  480. ],
  481. },
  482. 'FaceMode': {
  483. 'type': 'GLenum',
  484. 'is_complete': True,
  485. 'valid': [
  486. 'GL_CW',
  487. 'GL_CCW',
  488. ],
  489. },
  490. 'CmpFunction': {
  491. 'type': 'GLenum',
  492. 'is_complete': True,
  493. 'valid': [
  494. 'GL_NEVER',
  495. 'GL_LESS',
  496. 'GL_EQUAL',
  497. 'GL_LEQUAL',
  498. 'GL_GREATER',
  499. 'GL_NOTEQUAL',
  500. 'GL_GEQUAL',
  501. 'GL_ALWAYS',
  502. ],
  503. },
  504. 'Equation': {
  505. 'type': 'GLenum',
  506. 'valid': [
  507. 'GL_FUNC_ADD',
  508. 'GL_FUNC_SUBTRACT',
  509. 'GL_FUNC_REVERSE_SUBTRACT',
  510. ],
  511. 'valid_es3': [
  512. 'GL_MIN',
  513. 'GL_MAX',
  514. ],
  515. 'invalid': [
  516. 'GL_NONE',
  517. ],
  518. },
  519. 'SrcBlendFactor': {
  520. 'type': 'GLenum',
  521. 'valid': [
  522. 'GL_ZERO',
  523. 'GL_ONE',
  524. 'GL_SRC_COLOR',
  525. 'GL_ONE_MINUS_SRC_COLOR',
  526. 'GL_DST_COLOR',
  527. 'GL_ONE_MINUS_DST_COLOR',
  528. 'GL_SRC_ALPHA',
  529. 'GL_ONE_MINUS_SRC_ALPHA',
  530. 'GL_DST_ALPHA',
  531. 'GL_ONE_MINUS_DST_ALPHA',
  532. 'GL_CONSTANT_COLOR',
  533. 'GL_ONE_MINUS_CONSTANT_COLOR',
  534. 'GL_CONSTANT_ALPHA',
  535. 'GL_ONE_MINUS_CONSTANT_ALPHA',
  536. 'GL_SRC_ALPHA_SATURATE',
  537. ],
  538. },
  539. 'DstBlendFactor': {
  540. 'type': 'GLenum',
  541. 'valid': [
  542. 'GL_ZERO',
  543. 'GL_ONE',
  544. 'GL_SRC_COLOR',
  545. 'GL_ONE_MINUS_SRC_COLOR',
  546. 'GL_DST_COLOR',
  547. 'GL_ONE_MINUS_DST_COLOR',
  548. 'GL_SRC_ALPHA',
  549. 'GL_ONE_MINUS_SRC_ALPHA',
  550. 'GL_DST_ALPHA',
  551. 'GL_ONE_MINUS_DST_ALPHA',
  552. 'GL_CONSTANT_COLOR',
  553. 'GL_ONE_MINUS_CONSTANT_COLOR',
  554. 'GL_CONSTANT_ALPHA',
  555. 'GL_ONE_MINUS_CONSTANT_ALPHA',
  556. ],
  557. 'valid_es3': [
  558. 'GL_SRC_ALPHA_SATURATE'
  559. ]
  560. },
  561. 'Capability': {
  562. 'type': 'GLenum',
  563. 'valid': ["GL_%s" % cap['name'].upper()
  564. for cap in build_cmd_buffer_lib._CAPABILITY_FLAGS
  565. if ('es3' not in cap or cap['es3'] != True)
  566. and 'extension_flag' not in cap],
  567. 'valid_es3': ["GL_%s" % cap['name'].upper()
  568. for cap in build_cmd_buffer_lib._CAPABILITY_FLAGS
  569. if ('es3' in cap and cap['es3'] == True)
  570. and 'extension_flag' not in cap],
  571. 'invalid': [
  572. 'GL_CLIP_PLANE0',
  573. 'GL_POINT_SPRITE',
  574. ],
  575. },
  576. 'DrawMode': {
  577. 'type': 'GLenum',
  578. 'is_complete': True,
  579. 'valid': [
  580. 'GL_POINTS',
  581. 'GL_LINE_STRIP',
  582. 'GL_LINE_LOOP',
  583. 'GL_LINES',
  584. 'GL_TRIANGLE_STRIP',
  585. 'GL_TRIANGLE_FAN',
  586. 'GL_TRIANGLES',
  587. ],
  588. 'invalid': [
  589. 'GL_QUADS',
  590. 'GL_POLYGON',
  591. ],
  592. },
  593. 'IndexType': {
  594. 'type': 'GLenum',
  595. 'valid': [
  596. 'GL_UNSIGNED_BYTE',
  597. 'GL_UNSIGNED_SHORT',
  598. ],
  599. 'valid_es3': [
  600. 'GL_UNSIGNED_INT',
  601. ],
  602. 'invalid': [
  603. 'GL_INT',
  604. ],
  605. },
  606. 'GetMaxIndexType': {
  607. 'type': 'GLenum',
  608. 'is_complete': True,
  609. 'valid': [
  610. 'GL_UNSIGNED_BYTE',
  611. 'GL_UNSIGNED_SHORT',
  612. 'GL_UNSIGNED_INT',
  613. ],
  614. 'invalid': [
  615. 'GL_INT',
  616. ],
  617. },
  618. 'Attachment': {
  619. 'type': 'GLenum',
  620. 'valid': [
  621. 'GL_COLOR_ATTACHMENT0',
  622. 'GL_DEPTH_ATTACHMENT',
  623. 'GL_STENCIL_ATTACHMENT',
  624. ],
  625. 'valid_es3': [
  626. 'GL_DEPTH_STENCIL_ATTACHMENT',
  627. ],
  628. },
  629. 'AttachmentQuery': {
  630. 'type': 'GLenum',
  631. 'valid': [
  632. 'GL_COLOR_ATTACHMENT0',
  633. 'GL_DEPTH_ATTACHMENT',
  634. 'GL_STENCIL_ATTACHMENT',
  635. ],
  636. 'valid_es3': [
  637. 'GL_DEPTH_STENCIL_ATTACHMENT',
  638. # For backbuffer.
  639. 'GL_COLOR_EXT',
  640. 'GL_DEPTH_EXT',
  641. 'GL_STENCIL_EXT',
  642. ],
  643. },
  644. 'BackbufferAttachment': {
  645. 'type': 'GLenum',
  646. 'is_complete': True,
  647. 'valid': [
  648. 'GL_COLOR_EXT',
  649. 'GL_DEPTH_EXT',
  650. 'GL_STENCIL_EXT',
  651. ],
  652. },
  653. 'BufferParameter': {
  654. 'type': 'GLenum',
  655. 'is_complete': True,
  656. 'valid': [
  657. 'GL_BUFFER_SIZE',
  658. 'GL_BUFFER_USAGE',
  659. ],
  660. 'valid_es3': [
  661. 'GL_BUFFER_ACCESS_FLAGS',
  662. 'GL_BUFFER_MAPPED',
  663. ],
  664. 'invalid': [
  665. 'GL_PIXEL_PACK_BUFFER',
  666. ],
  667. },
  668. 'BufferParameter64': {
  669. 'type': 'GLenum',
  670. 'is_complete': True,
  671. 'valid': [
  672. 'GL_BUFFER_SIZE',
  673. 'GL_BUFFER_MAP_LENGTH',
  674. 'GL_BUFFER_MAP_OFFSET',
  675. ],
  676. 'invalid': [
  677. 'GL_PIXEL_PACK_BUFFER',
  678. ],
  679. },
  680. 'BufferMode': {
  681. 'type': 'GLenum',
  682. 'is_complete': True,
  683. 'valid': [
  684. 'GL_INTERLEAVED_ATTRIBS',
  685. 'GL_SEPARATE_ATTRIBS',
  686. ],
  687. 'invalid': [
  688. 'GL_PIXEL_PACK_BUFFER',
  689. ],
  690. },
  691. 'FramebufferAttachmentParameter': {
  692. 'type': 'GLenum',
  693. 'valid': [
  694. 'GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE',
  695. 'GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME',
  696. 'GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL',
  697. 'GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE',
  698. ],
  699. 'valid_es3': [
  700. 'GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE',
  701. 'GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE',
  702. 'GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE',
  703. 'GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE',
  704. 'GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE',
  705. 'GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE',
  706. 'GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE',
  707. 'GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING',
  708. 'GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER',
  709. ],
  710. },
  711. 'FramebufferParameter' : {
  712. 'type': 'GLenum',
  713. 'valid' : [],
  714. },
  715. 'ProgramParameter': {
  716. 'type': 'GLenum',
  717. 'valid': [
  718. 'GL_DELETE_STATUS',
  719. 'GL_LINK_STATUS',
  720. 'GL_VALIDATE_STATUS',
  721. 'GL_INFO_LOG_LENGTH',
  722. 'GL_ATTACHED_SHADERS',
  723. 'GL_ACTIVE_ATTRIBUTES',
  724. 'GL_ACTIVE_ATTRIBUTE_MAX_LENGTH',
  725. 'GL_ACTIVE_UNIFORMS',
  726. 'GL_ACTIVE_UNIFORM_MAX_LENGTH',
  727. ],
  728. 'valid_es3': [
  729. 'GL_ACTIVE_UNIFORM_BLOCKS',
  730. 'GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH',
  731. 'GL_TRANSFORM_FEEDBACK_BUFFER_MODE',
  732. 'GL_TRANSFORM_FEEDBACK_VARYINGS',
  733. 'GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH',
  734. ],
  735. 'invalid': [
  736. 'GL_PROGRAM_BINARY_RETRIEVABLE_HINT', # not supported in Chromium.
  737. ],
  738. },
  739. 'QueryObjectParameter': {
  740. 'type': 'GLenum',
  741. 'is_complete': True,
  742. 'valid': [
  743. 'GL_QUERY_RESULT_EXT',
  744. 'GL_QUERY_RESULT_AVAILABLE_EXT',
  745. 'GL_QUERY_RESULT_AVAILABLE_NO_FLUSH_CHROMIUM_EXT',
  746. ],
  747. },
  748. 'QueryParameter': {
  749. 'type': 'GLenum',
  750. 'is_complete': True,
  751. 'valid': [
  752. 'GL_CURRENT_QUERY_EXT',
  753. ],
  754. },
  755. 'QueryTarget': {
  756. 'type': 'GLenum',
  757. 'is_complete': True,
  758. 'valid': [
  759. 'GL_SAMPLES_PASSED_ARB',
  760. 'GL_ANY_SAMPLES_PASSED_EXT',
  761. 'GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT',
  762. 'GL_COMMANDS_ISSUED_CHROMIUM',
  763. 'GL_COMMANDS_ISSUED_TIMESTAMP_CHROMIUM',
  764. 'GL_LATENCY_QUERY_CHROMIUM',
  765. 'GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM',
  766. 'GL_COMMANDS_COMPLETED_CHROMIUM',
  767. 'GL_READBACK_SHADOW_COPIES_UPDATED_CHROMIUM',
  768. 'GL_PROGRAM_COMPLETION_QUERY_CHROMIUM',
  769. ],
  770. },
  771. 'RenderBufferParameter': {
  772. 'type': 'GLenum',
  773. 'valid': [
  774. 'GL_RENDERBUFFER_RED_SIZE',
  775. 'GL_RENDERBUFFER_GREEN_SIZE',
  776. 'GL_RENDERBUFFER_BLUE_SIZE',
  777. 'GL_RENDERBUFFER_ALPHA_SIZE',
  778. 'GL_RENDERBUFFER_DEPTH_SIZE',
  779. 'GL_RENDERBUFFER_STENCIL_SIZE',
  780. 'GL_RENDERBUFFER_WIDTH',
  781. 'GL_RENDERBUFFER_HEIGHT',
  782. 'GL_RENDERBUFFER_INTERNAL_FORMAT',
  783. ],
  784. 'valid_es3': [
  785. 'GL_RENDERBUFFER_SAMPLES',
  786. ],
  787. },
  788. 'InternalFormatParameter': {
  789. 'type': 'GLenum',
  790. 'is_complete': True,
  791. 'valid': [
  792. 'GL_NUM_SAMPLE_COUNTS',
  793. 'GL_SAMPLES',
  794. ],
  795. },
  796. 'SamplerParameter': {
  797. 'type': 'GLenum',
  798. 'valid': [
  799. 'GL_TEXTURE_MAG_FILTER',
  800. 'GL_TEXTURE_MIN_FILTER',
  801. 'GL_TEXTURE_MIN_LOD',
  802. 'GL_TEXTURE_MAX_LOD',
  803. 'GL_TEXTURE_WRAP_S',
  804. 'GL_TEXTURE_WRAP_T',
  805. 'GL_TEXTURE_WRAP_R',
  806. 'GL_TEXTURE_COMPARE_MODE',
  807. 'GL_TEXTURE_COMPARE_FUNC',
  808. ],
  809. 'invalid': [
  810. 'GL_GENERATE_MIPMAP',
  811. ],
  812. },
  813. 'ShaderParameter': {
  814. 'type': 'GLenum',
  815. 'valid': [
  816. 'GL_SHADER_TYPE',
  817. 'GL_DELETE_STATUS',
  818. 'GL_COMPILE_STATUS',
  819. 'GL_INFO_LOG_LENGTH',
  820. 'GL_SHADER_SOURCE_LENGTH',
  821. 'GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE',
  822. ],
  823. },
  824. 'ShaderPrecision': {
  825. 'type': 'GLenum',
  826. 'is_complete': True,
  827. 'valid': [
  828. 'GL_LOW_FLOAT',
  829. 'GL_MEDIUM_FLOAT',
  830. 'GL_HIGH_FLOAT',
  831. 'GL_LOW_INT',
  832. 'GL_MEDIUM_INT',
  833. 'GL_HIGH_INT',
  834. ],
  835. },
  836. 'StringType': {
  837. 'type': 'GLenum',
  838. 'is_complete': True,
  839. 'valid': [
  840. 'GL_VENDOR',
  841. 'GL_RENDERER',
  842. 'GL_VERSION',
  843. 'GL_SHADING_LANGUAGE_VERSION',
  844. 'GL_EXTENSIONS',
  845. ],
  846. },
  847. 'IndexedStringType': {
  848. 'type': 'GLenum',
  849. 'is_complete': True,
  850. 'valid': [
  851. 'GL_EXTENSIONS',
  852. ],
  853. },
  854. 'TextureParameter': {
  855. 'type': 'GLenum',
  856. 'valid': [
  857. 'GL_TEXTURE_MAG_FILTER',
  858. 'GL_TEXTURE_MIN_FILTER',
  859. 'GL_TEXTURE_WRAP_S',
  860. 'GL_TEXTURE_WRAP_T',
  861. ],
  862. 'valid_es3': [
  863. 'GL_TEXTURE_BASE_LEVEL',
  864. 'GL_TEXTURE_COMPARE_FUNC',
  865. 'GL_TEXTURE_COMPARE_MODE',
  866. 'GL_TEXTURE_IMMUTABLE_FORMAT',
  867. 'GL_TEXTURE_IMMUTABLE_LEVELS',
  868. 'GL_TEXTURE_MAX_LEVEL',
  869. 'GL_TEXTURE_MAX_LOD',
  870. 'GL_TEXTURE_MIN_LOD',
  871. 'GL_TEXTURE_WRAP_R',
  872. ],
  873. 'invalid': [
  874. 'GL_GENERATE_MIPMAP',
  875. ],
  876. },
  877. 'TextureWrapMode': {
  878. 'type': 'GLenum',
  879. 'is_complete': True,
  880. 'valid': [
  881. 'GL_CLAMP_TO_EDGE',
  882. 'GL_MIRRORED_REPEAT',
  883. 'GL_REPEAT',
  884. ],
  885. },
  886. 'TextureMinFilterMode': {
  887. 'type': 'GLenum',
  888. 'is_complete': True,
  889. 'valid': [
  890. 'GL_NEAREST',
  891. 'GL_LINEAR',
  892. 'GL_NEAREST_MIPMAP_NEAREST',
  893. 'GL_LINEAR_MIPMAP_NEAREST',
  894. 'GL_NEAREST_MIPMAP_LINEAR',
  895. 'GL_LINEAR_MIPMAP_LINEAR',
  896. ],
  897. },
  898. 'TextureMagFilterMode': {
  899. 'type': 'GLenum',
  900. 'is_complete': True,
  901. 'valid': [
  902. 'GL_NEAREST',
  903. 'GL_LINEAR',
  904. ],
  905. },
  906. 'TextureCompareFunc': {
  907. 'type': 'GLenum',
  908. 'is_complete': True,
  909. 'valid': [
  910. 'GL_LEQUAL',
  911. 'GL_GEQUAL',
  912. 'GL_LESS',
  913. 'GL_GREATER',
  914. 'GL_EQUAL',
  915. 'GL_NOTEQUAL',
  916. 'GL_ALWAYS',
  917. 'GL_NEVER',
  918. ],
  919. },
  920. 'TextureCompareMode': {
  921. 'type': 'GLenum',
  922. 'valid': [
  923. 'GL_NONE',
  924. 'GL_COMPARE_REF_TO_TEXTURE',
  925. ],
  926. },
  927. 'TextureSrgbDecodeExt': {
  928. 'type': 'GLenum',
  929. 'is_complete': True,
  930. 'valid': [
  931. 'GL_DECODE_EXT',
  932. 'GL_SKIP_DECODE_EXT',
  933. ],
  934. },
  935. 'TextureSwizzle': {
  936. 'type': 'GLenum',
  937. 'is_complete': True,
  938. 'valid': [
  939. 'GL_RED',
  940. 'GL_GREEN',
  941. 'GL_BLUE',
  942. 'GL_ALPHA',
  943. 'GL_ZERO',
  944. 'GL_ONE',
  945. ],
  946. },
  947. 'TextureUsage': {
  948. 'type': 'GLenum',
  949. 'is_complete': True,
  950. 'valid': [
  951. 'GL_NONE',
  952. 'GL_FRAMEBUFFER_ATTACHMENT_ANGLE',
  953. ],
  954. },
  955. 'VertexAttribute': {
  956. 'type': 'GLenum',
  957. 'valid': [
  958. # some enum that the decoder actually passes through to GL needs
  959. # to be the first listed here since it's used in unit tests.
  960. 'GL_VERTEX_ATTRIB_ARRAY_NORMALIZED',
  961. 'GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING',
  962. 'GL_VERTEX_ATTRIB_ARRAY_ENABLED',
  963. 'GL_VERTEX_ATTRIB_ARRAY_SIZE',
  964. 'GL_VERTEX_ATTRIB_ARRAY_STRIDE',
  965. 'GL_VERTEX_ATTRIB_ARRAY_TYPE',
  966. 'GL_CURRENT_VERTEX_ATTRIB',
  967. ],
  968. 'valid_es3': [
  969. 'GL_VERTEX_ATTRIB_ARRAY_INTEGER',
  970. 'GL_VERTEX_ATTRIB_ARRAY_DIVISOR',
  971. ],
  972. },
  973. 'VertexPointer': {
  974. 'type': 'GLenum',
  975. 'valid': [
  976. 'GL_VERTEX_ATTRIB_ARRAY_POINTER',
  977. ],
  978. },
  979. 'HintTarget': {
  980. 'type': 'GLenum',
  981. 'valid': [
  982. 'GL_GENERATE_MIPMAP_HINT',
  983. 'GL_TEXTURE_FILTERING_HINT_CHROMIUM',
  984. ],
  985. 'valid_es3': [
  986. 'GL_FRAGMENT_SHADER_DERIVATIVE_HINT',
  987. ],
  988. 'invalid': [
  989. 'GL_PERSPECTIVE_CORRECTION_HINT',
  990. ],
  991. },
  992. 'HintMode': {
  993. 'type': 'GLenum',
  994. 'is_complete': True,
  995. 'valid': [
  996. 'GL_FASTEST',
  997. 'GL_NICEST',
  998. 'GL_DONT_CARE',
  999. ],
  1000. },
  1001. 'PixelStore': {
  1002. 'type': 'GLenum',
  1003. 'valid': [
  1004. 'GL_PACK_ALIGNMENT',
  1005. 'GL_UNPACK_ALIGNMENT',
  1006. ],
  1007. 'valid_es3': [
  1008. 'GL_PACK_ROW_LENGTH',
  1009. 'GL_PACK_SKIP_PIXELS',
  1010. 'GL_PACK_SKIP_ROWS',
  1011. 'GL_UNPACK_ROW_LENGTH',
  1012. 'GL_UNPACK_IMAGE_HEIGHT',
  1013. 'GL_UNPACK_SKIP_PIXELS',
  1014. 'GL_UNPACK_SKIP_ROWS',
  1015. 'GL_UNPACK_SKIP_IMAGES',
  1016. ],
  1017. 'invalid': [
  1018. 'GL_PACK_SWAP_BYTES',
  1019. 'GL_UNPACK_SWAP_BYTES',
  1020. ],
  1021. },
  1022. 'PixelStoreAlignment': {
  1023. 'type': 'GLint',
  1024. 'is_complete': True,
  1025. 'valid': [
  1026. '1',
  1027. '2',
  1028. '4',
  1029. '8',
  1030. ],
  1031. 'invalid': [
  1032. '3',
  1033. '9',
  1034. ],
  1035. },
  1036. 'ReadPixelFormat': {
  1037. 'type': 'GLenum',
  1038. 'valid': [
  1039. 'GL_ALPHA',
  1040. 'GL_RGB',
  1041. 'GL_RGBA',
  1042. ],
  1043. 'valid_es3': [
  1044. 'GL_RED',
  1045. 'GL_RED_INTEGER',
  1046. 'GL_RG',
  1047. 'GL_RG_INTEGER',
  1048. 'GL_RGB_INTEGER',
  1049. 'GL_RGBA_INTEGER',
  1050. ],
  1051. },
  1052. 'PixelType': {
  1053. 'type': 'GLenum',
  1054. 'valid': [
  1055. 'GL_UNSIGNED_BYTE',
  1056. 'GL_UNSIGNED_SHORT_5_6_5',
  1057. 'GL_UNSIGNED_SHORT_4_4_4_4',
  1058. 'GL_UNSIGNED_SHORT_5_5_5_1',
  1059. ],
  1060. 'valid_es3': [
  1061. 'GL_BYTE',
  1062. 'GL_UNSIGNED_SHORT',
  1063. 'GL_SHORT',
  1064. 'GL_UNSIGNED_INT',
  1065. 'GL_INT',
  1066. 'GL_HALF_FLOAT',
  1067. 'GL_FLOAT',
  1068. 'GL_UNSIGNED_INT_2_10_10_10_REV',
  1069. 'GL_UNSIGNED_INT_10F_11F_11F_REV',
  1070. 'GL_UNSIGNED_INT_5_9_9_9_REV',
  1071. 'GL_UNSIGNED_INT_24_8',
  1072. 'GL_FLOAT_32_UNSIGNED_INT_24_8_REV',
  1073. ],
  1074. 'invalid': [
  1075. 'GL_UNSIGNED_BYTE_3_3_2',
  1076. ],
  1077. },
  1078. 'ReadPixelType': {
  1079. 'type': 'GLenum',
  1080. 'valid': [
  1081. 'GL_UNSIGNED_BYTE',
  1082. 'GL_UNSIGNED_SHORT_5_6_5',
  1083. 'GL_UNSIGNED_SHORT_4_4_4_4',
  1084. 'GL_UNSIGNED_SHORT_5_5_5_1',
  1085. ],
  1086. 'valid_es3': [
  1087. 'GL_BYTE',
  1088. 'GL_UNSIGNED_SHORT',
  1089. 'GL_SHORT',
  1090. 'GL_UNSIGNED_INT',
  1091. 'GL_INT',
  1092. 'GL_HALF_FLOAT',
  1093. 'GL_FLOAT',
  1094. 'GL_UNSIGNED_INT_2_10_10_10_REV',
  1095. ],
  1096. },
  1097. 'RenderBufferFormat': {
  1098. 'type': 'GLenum',
  1099. 'valid': [
  1100. 'GL_RGBA4',
  1101. 'GL_RGB565',
  1102. 'GL_RGB5_A1',
  1103. 'GL_DEPTH_COMPONENT16',
  1104. 'GL_STENCIL_INDEX8',
  1105. ],
  1106. 'valid_es3': [
  1107. 'GL_R8',
  1108. 'GL_R8UI',
  1109. 'GL_R8I',
  1110. 'GL_R16UI',
  1111. 'GL_R16I',
  1112. 'GL_R32UI',
  1113. 'GL_R32I',
  1114. 'GL_RG8',
  1115. 'GL_RG8UI',
  1116. 'GL_RG8I',
  1117. 'GL_RG16UI',
  1118. 'GL_RG16I',
  1119. 'GL_RG32UI',
  1120. 'GL_RG32I',
  1121. 'GL_RGB8',
  1122. 'GL_RGBA8',
  1123. 'GL_SRGB8_ALPHA8',
  1124. 'GL_RGB10_A2',
  1125. 'GL_RGBA8UI',
  1126. 'GL_RGBA8I',
  1127. 'GL_RGB10_A2UI',
  1128. 'GL_RGBA16UI',
  1129. 'GL_RGBA16I',
  1130. 'GL_RGBA32UI',
  1131. 'GL_RGBA32I',
  1132. 'GL_DEPTH_COMPONENT24',
  1133. 'GL_DEPTH_COMPONENT32F',
  1134. 'GL_DEPTH24_STENCIL8',
  1135. 'GL_DEPTH32F_STENCIL8',
  1136. ],
  1137. },
  1138. 'ShaderBinaryFormat': {
  1139. 'type': 'GLenum',
  1140. 'valid': [
  1141. ],
  1142. },
  1143. 'StencilOp': {
  1144. 'type': 'GLenum',
  1145. 'is_complete': True,
  1146. 'valid': [
  1147. 'GL_KEEP',
  1148. 'GL_ZERO',
  1149. 'GL_REPLACE',
  1150. 'GL_INCR',
  1151. 'GL_INCR_WRAP',
  1152. 'GL_DECR',
  1153. 'GL_DECR_WRAP',
  1154. 'GL_INVERT',
  1155. ],
  1156. },
  1157. 'TextureFormat': {
  1158. 'type': 'GLenum',
  1159. 'valid': [
  1160. 'GL_ALPHA',
  1161. 'GL_LUMINANCE',
  1162. 'GL_LUMINANCE_ALPHA',
  1163. 'GL_RGB',
  1164. 'GL_RGBA',
  1165. ],
  1166. 'valid_es3': [
  1167. 'GL_RED',
  1168. 'GL_RED_INTEGER',
  1169. 'GL_RG',
  1170. 'GL_RG_INTEGER',
  1171. 'GL_RGB_INTEGER',
  1172. 'GL_RGBA_INTEGER',
  1173. 'GL_DEPTH_COMPONENT',
  1174. 'GL_DEPTH_STENCIL',
  1175. ],
  1176. 'invalid': [
  1177. 'GL_BGRA',
  1178. 'GL_BGR',
  1179. ],
  1180. },
  1181. 'TextureInternalFormat': {
  1182. 'type': 'GLenum',
  1183. 'valid': [
  1184. 'GL_ALPHA',
  1185. 'GL_LUMINANCE',
  1186. 'GL_LUMINANCE_ALPHA',
  1187. 'GL_RGB',
  1188. 'GL_RGBA',
  1189. ],
  1190. 'valid_es3': [
  1191. 'GL_R8',
  1192. 'GL_R8_SNORM',
  1193. 'GL_R16F',
  1194. 'GL_R32F',
  1195. 'GL_R8UI',
  1196. 'GL_R8I',
  1197. 'GL_R16UI',
  1198. 'GL_R16I',
  1199. 'GL_R32UI',
  1200. 'GL_R32I',
  1201. 'GL_RG8',
  1202. 'GL_RG8_SNORM',
  1203. 'GL_RG16F',
  1204. 'GL_RG32F',
  1205. 'GL_RG8UI',
  1206. 'GL_RG8I',
  1207. 'GL_RG16UI',
  1208. 'GL_RG16I',
  1209. 'GL_RG32UI',
  1210. 'GL_RG32I',
  1211. 'GL_RGB8',
  1212. 'GL_SRGB8',
  1213. 'GL_RGB565',
  1214. 'GL_RGB8_SNORM',
  1215. 'GL_R11F_G11F_B10F',
  1216. 'GL_RGB9_E5',
  1217. 'GL_RGB16F',
  1218. 'GL_RGB32F',
  1219. 'GL_RGB8UI',
  1220. 'GL_RGB8I',
  1221. 'GL_RGB16UI',
  1222. 'GL_RGB16I',
  1223. 'GL_RGB32UI',
  1224. 'GL_RGB32I',
  1225. 'GL_RGBA8',
  1226. 'GL_SRGB8_ALPHA8',
  1227. 'GL_RGBA8_SNORM',
  1228. 'GL_RGB5_A1',
  1229. 'GL_RGBA4',
  1230. 'GL_RGB10_A2',
  1231. 'GL_RGBA16F',
  1232. 'GL_RGBA32F',
  1233. 'GL_RGBA8UI',
  1234. 'GL_RGBA8I',
  1235. 'GL_RGB10_A2UI',
  1236. 'GL_RGBA16UI',
  1237. 'GL_RGBA16I',
  1238. 'GL_RGBA32UI',
  1239. 'GL_RGBA32I',
  1240. # The DEPTH/STENCIL formats are not supported in CopyTexImage2D.
  1241. # We will reject them dynamically in GPU command buffer.
  1242. 'GL_DEPTH_COMPONENT16',
  1243. 'GL_DEPTH_COMPONENT24',
  1244. 'GL_DEPTH_COMPONENT32F',
  1245. 'GL_DEPTH24_STENCIL8',
  1246. 'GL_DEPTH32F_STENCIL8',
  1247. ],
  1248. 'invalid': [
  1249. 'GL_BGRA',
  1250. 'GL_BGR',
  1251. ],
  1252. },
  1253. 'TextureUnsizedInternalFormat': {
  1254. 'type': 'GLenum',
  1255. 'valid': [
  1256. 'GL_ALPHA',
  1257. 'GL_LUMINANCE',
  1258. 'GL_LUMINANCE_ALPHA',
  1259. 'GL_RGB',
  1260. 'GL_RGBA',
  1261. ],
  1262. },
  1263. 'TextureSizedColorRenderableInternalFormat': {
  1264. 'type': 'GLenum',
  1265. 'valid': [
  1266. 'GL_R8',
  1267. 'GL_R8UI',
  1268. 'GL_R8I',
  1269. 'GL_R16UI',
  1270. 'GL_R16I',
  1271. 'GL_R32UI',
  1272. 'GL_R32I',
  1273. 'GL_RG8',
  1274. 'GL_RG8UI',
  1275. 'GL_RG8I',
  1276. 'GL_RG16UI',
  1277. 'GL_RG16I',
  1278. 'GL_RG32UI',
  1279. 'GL_RG32I',
  1280. 'GL_RGB8',
  1281. 'GL_RGB565',
  1282. 'GL_RGBA8',
  1283. 'GL_SRGB8_ALPHA8',
  1284. 'GL_RGB5_A1',
  1285. 'GL_RGBA4',
  1286. 'GL_RGB10_A2',
  1287. 'GL_RGBA8UI',
  1288. 'GL_RGBA8I',
  1289. 'GL_RGB10_A2UI',
  1290. 'GL_RGBA16UI',
  1291. 'GL_RGBA16I',
  1292. 'GL_RGBA32UI',
  1293. 'GL_RGBA32I',
  1294. ],
  1295. },
  1296. 'TextureDepthRenderableInternalFormat': {
  1297. 'type': 'GLenum',
  1298. 'valid': [],
  1299. 'valid_es3': [
  1300. 'GL_DEPTH_COMPONENT16',
  1301. 'GL_DEPTH_COMPONENT24',
  1302. 'GL_DEPTH_COMPONENT32F',
  1303. 'GL_DEPTH24_STENCIL8',
  1304. 'GL_DEPTH32F_STENCIL8',
  1305. ],
  1306. },
  1307. 'TextureStencilRenderableInternalFormat': {
  1308. 'type': 'GLenum',
  1309. 'valid': [],
  1310. 'valid_es3': [
  1311. 'GL_STENCIL_INDEX8',
  1312. 'GL_DEPTH24_STENCIL8',
  1313. 'GL_DEPTH32F_STENCIL8',
  1314. ],
  1315. },
  1316. 'TextureSizedTextureFilterableInternalFormat': {
  1317. 'type': 'GLenum',
  1318. 'valid': [
  1319. 'GL_R8',
  1320. 'GL_R8_SNORM',
  1321. 'GL_R16F',
  1322. 'GL_RG8',
  1323. 'GL_RG8_SNORM',
  1324. 'GL_RG16F',
  1325. 'GL_RGB8',
  1326. 'GL_SRGB8',
  1327. 'GL_RGB565',
  1328. 'GL_RGB8_SNORM',
  1329. 'GL_R11F_G11F_B10F',
  1330. 'GL_RGB9_E5',
  1331. 'GL_RGB16F',
  1332. 'GL_RGBA8',
  1333. 'GL_SRGB8_ALPHA8',
  1334. 'GL_RGBA8_SNORM',
  1335. 'GL_RGB5_A1',
  1336. 'GL_RGBA4',
  1337. 'GL_RGB10_A2',
  1338. 'GL_RGBA16F',
  1339. 'GL_RGB_YCRCB_420_CHROMIUM',
  1340. 'GL_RGB_YCBCR_422_CHROMIUM',
  1341. 'GL_RGB_YCBCR_420V_CHROMIUM',
  1342. 'GL_RGB_YCBCR_P010_CHROMIUM',
  1343. 'GL_R16_EXT',
  1344. ],
  1345. },
  1346. 'TextureInternalFormatStorage': {
  1347. 'type': 'GLenum',
  1348. 'valid': [
  1349. 'GL_RGB565',
  1350. 'GL_RGBA4',
  1351. 'GL_RGB5_A1',
  1352. 'GL_ALPHA8_EXT',
  1353. 'GL_LUMINANCE8_EXT',
  1354. 'GL_LUMINANCE8_ALPHA8_EXT',
  1355. 'GL_RGB8_OES',
  1356. 'GL_RGBA8_OES',
  1357. ],
  1358. 'valid_es3': [
  1359. 'GL_R8',
  1360. 'GL_R8_SNORM',
  1361. 'GL_R16F',
  1362. 'GL_R32F',
  1363. 'GL_R8UI',
  1364. 'GL_R8I',
  1365. 'GL_R16UI',
  1366. 'GL_R16I',
  1367. 'GL_R32UI',
  1368. 'GL_R32I',
  1369. 'GL_RG8',
  1370. 'GL_RG8_SNORM',
  1371. 'GL_RG16F',
  1372. 'GL_RG32F',
  1373. 'GL_RG8UI',
  1374. 'GL_RG8I',
  1375. 'GL_RG16UI',
  1376. 'GL_RG16I',
  1377. 'GL_RG32UI',
  1378. 'GL_RG32I',
  1379. 'GL_RGB8',
  1380. 'GL_SRGB8',
  1381. 'GL_RGB8_SNORM',
  1382. 'GL_R11F_G11F_B10F',
  1383. 'GL_RGB9_E5',
  1384. 'GL_RGB16F',
  1385. 'GL_RGB32F',
  1386. 'GL_RGB8UI',
  1387. 'GL_RGB8I',
  1388. 'GL_RGB16UI',
  1389. 'GL_RGB16I',
  1390. 'GL_RGB32UI',
  1391. 'GL_RGB32I',
  1392. 'GL_RGBA8',
  1393. 'GL_SRGB8_ALPHA8',
  1394. 'GL_RGBA8_SNORM',
  1395. 'GL_RGB10_A2',
  1396. 'GL_RGBA16F',
  1397. 'GL_RGBA32F',
  1398. 'GL_RGBA8UI',
  1399. 'GL_RGBA8I',
  1400. 'GL_RGB10_A2UI',
  1401. 'GL_RGBA16UI',
  1402. 'GL_RGBA16I',
  1403. 'GL_RGBA32UI',
  1404. 'GL_RGBA32I',
  1405. 'GL_DEPTH_COMPONENT16',
  1406. 'GL_DEPTH_COMPONENT24',
  1407. 'GL_DEPTH_COMPONENT32F',
  1408. 'GL_DEPTH24_STENCIL8',
  1409. 'GL_DEPTH32F_STENCIL8',
  1410. ],
  1411. 'deprecated_es3': [
  1412. 'GL_ALPHA8_EXT',
  1413. 'GL_LUMINANCE8_EXT',
  1414. 'GL_LUMINANCE8_ALPHA8_EXT',
  1415. 'GL_ALPHA16F_EXT',
  1416. 'GL_LUMINANCE16F_EXT',
  1417. 'GL_LUMINANCE_ALPHA16F_EXT',
  1418. 'GL_ALPHA32F_EXT',
  1419. 'GL_LUMINANCE32F_EXT',
  1420. 'GL_LUMINANCE_ALPHA32F_EXT',
  1421. ],
  1422. },
  1423. 'ImageInternalFormat': {
  1424. 'type': 'GLenum',
  1425. 'valid': [
  1426. 'GL_RGB',
  1427. 'GL_RGB_YCRCB_420_CHROMIUM',
  1428. 'GL_RGB_YCBCR_422_CHROMIUM',
  1429. 'GL_RGB_YCBCR_420V_CHROMIUM',
  1430. 'GL_RGB_YCBCR_P010_CHROMIUM',
  1431. 'GL_RGBA',
  1432. ],
  1433. },
  1434. 'UniformParameter': {
  1435. 'type': 'GLenum',
  1436. 'is_complete': True,
  1437. 'valid': [
  1438. 'GL_UNIFORM_SIZE',
  1439. 'GL_UNIFORM_TYPE',
  1440. 'GL_UNIFORM_NAME_LENGTH',
  1441. 'GL_UNIFORM_BLOCK_INDEX',
  1442. 'GL_UNIFORM_OFFSET',
  1443. 'GL_UNIFORM_ARRAY_STRIDE',
  1444. 'GL_UNIFORM_MATRIX_STRIDE',
  1445. 'GL_UNIFORM_IS_ROW_MAJOR',
  1446. ],
  1447. 'invalid': [
  1448. 'GL_UNIFORM_BLOCK_NAME_LENGTH',
  1449. ],
  1450. },
  1451. 'UniformBlockParameter': {
  1452. 'type': 'GLenum',
  1453. 'is_complete': True,
  1454. 'valid': [
  1455. 'GL_UNIFORM_BLOCK_BINDING',
  1456. 'GL_UNIFORM_BLOCK_DATA_SIZE',
  1457. 'GL_UNIFORM_BLOCK_NAME_LENGTH',
  1458. 'GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS',
  1459. 'GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES',
  1460. 'GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER',
  1461. 'GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER',
  1462. ],
  1463. 'invalid': [
  1464. 'GL_NEAREST',
  1465. ],
  1466. },
  1467. 'VertexAttribType': {
  1468. 'type': 'GLenum',
  1469. 'valid': [
  1470. 'GL_BYTE',
  1471. 'GL_UNSIGNED_BYTE',
  1472. 'GL_SHORT',
  1473. 'GL_UNSIGNED_SHORT',
  1474. # 'GL_FIXED', // This is not available on Desktop GL.
  1475. 'GL_FLOAT',
  1476. ],
  1477. 'valid_es3': [
  1478. 'GL_INT',
  1479. 'GL_UNSIGNED_INT',
  1480. 'GL_HALF_FLOAT',
  1481. 'GL_INT_2_10_10_10_REV',
  1482. 'GL_UNSIGNED_INT_2_10_10_10_REV',
  1483. ],
  1484. 'invalid': [
  1485. 'GL_DOUBLE',
  1486. ],
  1487. },
  1488. 'VertexAttribIType': {
  1489. 'type': 'GLenum',
  1490. 'is_complete': True,
  1491. 'valid': [
  1492. 'GL_BYTE',
  1493. 'GL_UNSIGNED_BYTE',
  1494. 'GL_SHORT',
  1495. 'GL_UNSIGNED_SHORT',
  1496. 'GL_INT',
  1497. 'GL_UNSIGNED_INT',
  1498. ],
  1499. 'invalid': [
  1500. 'GL_FLOAT',
  1501. 'GL_DOUBLE',
  1502. ],
  1503. },
  1504. 'TextureBorder': {
  1505. 'type': 'GLint',
  1506. 'is_complete': True,
  1507. 'valid': [
  1508. '0',
  1509. ],
  1510. 'invalid': [
  1511. '1',
  1512. ],
  1513. },
  1514. 'VertexAttribSize': {
  1515. 'type': 'GLint',
  1516. 'validator': False,
  1517. 'valid': [
  1518. '1',
  1519. '2',
  1520. '3',
  1521. '4',
  1522. ],
  1523. 'invalid': [
  1524. '0',
  1525. '5',
  1526. ],
  1527. },
  1528. 'ResetStatus': {
  1529. 'type': 'GLenum',
  1530. 'is_complete': True,
  1531. 'valid': [
  1532. 'GL_GUILTY_CONTEXT_RESET_ARB',
  1533. 'GL_INNOCENT_CONTEXT_RESET_ARB',
  1534. 'GL_UNKNOWN_CONTEXT_RESET_ARB',
  1535. ],
  1536. },
  1537. 'SyncCondition': {
  1538. 'type': 'GLenum',
  1539. 'is_complete': True,
  1540. 'valid': [
  1541. 'GL_SYNC_GPU_COMMANDS_COMPLETE',
  1542. ],
  1543. 'invalid': [
  1544. '0',
  1545. ],
  1546. },
  1547. 'SyncFlags': {
  1548. 'type': 'GLbitfield',
  1549. 'is_complete': True,
  1550. 'valid': [
  1551. '0',
  1552. ],
  1553. 'invalid': [
  1554. '1',
  1555. ],
  1556. },
  1557. 'SyncFlushFlags': {
  1558. 'type': 'GLbitfield',
  1559. 'valid': [
  1560. 'GL_SYNC_FLUSH_COMMANDS_BIT',
  1561. '0',
  1562. ],
  1563. 'invalid': [
  1564. '0xFFFFFFFF',
  1565. ],
  1566. },
  1567. 'SyncParameter': {
  1568. 'type': 'GLenum',
  1569. 'is_complete': True,
  1570. 'valid': [
  1571. 'GL_SYNC_STATUS', # This needs to be the 1st; all others are cached.
  1572. 'GL_OBJECT_TYPE',
  1573. 'GL_SYNC_CONDITION',
  1574. 'GL_SYNC_FLAGS',
  1575. ],
  1576. 'invalid': [
  1577. 'GL_SYNC_FENCE',
  1578. ],
  1579. },
  1580. 'WindowRectanglesMode': {
  1581. 'type': 'GLenum',
  1582. 'is_complete': True,
  1583. 'valid': [
  1584. 'GL_INCLUSIVE_EXT',
  1585. 'GL_EXCLUSIVE_EXT',
  1586. ],
  1587. },
  1588. 'SwapBuffersFlags': {
  1589. 'type': 'GLbitfield',
  1590. 'is_complete': True,
  1591. 'valid': [
  1592. '0',
  1593. 'gpu::SwapBuffersFlags::kVSyncParams',
  1594. ],
  1595. },
  1596. 'SharedImageAccessMode': {
  1597. 'type': 'GLenum',
  1598. 'is_complete': True,
  1599. 'valid': [
  1600. 'GL_SHARED_IMAGE_ACCESS_MODE_OVERLAY_CHROMIUM',
  1601. 'GL_SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM',
  1602. 'GL_SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM',
  1603. ],
  1604. },
  1605. }
  1606. # A function info object specifies the type and other special data for the
  1607. # command that will be generated. A base function info object is generated by
  1608. # parsing the "gles2_cmd_buffer_functions.txt", one for each function in the
  1609. # file. These function info objects can be augmented and their values can be
  1610. # overridden by adding an object to the table below.
  1611. #
  1612. # Must match function names specified in "gles2_cmd_buffer_functions.txt".
  1613. #
  1614. # cmd_comment: A comment added to the cmd format.
  1615. # type : defines which handler will be used to generate code.
  1616. # decoder_func: defines which function to call in the decoder to execute the
  1617. # corresponding GL command. If not specified the GL command will
  1618. # be called directly.
  1619. # gl_test_func: GL function that is expected to be called when testing.
  1620. # cmd_args: The arguments to use for the command. This overrides generating
  1621. # them based on the GL function arguments.
  1622. # data_transfer_methods: Array of methods that are used for transfering the
  1623. # pointer data. Possible values: 'immediate', 'shm', 'bucket'.
  1624. # The default is 'immediate' if the command has one pointer
  1625. # argument, otherwise 'shm'. One command is generated for each
  1626. # transfer method. Affects only commands which are not of type
  1627. # 'GETn' or 'GLcharN'.
  1628. # Note: the command arguments that affect this are the final args,
  1629. # taking cmd_args override into consideration.
  1630. # impl_func: Whether or not to generate the GLES2Implementation part of this
  1631. # command.
  1632. # internal: If true, this is an internal command only, not exposed to the
  1633. # client.
  1634. # needs_size: If True a data_size field is added to the command.
  1635. # count: The number of units per element. For PUTn or PUT types.
  1636. # use_count_func: If True the actual data count needs to be computed; the count
  1637. # argument specifies the maximum count.
  1638. # unit_test: If False no service side unit test will be generated.
  1639. # client_test: If False no client side unit test will be generated.
  1640. # expectation: If False the unit test will have no expected calls.
  1641. # gen_func: Name of function that generates GL resource for corresponding
  1642. # bind function.
  1643. # states: array of states that get set by this function corresponding to
  1644. # the given arguments
  1645. # no_gl: no GL function is called.
  1646. # valid_args: A dictionary of argument indices to args to use in unit tests
  1647. # when they can not be automatically determined.
  1648. # pepper_interface: The pepper interface that is used for this extension
  1649. # pepper_name: The name of the function as exposed to pepper.
  1650. # pepper_args: A string representing the argument list (what would appear in
  1651. # C/C++ between the parentheses for the function declaration)
  1652. # that the Pepper API expects for this function. Use this only if
  1653. # the stable Pepper API differs from the GLES2 argument list.
  1654. # invalid_test: False if no invalid test needed.
  1655. # shadowed: True = the value is shadowed so no glGetXXX call will be made.
  1656. # first_element_only: For PUT types, True if only the first element of an
  1657. # array is used and we end up calling the single value
  1658. # corresponding function. eg. TexParameteriv -> TexParameteri
  1659. # extension: Function is an extension to GL and should not be exposed to
  1660. # pepper unless pepper_interface is defined.
  1661. # extension_flag: Function is an extension and should be enabled only when
  1662. # the corresponding feature info flag is enabled. Implies
  1663. # 'extension': True.
  1664. # not_shared: For GENn types, True if objects can't be shared between contexts
  1665. # es3: ES3 API. True if the function requires an ES3 or WebGL2 context.
  1666. # es31: ES31 API. True if the function requires an WebGL2Compute
  1667. # context.
  1668. _FUNCTION_INFO = {
  1669. 'ActiveTexture': {
  1670. 'decoder_func': 'DoActiveTexture',
  1671. 'unit_test': False,
  1672. 'impl_func': False,
  1673. 'client_test': False,
  1674. },
  1675. 'AttachShader': {'decoder_func': 'DoAttachShader'},
  1676. 'BindAttribLocation': {
  1677. 'type': 'GLchar',
  1678. 'data_transfer_methods': ['bucket'],
  1679. 'needs_size': True,
  1680. },
  1681. 'BindBuffer': {
  1682. 'type': 'Bind',
  1683. 'decoder_func': 'DoBindBuffer',
  1684. 'gen_func': 'GenBuffersARB',
  1685. },
  1686. 'BindBufferBase': {
  1687. 'type': 'Bind',
  1688. 'decoder_func': 'DoBindBufferBase',
  1689. 'gen_func': 'GenBuffersARB',
  1690. 'unit_test': False,
  1691. 'es3': True,
  1692. },
  1693. 'BindBufferRange': {
  1694. 'type': 'Bind',
  1695. 'decoder_func': 'DoBindBufferRange',
  1696. 'gen_func': 'GenBuffersARB',
  1697. 'unit_test': False,
  1698. 'valid_args': {
  1699. '3': '4',
  1700. '4': '4'
  1701. },
  1702. 'es3': True,
  1703. },
  1704. 'BindFramebuffer': {
  1705. 'type': 'Bind',
  1706. 'decoder_func': 'DoBindFramebuffer',
  1707. 'gl_test_func': 'glBindFramebufferEXT',
  1708. 'gen_func': 'GenFramebuffersEXT',
  1709. 'trace_level': 1,
  1710. },
  1711. 'BindImageTexture':{
  1712. 'cmd_args': 'GLuint unit, GLuint texture, GLint level, GLboolean layered, '
  1713. 'GLint layer, GLenum access, GLenum format',
  1714. 'unit_test': False,
  1715. 'trace_level': 2,
  1716. 'es31': True,
  1717. },
  1718. 'BindRenderbuffer': {
  1719. 'type': 'Bind',
  1720. 'decoder_func': 'DoBindRenderbuffer',
  1721. 'gl_test_func': 'glBindRenderbufferEXT',
  1722. 'gen_func': 'GenRenderbuffersEXT',
  1723. },
  1724. 'BindSampler': {
  1725. 'type': 'Bind',
  1726. 'decoder_func': 'DoBindSampler',
  1727. 'es3': True,
  1728. },
  1729. 'BindTexture': {
  1730. 'type': 'Bind',
  1731. 'decoder_func': 'DoBindTexture',
  1732. 'gen_func': 'GenTextures',
  1733. # TODO: remove this once client side caching works.
  1734. 'client_test': False,
  1735. 'unit_test': False,
  1736. 'trace_level': 2,
  1737. },
  1738. 'BindTransformFeedback': {
  1739. 'type': 'Bind',
  1740. 'decoder_func': 'DoBindTransformFeedback',
  1741. 'es3': True,
  1742. 'unit_test': False,
  1743. },
  1744. 'BlitFramebufferCHROMIUM': {
  1745. 'decoder_func': 'DoBlitFramebufferCHROMIUM',
  1746. 'unit_test': False,
  1747. 'extension': 'chromium_framebuffer_multisample',
  1748. 'extension_flag': 'chromium_framebuffer_multisample',
  1749. 'pepper_interface': 'FramebufferBlit',
  1750. 'pepper_name': 'BlitFramebufferEXT',
  1751. 'defer_reads': True,
  1752. 'defer_draws': True,
  1753. 'trace_level': 1,
  1754. },
  1755. 'BufferData': {
  1756. 'type': 'Custom',
  1757. 'impl_func': False,
  1758. 'data_transfer_methods': ['shm'],
  1759. 'size_args': {
  1760. 'data': 'size', },
  1761. 'client_test': False,
  1762. 'trace_level': 2,
  1763. },
  1764. 'BufferSubData': {
  1765. 'type': 'Data',
  1766. 'client_test': False,
  1767. 'decoder_func': 'DoBufferSubData',
  1768. 'data_transfer_methods': ['shm'],
  1769. 'size_args': {
  1770. 'data': 'size', },
  1771. 'trace_level': 2,
  1772. },
  1773. 'CheckFramebufferStatus': {
  1774. 'type': 'Is',
  1775. 'decoder_func': 'DoCheckFramebufferStatus',
  1776. 'gl_test_func': 'glCheckFramebufferStatusEXT',
  1777. 'error_value': 'GL_FRAMEBUFFER_UNSUPPORTED',
  1778. 'result': ['GLenum'],
  1779. },
  1780. 'Clear': {
  1781. 'decoder_func': 'DoClear',
  1782. 'defer_draws': True,
  1783. 'trace_level': 2,
  1784. 'valid_args': {
  1785. '0': 'GL_COLOR_BUFFER_BIT'
  1786. },
  1787. },
  1788. 'ClearBufferiv': {
  1789. 'type': 'PUT',
  1790. 'use_count_func': True,
  1791. 'count': 4,
  1792. 'decoder_func': 'DoClearBufferiv',
  1793. 'unit_test': False,
  1794. 'es3': True,
  1795. 'trace_level': 2,
  1796. },
  1797. 'ClearBufferuiv': {
  1798. 'type': 'PUT',
  1799. 'use_count_func': True,
  1800. 'count': 4,
  1801. 'decoder_func': 'DoClearBufferuiv',
  1802. 'unit_test': False,
  1803. 'es3': True,
  1804. 'trace_level': 2,
  1805. },
  1806. 'ClearBufferfv': {
  1807. 'type': 'PUT',
  1808. 'use_count_func': True,
  1809. 'count': 4,
  1810. 'decoder_func': 'DoClearBufferfv',
  1811. 'unit_test': False,
  1812. 'es3': True,
  1813. 'trace_level': 2,
  1814. },
  1815. 'ClearBufferfi': {
  1816. 'es3': True,
  1817. 'decoder_func': 'DoClearBufferfi',
  1818. 'unit_test': False,
  1819. 'trace_level': 2,
  1820. },
  1821. 'ClearColor': {
  1822. 'type': 'StateSet',
  1823. 'state': 'ClearColor',
  1824. },
  1825. 'ClearDepthf': {
  1826. 'type': 'StateSet',
  1827. 'state': 'ClearDepthf',
  1828. 'decoder_func': 'glClearDepth',
  1829. 'gl_test_func': 'glClearDepth',
  1830. 'valid_args': {
  1831. '0': '0.5f'
  1832. },
  1833. },
  1834. 'ClientWaitSync': {
  1835. 'type': 'Custom',
  1836. 'data_transfer_methods': ['shm'],
  1837. 'cmd_args': 'GLuint sync, GLbitfieldSyncFlushFlags flags, '
  1838. 'GLuint64 timeout, GLenum* result',
  1839. 'es3': True,
  1840. 'result': ['GLenum'],
  1841. 'trace_level': 2,
  1842. },
  1843. 'ColorMask': {
  1844. 'type': 'StateSet',
  1845. 'state': 'ColorMask',
  1846. 'no_gl': True,
  1847. 'expectation': False,
  1848. },
  1849. 'ColorMaskiOES': {
  1850. 'extension_flag': 'oes_draw_buffers_indexed',
  1851. 'unit_test': False,
  1852. 'extension': 'OES_draw_buffers_indexed',
  1853. },
  1854. 'ContextVisibilityHintCHROMIUM': {
  1855. 'decoder_func': 'DoContextVisibilityHintCHROMIUM',
  1856. 'extension': 'CHROMIUM_context_visibility_hint',
  1857. 'unit_test': False,
  1858. 'client_test': False,
  1859. },
  1860. 'CopyBufferSubData': {
  1861. 'decoder_func': 'DoCopyBufferSubData',
  1862. 'impl_func': False,
  1863. 'unit_test': False,
  1864. 'es3': True,
  1865. },
  1866. 'CoverageModulationCHROMIUM': {
  1867. 'type': 'StateSet',
  1868. 'state': 'CoverageModulationCHROMIUM',
  1869. 'decoder_func': 'glCoverageModulationNV',
  1870. 'extension': 'CHROMIUM_framebuffer_mixed_samples',
  1871. 'extension_flag': 'chromium_framebuffer_mixed_samples',
  1872. },
  1873. 'CreateAndConsumeTextureCHROMIUM': {
  1874. 'type': 'NoCommand',
  1875. 'extension': "CHROMIUM_texture_mailbox",
  1876. 'trace_level': 2,
  1877. },
  1878. 'CreateAndConsumeTextureINTERNAL': {
  1879. 'decoder_func': 'DoCreateAndConsumeTextureINTERNAL',
  1880. 'internal': True,
  1881. 'type': 'PUT',
  1882. 'count': 16, # GL_MAILBOX_SIZE_CHROMIUM
  1883. 'impl_func': False,
  1884. 'unit_test': False,
  1885. 'trace_level': 2,
  1886. },
  1887. 'ClearStencil': {
  1888. 'type': 'StateSet',
  1889. 'state': 'ClearStencil',
  1890. },
  1891. 'EnableFeatureCHROMIUM': {
  1892. 'type': 'Custom',
  1893. 'data_transfer_methods': ['shm'],
  1894. 'decoder_func': 'DoEnableFeatureCHROMIUM',
  1895. 'cmd_args': 'GLuint bucket_id, GLint* result',
  1896. 'result': ['GLint'],
  1897. 'extension': 'GL_CHROMIUM_enable_feature',
  1898. 'pepper_interface': 'ChromiumEnableFeature',
  1899. },
  1900. 'CompileShader': {'decoder_func': 'DoCompileShader', 'unit_test': False},
  1901. 'CompressedTexImage2D': {
  1902. 'type': 'Custom',
  1903. 'data_transfer_methods': ['bucket', 'shm'],
  1904. 'trace_level': 1,
  1905. },
  1906. 'CompressedTexSubImage2D': {
  1907. 'type': 'Custom',
  1908. 'data_transfer_methods': ['bucket', 'shm'],
  1909. 'trace_level': 1,
  1910. },
  1911. 'CopyTexImage2D': {
  1912. 'decoder_func': 'DoCopyTexImage2D',
  1913. 'unit_test': False,
  1914. 'defer_reads': True,
  1915. 'trace_level': 1,
  1916. },
  1917. 'CopyTexSubImage2D': {
  1918. 'decoder_func': 'DoCopyTexSubImage2D',
  1919. 'defer_reads': True,
  1920. 'trace_level': 1,
  1921. },
  1922. 'CompressedTexImage3D': {
  1923. 'type': 'Custom',
  1924. 'data_transfer_methods': ['bucket', 'shm'],
  1925. 'es3': True,
  1926. 'trace_level': 1,
  1927. },
  1928. 'CompressedTexSubImage3D': {
  1929. 'type': 'Custom',
  1930. 'data_transfer_methods': ['bucket', 'shm'],
  1931. 'es3': True,
  1932. 'trace_level': 1,
  1933. },
  1934. 'CopyTexSubImage3D': {
  1935. 'decoder_func': 'DoCopyTexSubImage3D',
  1936. 'unit_test': False,
  1937. 'defer_reads': True,
  1938. 'es3': True,
  1939. 'trace_level': 1,
  1940. },
  1941. 'DescheduleUntilFinishedCHROMIUM': {
  1942. 'type': 'Custom',
  1943. 'decoder_func': 'DoDescheduleUntilFinishedCHROMIUM',
  1944. 'extension': "CHROMIUM_deschedule",
  1945. 'trace_level': 1,
  1946. },
  1947. 'CreateProgram': {
  1948. 'type': 'Create',
  1949. 'client_test': False,
  1950. },
  1951. 'CreateShader': {
  1952. 'type': 'Create',
  1953. 'client_test': False,
  1954. },
  1955. 'BlendColor': {
  1956. 'type': 'StateSet',
  1957. 'state': 'BlendColor',
  1958. },
  1959. 'BlendEquation': {
  1960. 'type': 'StateSetRGBAlpha',
  1961. 'state': 'BlendEquation',
  1962. 'valid_args': {
  1963. '0': 'GL_FUNC_SUBTRACT'
  1964. },
  1965. },
  1966. 'BlendEquationiOES': {
  1967. 'extension_flag': 'oes_draw_buffers_indexed',
  1968. 'unit_test': False,
  1969. 'extension': 'OES_draw_buffers_indexed',
  1970. 'valid_args': {
  1971. '1': 'GL_FUNC_SUBTRACT',
  1972. '2': 'GL_FUNC_SUBTRACT'
  1973. },
  1974. },
  1975. 'BlendEquationSeparate': {
  1976. 'type': 'StateSet',
  1977. 'state': 'BlendEquation',
  1978. 'valid_args': {
  1979. '0': 'GL_FUNC_SUBTRACT'
  1980. },
  1981. },
  1982. 'BlendEquationSeparateiOES': {
  1983. 'extension_flag': 'oes_draw_buffers_indexed',
  1984. 'unit_test': False,
  1985. 'extension': 'OES_draw_buffers_indexed',
  1986. 'valid_args': {
  1987. '1': 'GL_FUNC_SUBTRACT',
  1988. '2': 'GL_FUNC_SUBTRACT'
  1989. },
  1990. },
  1991. 'BlendFunc': {
  1992. 'type': 'StateSetRGBAlpha',
  1993. 'state': 'BlendFunc',
  1994. },
  1995. 'BlendFunciOES': {
  1996. 'extension_flag': 'oes_draw_buffers_indexed',
  1997. 'unit_test': False,
  1998. 'extension': 'OES_draw_buffers_indexed',
  1999. },
  2000. 'BlendFuncSeparate': {
  2001. 'type': 'StateSet',
  2002. 'state': 'BlendFunc',
  2003. },
  2004. 'BlendFuncSeparateiOES': {
  2005. 'extension_flag': 'oes_draw_buffers_indexed',
  2006. 'unit_test': False,
  2007. 'extension': 'OES_draw_buffers_indexed',
  2008. },
  2009. 'BlendBarrierKHR': {
  2010. 'gl_test_func': 'glBlendBarrierKHR',
  2011. 'extension': 'KHR_blend_equation_advanced',
  2012. 'extension_flag': 'blend_equation_advanced',
  2013. 'client_test': False,
  2014. },
  2015. 'SampleCoverage': {'decoder_func': 'DoSampleCoverage'},
  2016. 'StencilFunc': {
  2017. 'type': 'StateSetFrontBack',
  2018. 'state': 'StencilFunc',
  2019. },
  2020. 'StencilFuncSeparate': {
  2021. 'type': 'StateSetFrontBackSeparate',
  2022. 'state': 'StencilFunc',
  2023. },
  2024. 'StencilOp': {
  2025. 'type': 'StateSetFrontBack',
  2026. 'state': 'StencilOp',
  2027. 'valid_args': {
  2028. '1': 'GL_INCR'
  2029. },
  2030. },
  2031. 'StencilOpSeparate': {
  2032. 'type': 'StateSetFrontBackSeparate',
  2033. 'state': 'StencilOp',
  2034. 'valid_args': {
  2035. '1': 'GL_INCR'
  2036. },
  2037. },
  2038. 'Hint': {
  2039. 'type': 'StateSetNamedParameter',
  2040. 'state': 'Hint',
  2041. },
  2042. 'CullFace': {'type': 'StateSet', 'state': 'CullFace'},
  2043. 'FrontFace': {'type': 'StateSet', 'state': 'FrontFace'},
  2044. 'DepthFunc': {'type': 'StateSet', 'state': 'DepthFunc'},
  2045. 'LineWidth': {
  2046. 'type': 'StateSet',
  2047. 'state': 'LineWidth',
  2048. 'decoder_func': 'DoLineWidth',
  2049. 'valid_args': {
  2050. '0': '2.0f'
  2051. },
  2052. },
  2053. 'PolygonOffset': {
  2054. 'type': 'StateSet',
  2055. 'state': 'PolygonOffset',
  2056. },
  2057. 'DeleteBuffers': {
  2058. 'type': 'DELn',
  2059. 'gl_test_func': 'glDeleteBuffersARB',
  2060. 'resource_type': 'Buffer',
  2061. 'resource_types': 'Buffers',
  2062. },
  2063. 'DeleteFramebuffers': {
  2064. 'type': 'DELn',
  2065. 'gl_test_func': 'glDeleteFramebuffersEXT',
  2066. 'resource_type': 'Framebuffer',
  2067. 'resource_types': 'Framebuffers',
  2068. 'trace_level': 2,
  2069. },
  2070. 'DeleteProgram': { 'type': 'Delete' },
  2071. 'DeleteRenderbuffers': {
  2072. 'type': 'DELn',
  2073. 'gl_test_func': 'glDeleteRenderbuffersEXT',
  2074. 'resource_type': 'Renderbuffer',
  2075. 'resource_types': 'Renderbuffers',
  2076. 'trace_level': 2,
  2077. },
  2078. 'DeleteSamplers': {
  2079. 'type': 'DELn',
  2080. 'resource_type': 'Sampler',
  2081. 'resource_types': 'Samplers',
  2082. 'es3': True,
  2083. },
  2084. 'DeleteShader': { 'type': 'Delete' },
  2085. 'DeleteSync': {
  2086. 'type': 'Delete',
  2087. 'cmd_args': 'GLuint sync',
  2088. 'resource_type': 'Sync',
  2089. 'es3': True,
  2090. },
  2091. 'DeleteTextures': {
  2092. 'type': 'DELn',
  2093. 'resource_type': 'Texture',
  2094. 'resource_types': 'Textures',
  2095. },
  2096. 'DeleteTransformFeedbacks': {
  2097. 'type': 'DELn',
  2098. 'resource_type': 'TransformFeedback',
  2099. 'resource_types': 'TransformFeedbacks',
  2100. 'es3': True,
  2101. 'unit_test': False,
  2102. },
  2103. 'DepthRangef': {
  2104. 'decoder_func': 'DoDepthRangef',
  2105. 'gl_test_func': 'glDepthRange',
  2106. },
  2107. 'DepthMask': {
  2108. 'type': 'StateSet',
  2109. 'state': 'DepthMask',
  2110. 'no_gl': True,
  2111. 'expectation': False,
  2112. },
  2113. 'DetachShader': {'decoder_func': 'DoDetachShader'},
  2114. 'Disable': {
  2115. 'decoder_func': 'DoDisable',
  2116. 'impl_func': False,
  2117. 'client_test': False,
  2118. },
  2119. 'DisableiOES': {
  2120. 'extension_flag': 'oes_draw_buffers_indexed',
  2121. 'extension': 'OES_draw_buffers_indexed',
  2122. 'decoder_func': 'DoDisableiOES',
  2123. 'impl_func': False,
  2124. 'unit_test': False,
  2125. },
  2126. 'DisableVertexAttribArray': {
  2127. 'decoder_func': 'DoDisableVertexAttribArray',
  2128. 'impl_func': False,
  2129. 'unit_test': False,
  2130. },
  2131. 'DispatchCompute': {
  2132. 'cmd_args': 'GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z',
  2133. 'trace_level': 2,
  2134. 'es31': True,
  2135. 'unit_test': False,
  2136. },
  2137. 'DispatchComputeIndirect': {
  2138. 'cmd_args': 'GLintptrNotNegative offset',
  2139. 'trace_level': 2,
  2140. 'es31': True,
  2141. 'unit_test': False,
  2142. },
  2143. 'DrawArrays': {
  2144. 'type': 'Custom',
  2145. 'impl_func': False,
  2146. 'cmd_args': 'GLenumDrawMode mode, GLint first, GLsizei count',
  2147. 'defer_draws': True,
  2148. 'trace_level': 2,
  2149. },
  2150. 'DrawArraysIndirect': {
  2151. 'type': 'Custom',
  2152. 'impl_func': False,
  2153. 'cmd_args': 'GLenumDrawMode mode, GLuint offset',
  2154. 'trace_level': 2,
  2155. 'es31': True,
  2156. 'unit_test': False,
  2157. 'client_test': False,
  2158. },
  2159. 'DrawElements': {
  2160. 'type': 'Custom',
  2161. 'impl_func': False,
  2162. 'cmd_args': 'GLenumDrawMode mode, GLsizei count, '
  2163. 'GLenumIndexType type, GLuint index_offset',
  2164. 'client_test': False,
  2165. 'defer_draws': True,
  2166. 'trace_level': 2,
  2167. },
  2168. 'DrawElementsIndirect': {
  2169. 'type': 'Custom',
  2170. 'impl_func': False,
  2171. 'cmd_args': 'GLenumDrawMode mode, GLenumIndexType type, GLuint offset',
  2172. 'trace_level': 2,
  2173. 'es31': True,
  2174. 'unit_test': False,
  2175. 'client_test': False,
  2176. },
  2177. 'DrawRangeElements': {
  2178. 'type': 'NoCommand',
  2179. 'es3': True,
  2180. },
  2181. 'Enable': {
  2182. 'decoder_func': 'DoEnable',
  2183. 'impl_func': False,
  2184. 'client_test': False,
  2185. },
  2186. 'EnableiOES': {
  2187. 'extension_flag': 'oes_draw_buffers_indexed',
  2188. 'extension': 'OES_draw_buffers_indexed',
  2189. 'decoder_func': 'DoEnableiOES',
  2190. 'impl_func': False,
  2191. 'unit_test': False,
  2192. },
  2193. 'EnableVertexAttribArray': {
  2194. 'decoder_func': 'DoEnableVertexAttribArray',
  2195. 'impl_func': False,
  2196. 'unit_test': False,
  2197. },
  2198. 'FenceSync': {
  2199. 'type': 'Create',
  2200. 'client_test': False,
  2201. 'decoder_func': 'DoFenceSync',
  2202. 'es3': True,
  2203. 'trace_level': 1,
  2204. },
  2205. 'Finish': {
  2206. 'impl_func': False,
  2207. 'client_test': False,
  2208. 'decoder_func': 'DoFinish',
  2209. 'defer_reads': True,
  2210. 'trace_level': 1,
  2211. },
  2212. 'Flush': {
  2213. 'impl_func': False,
  2214. 'decoder_func': 'DoFlush',
  2215. 'trace_level': 1,
  2216. },
  2217. 'FlushMappedBufferRange': {
  2218. 'decoder_func': 'DoFlushMappedBufferRange',
  2219. 'trace_level': 1,
  2220. 'unit_test': False,
  2221. 'es3': True,
  2222. },
  2223. 'FramebufferRenderbuffer': {
  2224. 'decoder_func': 'DoFramebufferRenderbuffer',
  2225. 'gl_test_func': 'glFramebufferRenderbufferEXT',
  2226. 'trace_level': 1,
  2227. },
  2228. 'FramebufferTexture2D': {
  2229. 'decoder_func': 'DoFramebufferTexture2D',
  2230. 'gl_test_func': 'glFramebufferTexture2DEXT',
  2231. 'unit_test': False,
  2232. 'trace_level': 1,
  2233. },
  2234. 'FramebufferTexture2DMultisampleEXT': {
  2235. 'decoder_func': 'DoFramebufferTexture2DMultisample',
  2236. 'gl_test_func': 'glFramebufferTexture2DMultisampleEXT',
  2237. 'unit_test': False,
  2238. 'extension': 'EXT_multisampled_render_to_texture',
  2239. 'extension_flag': 'multisampled_render_to_texture',
  2240. 'trace_level': 1,
  2241. },
  2242. 'FramebufferTextureLayer': {
  2243. 'decoder_func': 'DoFramebufferTextureLayer',
  2244. 'es3': True,
  2245. 'unit_test': False,
  2246. 'trace_level': 1,
  2247. },
  2248. 'GenerateMipmap': {
  2249. 'decoder_func': 'DoGenerateMipmap',
  2250. 'gl_test_func': 'glGenerateMipmapEXT',
  2251. 'trace_level': 1,
  2252. },
  2253. 'GenBuffers': {
  2254. 'type': 'GENn',
  2255. 'gl_test_func': 'glGenBuffersARB',
  2256. 'resource_type': 'Buffer',
  2257. 'resource_types': 'Buffers',
  2258. },
  2259. 'GenFramebuffers': {
  2260. 'type': 'GENn',
  2261. 'gl_test_func': 'glGenFramebuffersEXT',
  2262. 'resource_type': 'Framebuffer',
  2263. 'resource_types': 'Framebuffers',
  2264. 'not_shared': 'True',
  2265. },
  2266. 'GenRenderbuffers': {
  2267. 'type': 'GENn', 'gl_test_func': 'glGenRenderbuffersEXT',
  2268. 'resource_type': 'Renderbuffer',
  2269. 'resource_types': 'Renderbuffers',
  2270. },
  2271. 'GenSamplers': {
  2272. 'type': 'GENn',
  2273. 'gl_test_func': 'glGenSamplers',
  2274. 'resource_type': 'Sampler',
  2275. 'resource_types': 'Samplers',
  2276. 'es3': True,
  2277. },
  2278. 'GenTextures': {
  2279. 'type': 'GENn',
  2280. 'gl_test_func': 'glGenTextures',
  2281. 'resource_type': 'Texture',
  2282. 'resource_types': 'Textures',
  2283. },
  2284. 'GenTransformFeedbacks': {
  2285. 'type': 'GENn',
  2286. 'gl_test_func': 'glGenTransformFeedbacks',
  2287. 'resource_type': 'TransformFeedback',
  2288. 'resource_types': 'TransformFeedbacks',
  2289. 'es3': True,
  2290. 'not_shared': 'True',
  2291. },
  2292. 'GetActiveAttrib': {
  2293. 'type': 'Custom',
  2294. 'data_transfer_methods': ['shm'],
  2295. 'cmd_args':
  2296. 'GLidProgram program, GLuint index, uint32_t name_bucket_id, '
  2297. 'void* result',
  2298. 'result': [
  2299. 'int32_t success',
  2300. 'int32_t size',
  2301. 'uint32_t type',
  2302. ],
  2303. },
  2304. 'GetActiveUniform': {
  2305. 'type': 'Custom',
  2306. 'data_transfer_methods': ['shm'],
  2307. 'cmd_args':
  2308. 'GLidProgram program, GLuint index, uint32_t name_bucket_id, '
  2309. 'void* result',
  2310. 'result': [
  2311. 'int32_t success',
  2312. 'int32_t size',
  2313. 'uint32_t type',
  2314. ],
  2315. },
  2316. 'GetActiveUniformBlockiv': {
  2317. 'type': 'Custom',
  2318. 'data_transfer_methods': ['shm'],
  2319. 'result': ['SizedResult<GLint>'],
  2320. 'es3': True,
  2321. },
  2322. 'GetActiveUniformBlockName': {
  2323. 'type': 'Custom',
  2324. 'data_transfer_methods': ['shm'],
  2325. 'cmd_args':
  2326. 'GLidProgram program, GLuint index, uint32_t name_bucket_id, '
  2327. 'void* result',
  2328. 'result': ['int32_t'],
  2329. 'es3': True,
  2330. },
  2331. 'GetActiveUniformsiv': {
  2332. 'type': 'Custom',
  2333. 'data_transfer_methods': ['shm'],
  2334. 'cmd_args':
  2335. 'GLidProgram program, uint32_t indices_bucket_id, GLenum pname, '
  2336. 'GLint* params',
  2337. 'result': ['SizedResult<GLint>'],
  2338. 'es3': True,
  2339. },
  2340. 'GetAttachedShaders': {
  2341. 'type': 'Custom',
  2342. 'data_transfer_methods': ['shm'],
  2343. 'cmd_args': 'GLidProgram program, void* result, uint32_t result_size',
  2344. 'result': ['SizedResult<GLuint>'],
  2345. },
  2346. 'GetAttribLocation': {
  2347. 'type': 'Custom',
  2348. 'data_transfer_methods': ['shm'],
  2349. 'cmd_args':
  2350. 'GLidProgram program, uint32_t name_bucket_id, GLint* location',
  2351. 'result': ['GLint'],
  2352. 'error_return': -1,
  2353. },
  2354. 'GetFragDataIndexEXT': {
  2355. 'type': 'Custom',
  2356. 'data_transfer_methods': ['shm'],
  2357. 'cmd_args':
  2358. 'GLidProgram program, uint32_t name_bucket_id, GLint* index',
  2359. 'result': ['GLint'],
  2360. 'error_return': -1,
  2361. 'extension': 'EXT_blend_func_extended',
  2362. 'extension_flag': 'ext_blend_func_extended',
  2363. },
  2364. 'GetFragDataLocation': {
  2365. 'type': 'Custom',
  2366. 'data_transfer_methods': ['shm'],
  2367. 'cmd_args':
  2368. 'GLidProgram program, uint32_t name_bucket_id, GLint* location',
  2369. 'result': ['GLint'],
  2370. 'error_return': -1,
  2371. 'es3': True,
  2372. },
  2373. 'GetBooleanv': {
  2374. 'type': 'GETn',
  2375. 'result': ['SizedResult<GLboolean>'],
  2376. 'decoder_func': 'DoGetBooleanv',
  2377. 'gl_test_func': 'glGetIntegerv',
  2378. },
  2379. 'GetBooleani_v': {
  2380. 'type': 'GETn',
  2381. 'result': ['SizedResult<GLboolean>'],
  2382. 'decoder_func': 'DoGetBooleani_v',
  2383. 'shadowed': True,
  2384. 'client_test': False,
  2385. 'unit_test': False,
  2386. 'es3': True
  2387. },
  2388. 'GetBufferParameteri64v': {
  2389. 'type': 'GETn',
  2390. 'result': ['SizedResult<GLint64>'],
  2391. 'decoder_func': 'DoGetBufferParameteri64v',
  2392. 'expectation': False,
  2393. 'shadowed': True,
  2394. 'es3': True,
  2395. },
  2396. 'GetBufferParameteriv': {
  2397. 'type': 'GETn',
  2398. 'result': ['SizedResult<GLint>'],
  2399. 'decoder_func': 'DoGetBufferParameteriv',
  2400. 'expectation': False,
  2401. 'shadowed': True,
  2402. },
  2403. 'GetError': {
  2404. 'type': 'Is',
  2405. 'decoder_func': 'GetErrorState()->GetGLError',
  2406. 'impl_func': False,
  2407. 'result': ['GLenum'],
  2408. 'client_test': False,
  2409. },
  2410. 'GetFloatv': {
  2411. 'type': 'GETn',
  2412. 'result': ['SizedResult<GLfloat>'],
  2413. 'decoder_func': 'DoGetFloatv',
  2414. 'gl_test_func': 'glGetIntegerv',
  2415. },
  2416. 'GetFramebufferAttachmentParameteriv': {
  2417. 'type': 'GETn',
  2418. 'decoder_func': 'DoGetFramebufferAttachmentParameteriv',
  2419. 'gl_test_func': 'glGetFramebufferAttachmentParameterivEXT',
  2420. 'result': ['SizedResult<GLint>'],
  2421. },
  2422. 'GetGraphicsResetStatusKHR': {
  2423. 'type': 'NoCommand',
  2424. 'extension': True,
  2425. 'trace_level': 1,
  2426. },
  2427. 'GetInteger64v': {
  2428. 'type': 'GETn',
  2429. 'result': ['SizedResult<GLint64>'],
  2430. 'client_test': False,
  2431. 'decoder_func': 'DoGetInteger64v',
  2432. 'gl_test_func': 'glGetIntegerv',
  2433. 'es3': True
  2434. },
  2435. 'GetIntegerv': {
  2436. 'type': 'GETn',
  2437. 'result': ['SizedResult<GLint>'],
  2438. 'decoder_func': 'DoGetIntegerv',
  2439. 'client_test': False,
  2440. },
  2441. 'GetInteger64i_v': {
  2442. 'type': 'GETn',
  2443. 'result': ['SizedResult<GLint64>'],
  2444. 'decoder_func': 'DoGetInteger64i_v',
  2445. 'shadowed': True,
  2446. 'client_test': False,
  2447. 'unit_test': False,
  2448. 'es3': True
  2449. },
  2450. 'GetIntegeri_v': {
  2451. 'type': 'GETn',
  2452. 'result': ['SizedResult<GLint>'],
  2453. 'decoder_func': 'DoGetIntegeri_v',
  2454. 'shadowed': True,
  2455. 'client_test': False,
  2456. 'unit_test': False,
  2457. 'es3': True
  2458. },
  2459. 'GetInternalformativ': {
  2460. 'type': 'Custom',
  2461. 'data_transfer_methods': ['shm'],
  2462. 'result': ['SizedResult<GLint>'],
  2463. 'cmd_args':
  2464. 'GLenumRenderBufferTarget target, GLenumRenderBufferFormat format, '
  2465. 'GLenumInternalFormatParameter pname, GLint* params',
  2466. 'es3': True,
  2467. },
  2468. 'GetMaxValueInBufferCHROMIUM': {
  2469. 'type': 'Is',
  2470. 'decoder_func': 'DoGetMaxValueInBufferCHROMIUM',
  2471. 'result': ['GLuint'],
  2472. 'unit_test': False,
  2473. 'client_test': False,
  2474. 'extension': True,
  2475. 'impl_func': False,
  2476. },
  2477. 'GetProgramiv': {
  2478. 'type': 'GETn',
  2479. 'decoder_func': 'DoGetProgramiv',
  2480. 'result': ['SizedResult<GLint>'],
  2481. 'expectation': False,
  2482. },
  2483. 'GetProgramInfoCHROMIUM': {
  2484. 'type': 'Custom',
  2485. 'impl_func': False,
  2486. 'extension': 'CHROMIUM_get_multiple',
  2487. 'client_test': False,
  2488. 'cmd_args': 'GLidProgram program, uint32_t bucket_id',
  2489. 'result': [
  2490. 'uint32_t link_status',
  2491. 'uint32_t num_attribs',
  2492. 'uint32_t num_uniforms',
  2493. ],
  2494. },
  2495. 'GetProgramInfoLog': {
  2496. 'type': 'STRn',
  2497. 'expectation': False,
  2498. },
  2499. 'GetProgramInterfaceiv': {
  2500. 'type': 'GETn',
  2501. 'decoder_func': 'DoGetProgramInterfaceiv',
  2502. 'result': ['SizedResult<GLint>'],
  2503. 'unit_test': False,
  2504. 'trace_level': 2,
  2505. 'es31': True,
  2506. },
  2507. 'GetProgramResourceiv': {
  2508. 'type': 'Custom',
  2509. 'data_transfer_methods': ['shm'],
  2510. 'cmd_args':
  2511. 'GLidProgram program, GLenum program_interface, GLuint index, '
  2512. 'uint32_t props_bucket_id, GLint* params',
  2513. 'result': ['SizedResult<GLint>'],
  2514. 'unit_test': False,
  2515. 'trace_level': 2,
  2516. 'es31': True,
  2517. },
  2518. 'GetProgramResourceIndex': {
  2519. 'type': 'Custom',
  2520. 'data_transfer_methods': ['shm'],
  2521. 'cmd_args':
  2522. 'GLidProgram program, GLenum program_interface, '
  2523. 'uint32_t name_bucket_id, GLuint* index',
  2524. 'result': ['GLuint'],
  2525. 'error_return': 'GL_INVALID_INDEX',
  2526. 'unit_test': False,
  2527. 'trace_level': 2,
  2528. 'es31': True,
  2529. },
  2530. 'GetProgramResourceLocation': {
  2531. 'type': 'Custom',
  2532. 'data_transfer_methods': ['shm'],
  2533. 'cmd_args':
  2534. 'GLidProgram program, GLenum program_interface, '
  2535. 'uint32_t name_bucket_id, GLint* location',
  2536. 'result': ['GLint'],
  2537. 'error_return': -1,
  2538. 'unit_test': False,
  2539. 'trace_level': 2,
  2540. 'es31': True,
  2541. },
  2542. 'GetProgramResourceName': {
  2543. 'type': 'Custom',
  2544. 'data_transfer_methods': ['shm'],
  2545. 'cmd_args':
  2546. 'GLidProgram program, GLenum program_interface, GLuint index, '
  2547. 'uint32_t name_bucket_id, void* result',
  2548. 'result': ['int32_t'],
  2549. 'unit_test': False,
  2550. 'trace_level': 2,
  2551. 'es31': True,
  2552. },
  2553. 'GetRenderbufferParameteriv': {
  2554. 'type': 'GETn',
  2555. 'decoder_func': 'DoGetRenderbufferParameteriv',
  2556. 'gl_test_func': 'glGetRenderbufferParameterivEXT',
  2557. 'result': ['SizedResult<GLint>'],
  2558. },
  2559. 'GetSamplerParameterfv': {
  2560. 'type': 'GETn',
  2561. 'decoder_func': 'DoGetSamplerParameterfv',
  2562. 'result': ['SizedResult<GLfloat>'],
  2563. 'es3': True,
  2564. },
  2565. 'GetSamplerParameteriv': {
  2566. 'type': 'GETn',
  2567. 'decoder_func': 'DoGetSamplerParameteriv',
  2568. 'result': ['SizedResult<GLint>'],
  2569. 'es3': True,
  2570. },
  2571. 'GetShaderiv': {
  2572. 'type': 'GETn',
  2573. 'decoder_func': 'DoGetShaderiv',
  2574. 'result': ['SizedResult<GLint>'],
  2575. },
  2576. 'GetShaderInfoLog': {
  2577. 'type': 'STRn',
  2578. 'get_len_func': 'glGetShaderiv',
  2579. 'get_len_enum': 'GL_INFO_LOG_LENGTH',
  2580. 'unit_test': False,
  2581. },
  2582. 'GetShaderPrecisionFormat': {
  2583. 'type': 'Custom',
  2584. 'data_transfer_methods': ['shm'],
  2585. 'cmd_args':
  2586. 'GLenumShaderType shadertype, GLenumShaderPrecision precisiontype, '
  2587. 'void* result',
  2588. 'result': [
  2589. 'int32_t success',
  2590. 'int32_t min_range',
  2591. 'int32_t max_range',
  2592. 'int32_t precision',
  2593. ],
  2594. },
  2595. 'GetShaderSource': {
  2596. 'type': 'STRn',
  2597. 'get_len_func': 'DoGetShaderiv',
  2598. 'get_len_enum': 'GL_SHADER_SOURCE_LENGTH',
  2599. 'unit_test': False,
  2600. 'client_test': False,
  2601. },
  2602. 'GetString': {
  2603. 'type': 'Custom',
  2604. 'client_test': False,
  2605. 'cmd_args': 'GLenumStringType name, uint32_t bucket_id',
  2606. },
  2607. 'GetStringi': {
  2608. 'type': 'NoCommand',
  2609. 'es3': True,
  2610. },
  2611. 'GetSynciv': {
  2612. 'type': 'GETn',
  2613. 'cmd_args': 'GLuint sync, GLenumSyncParameter pname, void* values',
  2614. 'decoder_func': 'DoGetSynciv',
  2615. 'result': ['SizedResult<GLint>'],
  2616. 'es3': True,
  2617. },
  2618. 'GetTexParameterfv': {
  2619. 'type': 'GETn',
  2620. 'decoder_func': 'DoGetTexParameterfv',
  2621. 'result': ['SizedResult<GLfloat>']
  2622. },
  2623. 'GetTexParameteriv': {
  2624. 'type': 'GETn',
  2625. 'decoder_func': 'DoGetTexParameteriv',
  2626. 'result': ['SizedResult<GLint>']
  2627. },
  2628. 'GetTranslatedShaderSourceANGLE': {
  2629. 'type': 'STRn',
  2630. 'get_len_func': 'DoGetShaderiv',
  2631. 'get_len_enum': 'GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE',
  2632. 'unit_test': False,
  2633. 'extension': True,
  2634. },
  2635. 'GetUniformBlockIndex': {
  2636. 'type': 'Custom',
  2637. 'data_transfer_methods': ['shm'],
  2638. 'cmd_args':
  2639. 'GLidProgram program, uint32_t name_bucket_id, GLuint* index',
  2640. 'result': ['GLuint'],
  2641. 'error_return': 'GL_INVALID_INDEX',
  2642. 'es3': True,
  2643. },
  2644. 'GetUniformBlocksCHROMIUM': {
  2645. 'type': 'Custom',
  2646. 'impl_func': False,
  2647. 'extension': True,
  2648. 'client_test': False,
  2649. 'cmd_args': 'GLidProgram program, uint32_t bucket_id',
  2650. 'result': ['uint32_t'],
  2651. 'es3': True,
  2652. },
  2653. 'GetUniformsES3CHROMIUM': {
  2654. 'type': 'Custom',
  2655. 'impl_func': False,
  2656. 'extension': True,
  2657. 'client_test': False,
  2658. 'cmd_args': 'GLidProgram program, uint32_t bucket_id',
  2659. 'result': ['uint32_t'],
  2660. 'es3': True,
  2661. },
  2662. 'GetTransformFeedbackVarying': {
  2663. 'type': 'Custom',
  2664. 'data_transfer_methods': ['shm'],
  2665. 'cmd_args':
  2666. 'GLidProgram program, GLuint index, uint32_t name_bucket_id, '
  2667. 'void* result',
  2668. 'result': [
  2669. 'int32_t success',
  2670. 'int32_t size',
  2671. 'uint32_t type',
  2672. ],
  2673. 'es3': True,
  2674. },
  2675. 'GetTransformFeedbackVaryingsCHROMIUM': {
  2676. 'type': 'Custom',
  2677. 'impl_func': False,
  2678. 'extension': True,
  2679. 'client_test': False,
  2680. 'cmd_args': 'GLidProgram program, uint32_t bucket_id',
  2681. 'result': ['uint32_t'],
  2682. 'es3': True,
  2683. },
  2684. 'GetUniformfv': {
  2685. 'type': 'Custom',
  2686. 'data_transfer_methods': ['shm'],
  2687. 'result': ['SizedResult<GLfloat>'],
  2688. },
  2689. 'GetUniformiv': {
  2690. 'type': 'Custom',
  2691. 'data_transfer_methods': ['shm'],
  2692. 'result': ['SizedResult<GLint>'],
  2693. },
  2694. 'GetUniformuiv': {
  2695. 'type': 'Custom',
  2696. 'data_transfer_methods': ['shm'],
  2697. 'result': ['SizedResult<GLuint>'],
  2698. 'es3': True,
  2699. },
  2700. 'GetUniformIndices': {
  2701. 'type': 'Custom',
  2702. 'data_transfer_methods': ['shm'],
  2703. 'result': ['SizedResult<GLuint>'],
  2704. 'cmd_args': 'GLidProgram program, uint32_t names_bucket_id, '
  2705. 'GLuint* indices',
  2706. 'es3': True,
  2707. },
  2708. 'GetUniformLocation': {
  2709. 'type': 'Custom',
  2710. 'data_transfer_methods': ['shm'],
  2711. 'cmd_args':
  2712. 'GLidProgram program, uint32_t name_bucket_id, GLint* location',
  2713. 'result': ['GLint'],
  2714. # http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformLocation.xml
  2715. 'error_return': -1,
  2716. },
  2717. 'GetVertexAttribfv': {
  2718. 'type': 'GETn',
  2719. 'result': ['SizedResult<GLfloat>'],
  2720. 'impl_func': False,
  2721. 'decoder_func': 'DoGetVertexAttribfv',
  2722. 'expectation': False,
  2723. 'client_test': False,
  2724. },
  2725. 'GetVertexAttribiv': {
  2726. 'type': 'GETn',
  2727. 'result': ['SizedResult<GLint>'],
  2728. 'impl_func': False,
  2729. 'decoder_func': 'DoGetVertexAttribiv',
  2730. 'expectation': False,
  2731. 'client_test': False,
  2732. },
  2733. 'GetVertexAttribIiv': {
  2734. 'type': 'GETn',
  2735. 'result': ['SizedResult<GLint>'],
  2736. 'impl_func': False,
  2737. 'decoder_func': 'DoGetVertexAttribIiv',
  2738. 'expectation': False,
  2739. 'client_test': False,
  2740. 'es3': True,
  2741. },
  2742. 'GetVertexAttribIuiv': {
  2743. 'type': 'GETn',
  2744. 'result': ['SizedResult<GLuint>'],
  2745. 'impl_func': False,
  2746. 'decoder_func': 'DoGetVertexAttribIuiv',
  2747. 'expectation': False,
  2748. 'client_test': False,
  2749. 'es3': True,
  2750. },
  2751. 'GetVertexAttribPointerv': {
  2752. 'type': 'Custom',
  2753. 'data_transfer_methods': ['shm'],
  2754. 'result': ['SizedResult<GLuint>'],
  2755. 'client_test': False,
  2756. },
  2757. 'InvalidateFramebuffer': {
  2758. 'type': 'PUTn',
  2759. 'count': 1,
  2760. 'decoder_func': 'DoInvalidateFramebuffer',
  2761. 'unit_test': False,
  2762. 'es3': True,
  2763. },
  2764. 'InvalidateSubFramebuffer': {
  2765. 'type': 'PUTn',
  2766. 'count': 1,
  2767. 'decoder_func': 'DoInvalidateSubFramebuffer',
  2768. 'unit_test': False,
  2769. 'es3': True,
  2770. },
  2771. 'IsBuffer': {
  2772. 'type': 'Is',
  2773. 'decoder_func': 'DoIsBuffer',
  2774. 'expectation': False,
  2775. },
  2776. 'IsEnabled': {
  2777. 'type': 'Is',
  2778. 'decoder_func': 'DoIsEnabled',
  2779. 'client_test': False,
  2780. 'impl_func': False,
  2781. 'expectation': False,
  2782. },
  2783. 'IsEnablediOES': {
  2784. 'extension_flag': 'oes_draw_buffers_indexed',
  2785. 'unit_test': False,
  2786. 'extension': 'OES_draw_buffers_indexed',
  2787. 'type': 'Is',
  2788. 'decoder_func': 'DoIsEnablediOES',
  2789. 'client_test': False,
  2790. 'impl_func': False,
  2791. 'expectation': False,
  2792. },
  2793. 'IsFramebuffer': {
  2794. 'type': 'Is',
  2795. 'decoder_func': 'DoIsFramebuffer',
  2796. 'expectation': False,
  2797. },
  2798. 'IsProgram': {
  2799. 'type': 'Is',
  2800. 'decoder_func': 'DoIsProgram',
  2801. 'expectation': False,
  2802. },
  2803. 'IsRenderbuffer': {
  2804. 'type': 'Is',
  2805. 'decoder_func': 'DoIsRenderbuffer',
  2806. 'expectation': False,
  2807. },
  2808. 'IsShader': {
  2809. 'type': 'Is',
  2810. 'decoder_func': 'DoIsShader',
  2811. 'expectation': False,
  2812. },
  2813. 'IsSampler': {
  2814. 'type': 'Is',
  2815. 'decoder_func': 'DoIsSampler',
  2816. 'expectation': False,
  2817. 'es3': True,
  2818. },
  2819. 'IsSync': {
  2820. 'type': 'Is',
  2821. 'cmd_args': 'GLuint sync',
  2822. 'decoder_func': 'DoIsSync',
  2823. 'expectation': False,
  2824. 'es3': True,
  2825. },
  2826. 'IsTexture': {
  2827. 'type': 'Is',
  2828. 'decoder_func': 'DoIsTexture',
  2829. 'expectation': False,
  2830. },
  2831. 'IsTransformFeedback': {
  2832. 'type': 'Is',
  2833. 'decoder_func': 'DoIsTransformFeedback',
  2834. 'expectation': False,
  2835. 'es3': True,
  2836. },
  2837. 'GetLastFlushIdCHROMIUM': {
  2838. 'type': 'NoCommand',
  2839. 'impl_func': False,
  2840. 'result': ['GLuint'],
  2841. 'extension': True,
  2842. },
  2843. 'LinkProgram': {
  2844. 'decoder_func': 'DoLinkProgram',
  2845. 'impl_func': False,
  2846. 'trace_level': 1,
  2847. },
  2848. 'MapBufferCHROMIUM': {
  2849. 'type': 'NoCommand',
  2850. 'extension': "CHROMIUM_pixel_transfer_buffer_object",
  2851. 'trace_level': 1,
  2852. },
  2853. 'MapBufferSubDataCHROMIUM': {
  2854. 'type': 'NoCommand',
  2855. 'extension': 'CHROMIUM_map_sub',
  2856. 'pepper_interface': 'ChromiumMapSub',
  2857. 'trace_level': 1,
  2858. },
  2859. 'MapTexSubImage2DCHROMIUM': {
  2860. 'type': 'NoCommand',
  2861. 'extension': "CHROMIUM_sub_image",
  2862. 'pepper_interface': 'ChromiumMapSub',
  2863. 'trace_level': 1,
  2864. },
  2865. 'MapBufferRange': {
  2866. 'type': 'Custom',
  2867. 'data_transfer_methods': ['shm'],
  2868. 'cmd_args': 'GLenumBufferTarget target, GLintptrNotNegative offset, '
  2869. 'GLsizeiptr size, GLbitfieldMapBufferAccess access, '
  2870. 'uint32_t data_shm_id, uint32_t data_shm_offset, '
  2871. 'uint32_t result_shm_id, uint32_t result_shm_offset',
  2872. 'es3': True,
  2873. 'result': ['uint32_t'],
  2874. 'trace_level': 1,
  2875. },
  2876. # MemoryBarrierEXT is in order to avoid the conflicting MemoryBarrier macro
  2877. # in windows.
  2878. 'MemoryBarrierEXT': {
  2879. 'cmd_args': 'GLbitfield barriers',
  2880. 'unit_test': False,
  2881. 'trace_level': 2,
  2882. 'es31': True
  2883. },
  2884. 'MemoryBarrierByRegion': {
  2885. 'cmd_args': 'GLbitfield barriers',
  2886. 'unit_test': False,
  2887. 'trace_level': 2,
  2888. 'es31': True
  2889. },
  2890. 'MultiDrawBeginCHROMIUM': {
  2891. 'decoder_func': 'DoMultiDrawBeginCHROMIUM',
  2892. 'extension': 'WEBGL_multi_draw',
  2893. 'extension_flag': 'webgl_multi_draw',
  2894. 'internal': True,
  2895. 'trace_level': 1,
  2896. 'impl_func': False,
  2897. 'unit_test': False,
  2898. },
  2899. 'MultiDrawEndCHROMIUM': {
  2900. 'decoder_func': 'DoMultiDrawEndCHROMIUM',
  2901. 'extension': 'WEBGL_multi_draw',
  2902. 'extension_flag': 'webgl_multi_draw',
  2903. 'internal': True,
  2904. 'trace_level': 1,
  2905. 'impl_func': False,
  2906. 'unit_test': False,
  2907. },
  2908. 'MultiDrawArraysCHROMIUM': {
  2909. 'type': 'Custom',
  2910. 'cmd_args': 'GLenumDrawMode mode, '
  2911. 'uint32_t firsts_shm_id, uint32_t firsts_shm_offset, '
  2912. 'uint32_t counts_shm_id, uint32_t counts_shm_offset, '
  2913. 'GLsizei drawcount',
  2914. 'extension': 'WEBGL_multi_draw',
  2915. 'extension_flag': 'webgl_multi_draw',
  2916. 'data_transfer_methods': ['shm'],
  2917. 'size_args': {
  2918. 'firsts': 'drawcount * sizeof(GLint)',
  2919. 'counts': 'drawcount * sizeof(GLsizei)', },
  2920. 'defer_draws': True,
  2921. 'impl_func': False,
  2922. 'client_test': False,
  2923. 'internal': True,
  2924. 'trace_level': 2,
  2925. },
  2926. 'MultiDrawArraysInstancedCHROMIUM': {
  2927. 'type': 'Custom',
  2928. 'cmd_args': 'GLenumDrawMode mode, '
  2929. 'uint32_t firsts_shm_id, uint32_t firsts_shm_offset, '
  2930. 'uint32_t counts_shm_id, uint32_t counts_shm_offset, '
  2931. 'uint32_t instance_counts_shm_id, '
  2932. 'uint32_t instance_counts_shm_offset, GLsizei drawcount',
  2933. 'extension': 'WEBGL_multi_draw',
  2934. 'extension_flag': 'webgl_multi_draw',
  2935. 'data_transfer_methods': ['shm'],
  2936. 'size_args': {
  2937. 'firsts': 'drawcount * sizeof(GLint)',
  2938. 'counts': 'drawcount * sizeof(GLsizei)',
  2939. 'instance_counts': 'drawcount * sizeof(GLsizei)', },
  2940. 'defer_draws': True,
  2941. 'impl_func': False,
  2942. 'client_test': False,
  2943. 'internal': True,
  2944. 'trace_level': 2,
  2945. },
  2946. 'MultiDrawArraysInstancedBaseInstanceCHROMIUM': {
  2947. 'type': 'Custom',
  2948. 'cmd_args': 'GLenumDrawMode mode, '
  2949. 'uint32_t firsts_shm_id, uint32_t firsts_shm_offset, '
  2950. 'uint32_t counts_shm_id, uint32_t counts_shm_offset, '
  2951. 'uint32_t instance_counts_shm_id, '
  2952. 'uint32_t instance_counts_shm_offset, '
  2953. 'uint32_t baseinstances_shm_id, '
  2954. 'uint32_t baseinstances_shm_offset, '
  2955. 'GLsizei drawcount',
  2956. 'extension': 'WEBGL_multi_draw_instanced_base_vertex_base_instance',
  2957. 'extension_flag': 'webgl_multi_draw_instanced_base_vertex_base_instance',
  2958. 'data_transfer_methods': ['shm'],
  2959. 'size_args': {
  2960. 'firsts': 'drawcount * sizeof(GLint)',
  2961. 'counts': 'drawcount * sizeof(GLsizei)',
  2962. 'instance_counts': 'drawcount * sizeof(GLsizei)',
  2963. 'baseinstances': 'drawcount * sizeof(GLuint)',
  2964. },
  2965. 'defer_draws': True,
  2966. 'impl_func': False,
  2967. 'client_test': False,
  2968. 'internal': True,
  2969. 'trace_level': 2,
  2970. },
  2971. 'MultiDrawElementsCHROMIUM': {
  2972. 'type': 'Custom',
  2973. 'cmd_args': 'GLenumDrawMode mode, '
  2974. 'uint32_t counts_shm_id, uint32_t counts_shm_offset, '
  2975. 'GLenumIndexType type, '
  2976. 'uint32_t offsets_shm_id, uint32_t offsets_shm_offset, '
  2977. 'GLsizei drawcount',
  2978. 'extension': 'WEBGL_multi_draw',
  2979. 'extension_flag': 'webgl_multi_draw',
  2980. 'data_transfer_methods': ['shm'],
  2981. 'size_args': {
  2982. 'counts': 'drawcount * sizeof(GLsizei)',
  2983. 'offsets': 'drawcount * sizeof(GLsizei)', },
  2984. 'defer_draws': True,
  2985. 'impl_func': False,
  2986. 'client_test': False,
  2987. 'internal': True,
  2988. 'trace_level': 2,
  2989. },
  2990. 'MultiDrawElementsInstancedCHROMIUM': {
  2991. 'type': 'Custom',
  2992. 'cmd_args': 'GLenumDrawMode mode, '
  2993. 'uint32_t counts_shm_id, uint32_t counts_shm_offset, '
  2994. 'GLenumIndexType type, '
  2995. 'uint32_t offsets_shm_id, uint32_t offsets_shm_offset, '
  2996. 'uint32_t instance_counts_shm_id, '
  2997. 'uint32_t instance_counts_shm_offset, GLsizei drawcount',
  2998. 'extension': 'WEBGL_multi_draw',
  2999. 'extension_flag': 'webgl_multi_draw',
  3000. 'data_transfer_methods': ['shm'],
  3001. 'size_args': {
  3002. 'counts': 'drawcount * sizeof(GLsizei)',
  3003. 'offsets': 'drawcount * sizeof(GLsizei)',
  3004. 'instance_counts': 'drawcount * sizeof(GLsizei)', },
  3005. 'defer_draws': True,
  3006. 'impl_func': False,
  3007. 'client_test': False,
  3008. 'internal': True,
  3009. 'trace_level': 2,
  3010. },
  3011. 'MultiDrawElementsInstancedBaseVertexBaseInstanceCHROMIUM': {
  3012. 'type': 'Custom',
  3013. 'cmd_args': 'GLenumDrawMode mode, '
  3014. 'uint32_t counts_shm_id, uint32_t counts_shm_offset, '
  3015. 'GLenumIndexType type, '
  3016. 'uint32_t offsets_shm_id, uint32_t offsets_shm_offset, '
  3017. 'uint32_t instance_counts_shm_id, '
  3018. 'uint32_t instance_counts_shm_offset, '
  3019. 'uint32_t basevertices_shm_id, '
  3020. 'uint32_t basevertices_shm_offset, '
  3021. 'uint32_t baseinstances_shm_id, '
  3022. 'uint32_t baseinstances_shm_offset, '
  3023. 'GLsizei drawcount',
  3024. 'extension': 'WEBGL_multi_draw_instanced_base_vertex_base_instance',
  3025. 'extension_flag': 'webgl_multi_draw_instanced_base_vertex_base_instance',
  3026. 'data_transfer_methods': ['shm'],
  3027. 'size_args': {
  3028. 'counts': 'drawcount * sizeof(GLsizei)',
  3029. 'offsets': 'drawcount * sizeof(GLsizei)',
  3030. 'instance_counts': 'drawcount * sizeof(GLsizei)',
  3031. 'basevertices': 'drawcount * sizeof(GLint)',
  3032. 'baseinstances': 'drawcount * sizeof(GLuint)',
  3033. },
  3034. 'defer_draws': True,
  3035. 'impl_func': False,
  3036. 'client_test': False,
  3037. 'internal': True,
  3038. 'trace_level': 2,
  3039. },
  3040. 'MultiDrawArraysWEBGL': {
  3041. 'type': 'NoCommand',
  3042. 'extension': 'WEBGL_multi_draw',
  3043. 'extension_flag': 'webgl_multi_draw',
  3044. },
  3045. 'MultiDrawArraysInstancedWEBGL': {
  3046. 'type': 'NoCommand',
  3047. 'extension': 'WEBGL_multi_draw',
  3048. 'extension_flag': 'webgl_multi_draw',
  3049. },
  3050. 'MultiDrawArraysInstancedBaseInstanceWEBGL': {
  3051. 'type': 'NoCommand',
  3052. 'extension': 'WEBGL_multi_draw_instanced_base_vertex_base_instance',
  3053. 'extension_flag': 'webgl_multi_draw_instanced_base_vertex_base_instance',
  3054. },
  3055. 'MultiDrawElementsWEBGL': {
  3056. 'type': 'NoCommand',
  3057. 'extension': 'WEBGL_multi_draw',
  3058. 'extension_flag': 'webgl_multi_draw',
  3059. },
  3060. 'MultiDrawElementsInstancedWEBGL': {
  3061. 'type': 'NoCommand',
  3062. 'extension': 'WEBGL_multi_draw',
  3063. 'extension_flag': 'webgl_multi_draw',
  3064. },
  3065. 'MultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL': {
  3066. 'type': 'NoCommand',
  3067. 'extension': 'WEBGL_multi_draw_instanced_base_vertex_base_instance',
  3068. 'extension_flag': 'webgl_multi_draw_instanced_base_vertex_base_instance',
  3069. },
  3070. 'PauseTransformFeedback': {
  3071. 'decoder_func': 'DoPauseTransformFeedback',
  3072. 'unit_test': False,
  3073. 'es3': True,
  3074. },
  3075. 'PixelStorei': {
  3076. 'type': 'Custom',
  3077. 'impl_func': False,
  3078. },
  3079. 'ProduceTextureDirectCHROMIUM': {
  3080. 'decoder_func': 'DoProduceTextureDirectCHROMIUM',
  3081. 'impl_func': False,
  3082. 'type': 'PUT',
  3083. 'count': 16, # GL_MAILBOX_SIZE_CHROMIUM
  3084. 'unit_test': False,
  3085. 'client_test': False,
  3086. 'extension': "CHROMIUM_texture_mailbox",
  3087. 'trace_level': 1,
  3088. },
  3089. 'RenderbufferStorage': {
  3090. 'decoder_func': 'DoRenderbufferStorage',
  3091. 'gl_test_func': 'glRenderbufferStorageEXT',
  3092. 'expectation': False,
  3093. 'trace_level': 1,
  3094. },
  3095. 'RenderbufferStorageMultisampleCHROMIUM': {
  3096. 'cmd_comment':
  3097. '// GL_CHROMIUM_framebuffer_multisample\n',
  3098. 'decoder_func': 'DoRenderbufferStorageMultisampleCHROMIUM',
  3099. 'gl_test_func': 'glRenderbufferStorageMultisampleCHROMIUM',
  3100. 'unit_test': False,
  3101. 'extension': 'chromium_framebuffer_multisample',
  3102. 'extension_flag': 'chromium_framebuffer_multisample',
  3103. 'pepper_interface': 'FramebufferMultisample',
  3104. 'pepper_name': 'RenderbufferStorageMultisampleEXT',
  3105. 'trace_level': 1,
  3106. },
  3107. 'RenderbufferStorageMultisampleAdvancedAMD': {
  3108. 'cmd_comment':
  3109. '// GL_AMD_framebuffer_multisample_advanced\n',
  3110. 'decoder_func': 'DoRenderbufferStorageMultisampleAdvancedAMD',
  3111. 'gl_test_func': 'glRenderbufferStorageMultisampleAdvancedAMD',
  3112. 'unit_test': False,
  3113. 'extension': 'amd_framebuffer_multisample_advanced',
  3114. 'extension_flag': 'amd_framebuffer_multisample_advanced',
  3115. 'trace_level': 1,
  3116. },
  3117. 'RenderbufferStorageMultisampleEXT': {
  3118. 'cmd_comment':
  3119. '// GL_EXT_multisampled_render_to_texture\n',
  3120. 'decoder_func': 'DoRenderbufferStorageMultisampleEXT',
  3121. 'gl_test_func': 'glRenderbufferStorageMultisampleEXT',
  3122. 'unit_test': False,
  3123. 'extension': 'EXT_multisampled_render_to_texture',
  3124. 'extension_flag': 'multisampled_render_to_texture',
  3125. 'trace_level': 1,
  3126. },
  3127. 'ReadBuffer': {
  3128. 'es3': True,
  3129. 'decoder_func': 'DoReadBuffer',
  3130. 'trace_level': 1,
  3131. },
  3132. 'ReadPixels': {
  3133. 'cmd_comment':
  3134. '// ReadPixels has the result separated from the pixel buffer so that\n'
  3135. '// it is easier to specify the result going to some specific place\n'
  3136. '// that exactly fits the rectangle of pixels.\n',
  3137. 'type': 'Custom',
  3138. 'data_transfer_methods': ['shm'],
  3139. 'impl_func': False,
  3140. 'client_test': False,
  3141. 'cmd_args':
  3142. 'GLint x, GLint y, GLsizei width, GLsizei height, '
  3143. 'GLenumReadPixelFormat format, GLenumReadPixelType type, '
  3144. 'uint32_t pixels_shm_id, uint32_t pixels_shm_offset, '
  3145. 'uint32_t result_shm_id, uint32_t result_shm_offset, '
  3146. 'GLboolean async',
  3147. 'result': [
  3148. 'uint32_t success',
  3149. # Below args exclude out-of-bounds area.
  3150. 'int32_t row_length',
  3151. 'int32_t num_rows',
  3152. ],
  3153. 'defer_reads': True,
  3154. 'trace_level': 1,
  3155. },
  3156. 'ReleaseShaderCompiler': {
  3157. 'decoder_func': 'DoReleaseShaderCompiler',
  3158. 'unit_test': False,
  3159. },
  3160. 'ResumeTransformFeedback': {
  3161. 'decoder_func': 'DoResumeTransformFeedback',
  3162. 'unit_test': False,
  3163. 'es3': True,
  3164. },
  3165. 'SamplerParameterf': {
  3166. 'valid_args': {
  3167. '2': 'GL_NEAREST'
  3168. },
  3169. 'decoder_func': 'DoSamplerParameterf',
  3170. 'es3': True,
  3171. },
  3172. 'SamplerParameterfv': {
  3173. 'type': 'PUT',
  3174. 'data_value': 'GL_NEAREST',
  3175. 'count': 1,
  3176. 'gl_test_func': 'glSamplerParameterf',
  3177. 'decoder_func': 'DoSamplerParameterfv',
  3178. 'first_element_only': True,
  3179. 'es3': True,
  3180. },
  3181. 'SamplerParameteri': {
  3182. 'valid_args': {
  3183. '2': 'GL_NEAREST'
  3184. },
  3185. 'decoder_func': 'DoSamplerParameteri',
  3186. 'es3': True,
  3187. },
  3188. 'SamplerParameteriv': {
  3189. 'type': 'PUT',
  3190. 'data_value': 'GL_NEAREST',
  3191. 'count': 1,
  3192. 'gl_test_func': 'glSamplerParameteri',
  3193. 'decoder_func': 'DoSamplerParameteriv',
  3194. 'first_element_only': True,
  3195. 'es3': True,
  3196. },
  3197. 'ShaderBinary': {
  3198. 'type': 'Custom',
  3199. 'client_test': False,
  3200. },
  3201. 'ShaderSource': {
  3202. 'type': 'PUTSTR',
  3203. 'decoder_func': 'DoShaderSource',
  3204. 'expectation': False,
  3205. 'data_transfer_methods': ['bucket'],
  3206. 'cmd_args':
  3207. 'GLuint shader, const char** str',
  3208. 'pepper_args':
  3209. 'GLuint shader, GLsizei count, const char** str, const GLint* length',
  3210. },
  3211. 'StencilMask': {
  3212. 'type': 'StateSetFrontBack',
  3213. 'state': 'StencilMask',
  3214. 'no_gl': True,
  3215. 'expectation': False,
  3216. },
  3217. 'StencilMaskSeparate': {
  3218. 'type': 'StateSetFrontBackSeparate',
  3219. 'state': 'StencilMask',
  3220. 'no_gl': True,
  3221. 'expectation': False,
  3222. },
  3223. 'SwapBuffers': {
  3224. 'impl_func': False,
  3225. 'decoder_func': 'DoSwapBuffers',
  3226. 'client_test': False,
  3227. 'expectation': False,
  3228. 'extension': True,
  3229. 'trace_level': 1,
  3230. 'trace_queueing_flow': True,
  3231. },
  3232. 'TexImage2D': {
  3233. 'type': 'Custom',
  3234. 'impl_func': False,
  3235. 'data_transfer_methods': ['shm'],
  3236. 'client_test': False,
  3237. 'trace_level': 2,
  3238. },
  3239. 'TexImage3D': {
  3240. 'type': 'Custom',
  3241. 'impl_func': False,
  3242. 'data_transfer_methods': ['shm'],
  3243. 'client_test': False,
  3244. 'es3': True,
  3245. 'trace_level': 2,
  3246. },
  3247. 'TexParameterf': {
  3248. 'decoder_func': 'DoTexParameterf',
  3249. 'valid_args': {
  3250. '2': 'GL_NEAREST'
  3251. },
  3252. },
  3253. 'TexParameteri': {
  3254. 'decoder_func': 'DoTexParameteri',
  3255. 'valid_args': {
  3256. '2': 'GL_NEAREST'
  3257. },
  3258. },
  3259. 'TexParameterfv': {
  3260. 'type': 'PUT',
  3261. 'data_value': 'GL_NEAREST',
  3262. 'count': 1,
  3263. 'decoder_func': 'DoTexParameterfv',
  3264. 'gl_test_func': 'glTexParameterf',
  3265. 'first_element_only': True,
  3266. },
  3267. 'TexParameteriv': {
  3268. 'type': 'PUT',
  3269. 'data_value': 'GL_NEAREST',
  3270. 'count': 1,
  3271. 'decoder_func': 'DoTexParameteriv',
  3272. 'gl_test_func': 'glTexParameteri',
  3273. 'first_element_only': True,
  3274. },
  3275. 'TexStorage3D': {
  3276. 'es3': True,
  3277. 'unit_test': False,
  3278. 'decoder_func': 'DoTexStorage3D',
  3279. 'trace_level': 2,
  3280. },
  3281. 'TexSubImage2D': {
  3282. 'type': 'Custom',
  3283. 'impl_func': False,
  3284. 'data_transfer_methods': ['shm'],
  3285. 'client_test': False,
  3286. 'trace_level': 2,
  3287. 'cmd_args': 'GLenumTextureTarget target, GLint level, '
  3288. 'GLint xoffset, GLint yoffset, '
  3289. 'GLsizei width, GLsizei height, '
  3290. 'GLenumTextureFormat format, GLenumPixelType type, '
  3291. 'const void* pixels, GLboolean internal'
  3292. },
  3293. 'TexSubImage3D': {
  3294. 'type': 'Custom',
  3295. 'impl_func': False,
  3296. 'data_transfer_methods': ['shm'],
  3297. 'client_test': False,
  3298. 'trace_level': 2,
  3299. 'cmd_args': 'GLenumTextureTarget target, GLint level, '
  3300. 'GLint xoffset, GLint yoffset, GLint zoffset, '
  3301. 'GLsizei width, GLsizei height, GLsizei depth, '
  3302. 'GLenumTextureFormat format, GLenumPixelType type, '
  3303. 'const void* pixels, GLboolean internal',
  3304. 'es3': True,
  3305. },
  3306. 'TransformFeedbackVaryings': {
  3307. 'type': 'PUTSTR',
  3308. 'data_transfer_methods': ['bucket'],
  3309. 'decoder_func': 'DoTransformFeedbackVaryings',
  3310. 'cmd_args':
  3311. 'GLuint program, const char** varyings, GLenum buffermode',
  3312. 'expectation': False,
  3313. 'es3': True,
  3314. },
  3315. 'Uniform1f': {'type': 'PUTXn', 'count': 1},
  3316. 'Uniform1fv': {
  3317. 'type': 'PUTn',
  3318. 'count': 1,
  3319. 'decoder_func': 'DoUniform1fv',
  3320. },
  3321. 'Uniform1i': {'decoder_func': 'DoUniform1i', 'unit_test': False},
  3322. 'Uniform1iv': {
  3323. 'type': 'PUTn',
  3324. 'count': 1,
  3325. 'decoder_func': 'DoUniform1iv',
  3326. 'unit_test': False,
  3327. },
  3328. 'Uniform1ui': {
  3329. 'type': 'PUTXn',
  3330. 'count': 1,
  3331. 'unit_test': False,
  3332. 'es3': True,
  3333. },
  3334. 'Uniform1uiv': {
  3335. 'type': 'PUTn',
  3336. 'count': 1,
  3337. 'decoder_func': 'DoUniform1uiv',
  3338. 'unit_test': False,
  3339. 'es3': True,
  3340. },
  3341. 'Uniform2i': {'type': 'PUTXn', 'count': 2},
  3342. 'Uniform2f': {'type': 'PUTXn', 'count': 2},
  3343. 'Uniform2fv': {
  3344. 'type': 'PUTn',
  3345. 'count': 2,
  3346. 'decoder_func': 'DoUniform2fv',
  3347. },
  3348. 'Uniform2iv': {
  3349. 'type': 'PUTn',
  3350. 'count': 2,
  3351. 'decoder_func': 'DoUniform2iv',
  3352. },
  3353. 'Uniform2ui': {
  3354. 'type': 'PUTXn',
  3355. 'count': 2,
  3356. 'unit_test': False,
  3357. 'es3': True,
  3358. },
  3359. 'Uniform2uiv': {
  3360. 'type': 'PUTn',
  3361. 'count': 2,
  3362. 'decoder_func': 'DoUniform2uiv',
  3363. 'unit_test': False,
  3364. 'es3': True,
  3365. },
  3366. 'Uniform3i': {'type': 'PUTXn', 'count': 3},
  3367. 'Uniform3f': {'type': 'PUTXn', 'count': 3},
  3368. 'Uniform3fv': {
  3369. 'type': 'PUTn',
  3370. 'count': 3,
  3371. 'decoder_func': 'DoUniform3fv',
  3372. },
  3373. 'Uniform3iv': {
  3374. 'type': 'PUTn',
  3375. 'count': 3,
  3376. 'decoder_func': 'DoUniform3iv',
  3377. },
  3378. 'Uniform3ui': {
  3379. 'type': 'PUTXn',
  3380. 'count': 3,
  3381. 'unit_test': False,
  3382. 'es3': True,
  3383. },
  3384. 'Uniform3uiv': {
  3385. 'type': 'PUTn',
  3386. 'count': 3,
  3387. 'decoder_func': 'DoUniform3uiv',
  3388. 'unit_test': False,
  3389. 'es3': True,
  3390. },
  3391. 'Uniform4i': {'type': 'PUTXn', 'count': 4},
  3392. 'Uniform4f': {'type': 'PUTXn', 'count': 4},
  3393. 'Uniform4fv': {
  3394. 'type': 'PUTn',
  3395. 'count': 4,
  3396. 'decoder_func': 'DoUniform4fv',
  3397. },
  3398. 'Uniform4iv': {
  3399. 'type': 'PUTn',
  3400. 'count': 4,
  3401. 'decoder_func': 'DoUniform4iv',
  3402. },
  3403. 'Uniform4ui': {
  3404. 'type': 'PUTXn',
  3405. 'count': 4,
  3406. 'unit_test': False,
  3407. 'es3': True,
  3408. },
  3409. 'Uniform4uiv': {
  3410. 'type': 'PUTn',
  3411. 'count': 4,
  3412. 'decoder_func': 'DoUniform4uiv',
  3413. 'unit_test': False,
  3414. 'es3': True,
  3415. },
  3416. 'UniformMatrix2fv': {
  3417. 'type': 'PUTn',
  3418. 'count': 4,
  3419. 'decoder_func': 'DoUniformMatrix2fv',
  3420. 'unit_test': False,
  3421. },
  3422. 'UniformMatrix2x3fv': {
  3423. 'type': 'PUTn',
  3424. 'count': 6,
  3425. 'decoder_func': 'DoUniformMatrix2x3fv',
  3426. 'es3': True,
  3427. },
  3428. 'UniformMatrix2x4fv': {
  3429. 'type': 'PUTn',
  3430. 'count': 8,
  3431. 'decoder_func': 'DoUniformMatrix2x4fv',
  3432. 'es3': True,
  3433. },
  3434. 'UniformMatrix3fv': {
  3435. 'type': 'PUTn',
  3436. 'count': 9,
  3437. 'decoder_func': 'DoUniformMatrix3fv',
  3438. 'unit_test': False,
  3439. },
  3440. 'UniformMatrix3x2fv': {
  3441. 'type': 'PUTn',
  3442. 'count': 6,
  3443. 'decoder_func': 'DoUniformMatrix3x2fv',
  3444. 'es3': True,
  3445. },
  3446. 'UniformMatrix3x4fv': {
  3447. 'type': 'PUTn',
  3448. 'count': 12,
  3449. 'decoder_func': 'DoUniformMatrix3x4fv',
  3450. 'es3': True,
  3451. },
  3452. 'UniformMatrix4fv': {
  3453. 'type': 'PUTn',
  3454. 'count': 16,
  3455. 'decoder_func': 'DoUniformMatrix4fv',
  3456. 'unit_test': False,
  3457. },
  3458. 'UniformMatrix4x2fv': {
  3459. 'type': 'PUTn',
  3460. 'count': 8,
  3461. 'decoder_func': 'DoUniformMatrix4x2fv',
  3462. 'es3': True,
  3463. },
  3464. 'UniformMatrix4x3fv': {
  3465. 'type': 'PUTn',
  3466. 'count': 12,
  3467. 'decoder_func': 'DoUniformMatrix4x3fv',
  3468. 'es3': True,
  3469. },
  3470. 'UniformBlockBinding': {
  3471. 'type': 'Custom',
  3472. 'impl_func': False,
  3473. 'es3': True,
  3474. },
  3475. 'UnmapBufferCHROMIUM': {
  3476. 'type': 'NoCommand',
  3477. 'extension': "CHROMIUM_pixel_transfer_buffer_object",
  3478. 'trace_level': 1,
  3479. },
  3480. 'UnmapBufferSubDataCHROMIUM': {
  3481. 'type': 'NoCommand',
  3482. 'extension': 'CHROMIUM_map_sub',
  3483. 'pepper_interface': 'ChromiumMapSub',
  3484. 'trace_level': 1,
  3485. },
  3486. 'UnmapBuffer': {
  3487. 'type': 'Custom',
  3488. 'es3': True,
  3489. 'trace_level': 1,
  3490. },
  3491. 'UnmapTexSubImage2DCHROMIUM': {
  3492. 'type': 'NoCommand',
  3493. 'extension': "CHROMIUM_sub_image",
  3494. 'pepper_interface': 'ChromiumMapSub',
  3495. 'trace_level': 1,
  3496. },
  3497. 'UseProgram': {
  3498. 'type': 'Bind',
  3499. 'decoder_func': 'DoUseProgram',
  3500. },
  3501. 'ValidateProgram': {'decoder_func': 'DoValidateProgram'},
  3502. 'VertexAttrib1f': {'decoder_func': 'DoVertexAttrib1f'},
  3503. 'VertexAttrib1fv': {
  3504. 'type': 'PUT',
  3505. 'count': 1,
  3506. 'decoder_func': 'DoVertexAttrib1fv',
  3507. },
  3508. 'VertexAttrib2f': {'decoder_func': 'DoVertexAttrib2f'},
  3509. 'VertexAttrib2fv': {
  3510. 'type': 'PUT',
  3511. 'count': 2,
  3512. 'decoder_func': 'DoVertexAttrib2fv',
  3513. },
  3514. 'VertexAttrib3f': {'decoder_func': 'DoVertexAttrib3f'},
  3515. 'VertexAttrib3fv': {
  3516. 'type': 'PUT',
  3517. 'count': 3,
  3518. 'decoder_func': 'DoVertexAttrib3fv',
  3519. },
  3520. 'VertexAttrib4f': {'decoder_func': 'DoVertexAttrib4f'},
  3521. 'VertexAttrib4fv': {
  3522. 'type': 'PUT',
  3523. 'count': 4,
  3524. 'decoder_func': 'DoVertexAttrib4fv',
  3525. },
  3526. 'VertexAttribI4i': {
  3527. 'es3': True,
  3528. 'decoder_func': 'DoVertexAttribI4i',
  3529. },
  3530. 'VertexAttribI4iv': {
  3531. 'type': 'PUT',
  3532. 'count': 4,
  3533. 'es3': True,
  3534. 'decoder_func': 'DoVertexAttribI4iv',
  3535. },
  3536. 'VertexAttribI4ui': {
  3537. 'es3': True,
  3538. 'decoder_func': 'DoVertexAttribI4ui',
  3539. },
  3540. 'VertexAttribI4uiv': {
  3541. 'type': 'PUT',
  3542. 'count': 4,
  3543. 'es3': True,
  3544. 'decoder_func': 'DoVertexAttribI4uiv',
  3545. },
  3546. 'VertexAttribIPointer': {
  3547. 'type': 'Custom',
  3548. 'impl_func': False,
  3549. 'cmd_args': 'GLuint indx, GLintVertexAttribSize size, '
  3550. 'GLenumVertexAttribIType type, GLsizei stride, '
  3551. 'GLuint offset',
  3552. 'client_test': False,
  3553. 'es3': True,
  3554. },
  3555. 'VertexAttribPointer': {
  3556. 'type': 'Custom',
  3557. 'impl_func': False,
  3558. 'cmd_args': 'GLuint indx, GLintVertexAttribSize size, '
  3559. 'GLenumVertexAttribType type, GLboolean normalized, '
  3560. 'GLsizei stride, GLuint offset',
  3561. 'client_test': False,
  3562. },
  3563. 'WaitSync': {
  3564. 'type': 'Custom',
  3565. 'cmd_args': 'GLuint sync, GLbitfieldSyncFlushFlags flags, '
  3566. 'GLuint64 timeout',
  3567. 'impl_func': False,
  3568. 'client_test': False,
  3569. 'es3': True,
  3570. 'trace_level': 1,
  3571. },
  3572. 'Scissor': {
  3573. 'type': 'StateSet',
  3574. 'state': 'Scissor',
  3575. 'decoder_func': 'DoScissor',
  3576. },
  3577. 'Viewport': {
  3578. 'impl_func': False,
  3579. 'decoder_func': 'DoViewport',
  3580. },
  3581. 'ResizeCHROMIUM': {
  3582. 'type': 'Custom',
  3583. 'impl_func': False,
  3584. 'client_test': False,
  3585. 'cmd_args': 'GLint width, GLint height, GLfloat scale_factor, GLboolean '
  3586. 'alpha, GLuint shm_id, GLuint shm_offset, GLsizei '
  3587. 'color_space_size',
  3588. 'extension': True,
  3589. 'trace_level': 1,
  3590. },
  3591. 'GetRequestableExtensionsCHROMIUM': {
  3592. 'type': 'Custom',
  3593. 'impl_func': False,
  3594. 'cmd_args': 'uint32_t bucket_id',
  3595. 'extension': True,
  3596. },
  3597. 'RequestExtensionCHROMIUM': {
  3598. 'type': 'Custom',
  3599. 'impl_func': False,
  3600. 'client_test': False,
  3601. 'cmd_args': 'uint32_t bucket_id',
  3602. 'extension': 'CHROMIUM_request_extension',
  3603. },
  3604. 'CopyTextureCHROMIUM': {
  3605. 'decoder_func': 'DoCopyTextureCHROMIUM',
  3606. 'unit_test': False,
  3607. 'extension': "CHROMIUM_copy_texture",
  3608. 'trace_level': 2,
  3609. },
  3610. 'CopySubTextureCHROMIUM': {
  3611. 'decoder_func': 'DoCopySubTextureCHROMIUM',
  3612. 'unit_test': False,
  3613. 'extension': "CHROMIUM_copy_texture",
  3614. 'trace_level': 2,
  3615. },
  3616. 'TexStorage2DEXT': {
  3617. 'unit_test': False,
  3618. 'extension': 'EXT_texture_storage',
  3619. 'extension_flag': 'ext_texture_storage',
  3620. 'decoder_func': 'DoTexStorage2DEXT',
  3621. 'trace_level': 2,
  3622. },
  3623. 'DrawArraysInstancedANGLE': {
  3624. 'type': 'Custom',
  3625. 'impl_func': False,
  3626. 'cmd_args': 'GLenumDrawMode mode, GLint first, GLsizei count, '
  3627. 'GLsizei primcount',
  3628. 'extension': 'ANGLE_instanced_arrays',
  3629. 'pepper_interface': 'InstancedArrays',
  3630. 'defer_draws': True,
  3631. 'trace_level': 2,
  3632. },
  3633. 'DrawArraysInstancedBaseInstanceANGLE': {
  3634. 'type': 'Custom',
  3635. 'impl_func': False,
  3636. 'cmd_args': 'GLenumDrawMode mode, GLint first, GLsizei count, '
  3637. 'GLsizei primcount, GLuint baseinstance',
  3638. 'extension': 'ANGLE_base_vertex_base_instance',
  3639. 'defer_draws': True,
  3640. 'trace_level': 2,
  3641. },
  3642. 'DrawBuffersEXT': {
  3643. 'type': 'PUTn',
  3644. 'decoder_func': 'DoDrawBuffersEXT',
  3645. 'count': 1,
  3646. 'unit_test': False,
  3647. # could use 'extension_flag': 'ext_draw_buffers' but currently expected to
  3648. # work without.
  3649. 'extension': 'EXT_draw_buffers',
  3650. 'pepper_interface': 'DrawBuffers',
  3651. 'trace_level': 2,
  3652. },
  3653. 'DrawElementsInstancedANGLE': {
  3654. 'type': 'Custom',
  3655. 'impl_func': False,
  3656. 'cmd_args': 'GLenumDrawMode mode, GLsizei count, '
  3657. 'GLenumIndexType type, GLuint index_offset, GLsizei primcount',
  3658. 'extension': 'ANGLE_instanced_arrays',
  3659. 'client_test': False,
  3660. 'pepper_interface': 'InstancedArrays',
  3661. 'defer_draws': True,
  3662. 'trace_level': 2,
  3663. },
  3664. 'DrawElementsInstancedBaseVertexBaseInstanceANGLE': {
  3665. 'type': 'Custom',
  3666. 'impl_func': False,
  3667. 'cmd_args': 'GLenumDrawMode mode, GLsizei count, '
  3668. 'GLenumIndexType type, GLuint index_offset, GLsizei primcount, '
  3669. 'GLint basevertex, GLuint baseinstance',
  3670. 'extension': 'ANGLE_base_vertex_base_instance',
  3671. 'client_test': False,
  3672. 'defer_draws': True,
  3673. 'trace_level': 2,
  3674. },
  3675. 'VertexAttribDivisorANGLE': {
  3676. 'type': 'Custom',
  3677. 'impl_func': False,
  3678. 'cmd_args': 'GLuint index, GLuint divisor',
  3679. 'extension': 'ANGLE_instanced_arrays',
  3680. 'pepper_interface': 'InstancedArrays',
  3681. },
  3682. 'GenQueriesEXT': {
  3683. 'type': 'GENn',
  3684. 'gl_test_func': 'glGenQueriesARB',
  3685. 'resource_type': 'Query',
  3686. 'resource_types': 'Queries',
  3687. 'unit_test': False,
  3688. 'pepper_interface': 'Query',
  3689. 'not_shared': 'True',
  3690. 'extension': "occlusion_query_EXT",
  3691. },
  3692. 'DeleteQueriesEXT': {
  3693. 'type': 'DELn',
  3694. 'gl_test_func': 'glDeleteQueriesARB',
  3695. 'resource_type': 'Query',
  3696. 'resource_types': 'Queries',
  3697. 'unit_test': False,
  3698. 'pepper_interface': 'Query',
  3699. 'extension': "occlusion_query_EXT",
  3700. },
  3701. 'IsQueryEXT': {
  3702. 'type': 'NoCommand',
  3703. 'pepper_interface': 'Query',
  3704. 'extension': "occlusion_query_EXT",
  3705. },
  3706. 'BeginQueryEXT': {
  3707. 'type': 'Custom',
  3708. 'impl_func': False,
  3709. 'cmd_args': 'GLenumQueryTarget target, GLidQuery id, void* sync_data',
  3710. 'data_transfer_methods': ['shm'],
  3711. 'gl_test_func': 'glBeginQuery',
  3712. 'pepper_interface': 'Query',
  3713. 'extension': "occlusion_query_EXT",
  3714. },
  3715. 'BeginTransformFeedback': {
  3716. 'decoder_func': 'DoBeginTransformFeedback',
  3717. 'unit_test': False,
  3718. 'es3': True,
  3719. },
  3720. 'EndQueryEXT': {
  3721. 'type': 'Custom',
  3722. 'impl_func': False,
  3723. 'cmd_args': 'GLenumQueryTarget target, GLuint submit_count',
  3724. 'gl_test_func': 'glEndnQuery',
  3725. 'client_test': False,
  3726. 'pepper_interface': 'Query',
  3727. 'extension': "occlusion_query_EXT",
  3728. },
  3729. 'EndTransformFeedback': {
  3730. 'decoder_func': 'DoEndTransformFeedback',
  3731. 'unit_test': False,
  3732. 'es3': True,
  3733. },
  3734. 'FlushDriverCachesCHROMIUM': {
  3735. 'decoder_func': 'DoFlushDriverCachesCHROMIUM',
  3736. 'unit_test': False,
  3737. 'extension': True,
  3738. 'trace_level': 1,
  3739. },
  3740. 'GetQueryivEXT': {
  3741. 'type': 'NoCommand',
  3742. 'gl_test_func': 'glGetQueryiv',
  3743. 'pepper_interface': 'Query',
  3744. 'extension': "occlusion_query_EXT",
  3745. },
  3746. 'QueryCounterEXT' : {
  3747. 'type': 'Custom',
  3748. 'impl_func': False,
  3749. 'cmd_args': 'GLidQuery id, GLenumQueryTarget target, '
  3750. 'void* sync_data, GLuint submit_count',
  3751. 'data_transfer_methods': ['shm'],
  3752. 'gl_test_func': 'glQueryCounter',
  3753. 'extension': "disjoint_timer_query_EXT",
  3754. },
  3755. 'GetQueryObjectivEXT': {
  3756. 'type': 'NoCommand',
  3757. 'gl_test_func': 'glGetQueryObjectiv',
  3758. 'extension': "disjoint_timer_query_EXT",
  3759. },
  3760. 'GetQueryObjectuivEXT': {
  3761. 'type': 'NoCommand',
  3762. 'gl_test_func': 'glGetQueryObjectuiv',
  3763. 'pepper_interface': 'Query',
  3764. 'extension': "occlusion_query_EXT",
  3765. },
  3766. 'GetQueryObjecti64vEXT': {
  3767. 'type': 'NoCommand',
  3768. 'gl_test_func': 'glGetQueryObjecti64v',
  3769. 'extension': "disjoint_timer_query_EXT",
  3770. },
  3771. 'GetQueryObjectui64vEXT': {
  3772. 'type': 'NoCommand',
  3773. 'gl_test_func': 'glGetQueryObjectui64v',
  3774. 'extension': "disjoint_timer_query_EXT",
  3775. },
  3776. 'SetDisjointValueSyncCHROMIUM': {
  3777. 'type': 'Custom',
  3778. 'impl_func': False,
  3779. 'data_transfer_methods': ['shm'],
  3780. 'client_test': False,
  3781. 'cmd_args': 'void* sync_data',
  3782. 'extension': True,
  3783. },
  3784. 'BindFragDataLocationEXT': {
  3785. 'type': 'GLchar',
  3786. 'data_transfer_methods': ['bucket'],
  3787. 'needs_size': True,
  3788. 'gl_test_func': 'DoBindFragDataLocationEXT',
  3789. 'extension': 'EXT_blend_func_extended',
  3790. 'extension_flag': 'ext_blend_func_extended',
  3791. },
  3792. 'BindFragDataLocationIndexedEXT': {
  3793. 'type': 'GLchar',
  3794. 'data_transfer_methods': ['bucket'],
  3795. 'needs_size': True,
  3796. 'gl_test_func': 'DoBindFragDataLocationIndexedEXT',
  3797. 'extension': 'EXT_blend_func_extended',
  3798. 'extension_flag': 'ext_blend_func_extended',
  3799. },
  3800. 'BindUniformLocationCHROMIUM': {
  3801. 'type': 'GLchar',
  3802. 'extension': 'CHROMIUM_bind_uniform_location',
  3803. 'data_transfer_methods': ['bucket'],
  3804. 'needs_size': True,
  3805. 'gl_test_func': 'DoBindUniformLocationCHROMIUM',
  3806. },
  3807. 'InsertEventMarkerEXT': {
  3808. 'type': 'GLcharN',
  3809. 'decoder_func': 'DoInsertEventMarkerEXT',
  3810. 'expectation': False,
  3811. 'extension': 'EXT_debug_marker',
  3812. },
  3813. 'PushGroupMarkerEXT': {
  3814. 'type': 'GLcharN',
  3815. 'decoder_func': 'DoPushGroupMarkerEXT',
  3816. 'expectation': False,
  3817. 'extension': 'EXT_debug_marker',
  3818. },
  3819. 'PopGroupMarkerEXT': {
  3820. 'decoder_func': 'DoPopGroupMarkerEXT',
  3821. 'expectation': False,
  3822. 'extension': 'EXT_debug_marker',
  3823. 'impl_func': False,
  3824. },
  3825. 'GenVertexArraysOES': {
  3826. 'type': 'GENn',
  3827. 'extension': 'OES_vertex_array_object',
  3828. 'gl_test_func': 'glGenVertexArraysOES',
  3829. 'resource_type': 'VertexArray',
  3830. 'resource_types': 'VertexArrays',
  3831. 'unit_test': False,
  3832. 'pepper_interface': 'VertexArrayObject',
  3833. 'not_shared': 'True',
  3834. },
  3835. 'BindVertexArrayOES': {
  3836. 'type': 'Bind',
  3837. 'extension': 'OES_vertex_array_object',
  3838. 'gl_test_func': 'glBindVertexArrayOES',
  3839. 'decoder_func': 'DoBindVertexArrayOES',
  3840. 'gen_func': 'GenVertexArraysOES',
  3841. 'unit_test': False,
  3842. 'client_test': False,
  3843. 'pepper_interface': 'VertexArrayObject',
  3844. },
  3845. 'DeleteVertexArraysOES': {
  3846. 'type': 'DELn',
  3847. 'extension': 'OES_vertex_array_object',
  3848. 'gl_test_func': 'glDeleteVertexArraysOES',
  3849. 'resource_type': 'VertexArray',
  3850. 'resource_types': 'VertexArrays',
  3851. 'unit_test': False,
  3852. 'pepper_interface': 'VertexArrayObject',
  3853. },
  3854. 'IsVertexArrayOES': {
  3855. 'type': 'Is',
  3856. 'extension': 'OES_vertex_array_object',
  3857. 'gl_test_func': 'glIsVertexArrayOES',
  3858. 'decoder_func': 'DoIsVertexArrayOES',
  3859. 'unit_test': False,
  3860. 'pepper_interface': 'VertexArrayObject',
  3861. },
  3862. 'ShallowFinishCHROMIUM': {
  3863. 'type': 'NoCommand',
  3864. 'extension': 'CHROMIUM_ordering_barrier',
  3865. },
  3866. 'OrderingBarrierCHROMIUM': {
  3867. 'type': 'NoCommand',
  3868. 'extension': 'CHROMIUM_ordering_barrier',
  3869. },
  3870. 'TraceBeginCHROMIUM': {
  3871. 'type': 'Custom',
  3872. 'impl_func': False,
  3873. 'client_test': False,
  3874. 'cmd_args': 'GLuint category_bucket_id, GLuint name_bucket_id',
  3875. 'extension': 'CHROMIUM_trace_marker',
  3876. },
  3877. 'TraceEndCHROMIUM': {
  3878. 'impl_func': False,
  3879. 'client_test': False,
  3880. 'decoder_func': 'DoTraceEndCHROMIUM',
  3881. 'unit_test': False,
  3882. 'extension': 'CHROMIUM_trace_marker',
  3883. },
  3884. 'SetActiveURLCHROMIUM': {
  3885. 'type': 'Custom',
  3886. 'impl_func': False,
  3887. 'client_test': False,
  3888. 'cmd_args': 'GLuint url_bucket_id',
  3889. 'extension': True,
  3890. 'chromium': True,
  3891. },
  3892. 'DiscardFramebufferEXT': {
  3893. 'type': 'PUTn',
  3894. 'count': 1,
  3895. 'decoder_func': 'DoDiscardFramebufferEXT',
  3896. 'unit_test': False,
  3897. 'extension': 'EXT_discard_framebuffer',
  3898. 'extension_flag': 'ext_discard_framebuffer',
  3899. 'trace_level': 2,
  3900. },
  3901. 'LoseContextCHROMIUM': {
  3902. 'decoder_func': 'DoLoseContextCHROMIUM',
  3903. 'unit_test': False,
  3904. 'extension': 'CHROMIUM_lose_context',
  3905. 'trace_level': 1,
  3906. },
  3907. 'DiscardBackbufferCHROMIUM': {
  3908. 'type': 'Custom',
  3909. 'extension': True,
  3910. 'trace_level': 2,
  3911. },
  3912. 'InitializeDiscardableTextureCHROMIUM': {
  3913. 'type': 'Custom',
  3914. 'cmd_args': 'GLuint texture_id, uint32_t shm_id, '
  3915. 'uint32_t shm_offset',
  3916. 'impl_func': False,
  3917. 'client_test': False,
  3918. 'extension': True,
  3919. },
  3920. 'UnlockDiscardableTextureCHROMIUM': {
  3921. 'type': 'Custom',
  3922. 'cmd_args': 'GLuint texture_id',
  3923. 'impl_func': False,
  3924. 'client_test': False,
  3925. 'extension': True,
  3926. },
  3927. 'LockDiscardableTextureCHROMIUM': {
  3928. 'type': 'Custom',
  3929. 'cmd_args': 'GLuint texture_id',
  3930. 'impl_func': False,
  3931. 'client_test': False,
  3932. 'extension': True,
  3933. },
  3934. 'WindowRectanglesEXT': {
  3935. 'type': 'PUTn',
  3936. 'count': 4,
  3937. 'decoder_func': 'DoWindowRectanglesEXT',
  3938. 'unit_test': False,
  3939. 'extension': 'EXT_window_rectangles',
  3940. 'extension_flag': 'ext_window_rectangles',
  3941. 'es3': True,
  3942. },
  3943. 'CreateGpuFenceCHROMIUM': {
  3944. 'type': 'NoCommand',
  3945. 'impl_func': False,
  3946. 'cmd_args': 'void',
  3947. 'result': ['GLuint'],
  3948. 'extension': 'CHROMIUM_gpu_fence',
  3949. },
  3950. 'CreateGpuFenceINTERNAL': {
  3951. 'type': 'Custom',
  3952. 'cmd_args': 'GLuint gpu_fence_id',
  3953. 'extension': 'CHROMIUM_gpu_fence',
  3954. 'extension_flag': 'chromium_gpu_fence',
  3955. 'internal': True,
  3956. },
  3957. 'CreateClientGpuFenceCHROMIUM': {
  3958. 'type': 'NoCommand',
  3959. 'impl_func': False,
  3960. 'cmd_args': 'ClientGpuFence source',
  3961. 'result': ['GLuint'],
  3962. 'extension': 'CHROMIUM_gpu_fence',
  3963. 'extension_flag': 'chromium_gpu_fence',
  3964. },
  3965. 'WaitGpuFenceCHROMIUM': {
  3966. 'type': 'Custom',
  3967. 'cmd_args': 'GLuint gpu_fence_id',
  3968. 'extension': 'CHROMIUM_gpu_fence',
  3969. 'extension_flag': 'chromium_gpu_fence',
  3970. },
  3971. 'DestroyGpuFenceCHROMIUM': {
  3972. 'type': 'Custom',
  3973. 'cmd_args': 'GLuint gpu_fence_id',
  3974. 'extension': 'CHROMIUM_gpu_fence',
  3975. 'extension_flag': 'chromium_gpu_fence',
  3976. },
  3977. 'InvalidateReadbackBufferShadowDataCHROMIUM': {
  3978. 'type': 'NoCommand',
  3979. 'impl_func': False,
  3980. 'es3': True,
  3981. 'extension': 'CHROMIUM_nonblocking_readback',
  3982. },
  3983. 'SetReadbackBufferShadowAllocationINTERNAL': {
  3984. 'decoder_func': 'DoSetReadbackBufferShadowAllocationINTERNAL',
  3985. 'client_test': False,
  3986. 'unit_test': False,
  3987. 'impl_func': True,
  3988. 'internal': True,
  3989. 'es3': True,
  3990. },
  3991. 'FramebufferParameteri': {
  3992. 'decoder_func': 'DoFramebufferParameteri',
  3993. 'unit_test': False,
  3994. 'extension': 'MESA_framebuffer_flip_y',
  3995. 'extension_flag': 'mesa_framebuffer_flip_y',
  3996. },
  3997. 'FramebufferTextureMultiviewOVR': {
  3998. 'decoder_func': 'DoFramebufferTextureMultiviewOVR',
  3999. 'unit_test': False,
  4000. 'extension': 'OVR_multiview2',
  4001. 'extension_flag': 'ovr_multiview2',
  4002. 'trace_level': 1,
  4003. 'es3': True
  4004. },
  4005. 'MaxShaderCompilerThreadsKHR': {
  4006. 'cmd_args': 'GLuint count',
  4007. 'unit_test': False,
  4008. 'client_test': False,
  4009. 'extension': 'KHRParallelShaderCompile',
  4010. 'extension_flag': 'khr_parallel_shader_compile',
  4011. },
  4012. 'CreateAndTexStorage2DSharedImageCHROMIUM': {
  4013. 'type': 'NoCommand',
  4014. 'extension': "CHROMIUM_shared_image",
  4015. 'trace_level': 2,
  4016. },
  4017. 'CreateAndTexStorage2DSharedImageWithInternalFormatCHROMIUM': {
  4018. 'type': 'NoCommand',
  4019. 'extension': "CHROMIUM_shared_image",
  4020. 'trace_level': 2,
  4021. },
  4022. 'CreateAndTexStorage2DSharedImageINTERNAL': {
  4023. 'decoder_func': 'DoCreateAndTexStorage2DSharedImageINTERNAL',
  4024. 'internal': True,
  4025. 'type': 'PUT',
  4026. 'count': 16, # GL_MAILBOX_SIZE_CHROMIUM
  4027. 'impl_func': False,
  4028. 'unit_test': False,
  4029. 'trace_level': 2,
  4030. },
  4031. 'BeginSharedImageAccessDirectCHROMIUM': {
  4032. 'decoder_func': 'DoBeginSharedImageAccessDirectCHROMIUM',
  4033. 'extension': 'CHROMIUM_shared_image',
  4034. 'unit_test': False,
  4035. 'client_test': False,
  4036. 'cmd_args': 'GLuint texture, GLenumSharedImageAccessMode mode',
  4037. },
  4038. 'EndSharedImageAccessDirectCHROMIUM': {
  4039. 'decoder_func': 'DoEndSharedImageAccessDirectCHROMIUM',
  4040. 'extension': 'CHROMIUM_shared_image',
  4041. 'unit_test': False,
  4042. }
  4043. }
  4044. def main(argv):
  4045. """This is the main function."""
  4046. parser = OptionParser()
  4047. parser.add_option(
  4048. "--output-dir",
  4049. help="Output directory for generated files. Defaults to chromium root "
  4050. "directory.")
  4051. parser.add_option(
  4052. "-v", "--verbose", action="store_true", help="Verbose logging output.")
  4053. parser.add_option(
  4054. "-c", "--check", action="store_true",
  4055. help="Check if output files match generated files in chromium root "
  4056. "directory. Use this in PRESUBMIT scripts with --output-dir.")
  4057. (options, _) = parser.parse_args(args=argv)
  4058. # Add in states and capabilites to GLState
  4059. gl_state_valid = _NAMED_TYPE_INFO['GLState']['valid']
  4060. gl_state_valid_es3 = _NAMED_TYPE_INFO['GLState']['valid_es3']
  4061. for state_name in sorted(build_cmd_buffer_lib._STATE_INFO):
  4062. state = build_cmd_buffer_lib._STATE_INFO[state_name]
  4063. if 'extension_flag' in state:
  4064. continue
  4065. if 'enum' in state:
  4066. if not state['enum'] in gl_state_valid:
  4067. gl_state_valid.append(state['enum'])
  4068. else:
  4069. for item in state['states']:
  4070. if 'extension_flag' in item:
  4071. continue
  4072. if 'es3' in item:
  4073. assert item['es3']
  4074. if not item['enum'] in gl_state_valid_es3:
  4075. gl_state_valid_es3.append(item['enum'])
  4076. else:
  4077. if not item['enum'] in gl_state_valid:
  4078. gl_state_valid.append(item['enum'])
  4079. for capability in build_cmd_buffer_lib._CAPABILITY_FLAGS:
  4080. if 'extension_flag' in capability:
  4081. continue
  4082. valid_value = "GL_%s" % capability['name'].upper()
  4083. if not valid_value in gl_state_valid:
  4084. gl_state_valid.append(valid_value)
  4085. # This script lives under src/gpu/command_buffer.
  4086. script_dir = os.path.dirname(os.path.abspath(__file__))
  4087. assert script_dir.endswith(os.path.normpath("src/gpu/command_buffer"))
  4088. # os.path.join doesn't do the right thing with relative paths.
  4089. chromium_root_dir = os.path.abspath(script_dir + "/../..")
  4090. # Support generating files under gen/ and for PRESUBMIT.
  4091. if options.output_dir:
  4092. output_dir = options.output_dir
  4093. else:
  4094. output_dir = chromium_root_dir
  4095. os.chdir(output_dir)
  4096. build_cmd_buffer_lib.InitializePrefix("GLES2")
  4097. gen = build_cmd_buffer_lib.GLGenerator(
  4098. options.verbose, "2014", _FUNCTION_INFO, _NAMED_TYPE_INFO,
  4099. chromium_root_dir)
  4100. gen.ParseGLH("gpu/command_buffer/gles2_cmd_buffer_functions.txt")
  4101. gen.WritePepperGLES2Interface("ppapi/api/ppb_opengles2.idl", False)
  4102. gen.WritePepperGLES2Interface("ppapi/api/dev/ppb_opengles2ext_dev.idl", True)
  4103. gen.WriteGLES2ToPPAPIBridge("ppapi/lib/gl/gles2/gles2.c")
  4104. gen.WritePepperGLES2Implementation(
  4105. "ppapi/shared_impl/ppb_opengles2_shared.cc")
  4106. gen.WriteCommandIds("gpu/command_buffer/common/gles2_cmd_ids_autogen.h")
  4107. gen.WriteFormat("gpu/command_buffer/common/gles2_cmd_format_autogen.h")
  4108. gen.WriteFormatTest(
  4109. "gpu/command_buffer/common/gles2_cmd_format_test_autogen.h")
  4110. gen.WriteGLES2InterfaceHeader(
  4111. "gpu/command_buffer/client/gles2_interface_autogen.h")
  4112. gen.WriteGLES2InterfaceStub(
  4113. "gpu/command_buffer/client/gles2_interface_stub_autogen.h")
  4114. gen.WriteGLES2InterfaceStubImpl(
  4115. "gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h")
  4116. gen.WriteGLES2ImplementationHeader(
  4117. "gpu/command_buffer/client/gles2_implementation_autogen.h")
  4118. gen.WriteGLES2Implementation(
  4119. "gpu/command_buffer/client/gles2_implementation_impl_autogen.h")
  4120. gen.WriteGLES2ImplementationUnitTests(
  4121. "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h")
  4122. gen.WriteGLES2TraceImplementationHeader(
  4123. "gpu/command_buffer/client/gles2_trace_implementation_autogen.h")
  4124. gen.WriteGLES2TraceImplementation(
  4125. "gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h")
  4126. gen.WriteGLES2CLibImplementation(
  4127. "gpu/command_buffer/client/gles2_c_lib_autogen.h")
  4128. gen.WriteCmdHelperHeader(
  4129. "gpu/command_buffer/client/gles2_cmd_helper_autogen.h")
  4130. gen.WriteServiceImplementation(
  4131. "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h")
  4132. gen.WritePassthroughServiceImplementation(
  4133. "gpu/command_buffer/service/" +
  4134. "gles2_cmd_decoder_passthrough_handlers_autogen.cc")
  4135. gen.WriteServiceContextStateHeader(
  4136. "gpu/command_buffer/service/context_state_autogen.h")
  4137. gen.WriteServiceContextStateImpl(
  4138. "gpu/command_buffer/service/context_state_impl_autogen.h")
  4139. gen.WriteServiceContextStateTestHelpers(
  4140. "gpu/command_buffer/service/context_state_test_helpers_autogen.h")
  4141. gen.WriteClientContextStateHeader(
  4142. "gpu/command_buffer/client/client_context_state_autogen.h")
  4143. gen.WriteClientContextStateImpl(
  4144. "gpu/command_buffer/client/client_context_state_impl_autogen.h")
  4145. gen.WriteServiceUnitTests(
  4146. "gpu/command_buffer/service/gles2_cmd_decoder_unittest_%d_autogen.h")
  4147. gen.WriteServiceUnitTestsForExtensions(
  4148. "gpu/command_buffer/service/"
  4149. "gles2_cmd_decoder_unittest_extensions_autogen.h")
  4150. gen.WriteServiceUtilsHeader(
  4151. "gpu/command_buffer/service/gles2_cmd_validation_autogen.h")
  4152. gen.WriteServiceUtilsImplementation(
  4153. "gpu/command_buffer/service/"
  4154. "gles2_cmd_validation_implementation_autogen.h")
  4155. gen.WriteCommonUtilsHeader(
  4156. "gpu/command_buffer/common/gles2_cmd_utils_autogen.h")
  4157. gen.WriteCommonUtilsImpl(
  4158. "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h")
  4159. gen.WriteGLES2Header("gpu/GLES2/gl2chromium_autogen.h")
  4160. build_cmd_buffer_lib.Format(gen.generated_cpp_filenames, output_dir,
  4161. chromium_root_dir)
  4162. if gen.errors > 0:
  4163. print("build_gles2_cmd_buffer.py: Failed with %d errors" % gen.errors)
  4164. return 1
  4165. check_failed_filenames = []
  4166. if options.check:
  4167. for filename in gen.generated_cpp_filenames:
  4168. if not filecmp.cmp(os.path.join(output_dir, filename),
  4169. os.path.join(chromium_root_dir, filename)):
  4170. check_failed_filenames.append(filename)
  4171. if len(check_failed_filenames) > 0:
  4172. print('Please run gpu/command_buffer/build_gles2_cmd_buffer.py')
  4173. print('Failed check on autogenerated command buffer files:')
  4174. for filename in check_failed_filenames:
  4175. print(filename)
  4176. return 1
  4177. return 0
  4178. if __name__ == '__main__':
  4179. sys.exit(main(sys.argv[1:]))