summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common/depthtmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/common/depthtmp.h')
-rw-r--r--src/mesa/drivers/dri/common/depthtmp.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/depthtmp.h b/src/mesa/drivers/dri/common/depthtmp.h
index f3da61e519..74ebd6d5e5 100644
--- a/src/mesa/drivers/dri/common/depthtmp.h
+++ b/src/mesa/drivers/dri/common/depthtmp.h
@@ -64,6 +64,42 @@ static void TAG(WriteDepthSpan)( GLcontext *ctx,
HW_WRITE_UNLOCK();
}
+static void TAG(WriteMonoDepthSpan)( GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ const GLdepth depth,
+ const GLubyte mask[] )
+{
+ HW_WRITE_LOCK()
+ {
+ GLint x1;
+ GLint n1;
+ LOCAL_DEPTH_VARS;
+
+ y = Y_FLIP( y );
+
+ HW_CLIPLOOP()
+ {
+ GLint i = 0;
+ CLIPSPAN( x, y, n, x1, n1, i );
+
+ if ( DBG ) fprintf( stderr, "%s %d..%d (x1 %d) = %u\n",
+ __FUNCTION__, (int)i, (int)n1, (int)x1, (uint)depth );
+
+ if ( mask ) {
+ for ( ; i < n1 ; i++, x1++ ) {
+ if ( mask[i] ) WRITE_DEPTH( x1, y, depth );
+ }
+ } else {
+ for ( ; i < n1 ; i++, x1++ ) {
+ WRITE_DEPTH( x1, y, depth );
+ }
+ }
+ }
+ HW_ENDCLIPLOOP();
+ }
+ HW_WRITE_UNLOCK();
+}
+
static void TAG(WriteDepthPixels)( GLcontext *ctx,
GLuint n,
const GLint x[],