clover: Report error when pipe driver fails to create compute state

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
This commit is contained in:
Jan Vesely 2018-07-17 02:07:45 -04:00
parent 866b25fd01
commit 154fbd03cc
1 changed files with 4 additions and 0 deletions

View File

@ -231,6 +231,10 @@ kernel::exec_context::bind(intrusive_ptr<command_queue> _q,
cs.req_local_mem = mem_local;
cs.req_input_mem = input.size();
st = q->pipe->create_compute_state(q->pipe, &cs);
if (!st) {
unbind(); // Cleanup
throw error(CL_OUT_OF_RESOURCES);
}
}
return st;