Login  Register

Re: opencl images

Posted by notzed on Jul 12, 2010; 12:27pm
URL: https://forum.jogamp.org/opencl-images-tp918750p960200.html


Hi again,

Sorry for not replying - I didn't see this reply.  Seems like the image stuff is in there now too - thanks.  Can't think of anything to do for a demo (apart from my job, but i can't use that), but I would like to eventually.

After another false start I did eventually get some results from the image stuff but it's a bit puzzling, so i'm not sure if it's a jocl issue or AMD's stream sdk, so I thought i'd ask here first.  I'm using the auto build 2010-07-04.  It's not really critical as i'm still just investigating.

Basic code flow is this:
 byte buffer loaded with test data
 call a kernel which processes this into an RGBA/UNORM_INT8 image, using write_imagef
 call another kernel which converts this back to an int buffer, which uses read_imageui and then some shifts to pack to an int.

I believe the write_imagef should 'normalise' 1.0f -> 255, and the read_imageui should read un-normalised '255'.  But instead  I get '0x3f800000', which is just 1.0f as an int.  If I use read_imagef I get the correct result (and similar for other values which indicate it's actually storing 8 bit ints as expected).  If I change the write kernel to use write_imageui I always read back 0, no matter which of the few values I tried.

Looks like some issue with amd's image support, but I thought i'd ask here first since i'm using this extra api layer.

I'll have to check my `git' checkouts, i must be using the wrong repository.  i detest git.

 Z