[Mesa-dev] [PATCH 2/2] clover: Report error when pipe driver fails to create compute state
Jan Vesely
jan.vesely at rutgers.edu
Tue Jul 17 14:38:47 UTC 2018
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
src/gallium/state_trackers/clover/core/kernel.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/state_trackers/clover/core/kernel.cpp b/src/gallium/state_trackers/clover/core/kernel.cpp
index 4716705323..dab7ef8683 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<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;
--
2.16.4
More information about the mesa-dev
mailing list