buf.as_scalar<size_t>() = 1 << dev.max_image_levels_3d();
break;
+ case CL_DEVICE_IMAGE_MAX_BUFFER_SIZE:
+ buf.as_scalar<size_t>() = dev.max_image_buffer_size();
+ break;
+
+ case CL_DEVICE_IMAGE_MAX_ARRAY_SIZE:
+ buf.as_scalar<size_t>() = dev.max_image_array_number();
+ break;
+
case CL_DEVICE_IMAGE_SUPPORT:
buf.as_scalar<cl_bool>() = dev.image_support();
break;
case CL_DEVICE_AVAILABLE:
case CL_DEVICE_COMPILER_AVAILABLE:
+ case CL_DEVICE_LINKER_AVAILABLE:
buf.as_scalar<cl_bool>() = CL_TRUE;
break;
buf.as_scalar<cl_command_queue_properties>() = CL_QUEUE_PROFILING_ENABLE;
break;
+ case CL_DEVICE_BUILT_IN_KERNELS:
+ buf.as_string() = "";
+ break;
+
case CL_DEVICE_NAME:
buf.as_string() = dev.device_name();
break;
buf.as_string() = "OpenCL C 1.1 ";
break;
+ case CL_DEVICE_PRINTF_BUFFER_SIZE:
+ // Per the spec, the minimum value for the FULL profile is 1 MB.
+ // However, clover is not ready yet to support it
+ buf.as_scalar<size_t>() = 0 /* 1024 */;
+ break;
+
+ case CL_DEVICE_PREFERRED_INTEROP_USER_SYNC:
+ buf.as_scalar<cl_bool>() = CL_TRUE;
+ break;
+
case CL_DEVICE_PARENT_DEVICE:
buf.as_scalar<cl_device_id>() = NULL;
break;
return PIPE_MAX_SHADER_IMAGES;
}
+size_t
+device::max_image_buffer_size() const {
+ return pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE);
+}
+
cl_uint
device::max_image_levels_2d() const {
return pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_2D_LEVELS);
return pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_3D_LEVELS);
}
+size_t
+device::max_image_array_number() const {
+ return pipe->get_param(pipe, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS);
+}
+
cl_uint
device::max_samplers() const {
return pipe->get_shader_param(pipe, PIPE_SHADER_COMPUTE,
cl_uint vendor_id() const;
size_t max_images_read() const;
size_t max_images_write() const;
+ size_t max_image_buffer_size() const;
cl_uint max_image_levels_2d() const;
cl_uint max_image_levels_3d() const;
+ size_t max_image_array_number() const;
cl_uint max_samplers() const;
cl_ulong max_mem_global() const;
cl_ulong max_mem_local() const;