summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-07-11 23:21:16 -0400
committerMarek Olšák <[email protected]>2018-07-16 13:32:33 -0400
commit6ec44b7055df9e05e090618d17476a34bdb6269c (patch)
tree57b9e8a79645cefb31576c043f7cfcde9f9cb94d /src/gallium
parent7346e5296ee7c7add6d8230283639ecdbcd3d2a4 (diff)
winsys/amdgpu: remove label bo_list_error
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_cs.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index 77b372d2cea..1aaa0667310 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
@@ -1318,12 +1318,20 @@ void amdgpu_cs_submit_ib(void *job, int thread_index)
handles, NULL, &bo_list);
free(handles);
simple_mtx_unlock(&ws->global_bo_list_lock);
+ if (r) {
+ fprintf(stderr, "amdgpu: buffer list creation failed (%d)\n", r);
+ amdgpu_fence_signalled(cs->fence);
+ cs->error_code = r;
+ goto cleanup;
+ }
} else {
unsigned num_handles;
if (!amdgpu_add_sparse_backing_buffers(cs)) {
- r = -ENOMEM;
- goto bo_list_error;
+ fprintf(stderr, "amdgpu: amdgpu_add_sparse_backing_buffers failed\n");
+ amdgpu_fence_signalled(cs->fence);
+ cs->error_code = -ENOMEM;
+ goto cleanup;
}
amdgpu_bo_handle *handles = alloca(sizeof(*handles) * cs->num_real_buffers);
@@ -1346,18 +1354,14 @@ void amdgpu_cs_submit_ib(void *job, int thread_index)
if (num_handles) {
r = amdgpu_bo_list_create(ws->dev, num_handles,
handles, flags, &bo_list);
- } else {
- r = 0;
+ if (r) {
+ fprintf(stderr, "amdgpu: buffer list creation failed (%d)\n", r);
+ amdgpu_fence_signalled(cs->fence);
+ cs->error_code = r;
+ goto cleanup;
+ }
}
}
-bo_list_error:
-
- if (r) {
- fprintf(stderr, "amdgpu: buffer list creation failed (%d)\n", r);
- amdgpu_fence_signalled(cs->fence);
- cs->error_code = r;
- goto cleanup;
- }
if (acs->ring_type == RING_GFX)
ws->gfx_bo_list_counter += cs->num_real_buffers;