Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: AMD catalyst: set GL_UNPACK_ROW_LENGTH will lead to corrupted texture

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2009
    Posts
    22

    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 http://devgurus.amd.com/servlet/Jive...estPBO.rar.zip, 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

  2. #2
    Member Regular Contributor Nowhere-01's Avatar
    Join Date
    Feb 2011
    Location
    Novosibirsk
    Posts
    251
    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.

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2009
    Posts
    22
    Quote Originally Posted by Nowhere-01 View Post
    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.

  4. #4
    Member Regular Contributor Nowhere-01's Avatar
    Join Date
    Feb 2011
    Location
    Novosibirsk
    Posts
    251
    and what texture dimensions are causing trouble?

  5. #5
    Junior Member Newbie
    Join Date
    Aug 2009
    Posts
    22
    Quote Originally Posted by Nowhere-01 View Post
    and what texture dimensions are causing trouble?
    Such as 3410 x 2048

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •