diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-04-18 09:48:55 +0200 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-04-18 10:36:28 +0200 |
commit | 4272c01fbfd42833e4e0937bed84e45fe5da52b9 (patch) | |
tree | 5dd5ca13c18efa2714560d26f547fd4199fd02fb /src | |
parent | b609cfc7c9c38f26e7e6d6f7dd5dd6d38f4ed209 (diff) |
softpipe: Preserve/check the signal of the number of scanlines in an edge.
It can become negative in some weird triangles.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_setup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c index 85966bc5e4..e136cb7cf7 100644 --- a/src/gallium/drivers/softpipe/sp_setup.c +++ b/src/gallium/drivers/softpipe/sp_setup.c @@ -691,7 +691,7 @@ static void setup_tri_edges( struct setup_context *setup ) static void subtriangle( struct setup_context *setup, struct edge *eleft, struct edge *eright, - unsigned lines ) + int lines ) { const struct pipe_scissor_state *cliprect = &setup->softpipe->cliprect; const int minx = (int) cliprect->minx; @@ -702,6 +702,7 @@ static void subtriangle( struct setup_context *setup, int sy = (int)eleft->sy; assert((int)eleft->sy == (int) eright->sy); + assert(lines >= 0); /* clip top/bottom */ start_y = sy; |