diff options
author | Roland Scheidegger <[email protected]> | 2010-05-19 17:20:26 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-05-19 17:20:26 +0200 |
commit | 5be35de0fbffec9a45e969ffd2104f464da41505 (patch) | |
tree | a2c485586bc7efcccf320197914efaa5758273ce /src | |
parent | 1adbe2c82dc64b85398d04784ee10c899551479c (diff) |
util: util_blitter_fill no longer needs to handle overlap
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 54 |
1 files changed, 2 insertions, 52 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 70625dab181..8b18ba35f01 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -712,53 +712,6 @@ static void util_blitter_do_copy(struct blitter_context *blitter, } -static void util_blitter_overlap_copy(struct blitter_context *blitter, - struct pipe_surface *dst, - unsigned dstx, unsigned dsty, - struct pipe_surface *src, - unsigned srcx, unsigned srcy, - unsigned width, unsigned height) -{ - struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; - struct pipe_context *pipe = ctx->pipe; - struct pipe_screen *screen = pipe->screen; - - struct pipe_resource texTemp; - struct pipe_resource *texture; - struct pipe_surface *tex_surf; - - /* check whether the states are properly saved */ - blitter_check_saved_CSOs(ctx); - - memset(&texTemp, 0, sizeof(texTemp)); - texTemp.target = PIPE_TEXTURE_2D; - texTemp.format = dst->texture->format; /* XXX verify supported by driver! */ - texTemp.last_level = 0; - texTemp.width0 = width; - texTemp.height0 = height; - texTemp.depth0 = 1; - - texture = screen->resource_create(screen, &texTemp); - if (!texture) - return; - - tex_surf = screen->get_tex_surface(screen, texture, 0, 0, 0, - PIPE_BIND_SAMPLER_VIEW | - PIPE_BIND_RENDER_TARGET); - - /* blit from the src to the temp */ - util_blitter_do_copy(blitter, tex_surf, 0, 0, - src, srcx, srcy, - width, height, - FALSE); - util_blitter_do_copy(blitter, dst, dstx, dsty, - tex_surf, 0, 0, - width, height, - FALSE); - pipe_surface_reference(&tex_surf, NULL); - pipe_resource_reference(&texture, NULL); - blitter_restore_CSOs(ctx); -} void util_blitter_copy(struct blitter_context *blitter, struct pipe_surface *dst, @@ -780,11 +733,8 @@ void util_blitter_copy(struct blitter_context *blitter, return; if (dst->texture == src->texture) { - if (is_overlap(srcx, srcx + width, srcy, srcy + height, - dstx, dstx + width, dsty, dsty + height)) { - util_blitter_overlap_copy(blitter, dst, dstx, dsty, src, srcx, srcy, - width, height); - return; + assert(!is_overlap(srcx, srcx + width, srcy, srcy + height, + dstx, dstx + width, dsty, dsty + height)) } } |