# HG changeset patch # User John Tsiombikas # Date 1451286529 -7200 # Node ID 8c858e1a89e8fea6f7a4888aaaedaa2fd3390d28 # Parent eb97f9c92e1d9cc7ef3d389998149f2e0420aae8 minor cleanups diff -r eb97f9c92e1d -r 8c858e1a89e8 src/ocl.cc --- a/src/ocl.cc Sun Sep 12 07:27:12 2010 +0100 +++ b/src/ocl.cc Mon Dec 28 09:08:49 2015 +0200 @@ -1,5 +1,7 @@ #define OCL_CC_ +#define CL_USE_DEPRECATED_OPENCL_1_1_APIS + #include #include #include @@ -129,6 +131,11 @@ } } +void finish_opencl() +{ + clFinish(cmdq); +} + CLMemBuffer *create_mem_buffer(int rdwr, size_t sz, const void *buf) { diff -r eb97f9c92e1d -r 8c858e1a89e8 src/ocl.h --- a/src/ocl.h Sun Sep 12 07:27:12 2010 +0100 +++ b/src/ocl.h Mon Dec 28 09:08:49 2015 +0200 @@ -41,6 +41,8 @@ bool init_opencl(); void destroy_opencl(); +void finish_opencl(); + CLMemBuffer *create_mem_buffer(int rdwr, size_t sz, const void *buf); CLMemBuffer *create_image_buffer(int rdwr, int xsz, int ysz, const void *pixels = 0); diff -r eb97f9c92e1d -r 8c858e1a89e8 src/ocl_errstr.h --- a/src/ocl_errstr.h Sun Sep 12 07:27:12 2010 +0100 +++ b/src/ocl_errstr.h Mon Dec 28 09:08:49 2015 +0200 @@ -15,17 +15,20 @@ "CL_IMAGE_FORMAT_MISMATCH", "CL_IMAGE_FORMAT_NOT_SUPPORTED", "CL_BUILD_PROGRAM_FAILURE", - "CL_MAP_FAILURE", /* 12 */ + "CL_MAP_FAILURE", + "CL_MISALIGNED_SUB_BUFFER_OFFSET", + "CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST", + "CL_COMPILE_PROGRAM_FAILURE", + "CL_LINKER_NOT_AVAILABLE", + "CL_LINK_PROGRAM_FAILURE", + "CL_DEVICE_PARTITION_FAILED", + "CL_KERNEL_ARG_INFO_NOT_AVAILABLE", /* 19 */ - "", "", /* 13, 14 */ - "", "", /* 15, 16 */ - "", "", /* 17, 18 */ - "", "", /* 19, 20 */ - "", "", /* 21, 22 */ - "", "", /* 23, 24 */ - "", "", /* 25, 26 */ - "", "", /* 27, 28 */ - "", /* 29 */ + "", "", /* 20, 21 */ + "", "", /* 22, 23 */ + "", "", /* 24, 25 */ + "", "", /* 26, 27 */ + "", "", /* 28, 29 */ "CL_INVALID_VALUE", /* 30 */ "CL_INVALID_DEVICE_TYPE", @@ -60,5 +63,10 @@ "CL_INVALID_GL_OBJECT", "CL_INVALID_BUFFER_SIZE", "CL_INVALID_MIP_LEVEL", - "CL_INVALID_GLOBAL_WORK_SIZE" + "CL_INVALID_GLOBAL_WORK_SIZE", + "CL_INVALID_PROPERTY", + "CL_INVALID_IMAGE_DESCRIPTOR", + "CL_INVALID_COMPILER_OPTIONS", + "CL_INVALID_LINKER_OPTIONS", + "CL_INVALID_DEVICE_PARTITION_COUNT" /* 68 */ }; diff -r eb97f9c92e1d -r 8c858e1a89e8 src/rt.cc --- a/src/rt.cc Sun Sep 12 07:27:12 2010 +0100 +++ b/src/rt.cc Mon Dec 28 09:08:49 2015 +0200 @@ -182,7 +182,10 @@ unmap_mem_buffer(mbuf); #endif + finish_opencl(); + rstat.render_time = get_msec() - tm0; + printf("FOO: %ld msec\n", rstat.render_time); timing_sample_sum += rstat.render_time; num_timing_samples++; diff -r eb97f9c92e1d -r 8c858e1a89e8 src/scene.h --- a/src/scene.h Sun Sep 12 07:27:12 2010 +0100 +++ b/src/scene.h Mon Dec 28 09:08:49 2015 +0200 @@ -18,8 +18,6 @@ float normal[4]; int matid; int padding[3]; - - bool operator ==(const Face &f) const; }; struct Material {