Commit ee2671a55972f741a253b6990f7f56eab2270588

ckolivas 2013-05-29T12:18:35

Change the opencl shutdown sequence.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/driver-opencl.c b/driver-opencl.c
index d9d9837..5d622cc 100644
--- a/driver-opencl.c
+++ b/driver-opencl.c
@@ -1570,9 +1570,9 @@ static void opencl_thread_shutdown(struct thr_info *thr)
 	const int thr_id = thr->id;
 	_clState *clState = clStates[thr_id];
 
-	clReleaseCommandQueue(clState->commandQueue);
 	clReleaseKernel(clState->kernel);
 	clReleaseProgram(clState->program);
+	clReleaseCommandQueue(clState->commandQueue);
 	clReleaseContext(clState->context);
 }