summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_points.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-11-30 13:01:57 -0700
committerBrian <brian.paul@tungstengraphics.com>2007-11-30 13:01:57 -0700
commitfcd7c37fd3d0f61cf6ac81170bc0b3fca64ad9bb (patch)
tree4d914939e75c09c6d3592403b34cdf0ce044e361 /src/mesa/swrast/s_points.c
parent44c8dac0af8ae679b25b458980ce97d8ff410766 (diff)
fix broken two-sided stencil
Diffstat (limited to 'src/mesa/swrast/s_points.c')
-rw-r--r--src/mesa/swrast/s_points.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c
index dd664b980e..d60e175baa 100644
--- a/src/mesa/swrast/s_points.c
+++ b/src/mesa/swrast/s_points.c
@@ -106,6 +106,8 @@ sprite_point(GLcontext *ctx, const SWvertex *vert)
INIT_SPAN(span, GL_POINT);
span.interpMask = SPAN_Z | SPAN_RGBA;
+ span.facing = swrast->PointLineFacing;
+
span.red = ChanToFixed(vert->color[0]);
span.green = ChanToFixed(vert->color[1]);
span.blue = ChanToFixed(vert->color[2]);
@@ -280,6 +282,8 @@ smooth_point(GLcontext *ctx, const SWvertex *vert)
span.interpMask = SPAN_Z | SPAN_RGBA;
span.arrayMask = SPAN_COVERAGE | SPAN_MASK;
+ span.facing = swrast->PointLineFacing;
+
span.red = ChanToFixed(vert->color[0]);
span.green = ChanToFixed(vert->color[1]);
span.blue = ChanToFixed(vert->color[2]);
@@ -386,6 +390,7 @@ large_point(GLcontext *ctx, const SWvertex *vert)
/* span init */
INIT_SPAN(span, GL_POINT);
span.arrayMask = SPAN_XY;
+ span.facing = swrast->PointLineFacing;
if (ciMode) {
span.interpMask = SPAN_Z | SPAN_INDEX;
@@ -492,7 +497,8 @@ pixel_point(GLcontext *ctx, const SWvertex *vert)
/* check if we need to flush */
if (span->end >= MAX_WIDTH ||
- (swrast->_RasterMask & (BLEND_BIT | LOGIC_OP_BIT | MASKING_BIT))) {
+ (swrast->_RasterMask & (BLEND_BIT | LOGIC_OP_BIT | MASKING_BIT)) ||
+ span->facing != swrast->PointLineFacing) {
if (ciMode)
_swrast_write_index_span(ctx, span);
else
@@ -502,6 +508,8 @@ pixel_point(GLcontext *ctx, const SWvertex *vert)
count = span->end;
+ span->facing = swrast->PointLineFacing;
+
/* fragment attributes */
if (ciMode) {
span->array->index[count] = (GLuint) vert->attrib[FRAG_ATTRIB_CI][0];