summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-29 15:08:43 -0600
committerBrian <[email protected]>2007-10-29 15:15:34 -0600
commit8b2f997af572dd3aca00c4888adf2b0a60656331 (patch)
tree768aefeecd6ac25b877b3ed8ad1edb642d769c2a /src/mesa/pipe/softpipe
parent64ffc9540ba9c0208f8eca98996d03d632c33064 (diff)
minor code simplification
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_surface.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mesa/pipe/softpipe/sp_surface.c b/src/mesa/pipe/softpipe/sp_surface.c
index c18fe56f899..3aa72ef569b 100644
--- a/src/mesa/pipe/softpipe/sp_surface.c
+++ b/src/mesa/pipe/softpipe/sp_surface.c
@@ -509,19 +509,18 @@ softpipe_get_tile(struct pipe_context *pipe,
void *p, int dst_stride)
{
const uint cpp = ps->region->cpp;
- const uint w0 = w;
const ubyte *pSrc;
ubyte *pDest;
uint i;
assert(ps->region->map);
- CLIP_TILE;
-
if (dst_stride == 0) {
- dst_stride = w0 * cpp;
+ dst_stride = w * cpp;
}
+ CLIP_TILE;
+
pSrc = ps->region->map + ps->offset + (y * ps->region->pitch + x) * cpp;
pDest = (ubyte *) p;
@@ -543,19 +542,18 @@ softpipe_put_tile(struct pipe_context *pipe,
const void *p, int src_stride)
{
const uint cpp = ps->region->cpp;
- const uint w0 = w;
const ubyte *pSrc;
ubyte *pDest;
uint i;
assert(ps->region->map);
- CLIP_TILE;
-
if (src_stride == 0) {
- src_stride = w0 * cpp;
+ src_stride = w * cpp;
}
+ CLIP_TILE;
+
pSrc = (const ubyte *) p;
pDest = ps->region->map + ps->offset + (y * ps->region->pitch + x) * cpp;