diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r600/r600_blit.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index adf616e6881..8fdc51c253a 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -850,11 +850,30 @@ static void r600_blit(struct pipe_context *ctx, const struct pipe_blit_info *info) { struct r600_context *rctx = (struct r600_context*)ctx; + struct r600_texture *rdst = (struct r600_texture *)info->dst.resource; if (do_hardware_msaa_resolve(ctx, info)) { return; } + /* Using SDMA for copying to a linear texture in GTT is much faster. + * This improves DRI PRIME performance. + * + * resource_copy_region can't do this yet, because dma_copy calls it + * on failure (recursion). + */ + if (rdst->surface.level[info->dst.level].mode == + RADEON_SURF_MODE_LINEAR_ALIGNED && + rctx->b.dma_copy && + util_can_blit_via_copy_region(info, false)) { + rctx->b.dma_copy(ctx, info->dst.resource, info->dst.level, + info->dst.box.x, info->dst.box.y, + info->dst.box.z, + info->src.resource, info->src.level, + &info->src.box); + return; + } + assert(util_blitter_is_blit_supported(rctx->blitter, info)); /* The driver doesn't decompress resources automatically while |