clover: Flush the command queue in clReleaseCommandQueue()
authorTom Stellard <thomas.stellard@amd.com>
Fri, 8 Aug 2014 13:32:20 +0000 (09:32 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 13 Aug 2014 18:20:22 +0000 (14:20 -0400)
This is required by the spec.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
CC: "10.2" <mesa-stable@lists.freedesktop.org>
src/gallium/state_trackers/clover/api/queue.cpp

index a136018fbde64b8150d199c07304b707d3251284..06a2863800284862b2b080403e2012693c6cdf16 100644 (file)
@@ -58,7 +58,11 @@ clRetainCommandQueue(cl_command_queue d_q) try {
 
 CLOVER_API cl_int
 clReleaseCommandQueue(cl_command_queue d_q) try {
-   if (obj(d_q).release())
+   auto &q = obj(d_q);
+
+   q.flush();
+
+   if (q.release())
       delete pobj(d_q);
 
    return CL_SUCCESS;