Commit 1c22c0e8d6322c2ec13a538791a933d4a4466169

Con Kolivas 2012-10-14T08:37:54

In opencl_free_work, make sure to still flush results in dynamic mode.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/driver-opencl.c b/driver-opencl.c
index d558a82..7912a38 100644
--- a/driver-opencl.c
+++ b/driver-opencl.c
@@ -1465,10 +1465,9 @@ static void opencl_free_work(struct thr_info *thr, struct work *work)
 	_clState *clState = clStates[thr_id];
 	struct cgpu_info *gpu = thr->cgpu;
 
-	if (gpu->dynamic)
-		return;
+	if (!gpu->dynamic)
+		clFinish(clState->commandQueue);
 
-	clFinish(clState->commandQueue);
 	if (thrdata->res[FOUND]) {
 		thrdata->last_work = &thrdata->_last_work;
 		memcpy(thrdata->last_work, work, sizeof(*thrdata->last_work));