1848b8605Smrg<!ELEMENT OpenGLAPI (category?, xi:include?, OpenGLAPI?)+> 2848b8605Smrg<!ELEMENT category (type*, enum*, function*)*> 3848b8605Smrg<!ELEMENT type EMPTY> 4848b8605Smrg<!ELEMENT enum (size*)> 5848b8605Smrg<!ELEMENT size EMPTY> 6848b8605Smrg<!ELEMENT function (param*, return?, glx?)*> 7848b8605Smrg<!ELEMENT param EMPTY> 8848b8605Smrg<!ELEMENT return EMPTY> 9848b8605Smrg<!ELEMENT glx EMPTY> 10848b8605Smrg 11848b8605Smrg<!ELEMENT xi:include (xi:fallback)?> 12848b8605Smrg<!ATTLIST xi:include 13848b8605Smrg xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude" 14848b8605Smrg href CDATA #REQUIRED 15848b8605Smrg parse (xml|text) "xml" 16848b8605Smrg encoding CDATA #IMPLIED> 17848b8605Smrg<!ELEMENT xi:fallback ANY> 18848b8605Smrg<!ATTLIST xi:fallback 19848b8605Smrg xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"> 20848b8605Smrg 21848b8605Smrg 22848b8605Smrg<!ATTLIST category name NMTOKEN #REQUIRED 23848b8605Smrg number NMTOKEN #IMPLIED 24848b8605Smrg window_system NMTOKEN #IMPLIED> 25848b8605Smrg<!ATTLIST type name NMTOKEN #REQUIRED 26848b8605Smrg size NMTOKEN #REQUIRED 27848b8605Smrg float (true | false) "false" 28848b8605Smrg unsigned (true | false) "false" 29848b8605Smrg pointer (true | false) "false" 30848b8605Smrg glx_name NMTOKEN #IMPLIED> 31848b8605Smrg<!ATTLIST enum name NMTOKEN #REQUIRED 32848b8605Smrg count CDATA #IMPLIED 33848b8605Smrg value NMTOKEN #REQUIRED> 34848b8605Smrg<!ATTLIST function name NMTOKEN #REQUIRED 35848b8605Smrg alias NMTOKEN #IMPLIED 36848b8605Smrg vectorequiv NMTOKEN #IMPLIED 37848b8605Smrg es1 CDATA "none" 38848b8605Smrg es2 CDATA "none" 39848b8605Smrg deprecated CDATA "none" 40848b8605Smrg exec NMTOKEN #IMPLIED 41b8e80941Smrg desktop (true | false) "true" 42b8e80941Smrg marshal NMTOKEN #IMPLIED 43b8e80941Smrg marshal_fail CDATA #IMPLIED> 44848b8605Smrg<!ATTLIST size name NMTOKEN #REQUIRED 45848b8605Smrg count NMTOKEN #IMPLIED 46848b8605Smrg mode (get | set) "set"> 47848b8605Smrg<!ATTLIST param name NMTOKEN #REQUIRED 48848b8605Smrg type CDATA #REQUIRED 49848b8605Smrg client_only (true | false) "false" 50848b8605Smrg count NMTOKEN #IMPLIED 51848b8605Smrg counter (true | false) "false" 52848b8605Smrg count_scale NMTOKEN "1" 53848b8605Smrg output (true | false) "false" 54848b8605Smrg padding (true | false) "false" 55848b8605Smrg img_width NMTOKEN #IMPLIED 56848b8605Smrg img_height NMTOKEN #IMPLIED 57848b8605Smrg img_depth NMTOKEN #IMPLIED 58848b8605Smrg img_extent NMTOKEN #IMPLIED 59848b8605Smrg img_xoff NMTOKEN #IMPLIED 60848b8605Smrg img_yoff NMTOKEN #IMPLIED 61848b8605Smrg img_zoff NMTOKEN #IMPLIED 62848b8605Smrg img_woff NMTOKEN #IMPLIED 63848b8605Smrg img_format NMTOKEN #IMPLIED 64848b8605Smrg img_type NMTOKEN #IMPLIED 65848b8605Smrg img_target NMTOKEN #IMPLIED 66848b8605Smrg img_send_null (true | false) "false" 67848b8605Smrg img_null_flag (true | false) "false" 68848b8605Smrg img_pad_dimensions (true | false) "false" 69848b8605Smrg variable_param NMTOKENS #IMPLIED> 70848b8605Smrg<!ATTLIST return type CDATA "void"> 71848b8605Smrg<!ATTLIST glx rop NMTOKEN #IMPLIED 72848b8605Smrg sop NMTOKEN #IMPLIED 73848b8605Smrg vendorpriv NMTOKEN #IMPLIED 74848b8605Smrg large (true | false) "false" 75848b8605Smrg doubles_in_order (true | false) "false" 76848b8605Smrg always_array (true | false) "false" 77848b8605Smrg handcode (true | false | client | server) "false" 78848b8605Smrg img_reset NMTOKEN #IMPLIED 79848b8605Smrg dimensions_in_reply (true | false) "false" 80848b8605Smrg ignore (true | false) "false"> 81848b8605Smrg 82848b8605Smrg<!-- 83848b8605SmrgThe various attributes for param and glx have the meanings listed below. 84848b8605SmrgWhen adding new functions, please annote them correctly. In most cases this 85848b8605Smrgwill just mean adding a '<glx ignore="true"/>' tag. 86848b8605Smrg 87848b8605Smrgparam: 88848b8605Smrg name - name of the parameter 89848b8605Smrg type - fully qualified type (e.g., with "const", etc.) 90848b8605Smrg client_only - boolean flag set on parameters which are interpreted only 91848b8605Smrg by the client and are not present in the protocol encoding (e.g., 92848b8605Smrg the stride parameters to Map1f, etc.) 93848b8605Smrg count - for counted arrays (e.g., the 'lists' parameter to glCallLists), 94848b8605Smrg the parameter or literal that represents the count. For functions 95b8e80941Smrg like glVertex3fv it will be a literal, for others it will be one of 96848b8605Smrg the parameters. 97848b8605Smrg counter - this parameter is a counter that will be referenced by the 98848b8605Smrg 'count' attribute in another parameter. 99848b8605Smrg count_scale - literal value scale factor for the 'count' attribute. 100848b8605Smrg See ProgramParameters4dvNV for an example. 101848b8605Smrg output - this parameter is used to store the output of the function. 102848b8605Smrg variable_param - name of parameter used to determine the number of 103848b8605Smrg elements referenced by this parameter. This should be the name of a 104848b8605Smrg single enum parameter. Most of the gl*Parameter[if]v functions use 105848b8605Smrg this. Additionally, the enums that can be passed should be properly 106848b8605Smrg annotated. 107848b8605Smrg img_width / img_height / img_depth / img_extent - name of parameters 108848b8605Smrg (or hardcoded integer) used for the dimensions of pixel data. 109848b8605Smrg img_xoff / img_yoff / img_zoff / img_woff - name of parameters used 110848b8605Smrg for x, y, z, and w offsets of pixel data. 111848b8605Smrg img_format - name of parameter used as the pixel data format. 112848b8605Smrg img_type - name of parameter used as the pixel data type. 113848b8605Smrg img_target - name of parameter used as a texture target. Non-texture 114848b8605Smrg pixel data should hardcode 0. 115848b8605Smrg img_send_null - boolean flag to determine if blank pixel data should 116848b8605Smrg be sent when a NULL pointer is passed. This is only used by 117848b8605Smrg TexImage1D and TexImage2D. 118848b8605Smrg img_null_flag - boolean flag to determine if an extra flag is used to 119848b8605Smrg determine if a NULL pixel pointer was passed. This is used by 120848b8605Smrg TexSubImage1D, TexSubImage2D, TexImage3D and others. 121848b8605Smrg img_pad_dimensions - boolean flag to determine if dimension data and 122848b8605Smrg offset data should be padded to the next even number of dimensions. 123848b8605Smrg For example, this will insert an empty "height" field after the 124848b8605Smrg "width" field in the protocol for TexImage1D. 125b8e80941Smrg marshal - One of "sync", "async", "draw", or "custom", defaulting to 126b8e80941Smrg async unless one of the arguments is something we know we can't 127b8e80941Smrg codegen for. If "sync", we finish any queued glthread work and call 128b8e80941Smrg the Mesa implementation directly. If "async", we queue the function 129b8e80941Smrg call to be performed by glthread. If "custom", the prototype will be 130b8e80941Smrg generated but a custom implementation will be present in marshal.c. 131b8e80941Smrg If "draw", it will follow the "async" rules except that "indices" are 132b8e80941Smrg ignored (since they may come from a VBO). 133b8e80941Smrg marshal_fail - an expression that, if it evaluates true, causes glthread 134b8e80941Smrg to switch back to the Mesa implementation and call it directly. Used 135b8e80941Smrg to disable glthread for GL compatibility interactions that we don't 136b8e80941Smrg want to track state for. 137848b8605Smrg 138848b8605Smrgglx: 139848b8605Smrg rop - Opcode value for "render" commands 140848b8605Smrg sop - Opcode value for "single" commands 141848b8605Smrg vendorpriv - Opcode value for vendor private (or vendor private with 142848b8605Smrg reply) commands 143848b8605Smrg large - set to "true" of the render command can use RenderLarge protocol. 144848b8605Smrg doubles_in_order - older commands always put GLdouble data at the 145848b8605Smrg start of the render packet. Newer commands (e.g., 146848b8605Smrg ProgramEnvParameter4dvARB) put the in the order that they appear 147848b8605Smrg in the parameter list. 148848b8605Smrg always_array - some single commands take reply data as an array or as 149848b8605Smrg return value data (e.g., glGetLightfv). Other single commands take 150848b8605Smrg reply data only as an array (e.g., glGetClipPlane). 151848b8605Smrg handcode - some functions are just too complicated to generate 152848b8605Smrg (e.g., glSeperableFilter2D) or operate only on client-side data 153848b8605Smrg (e.g., glVertexPointer) and must be handcoded. 154848b8605Smrg ignore - some functions have an entry in the dispatch table, but aren't 155848b8605Smrg suitable for protocol implementation (e.g., glLockArraysEXT). This 156848b8605Smrg also applies to functions that don't have any GLX protocol specified 157848b8605Smrg (e.g., glGetFogFuncSGIS). 158848b8605Smrg--> 159