summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_surface.c')
-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 c18fe56f89..3aa72ef569 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;