gallium/radeon: buffer valid range tracking only works with unshared buffers
authorMarek Olšák <marek.olsak@amd.com>
Wed, 24 Feb 2016 16:36:52 +0000 (17:36 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 9 Mar 2016 14:02:26 +0000 (15:02 +0100)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_buffer_common.c

index 439a3cb30c0023c41421c5474be96697a54fdab6..fb3a80e7d03d60f1e1b77b563ab0b1c17c00958e 100644 (file)
@@ -294,6 +294,7 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
         * in which case it can be mapped unsynchronized. */
        if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED) &&
            usage & PIPE_TRANSFER_WRITE &&
+           !rbuffer->is_shared &&
            !util_ranges_intersect(&rbuffer->valid_buffer_range, box->x, box->x + box->width)) {
                usage |= PIPE_TRANSFER_UNSYNCHRONIZED;
        }