From de2afd8688ceb45013d15be7c6e0995199b80e5a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 8 Mar 2009 13:49:57 -0600 Subject: 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... --- src/mesa/main/colormac.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/mesa/main') 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 -- cgit v1.2.3