summaryrefslogtreecommitdiff
path: root/src/cl_command_queue.c
diff options
context:
space:
mode:
authorbsegovia <devnull@localhost>2011-08-05 04:46:06 +0000
committerKeith Packard <keithp@keithp.com>2012-08-10 16:14:44 -0700
commit2b069ade5fc4ea3c23839771915b78d561ee9d28 (patch)
treebb9eace8922587d33af2e9275bfccd95ac929650 /src/cl_command_queue.c
parent9196b68dd5e7c0b2664d9f8339ee52ed454200c1 (diff)
Now IVB performs as well as SNB. All tests except for fft pass (for both).
Diffstat (limited to 'src/cl_command_queue.c')
-rw-r--r--src/cl_command_queue.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/cl_command_queue.c b/src/cl_command_queue.c
index b4e27357..76d8c72c 100644
--- a/src/cl_command_queue.c
+++ b/src/cl_command_queue.c
@@ -82,6 +82,10 @@ cl_command_queue_delete(cl_command_queue queue)
if (queue->next == NULL && queue->prev == NULL)
queue->ctx->queues = NULL;
pthread_mutex_unlock(&queue->ctx->queue_lock);
+ if (queue->fulsim_out != NULL) {
+ cl_mem_delete(queue->fulsim_out);
+ queue->fulsim_out = NULL;
+ }
cl_mem_delete(queue->perf);
cl_context_delete(queue->ctx);
intel_gpgpu_delete(queue->gpgpu);
@@ -292,21 +296,18 @@ LOCAL cl_int
cl_command_queue_set_fulsim_buffer(cl_command_queue queue, cl_mem mem)
{
#if USE_FULSIM
- cl_context ctx = queue->ctx;
- drm_intel_bufmgr *bufmgr = cl_context_get_intel_bufmgr(ctx);
- drm_intel_aub_set_bo_to_dump(bufmgr, mem->bo);
-#endif /* USE_FULSIM */
-
- queue->fulsim_out = mem;
if (queue->fulsim_out != NULL) {
cl_mem_delete(queue->fulsim_out);
queue->fulsim_out = NULL;
}
if (mem != NULL) {
+ cl_context ctx = queue->ctx;
+ drm_intel_bufmgr *bufmgr = cl_context_get_intel_bufmgr(ctx);
+ drm_intel_aub_set_bo_to_dump(bufmgr, mem->bo);
cl_mem_add_ref(mem);
queue->fulsim_out = mem;
}
-
+#endif /* USE_FULSIM */
return CL_SUCCESS;
}