Nicolas Lelong
05-07-2010, 10:25 AM
Hi everyone,
I'm currently trying to read the contents of textures to dump their raw contents on disk.
I'm trying to use PBOs (GL_PIXEL_PACK_BUFFER) as glGetTexImage is supposed to raise a GL_INVALID_OPERATION error if there's not enough memory in the PBO.
Everything is fine on NVidia, but on ATI I have unexpected GL_INVALID_OPERATION errors happening on certain pixel formats :
GL_R3_G3_B2, supposed to be 1 byte per pixel GL_RGB16, supposed to be 6 bytes per pixel GL_RGB32F, supposed to be 12 bytes per pixel GL_RGB8, supposed to be 3 bytes per pixel ...
I've checked without using PBO, and the reserved texture space seems to be correcly calculated by my code (I added bound checking to my buffers). I also use a GL_PACK_ALIGNMENT value of 1.
Does anyone have experience to share about using 'correctly' sized PBO to read texture contents ?
Cheers,
Nicolas.
Edit: forgot to mention the use of Catalyst 10.4 on Radeon HD5770
I'm currently trying to read the contents of textures to dump their raw contents on disk.
I'm trying to use PBOs (GL_PIXEL_PACK_BUFFER) as glGetTexImage is supposed to raise a GL_INVALID_OPERATION error if there's not enough memory in the PBO.
Everything is fine on NVidia, but on ATI I have unexpected GL_INVALID_OPERATION errors happening on certain pixel formats :
GL_R3_G3_B2, supposed to be 1 byte per pixel GL_RGB16, supposed to be 6 bytes per pixel GL_RGB32F, supposed to be 12 bytes per pixel GL_RGB8, supposed to be 3 bytes per pixel ...
I've checked without using PBO, and the reserved texture space seems to be correcly calculated by my code (I added bound checking to my buffers). I also use a GL_PACK_ALIGNMENT value of 1.
Does anyone have experience to share about using 'correctly' sized PBO to read texture contents ?
Cheers,
Nicolas.
Edit: forgot to mention the use of Catalyst 10.4 on Radeon HD5770