diff options
author | Brian Paul <[email protected]> | 2009-03-08 13:49:57 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-04-01 20:17:19 -0600 |
commit | de2afd8688ceb45013d15be7c6e0995199b80e5a (patch) | |
tree | b19eb2dc2565d385ad384a7a3f7e414b0cd464e3 /src/mesa/main/colormac.h | |
parent | f8304bf1ed27dc87f52593a437785f2793344767 (diff) |
swrast: do texture sampling/combining in floating point
The code's cleaner and a step toward supporting float-valued texture sampling.
Some optimizations for common cases can be added and re-enabled...
Diffstat (limited to 'src/mesa/main/colormac.h')
-rw-r--r-- | src/mesa/main/colormac.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h index 74692e9a988..815624ee508 100644 --- a/src/mesa/main/colormac.h +++ b/src/mesa/main/colormac.h @@ -71,9 +71,6 @@ /** \def COPY_CHAN4 * Copy a GLchan[4] array */ -/** \def CHAN_PRODUCT - * Scaled product (usually approximated) between two GLchan arguments */ - #if CHAN_BITS == 8 #define BYTE_TO_CHAN(b) ((b) < 0 ? 0 : (GLchan) (b)) @@ -91,8 +88,6 @@ #define COPY_CHAN4(DST, SRC) COPY_4UBV(DST, SRC) -#define CHAN_PRODUCT(a, b) ((GLubyte) (((GLint)(a) * ((GLint)(b) + 1)) >> 8)) - #elif CHAN_BITS == 16 #define BYTE_TO_CHAN(b) ((b) < 0 ? 0 : (((GLchan) (b)) * 516)) @@ -110,8 +105,6 @@ #define COPY_CHAN4(DST, SRC) COPY_4V(DST, SRC) -#define CHAN_PRODUCT(a, b) ((GLchan) ((((GLuint) (a)) * ((GLuint) (b))) / 65535)) - #elif CHAN_BITS == 32 /* XXX floating-point color channels not fully thought-out */ @@ -130,8 +123,6 @@ #define COPY_CHAN4(DST, SRC) COPY_4V(DST, SRC) -#define CHAN_PRODUCT(a, b) ((a) * (b)) - #else #error unexpected CHAN_BITS size |