X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fllvmpipe%2Flp_clear.c;h=0b37347a967c3e0d8a18323fda3cdf97f34d8c47;hb=4445e170bee23a3607ece0e010adef7058ac6a11;hp=3e8c4109251bf6a96dfba285eed17c5feb3f3d17;hpb=080c40ab32b2abd6d8381b4a0cc143d36a1652b2;p=mesa.git diff --git a/src/gallium/drivers/llvmpipe/lp_clear.c b/src/gallium/drivers/llvmpipe/lp_clear.c index 3e8c4109251..0b37347a967 100644 --- a/src/gallium/drivers/llvmpipe/lp_clear.c +++ b/src/gallium/drivers/llvmpipe/lp_clear.c @@ -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 ); }