Made fulsim integration seamless from the user point of view
authorbsegovia <devnull@localhost>
Fri, 12 Aug 2011 03:11:42 +0000 (03:11 +0000)
committerKeith Packard <keithp@keithp.com>
Fri, 10 Aug 2012 23:14:48 +0000 (16:14 -0700)
include/CL/cl_fulsim.h [deleted file]
src/cl_api.c
src/cl_command_queue.c
src/cl_utils.h

diff --git a/include/CL/cl_fulsim.h b/include/CL/cl_fulsim.h
deleted file mode 100644 (file)
index a1ecd53..0000000
+++ /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 <http://www.gnu.org/licenses/>.
- *
- * Author: Benjamin Segovia <benjamin.segovia@intel.com>
- */
-
-#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 */
-
-
index 0b37ba8..23bb33c 100644 (file)
@@ -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;
-}
-
index cd4b85c..f9be3cc 100644 (file)
@@ -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;
-}
-
-
index 008d817..944e044 100644 (file)
@@ -178,6 +178,7 @@ do {                                                        \
 do {                                                        \
   fprintf(stderr, "error: ");                               \
   fprintf(stderr, __VA_ARGS__);                             \
+  fprintf(stderr, "\n");                                    \
   assert(0);                                                \
   exit(-1);                                                 \
 } while (0)