From c8bd4e3db7fdfac91d581c6a779581674cf5b366 Mon Sep 17 00:00:00 2001 From: bsegovia Date: Fri, 12 Aug 2011 03:11:42 +0000 Subject: [PATCH] Made fulsim integration seamless from the user point of view --- include/CL/cl_fulsim.h | 39 --------------------------------------- src/cl_api.c | 14 -------------- src/cl_command_queue.c | 24 ------------------------ src/cl_utils.h | 1 + 4 files changed, 1 insertion(+), 77 deletions(-) delete mode 100644 include/CL/cl_fulsim.h diff --git a/include/CL/cl_fulsim.h b/include/CL/cl_fulsim.h deleted file mode 100644 index a1ecd53..0000000 --- a/include/CL/cl_fulsim.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright © 2012 Intel Corporation - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see . - * - * Author: Benjamin Segovia - */ - -#ifndef __OPENCL_CL_FULSIM_H -#define __OPENCL_CL_FULSIM_H - -#include "CL/cl.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* Once a command queue has been executed, we output a buffer */ -extern CL_API_ENTRY cl_int CL_API_CALL -clFulsimSetOutputBuffer(cl_command_queue, cl_mem); - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_CL_FULSIM_H */ - - diff --git a/src/cl_api.c b/src/cl_api.c index 0b37ba8..23bb33c 100644 --- a/src/cl_api.c +++ b/src/cl_api.c @@ -1112,17 +1112,3 @@ clIntelGetGenVersion(cl_device_id device, cl_int *ver) return cl_device_get_version(device, ver); } -cl_int -clFulsimSetOutputBuffer(cl_command_queue queue, cl_mem mem) -{ - cl_int err = CL_SUCCESS; - CHECK_QUEUE (queue); - if (mem != NULL && mem->magic != CL_MAGIC_MEM_HEADER) { - err = CL_INVALID_MEM; - goto error; - } - err = cl_command_queue_set_fulsim_buffer(queue, mem); -error: - return err; -} - diff --git a/src/cl_command_queue.c b/src/cl_command_queue.c index cd4b85c..f9be3cc 100644 --- a/src/cl_command_queue.c +++ b/src/cl_command_queue.c @@ -433,15 +433,11 @@ cl_command_queue_ND_range(cl_command_queue queue, FATAL ("Unknown Gen Device"); #if USE_FULSIM - //if (queue->fulsim_out) - // aub_exec_dump_raw_file(queue->fulsim_out->bo); -#if 1 TRY (cl_fulsim_dump_all_surfaces, queue, k); drm_intel_bufmgr_gem_stop_aubfile(bufmgr); fclose(file); cl_run_fulsim(); TRY (cl_fulsim_read_all_surfaces, queue, k); -#endif #endif /* USE_FULSIM */ error: @@ -459,23 +455,3 @@ cl_command_queue_finish(cl_command_queue queue) return CL_SUCCESS; } -LOCAL cl_int -cl_command_queue_set_fulsim_buffer(cl_command_queue queue, cl_mem mem) -{ -#if 0//USE_FULSIM - 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; -} - - diff --git a/src/cl_utils.h b/src/cl_utils.h index 008d817..944e044 100644 --- a/src/cl_utils.h +++ b/src/cl_utils.h @@ -178,6 +178,7 @@ do { \ do { \ fprintf(stderr, "error: "); \ fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, "\n"); \ assert(0); \ exit(-1); \ } while (0) -- 2.7.4