projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
128d93a
)
llvmpipe: Clamp both extremes of triangles to framebuffer size.
author
José Fonseca
<jfonseca@vmware.com>
Thu, 11 Feb 2010 10:58:46 +0000
(10:58 +0000)
committer
José Fonseca
<jfonseca@vmware.com>
Thu, 11 Feb 2010 10:58:46 +0000
(10:58 +0000)
Fix segmentation fault when triangles crossed the axis.
src/gallium/drivers/llvmpipe/lp_setup_tri.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index 9e59a6602cc698a87e92d7f011a0c5fbaa1c0a43..a8bf540803b8f5ba07057825f8f435a764d54234 100644
(file)
--- a/
src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/
src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@
-442,8
+442,11
@@
do_triangle_ccw(struct setup_context *setup,
maxx = maxx / TILE_SIZE;
maxy = maxy / TILE_SIZE;
- /* Clamp maxx, maxy to framebuffer size
+ /*
+ * Clamp to framebuffer size
*/
+ minx = MAX2(minx, 0);
+ miny = MAX2(miny, 0);
maxx = MIN2(maxx, scene->tiles_x - 1);
maxy = MIN2(maxy, scene->tiles_y - 1);