PBO's an 3d texture performance

Hi All,
I’ve been investigating using PBO’s to update my 3d texture data. Originally I just made calls to glTexSubImage3D every time I needed to update. My texture only contains a single value per voxel so my format is GL_LUMINANCE. After modifying my code to use PBO’s, I’m not seeing any performance increase. I’m not receiving any errors from GL.
Now, most of the papers/references I’ve been reading, reference 2d textures and textures that are contain 4 values per voxel so maybe this is why I’m not seeing a difference but would think I’d see some difference.

So my question is,has anyone used PBO’s in combination with 3d textures and seen significant performance improvements?
If so, can you give any advice on how I can change my app to take advantage of PBO’s?
Thanks ahead of time for any input.
biv

PBOs are good for letting uploads/downloads happen asynchronous, if you need the data immediately after upload, there will be no difference performance wise.

But if you know that it takes time, for example when decoding a video, or streaming a big texture into a PBO, and then “later” upload to the texture, and use it, it will be faster. Don’t have much practical experience yet with them so…

and with “later” I mean other OpenGL calls in between. Basically the performance gain comes from the concept that buffer objects can be accessed and the opengl command queue can be processed along, only waiting for synchronization if said bufferobjects are to be used.

AHHHH. I see. This makes sense now. I’m doing volume rendering but I currently only have one “brick” for my data. If I understand what you are saying, I will see performance differences in my app once I implement multiple “bricks” in my volume, correct?
Thanks for clearing that up for me!

You will see (probably) performance improvements if you make use of the asynchronous PBO nature. For example, you can upload a texture while rendering a scene with another texture. Actually, PBO don’t make much sence for texture download (to the GPU, that is) unless you have a lot of textures that must be updated very often (texture streaming).

I have no idea about voxel rendering though, so I can’t propose anything more concrete, but if you have mostly static texture data (and only few textures), that only change seldomly, PBOs won’t be an advantage. If a texture does change often, you could for example create two textures and ping-pong between them, uploading one with a PBO while rendering with another. Still, I don’t have much practical PBO experience, so I don’t guarrantee that this suggestion will work :slight_smile: