.min_data_type_align_size = sizeof(cl_long) * 16,
.single_fp_config = 0, /* XXX */
.global_mem_cache_type = CL_READ_WRITE_CACHE,
-.global_mem_size = 128 * 1024 * 1024,
+.global_mem_size = 256 * 1024 * 1024,
.max_constant_buffer_size = 512 << 10,
.max_constant_args = 8,
.error_correction_support = CL_FALSE,
case CL_MEM_GL_IMAGE_TYPE:
{
struct _cl_mem_image *image = cl_mem_image(mem);
- if (image->depth == 1)
- return CL_MEM_OBJECT_IMAGE1D;
- else if (image->depth == 2)
- return CL_MEM_OBJECT_IMAGE2D;
- else if (image->depth == 3)
- return CL_MEM_OBJECT_IMAGE3D;
+ return image->image_type;
}
default:
return CL_MEM_OBJECT_BUFFER;
assert(ctx);
+ /* Due to alignment, the image size may exceed alloc max size, check global mem instead */
if ((err = cl_get_device_info(ctx->device,
- CL_DEVICE_MAX_MEM_ALLOC_SIZE,
+ CL_DEVICE_GLOBAL_MEM_SIZE,
sizeof(max_mem_size),
&max_mem_size,
NULL)) != CL_SUCCESS) {