summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/r300_ioctl.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-03-21 15:05:34 +1000
committerDave Airlie <[email protected]>2009-03-21 15:05:34 +1000
commitfbda2ad4457cf47494ae3eee28d417afb262c5c2 (patch)
tree681db2668d5b912dc5de0330b0b1caf023e0efaf /src/mesa/drivers/dri/r300/r300_ioctl.c
parentffde891a0390a915716087ca7d99b3ddf7f1ef89 (diff)
r300: hw clear buffer 0 hopefully
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_ioctl.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_ioctl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c
index d1cf57959fa..d4acbd7e997 100644
--- a/src/mesa/drivers/dri/r300/r300_ioctl.c
+++ b/src/mesa/drivers/dri/r300/r300_ioctl.c
@@ -583,6 +583,11 @@ static void r300Clear(GLcontext * ctx, GLbitfield mask)
mask &= ~BUFFER_BIT_STENCIL;
}
+ if (mask & BUFFER_BIT_COLOR0) {
+ flags |= BUFFER_BIT_COLOR0;
+ mask &= ~BUFFER_BIT_COLOR0;
+ }
+
if (mask) {
if (RADEON_DEBUG & DEBUG_FALLBACKS)
fprintf(stderr, "%s: swrast clear, mask: %x\n",
@@ -596,6 +601,12 @@ static void r300Clear(GLcontext * ctx, GLbitfield mask)
r300EmitClearState(ctx);
rrbd = (void *)rfb->base.Attachment[BUFFER_DEPTH].Renderbuffer;
+ if (flags & BUFFER_BIT_COLOR0) {
+ rrb = (void *)rfb->base.Attachment[BUFFER_COLOR0].Renderbuffer;
+ r300ClearBuffer(r300, CLEARBUFFER_COLOR, rrb, NULL);
+ bits = 0;
+ }
+
if (flags & BUFFER_BIT_FRONT_LEFT) {
rrb = (void *)rfb->base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer;
r300ClearBuffer(r300, bits | CLEARBUFFER_COLOR, rrb, rrbd);