I’m new to OpenCL, so this might be a novice question.
I’m working on some image processing algorithms in OpenCL, and for what I understand it’s a better choice to use textures instead of buffers whenever it’s possible. The thing is the images I want to process have 3 1-byte channels (RGB), and I read that’s not a supported format for an Image2d in OpenCL:
These are my ideas to get through this:
[li] Preconvert in CPU my RGB image to RGBA, as RGBA is supported. I’d rather not. Sounds costly when performance is what I’m looking for.
[/li][li] Use a regular buffer instead of a texture. I want textures
[/li][li] out of ideas
I must be missing something here, because 3-channels images are pretty common. Is there a way to use RGB format?
Thank you for reading