From fb206809ba2a131fd9034e10a00592f2d0d81fce Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 1 Aug 2007 12:58:38 -0600 Subject: Checkpoint: glClear changes - working, bug very rough. --- src/mesa/drivers/x11/xm_dd.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/mesa/drivers/x11/xm_dd.c') diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 5725414856..0aa47d55e4 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -435,6 +435,32 @@ clear_buffers(GLcontext *ctx, GLbitfield buffers) } +void +xmesa_clear(struct pipe_context *pipe, GLboolean color, GLboolean depth, + GLboolean stencil, GLboolean accum) +{ + struct softpipe_context *sp = (struct softpipe_context *) pipe; + if (color) { + GET_CURRENT_CONTEXT(ctx); + GLuint i; + softpipe_update_derived(sp); + for (i = 0; i < sp->framebuffer.num_cbufs; i++) { + struct pipe_surface *ps = sp->framebuffer.cbufs[i]; + struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) ps->rb; + const GLint x = sp->cliprect.minx; + const GLint y = sp->cliprect.miny; + const GLint w = sp->cliprect.maxx - x; + const GLint h = sp->cliprect.maxy - y; + xrb->clearFunc(ctx, xrb, x, y, w, h); + } + color = GL_FALSE; + } + + softpipe_clear(pipe, color, depth, stencil, accum); +} + + + #ifndef XFree86Server /* XXX this was never tested in the Xserver environment */ -- cgit v1.2.3