summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe/sp_surface.c
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2007-10-29 16:20:45 +0000
committerMichal Krol <[email protected]>2007-10-29 17:05:38 +0000
commitee295fccdd0c94cb6b8af4dfb30283e39f548223 (patch)
treefe8f5064ad57c5dc12163efb5a91206b1e068141 /src/mesa/pipe/softpipe/sp_surface.c
parentd37eb130c090abc413a54e57e0d3800ac4cd59f4 (diff)
Make gallium compile in win32.
Use FREE, MALLOC, CALLOC, GETENV wrappers. Silence compiler warnings. Add proper copyrights.
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_surface.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_surface.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/pipe/softpipe/sp_surface.c b/src/mesa/pipe/softpipe/sp_surface.c
index bc343140baa..9d5529d8d6d 100644
--- a/src/mesa/pipe/softpipe/sp_surface.c
+++ b/src/mesa/pipe/softpipe/sp_surface.c
@@ -1,6 +1,6 @@
/**************************************************************************
*
- * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -172,7 +172,7 @@ z16_get_tile(struct pipe_surface *ps,
const ushort *src
= ((const ushort *) (ps->region->map + ps->offset))
+ y * ps->region->pitch + x;
- const float scale = 1.0 / 65535.0;
+ const float scale = 1.0f / 65535.0f;
unsigned i, j;
unsigned w0 = w;
@@ -418,7 +418,7 @@ z32_get_tile(struct pipe_surface *ps,
pRow[j * 4 + 0] =
pRow[j * 4 + 1] =
pRow[j * 4 + 2] =
- pRow[j * 4 + 3] = src[j] * scale;
+ pRow[j * 4 + 3] = (float) (scale * src[j]);
}
src += ps->region->pitch;
p += 4 * w0;
@@ -452,7 +452,7 @@ s8z24_get_tile(struct pipe_surface *ps,
pRow[j * 4 + 0] =
pRow[j * 4 + 1] =
pRow[j * 4 + 2] =
- pRow[j * 4 + 3] = (src[j] & 0xffffff) * scale;
+ pRow[j * 4 + 3] = (float) (scale * (src[j] & 0xffffff));
}
src += ps->region->pitch;
p += 4 * w0;