+++ /dev/null
-/*
- * 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 */
-
-
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;
-}
-
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:
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;
-}
-
-
do { \
fprintf(stderr, "error: "); \
fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, "\n"); \
assert(0); \
exit(-1); \
} while (0)