summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_atifragshader.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-03-08 13:49:57 -0600
committerBrian Paul <[email protected]>2009-04-01 20:17:19 -0600
commitde2afd8688ceb45013d15be7c6e0995199b80e5a (patch)
treeb19eb2dc2565d385ad384a7a3f7e414b0cd464e3 /src/mesa/swrast/s_atifragshader.c
parentf8304bf1ed27dc87f52593a437785f2793344767 (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/swrast/s_atifragshader.c')
-rw-r--r--src/mesa/swrast/s_atifragshader.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_atifragshader.c b/src/mesa/swrast/s_atifragshader.c
index 458fe18163e..5fefae6c42b 100644
--- a/src/mesa/swrast/s_atifragshader.c
+++ b/src/mesa/swrast/s_atifragshader.c
@@ -47,17 +47,12 @@ static void
fetch_texel(GLcontext * ctx, const GLfloat texcoord[4], GLfloat lambda,
GLuint unit, GLfloat color[4])
{
- GLchan rgba[4];
SWcontext *swrast = SWRAST_CONTEXT(ctx);
/* XXX use a float-valued TextureSample routine here!!! */
swrast->TextureSample[unit](ctx, ctx->Texture.Unit[unit]._Current,
1, (const GLfloat(*)[4]) texcoord,
- &lambda, &rgba);
- color[0] = CHAN_TO_FLOAT(rgba[0]);
- color[1] = CHAN_TO_FLOAT(rgba[1]);
- color[2] = CHAN_TO_FLOAT(rgba[2]);
- color[3] = CHAN_TO_FLOAT(rgba[3]);
+ &lambda, (GLfloat (*)[4]) color);
}
static void