Mesa (master): draw: fix front/back error in unfilled pipeline stage
Keith Whitwell
keithw at kemper.freedesktop.org
Fri May 21 14:45:05 UTC 2010
Module: Mesa
Branch: master
Commit: 5ebd2fa7dacee1b517e50ac89af66800fe47af22
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ebd2fa7dacee1b517e50ac89af66800fe47af22
Author: Keith Whitwell <keithw at vmware.com>
Date: Fri May 14 23:47:05 2010 +0100
draw: fix front/back error in unfilled pipeline stage
---
src/gallium/auxiliary/draw/draw_pipe_unfilled.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/gallium/auxiliary/draw/draw_pipe_unfilled.c b/src/gallium/auxiliary/draw/draw_pipe_unfilled.c
index d1f0512..e333d26 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_unfilled.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_unfilled.c
@@ -134,7 +134,8 @@ static void unfilled_tri( struct draw_stage *stage,
struct prim_header *header )
{
struct unfilled_stage *unfilled = unfilled_stage(stage);
- unsigned mode = unfilled->mode[header->det >= 0.0];
+ unsigned cw = header->det >= 0.0;
+ unsigned mode = unfilled->mode[cw];
if (0)
print_header_flags(header->flags);
@@ -161,8 +162,8 @@ static void unfilled_first_tri( struct draw_stage *stage,
struct unfilled_stage *unfilled = unfilled_stage(stage);
const struct pipe_rasterizer_state *rast = stage->draw->rasterizer;
- unfilled->mode[rast->front_ccw ? 0 : 1] = rast->fill_front;
- unfilled->mode[rast->front_ccw ? 1 : 0] = rast->fill_back;
+ unfilled->mode[0] = rast->front_ccw ? rast->fill_front : rast->fill_back;
+ unfilled->mode[1] = rast->front_ccw ? rast->fill_back : rast->fill_front;
stage->tri = unfilled_tri;
stage->tri( stage, header );
More information about the mesa-commit
mailing list