X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fllvmpipe%2Flp_clear.c;h=0b37347a967c3e0d8a18323fda3cdf97f34d8c47;hb=4445e170bee23a3607ece0e010adef7058ac6a11;hp=4bae44e2ea24b31456d1970c4c4aac612ae55e1c;hpb=ce7ac8e7439fba74fc1ee368559dd520a2d1eabe;p=mesa.git diff --git a/src/gallium/drivers/llvmpipe/lp_clear.c b/src/gallium/drivers/llvmpipe/lp_clear.c index 4bae44e2ea2..0b37347a967 100644 --- a/src/gallium/drivers/llvmpipe/lp_clear.c +++ b/src/gallium/drivers/llvmpipe/lp_clear.c @@ -36,7 +36,8 @@ #include "lp_clear.h" #include "lp_context.h" #include "lp_setup.h" -#include "lp_state.h" +#include "lp_query.h" +#include "lp_debug.h" /** @@ -46,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) { @@ -55,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 ); }