mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 18:58:10 +02: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>
(cherry picked from commit a17911ceb1)
This commit is contained in:
parent
0b4a916ab0
commit
048247115b
1 changed files with 4 additions and 0 deletions
|
|
@ -358,6 +358,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