util: fix some leftover util_surface_fill/copy calls
authorRoland Scheidegger <sroland@vmware.com>
Tue, 18 May 2010 19:41:15 +0000 (21:41 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Tue, 18 May 2010 19:41:15 +0000 (21:41 +0200)
src/gallium/auxiliary/util/u_blitter.c
src/gallium/auxiliary/util/u_surface.c

index 8e09011..70625da 100644 (file)
@@ -26,8 +26,8 @@
 
 /**
  * @file
- * Blitter utility to facilitate acceleration of the clear, surface_copy,
- * and surface_fill functions.
+ * Blitter utility to facilitate acceleration of the clear, resource_copy_region,
+ * and resource_fill_region functions.
  *
  * @author Marek Olšák
  */
@@ -787,7 +787,7 @@ void util_blitter_copy(struct blitter_context *blitter,
          return;
       }
    }
-                  
+
    is_depth = util_format_get_component_bits(src->format, UTIL_FORMAT_COLORSPACE_ZS, 0) != 0;
    is_stencil = util_format_get_component_bits(src->format, UTIL_FORMAT_COLORSPACE_ZS, 1) != 0;
    dst_tex_usage = is_depth || is_stencil ? PIPE_BIND_DEPTH_STENCIL :
@@ -800,8 +800,14 @@ void util_blitter_copy(struct blitter_context *blitter,
                                     dst->texture->nr_samples, dst_tex_usage, 0) ||
        !screen->is_format_supported(screen, src->format, src->texture->target,
                                     src->texture->nr_samples, PIPE_BIND_SAMPLER_VIEW, 0)) {
-      util_surface_copy(pipe, FALSE, dst, dstx, dsty, src, srcx, srcy,
-                        width, height);
+      struct pipe_subresource subdst, subsrc;
+      subdst.face = dst->face;
+      subdst.level = dst->level;
+      subsrc.face = src->face;
+      subsrc.level = src->level;
+      util_resource_copy_region(pipe, dst, subdst, dstx, dsty, dst->zslice,
+                                src, subsrc, srcx, srcy, src->zslice,
+                                width, height);
       return;
    }
 
@@ -838,7 +844,11 @@ void util_blitter_fill(struct blitter_context *blitter,
        !screen->is_format_supported(screen, dst->format, dst->texture->target,
                                     dst->texture->nr_samples,
                                     PIPE_BIND_RENDER_TARGET, 0)) {
-      util_surface_fill(pipe, dst, dstx, dsty, width, height, value);
+      struct pipe_subresource subdst;
+      subdst.face = dst->face;
+      subdst.level = dst->level;
+      util_resource_fill_region(pipe, dst->texture, subdst, dstx, dsty,
+                                dst->zslice, width, height, value);
       return;
    }
 
index 029bff4..6f49a72 100644 (file)
@@ -120,7 +120,7 @@ util_destroy_rgba_surface(struct pipe_resource *texture,
 
 
 /**
- * Fallback function for pipe->surface_copy().
+ * Fallback function for pipe->resource_copy_region().
  * Note: (X,Y)=(0,0) is always the upper-left corner.
  */
 void
@@ -196,7 +196,7 @@ util_resource_copy_region(struct pipe_context *pipe,
 
 
 /**
- * Fallback for pipe->surface_fill() function.
+ * Fallback for pipe->resource_fill_region() function.
  */
 void
 util_resource_fill_region(struct pipe_context *pipe,