From: Jan Vesely Date: Tue, 17 Jul 2018 06:07:45 +0000 (-0400) Subject: clover: Report error when pipe driver fails to create compute state X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=154fbd03ccb326317dcfdfe193083d121ef70ece;p=mesa.git clover: Report error when pipe driver fails to create compute state CC: Signed-off-by: Jan Vesely Reviewed-by: Francisco Jerez --- diff --git a/src/gallium/state_trackers/clover/core/kernel.cpp b/src/gallium/state_trackers/clover/core/kernel.cpp index 47167053231..dab7ef8683a 100644 --- a/src/gallium/state_trackers/clover/core/kernel.cpp +++ b/src/gallium/state_trackers/clover/core/kernel.cpp @@ -231,6 +231,10 @@ kernel::exec_context::bind(intrusive_ptr _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;