Re: [Mesa-dev] [PATCH] clover/event: Include additional event statuses for clSetEventCallback
Aaron Watry writes: > From CL 2.0 Section 5.11 (Event Objects): > clSetEventCallback returns CL_SUCCESS if the function is executed > successfully. Otherwise, it > returns one of the following errors: > ... > CL_INVALID_VALUE if pfn_event_notify is NULL or if > command_exec_callback_type is > not CL_SUBMITTED , CL_RUNNING or CL_COMPLETE . > > Fixes: OpenCL CTS test_conformance/events/test_events callbacks > > Signed-off-by: Aaron Watry > Cc: Francisco Jerez Reviewed-by: Francisco Jerez > --- > src/gallium/state_trackers/clover/api/event.cpp | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/state_trackers/clover/api/event.cpp > b/src/gallium/state_trackers/clover/api/event.cpp > index 5d1a0e52c5..3f89644d0a 100644 > --- a/src/gallium/state_trackers/clover/api/event.cpp > +++ b/src/gallium/state_trackers/clover/api/event.cpp > @@ -126,7 +126,8 @@ clSetEventCallback(cl_event d_ev, cl_int type, > void *user_data) try { > auto &ev = obj(d_ev); > > - if (!pfn_notify || type != CL_COMPLETE) > + if (!pfn_notify || > + (type != CL_COMPLETE && type != CL_SUBMITTED && type != CL_RUNNING)) >throw error(CL_INVALID_VALUE); > > // Create a temporary soft event that depends on ev, with > -- > 2.11.0 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] clover/event: Include additional event statuses for clSetEventCallback
On Mon, Aug 14, 2017 at 7:42 PM, Aaron Watry wrote: > From CL 2.0 Section 5.11 (Event Objects): > clSetEventCallback returns CL_SUCCESS if the function is executed > successfully. Otherwise, it > returns one of the following errors: > ... > CL_INVALID_VALUE if pfn_event_notify is NULL or if > command_exec_callback_type is > not CL_SUBMITTED , CL_RUNNING or CL_COMPLETE . > > Fixes: OpenCL CTS test_conformance/events/test_events callbacks > > Signed-off-by: Aaron Watry > Cc: Francisco Jerez Corrected Francisco's email locally after it bounced. --Aaron > --- > src/gallium/state_trackers/clover/api/event.cpp | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/state_trackers/clover/api/event.cpp > b/src/gallium/state_trackers/clover/api/event.cpp > index 5d1a0e52c5..3f89644d0a 100644 > --- a/src/gallium/state_trackers/clover/api/event.cpp > +++ b/src/gallium/state_trackers/clover/api/event.cpp > @@ -126,7 +126,8 @@ clSetEventCallback(cl_event d_ev, cl_int type, > void *user_data) try { > auto &ev = obj(d_ev); > > - if (!pfn_notify || type != CL_COMPLETE) > + if (!pfn_notify || > + (type != CL_COMPLETE && type != CL_SUBMITTED && type != CL_RUNNING)) >throw error(CL_INVALID_VALUE); > > // Create a temporary soft event that depends on ev, with > -- > 2.11.0 > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] clover/event: Include additional event statuses for clSetEventCallback
From CL 2.0 Section 5.11 (Event Objects): clSetEventCallback returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: ... CL_INVALID_VALUE if pfn_event_notify is NULL or if command_exec_callback_type is not CL_SUBMITTED , CL_RUNNING or CL_COMPLETE . Fixes: OpenCL CTS test_conformance/events/test_events callbacks Signed-off-by: Aaron Watry Cc: Francisco Jerez --- src/gallium/state_trackers/clover/api/event.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/clover/api/event.cpp b/src/gallium/state_trackers/clover/api/event.cpp index 5d1a0e52c5..3f89644d0a 100644 --- a/src/gallium/state_trackers/clover/api/event.cpp +++ b/src/gallium/state_trackers/clover/api/event.cpp @@ -126,7 +126,8 @@ clSetEventCallback(cl_event d_ev, cl_int type, void *user_data) try { auto &ev = obj(d_ev); - if (!pfn_notify || type != CL_COMPLETE) + if (!pfn_notify || + (type != CL_COMPLETE && type != CL_SUBMITTED && type != CL_RUNNING)) throw error(CL_INVALID_VALUE); // Create a temporary soft event that depends on ev, with -- 2.11.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev