gallium: add render_condition_enable param to clear_render_target/depth_stencil
authorMarek Olšák <marek.olsak@amd.com>
Mon, 8 Aug 2016 22:37:39 +0000 (00:37 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 9 Aug 2016 23:10:21 +0000 (01:10 +0200)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
26 files changed:
src/gallium/auxiliary/util/u_clear.h
src/gallium/auxiliary/vl/vl_bicubic_filter.c
src/gallium/auxiliary/vl/vl_compositor.c
src/gallium/docs/source/context.rst
src/gallium/drivers/ddebug/dd_draw.c
src/gallium/drivers/freedreno/freedreno_draw.c
src/gallium/drivers/i915/i915_surface.c
src/gallium/drivers/ilo/ilo_blit.c
src/gallium/drivers/llvmpipe/lp_surface.c
src/gallium/drivers/noop/noop_pipe.c
src/gallium/drivers/nouveau/nv30/nv30_clear.c
src/gallium/drivers/nouveau/nv50/nv50_surface.c
src/gallium/drivers/nouveau/nv50/nv84_video.c
src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
src/gallium/drivers/r300/r300_blit.c
src/gallium/drivers/r600/r600_blit.c
src/gallium/drivers/radeonsi/si_blit.c
src/gallium/drivers/rbug/rbug_context.c
src/gallium/drivers/softpipe/sp_surface.c
src/gallium/drivers/swr/swr_clear.cpp
src/gallium/drivers/trace/tr_context.c
src/gallium/drivers/vc4/vc4_draw.c
src/gallium/include/pipe/p_context.h
src/gallium/state_trackers/nine/device9.c
src/gallium/state_trackers/nine/surface9.c
src/gallium/state_trackers/vdpau/surface.c

index 864d1302b4fbb3734aadcabbf88987893948e85b..64135304ed57ca4dc8cbcce3dbdb6a0dd3662a2d 100644 (file)
@@ -49,7 +49,8 @@ util_clear(struct pipe_context *pipe,
          struct pipe_surface *ps = framebuffer->cbufs[i];
 
          if (ps) {
-            pipe->clear_render_target(pipe, ps, color, 0, 0, ps->width, ps->height);
+            pipe->clear_render_target(pipe, ps, color, 0, 0, ps->width,
+                                      ps->height, true);
          }
       }
    }
@@ -58,6 +59,6 @@ util_clear(struct pipe_context *pipe,
       struct pipe_surface *ps = framebuffer->zsbuf;
       pipe->clear_depth_stencil(pipe, ps, buffers & PIPE_CLEAR_DEPTHSTENCIL,
                                 depth, stencil,
-                                0, 0, ps->width, ps->height);
+                                0, 0, ps->width, ps->height, true);
    }
 }
index 51a0019119acfc343a189293986e67d1302a2bba..0364d43268760ada3176471d6fc388402f8c643f 100644 (file)
@@ -440,7 +440,7 @@ vl_bicubic_filter_render(struct vl_bicubic_filter *filter,
 
    filter->pipe->set_scissor_states(filter->pipe, 0, 1, &scissor);
    filter->pipe->clear_render_target(filter->pipe, dst, &clear_color,
-                                     0, 0, dst->width, dst->height);
+                                     0, 0, dst->width, dst->height, false);
    pipe_set_constant_buffer(filter->pipe, PIPE_SHADER_FRAGMENT, 0, surface_size);
    filter->pipe->bind_rasterizer_state(filter->pipe, filter->rs_state);
    filter->pipe->bind_blend_state(filter->pipe, filter->blend);
index f7517f33e83fe4fd3054335b64e58b5b356ed407..03a0a6453bdc79e717d888d0c2ac90ea2e57ad39 100644 (file)
@@ -1168,7 +1168,7 @@ vl_compositor_render(struct vl_compositor_state *s,
        (dirty_area->x0 < dirty_area->x1 || dirty_area->y0 < dirty_area->y1)) {
 
       c->pipe->clear_render_target(c->pipe, dst_surface, &s->clear_color,
-                                   0, 0, dst_surface->width, dst_surface->height);
+                                   0, 0, dst_surface->width, dst_surface->height, false);
       dirty_area->x0 = dirty_area->y0 = MAX_DIRTY;
       dirty_area->x1 = dirty_area->y1 = MIN_DIRTY;
    }
index e646ea02f784f706e2e97823edffb043026dcc25..7fddabffeb4af047f0837c85887c0869b34abe66 100644 (file)
@@ -428,9 +428,10 @@ A drawing command can be skipped depending on the outcome of a query
 (typically an occlusion query, or streamout overflow predicate).
 The ``render_condition`` function specifies the query which should be checked
 prior to rendering anything. Functions always honoring render_condition include
-(and are limited to) draw_vbo, clear, clear_render_target, clear_depth_stencil.
-The blit function (but not resource_copy_region, which seems inconsistent)
-can also optionally honor the current render condition.
+(and are limited to) draw_vbo and clear.
+The blit, clear_render_target and clear_depth_stencil functions (but
+not resource_copy_region, which seems inconsistent) can also optionally honor
+the current render condition.
 
 If ``render_condition`` is called with ``query`` = NULL, conditional
 rendering is disabled and drawing takes place normally.
index e2005edc872cecc9d5767cc794912be549c536ec..7abcf877a3b1841ce77828f095c5653e38217bba 100644 (file)
@@ -1255,7 +1255,8 @@ dd_context_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 dd_context *dctx = dd_context(_pipe);
    struct pipe_context *pipe = dctx->pipe;
@@ -1264,7 +1265,8 @@ dd_context_clear_render_target(struct pipe_context *_pipe,
    call.type = CALL_CLEAR_RENDER_TARGET;
 
    dd_before_draw(dctx);
-   pipe->clear_render_target(pipe, dst, color, dstx, dsty, width, height);
+   pipe->clear_render_target(pipe, dst, color, dstx, dsty, width, height,
+                             render_condition_enabled);
    dd_after_draw(dctx, &call);
 }
 
@@ -1272,7 +1274,8 @@ static void
 dd_context_clear_depth_stencil(struct pipe_context *_pipe,
                                struct pipe_surface *dst, unsigned clear_flags,
                                double depth, unsigned stencil, unsigned dstx,
-                               unsigned dsty, unsigned width, unsigned height)
+                               unsigned dsty, unsigned width, unsigned height,
+                               bool render_condition_enabled)
 {
    struct dd_context *dctx = dd_context(_pipe);
    struct pipe_context *pipe = dctx->pipe;
@@ -1282,7 +1285,8 @@ dd_context_clear_depth_stencil(struct pipe_context *_pipe,
 
    dd_before_draw(dctx);
    pipe->clear_depth_stencil(pipe, dst, clear_flags, depth, stencil,
-                             dstx, dsty, width, height);
+                             dstx, dsty, width, height,
+                             render_condition_enabled);
    dd_after_draw(dctx, &call);
 }
 
index ca42cf7c5d2a13424d10e7eaaa57de816ce5a53a..715ad21e6021d2c7ee8b63301453f30707fe8a61 100644 (file)
@@ -294,7 +294,8 @@ fd_clear(struct pipe_context *pctx, unsigned buffers,
 static void
 fd_clear_render_target(struct pipe_context *pctx, struct pipe_surface *ps,
                const union pipe_color_union *color,
-               unsigned x, unsigned y, unsigned w, unsigned h)
+               unsigned x, unsigned y, unsigned w, unsigned h,
+               bool render_condition_enabled)
 {
        DBG("TODO: x=%u, y=%u, w=%u, h=%u", x, y, w, h);
 }
@@ -302,7 +303,8 @@ fd_clear_render_target(struct pipe_context *pctx, struct pipe_surface *ps,
 static void
 fd_clear_depth_stencil(struct pipe_context *pctx, struct pipe_surface *ps,
                unsigned buffers, double depth, unsigned stencil,
-               unsigned x, unsigned y, unsigned w, unsigned h)
+               unsigned x, unsigned y, unsigned w, unsigned h,
+               bool render_condition_enabled)
 {
        DBG("TODO: buffers=%u, depth=%f, stencil=%u, x=%u, y=%u, w=%u, h=%u",
                        buffers, depth, stencil, x, y, w, h);
index b2a639cb0f18812f0c4130e5965508652f57ac3e..27b0d9eae8571863c64238bf2f8e7ab831241dd8 100644 (file)
@@ -134,7 +134,8 @@ i915_clear_render_target_render(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 i915_context *i915 = i915_context(pipe);
    struct pipe_framebuffer_state fb_state;
@@ -166,7 +167,8 @@ i915_clear_depth_stencil_render(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 i915_context *i915 = i915_context(pipe);
    struct pipe_framebuffer_state fb_state;
@@ -281,7 +283,8 @@ i915_clear_render_target_blitter(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 i915_texture *tex = i915_texture(dst->texture);
    struct pipe_resource *pt = &tex->b.b;
@@ -309,7 +312,8 @@ i915_clear_depth_stencil_blitter(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 i915_texture *tex = i915_texture(dst->texture);
    struct pipe_resource *pt = &tex->b.b;
index f88f1e8dc92d1261667bbadcf2f59b45711061c0..e2ba6aa16b85f9f59af361e7305074b443f9c9b5 100644 (file)
@@ -83,7 +83,8 @@ ilo_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 ilo_context *ilo = ilo_context(pipe);
 
@@ -110,7 +111,8 @@ ilo_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 ilo_context *ilo = ilo_context(pipe);
 
index dd1c4465323059f929939adebc700b24174923ca..643c4162b036ff542c997e41e54fa76aed98ffb3 100644 (file)
@@ -190,7 +190,8 @@ llvmpipe_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 llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
 
@@ -209,7 +210,8 @@ llvmpipe_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 llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
 
index 097ff21c38becc1da119fd9b29ed9b87e75b6531..cf20681e306097b457c42267091620854bd666c1 100644 (file)
@@ -223,7 +223,8 @@ static void noop_clear_render_target(struct pipe_context *ctx,
                                     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)
 {
 }
 
@@ -233,7 +234,8 @@ static void noop_clear_depth_stencil(struct pipe_context *ctx,
                                     double depth,
                                     unsigned stencil,
                                     unsigned dstx, unsigned dsty,
-                                    unsigned width, unsigned height)
+                                    unsigned width, unsigned height,
+                                    bool render_condition_enabled)
 {
 }
 
index c8fa38e20c74e9dce3edfd443a5d41c7b05f9698..4217bca6da03b9fddcc6ca7e9c58656cc104f98c 100644 (file)
@@ -101,7 +101,8 @@ nv30_clear(struct pipe_context *pipe, unsigned buffers,
 static void
 nv30_clear_render_target(struct pipe_context *pipe, struct pipe_surface *ps,
                          const union pipe_color_union *color,
-                         unsigned x, unsigned y, unsigned w, unsigned h)
+                         unsigned x, unsigned y, unsigned w, unsigned h,
+                         bool render_condition_enabled)
 {
    struct nv30_context *nv30 = nv30_context(pipe);
    struct nv30_surface *sf = nv30_surface(ps);
@@ -160,7 +161,8 @@ nv30_clear_render_target(struct pipe_context *pipe, struct pipe_surface *ps,
 static void
 nv30_clear_depth_stencil(struct pipe_context *pipe, struct pipe_surface *ps,
                          unsigned buffers, double depth, unsigned stencil,
-                         unsigned x, unsigned y, unsigned w, unsigned h)
+                         unsigned x, unsigned y, unsigned w, unsigned h,
+                         bool render_condition_enabled)
 {
    struct nv30_context *nv30 = nv30_context(pipe);
    struct nv30_surface *sf = nv30_surface(ps);
index fbb5129908bba763f018bb250038866973d16fb0..52e890786bde25f80c80d9819fa005472a49dd60 100644 (file)
@@ -277,7 +277,8 @@ nv50_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 nv50_context *nv50 = nv50_context(pipe);
    struct nouveau_pushbuf *push = nv50->base.pushbuf;
@@ -363,7 +364,8 @@ nv50_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 nv50_context *nv50 = nv50_context(pipe);
    struct nouveau_pushbuf *push = nv50->base.pushbuf;
@@ -472,7 +474,7 @@ nv50_clear_texture(struct pipe_context *pipe,
          desc->unpack_s_8uint(&stencil, 0, data, 0, 1, 1);
       }
       pipe->clear_depth_stencil(pipe, sf, clear, depth, stencil,
-                                box->x, box->y, box->width, box->height);
+                                box->x, box->y, box->width, box->height, false);
    } else {
       union pipe_color_union color;
 
@@ -508,7 +510,7 @@ nv50_clear_texture(struct pipe_context *pipe,
       }
 
       pipe->clear_render_target(pipe, sf, &color,
-                                box->x, box->y, box->width, box->height);
+                                box->x, box->y, box->width, box->height, false);
    }
    pipe->surface_destroy(pipe, sf);
 }
index 1b1f31ac485918ac2dcde4c43e3c993945f96d92..409c40d632f8f3ab8d77d9bf99e30a53c1860b02 100644 (file)
@@ -482,16 +482,16 @@ nv84_create_decoder(struct pipe_context *context,
       mip.base.domain = NOUVEAU_BO_VRAM;
       mip.base.bo = dec->mbring;
       mip.base.address = dec->mbring->offset;
-      context->clear_render_target(context, &surf.base, &color, 0, 0, 64, 4760);
+      context->clear_render_target(context, &surf.base, &color, 0, 0, 64, 4760, false);
       surf.offset = dec->vpring->size / 2 - 0x1000;
       surf.width = 1024;
       surf.height = 1;
       mip.level[0].pitch = surf.width * 4;
       mip.base.bo = dec->vpring;
       mip.base.address = dec->vpring->offset;
-      context->clear_render_target(context, &surf.base, &color, 0, 0, 1024, 1);
+      context->clear_render_target(context, &surf.base, &color, 0, 0, 1024, 1, false);
       surf.offset = dec->vpring->size - 0x1000;
-      context->clear_render_target(context, &surf.base, &color, 0, 0, 1024, 1);
+      context->clear_render_target(context, &surf.base, &color, 0, 0, 1024, 1, false);
 
       PUSH_SPACE(screen->pushbuf, 5);
       PUSH_REFN(screen->pushbuf, dec->fence, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
index 7556e7133fc6962b586a72d3c01a6c34a073f831..a6ca6fb75a0a8bfc7f35e266a520608ce90b9322 100644 (file)
@@ -280,7 +280,8 @@ nvc0_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 nvc0_context *nvc0 = nvc0_context(pipe);
    struct nouveau_pushbuf *push = nvc0->base.pushbuf;
@@ -619,7 +620,8 @@ nvc0_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 nvc0_context *nvc0 = nvc0_context(pipe);
    struct nouveau_pushbuf *push = nvc0->base.pushbuf;
index 2ee9b54ecf545d43a5223b8a224dbf4f7f5ecb92..cfb3f6da22089344269d206446c50ee0bce2df0a 100644 (file)
@@ -430,7 +430,8 @@ static void r300_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 r300_context *r300 = r300_context(pipe);
 
@@ -447,7 +448,8 @@ static void r300_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 r300_context *r300 = r300_context(pipe);
     struct pipe_framebuffer_state *fb =
index a6c5b44b86b009fde8a5971d6fe7170d0103ac1f..327efc20a6e52829c363e885f3e41d6eb8147a70 100644 (file)
@@ -473,7 +473,8 @@ static void r600_clear_render_target(struct pipe_context *ctx,
                                     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 r600_context *rctx = (struct r600_context *)ctx;
 
@@ -489,7 +490,8 @@ static void r600_clear_depth_stencil(struct pipe_context *ctx,
                                     double depth,
                                     unsigned stencil,
                                     unsigned dstx, unsigned dsty,
-                                    unsigned width, unsigned height)
+                                    unsigned width, unsigned height,
+                                    bool render_condition_enabled)
 {
        struct r600_context *rctx = (struct r600_context *)ctx;
 
index 38a19d50b651efbe7d707146c3b07022b11a91ae..ce13e97ca0a4b2b3f73dfd1cf0f3a552d46f0dc8 100644 (file)
@@ -759,7 +759,8 @@ static void si_clear_render_target(struct pipe_context *ctx,
                                   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 si_context *sctx = (struct si_context *)ctx;
 
@@ -775,7 +776,8 @@ static void si_clear_depth_stencil(struct pipe_context *ctx,
                                   double depth,
                                   unsigned stencil,
                                   unsigned dstx, unsigned dsty,
-                                  unsigned width, unsigned height)
+                                  unsigned width, unsigned height,
+                                  bool render_condition_enabled)
 {
        struct si_context *sctx = (struct si_context *)ctx;
 
index 83914d3615b56eb15e513f435528de90c6b0e8c9..3c2dc698e42f606239edc198779171203a3a6d65 100644 (file)
@@ -952,7 +952,8 @@ rbug_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 rbug_context *rb_pipe = rbug_context(_pipe);
    struct rbug_surface *rb_surface_dst = rbug_surface(_dst);
@@ -966,7 +967,8 @@ rbug_clear_render_target(struct pipe_context *_pipe,
                              dstx,
                              dsty,
                              width,
-                             height);
+                             height,
+                             render_condition_enabled);
    pipe_mutex_unlock(rb_pipe->call_mutex);
 }
 
@@ -977,7 +979,8 @@ rbug_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 rbug_context *rb_pipe = rbug_context(_pipe);
    struct rbug_surface *rb_surface_dst = rbug_surface(_dst);
@@ -993,7 +996,8 @@ rbug_clear_depth_stencil(struct pipe_context *_pipe,
                              dstx,
                              dsty,
                              width,
-                             height);
+                             height,
+                             render_condition_enabled);
    pipe_mutex_unlock(rb_pipe->call_mutex);
 }
 
index e2ecbdf2b01cd2ea1d5a6cdfc332fbba6acd84f8..643b0609e0305c22e547fdd759045a45f63a1118 100644 (file)
@@ -97,7 +97,8 @@ 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);
 
@@ -116,7 +117,8 @@ 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);
 
index 103bca9944184a2f6fb3bf44bddd0866c3844787..4b02dd1fb12bf02aef5315b393b8368c446cc008 100644 (file)
@@ -86,7 +86,8 @@ swr_clear(struct pipe_context *pipe,
 static void
 swr_clear_render_target(struct pipe_context *pipe, struct pipe_surface *ps,
                         const union pipe_color_union *color,
-                        unsigned x, unsigned y, unsigned w, unsigned h)
+                        unsigned x, unsigned y, unsigned w, unsigned h,
+                        bool render_condition_enabled)
 {
    struct swr_context *ctx = swr_context(pipe);
    fprintf(stderr, "SWR swr_clear_render_target!\n");
@@ -97,7 +98,8 @@ swr_clear_render_target(struct pipe_context *pipe, struct pipe_surface *ps,
 static void
 swr_clear_depth_stencil(struct pipe_context *pipe, struct pipe_surface *ps,
                         unsigned buffers, double depth, unsigned stencil,
-                        unsigned x, unsigned y, unsigned w, unsigned h)
+                        unsigned x, unsigned y, unsigned w, unsigned h,
+                        bool render_condition_enabled)
 {
    struct swr_context *ctx = swr_context(pipe);
    fprintf(stderr, "SWR swr_clear_depth_stencil!\n");
index 65d7f4eca7978ffbb061528df6deb31237e6424d..ef36f5faa472ab808ffd65e9a1cca8ae804476ef 100644 (file)
@@ -1291,7 +1291,8 @@ trace_context_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 trace_context *tr_ctx = trace_context(_pipe);
    struct pipe_context *pipe = tr_ctx->pipe;
@@ -1307,8 +1308,10 @@ trace_context_clear_render_target(struct pipe_context *_pipe,
    trace_dump_arg(uint, dsty);
    trace_dump_arg(uint, width);
    trace_dump_arg(uint, height);
+   trace_dump_arg(bool, render_condition_enabled);
 
-   pipe->clear_render_target(pipe, dst, color, dstx, dsty, width, height);
+   pipe->clear_render_target(pipe, dst, color, dstx, dsty, width, height,
+                             render_condition_enabled);
 
    trace_dump_call_end();
 }
@@ -1320,7 +1323,8 @@ trace_context_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 trace_context *tr_ctx = trace_context(_pipe);
    struct pipe_context *pipe = tr_ctx->pipe;
@@ -1338,9 +1342,11 @@ trace_context_clear_depth_stencil(struct pipe_context *_pipe,
    trace_dump_arg(uint, dsty);
    trace_dump_arg(uint, width);
    trace_dump_arg(uint, height);
+   trace_dump_arg(bool, render_condition_enabled);
 
    pipe->clear_depth_stencil(pipe, dst, clear_flags, depth, stencil,
-                             dstx, dsty, width, height);
+                             dstx, dsty, width, height,
+                             render_condition_enabled);
 
    trace_dump_call_end();
 }
index cf3f5e0009e68efe2d774eb437a1799e64bfe336..773caf785ec464a2661efd48cb48b36983d229f4 100644 (file)
@@ -497,7 +497,8 @@ vc4_clear(struct pipe_context *pctx, unsigned buffers,
 static void
 vc4_clear_render_target(struct pipe_context *pctx, struct pipe_surface *ps,
                         const union pipe_color_union *color,
-                        unsigned x, unsigned y, unsigned w, unsigned h)
+                        unsigned x, unsigned y, unsigned w, unsigned h,
+                       bool render_condition_enabled)
 {
         fprintf(stderr, "unimpl: clear RT\n");
 }
@@ -505,7 +506,8 @@ vc4_clear_render_target(struct pipe_context *pctx, struct pipe_surface *ps,
 static void
 vc4_clear_depth_stencil(struct pipe_context *pctx, struct pipe_surface *ps,
                         unsigned buffers, double depth, unsigned stencil,
-                        unsigned x, unsigned y, unsigned w, unsigned h)
+                        unsigned x, unsigned y, unsigned w, unsigned h,
+                       bool render_condition_enabled)
 {
         fprintf(stderr, "unimpl: clear DS\n");
 }
index f1de189b676a53fd05908e048f70b855de914472..5359164ee9aa53e3c3971859de831a6a496e3dc9 100644 (file)
@@ -416,7 +416,8 @@ struct pipe_context {
                                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);
 
    /**
     * Clear a depth-stencil surface.
@@ -430,7 +431,8 @@ struct pipe_context {
                                double depth,
                                unsigned stencil,
                                unsigned dstx, unsigned dsty,
-                               unsigned width, unsigned height);
+                               unsigned width, unsigned height,
+                               bool render_condition_enabled);
 
    /**
     * Clear the texture with the specified texel. Not guaranteed to be a
index b4ce3c85e218da9f99400d4d9706e859dd240485..d233304d7f921749c92e0ec5b9af2dc2c938c2e8 100644 (file)
@@ -1752,7 +1752,7 @@ NineDevice9_ColorFill( struct NineDevice9 *This,
     }
 
     if (!fallback) {
-        pipe->clear_render_target(pipe, psurf, &rgba, x, y, w, h);
+        pipe->clear_render_target(pipe, psurf, &rgba, x, y, w, h, false);
     } else {
         D3DLOCKED_RECT lock;
         union util_color uc;
@@ -2037,7 +2037,7 @@ NineDevice9_Clear( struct NineDevice9 *This,
 
             DBG("Clearing (%u..%u)x(%u..%u)\n", x1, x2, y1, y2);
             pipe->clear_render_target(pipe, cbuf, &rgba,
-                                      x1, y1, x2 - x1, y2 - y1);
+                                      x1, y1, x2 - x1, y2 - y1, false);
         }
     }
     if (!(bufs & PIPE_CLEAR_DEPTHSTENCIL))
@@ -2064,7 +2064,7 @@ NineDevice9_Clear( struct NineDevice9 *This,
         zsbuf = NineSurface9_GetSurface(zsbuf_surf, 0);
         assert(zsbuf);
         pipe->clear_depth_stencil(pipe, zsbuf, bufs, Z, Stencil,
-                                  x1, y1, x2 - x1, y2 - y1);
+                                  x1, y1, x2 - x1, y2 - y1, false);
     }
     return D3D_OK;
 }
index 6a4a0d9dc74020ed0a126a243835b29644ba41ac..0cedd4ecf3f60ea2023088edc4344198456514a8 100644 (file)
@@ -164,7 +164,7 @@ NineSurface9_ctor( struct NineSurface9 *This,
     /* TODO: investigate what else exactly needs to be cleared */
     if (This->base.resource && (pDesc->Usage & D3DUSAGE_RENDERTARGET)) {
         surf = NineSurface9_GetSurface(This, 0);
-        pipe->clear_render_target(pipe, surf, &rgba, 0, 0, pDesc->Width, pDesc->Height);
+        pipe->clear_render_target(pipe, surf, &rgba, 0, 0, pDesc->Width, pDesc->Height, false);
     }
 
     NineSurface9_Dump(This);
index 6dc479a6726e0a31fc8f9d77ad6a4d149b72ee70..177483e0f6f039b64962c9e44932ba0146a32c51 100644 (file)
@@ -395,7 +395,7 @@ vlVdpVideoSurfaceClear(vlVdpSurface *vlsurf)
          c.f[0] = c.f[1] = c.f[2] = c.f[3] = 0.5f;
 
       pipe->clear_render_target(pipe, surfaces[i], &c, 0, 0,
-                                surfaces[i]->width, surfaces[i]->height);
+                                surfaces[i]->width, surfaces[i]->height, false);
    }
    pipe->flush(pipe, NULL, 0);
 }