Login  Register

Re: opencl images

Posted by Michael Bien on Jul 12, 2010; 3:17pm
URL: https://forum.jogamp.org/opencl-images-tp918750p960594.html

I haven't used images much so far. But readying your description, it could be quite possible that you run into bugs of the OpenCL implementation in those kind of corner cases.

AMD has a few samples in the sdk (convolution filters, sobel filter). I am afraid non of them seems to use this kind of conversion trick :)
But maybe its something trivial, e.g. you read from the wrong buffer or so... hard to help you without code or a junit test ;)

regarding git:
cd gluegen
git pull git://github.com/mbien/gluegen.git master
cd jogl
git pull git://github.com/mbien/jogl.git master
cd jocl
git pull git://github.com/mbien/jocl.git master

and you have the latest version of jocl with its dependencies. (jogl is only a compiletime dependency, so if you don't use any OpenGL interoperability its not that important to be up2date with this repo)

regards,

michael


On 07/12/2010 02:27 PM, notzed [via jogamp] wrote:

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




View message @ http://jogamp.762907.n3.nabble.com/opencl-images-tp918750p960200.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.