summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe/sp_surface.c
diff options
context:
space:
mode:
authormichal <michal@michal-laptop.(none)>2007-08-16 12:16:57 +0100
committermichal <michal@michal-laptop.(none)>2007-08-16 12:16:57 +0100
commit4fcfab33477a0b01ef2f5b1fb2658f244b91e03b (patch)
tree079000221d4248d628152952fdfa017cf4e902ce /src/mesa/pipe/softpipe/sp_surface.c
parente36b27cf86fb767a4a9754480abe9e299c746cf7 (diff)
Silence warnings.
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_surface.c')
-rwxr-xr-x[-rw-r--r--]src/mesa/pipe/softpipe/sp_surface.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/pipe/softpipe/sp_surface.c b/src/mesa/pipe/softpipe/sp_surface.c
index 4152e3510d0..84d02f91e7c 100644..100755
--- a/src/mesa/pipe/softpipe/sp_surface.c
+++ b/src/mesa/pipe/softpipe/sp_surface.c
@@ -56,8 +56,8 @@ a8r8g8b8_read_quad_f_swz(struct softpipe_surface *sps, int x, int y,
unsigned i, j;
assert(sps->surface.format == PIPE_FORMAT_U_A8_R8_G8_B8);
- assert(x < sps->surface.width - 1);
- assert(y < sps->surface.height - 1);
+ assert(x < (int) sps->surface.width - 1);
+ assert(y < (int) sps->surface.height - 1);
for (i = 0; i < 2; i++) { /* loop over pixel row */
for (j = 0; j < 2; j++) { /* loop over pixel column */
@@ -149,10 +149,10 @@ a1r5g5b5_get_tile(struct pipe_surface *ps,
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
const ushort pixel = src[j];
- p[0] = ((pixel >> 10) & 0x1f) * (1.0 / 31);
- p[1] = ((pixel >> 5) & 0x1f) * (1.0 / 31);
- p[2] = ((pixel ) & 0x1f) * (1.0 / 31);
- p[3] = ((pixel >> 15) );
+ p[0] = ((pixel >> 10) & 0x1f) * (1.0f / 31.0f);
+ p[1] = ((pixel >> 5) & 0x1f) * (1.0f / 31.0f);
+ p[2] = ((pixel ) & 0x1f) * (1.0f / 31.0f);
+ p[3] = ((pixel >> 15) ) * 1.0f;
p += 4;
}
src += ps->region->pitch;