Thread Necromancer uses Thread Resurrect. It’s super effective.
As it turns out, this is still not fixed three years later. Which is inconvenient as I would need this right now. In a large visualization application with hundreds of textures (all used bindless), some might or might not be needed for CUDA processing, depending on the user actions. I don’t want to register all textures upon creation, as most of them will never be shared with CUDA. Yet, is this the only way to go? How large is the overhead of registering a texture? Is this only a negligible struct/pointer somewhere or are actual data copied/pinned?
I have a similar issue, but i want to point out that if you first call cudaGraphicsGLRegisterImage and only afterwards glGetTextureHandleARB it doesn’t fail. I know you might know this already but it would have been nice to know for somebody else reading this.
The issue with this in our case is that cudaGraphicsGLRegisterImage takes about half a millisecond while we sometimes need to create several thousands of textures within one frame. For our application we simply can’t afford these kinds of delays.