mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 01:30:08 +01:00
gallium/radeon: handle failure when mapping staging buffer
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
8bd0f0df50
commit
a17911ceb1
1 changed files with 4 additions and 0 deletions
|
|
@ -376,6 +376,10 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
|
|||
0, 0, resource, level, box);
|
||||
|
||||
data = r600_buffer_map_sync_with_rings(rctx, staging, PIPE_TRANSFER_READ);
|
||||
if (!data) {
|
||||
pipe_resource_reference((struct pipe_resource **)&staging, NULL);
|
||||
return NULL;
|
||||
}
|
||||
data += box->x % R600_MAP_BUFFER_ALIGNMENT;
|
||||
|
||||
return r600_buffer_get_transfer(ctx, resource, level, usage, box,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue