From 815b75705f5e3f0f7db025368da37bb14395de9a Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Mon, 17 May 2010 21:15:20 +0200 Subject: gallium/util: adapt util code to interface changes The util blit functions change their interface (apart from some rename) too (in particular util_blit_pixels now also takes a pipe_resource as the src blit argument instead of a surface, as it might just call resource_copy_region). Maybe the blit util code might need a bit more cleanup, it still doesn't feel very clean. In particular it seems that util_blit_pixels_tex should probably disappear, and I think it would be great if the code called by drivers for blitting (u_blitter.c, which isn't really touched by this change) could somehow be merged with the u_blit code. --- src/gallium/auxiliary/util/u_blitter.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gallium/auxiliary/util/u_blitter.c') diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 1abe31db466..8e0901104a2 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -743,8 +743,8 @@ static void util_blitter_overlap_copy(struct blitter_context *blitter, return; tex_surf = screen->get_tex_surface(screen, texture, 0, 0, 0, - PIPE_BIND_BLIT_SOURCE | - PIPE_BIND_BLIT_DESTINATION); + PIPE_BIND_SAMPLER_VIEW | + PIPE_BIND_RENDER_TARGET); /* blit from the src to the temp */ util_blitter_do_copy(blitter, tex_surf, 0, 0, @@ -797,9 +797,9 @@ void util_blitter_copy(struct blitter_context *blitter, /* (assuming copying a stencil buffer is not possible) */ if ((!ignore_stencil && is_stencil) || !screen->is_format_supported(screen, dst->format, dst->texture->target, - dst_tex_usage, 0) || + dst->texture->nr_samples, dst_tex_usage, 0) || !screen->is_format_supported(screen, src->format, src->texture->target, - PIPE_BIND_SAMPLER_VIEW, 0)) { + src->texture->nr_samples, PIPE_BIND_SAMPLER_VIEW, 0)) { util_surface_copy(pipe, FALSE, dst, dstx, dsty, src, srcx, srcy, width, height); return; @@ -836,6 +836,7 @@ void util_blitter_fill(struct blitter_context *blitter, /* check if we can render to the surface */ if (util_format_is_depth_or_stencil(dst->format) || /* unlikely, but you never know */ !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); return; -- cgit v1.2.3