Bug 552

Summary: CLCommandQueue.putMapImage() call to clEnqueueMapImage() is invalid
Product: [JogAmp] Jocl Reporter: Samuel Audet <samuel.audet>
Component: openclAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: major CC: gouessej, sgothel
Priority: P4    
Version: 1   
Hardware: All   
OS: all   
Type: --- SCM Refs:
518fcb4730256a3aaf77cf787219d5941eb3c9b4
Workaround: ---

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!