util: remove LIST_IS_EMPTY macro
[mesa.git] / src / gallium / drivers / softpipe / sp_surface.c
index 102e8e82f667e4819a82990fbe7a657f3d1d1a82..3908411376d2b551c98639b38e8ef92e77c77662 100644 (file)
@@ -36,6 +36,9 @@ static void sp_blit(struct pipe_context *pipe,
 {
    struct softpipe_context *sp = softpipe_context(pipe);
 
+   if (info->render_condition_enable && !softpipe_check_render_cond(sp))
+      return;
+
    if (info->src.resource->nr_samples > 1 &&
        info->dst.resource->nr_samples <= 1 &&
        !util_format_is_depth_or_stencil(info->src.resource->format) &&
@@ -64,8 +67,8 @@ static void sp_blit(struct pipe_context *pipe,
    util_blitter_save_so_targets(sp->blitter, sp->num_so_targets,
                      (struct pipe_stream_output_target**)sp->so_targets);
    util_blitter_save_rasterizer(sp->blitter, sp->rasterizer);
-   util_blitter_save_viewport(sp->blitter, &sp->viewport);
-   util_blitter_save_scissor(sp->blitter, &sp->scissor);
+   util_blitter_save_viewport(sp->blitter, &sp->viewports[0]);
+   util_blitter_save_scissor(sp->blitter, &sp->scissors[0]);
    util_blitter_save_fragment_shader(sp->blitter, sp->fs);
    util_blitter_save_blend(sp->blitter, sp->blend);
    util_blitter_save_depth_stencil_alpha(sp->blitter, sp->depth_stencil);
@@ -94,11 +97,12 @@ softpipe_clear_render_target(struct pipe_context *pipe,
                              struct pipe_surface *dst,
                              const union pipe_color_union *color,
                              unsigned dstx, unsigned dsty,
-                             unsigned width, unsigned height)
+                             unsigned width, unsigned height,
+                             bool render_condition_enabled)
 {
    struct softpipe_context *softpipe = softpipe_context(pipe);
 
-   if (!softpipe_check_render_cond(softpipe))
+   if (render_condition_enabled && !softpipe_check_render_cond(softpipe))
       return;
 
    util_clear_render_target(pipe, dst, color,
@@ -113,11 +117,12 @@ softpipe_clear_depth_stencil(struct pipe_context *pipe,
                              double depth,
                              unsigned stencil,
                              unsigned dstx, unsigned dsty,
-                             unsigned width, unsigned height)
+                             unsigned width, unsigned height,
+                             bool render_condition_enabled)
 {
    struct softpipe_context *softpipe = softpipe_context(pipe);
 
-   if (!softpipe_check_render_cond(softpipe))
+   if (render_condition_enabled && !softpipe_check_render_cond(softpipe))
       return;
 
    util_clear_depth_stencil(pipe, dst, clear_flags,