/* the mandatory null terminator */
Stream_Write_UINT16(s, 0);
- Stream_Write(s, userNameW, cbUserName);
+ Stream_Write(s, userNameW, cbUserName);
/* the mandatory null terminator */
Stream_Write_UINT16(s, 0);
- Stream_Write(s, passwordW, cbPassword);
+ Stream_Write(s, passwordW, cbPassword);
/* the mandatory null terminator */
Stream_Write_UINT16(s, 0);
- Stream_Write(s, alternateShellW, cbAlternateShell);
+ Stream_Write(s, alternateShellW, cbAlternateShell);
/* the mandatory null terminator */
Stream_Write_UINT16(s, 0);
- Stream_Write(s, workingDirW, cbWorkingDir);
+ Stream_Write(s, workingDirW, cbWorkingDir);
/* the mandatory null terminator */
Stream_Write_UINT16(s, 0);
cl_mem objs[3] = { NULL, NULL, NULL };
cl_mem destObj;
cl_kernel kernel;
- cl_event events[3];
size_t indexes[2];
const char* sourceNames[] = { "Y", "U", "V" };
primitives_opencl_context* cl = primitives_get_opencl_context();
for (i = 0; i < 3; i++)
{
- objs[i] =
- clCreateBuffer(cl->context, CL_MEM_READ_ONLY, srcStep[i] * roi->height, NULL, &ret);
+ objs[i] = clCreateBuffer(cl->context, CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR,
+ srcStep[i] * roi->height, (char*)pSrc[i], &ret);
if (ret != CL_SUCCESS)
{
WLog_ERR(TAG, "unable to create %sobj", sourceNames[i]);
goto error_objs;
}
-
- ret = clEnqueueWriteBuffer(cl->commandQueue, objs[i], CL_FALSE, 0, srcStep[i] * roi->height,
- pSrc[i], 0, NULL, &events[i]);
- if (ret != CL_SUCCESS)
- {
- WLog_ERR(TAG, "unable to enqueue write command for %sobj", sourceNames[i]);
- goto error_objs;
- }
}
destObj = clCreateBuffer(cl->context, CL_MEM_WRITE_ONLY, dstStep * roi->height, NULL, &ret);
indexes[0] = roi->width;
indexes[1] = roi->height;
- ret = clEnqueueNDRangeKernel(cl->commandQueue, kernel, 2, NULL, indexes, NULL, 3, events, NULL);
+ ret = clEnqueueNDRangeKernel(cl->commandQueue, kernel, 2, NULL, indexes, NULL, 0, NULL, NULL);
if (ret != CL_SUCCESS)
{
WLog_ERR(TAG, "unable to enqueue call kernel");