Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. Ñò
  2. ÔX«Lc@s¿defd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd    „ƒYZd
  3. efd „ƒYZd efd
  4. „ƒYZd„Z      e
  5. djo e    ƒndS(t     SpecErrorcBseZRS((t__name__t
  6. __module__(((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRstSpeccBs#eZd„Zd„Zd„ZRS(cCs4||_|iƒ|_h|_h|_d|_|ii}x|oˆ|idjok|i    djo||i|i
  7. dƒ<qÄ|i        djo||i|i
  8. dƒ<qÄt d|i  ƒ‚n|i }qBWxA|ii
  9. ƒD]0\}}|i
  10. dƒdjo||_PqâqâW|ipt dƒ‚ndS(      Ntelementttemplatetnametapisunexpected node %s in apispectimplementationttrues unable to find an implementation(tdoctgetRootElementt      spec_nodet
  11. tmpl_nodest  api_nodestNonet  impl_nodetchildrenttypeRtpropRtnextt iteritems(tselfR
  12. tnodeR((s)/home/serge/Mesa/src/mesa/main/APIspec.pyt__init__"s.                                      
  13. cCst||iƒS(N(tAPIR(R((s)/home/serge/Mesa/src/mesa/main/APIspec.pytget_impl?scCst||i|ƒS(N(RR(RR((s)/home/serge/Mesa/src/mesa/main/APIspec.pytget_apiCs(RRRRR(((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRs              RcBseZd„Zhd„ZRS(c Csu|idƒ|_|idƒdj|_g|_g|_g}|i}x|oˆ|idjok|idjo#|idƒ}|ii|ƒqÐ|idjo|i|ƒqÐtd|iƒ‚n|i        }qNWx|D]ˆ}|i
  14. |idƒ}yt |||i|iƒ}Wn:tj
  15. o.} |idƒ}
  16. td   |
  17. |      fƒ‚nX|ii|ƒqåWdS(
  18. NRRR Rtcategorytfunctionsunexpected node %s in apiRsfailed to parse %s: %s( RRtis_implt
  19. categoriest  functionsRRtappendRRR
  20. tFunction( Rtspectapi_nodet
  21. func_nodesRtcatt     func_nodet   tmpl_nodetfunctet    func_name((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRKs4                    cCsed}t}xL|iD]A}|i||ƒ\}}|o|}|}|pPqWqqW||fS(N(RtFalseR tmatch(RR)t conversionsR-t        need_convtftmatchedtconv((s)/home/serge/Mesa/src/mesa/main/APIspec.pyR-ks
  22. 
  23. (RRRR-(((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRHs  R"cBsbeZegd„Zd„Zd„Zd„Zd„Zd„Zd„Z   d„Z
  24. hd„Z RS(        cCsX|idƒ|_|idƒ|_|idƒ|_|idƒ|_|idƒdj|_|o
  25. t|_n|idƒdj|_||_|idƒ|_        |i
  26. dƒot |idƒƒ|_ n
  27. d     |_ |id
  28. ƒdj|_
  29. d |_g}|i}x:|o2|id jo|id
  30. joPn|i}qW|ptdƒ‚n|i}xË|oÃ|id jo¦|idjo|idƒ|_q)|idjp|idjoI|i|ƒo5|i
  31. o|idƒdjp|i|ƒqq%q)td|iƒ‚n|i}qlW|i|ƒ|i||ƒdS(NRt  directiontdefault_prefixtexternalR   t    skip_desctgltypet vector_sizeit
  32. expand_vectortvoidRtprotosno prototreturnRtparamtvectorthide_if_expandedsunexpected node %s in proto(Rt      tmpl_nameR3Rtprefixt is_externaltTruet
  33. _skip_desct _categoriest_gltypethasProptintt _vector_sizet_expand_vectort return_typeRRRRt support_nodeR!t _init_paramst _init_descs(RR(R'tforce_skip_descRt param_nodest
  34. proto_nodeR((s)/home/serge/Mesa/src/mesa/main/APIspec.pyR}sN
  35.                    
  36. 
  37. cCs&d|i|i|i|itƒfS(Ns %s %s%s(%s)(RKRARt param_stringRC(R((s)/home/serge/Mesa/src/mesa/main/APIspec.pyt__str__²scCseg|_xU|D]M}|i|ƒ}|idjp |i o,t||i|ƒ}|ii|ƒqn| p||iƒjotd|iƒ‚ng}|i  }xz|or|i
  38. djoU|idjoE|i |ƒo5|it||iƒƒt |ƒ|joPqn|i
  39. }q°Wt |ƒ|jotdƒ‚n|ii|ƒqWdS(NR=s2could not expand %s with unknown or mismatch sizesRsnot enough named parameters(tparamstparam_node_sizeRRJt      ParameterRFR!t lsCountNodeRRRRLtlenRtextend(RRPt
  40. param_nodetsizeR=texpanded_paramstchild((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRM¶s0            cCs­tƒ|_|iodS|i}xo|og|idjoJ|idjo:|i|ƒo&t||iƒ}|ii    |ƒqˆn|i
  41. }q'W|ii ||ƒdS(NRtdesc( tCheckertcheckerRDRRRRLt DescriptionREtadd_descRtvalidate(RR(RPRR^((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRNÖs 
  42.       cCs'|idƒ p|idƒ|ijS(NR(RGRRE(RR((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRLçscCs-x&|iD]}|i|jo|Sq
  43. WdS(N(RTRR(RRR=((s)/home/serge/Mesa/src/mesa/main/APIspec.pyt   get_paramìs
  44. 
  45.    cCs|idjodS|idƒ}|iƒot|ƒ}nd}|p/|i}| o|io|iƒ}q}n|S(NR>iR[(RRtisdigitRHRIRJRW(RR=R[((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRUós
  46.  cCs®g}|opxQ|iD]F}|iidƒodnd}|id|i||ifƒqW|p|idƒq¡n%x!|iD]}|i|iƒq‡Wdi|ƒS(Nt*tt s%s%s%sR:s, (RTRtendswithR!Rtjoin(Rt declarationtargsR=tsep((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRRs
  47.  $
  48. cCs|i|ijp2|i|ijpt|iƒt|iƒjo ttfSt}x¸tt|iƒƒD]¡}|i|}|i|}|i|ijp|i|ijo ttfS|i|ijo=|i ƒ|i
  49. |i   ƒgƒjo
  50. t }q
  51. ttfSqlqlWt |fS(N( R@RKRXRTR,txranget  is_vectorR[Rt base_typetgetRC(RtotherR.R/titsrctdst((s)/home/serge/Mesa/src/mesa/main/APIspec.pyR-s  
  52. 
  53. & %
  54. ( RRR,RRSRMRNRLRdRURRR-(((s)/home/serge/Mesa/src/mesa/main/APIspec.pyR"zs5                                                RVcBs eZddd„Zd„ZRS(icCs“|idj|_|idƒ|_||_|idƒ}|o|id|ƒ}n.|idƒdjotd|iƒ‚n||_dS(NR>RRtGLtypeiÿÿÿÿs parameter %s has unresolved type(RRoRR[treplacetfindRR(RRZR7R[R((s)/home/serge/Mesa/src/mesa/main/APIspec.pyR,s     cCsCg}|iidƒD]!}|idƒo ||qq~dS(NRhtGLi(Rtsplitt
  55. startswith(Rt_[1]tt((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRp:sN(RRRRRp(((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRV)sR_cBsPeZd„Zd„Zd„Zdd„Zd„Zdd„Zdd„Z     RS(    cCsh|_h|_dS(N(tswitchestswitch_constants(R((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRDs  cCsddddg}|i|ijoIg|i|i<h|i|i<x&|D]}d|i|i|<qLWn|i|i}xƒ|D]{}t||ƒdj      o_||dj        o7||t||ƒjotd||ifƒ‚nt||ƒ||<q…q…W|i|ii|ƒdS(Ntindexterrortconverttsize_strsmismatch %s for %s(RR~RRtgetattrRR!(RR^t const_attrstattrtconsts((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRbHs cCs²tƒ}xŠ|iiƒD]y}g}x2|D]*}|i||ƒo|i|ƒq,q,W|ptSx)|D]!}|ip|i|ƒqmqmWqW|i|_|i|_t       S(N(
  56. R_R~t
  57. itervaluesRcR!R,t_is_noopRbRRC(RR)RPttmptswitcht valid_descsR^((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRc]s"    
  58.   cCswg}xj|iiƒD]Y}xP|D]H}| p|i|jo|i|ƒn|i|ii|ƒƒq#WqW|S(N(R~RˆRR!RYR`tflatten(RRt       flat_listR‹R^((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRqs!cCst||ijotSxX|iiƒD]G}t}x,|D]$}|ii|ƒp t}Pq8q8W|otSq%WtS(N(R~RCRˆR`t always_checkR,(RRR‹talwaysR^((s)/home/serge/Mesa/src/mesa/main/APIspec.pyR{s          s  c
  59. Cs›|ii|gƒ}t}x"|D]}|io
  60. t}q"q"W|pgSg}|di}|didjo|d|di7}n|id|ƒx°|D]¨}|io˜x"|iD]}|id|ƒq¾Wx[|iii  ƒD]G}       g}
  61. |ii
  62. |      |ƒD]} |
  63. || q ~
  64. } |i | ƒqìW|i|dƒq¤q¤W|idƒ|i|d|di ƒ|i|dƒ|idƒ|S(      Nis[%d]s!switch (%s) { /* assume GLenum */scase %s:sbreak;sdefault:s
  65. ON_ERROR(%s);t}(
  66. R~RqR,tvaluesRCRR€R!R`titerkeyst    _c_switchRYR(
  67. RRtindentR‹t need_switchR^tstmtstvartvaltdep_nameR|tst   dep_stmts((s)/home/serge/Mesa/src/mesa/main/APIspec.pyR”Œs:
  68. 
  69. 
  70. 
  71. 4
  72. 
  73. cCsAg}x4|iiƒD]#}|i|ƒ}di|ƒGHqWdS(Ns
  74. (R~R“R”Rj(RR•R—Rtc_switch((s)/home/serge/Mesa/src/mesa/main/APIspec.pytdump­s
  75. N(
  76. RRRRbRcRRRR”Rž(((s)/home/serge/Mesa/src/mesa/main/APIspec.pyR_?s                    
  77.          !RacBs;eZgd„Zd„Zdd„Zd„Zd„ZRS(c Csz||_t|_|idƒ|_d|_|idƒpd|_|idƒ|_t|_g|_    g}dddg}|i
  78. }x¥|o|i d   jo€|i|jo=|id
  79. ƒo)|id
  80. ƒ|ijo|i }q‹qnt
  81. d |iƒ‚|idjoK|idƒ}|i o|id ƒo
  82. t|_n|i     i|ƒq"|idjo¤t|id
  83. ƒƒ}t|idƒƒ}|idƒpd}     |i o|   id ƒo
  84. t|_nxFt||dƒD] }
  85. |i   id|        |
  86. fƒqéWq"|i|ƒn|i }q‹W|i |_|idƒo|idƒdj|_n|i|ƒdS(NRiÿÿÿÿRtGL_INVALID_ENUMR8tvaluetrangeR^RRsunexpected node %s in desctGL_tfromttotbaseRgis%s%dR‚R    (RER,R‰RRR€RRƒt       _has_enumR’RRRRR{RCR!RHRnR‚RGt
  87. _init_deps( Rt        desc_nodeRt      dep_nodest valid_namesRR™tfirsttlastR¥Rs((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRºsP                                  
  88. 
  89. "
  90. cCsCtƒ|_x0|D](}t||iƒ}|ii|ƒqWdS(N(R_R`RaRERb(RR©tdep_nodetdep((s)/home/serge/Mesa/src/mesa/main/APIspec.pyR§ðs
  91.  cCs÷d}d}|p
  92. |i}nxÊ|D]Â}||idƒjo
  93. |}n‘|idjo€|i}d}xn|ob|idjoE|idjo5||idƒjo|}|}Pn|d7}n|i}qoWn|oPq'q'W||fS(NiÿÿÿÿRR>iRR=i(RRRRRR(RRPRRZt param_indexRR]tidx((s)/home/serge/Mesa/src/mesa/main/APIspec.pyt_search_param_nodeùs.
  94. 
  95.        c  Cs|i|iƒ}d}|pÚ|i|ƒ\}}|p td|i|ifƒ‚n|djo"|i|idƒƒ}|}qù|idjo[|ioM|iiƒo=t|iƒ}|i|ƒ}||jot        ddfSqõqùnt ||fS(Niÿÿÿÿsinvalid desc %s in %siRR>( RdRR±RRRƒReRHRUR,RRC(     RR)RPR=R¯RR€R[t
  96. expanded_size((s)/home/serge/Mesa/src/mesa/main/APIspec.pyt _find_finals"
  97. 
  98. 
  99. cCs'|iio"|i otd|iƒ‚n|i||ƒ\}}}|ptS|pt|_tS|i        o]|i
  100. o
  101. d|_ n|i o8|i o.|i i
  102. ƒo|i t|i ƒjotSn"|i otd|iƒ‚n|ii||ƒptS|i|_||_tS(Nsno valid values for %st1svector_size is invalid for %s(R`R~R’RRR³R,RCR‰RoR¦RƒR[ReRHRcR€(RR)RPtvalidR=R¯((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRc.s*  
  103. 
  104. 
  105. $   
  106.         N(RRRR§RR±R³Rc(((s)/home/serge/Mesa/src/mesa/main/APIspec.pyRaµs
  107.  6               cCs‘ddk}d}ddg}|i|d|i|i|iƒ}t|ƒ}|iƒ}x|D]}|i|ƒqcW|i   ƒd|GHdS(Niÿÿÿÿs APIspec.xmlsGLES1.1sGLES2.0s%s is successfully parsed(
  108. tlibxml2treadFileRtXML_PARSE_DTDLOADtXML_PARSE_DTDVALIDtXML_PARSE_NOBLANKSRRRtfreeDoc(R¶tfilenametapinamesR
  109. R#timpltapiname((s)/home/serge/Mesa/src/mesa/main/APIspec.pytmainSs   
  110. 
  111.   
  112. t__main__N( t   ExceptionRtobjectRRR"RVR_RaRÀR(((s)/home/serge/Mesa/src/mesa/main/APIspec.pyt<module>s)2¯vž   
  113.