summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-16 17:43:41 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-16 17:43:41 -0600
commitefdacc90b4f8262706715f4bf918cf11378922be (patch)
treecdb138cef8b9ee2eedbdf58ea6c8c0d10d04eb1e /src/mesa/pipe/softpipe
parentbd35c53143560177a045b314c9b4196c229f4a4c (diff)
Update mask calculations for point drawing.
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_prim_setup.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/pipe/softpipe/sp_prim_setup.c b/src/mesa/pipe/softpipe/sp_prim_setup.c
index 598c2f6c22..4749f20697 100644
--- a/src/mesa/pipe/softpipe/sp_prim_setup.c
+++ b/src/mesa/pipe/softpipe/sp_prim_setup.c
@@ -1011,8 +1011,8 @@ setup_point(struct draw_stage *stage, struct prim_header *prim)
dist2 = dx * dx + dy * dy;
if (dist2 <= rmax2) {
cover = 1.0F - (dist2 - rmin2) * cscale;
- setup->quad.coverage[QUAD_BOTTOM_LEFT] = MIN2(cover, 1.0f);
- setup->quad.mask |= MASK_BOTTOM_LEFT;
+ setup->quad.coverage[QUAD_TOP_LEFT] = MIN2(cover, 1.0f);
+ setup->quad.mask |= MASK_TOP_LEFT;
}
dx = (ix + 1.5f) - x;
@@ -1020,8 +1020,8 @@ setup_point(struct draw_stage *stage, struct prim_header *prim)
dist2 = dx * dx + dy * dy;
if (dist2 <= rmax2) {
cover = 1.0F - (dist2 - rmin2) * cscale;
- setup->quad.coverage[QUAD_BOTTOM_RIGHT] = MIN2(cover, 1.0f);
- setup->quad.mask |= MASK_BOTTOM_RIGHT;
+ setup->quad.coverage[QUAD_TOP_RIGHT] = MIN2(cover, 1.0f);
+ setup->quad.mask |= MASK_TOP_RIGHT;
}
dx = (ix + 0.5f) - x;
@@ -1029,8 +1029,8 @@ setup_point(struct draw_stage *stage, struct prim_header *prim)
dist2 = dx * dx + dy * dy;
if (dist2 <= rmax2) {
cover = 1.0F - (dist2 - rmin2) * cscale;
- setup->quad.coverage[QUAD_TOP_LEFT] = MIN2(cover, 1.0f);
- setup->quad.mask |= MASK_TOP_LEFT;
+ setup->quad.coverage[QUAD_BOTTOM_LEFT] = MIN2(cover, 1.0f);
+ setup->quad.mask |= MASK_BOTTOM_LEFT;
}
dx = (ix + 1.5f) - x;
@@ -1038,8 +1038,8 @@ setup_point(struct draw_stage *stage, struct prim_header *prim)
dist2 = dx * dx + dy * dy;
if (dist2 <= rmax2) {
cover = 1.0F - (dist2 - rmin2) * cscale;
- setup->quad.coverage[QUAD_TOP_RIGHT] = MIN2(cover, 1.0f);
- setup->quad.mask |= MASK_TOP_RIGHT;
+ setup->quad.coverage[QUAD_BOTTOM_RIGHT] = MIN2(cover, 1.0f);
+ setup->quad.mask |= MASK_BOTTOM_RIGHT;
}
if (setup->quad.mask) {
@@ -1068,12 +1068,12 @@ setup_point(struct draw_stage *stage, struct prim_header *prim)
if (iy + 0.5 < y - halfSize) {
/* below the bottom edge */
- setup->quad.mask &= ~(MASK_BOTTOM_LEFT | MASK_BOTTOM_RIGHT);
+ setup->quad.mask &= ~(MASK_TOP_LEFT | MASK_TOP_RIGHT);
}
if (iy + 1.5 > y + halfSize) {
/* above the top edge */
- setup->quad.mask &= ~(MASK_TOP_LEFT | MASK_TOP_RIGHT);
+ setup->quad.mask &= ~(MASK_BOTTOM_LEFT | MASK_BOTTOM_RIGHT);
}
if (setup->quad.mask) {