xref: /aosp_15_r20/external/mesa3d/src/mapi/glapi/gen/gl_API.dtd (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1<!ELEMENT OpenGLAPI (category?, xi:include?, OpenGLAPI?)+>
2<!ELEMENT category (type*, enum*, function*)*>
3<!ELEMENT type EMPTY>
4<!ELEMENT enum (size*)>
5<!ELEMENT size EMPTY>
6<!ELEMENT function (param*, return?, glx?)*>
7<!ELEMENT param EMPTY>
8<!ELEMENT return EMPTY>
9<!ELEMENT glx EMPTY>
10
11<!ELEMENT xi:include (xi:fallback)?>
12<!ATTLIST xi:include
13          xmlns:xi  CDATA #FIXED "http://www.w3.org/2001/XInclude"
14          href       CDATA #REQUIRED
15          parse      (xml|text) "xml"
16          encoding   CDATA #IMPLIED>
17<!ELEMENT xi:fallback ANY>
18<!ATTLIST xi:fallback
19          xmlns:xi   CDATA #FIXED "http://www.w3.org/2001/XInclude">
20
21
22<!ATTLIST category name                NMTOKEN #REQUIRED
23                   number              NMTOKEN #IMPLIED
24		   window_system       NMTOKEN #IMPLIED>
25<!ATTLIST type     name                NMTOKEN #REQUIRED
26                   size                NMTOKEN #REQUIRED
27		   float               (true | false) "false"
28		   unsigned            (true | false) "false"
29		   pointer             (true | false) "false"
30                   glx_name            NMTOKEN #IMPLIED>
31<!ATTLIST enum     name                NMTOKEN #REQUIRED
32                   count               CDATA   #IMPLIED
33                   value               NMTOKEN #REQUIRED>
34<!ATTLIST function name                NMTOKEN #REQUIRED
35                   alias               NMTOKEN #IMPLIED
36                   vectorequiv         NMTOKEN #IMPLIED
37                   es1                 CDATA   "none"
38                   es2                 CDATA   "none"
39                   deprecated          CDATA   "none"
40                   exec                NMTOKEN #IMPLIED
41                   desktop             (true | false) "true"
42                   marshal             NMTOKEN #IMPLIED
43                   marshal_sync        CDATA #IMPLIED>
44                   marshal_count       CDATA #IMPLIED>
45                   marshal_large_count CDATA #IMPLIED>
46                   marshal_call_before CDATA #IMPLIED>
47                   marshal_call_after  CDATA #IMPLIED>
48                   marshal_struct      CDATA #IMPLIED>
49                   marshal_no_error    CDATA #IMPLIED>
50<!ATTLIST size     name                NMTOKEN #REQUIRED
51                   count               NMTOKEN #IMPLIED
52                   mode                (get | set) "set">
53<!ATTLIST param    name                NMTOKEN #REQUIRED
54                   type                CDATA   #REQUIRED
55		   client_only	       (true | false) "false"
56                   count               NMTOKEN #IMPLIED
57                   counter             (true | false) "false"
58                   count_scale         NMTOKEN "1"
59                   output              (true | false) "false"
60                   padding             (true | false) "false"
61                   img_width           NMTOKEN #IMPLIED
62                   img_height          NMTOKEN #IMPLIED
63                   img_depth           NMTOKEN #IMPLIED
64                   img_extent          NMTOKEN #IMPLIED
65                   img_xoff            NMTOKEN #IMPLIED
66                   img_yoff            NMTOKEN #IMPLIED
67                   img_zoff            NMTOKEN #IMPLIED
68                   img_woff            NMTOKEN #IMPLIED
69                   img_format          NMTOKEN #IMPLIED
70                   img_type            NMTOKEN #IMPLIED
71                   img_target          NMTOKEN #IMPLIED
72                   img_send_null       (true | false) "false"
73                   img_null_flag       (true | false) "false"
74                   img_pad_dimensions  (true | false) "false"
75                   variable_param      NMTOKENS #IMPLIED>
76<!ATTLIST return   type                CDATA   "void">
77<!ATTLIST glx      rop                 NMTOKEN #IMPLIED
78                   sop                 NMTOKEN #IMPLIED
79                   vendorpriv          NMTOKEN #IMPLIED
80                   large               (true | false) "false"
81                   doubles_in_order    (true | false) "false"
82                   always_array        (true | false) "false"
83                   handcode            (true | false | client | server) "false"
84                   img_reset           NMTOKEN #IMPLIED
85                   dimensions_in_reply (true | false) "false"
86                   ignore              (true | false) "false">
87
88<!--
89The various attributes for param and glx have the meanings listed below.
90When adding new functions, please annote them correctly.  In most cases this
91will just mean adding a '<glx ignore="true"/>' tag.
92
93param:
94     name - name of the parameter
95     type - fully qualified type (e.g., with "const", etc.)
96     client_only - boolean flag set on parameters which are interpreted only
97         by the client and are not present in the protocol encoding (e.g.,
98	 the stride parameters to Map1f, etc.)
99     count - for counted arrays (e.g., the 'lists' parameter to glCallLists),
100         the parameter or literal that represents the count.  For functions
101         like glVertex3fv it will be a literal, for others it will be one of
102         the parameters.
103     counter - this parameter is a counter that will be referenced by the
104         'count' attribute in another parameter.
105     count_scale - literal value scale factor for the 'count' attribute.
106         See ProgramParameters4dvNV for an example.
107     output - this parameter is used to store the output of the function.
108     variable_param - name of parameter used to determine the number of
109         elements referenced by this parameter.  This should be the name of a
110         single enum parameter.  Most of the gl*Parameter[if]v functions use
111         this.  Additionally, the enums that can be passed should be properly
112         annotated.
113     img_width / img_height / img_depth / img_extent - name of parameters
114         (or hardcoded integer) used for the dimensions of pixel data.
115     img_xoff / img_yoff / img_zoff / img_woff - name of parameters used
116         for x, y, z, and w offsets of pixel data.
117     img_format - name of parameter used as the pixel data format.
118     img_type - name of parameter used as the pixel data type.
119     img_target - name of parameter used as a texture target.  Non-texture
120        pixel data should hardcode 0.
121     img_send_null - boolean flag to determine if blank pixel data should
122        be sent when a NULL pointer is passed.  This is only used by
123        TexImage1D and TexImage2D.
124     img_null_flag - boolean flag to determine if an extra flag is used to
125        determine if a NULL pixel pointer was passed.  This is used by
126        TexSubImage1D, TexSubImage2D, TexImage3D and others.
127     img_pad_dimensions - boolean flag to determine if dimension data and
128        offset data should be padded to the next even number of dimensions.
129        For example, this will insert an empty "height" field after the
130        "width" field in the protocol for TexImage1D.
131     marshal - One of "sync", "async", or "custom", defaulting to
132        async unless one of the arguments is something we know we can't
133        codegen for.  If "sync", we finish any queued glthread work and call
134        the Mesa implementation directly.  If "async", we queue the function
135        call to be performed by glthread.  If "custom", the prototype will be
136        generated but a custom implementation will be present in marshal.c.
137     marshal_sync - an expression that, if it evaluates true, causes glthread
138        to sync and execute the call directly.
139     marshal_count - alternative to using "count" for pointer parameters.
140        It contains an expression computing the size of the array pointed to
141        by the pointer parameter. The maximum size must be small enough that
142        it always fits into a glthread batch, so that glthread never has to
143        sync and execute directly.
144     marshal_large_count - alternative to using "count" for pointer parameters.
145        It contains an expression computing the size of the array pointed to
146        by the pointer parameter. It can be an arbitrary size, which may cause
147        glthread to flush, sync, and execute directly if the size is greater
148        than the maximum call size that fits in a glthread batch.
149     marshal_call_before - insert the string at the beginning of the marshal
150        function
151     marshal_call_after - insert the string at the end of the marshal function
152     marshal_struct - if "public", insert the structure into the generated
153        header file instead of the C file. It's done even with
154        marshal="custom", in which case you don't have to define the structure
155        manually.
156     marshal_no_error - indicate that a no_error marshal function will be
157        generated, only useful with marshal="custom"
158
159glx:
160     rop - Opcode value for "render" commands
161     sop - Opcode value for "single" commands
162     vendorpriv - Opcode value for vendor private (or vendor private with
163         reply) commands
164     large - set to "true" of the render command can use RenderLarge protocol.
165     doubles_in_order - older commands always put GLdouble data at the
166         start of the render packet.  Newer commands (e.g.,
167         ProgramEnvParameter4dvARB) put the in the order that they appear
168         in the parameter list.
169     always_array - some single commands take reply data as an array or as
170         return value data (e.g., glGetLightfv).  Other single commands take
171         reply data only as an array (e.g., glGetClipPlane).
172     handcode - some functions are just too complicated to generate
173         (e.g., glSeperableFilter2D) or operate only on client-side data
174         (e.g., glVertexPointer) and must be handcoded.
175     ignore - some functions have an entry in the dispatch table, but aren't
176         suitable for protocol implementation (e.g., glLockArraysEXT).  This
177         also applies to functions that don't have any GLX protocol specified
178         (e.g., glGetFogFuncSGIS).
179-->
180