if (!handles) {
pipe_mutex_unlock(ws->global_bo_list_lock);
amdgpu_cs_context_cleanup(cs);
+ cs->error_code = -ENOMEM;
return;
}
fprintf(stderr, "amdgpu: buffer list creation failed (%d)\n", r);
cs->request.resources = NULL;
amdgpu_fence_signalled(cs->fence);
+ cs->error_code = r;
goto cleanup;
}
r = amdgpu_cs_submit(acs->ctx->ctx, 0, &cs->request, 1);
+ cs->error_code = r;
if (r) {
if (r == -ENOMEM)
fprintf(stderr, "amdgpu: Not enough memory for command submission.\n");
{
struct amdgpu_cs *cs = amdgpu_cs(rcs);
struct amdgpu_winsys *ws = cs->ctx->ws;
+ int error_code = 0;
rcs->current.max_dw += amdgpu_cs_epilog_dws(cs->ring_type);
amdgpu_cs_submit_ib);
} else {
amdgpu_cs_submit_ib(cs, 0);
+ error_code = cs->cst->error_code;
}
} else {
amdgpu_cs_context_cleanup(cs->csc);
amdgpu_get_new_ib(&ws->base, cs, IB_CONST_PREAMBLE);
ws->num_cs_flushes++;
- return 0;
+ return error_code;
}
static void amdgpu_cs_destroy(struct radeon_winsys_cs *rcs)