summaryrefslogtreecommitdiffstats
path: root/src/mesa/glapi
Commit message (Collapse)AuthorAgeFilesLines
* another GLX / XCB patch (Jeremy Kolb)Brian Paul2005-05-161-4/+4
|
* Patches for XCB (Jeremy Kolb)Brian Paul2005-05-071-5/+60
|
* Stop gcc-4.0 complaining about "type qualifiers ignored on functionKeith Whitwell2005-04-281-1/+1
| | | | return type".
* Stop gcc-4.0 complaining about "type qualifiers ignored on functionKeith Whitwell2005-04-281-1/+1
| | | | return type".
* If the file name passed to parse_GL_API is None or "-", read from standardIan Romanick2005-04-181-1/+7
| | | | input. This allows use of GL API scripts in pipelines.
* Refactor a bunch of common code from the "leaf" scripts to a new functions,Ian Romanick2005-04-1812-141/+29
| | | | parse_GL_API, in gl_XML.py.
* Fill-in function offsets and correct a couple typos.Ian Romanick2005-04-181-25/+28
|
* Convert all Python scripts to use XML namespaces.Ian Romanick2005-04-1812-92/+106
|
* Move the DTD to its own file.Ian Romanick2005-04-182-122/+121
|
* Reverted the last change back to fix bug 3035Ben Crossman2005-04-151-1/+1
|
* Convert 'variable_param' from a CDATA attribute to a NMTOKENS attribute.Ian Romanick2005-04-142-5/+5
| | | | | The main difference is that white-space is used to separate the names instead of comas.
* Refactor the handling of the '(true | false)' enumerated attributes.Ian Romanick2005-04-142-54/+27
|
* Modify the DTD to use NMTOKEN, enumerants, and explicit default valuesIan Romanick2005-04-141-57/+56
| | | | | | wherever possible. Correct a couple mis-uses of the 'counter' attribute when 'count' was intended. Fix some errors in the DTD and in the data with 'doubles_in_order'.
* In GLX_USE_TLS builds, make GET_CURRENT_CONTEXT use the TLS verion of theIan Romanick2005-04-142-3/+28
| | | | | | variable. Without this, GET_CURRENT_CONTEXT would *always* result in a call to _glapi_get_context (because _glapi_Context is a const pointer to NULL in TLS builds).
* A few getenv() that werent using the mesa wrapper versionBen Crossman2005-04-141-1/+1
|
* Add TLS support to libGL and, by virtue of using glthread.h and GL_CALL, allIan Romanick2005-04-134-61/+220
| | | | | | | DRI drivers. A TLS enabled libGL can load a TLS or a non-TLS DRI driver, but a TLS DRI driver requires a TLS enabled libGL. This fixes bug #1822.
* xmllint fixes. Revert 'note_unflushed' changes that were accidetnallyIan Romanick2005-03-171-4/+6
| | | | committed in the last version.
* Enable the generation of server-side __glGetBooleanv_size and relatedIan Romanick2005-03-174-450/+1443
| | | | | | | | | | | | | | | | | | functions. There are two parts to this. First, a size element with a name "Get" is shorthand for having four separate size elements with names "GetIntegerv", "GetDoublev", "GetFloatv", and "GetBooleanv". Additionally, a count of "?" is treated specially. This causes a call to a handcoded function named "__gl<base name>_variable_size". This is *only* needed to support GL_COMPRESSED_TEXTURE_FORMATS. That enum can return a variable number of values depending how many compressed texture formats are supported by the implementation. Fix a problem with glGetProgram{Local,Env}Parameter[df]vARB, glAreProgramsResidentNV, and glGetVertexAttribivNV. These changes only affect code generated for the server-side. The changes to enum.c are caused by enums added for the server-side __glGetBooleanv_size functions.
* Minor refactoring and code tweaking. The only notable chage is thatIan Romanick2005-03-172-13/+9
| | | | | | | | FilterGLAPISpecBase::xref is replaced by FilterGLAPISpecBase::functions_by_name. The notable difference between the two is that ::functions_by_name includes all functions, whether they have an assigned offset or not. This feature will be useful (necessary) when more server-side code is generated.
* Refactored some of the code for PrintGlxReqSize_[ch]. This ensures that theIan Romanick2005-03-171-19/+44
| | | | | same set of functions will be iterated for both the generated C-source file and the generated header file.
* Fix the handling of zero-sized output parameters (i.e., those with typeIan Romanick2005-03-172-2/+6
| | | | | | | | 'GLvoid *'). This fixes the GLX protocol for glGetProgramStringARB. This fixes bugzilla #2747. Remove the 'ignore="true"' from glVertexAttrib4bvARB. This fixes bugzilla #2746.
* Add support for ARB_draw_buffers and ARB_occlusion_query. The GLX protocolIan Romanick2005-03-111-29/+43
| | | | | | | | | | | for these extensions (as well as ARB_vertex_program and ARB_matrix_palette) was just approved by the ARB on 8-Mar-2005. Now the only extension missing for 1.5 support is ARB_vertex_buffer_object. The opcodes for ARB_matrix_palette were also added to gl_API.xml. Since this extension isn't supported by Mesa, no code is generated for it. Some tabs were also converted to spaces in the comment for GetCompressedTexImageARB.
* Actually *use* the count_scale value associated with a parameter.Ian Romanick2005-03-061-3/+11
|
* Fix some errors in the parameter descriptions in serveral vertex / fragmentIan Romanick2005-03-031-11/+11
| | | | program related functions.
* Check for some common function parameter description errors in theIan Romanick2005-03-031-0/+34
| | | | | endElement handler for <function>. This catches the errors as early as possible and makes debugging other code easier.
* Fairly significant changes to enums.c and the way it is generated. enums.cIan Romanick2005-02-262-43/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | now contains 3 static tables. The first table is a single, large string of all the enum names. The second table is an array, sorted by enum name, of indexes to the string table and the matching enum value. The extra string table is used to eliminate relocs (and save space) in the compiled file. The third table is an array, sorted by enum value, of indexes into the second table. The [name, enum] table contains all of the enums, but the table sorted by enum-value does not. This table contains one entry per enum value. For enum values that have multiple names (e.g., 0x84C0 has GL_TEXTURE0_ARB and GL_TEXTURE0), only an index to the "best" name will appear in the table. gl_enums.py gives precedence to "core" GL versions of names, followed by ARB versions, followed by EXT versions, followed, finally, by vendor versions (i.e., anything that doesn't fall into one of the previous categories). By filtering the unneeded elements from this table, not only can we guarantee determinism in the generated tables, but we save 364 elements in the table. The optimizations outlined above reduced the size of the stripped enums.o (on x86) from ~80KB to ~53KB. The internal organization of gl_enums.py was also heavily modified. Previously enums were stored in an unsorted list as [value, name] tuples (basically). This list was then sorted, using a user-specified compare function (i.e., VERY slow in most Python implementations) to generate a table sorted by enum value. It was then sorted again, using another user-specified compare function, to generate a table sorted by name. Enums are now stored in a dictionary, called enum_table, with the enum value as the key. Each dictionary element is a list of [name, priority] pairs. The priority is determined as described above. The table sorted by enum value is generated by sorting the keys of enum_table (i.e., very fast). The tables sorted by name are generated by creating a list, called name_table, of [name, enum value] pairs. This table can then be sorted by doing name_table.sort() (i.e., very fast). The result is a fair amount more Python code, but execution time was reduced from ~14 seconds to ~2 seconds.
* Add GLX protocol support for ARB_fragement_program,Ian Romanick2005-02-251-333/+481
| | | | | | | ARB_fragment_program_shadow, ARB_vertex_program, NV_fragment_program, NV_fragment_program_option, NV_fragment_program2, NV_vertex_program, NV_vertex_program1_1, NV_vertex_program2, NV_vertex_program2_option, NV_vertex_program3, and ATI_text_fragment_shader.
* Convert the static functions read_pixel_reply, read_reply,Ian Romanick2005-02-251-13/+33
| | | | | | | setup_single_request, and setup_vendor_request to the global functions __glXReadPixelReply, __glXReadReply, __glXSetupSingleRequest, and __glXSetupVendorRequest. This will make it easier to add handcoded Single / VendorPrivate / VendorPrivteWithReply functions.
* Sort the enums in the Python code, instead of at runtime. (Zack Rusin)Brian Paul2005-02-231-56/+36
|
* Corrected the value for X_GLrop_SecondaryColor3svEXT.Ian Romanick2005-02-231-1/+1
|
* generate enums.c file (Zack Rusin)Brian Paul2005-02-223-0/+190
|
* Generate GLX protocol for pixel single commands.Ian Romanick2005-02-093-33/+106
|
* Correct a couple problems / omissions in the DTD.Ian Romanick2005-02-081-5/+10
|
* Add new entrypoints for GL_EXT_framebuffer_object.Brian Paul2005-02-085-190/+513
|
* Definitions for EXT_framebuffer_object. Just <include/> it in gl_API.xmlIan Romanick2005-02-081-0/+175
| | | | when ready.
* Add the ability to include other XML files by using aIan Romanick2005-02-081-0/+10
| | | | <include name="file"/> element as a sub-element of <OpenGLAPI>.
* Fix some mixed spaces / tabs issues in generated code. Commit generatedIan Romanick2005-02-051-13/+13
| | | | files that have been trivially changed by other recent commits.
* Enable client-side GLX support for texture compression extensions.Ian Romanick2005-02-041-0/+13
|
* Added a bunch of extensions that were previously supported but weren'tIan Romanick2005-02-031-9/+225
| | | | | | in the gl_API.xml database. Add "official" support for SGI_color_matrix and SGI_texture_color_table. These were previously supported only by way of ARB_imaging.
* Small refactor. Add glXFunctionIterator, which derrives fromIan Romanick2005-02-025-56/+84
| | | | | | | | | | | | | glFunctionIterator and is used by GlxProto. The difference between the two iterator classes is that glXFunctionIterator skips functions that the GLX protocol code does not care about. Replace all the remaining occurances of glParameter::p_count_parameters and glFunction::count_parameters with the count_parameter_list. Add GlxProto::size_call to generate the C code to calculate 'compsize'. These trivially modify the generated code.
* Small refactor. Move several utility functions from glX_XML.py toIan Romanick2005-02-014-64/+58
| | | | | | | | | FilterGLAPISpecBase (in gl_XML.py). When these functions are used to emit common #define lines, the will automatically be undefined in FilterGLAPISpecBase::printFooter if header_tag is set (i.e., the file is a header file). These changes do not modify the generated code.
* Add GlxProto::createEnumFunction and add a 'context' parameter to theIan Romanick2005-02-013-2/+303
| | | | | | | | | | | | | | | | | | | glXEnumFunction constructor. The allows sub-classes of GlxProto to over-ride the concrete class used for glXEnumFunction. In addition to tracking p_count_parameters in glParameter, break the comma separated list of parameter names into a Python list called count_parameter_list. It is now possible to query if a name is the name of one of the count parameters just by comparing param.count_parameter_list.count(n) to zero. Eventually the remaining uses of p_count_parameters will be replaced with uses of count_parameter_list. Make sure that 'void *' parameters are handled correctly in glParameter::size_string. Add PrintGlxReqSize_h and PrintGlxReqSize_c. These classes emit prototypes and functions used on the server-side to determine the expected size of an incoming GL command.
* Refactor the code to emit multiple-inclusion protection toIan Romanick2005-01-288-38/+27
| | | | | | | | | FilterGLAPISpecBase. Since the size_h mode of glX_proto_size.py will be used to generate multiple header files, add an option to specify the define that is used for multiple-inclusion protection. The changes to the header files in this commit are just a side-effect of the changes to the Python scripts.
* Properly annotate variable-length output parameters. Make sure that theIan Romanick2005-01-283-89/+100
| | | | | client-side code doesn't try to calculate the size of the output parameters. The server will tell the client how big it is.
* Fix some get / set errors with COLOR_TABLE_*. SCALE and BIAS can beIan Romanick2005-01-281-16/+20
| | | | | parameters to GetColorTableParameter[if]v. FORMAT, WIDTH, and the SIZE enums cannot be parameters to ColorTableParameter[if]v.
* Slightly modify the meaning of the 'handcode' attribute in a 'glx' element.Ian Romanick2005-01-283-24/+41
| | | | | | | | | | | The attribute can now take one of 4 states. "false" (the default value) means that no handcoding is required for the function. "client" means that the function must be handcoded on the client-side only. "server" means that the function must be handcoded on the server-side only. "true" menas that the function must be handcoded on both the client-side and the server-side. Version 1.14 of glX_proto_send.py accidentally contained a line of this change.
* Add an option to emit extra debug code in the generated protocol functions.Ian Romanick2005-01-281-4/+29
| | | | | | | | | | | | | The debug version of indirect.c has proven very helpful during the development of new client-side and server-side GLX protocol code. This is put here instead of in the DISPATCH and DISPATCH_RETURN macros in dispatch.c for two reasons. 1. I only want the debug information when indirect-rendering is used. 2. Functions that require a reply from the server, some of which do not have a return value (e.g., glFlush, glFinish, glGetLightfv, etc.), do not need the extra glFinish call.
* Mark a couple more function parameters as counters.Ian Romanick2005-01-271-3/+3
|
* Add numerous 'get'-type functions to most of the enums supported by theIan Romanick2005-01-272-42/+511
| | | | | | | | | | | | | | | server-side GLX implementation. Correct the protocol for EXT_convolution. Several functions were incorrectly listed as 'sop' that should have been 'vendorpriv'. Remove TexParameter[if]v from the list of functions associated with TEXTURE_RESIDENT. The state associated with this enum is read-only. Sort the enums by value for each particular size. This ensures that the signature is the same no matter what the ordering is of the enums in the XML file. The side effect is that there are some extra changes in indirect_size.c.
* The 'mode' setting of a function within an 'enum' element is now used.Ian Romanick2005-01-273-36/+131
| | | | | | | | | | | | Parameters to glX_proto_size.py are now used to determine whether to emit either get-type function, set-type functions, or both. When only get-type functions are emitted, they can optionally alias set-type functions. This would be useful if, for example, the two types were in different source files. The real work to implement this is in SizeStubFunctionIterator class. All of the logic for which functions to iterate and in which order is implemented there.