PDA

View Full Version : build sampler direcly on buffer object



aplyer
09-20-2009, 07:21 AM
An usefull cuda functionality is the possibility of use sampler (texture) direcly on linear memory without copy on an Image specific object.
The problem of 1.0 OpenCL specification is we have to :
copy buffer to an image object and after that we can use a sampler above the image.

in cuda :
we direcly construct a sampler over the buffer with user define sutrucutre (row, col pitch).

this is very useful for example when we want to use a memory segment for different image size :
we allocate for a max image size and we use for different image size without reallocation of memory.

flyingtabmow
05-19-2011, 09:17 PM
This would be really useful... getting something like non-separable convolution running fast using buffers is a fair amount of work, and the flexibility of samplers when it comes to dealing with boundaries etc is hard to replicate efficiently. I understand there might be portability concerns regarding such a feature, but there should at least be a sanctioned extension allowing for it.