giving a chance for OpenCL 1.1 devices
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#define __CL_ENABLE_EXCEPTIONS
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS /*let's give a chance for OpenCL 1.1 devices*/
|
||||
#include <CL/cl.hpp>
|
||||
|
||||
#include <EGL/egl.h>
|
||||
@@ -182,12 +183,12 @@ void procOCL_I2I(int texIn, int texOut, int w, int h)
|
||||
LOGD("enqueueReleaseGLObjects() costs %d ms", getTimeInterval(t));
|
||||
}
|
||||
|
||||
void procOCL_OCV(int tex, int w, int h)
|
||||
void procOCL_OCV(int texIn, int texOut, int w, int h)
|
||||
{
|
||||
if(!haveOpenCL) return;
|
||||
|
||||
int64_t t = getTimeMs();
|
||||
cl::ImageGL imgIn (theContext, CL_MEM_READ_ONLY, GL_TEXTURE_2D, 0, tex);
|
||||
cl::ImageGL imgIn (theContext, CL_MEM_READ_ONLY, GL_TEXTURE_2D, 0, texIn);
|
||||
std::vector < cl::Memory > images(1, imgIn);
|
||||
theQueue.enqueueAcquireGLObjects(&images);
|
||||
theQueue.finish();
|
||||
@@ -204,7 +205,7 @@ void procOCL_OCV(int tex, int w, int h)
|
||||
LOGD("OpenCV processing costs %d ms", getTimeInterval(t));
|
||||
|
||||
t = getTimeMs();
|
||||
cl::ImageGL imgOut(theContext, CL_MEM_WRITE_ONLY, GL_TEXTURE_2D, 0, tex);
|
||||
cl::ImageGL imgOut(theContext, CL_MEM_WRITE_ONLY, GL_TEXTURE_2D, 0, texOut);
|
||||
images.clear();
|
||||
images.push_back(imgOut);
|
||||
theQueue.enqueueAcquireGLObjects(&images);
|
||||
|
Reference in New Issue
Block a user