summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2010-05-18 21:41:15 +0200
committerRoland Scheidegger <[email protected]>2010-05-18 21:41:15 +0200
commitf4ad68a5288abe714f4c98307ed676869aa661fa (patch)
tree596757c58f9d82659b5f16e52306e3888398d1e7 /src/gallium/auxiliary
parent6f3721a8ecb3695344e9a878bb452342ee502764 (diff)
util: fix some leftover util_surface_fill/copy calls
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c22
-rw-r--r--src/gallium/auxiliary/util/u_surface.c4
2 files changed, 18 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 8e0901104a2..70625dab181 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -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;
}
diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c
index 029bff44eb1..6f49a723557 100644
--- a/src/gallium/auxiliary/util/u_surface.c
+++ b/src/gallium/auxiliary/util/u_surface.c
@@ -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,