diff options
author | Marek Olšák <[email protected]> | 2015-09-10 17:53:28 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-09-24 19:51:42 +0200 |
commit | 282b3780123bace557fc90127bd35b075ea0873e (patch) | |
tree | 49029156ecbf87a646801d40da5544e373af60f3 /src/gallium | |
parent | cd27ff6a0f85ca35f0f7f2fa7971692e0028e2ed (diff) |
gallium/radeon: handle buffer_map staging buffer failures better
Cc: 11.0 <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeon/r600_buffer_common.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index 4adcccbb8ed..f341ecb41a5 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -305,12 +305,11 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx, data += box->x % R600_MAP_BUFFER_ALIGNMENT; return r600_buffer_get_transfer(ctx, resource, level, usage, box, ptransfer, data, staging, offset); - } else { - return NULL; /* error, shouldn't occur though */ } + } else { + /* At this point, the buffer is always idle (we checked it above). */ + usage |= PIPE_TRANSFER_UNSYNCHRONIZED; } - /* At this point, the buffer is always idle (we checked it above). */ - usage |= PIPE_TRANSFER_UNSYNCHRONIZED; } /* Using a staging buffer in GTT for larger reads is much faster. */ else if ((usage & PIPE_TRANSFER_READ) && |