[Mesa-dev] [PATCH 2/2] clover: Report error when pipe driver fails to create compute state
Francisco Jerez
currojerez at riseup.net
Tue Jul 17 21:17:56 UTC 2018
Jan Vesely <jan.vesely at rutgers.edu> writes:
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
> ---
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180717/47b41299/attachment.sig>
More information about the mesa-dev
mailing list