OpenGL makes application crash when using RADEON videocard.


Our team is developing a graphical client for a MMORPG game and we’re experiencing issues with users which have Radeon video cards.
OpenGL randomly crashes on glBindTexture and we fail to get any stack trace or anything more useful other than that. All we know that they all have one thing in common - Radeon video cards.

Are there any known pitfalls with Radeon videocards and OpenGL that we should know?

The Truth on OpenGL Driver Quality

An eye-opener about AMD and driver quality for OpenGL
Dolphin Emulator and OpenGL drivers - Hall of Fame/Shame

These are only 3 examples, but AMD don’t have the best track record when it comes to OpenGL driver quality.

That said, it’s also possible that the AMD driver is behaving correctly, but other drivers are accepting a texture (or combination of state) that they shouldn’t. You’d need to give more information on those crashes; determine what texture or textures are being bound when it crashes, if it’s a single texture inspect it for anything that looks like it might be a cuase, if it’s multiple textures determine what they have in common, etc.

I’m sorry I made a mistake. Crash happens after glTexImage2D call.

Again, look at your parameters to the glTexImage2D call. You’ll find something common across your crash cases. It would help if you’d post a sample of one or two such calls; otherwise we’ll have to guess as to possible causes.

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB5_A1, width, height, 0, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV, pixels); pixels is  ushort here*
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA4, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8, pixels); pixels is uint here*

width and height were checked through logging, they have valid values, just as everything else. All values are just valid and it’s having really random crashes. Sometimes it does binding and just works…
We’re getting a bit hopeless on this.

P.S. Updating drivers didn’t help the guy. We’ll probably buy ourselves RADEON videocard and try to reproduce on our own machine, since this happened only to our testers with RADEON videocards.


AFAIK, this is not a texture format. You cannot use it here.

Check this.

Also, are you sure you have no errors returned by OpenGL ?

No, it is a valid format: glTexSubImage2D

Specifies the data type of the pixel data.
The following symbolic values are accepted:
GL_UNSIGNED_INT_10_10_10_2, and

It is a valid format and it works on all NVidia cards, so…
If this would be a major AMD Catalyst driver and OpenGL problem, this would be generally known. But it seems like we’re the only ones having this issue…
And this randomness with crashes makes it really hard.

Can you post an example of the values that your width and height parameters have? Where I’m coming from here is that I’m wondering if you have non-power-of-two textures, width or height that are not nice multiples of 4, or similar.

As a gneral rule AMD drivers are actually OK (despite my previous post) until you try to do something unusual or unexpected - that’s when they hit a codepath that might not have been robustly tested, and that’s when they explode.

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA4, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8, pixels); pixels is uint here*

This, for example, is something I’d consider unusual. One doesn’t often see the GL_UNSIGNED_INT_8_8_8_8 packed pixel type (GL_UNSIGNED_INT_8_8_8_8_REV is more common) and it’s also doing a format conversion in the driver from 32-bit 8-bit per channel to 16-bit 4-bit per channel.

OK. I need some refreshes here.

[QUOTE=cali9x;1284108]AFAIK, this is not a structural format. You can not use it here.

Check this.

Also, are you sure you have no errors returned by OpenGL?[/QUOTE]

Sadly enough application crashes right after the call. So getting error out of OpenGL is not an option : /

Values are:
1 crash on: 427х316
4 crashes on: 44x44
2 crashes on: 427x44
2 crashes on: 44x316
1 crash on: 427x316

It seems like it crashes on older AMD videocards, like:
AMD Radeon 5570HD
AMD Radeon HD 6700 Series