summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_clear.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_clear.c')
-rw-r--r--src/gallium/drivers/r300/r300_clear.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gallium/drivers/r300/r300_clear.c b/src/gallium/drivers/r300/r300_clear.c
index fd28437aaa..8b9cb819ae 100644
--- a/src/gallium/drivers/r300/r300_clear.c
+++ b/src/gallium/drivers/r300/r300_clear.c
@@ -22,12 +22,14 @@
#include "r300_clear.h"
-/* This gets its own file because Intel's is in its own file.
- * I assume there's a good reason. */
+/* Clears currently bound buffers. */
void r300_clear(struct pipe_context* pipe,
- struct pipe_surface* ps,
- unsigned color)
+ unsigned buffers,
+ const float* rgba,
+ double depth,
+ unsigned stencil)
{
- pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, color);
- ps->status = PIPE_SURFACE_STATUS_DEFINED;
-} \ No newline at end of file
+ /* XXX we can and should do one clear if both color and zs are set */
+ util_clear(pipe, &r300_context(pipe)->framebuffer_state,
+ buffers, rgba, depth, stencil);
+}