gallium/u_blitter: remove fallback for stencil copy that all drivers skipped
authorMarek Olšák <maraeo@gmail.com>
Fri, 27 Jul 2012 20:45:52 +0000 (22:45 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sat, 4 Aug 2012 11:53:07 +0000 (13:53 +0200)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/util/u_blitter.c
src/gallium/auxiliary/util/u_blitter.h
src/gallium/drivers/i915/i915_surface.c
src/gallium/drivers/r600/r600_blit.c

index 83238ecefddd43900ca8afa41b3d9f64dab50422..21dc19fa107f72eb867be4114c0929d2ca960c8b 100644 (file)
@@ -938,8 +938,7 @@ void util_blitter_copy_texture(struct blitter_context *blitter,
                                unsigned dstx, unsigned dsty, unsigned dstz,
                                struct pipe_resource *src,
                                unsigned src_level,
-                               const struct pipe_box *srcbox,
-                               boolean ignore_stencil)
+                               const struct pipe_box *srcbox)
 {
    struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
    struct pipe_context *pipe = ctx->base.pipe;
@@ -970,8 +969,7 @@ void util_blitter_copy_texture(struct blitter_context *blitter,
 
    /* Check if we can sample from and render to the surfaces. */
    /* (assuming copying a stencil buffer is not possible) */
-   if ((!ignore_stencil && is_stencil && !ctx->has_stencil_export) ||
-       !screen->is_format_supported(screen, dst->format, dst->target,
+   if (!screen->is_format_supported(screen, dst->format, dst->target,
                                     dst->nr_samples, bind) ||
        !screen->is_format_supported(screen, src->format, src->target,
                                     src->nr_samples, PIPE_BIND_SAMPLER_VIEW)) {
index 725d81c67351612502f4266c691da9a97f5bab5e..80a11526e77fa10f1d7deabc8192ad2b1235c55d 100644 (file)
@@ -168,13 +168,6 @@ void util_blitter_clear_depth_custom(struct blitter_context *blitter,
  * a software fallback path is taken and both surfaces must be of the same
  * format.
  *
- * The same holds for depth-stencil formats with the exception that stencil
- * cannot be copied unless you set ignore_stencil to FALSE. In that case,
- * a software fallback path is taken and both surfaces must be of the same
- * format. If the shader stencil export is supported, stencil copy is always
- * accelerated.
- *
- * Use pipe_screen->is_format_supported to know your options.
  *
  * These states must be saved in the blitter in addition to the state objects
  * already required to be saved:
@@ -191,8 +184,7 @@ void util_blitter_copy_texture(struct blitter_context *blitter,
                                unsigned dstx, unsigned dsty, unsigned dstz,
                                struct pipe_resource *src,
                                unsigned src_level,
-                               const struct pipe_box *srcbox,
-                               boolean ignore_stencil);
+                               const struct pipe_box *srcbox);
 
 /**
  * Same as util_blitter_copy_texture, but dst and src are pipe_surface and
index 1d1b6f7d5eec071ff559deb806914cb9bcb12489..c51689dcb4c993d32b1c9cc9609d1fbc4f2d8072 100644 (file)
@@ -80,7 +80,7 @@ i915_surface_copy_render(struct pipe_context *pipe,
                                             i915->saved_sampler_views);
 
    util_blitter_copy_texture(i915->blitter, dst, dst_level, dstx, dsty, dstz,
-                            src, src_level, src_box, TRUE);
+                            src, src_level, src_box);
 }
 
 static void
index 8cdfae8b3f0440b53107bc6ccb20e063c58c33e5..9c4e911bee0bf0ed745e4231a4fcf36b5760f8cb 100644 (file)
@@ -393,7 +393,7 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
 
        r600_blitter_begin(ctx, R600_COPY_TEXTURE);
        util_blitter_copy_texture(rctx->blitter, dst, dst_level, dstx, dsty, dstz,
-                                 src, src_level, psbox, TRUE);
+                                 src, src_level, psbox);
        r600_blitter_end(ctx);
 
        if (restore_orig[0])