summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2005-01-26 09:47:32 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2005-01-26 09:47:32 +0000
commitb07390c8fddfc88016a9fcb2d46b9fc3c918685b (patch)
tree0e7d09e3ba5ddd65eec9ef10f3dd8f2959c429f5
parent38e6e09cb86ef0bfea87a907def49f00af67fd8f (diff)
RGB/LUMINANCE texelfetchers (float version) returned 255.0F for alpha channel, instead of 1.0F
-rw-r--r--src/mesa/main/texformat_tmp.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/main/texformat_tmp.h b/src/mesa/main/texformat_tmp.h
index 275a84ef9e..5d45ef78df 100644
--- a/src/mesa/main/texformat_tmp.h
+++ b/src/mesa/main/texformat_tmp.h
@@ -154,7 +154,7 @@ static void FETCH(f_rgb)( const struct gl_texture_image *texImage,
texel[RCOMP] = CHAN_TO_FLOAT(src[0]);
texel[GCOMP] = CHAN_TO_FLOAT(src[1]);
texel[BCOMP] = CHAN_TO_FLOAT(src[2]);
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}
/* Fetch texel from 1D, 2D or 3D ALPHA texture, returning 4 GLchans */
@@ -198,7 +198,7 @@ static void FETCH(f_luminance)( const struct gl_texture_image *texImage,
texel[RCOMP] =
texel[GCOMP] =
texel[BCOMP] = CHAN_TO_FLOAT(src[0]);
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}
/* Fetch texel from 1D, 2D or 3D L_A texture, returning 4 GLchans */
@@ -346,7 +346,7 @@ static void FETCH(f_rgb_f32)( const struct gl_texture_image *texImage,
texel[RCOMP] = src[0];
texel[GCOMP] = src[1];
texel[BCOMP] = src[2];
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}
/* Fetch texel from 1D, 2D or 3D RGBA_FLOAT16 texture,
@@ -372,7 +372,7 @@ static void FETCH(f_rgb_f16)( const struct gl_texture_image *texImage,
texel[RCOMP] = _mesa_half_to_float(src[0]);
texel[GCOMP] = _mesa_half_to_float(src[1]);
texel[BCOMP] = _mesa_half_to_float(src[2]);
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}
/* Fetch texel from 1D, 2D or 3D ALPHA_FLOAT32 texture,
@@ -450,7 +450,7 @@ static void FETCH(f_luminance_f32)( const struct gl_texture_image *texImage,
texel[RCOMP] =
texel[GCOMP] =
texel[BCOMP] = src[0];
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}
/* Fetch texel from 1D, 2D or 3D LUMINANCE_FLOAT16 texture,
@@ -476,7 +476,7 @@ static void FETCH(f_luminance_f16)( const struct gl_texture_image *texImage,
texel[RCOMP] =
texel[GCOMP] =
texel[BCOMP] = _mesa_half_to_float(src[0]);
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}
/* Fetch texel from 1D, 2D or 3D LUMINANCE_ALPHA_FLOAT32 texture,
@@ -701,7 +701,7 @@ static void FETCH(f_rgb888)( const struct gl_texture_image *texImage,
texel[RCOMP] = UBYTE_TO_FLOAT( src[2] );
texel[GCOMP] = UBYTE_TO_FLOAT( src[1] );
texel[BCOMP] = UBYTE_TO_FLOAT( src[0] );
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}
@@ -724,7 +724,7 @@ static void FETCH(f_bgr888)( const struct gl_texture_image *texImage,
texel[RCOMP] = UBYTE_TO_FLOAT( src[0] );
texel[GCOMP] = UBYTE_TO_FLOAT( src[1] );
texel[BCOMP] = UBYTE_TO_FLOAT( src[2] );
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}
@@ -749,7 +749,7 @@ static void FETCH(f_rgb565)( const struct gl_texture_image *texImage,
texel[RCOMP] = ((s >> 8) & 0xf8) * (1.0F / 248.0F);
texel[GCOMP] = ((s >> 3) & 0xfc) * (1.0F / 252.0F);
texel[BCOMP] = ((s << 3) & 0xf8) * (1.0F / 248.0F);
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}
@@ -774,7 +774,7 @@ static void FETCH(f_rgb565_rev)( const struct gl_texture_image *texImage,
texel[RCOMP] = ((s >> 8) & 0xf8) * (1.0F / 248.0F);
texel[GCOMP] = ((s >> 3) & 0xfc) * (1.0F / 252.0F);
texel[BCOMP] = ((s << 3) & 0xf8) * (1.0F / 248.0F);
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}
@@ -943,7 +943,7 @@ static void FETCH(f_rgb332)( const struct gl_texture_image *texImage,
texel[RCOMP] = ((s ) & 0xe0) * (1.0F / 224.0F);
texel[GCOMP] = ((s << 3) & 0xe0) * (1.0F / 224.0F);
texel[BCOMP] = ((s << 6) & 0xc0) * (1.0F / 192.0F);
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}
@@ -989,7 +989,7 @@ static void FETCH(f_l8)( const struct gl_texture_image *texImage,
texel[RCOMP] =
texel[GCOMP] =
texel[BCOMP] = UBYTE_TO_FLOAT( src[0] );
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}
@@ -1165,7 +1165,7 @@ static void FETCH(f_ycbcr)( const struct gl_texture_image *texImage,
texel[RCOMP] = CLAMP(r, 0.0, 1.0);
texel[GCOMP] = CLAMP(g, 0.0, 1.0);
texel[BCOMP] = CLAMP(b, 0.0, 1.0);
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}
@@ -1232,7 +1232,7 @@ static void FETCH(f_ycbcr_rev)( const struct gl_texture_image *texImage,
texel[RCOMP] = CLAMP(r, 0.0, 1.0);
texel[GCOMP] = CLAMP(g, 0.0, 1.0);
texel[BCOMP] = CLAMP(b, 0.0, 1.0);
- texel[ACOMP] = CHAN_MAXF;
+ texel[ACOMP] = 1.0F;
}