Browse Source

gallium: Use surface_copy for 1:1 blits.

tags/mesa_20090313
José Fonseca 17 years ago
parent
commit
8ccab31356
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      src/gallium/auxiliary/util/u_blit.c

+ 10
- 0
src/gallium/auxiliary/util/u_blit.c View File

@@ -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));

/*

Loading…
Cancel
Save