diff options
author | Francisco Jerez <[email protected]> | 2016-06-19 14:31:59 -0700 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2016-07-11 20:34:34 -0700 |
commit | 4ef1c0918da4363aa20b7c1a91d344fae6c01942 (patch) | |
tree | fa5d65f8d020464691d4c512aa9627a6abe51c21 /src/gallium/state_trackers/clover/api | |
parent | 70fe6267a37dfc97ef8b6dd22a0431fcfc293d2a (diff) |
clover: Move back to using build_error to signal compilation failure.
This partially reverts 7e0180d57d330bd8d3047e841086712376b2a1cc.
Having two different exception subclasses for compilation and linking
makes it more difficult to share or move code between the two
codepaths, because the exact same function under the same error
condition would need to throw one exception or the other depending on
what top-level API is being implemented with it. There is little
benefit anyway because clCompileProgram() and clLinkProgram() can tell
whether they are linking or compiling a program.
Reviewed-by: Serge Martin <[email protected]>
Tested-by: Jan Vesely <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/api')
-rw-r--r-- | src/gallium/state_trackers/clover/api/program.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp index 27ca2efd0bc..ff199abe5c0 100644 --- a/src/gallium/state_trackers/clover/api/program.cpp +++ b/src/gallium/state_trackers/clover/api/program.cpp @@ -186,8 +186,6 @@ clBuildProgram(cl_program d_prog, cl_uint num_devs, } catch (error &e) { if (e.get() == CL_INVALID_COMPILER_OPTIONS) return CL_INVALID_BUILD_OPTIONS; - if (e.get() == CL_COMPILE_PROGRAM_FAILURE) - return CL_BUILD_PROGRAM_FAILURE; return e.get(); } @@ -227,6 +225,9 @@ clCompileProgram(cl_program d_prog, cl_uint num_devs, prog.build(devs, opts, headers); return CL_SUCCESS; +} catch (build_error &e) { + return CL_COMPILE_PROGRAM_FAILURE; + } catch (error &e) { return e.get(); } |