summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/vtxfmt.c
Commit message (Collapse)AuthorAgeFilesLines
* Put color index attribute into the 6th attribute slot.Brian Paul2006-04-251-1/+0
| | | | | | Update a lot of loops, conditionals to use the _TNL_FIRST/LAST_* values instead of specific vertex attributes. Remove the EdgeFlagv function from the GLvertexformat struct.
* No longer alias generic vertex attribs with conventional attribs for ↵Brian Paul2006-04-251-8/+15
| | | | GL_ARB_vertex_program.
* Fix recent problems with display lists and other parts of the code.Ian Romanick2005-08-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | CALL_by_offset, SET_by_offset, and GET_by_offset all had various problems. The core issue is that parts of the device-independent code in Mesa assumes that all functions have slots in the dispatch table. This is especially true in the display list code. It will merrilly try to set dispatch pointers for glVertexAttrib1fARB even if GL_ARB_vertex_program is not supported. When the GET/SET/CALL macros are invoked, they would read a 0 from the remap table. The problem is that 0 is the dispatch offset for glNewList! One change is that the remap table is now initialized to be full of -1 values. In addtion, all of the *_by_offset marcos misbehave in an obvious way if the specified offset is -1. SET_by_offset will do nothing, GET_by_offset will return NULL, and CALL_by_offset, since it uses GET_by_offset, will segfault. I also had to add GL_EXT_blend_func_separate to the list of default extensions in all_mesa_extensions (src/mesa/drivers/dri/common/utils.c). Even though many drivers do not export this extension, glBlendFunc is internally implemented by calling glBlendFuncSeparate. Without this addition, glBlendFunc stopped working on drivers (such as mga) that do not export GL_EXT_blend_func_separate. There are still a few assertions / crashes in GL_ARB_vertex_program tests, but I don't think that these are related to any of my changes.
* Major rip-up of internal function insertion interface. The oldIan Romanick2005-07-281-4/+3
| | | | | | | | | | | | | | | | | | | | | | _glapi_add_entrypoint has been replaced by a new routine called _glapi_add_dispatch. This new routine dynamically assignes dispatch offsets to functions added. This allows IHVs to add support for extension functions that do not have assigned dispatch offsets. It also means that a driver has no idea what offset will be assigned to a function. The vast majority of the changes in this commit account for that. An additional table, driDispatchRemapTable, is added. Functions not in the Linux OpenGL ABI (i.e., anything not in GL 1.2 + ARB_multitexture) has a fixed offset in this new table. The entry in this table specifies the offset in of the function in the real dispatch table. The internal interface was also bumped from version 20050725 to 20050727. This has been tested with various programs in progs/demos on: radeon (Radeon Mobility M6) r128 (Rage 128 Pro) mga (G400)
* Wrap every place that accesses a dispatch table with a macro. A new script-Ian Romanick2005-07-181-72/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generated file, called src/mesa/glapi/dispatch.h, is added. This file contains three macros for each API function. It contains a GET, a SET, and a CALL. Each of the macros take a pointer to the context and a pointer to the dispatch table. In several threads on mesa3d-dev we discussed replacing _glapi_add_entrypoint with a new function called _glapi_add_dispatch. For this discussion, the important difference between the two is that the caller of _glapi_add_dispatch does *not* know what the dispatch offset will be at compile time. Because of this callers need to track the dispatch offset returned by _glapi_add_dispatch. http://marc.theaimsgroup.com/?t=111947074700001&r=1&w=2 The downside is that driver code then has to access the dispatch table two different ways. It accesses it using structure tags (e.g., exec->Begin) for functions with fixed offsets and via a remap table (e.g., exec[ remap->NewExtensionFunction ]) for functions without fixed offsets. Yuck! Using the macros allows both types of functions to be accessed identically. If a driver needs to set a pointer for Begin, it does 'SET_Begin(ctx, exec, my_begin_function)'. If it needs to set a pointer for NewExtensionFunction, it does 'SET_NewExtensionFunction(ctx, exec, my_NewExtensionFunction_function)'. Furthermore, if at some point in the future a static offset is assigned for NewExtensionFunction, only the macros need to change (instead of every single place that accesses a table for that function). This code differs slightly from the originally posted patches in that the CALL, GET, and SET marcos no longer take a context pointer as a parameter. Brian Paul had suggested that the remap table could be stored as a global since it would be set at CreateScreen time and would be constant for all contexts. This change reflects that feedback. http://marc.theaimsgroup.com/?t=112087194700001&r=1&w=2
* silence warningsAlan Hourihane2004-12-081-1/+1
|
* Change the dispatch offsets for the VertexAttrib*NV functions so they don'tBrian Paul2004-11-271-1/+9
| | | | | | | alias with the corresponding ARB functions. GL_ARB_vertex_shader (and OpenGL 2.0's) VertexAttrib functions don't alias with conventional vertex attributes, as GL_NV_vertex_program does. So, the ARB and NV version of VertexAttrib need to be distinct.
* Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch ↵Brian Paul2004-08-251-1/+2
| | | | 1015696)
* added some const keywordsBrian Paul2004-02-241-7/+8
|
* Merge vtx-0-2-branchKeith Whitwell2003-11-241-12/+9
|
* VertexAttrib4fv wasn't being installed (4f was).Keith Whitwell2003-10-061-0/+1
|
* Removed all RCS / CVS tags (Id, Header, Date, etc.) from everything.Ian Romanick2003-06-051-1/+0
|
* updated email addressesBrian Paul2002-10-291-3/+3
|
* Header file clean-up:Brian Paul2002-10-241-1/+2
| | | | | | | | 1. Remove all.h and PC_HEADER junk. 2. Rolled mem.c and mem.h into imports.c and imports.h 3. Include imports.h instead of mem.h Restore _mesa_create/initialize_context() to be like they were in 4.0.4 New wrappers for a few std C functions: _mesa_atoi(), _mesa_strstr(), etc.
* Applied Matt Sealey's patch to remove/isolate all stdio.h function calls.Brian Paul2002-06-291-2/+2
| | | | Instead of mstdio.[ch], use imports.[ch] to isolate these functions.
* bring in changes from dri tcl branchKeith Whitwell2002-04-091-9/+2
|
* vertex program fixesBrian Paul2001-12-151-2/+1
|
* vertex program check-inBrian Paul2001-12-141-5/+5
|
* dispatch changes to minimize hassle with XFree86 libGLBrian Paul2001-12-041-17/+14
|
* API dispath updatesBrian Paul2001-11-181-9/+9
|
* Add missing header file include.Gareth Hughes2001-03-121-1/+2
|
* Consistent copyright info (version number, date) across all files.Gareth Hughes2001-03-121-2/+4
|
* Minor cleanups.Gareth Hughes2001-03-111-4/+2
|
* Clean up install, restore for exec vtxfmts.Gareth Hughes2001-03-111-8/+13
|
* Support for swappable tnl modules.Gareth Hughes2001-03-111-3/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Core Mesa provides a neutral tnl module that verifies the currently module before installing the tnl function pointers in a lazy fashion. It also records which tnl functions have been swapped out, and only restores these when tnl modules themselves are swapped. Fallback strategies: Drivers set a bitmask of dangerous stage changes. When such a state change occurs, the driver should restore the neutral tnl module via _mesa_restore_exec_vtxfmt(). The neutral tnl module will call _mesa_update_state(), followed by ctx->Driver.ValidateTnlModule() if the validation bitmask matches the new state bitmask. The driver should call _tnl_wakeup_exec() if it can no longer handle the current state, which will revert to the default tnl module. In this case, previous vertices should be replayed as required (depending on the current primitive) after the new tnl module is installed. If the driver uses chooser functions for any part of the tnl module, these should generally be reinstalled as part of the fallback to the neutral tnl module. For example, if the lighting state changes, a driver might fall back to the neutral tnl module, verify that the current lighting state can be handled, and use the chooser function to pick the most efficient implementation of the current lighting state. It is up to the drivers to detect and handle fallback cases caused by tnl function calls themselves (such as glTexCoord4f* if the current tnl module can't handle projected textures, for example).
* New files...Keith Whitwell2000-11-241-0/+89