SDL 1.3 on Gentoo/AMD64, first report

AMD Athlon 64 3500+ stepping 0a (2.2 GHz, 512kB)
XFX GeForce 6800 Ultra 512 MB (PVT45FYDF7)
Gentoo Linux/AMD64 (64 bit native)
Linux 2.6.11-gentoo-r6
Xorg 6.8.2-r6
KDE 3.5.3
nvidia-glx 1.0.8762
nvidia-kernel 1.0.8762-r1
Desktop/display: 2560x1600 24 bits
SDL built with gcc 3.4.5

Tried the usual ./configure, make, …, but that failed with various
warnings and errors in SDL_fb3dfdx.c. Disabled fbdev, and it compiled
and installed just fine.

Tried some examples, but there is some weirdness going on in the event
handling. Whenever I move the mouse over an SDL window, I get a black
screen with only the standard KDE mouse pointer over it, until I move
outside the window again.

Could this somehow be related with my KDE window manager settings? I
activate windows automatically on mouse-over, so I’d expect SDL to
receive several events back to back when activating or deactivating
the window; not just plain mouse moves.

Some figures, though:---------------------
-(~/src/other/SDL-1.3/test:$)-> ./testsprite 5000
Screen is at 32 bits per pixel
Screen is in system memory
Sprite is in system memory
Sprite blit uses RLE acceleration
54.54 frames per second

-(~/src/other/SDL-1.3/test:$)-> ./testsprite2 5000
475.58 frames per second

-(~/src/other/SDL-1.3/test:$)-> ./testsprite2 50000
48.73 frames per second

Tried all blend modes with the last one. All seem to work, and they
all run at the same speed. Scaling impacts the frame rate as expected
(bigger sprites!), but no more.

Some further observations with testsprite2:

Selecting fullscreen mode creates a borderless window, but doesn’t
seem to do anything else (input grabbing is no longer implied?) -
except eliminate the aforementioned black screen problem.

Noframe works, but does not avoid the black screen problem.

Vsync has no effect.

Multiple windows work fine. No significant performance impact. (That
is, N windows deliver pretty much 1/Nth of the frame rate with a
single window for any given number of sprites per window.)

Resizing seems to work. Provided it’s actually meant to scale the
sprites and everything with the window in testsprite2, that is.

(Kinda’ hard to tell how well things behave when moving and resizing
windows, as all I see is a black screen while I’m actually doing
it. :slight_smile:

The center, position, geometry and title options all seem to work
correctly.

BTW, no subtractive blending? Not sure it would be all that useful,
though… Alpha, additive and modulation pretty much covers it as far
as “normal” effects are concerned, I think. (Modulation can be used
to produce very similar looking effects, although you need to
"invert" the source colors first.)

Then again, subtractive is probably pretty much a copy/past job, if
you have additive already - and it’s hardly even that for OpenGL. :slight_smile:

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --’

Tried the usual ./configure, make, …, but that failed with various
warnings and errors in SDL_fb3dfdx.c. Disabled fbdev, and it compiled
and installed just fine.

Which ./configure --disable-video-??? is that? There doesn’t appear to be a
disable-video-fbdev.

Thanks,
JeffOn Tuesday 15 August 2006 15:42 pm, David Olofson wrote:

Tried the usual ./configure, make, …, but that failed with
various

warnings and errors in SDL_fb3dfdx.c. Disabled fbdev, and it
compiled

and installed just fine.

Which ./configure --disable-video-??? is that? There doesn’t appear
to be a disable-video-fbdev.

DOH! fbdev is what Linux kernel people call it, apparently. :slight_smile:
The option to disable the SDL backend is --disable-video-fbcon.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --'On Wednesday 16 August 2006 16:16, Jeff wrote:

On Tuesday 15 August 2006 15:42 pm, David Olofson wrote:

AMD Athlon 64 3500+ stepping 0a (2.2 GHz, 512kB)
XFX GeForce 6800 Ultra 512 MB (PVT45FYDF7)
Gentoo Linux/AMD64 (64 bit native)
Linux 2.6.11-gentoo-r6
Xorg 6.8.2-r6
KDE 3.5.3
nvidia-glx 1.0.8762
nvidia-kernel 1.0.8762-r1
Desktop/display: 2560x1600 24 bits
SDL built with gcc 3.4.5

Tried the usual ./configure, make, …, but that failed with various
warnings and errors in SDL_fb3dfdx.c. Disabled fbdev, and it compiled
and installed just fine.

Tried some examples, but there is some weirdness going on in the
event handling. Whenever I move the mouse over an SDL window, I get a
black screen with only the standard KDE mouse pointer over it, until
I move outside the window again.

Could this somehow be related with my KDE window manager settings? I
activate windows automatically on mouse-over, so I’d expect SDL to
receive several events back to back when activating or deactivating
the window; not just plain mouse moves.

Well I have similar problems and I use fluxbox.
Which version of xorg do you use?
I have xorg-x11-7.0-r1

PS. I also tried afterstep and it had less of these problems.On Wednesday 16 August 2006 01:42, David Olofson wrote:

Some figures, though:

-(~/src/other/SDL-1.3/test:$)-> ./testsprite 5000
Screen is at 32 bits per pixel
Screen is in system memory
Sprite is in system memory
Sprite blit uses RLE acceleration
54.54 frames per second

-(~/src/other/SDL-1.3/test:$)-> ./testsprite2 5000
475.58 frames per second

-(~/src/other/SDL-1.3/test:$)-> ./testsprite2 50000
48.73 frames per second

Tried all blend modes with the last one. All seem to work, and they
all run at the same speed. Scaling impacts the frame rate as expected
(bigger sprites!), but no more.

Some further observations with testsprite2:

Selecting fullscreen mode creates a borderless window, but doesn’t
seem to do anything else (input grabbing is no longer implied?) -
except eliminate the aforementioned black screen problem.

Noframe works, but does not avoid the black screen problem.

Vsync has no effect.

Multiple windows work fine. No significant performance impact. (That
is, N windows deliver pretty much 1/Nth of the frame rate with a
single window for any given number of sprites per window.)

Resizing seems to work. Provided it’s actually meant to scale the
sprites and everything with the window in testsprite2, that is.

(Kinda’ hard to tell how well things behave when moving and
resizing windows, as all I see is a black screen while I’m actually
doing it. :slight_smile:

The center, position, geometry and title options all seem to work
correctly.

BTW, no subtractive blending? Not sure it would be all that useful,
though… Alpha, additive and modulation pretty much covers it as far
as “normal” effects are concerned, I think. (Modulation can be used
to produce very similar looking effects, although you need to
"invert" the source colors first.)

Then again, subtractive is probably pretty much a copy/past job, if
you have additive already - and it’s hardly even that for OpenGL. :slight_smile:

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.

| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |

‘-- http://www.reologica.se - Rheology instrumentation --’


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

[…]

Xorg 6.8.2-r6
[…]
Well I have similar problems and I use fluxbox.
Which version of xorg do you use?
I have xorg-x11-7.0-r1

See above. :wink:

BTW, any interesting news in 7.x? (I see that the latest Gentoo ebuild
is 7.1… Haven’t been keeping up lately! :smiley: )

PS. I also tried afterstep and it had less of these problems.

I might try some other WMs later. However, it is actually fortunate in
a way that the KDE WM demonstrates the problem so clearly and
concistently. (No way to avoid it here!) Might make it a bit easier
to debug.

Just wondering, does anyone (Sam?) have any hints as to where to start
looking?

Note that SDL 1.2 doesn’t cause anything like this, at least not on my
system, nor do any other applications that I’ve used. This seems to
be strictly related to SDL 1.3.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --'On Wednesday 16 August 2006 23:51, Sami N??t?nen wrote:

[…]

Xorg 6.8.2-r6

[…]

Well I have similar problems and I use fluxbox.
Which version of xorg do you use?
I have xorg-x11-7.0-r1

See above. :wink:

Oh missed that one.

BTW, any interesting news in 7.x? (I see that the latest Gentoo
ebuild is 7.1… Haven’t been keeping up lately! :smiley: )

Well the whole stuff is now modularized and uses autotools.
7.1 has some ABI as well as API changes and current drivers (from NVidia
and ATI) doesn’t support that.

That new version will make composition etc much faster.
It also makes X over gl possible so it really is quite a waited upgrade.
Just need the driver. :frowning:

PS. I also tried afterstep and it had less of these problems.

I might try some other WMs later. However, it is actually fortunate
in a way that the KDE WM demonstrates the problem so clearly and
concistently. (No way to avoid it here!) Might make it a bit easier
to debug.

Just wondering, does anyone (Sam?) have any hints as to where to
start looking?

Note that SDL 1.2 doesn’t cause anything like this, at least not on
my system, nor do any other applications that I’ve used. This seems
to be strictly related to SDL 1.3.

Same for me. Now the problem have started to follow certain pattern when
I disabled composition from my config. I is quite useless anyway until
the driver upgrade.On Thursday 17 August 2006 01:15, David Olofson wrote:

On Wednesday 16 August 2006 23:51, Sami N??t?nen wrote:

[…]

BTW, any interesting news in 7.x? (I see that the latest Gentoo
ebuild is 7.1… Haven’t been keeping up lately! :smiley: )

Well the whole stuff is now modularized and uses autotools.
7.1 has some ABI as well as API changes and current drivers (from
NVidia and ATI) doesn’t support that.

That new version will make composition etc much faster.
It also makes X over gl possible so it really is quite a waited
upgrade.

Sounds promising.

Just need the driver. :frowning:

DOH!

[…]

Note that SDL 1.2 doesn’t cause anything like this, at least not
on my system, nor do any other applications that I’ve used. This
seems to be strictly related to SDL 1.3.

Same for me. Now the problem have started to follow certain pattern
when I disabled composition from my config. I is quite useless
anyway until the driver upgrade.

Uh oh… Well, there is still something different with SDL 1.3,
compared to pretty much everything else, but trying some different
Xorg configurations might be a quick way of homing in on the problem.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --'On Thursday 17 August 2006 00:40, Sami N??t?nen wrote:

Well, my config isn’t that different from yours, but hey. I get the same
problem in Gnome 2.14.2 under Xorg 7.0 (nvidia drivers 1.0.8178), also on
Gentoo/AMD64. I tried both 64-bit and 32-bit builds, both have the
problem.

What I get: Focusing an SDL 1.3 window causes the entire screen to go
black (except for the cursor), defocusing (alt-tab/minimize/clicking
another window) makes everything come back. The SDL window seems to work
fine when it’s not focused. When the SDL window has focus, I can still
interact with it and other windows, move them around etc, and the mouse
cursor changes depending on what’s behind it, I just can’t see anything.

  • GerryOn Thu, 17 Aug 2006 00:49:13 +0200, David Olofson wrote:

Uh oh… Well, there is still something different with SDL 1.3,
compared to pretty much everything else, but trying some different
Xorg configurations might be a quick way of homing in on the problem.

Uh oh… Well, there is still something different with SDL 1.3,
compared to pretty much everything else, but trying some different
Xorg configurations might be a quick way of homing in on the
problem.

Well, my config isn’t that different from yours, but hey. I get the
same problem in Gnome 2.14.2 under Xorg 7.0 (nvidia drivers
1.0.8178), also on Gentoo/AMD64. I tried both 64-bit and 32-bit
builds, both have the problem.

Ok…

What I get: Focusing an SDL 1.3 window causes the entire screen to
go black (except for the cursor), defocusing
(alt-tab/minimize/clicking another window) makes everything come
back. The SDL window seems to work fine when it’s not focused.
When the SDL window has focus, I can still interact with it and
other windows, move them around etc, and the mouse cursor changes
depending on what’s behind it, I just can’t see anything.

Exactly what I get here.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --'On Thursday 17 August 2006 01:50, Gerry JJ wrote:

On Thu, 17 Aug 2006 00:49:13 +0200, David Olofson <@David_Olofson> wrote:

Uh oh… Well, there is still something different with SDL 1.3,
compared to pretty much everything else, but trying some
different Xorg configurations might be a quick way of homing in
on the problem.

Well, my config isn’t that different from yours, but hey. I get
the same problem in Gnome 2.14.2 under Xorg 7.0 (nvidia drivers
1.0.8178), also on Gentoo/AMD64. I tried both 64-bit and 32-bit
builds, both have the problem.

Ok…

Oh And I forget to say that I have P4 and Gentoo as well.
nvidia-drivers-1.0.8762-r1
fluxbox-0.9.14-r1
xorg-server-1.0.2-r7 (Xorg 7.0)
libX11-1.0.3

What I get: Focusing an SDL 1.3 window causes the entire screen to
go black (except for the cursor), defocusing
(alt-tab/minimize/clicking another window) makes everything come
back. The SDL window seems to work fine when it’s not focused.
When the SDL window has focus, I can still interact with it and
other windows, move them around etc, and the mouse cursor changes
depending on what’s behind it, I just can’t see anything.

Exactly what I get here.

I can give the focus to the SDL window and after I move the cursor out
of the SDL window everything is just as it should be, but I don’t use
autofocus, so that explanes the difference.
Is there anybody here that has experienced this problem with a none
Gentoo system?On Thursday 17 August 2006 02:55, David Olofson wrote:

On Thursday 17 August 2006 01:50, Gerry JJ wrote:

On Thu, 17 Aug 2006 00:49:13 +0200, David Olofson wrote:

I now tested with KDE and even if I have clicktofocus the behavior is
exactly the same as yours. The only difference to fluxbox is that it is
not enough to move the mouse from the SDL window, but I have to get the
focus out of the SDL window.On Thursday 17 August 2006 13:20, Sami N??t?nen wrote:

On Thursday 17 August 2006 02:55, David Olofson wrote:

On Thursday 17 August 2006 01:50, Gerry JJ wrote:

On Thu, 17 Aug 2006 00:49:13 +0200, David Olofson

What I get: Focusing an SDL 1.3 window causes the entire screen
to go black (except for the cursor), defocusing
(alt-tab/minimize/clicking another window) makes everything come
back. The SDL window seems to work fine when it’s not focused.
When the SDL window has focus, I can still interact with it and
other windows, move them around etc, and the mouse cursor changes
depending on what’s behind it, I just can’t see anything.

Exactly what I get here.

I can give the focus to the SDL window and after I move the cursor
out of the SDL window everything is just as it should be, but I don’t
use autofocus, so that explanes the difference.
Is there anybody here that has experienced this problem with a none
Gentoo system?