#include "lp_clear.h"
#include "lp_context.h"
#include "lp_setup.h"
-#include "lp_state.h"
+#include "lp_query.h"
+#include "lp_debug.h"
/**
void
llvmpipe_clear(struct pipe_context *pipe,
unsigned buffers,
- const float *rgba,
+ const union pipe_color_union *color,
double depth,
unsigned stencil)
{
if (llvmpipe->no_rast)
return;
- lp_setup_clear( llvmpipe->setup, rgba, depth, stencil, buffers );
+ if (!llvmpipe_check_render_cond(llvmpipe))
+ return;
+
+ if (LP_PERF & PERF_NO_DEPTH)
+ buffers &= ~PIPE_CLEAR_DEPTHSTENCIL;
+
+ lp_setup_clear( llvmpipe->setup, color->f, depth, stencil, buffers );
}