aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJan Vesely <[email protected]>2018-07-17 02:07:45 -0400
committerJan Vesely <[email protected]>2018-07-17 21:04:15 -0400
commit154fbd03ccb326317dcfdfe193083d121ef70ece (patch)
tree4d1e020dc0a427c174ad94d35e142e349dc1c834 /src/gallium
parent866b25fd014cc50ff2bd1a56d696f4c068e46965 (diff)
clover: Report error when pipe driver fails to create compute state
CC: <[email protected]> Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/clover/core/kernel.cpp4
1 files changed, 4 insertions, 0 deletions
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<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;