gallium: adapt to get_query_result interface change
[mesa.git] / src / gallium / drivers / llvmpipe / lp_clear.c
index 3e8c4109251bf6a96dfba285eed17c5feb3f3d17..0b37347a967c3e0d8a18323fda3cdf97f34d8c47 100644 (file)
@@ -36,6 +36,8 @@
 #include "lp_clear.h"
 #include "lp_context.h"
 #include "lp_setup.h"
+#include "lp_query.h"
+#include "lp_debug.h"
 
 
 /**
@@ -45,7 +47,7 @@
 void
 llvmpipe_clear(struct pipe_context *pipe, 
                unsigned buffers,
-               const float *rgba,
+               const union pipe_color_union *color,
                double depth,
                unsigned stencil)
 {
@@ -54,5 +56,11 @@ llvmpipe_clear(struct pipe_context *pipe,
    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 );
 }