AMD catalyst: set GL_UNPACK_ROW_LENGTH will lead to corrupted texture

It seems that there is a bug in Catalyst driver, when I set GL_UNPACK_ROW_LENGTH to a value other than zero, under some specific image width, the texture copied from PBO will be corrupted. I have an AMD radeon HD 7770 card and use Catalyst 13.1 driver in Windows 7 x64. I have uploaded a sample program in, the sample project can reproduce this issue. Please build it with VS 2010 in 64 bit mode, run the program and two bmp files named “correct.bmp” and “bad.bmp” will be generated, you can see the corrupted image in bad.bmp

is your texture rgb(not rgba)? and it glitches only when texture width is not multiple of 4? in that case, it’s because by default GL_UNPACK_ALIGNMENT is set to 4 and your texture should be either 4-channel or width must be multiple of 4. you can set GL_UNPACK_ALIGNMENT to 1, but it may cause much slower texture uploads. or you can use only textures that satisfy the requirements stated above.

Yes, My texture is RGBA.
And the sample program works fine in nVidia card.

and what texture dimensions are causing trouble?

Such as 3410 x 2048

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.