sugestions for creating an image pyramid?

I’m looking for suggestions for building image pyramids with Cuda if anyone has them.

I thought of going through GL/DX to create texture mipmaps, but I’d rather avoid that if possible (limits flexibility)

I have a couple of ideas via textures and shared memory, but would appreciate some pointers to avoid missing something smarter.

The main issue that is bothering me is efficiently working with the created image pyramid using a single texture to handle boundary conditions, as I want to be flexible and not assume in advance the number of levels in the pyramid.
As the size of each layers is smaller, it makes it harder to squeeze the multiple levels (again, the main issue is correct boundary conditions).

Thanks

Yes, unfortunately CUDA doesn’t support mip-maps, which would be the obvious way to implement an image pyramid.

The only alternative, as you mention, is to pack the pyramid levels into a single 2D texture and do the addressing calculations yourself in code. You have to careful with filtering at the edges.

You could also put the levels in the Z-slices of a 3D texture, although this wastes quite a lot of storage.

Yes, unfortunately CUDA doesn’t support mip-maps, which would be the obvious way to implement an image pyramid.

The only alternative, as you mention, is to pack the pyramid levels into a single 2D texture and do the addressing calculations yourself in code. You have to careful with filtering at the edges.

You could also put the levels in the Z-slices of a 3D texture, although this wastes quite a lot of storage.