Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using new OpenCL calls (removing deprecated ones)

  • Loading branch information...
commit 3dec7ececbc20e55800c6cb668a3457b6d7be4c6 1 parent 945169d
@ccgus authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 plugins/imagetools/JSTOpenCLProgram.m
View
13 plugins/imagetools/JSTOpenCLProgram.m
@@ -218,7 +218,18 @@ - (id)initWithContext:(JSTOpenCLContext*)theContext width:(size_t)w height:(size
format.image_channel_order = CL_RGBA;
format.image_channel_data_type = CL_FLOAT;
- computeBuffer = clCreateImage2D(context.computeContext, attributes, &format, _width, _height, _bytesPerRow, _bitmapData, &err);
+ cl_image_desc imageDescription;
+ imageDescription.image_type = CL_MEM_OBJECT_IMAGE2D;
+ imageDescription.image_width = _width;
+ imageDescription.image_height = _height;
+ imageDescription.image_array_size = 1;
+ imageDescription.image_row_pitch = _bytesPerRow;
+ imageDescription.image_slice_pitch = 0; //_height;
+ imageDescription.num_mip_levels = 0;
+ imageDescription.num_samples = 0;
+ imageDescription.image_depth = 0;
+
+ computeBuffer = clCreateImage(context.computeContext, attributes, &format, &imageDescription, _bitmapData, &err);
if (!computeBuffer) {
NSLog(@"%s:%d", __FUNCTION__, __LINE__);
Please sign in to comment.
Something went wrong with that request. Please try again.