Bug 552 - CLCommandQueue.putMapImage() call to clEnqueueMapImage() is invalid
Summary: CLCommandQueue.putMapImage() call to clEnqueueMapImage() is invalid
Alias: None
Product: Jocl
Classification: JogAmp
Component: opencl (show other bugs)
Version: 1
Hardware: All all
: P4 major
Assignee: Sven Gothel
Depends on:
Reported: 2012-01-23 00:39 CET by Samuel Audet
Modified: 2013-10-12 22:55 CEST (History)
2 users (show)

See Also:
Type: ---
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Audet 2012-01-23 00:39:53 CET
CLCommandQueue.putMapImage() contains this call:

1225         ByteBuffer mappedImage = cl.clEnqueueMapImage(ID, image.ID, clBoolean(blockingMap),

1226                                          flag.FLAGS, ibB, ibC, null, null,

1227                                          conditions, conditionIDs, events==null ? null : events.IDs, error);

But null as argument for image_row_pitch is invalid according to OpenCL specs:

"image_row_pitch returns the scan-line pitch in bytes for the mapped region. This must be a non-NULL value."

image_slice_pitch also needs to be non-NULL for 3D images.

And my understanding is that putMapImage() should return this value to the user somehow... maybe by resetting the rowPitch and slicePitch properties of the CLImage2d or CLImage3d object?

Thanks for looking into this!
Comment 1 Sven Gothel 2013-10-12 22:55:42 CEST
Thank you. Pls verify and reopen if not satisfactory. No unit test!