summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/colormac.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: fix PACK_COLOR_5551(), PACK_COLOR_1555() macrosBrian Paul2011-09-201-2/+2
| | | | | | | | | | | The 1-bit alpha channel was incorrectly encoded. Previously, any non-zero alpha value for the ubyte alpha value would set A=1. Instead, use the most significant bit of the ubyte alpha to determine the A bit. This is consistent with the other channels and other OpenGL implementations. Note: This is a candidate for the 7.11 branch. Reviewed-by: Michel Dänzer <michel@daenzer.net>
* mesa: move last bits of GLchan stuff into swrastBrian Paul2011-09-201-75/+0
| | | | | This removes the last remnants of the GLchan datatype and associated macros out of core Mesa and into swrast.
* mesa: remove unused UNCLAMPED_FLOAT_TO_RGB_CHAN() macroBrian Paul2011-09-201-16/+0
|
* mesa: remove unused <type>_TO_CHAN() macrosBrian Paul2011-09-201-40/+0
|
* mesa: minor clean-up on _mesa_unclamped_float_rgba_to_ubyte()Brian Paul2011-09-141-1/+7
| | | | Add a comment and reformat to be under 80 columns.
* mesa/colormac: introduce inline helper for 4 unclamped float to ubyte.Dave Airlie2011-09-141-1/+6
| | | | | | | | | This introduces an UNCLAMPED_FLOAT_TO_UBYTE x 4 inline function, as suggested by Brian. It uses it in a few places I noticed from previous color changes, and also some core mesa places. I haven't updated other places yet. Signed-off-by: Dave Airlie <airlied@redhat.com>
* mesa: fix broken store_texel() functionsBrian Paul2011-08-311-0/+6
| | | | | | This fixes the swrast failures for piglit's fbo-generatemipmap-formats test (for uncompressed formats). At some point down the road this code will go away so I haven't checked all the other store_texel() functions.
* mesa: preserve 10 bits of precision in the texstore general path for ARGB2101010Marek Olšák2011-01-041-1/+5
| | | | | Use make_temp_float_image instead of _make_temp_chan_image. The latter converts the texture to 8 bits/component, losing 2 bits.
* mesa: implement new texture format AL44Marek Olšák2010-12-231-0/+3
| | | | | | Radeon GPUs can do this. R600 can even do render-to-texture. Packing and extracting aren't implemented, but we shouldn't hit them (I think). Tested with swrast, softpipe, and r300g.
* mesa: implement new texture format ARGB2101010Marek Olšák2010-12-231-0/+4
| | | | Radeon GPUs do support GL_RGB10_A2.
* mesa: Remove unnecessary header from colormac.h.Vinson Lee2010-07-301-1/+1
|
* AL1616: Add macros to pack two GLushorts into a texelIan Romanick2009-11-161-0/+6
|
* mesa: add parenthesisBrian Paul2009-10-051-7/+7
|
* swrast: do texture sampling/combining in floating pointBrian Paul2009-04-011-9/+0
| | | | | The code's cleaner and a step toward supporting float-valued texture sampling. Some optimizations for common cases can be added and re-enabled...
* Add RGBA4444 and RGBA5551 texture formats.Thomas Hellstrom2009-01-201-0/+4
|
* mesa: rename macro params to emphasize that there's no particular color orderingBrian Paul2008-10-101-12/+12
|
* Update the doxygen configuration file.Jose Fonseca2004-09-091-0/+2
| | | | Minor updates/fixes to the source documentation.
* Big-endian texture fixes from Michel Dänzer.Brian Paul2004-06-191-5/+15
|
* Added big-endian texture formats.Brian Paul2004-05-121-55/+31
| | | | Moved CI->RGBA palette lookup into texel fetch function.
* Merge Jose's documentation and core Mesa changes from embedded branchKeith Whitwell2003-07-171-11/+59
|
* Removed all RCS / CVS tags (Id, Header, Date, etc.) from everything.Ian Romanick2003-06-051-1/+0
|
* Killed mmath.[ch]. Moved low-level functions/assembly code into imports.[ch]Brian Paul2003-03-011-7/+63
| | | | | Moved type conversion and interpolation macros into macros.h Updated all the files that used to include mmath.h
* fixup float/ushort conversion macrosBrian Paul2002-04-041-7/+5
|
* Various 16-bit GLchan fixes and Win32 fixes (Gerk Huisma)Brian Paul2001-07-161-2/+2
|
* Support for swappable tnl modules.Gareth Hughes2001-03-111-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* More g++ warning fixes. Fixes for CHAN_BITS==16, it seems to work.Brian Paul2001-03-081-2/+2
|
* added some casts in the 16-bit GLchan macros, just to be safeBrian Paul2001-03-071-4/+4
|
* More color macro clean-ups.Brian Paul2001-01-031-7/+16
| | | | FLOAT_TO_CHAN() macro removed.
* Removed fixed.h (GLfixed now in mtypes.h, fixed-pt macros in mmath.h)Brian Paul2001-01-021-94/+24
| | | | | Clean-up of color conversion macros. New mmath.h macros (IROUND, IFLOOR, ICEIL, FRAC) used in various places.
* Support for swappable t&l modules, including an example one in the FXKeith Whitwell2000-11-241-2/+2
| | | | driver (enable with FX_ALLOW_VTXFMT=t).
* Move the transform and lighting code to two new directoriesKeith Whitwell2000-11-161-2/+3
| | | | | | | | | | | | | | | math: Provides basic matrix and vector functionality that might be useful to multiple software t&l implementations, and is used by core mesa to manage the Model, Project, etc matrices. tnl: The real transform & lighting code from core mesa, including everything from glVertex3f through vertex buffer handling, transformation, clipping, lighting and handoff to a driver for rasterization. The interfaces of these can be further tightened up, but the basic splitting up of state and code move is done.
* More GLchan color channel changes.Brian Paul2000-10-291-1/+9
| | | | | | Some header file re-org: Move matrix, vertex buffer structs to types.h to fix #include mess. Remove typedef, extern declarations from config.h
* New colormac.h file for color-related macros.Brian Paul2000-10-281-0/+187
Lot's of clean-up in macros.h and mmath.h