I’m programming OpenCL and map textures directly to OpenCL memory. For this I’m using the following logic:
for all tex in textures do:
- image = context.bindImage(tex, MemoryAccess.WRITE_ONLY)
- image.acquireImageForSharingNoEvent
- kernel.run1NoEvent
- image.releaseImageForSharingNoEvent
Do I need to un-bind the image or dispose the image after releaseImageForSharingNoEvent()?
Because if I use too many textures I get CL_OUT_OF_RESOURCES error in Context.bindImage().