Login  Register

copy 2d image to 3d image

Posted by notzed on Apr 04, 2011; 3:48am
URL: https://forum.jogamp.org/copy-2d-image-to-3d-image-tp2773846.html

Hi,

I'm experimenting with using 3d images, and I noticed that the CLCommandQueue api's only support copying from 2d-2d and 3d-3d images.  As such there seems no direct way to create 3d images on-gpu from 2d images since the 3d image write extension isn't available on my hardware.

I can work around this using the low-level api directly, but there doesn't seem to be much point to the duplicated type specific image copying functions in the API.  Should they reflect the clEnqueueCopyImage() more directly - i.e. accept both 2d and 3d images?  At least in the lowest-level, most general method?

i.e. just change
 putCopyImage(CLImage3d<?> srcImage, CLImage3d<?> dstImage, ...)
to
 putCopyImage(CLImage<?> srcImage, CLImage<?> dstImage, ...)

Speaking of 3d images, there looks to be a bug in createImage3d(int width, int height, int depth, int rowPitch, CLImageFormat, Mem...).  It passes rowPitch as the depth to it's callee, and discards depth.  I've filed a bug (#491).

Cheers,
 Z