summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xm_dd.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-02 16:08:18 -0600
committerBrian <[email protected]>2007-08-02 16:08:18 -0600
commit47fdaf0ed9ef2f89cdaa97d0d48b1f1194d710c6 (patch)
tree3e4be03579b8bc860dc29e4c7b2ae93fded4e759 /src/mesa/drivers/x11/xm_dd.c
parent184b6a1f04e060e73858438561a0261d32eeb506 (diff)
pipe->clear() now takes a surface, rather than color/depth/stencil flags.
pipe->clear() only used to clear whole buffers (no scissor) w/out masking. Draw a colored quadrilateral in all other cases.
Diffstat (limited to 'src/mesa/drivers/x11/xm_dd.c')
-rw-r--r--src/mesa/drivers/x11/xm_dd.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index 87f8ede50b3..f64f8780cf6 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -381,8 +381,8 @@ clear_nbit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb,
-static void
-clear_buffers(GLcontext *ctx, GLbitfield buffers)
+void
+xmesa_clear_buffers(GLcontext *ctx, GLbitfield buffers)
{
if (ctx->DrawBuffer->Name == 0) {
/* this is a window system framebuffer */
@@ -395,7 +395,6 @@ clear_buffers(GLcontext *ctx, GLbitfield buffers)
/* we can't handle color or index masking */
if (*colorMask == 0xffffffff && ctx->Color.IndexMask == 0xffffffff) {
-#if 0
if (buffers & BUFFER_BIT_FRONT_LEFT) {
/* clear front color buffer */
struct gl_renderbuffer *frontRb
@@ -419,14 +418,6 @@ clear_buffers(GLcontext *ctx, GLbitfield buffers)
buffers &= ~BUFFER_BIT_BACK_LEFT;
}
}
-#else
- /* Clear with state-tracker/pipe interface */
- struct st_context *st = st_context(ctx);
- GLboolean color = (buffers & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT)) ? 1: 0;
- GLboolean depth = (buffers & BUFFER_BIT_DEPTH) ? 1 : 0;
- GLboolean stencil = (buffers & BUFFER_BIT_STENCIL) ? 1 : 0;
- st_clear(st, color, depth, stencil);
-#endif
}
}
if (buffers)
@@ -434,6 +425,7 @@ clear_buffers(GLcontext *ctx, GLbitfield buffers)
}
+#if 0
void
xmesa_clear(struct pipe_context *pipe, GLboolean color, GLboolean depth,
GLboolean stencil, GLboolean accum)
@@ -458,9 +450,14 @@ xmesa_clear(struct pipe_context *pipe, GLboolean color, GLboolean depth,
xrb->clearFunc(ctx, xrb, x, y, w, h);
}
}
-
}
+#endif
+
+void
+xmesa_clear(struct pipe_context *pipe, struct pipe_surface *ps, GLuint value)
+{
+}
#ifndef XFree86Server
@@ -1113,7 +1110,7 @@ xmesa_init_driver_functions( XMesaVisual xmvisual,
driver->IndexMask = index_mask;
driver->ColorMask = color_mask;
driver->Enable = enable;
- driver->Clear = clear_buffers;
+ driver->Clear = xmesa_clear_buffers;
driver->Viewport = xmesa_viewport;
#ifndef XFree86Server
driver->CopyPixels = xmesa_CopyPixels;