summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2004-04-15 11:20:48 +0000
committerKeith Whitwell <[email protected]>2004-04-15 11:20:48 +0000
commitaa9049591564130c236463c3b733ab6b6a50a20d (patch)
treee2f75e463cd42be096b0205b9f8b285bf3452324 /src/mesa
parent4d914b80e1f7b8a0ce9ce9566699eaf7847728e4 (diff)
Make _SAT instructions compile correctly.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/swrast/s_fragprog_to_c.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_fragprog_to_c.c b/src/mesa/swrast/s_fragprog_to_c.c
index d1d9a0bef36..d5d27d0bcf7 100644
--- a/src/mesa/swrast/s_fragprog_to_c.c
+++ b/src/mesa/swrast/s_fragprog_to_c.c
@@ -240,7 +240,8 @@ static void print_header( struct fragment_program *p )
/* The usual macros, not really needed, but handy:
*/
emit(p, "#define MIN2(x,y) ((x)<(y)?(x):(y))\n"
- "#define MAX2(x,y) ((x)<(y)?(x):(y))\n");
+ "#define MAX2(x,y) ((x)<(y)?(x):(y))\n"
+ "#define SATURATE(x) ((x)>1.0?1.0:((x)<0.0?0.0:(x)))\n");
/* Our function!
*/
@@ -449,9 +450,9 @@ static void saturate( struct fragment_program *p,
{
emit(p, " ");
print_dest(p, inst, i);
- emit(p, " = CLAMPF( ");
+ emit(p, " = SATURATE( ");
print_dest(p, inst, i);
- emit(p, ", 0.0, 1.0);\n");
+ emit(p, ");\n");
}
static void assign_single( GLuint i,