From 154fbd03ccb326317dcfdfe193083d121ef70ece Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Tue, 17 Jul 2018 02:07:45 -0400 Subject: clover: Report error when pipe driver fails to create compute state CC: Signed-off-by: Jan Vesely Reviewed-by: Francisco Jerez --- src/gallium/state_trackers/clover/core/kernel.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/state_trackers') 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; -- cgit v1.2.3