Red screen on ATI OpenGL when using SDL_GL_ACCELERATED_VISUAL

For the project I’m working on (Stella, 2600 emulator), I’m getting a red
screen in OpenGL mode when using ATI hardware. This has been tested with
several different versions of the Catalyst drivers, and on cards ranging
from an X1300 to an HD4870.

I’ve found that by removing the following code, the rendering is fine:
‘SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );’

Has anyone ever experienced this ‘red screen’ issue with accelerated
visuals in OpenGL on ATI? I’ve found several reports online that suggest
removing the call, but nothing further, and no explanation of why it’s
happening.

The problem is, I’m thinking this is a symptom of a larger issue.
Specifically, that the selected accelerated visual can’t do everything I
require, so the drivers are simply not doing certain commands (resulting
in a red screen). Turning off accelerated visual simply lets the drivers
fall back to the software path for certain functions, so everything is
being rendered fine (albeit perhaps more slowly).

Does this sound correct? And more importantly, is there anything I can do
about it?? I really don’t want to disable accelerated visual, as it
works fine on every NVidia and Intel card I’ve tested.

I can provide code if necessary. TIA for any info.

SA

Just to add, I’ve only noticed this in Windows. OSX on ATI hardware is
fine, and I haven’t tried Linux at all (as the drivers aren’t the best
in Linux anyway).

SAOn March 12, 2009 08:49:28 am Stephen Anthony wrote:

For the project I’m working on (Stella, 2600 emulator), I’m getting a
red screen in OpenGL mode when using ATI hardware. This has been
tested with several different versions of the Catalyst drivers, and
on cards ranging from an X1300 to an HD4870.

I’ve found that by removing the following code, the rendering is
fine: ‘SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );’

Stephen Anthony wrote:> On March 12, 2009 08:49:28 am Stephen Anthony wrote:

For the project I’m working on (Stella, 2600 emulator), I’m getting a
red screen in OpenGL mode when using ATI hardware. This has been
tested with several different versions of the Catalyst drivers, and
on cards ranging from an X1300 to an HD4870.

I’ve found that by removing the following code, the rendering is
fine: ‘SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );’

Possibly related:

http://thread.gmane.org/gmane.comp.lib.sdl/35708/focus=35712

Stephen Anthony wrote:

For the project I’m working on (Stella, 2600 emulator), I’m
getting a red screen in OpenGL mode when using ATI hardware. This
has been tested with several different versions of the Catalyst
drivers, and on cards ranging from an X1300 to an HD4870.

I’ve found that by removing the following code, the rendering is
fine: ‘SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );’

Possibly related:

http://thread.gmane.org/gmane.comp.lib.sdl/35708/focus=35712

Many thanks for this; it looks to be exactly what I’m experiencing. And
the bug is still present in the latest (9.2) version of Catalyst
drivers. I guess I’ll have to add a config option to not use
accelerated visuals.

BTW, can anyone comment on the consequences of not using
SDL_GL_ACCELERATED_VISUAL? Will it result in slower execution, or some
functions taking the software path, etc?? Basically, what does it
really do?

Thanks,
SAOn March 12, 2009 01:00:01 pm Tim Angus wrote:

On March 12, 2009 08:49:28 am Stephen Anthony wrote:

Stephen Anthony wrote:

BTW, can anyone comment on the consequences of not using
SDL_GL_ACCELERATED_VISUAL? Will it result in slower execution, or some
functions taking the software path, etc?? Basically, what does it
really do?

All it does is insist that the visual returned is hardware accelerated,
so that e.g., if your application is taxing enough to require
acceleration, it is guaranteed that it will get it. The trouble is that
when you ask the ATI driver for hardware acceleration you get software
GL and vice versa.

Not specifying the flag means that people who would otherwise not be
able to use your software due to the hardware requirement may instead be
able to run it (albeit very slowly) with software acceleration.

ATI cards are popular enough that we just don’t use this flag for ioq3.
Unfortunately it says a lot about ATI’s drivers where a bug that
essentially requires a logic negation to fix is still broken after at
least a year :(. Oh well.

From what I’ve seen, this is to force acceleration, specifically for
shaders, since they might be unaccelerated on certain hardware. Other than
that, I don’t know…

Jonny D

Have you tried the radeonhd driver in linux? I’ve switched to it on my MacBook
Pro and it’s great. That said, all the 3D I do on the MacBook Pro lately is
rendering KDE 4.2 desktop effects. Just curious if you get the same problem
using that driver.

AlvinOn March 12, 2009 12:16:06 pm Stephen Anthony wrote:

On March 12, 2009 08:49:28 am Stephen Anthony wrote:

For the project I’m working on (Stella, 2600 emulator), I’m getting a
red screen in OpenGL mode when using ATI hardware. This has been
tested with several different versions of the Catalyst drivers, and
on cards ranging from an X1300 to an HD4870.

I’ve found that by removing the following code, the rendering is
fine: ‘SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );’

Just to add, I’ve only noticed this in Windows. OSX on ATI hardware is
fine, and I haven’t tried Linux at all (as the drivers aren’t the best
in Linux anyway).

SA


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I don’t have Linux installed on that box at all, but I’ll look into it.
For now, I’m just going to remove the SDL_GL_ACCELERATED_VISUAL stuff
altogether.

SAOn March 12, 2009, Alvin Beach wrote:

On March 12, 2009 12:16:06 pm Stephen Anthony wrote:

On March 12, 2009 08:49:28 am Stephen Anthony wrote:

For the project I’m working on (Stella, 2600 emulator), I’m getting
a red screen in OpenGL mode when using ATI hardware. This has been
tested with several different versions of the Catalyst drivers, and
on cards ranging from an X1300 to an HD4870.

I’ve found that by removing the following code, the rendering is
fine: ‘SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );’

Just to add, I’ve only noticed this in Windows. OSX on ATI hardware
is fine, and I haven’t tried Linux at all (as the drivers aren’t the
best in Linux anyway).

SA


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Have you tried the radeonhd driver in linux? I’ve switched to it on my
MacBook Pro and it’s great. That said, all the 3D I do on the MacBook
Pro lately is rendering KDE 4.2 desktop effects. Just curious if you
get the same problem using that driver.