Commit Graph

4080 Commits

Author SHA1 Message Date
Gareth Hughes d8aa0269cd Support for swappable tnl modules.
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).
2001-03-11 18:49:11 +00:00
Gareth Hughes b1b4036656 Add a couple of missing functions. 2001-03-10 02:50:42 +00:00
Gareth Hughes 53e4bf9afd More generic vtxfmt template, useful for creating neutral tnl module as
well as fallback functions for driver tnl modules.
2001-03-09 16:08:13 +00:00
Brian Paul ca8c6a0337 fixed RBGA ifdef typo 2001-03-08 22:27:41 +00:00
Brian Paul 95e02a210e do fog interpolation if INTERP_FOG is defined, not when INTERP_Z is defined 2001-03-08 17:33:33 +00:00
Brian Paul 896e8bd2d7 processed by indent to improve readability 2001-03-08 17:17:28 +00:00
Brian Paul 417ed16a88 changed bincoeff var to GLfloat, fixes bug introduced in previous check-in 2001-03-08 17:15:01 +00:00
Brian Paul a28fa45ab7 test 16-bit/channel rendering 2001-03-08 15:24:18 +00:00
Brian Paul 01915e90e6 More g++ warning fixes. Fixes for CHAN_BITS==16, it seems to work. 2001-03-08 15:23:46 +00:00
Brian Paul eac57f009e added an assertion in the init code, just to be safe 2001-03-07 23:22:08 +00:00
Jon Taylor 9cb9401e87 Misc build fixes 2001-03-07 20:42:14 +00:00
Gareth Hughes 4da75f6d91 Add missing copy in _mesa_noop_Color4fv(). 2001-03-07 18:16:40 +00:00
Brian Paul b51b0a847d fixed a bunch of g++ warnings/errors. Compiling with g++ can help find lots of potential problems 2001-03-07 05:06:11 +00:00
Brian Paul 249aebdd35 _MinMagThresh[] should be GLfloat 2001-03-07 04:50:49 +00:00
Brian Paul 90ea526114 added some casts in the 16-bit GLchan macros, just to be safe 2001-03-07 03:20:38 +00:00
Brian Paul be3d539dac added Driver.BlendColor() function, for completeness 2001-03-07 00:21:32 +00:00
Brian Paul ac859a4cbd fixed segfaults when tex unit 1 enabled, but not unit 0 (conform) 2001-03-05 22:40:10 +00:00
Brian Paul 75280a2c74 added missing ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH() macros 2001-03-05 22:18:23 +00:00
Keith Whitwell 89700a4abd DO_POINT renamed DO_POINTS 2001-03-05 19:54:03 +00:00
Keith Whitwell 0ceb82b838 Changes for ffb 2001-03-05 18:52:18 +00:00
Keith Whitwell 3db5374e66 Fix typo 2001-03-05 18:04:38 +00:00
Brian Paul d395251b35 GL_EXT_secondary_color test 2001-03-05 17:50:35 +00:00
Brian Paul d49081302a GL_EXT_fog_coord test 2001-03-05 17:31:57 +00:00
Keith Whitwell 3c646597cf Add missing cases for viewport transform. Remove INVALIDATE_STORED_VERTICS
macro
2001-03-05 16:41:47 +00:00
Brian Paul a11c0bcf97 replaced gl_test_os_katmai*() with _mesa_test_os_katmai*() 2001-03-05 15:57:59 +00:00
Brian Paul 865322f931 more clean-ups 2001-03-03 21:11:32 +00:00
Brian Paul d62269757b used indent to clean-up the code 2001-03-03 20:59:06 +00:00
Brian Paul 188f2949ea more namespace clean-ups 2001-03-03 20:56:59 +00:00
Brian Paul 0883634178 lots of gl_*() to _mesa_*() namespace clean-up 2001-03-03 20:33:27 +00:00
Brian Paul 19bbfc6263 optimized lambda calculation (Klaus Niederkrueger) 2001-03-03 00:37:27 +00:00
Brian Paul 85312e6db1 changed AlphaFunc() ref from GLclampf to GLchan 2001-03-03 00:12:47 +00:00
Brian Paul eb2b63877a fixed _mesa_getenv() weirdness 2001-03-02 16:01:22 +00:00
Brian Paul 6a2d72ecff fixed mistake in alpha buffer clear test 2001-03-01 18:30:47 +00:00
Keith Whitwell 6da33b1249 Uncomment some defaults. 2001-03-01 18:18:05 +00:00
Keith Whitwell 0fe593a71e Bugfixes for vertex format, templates 2001-03-01 17:40:14 +00:00
Brian Paul d89c87ac40 added s/w alpha buffer clearing 2001-03-01 00:05:05 +00:00
Brian Paul b4203c1c49 removed some bogus error checks 2001-02-28 19:31:39 +00:00
Brian Paul 0221e4d6c8 Now there's four possible display modes:
1. normal, shadowed rendering
2. display depth texture image
3. display depth texture mapped onto scene
4. render grayscale scene where gray level = distance from light source
2001-02-28 18:41:50 +00:00
Keith Whitwell feb555af03 Templates are in working order. 2001-02-28 18:19:27 +00:00
Brian Paul be3602da41 GLvisual inside GLframebuffer is no longer a pointer, copy the struct instead.
Added context/drawbuffer visual config sanity checking in _mesa_make_current2().
Added some 'const' keywords.
2001-02-28 00:27:48 +00:00
Brian Paul 6a9851d72d fixed glitches in error checking of imaging extensions 2001-02-27 22:33:59 +00:00
Brian Paul bf8b5f99a1 signal _NEW_TEXTURE in all teximage functions 2001-02-27 22:16:27 +00:00
Brian Paul 2eb801cda2 added fog coord clamping 2001-02-27 21:58:59 +00:00
Brian Paul 8753b1c397 colortable w/ size=0 wasn't handled correctly 2001-02-27 16:42:01 +00:00
Keith Whitwell bed4c5bf58 Initialize Line._Width 2001-02-27 16:14:35 +00:00
Brian Paul 18c516655f more tweaks 2001-02-27 00:13:25 +00:00
Brian Paul 01a5dd879b minor extension tweaks 2001-02-27 00:05:27 +00:00
Brian Paul 6975540db2 Disable most extensions by default. Drivers should enable them as needed.
Renamed gl_*() functions as _mesa_*().
2001-02-26 23:58:12 +00:00
Brian Paul 806e20f463 fixed extension checking in _mesa_BlendEquation() 2001-02-26 22:07:03 +00:00
Brian Paul 511378b05d added filtering option, compute shadow tex size from window size 2001-02-26 18:26:32 +00:00