From 8ccab313561d8cca3caf8d76504119bf5eb2e9ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Thu, 3 Jul 2008 15:02:56 +0900 Subject: [PATCH] gallium: Use surface_copy for 1:1 blits. --- src/gallium/auxiliary/util/u_blit.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c index ae779335dc0..c9e3abc88be 100644 --- a/src/gallium/auxiliary/util/u_blit.c +++ b/src/gallium/auxiliary/util/u_blit.c @@ -308,6 +308,16 @@ util_blit_pixels(struct blit_state *ctx, } assert(screen->is_format_supported(screen, src->format, PIPE_TEXTURE)); + assert(screen->is_format_supported(screen, dst->format, PIPE_TEXTURE)); + + if(dst->format == src->format && (dstX1 - dstX0) == srcW && (dstY1 - dstY0) == srcH) { + pipe->surface_copy(pipe, FALSE, + dst, dstX0, dstY0, /* dest */ + src, srcX0, srcY0, /* src */ + srcW, srcH); /* size */ + return; + } + assert(screen->is_format_supported(screen, dst->format, PIPE_SURFACE)); /* -- 2.30.2