r600g/radeonsi: Map transfer staging texture unsynchronized when possible
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 15 Apr 2014 05:45:13 +0000 (14:45 +0900)
committerMichel Dänzer <michel@daenzer.net>
Wed, 16 Apr 2014 03:11:27 +0000 (12:11 +0900)
The transfer staging texture is always freshly allocated, so for write-only
transfers we don't need to explicitly wait for the BO to become idle.

Squeezes a few hundered MB/s more out of x11perf -shmput500 with glamor.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/r600_texture.c

index 293eeaa089079da2be4d9af003cd80e6cd0a964b..c410543b81ba0a28fd6aaf261ad8a292b8ee3b85 100644 (file)
@@ -1039,6 +1039,8 @@ static void *r600_texture_transfer_map(struct pipe_context *ctx,
 
        if (trans->staging) {
                buf = trans->staging;
+               if (!rtex->is_depth && !(usage & PIPE_TRANSFER_READ))
+                       usage |= PIPE_TRANSFER_UNSYNCHRONIZED;
        } else {
                buf = &rtex->resource;
        }