PDA

View Full Version : Updating single layer of texture array



aqnuep
12-21-2010, 04:09 PM
Hi,

I know that this is something that I should rather first try out, however, I first want to ask whether any of you have tried it and can share their experiences.
I'm thinking about using TexSubImage2D to update a single layer of a texture array (including mipmaps) as a way for streaming textures.
My question is whether this would involve sync issues if I'm currently using the texture array for texturing (note: the layer which is currently updated is not used, only the other layers).
Logically, I would think that a sync is necessary. On the other hand, from practical point of view it would be great if no such sync would happen in case the layer being updated is not currently in use.

Alfonse Reinheart
12-21-2010, 05:19 PM
I'm thinking about using TexSubImage2D to update a single layer of a texture array

Well, that's not going to work, since you have to use TexSubImage3D for array textures.

You can certainly update a single layer with TexSubImage3D, though.

aqnuep
12-22-2010, 03:39 AM
Sorry, I did mean TexSubImage3D, it was just a typo.
My question is rather related to performance than implementation.

aqnuep
12-22-2010, 09:55 AM
After a bit of thinking about the design principles of GL I realized that most probably my problem cannot be solved without some synchronization with the current feature set of OpenGL.

Even though I know that I won't access that particular layer in my rendering while I would like the update the image with a DMA copy, the driver cannot be aware of that and thus it must do a sync in order to ensure proper rendering.

That, however made me think that it would be great to have some sort of unsynchronized texture image update in GL, because such feature would allow us to stream new images into texture arrays without disturbing rendering.