aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-19 12:11:26 +0200
committermarha <marha@users.sourceforge.net>2011-10-19 12:11:26 +0200
commit1e90ede4237374dfbb2c8c506a906233bcfd3c5d (patch)
tree13b59b0ab2715fd0bb9eea788c73b08f3b07c01e /mesalib/src/mesa/swrast
parentbaf98f9bb36f956245d83ecd04f90625d6d68d2b (diff)
parent9f986778bd4393c5a9108426969d45aa7f10f334 (diff)
downloadvcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.tar.gz
vcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.tar.bz2
vcxsrv-1e90ede4237374dfbb2c8c506a906233bcfd3c5d.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/include/os.h
Diffstat (limited to 'mesalib/src/mesa/swrast')
-rw-r--r--mesalib/src/mesa/swrast/s_drawpix.c5
-rw-r--r--mesalib/src/mesa/swrast/s_readpix.c5
-rw-r--r--mesalib/src/mesa/swrast/s_span.c5
3 files changed, 12 insertions, 3 deletions
diff --git a/mesalib/src/mesa/swrast/s_drawpix.c b/mesalib/src/mesa/swrast/s_drawpix.c
index 63bfa79b5..20bf4d626 100644
--- a/mesalib/src/mesa/swrast/s_drawpix.c
+++ b/mesalib/src/mesa/swrast/s_drawpix.c
@@ -590,8 +590,11 @@ draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
ASSERT(stencilRb);
if (depthRb->_BaseFormat == GL_DEPTH_STENCIL_EXT &&
- stencilRb->_BaseFormat == GL_DEPTH_STENCIL_EXT &&
+ depthRb->Format == MESA_FORMAT_Z24_S8 &&
+ type == GL_UNSIGNED_INT_24_8 &&
depthRb == stencilRb &&
+ depthRb->GetRow && /* May be null if depthRb is a wrapper around
+ * separate depth and stencil buffers. */
!scaleOrBias &&
!zoom &&
ctx->Depth.Mask &&
diff --git a/mesalib/src/mesa/swrast/s_readpix.c b/mesalib/src/mesa/swrast/s_readpix.c
index 6eec2fc78..0d2e63f72 100644
--- a/mesalib/src/mesa/swrast/s_readpix.c
+++ b/mesalib/src/mesa/swrast/s_readpix.c
@@ -391,8 +391,11 @@ read_depth_stencil_pixels(struct gl_context *ctx,
stencilRb = ctx->ReadBuffer->Attachment[BUFFER_STENCIL].Renderbuffer;
if (depthRb->_BaseFormat == GL_DEPTH_STENCIL_EXT &&
- stencilRb->_BaseFormat == GL_DEPTH_STENCIL_EXT &&
+ depthRb->Format == MESA_FORMAT_Z24_S8 &&
+ type == GL_UNSIGNED_INT_24_8 &&
depthRb == stencilRb &&
+ depthRb->GetRow && /* May be null if depthRb is a wrapper around
+ * separate depth and stencil buffers. */
!scaleOrBias &&
!stencilTransfer) {
/* This is the ideal case.
diff --git a/mesalib/src/mesa/swrast/s_span.c b/mesalib/src/mesa/swrast/s_span.c
index 1aa20f9d7..e517c9ae1 100644
--- a/mesalib/src/mesa/swrast/s_span.c
+++ b/mesalib/src/mesa/swrast/s_span.c
@@ -707,11 +707,13 @@ clip_span( struct gl_context *ctx, SWspan *span )
const GLint n = span->end;
GLubyte *mask = span->array->mask;
GLint i;
+ GLuint passed = 0;
if (span->arrayMask & SPAN_MASK) {
/* note: using & intead of && to reduce branches */
for (i = 0; i < n; i++) {
mask[i] &= (x[i] >= xmin) & (x[i] < xmax)
& (y[i] >= ymin) & (y[i] < ymax);
+ passed += mask[i];
}
}
else {
@@ -719,9 +721,10 @@ clip_span( struct gl_context *ctx, SWspan *span )
for (i = 0; i < n; i++) {
mask[i] = (x[i] >= xmin) & (x[i] < xmax)
& (y[i] >= ymin) & (y[i] < ymax);
+ passed += mask[i];
}
}
- return GL_TRUE; /* some pixels visible */
+ return passed > 0;
}
else {
/* horizontal span of pixels */