summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
Commit message (Collapse)AuthorAgeFilesLines
* Wrap every place that accesses a dispatch table with a macro. A new script-Ian Romanick2005-07-185-54/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Check for null program->Parameters pointer in validate_vertex_program().Brian Paul2005-07-151-1/+5
| | | | | GL_NV_vertex_program programs can't directly reference GL state so this pointer is always NULL.
* added commentsBrian Paul2005-07-151-4/+7
|
* Use the LDEXPF wrapper macro.Keith Whitwell2005-07-131-2/+2
|
* Wrap RESTORE_FPU/RND_NEG_FPU declarations with check for USE_SSE_ASM.Keith Whitwell2005-07-131-0/+6
|
* Add runtime compiled x87 implementations for most of the remainingKeith Whitwell2005-07-103-208/+575
| | | | | opcodes. When enabled via environment vars, gears runs and almost looks right but other apps are still quite buggy.
* Use frexp on Windows; frexpf is not available.Karl Schultz2005-07-011-0/+4
|
* replace some free() calls with _mesa_free()Brian Paul2005-07-012-5/+6
|
* Add a set of predicate functions for testing matrices instead of directlyBrian Paul2005-06-301-5/+2
| | | | | | testing the flags field. Move definition of all the MAT_FLAGs into the m_matrix.c file since they're now private.
* just code clean-ups and new commentsBrian Paul2005-06-281-29/+44
|
* include t_vp_build.hBrian Paul2005-06-271-4/+5
|
* added _tnl_ProgramCacheDestroy() prototypeBrian Paul2005-06-271-0/+2
|
* make create_new_program() staticBrian Paul2005-06-271-3/+4
|
* include light.h to silence warningBrian Paul2005-06-211-0/+1
|
* Define __FUNCTION__ as a preprocessor symbol in glheader.h if we're notBrian Paul2005-06-191-4/+0
| | | | using GCC or VMS.
* Committing in .Jouk Jansen2005-06-142-3/+11
| | | | | | | | OpenVMS updates Modified Files: Mesa/src/mesa/tnl/descrip.mms Mesa/src/mesa/tnl/t_vp_build.c ----------------------------------------------------------------------
* remove debug printsKeith Whitwell2005-06-102-4/+0
|
* Allow the print opcode to compilemesa_20050610Keith Whitwell2005-06-101-2/+1
|
* Fix typo in spot attenuationKeith Whitwell2005-06-101-1/+1
|
* Correct test for attenuation.Keith Whitwell2005-06-101-12/+12
| | | | DISSASEM changes.
* Fix colormaterial flag calculations.Keith Whitwell2005-06-101-17/+30
| | | | Fix lighting alpha result.
* Add notes about intended precision of opcodes.Keith Whitwell2005-06-101-38/+46
| | | | | Remove dead floating point twiddles. Fix bug translating MAD->MUL,ADD.
* Fix a couple of bugletsKeith Whitwell2005-06-091-8/+9
|
* Another typoKeith Whitwell2005-06-091-1/+1
|
* Further clean up RoughApproxPow2 and disable the optimized version --Keith Whitwell2005-06-091-8/+9
| | | | it's a very poor approximation.
* Fix typo in RoughApproxPow2Keith Whitwell2005-06-091-1/+5
|
* Store compiled vertex program representations in a pointer in theKeith Whitwell2005-06-099-78/+118
| | | | | | | | | | | | | vertex_program struct. Allow switching between regular and vertex_program implementations of fixed function TNL with the MESA_TNL_PROG environment var (previously this required recompilation). Ensure program compilation only references program data, not the wider context. This means that compiled programs only need to be invalidated when the program string changes, not on other state changes.
* Build vertex programs using state from a 'state key' struct which isKeith Whitwell2005-06-091-153/+364
| | | | | | | | | | | distilled from the current state. Maintain a list of vertex programs for various different tnl states indexed by these state keys. This cuts down the number of vertex programs generated and means that time spent optimizing vertex programs for execution isn't wasted each time the state changes.
* Turn off debugKeith Whitwell2005-06-082-5/+7
|
* Runtime generate sse/sse2 code for some vertex programs. ExperimentalKeith Whitwell2005-06-083-79/+973
| | | | | | and only active when _TNL_FIXED_FUNCTION_PROGRAM is defined *and* the MESA_EXPERIMENTAL environment variable is set... Works for the arbfplight demo at least.
* New arguments for sse_shufps()Keith Whitwell2005-06-081-14/+14
|
* Remove ARL opcode from interpreter.Keith Whitwell2005-06-081-192/+38
| | | | | Revert SEL opcode to MSK. Split out t_vb_arbprogram.h header file.
* new fileKeith Whitwell2005-06-081-0/+178
|
* Initialize some variables.Keith Whitwell2005-06-071-9/+8
|
* Split out runtime assembly functions.Keith Whitwell2005-06-071-723/+126
|
* Simplify interpreted language:Keith Whitwell2005-06-071-625/+581
| | | | | | | | | | | | | | | - Expand operand argument specifiers so that all registers and parameters can be referenced directly. Remove old PAR/PRL instructions. - No 3 operand instructions, translate MAD -> MUL, ADD. (No room for 3 full operands in instruction struct). - Translate SWZ instructions into 1 or 2 reduced swizzles at compile time. - Add hardwired code for moving input and output values to/from the register file. Drop old INx, OUT instructions.
* moved to windows build dirKarl Schultz2005-05-241-228/+0
|
* Committing in .Jouk Jansen2005-05-201-4/+4
| | | | | | | | | | Update openVMS compile support Modified Files: Mesa/progs/demos/descrip.mms Mesa/src/mesa/shader/slang/descrip.mms Mesa/src/mesa/tnl/descrip.mms ----------------------------------------------------------------------
* Invalidate current fastpath on changes to attribute size or offset withinKeith Whitwell2005-05-193-7/+32
| | | | | | | | | the vertex. Use existing facilities to check for sse2 and enable when available. Turn on SSE/SSE2 codegen for t_vertex.c by default when USE_SSE_ASM is defined. Disable with "MESA_NO_CODEGEN=t".
* Cope with the common 3ub and 1ub cases.Keith Whitwell2005-05-191-66/+202
| | | | | | Fix a few typos. Note that sse_movss sets high dwords to zero when reading from memory. Fix a few related bugs.
* Re-initialize viewport shadows each time.Keith Whitwell2005-05-191-8/+11
|
* Rename emit functions to reflect instruction set in use (ieKeith Whitwell2005-05-191-175/+274
| | | | | x86,sse,sse2,mmx). Add paths for sse+mmx vs. the initial version which assumed sse2 was available everywhere.
* Remove old t_vertex.c codegen infrastructure, tie in new code.Keith Whitwell2005-05-188-1985/+1396
| | | | Currently disabled, can enable with MESA_EXPERIMENTAL=t.
* Fix a few typos, initialize p->identity.Keith Whitwell2005-05-181-3/+9
|
* Eliminate a couple of swizzles.Keith Whitwell2005-05-181-3/+4
|
* Generates working SSE code for gears under the swrast driver.Keith Whitwell2005-05-181-58/+127
|
* Checkpoint commit: Preliminary version of a facility to emit x86/sse codeKeith Whitwell2005-05-181-0/+937
| | | | to implement vertex emit functions for the t_vertex.c mechanism.
* don't include strings.hBrian Paul2005-05-171-2/+0
|
* Turn disassem off (oops).Keith Whitwell2005-05-121-1/+1
|
* When lighting is enabled, but no lights are enabled, the scenecolorKeith Whitwell2005-05-121-27/+85
| | | | | | | | | becomes the result of lighting. When lighting is disabled, pass-through incoming color value. Likewise, pass through incoming texture values. (Based on patch by Aapo Tahkola) Add compile-time configuration to switch between DP4 and MUL/MAD for matrix-vector multiplications.