Forums - OpenCL clEnqueueMapImage return NULL with CL_SUCCESS

1 post / 0 new
OpenCL clEnqueueMapImage return NULL with CL_SUCCESS
sywoo
Join Date: 20 Dec 12
Posts: 2
Posted: Tue, 2015-05-26 23:52
clEnqueueMapImage return NULL with CL_SUCCESS
 
ptr is NULL and ret is CL_SUCCESS
 
LG G4 - OpenCL 1.2 Adreno(TM) 418
 
source code :
 
cl_int ret;
cl_image_format format;
format.image_channel_order = CL_R;
format.image_channel_data_type = CL_UNSIGNED_INT8;
cl_image_desc desc;
desc.image_type = CL_MEM_OBJECT_IMAGE3D;
desc.image_width = 256;
desc.image_height = 256;
desc.image_depth = 256;
desc.image_array_size = 1;
desc.image_row_pitch = NULL;
desc.image_slice_pitch = NULL;
desc.num_mip_levels = 0;
desc.num_samples = 0;
desc.buffer = NULL;
cubeIndexesImage = clCreateImage(clData->m_context, CL_MEM_READ_ONLY | CL_MEM_ALLOC_HOST_PTR, &format, &desc, NULL, &ret);
size_t origin[3] = {0, 0, 0};
size_t region[3] = {256, 256256};
size_t row_pitch;
size_t slice_pitch;
  1. void* ptr = clEnqueueMapImage(clData->m_command_queue, volumeDataImage, CL_TRUE, CL_MAP_WRITE, origin, region, &row_pitch, &slice_pitch, 0, NULL, NULL, &ret);
  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.