*/
-#include "util/u_clear.h"
#include "util/u_format.h"
#include "util/u_pack_color.h"
#include "i915_context.h"
const union pipe_color_union *color,
double depth, unsigned stencil)
{
- util_clear(pipe, &i915_context(pipe)->framebuffer, buffers, color, depth,
- stencil);
+ struct pipe_framebuffer_state *framebuffer =
+ &i915_context(pipe)->framebuffer;
+ unsigned i;
+
+ for (i = 0; i < framebuffer->nr_cbufs; i++) {
+ if (buffers & (PIPE_CLEAR_COLOR0 << i)) {
+ struct pipe_surface *ps = framebuffer->cbufs[i];
+
+ if (ps) {
+ pipe->clear_render_target(pipe, ps, color, 0, 0, ps->width,
+ ps->height, true);
+ }
+ }
+ }
+
+ if (buffers & PIPE_CLEAR_DEPTHSTENCIL) {
+ struct pipe_surface *ps = framebuffer->zsbuf;
+ pipe->clear_depth_stencil(pipe, ps, buffers & PIPE_CLEAR_DEPTHSTENCIL,
+ depth, stencil,
+ 0, 0, ps->width, ps->height, true);
+ }
}
void