diff options
author | Roland Scheidegger <[email protected]> | 2010-05-17 21:15:20 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-05-17 21:15:20 +0200 |
commit | 815b75705f5e3f0f7db025368da37bb14395de9a (patch) | |
tree | a8898e0e0883e55603ac44f8f60fb0372ac01f0c /src/gallium/auxiliary/util/u_blitter.c | |
parent | 379db6a36b32912be8fd8808ceb95ca5cffa7850 (diff) |
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.
Diffstat (limited to 'src/gallium/auxiliary/util/u_blitter.c')
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 9 |
1 files changed, 5 insertions, 4 deletions
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; |