cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

mark_chatfield
Journeyman III

AMD Catalyst 13.6 Beta 2 - Bug with glTexStorage2D and glTexSubImage2D

I've got an issue with glTexStorage2D and glTexSubImage2D on the latest beta Catalyst drivers (13.6 Beta 2).

The project is available from AMDBug2.zip - Google Drive.

Basically the following code to allocate and fill a texture fails:

glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, 32, 32);

glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 32, 32, GL_RGBA, GL_UNSIGNED_BYTE, data);

This code works on the Catalyst 13.4 drivers, as well as the latest stable NVIDIA and Intel drivers.

It seems if I change the level parameter at all (in either of the calls) everything works as expected.

This comes from a very cut down example of a section of code used for generating mipmaps.

0 Likes
2 Replies
gsellers
Staff
Staff

Re: AMD Catalyst 13.6 Beta 2 - Bug with glTexStorage2D and glTexSubImage2D

Hi,

We took a look at your test case. We noticed two things in particular. First, neither of your "Works" case should work. For the first one, calling glTexSubImage2D with <level> >= number of levels in the texture (which is 1 due to the line above) should generate INVALID_OPERATION. In the second case, calling glTexStorage2D with <levels> set to zero should generate INVALID_VALUE. Second, your "Fails" case should work. We ran the sample on our internal driver builds and neither of the first two cases work - they both generate errors as they should. The "Fails" case works, however.

Could you double check your sample, please?

Thanks,

Graham

0 Likes
mark_chatfield
Journeyman III

Re: AMD Catalyst 13.6 Beta 2 - Bug with glTexStorage2D and glTexSubImage2D

Sorry, when I say "works" in the first two test cases I actually meant doesn't crash (not that the input is invalid).

I'll clarify:

glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, 32, 32);

glTexSubImage2D(GL_TEXTURE_2D, 1, 0, 0, 32, 32, GL_RGBA, GL_UNSIGNED_BYTE, data);

is not valid and should generate an error (INVALID_VALUE I thought, but it doesn't really matter), but does not crash

glTexStorage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 32, 32);

glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 32, 32, GL_RGBA, GL_UNSIGNED_BYTE, data);

is not valid and should generate an error (INVALID_VALUE), but does not crash

glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, 32, 32);

glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 32, 32, GL_RGBA, GL_UNSIGNED_BYTE, data);

is the case in our customer shipped code that is valid but crashes on Catalyst 13.6 Beta 2 drivers.

As long as the last test case works, does not crash, and produces the correct result I'm happy. I'll be sure to try again in the next beta.

Thanks for your time investigating the issue.

Mark

0 Likes