summaryrefslogtreecommitdiff
path: root/src/mesa/glapi/glX_proto_send.py
AgeCommit message (Collapse)Author
2006-10-13include glapi.h to fix broken buildBrian Paul
2006-10-11Fix bug #4681.Ian Romanick
glDeleteTextures and glDeleteTexturesEXT were erroneously listed as aliases of each other. For anything /except/ GLX protocol they are aliases. This set of changes allows functions that are functionally identical but have different GLX protocol to be listed as aliases. When building with GLX_INDIRECT_RENDERING set, different static functions are used. These functions determine whether the current context is direct rendering or not. If the context is direct rendering, the aliased function (e.g., glDeleteTextures in the case of glDeleteTexturesEXT) is called. If the context is not direct rendering, the correct GLX protocol is sent. For a deeper explanation of what is changed, please see: http://dri.freedesktop.org/wiki/PartiallyAliasedFunctions
2006-10-09Updates for XCB. Bug 8560.Ian Romanick
2006-10-04Keep indentation consistent with indent.Ian Romanick
Remove code in the Python scripts that keeps the indentation of the generated code consistent for all cases. Instead, pass the generated code through the indent command. Unix tools for the win!
2006-10-04Divide categories into four groups as they are processed from the XML. AddIan Romanick
an iterator to iterate over the categories in order, starting with "core" versions, then ARB extensions, then numbered non-ARB extensions, and finally unnumbered extensions. Use the new iterator in a couple places to ensure that output that is grouped by catgory is generated in a consistent order. More changes to the scripts are coming. The generated files will be committed one time after all the changes are in. Too bad we're not using GIT, or this would be easy. :(
2006-09-26Added function convertStringForXCB. Deals with the recent XCB naming ↵Jeremy Kolb
convention switch. Updated the generated code to use the new XCB naming scheme.
2006-03-06Later versions of Python handle formats like '% 5u' differently. ForIan Romanick
whatever reason, a space is always inserted. That is not the desired behavior.
2005-06-24Fixed the XCB implementation when always_array is true, thanks to Ian ↵Jeremy Kolb
Romanick for pointing it out. Please review.
2005-06-22Mark GenQueriesARB at 'always_array="true"'. This eliminates the needIan Romanick
to special-case the handling of that function in glX_proto_send.py.
2005-06-22Fixed a bug where GenQueriesARB was generating the wrong code for XCB and ↵Jeremy Kolb
wouldn't compile. Not sure how that slipped through before but it should work now.
2005-06-21Mammoth update to the Python code generator scripts that live inIan Romanick
src/mesa/glapi. Basically, the scripts that did simple things (like gl_offsets.py) were simple, and the scripts that did more complicated things (like glX_proto_send.py) were getting progressively more and more out of control. So, I re-write the foundation classes on which everything is based. One problem with the existing code is that the division between the GL API database representation and the way the output code is generated was either blury or nonexistant. The new code somewhat follows the Model-View-Controller pattern, minus the Controller. There is a distinct set of classes that model the API data, and there is a distinct set of classes that generate code from that data. One big change is in the class that represents GL functions (was glFunction, is now gl_function). There used to be an instance of this calls for each function and for each alias to that function. For example, there was an instance for PointParameterivSGIS, PointParameterivEXT, PointParameterivARB, and PointParameteriv. In the new code, there is one instance. Each instance has a list of entrypoint names for the function. In the next revision, this will allow a couple useful things. The script will be able to verify that the parameters, return type, and GLX protocol for a function and all it's aliases match. It will also allow aliases to be represented in the XML more compactly. Instead of repeating all the information, an alias can be listed as: <function name="PointParameterivARB" alias="PointParameterivEXT"/> Because the data representation was changed, the order that the alias functions are processed by the scripts also changed. This accounts for at least 2,700 of the ~3,600 lines of diffs in the generated code. Most of the remaining ~900 lines of diffs are the result of bugs *fixed* by the new scripts. The old scripts also generated code with some bugs in it. These bugs were discovered while the new code was being written. These changes were discussed on the mesa3d-dev mailing list back at the end of May: http://marc.theaimsgroup.com/?t=111714569000004&r=1&w=2 Xorg bug: 3197, 3208
2005-06-20Fixed some issues where XCB replies were being freed and data was not being ↵Jeremy Kolb
copied.
2005-05-16another GLX / XCB patch (Jeremy Kolb)Brian Paul
2005-05-07Patches for XCB (Jeremy Kolb)Brian Paul
2005-04-18Refactor a bunch of common code from the "leaf" scripts to a new functions,Ian Romanick
parse_GL_API, in gl_XML.py.
2005-04-18Convert all Python scripts to use XML namespaces.Ian Romanick
2005-03-17Fix the handling of zero-sized output parameters (i.e., those with typeIan Romanick
'GLvoid *'). This fixes the GLX protocol for glGetProgramStringARB. This fixes bugzilla #2747. Remove the 'ignore="true"' from glVertexAttrib4bvARB. This fixes bugzilla #2746.
2005-02-25Convert the static functions read_pixel_reply, read_reply,Ian Romanick
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.
2005-02-09Generate GLX protocol for pixel single commands.Ian Romanick
2005-02-05Fix some mixed spaces / tabs issues in generated code. Commit generatedIan Romanick
files that have been trivially changed by other recent commits.
2005-02-02Small refactor. Add glXFunctionIterator, which derrives fromIan Romanick
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.
2005-02-01Small refactor. Move several utility functions from glX_XML.py toIan Romanick
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.
2005-01-28Refactor the code to emit multiple-inclusion protection toIan Romanick
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.
2005-01-28Properly annotate variable-length output parameters. Make sure that theIan Romanick
client-side code doesn't try to calculate the size of the output parameters. The server will tell the client how big it is.
2005-01-28Add an option to emit extra debug code in the generated protocol functions.Ian Romanick
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.
2005-01-24Move all the code for generating "size" related functions to its ownIan Romanick
source file.
2005-01-24Since only one of the places that used glXFunction::command_payload_lengthIan Romanick
actually used both values, it was refactored into command_fixed_length and command_variable_length. glXFunction::offset_of_first_parameter was also added.
2005-01-24Make sure that functions added to gl_API.xml that do not have any GLXIan Romanick
section are marked as ignored. Also ignore any functions that don't have assigned dispatch offsets. Fold Adam Jackson's changes to indirect_size.c into the generator scripts so that they don't get lost. "DO NOT EDIT" really means "DO NOT EDIT". ;)
2005-01-07Pixel oriented render functions are now generated by theIan Romanick
glX_proto_send.py script. This eliminates ~600 lines of non-generated code. With proper compiler optimization settings, it also decreases the size of libGL.so by about 3KB.
2005-01-07The generic_*_byte functions did not rount the command size to aIan Romanick
multiple of 4 correctly in some cases.
2005-01-03The opcode and command length fields of RenderLarge commands wereIan Romanick
mistakenly emitted in the wrong order.
2004-12-27Fixed two problems with the handling of GLX protocol replies. The logicIan Romanick
for determining when extra data needed to be read after a reply (to ensure 4-byte alignment) and the logic to determine whether or not to read reply data after the SingleReply packet were both slightly wrong.
2004-12-21Used GCC's __builtin_expect when available. Change the way code isIan Romanick
generated for commands that can use RenderLarge packets. Tweak the code for __glXFlushRenderBuffer slightly.
2004-12-21Added some comments and fixed typeos. Slightly refactored the wayIan Romanick
function parameters are iterated. There are no changes in the generated code.
2004-12-03Move common GLX code to glX_XML.py. This will make adding glX_proto_recv.pyIan Romanick
easier later on.
2004-12-03Fix a minor bug in glXEnumFunction::PrintUsingTable. Add some comments.Ian Romanick
Add the (currently unused) utility funciton glXFunction::opcode_real_value.
2004-12-01Slightly tweak the format of the size prototypes.Ian Romanick
2004-12-01Python script to generate various bits of client-side GLX protocol code.Ian Romanick