projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2e926b
)
llvmpipe: properly clip tile writes
author
Keith Whitwell
<keithw@vmware.com>
Fri, 9 Oct 2009 15:19:00 +0000
(16:19 +0100)
committer
Keith Whitwell
<keithw@vmware.com>
Fri, 9 Oct 2009 15:20:56 +0000
(16:20 +0100)
src/gallium/drivers/llvmpipe/lp_rast.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/llvmpipe/lp_rast.c
b/src/gallium/drivers/llvmpipe/lp_rast.c
index e73331535fba345d6bf276243f8a2331f5ce0d5c..3585011ace065c6f99ce4992522746ed2b0e22c0 100644
(file)
--- a/
src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/
src/gallium/drivers/llvmpipe/lp_rast.c
@@
-269,15
+269,23
@@
static void lp_rast_store_color( struct lp_rasterizer *rast )
{
const unsigned x = rast->x;
const unsigned y = rast->y;
+ unsigned w = TILESIZE;
+ unsigned h = TILESIZE;
- RAST_DEBUG("%s %d,%d\n", __FUNCTION__, x, y);
+ if (x + w > rast->width)
+ w -= x + w - rast->width;
+
+ if (y + h > rast->height)
+ h -= y + h - rast->height;
+
+ RAST_DEBUG("%s %d,%d %dx%d\n", __FUNCTION__, x, y, w, h);
lp_tile_write_4ub(rast->cbuf_transfer->format,
rast->tile.color,
rast->cbuf_map,
rast->cbuf_transfer->stride,
x, y,
-
TILESIZE, TILESIZE
);
+
w, h
);
}