Hi,
I was wondering if after XFree.4.0+DRI comes out,
we will be able to use DRI in order to get SDL windowed peformance which
is close to the hardware performance.
I am talking about modern card which are overlay capable.
(like TNT2 , ATI RAGE etc)
Under windoze for example this works already very well,
a software DVD player just works at the same great speed
in fullscreen or windowed mode either.
Unfortunately using SDL in a window is quite slow,
when looking at the CPU utilitzation, you can see that X is
copying around the data because all is done in software.
For example doing 640x480 in a window, you can forget to get
25fps for video playback or game playback, since most CPU is consumed
to copy around the data.
Is the overlay feature planned in SDL ?
But it would be nice to have a way to mmap() the video memory directly into
userspace mem of the app even while in windowed mode
(the app must do the clipping) or better implement into SDL a way
to use the blitter of the GFX card directly to copy data at maximum speed from
RAM to GFX mem.
Can anyone give me a pointer where to find the latest infos about the features
of the upcoming DGA 2.0.
(I heard that they will address some of these hw blitter issues)
regards,
Benno.
hi`
For example doing 640x480 in a window, you can forget to get
25fps for video playback or game playback, since most CPU is consumed
to copy around the data.
that is wrong. Copying 640x480x2 bytes is not worth mentioning! In real
life applications this is hardly noticeable.
But it would be nice to have a way to mmap() the video memory directly into
userspace mem of the app even while in windowed mode
isn’t that done using DGA? I don’t know anything about DGA, but I always
thought that this is the purpose of it…On Fri, 17 Dec 1999, Benno Senoner wrote:
–
Daniel Vogel
666 @ http://grafzahl.de
25fps for video playback or game playback, since most CPU is consumed
to copy around the data.
that is wrong. Copying 640x480x2 bytes is not worth mentioning! In real
life applications this is hardly noticeable.
While this might be true for just copying raw data, when you get
into transparent blits it becomes quite a different story.
I have found it to be very noticeable in both SDL and Xlib(using MIT SHM).
For example, I stopped using isometric background tiles just so I could
avoid the transparent blits from tiling the background.
When I transparently blit large objects into certain areas of the
scrolling “world”, if the player walks into that area the screen updates
become noticeably slower. (for example a large building)
I plan to fix this by integrating the non-walkable areas into the
background itself, which should dramatically help performance on the
larger objects.
I am using the SDL blit routines at this point.–
Brian
DRI will speed up 3D support, but not 2D. The GLX code that I am writing now
will support it. I believe 3D will be equally fast in a window and fullscreen.
hi`
25fps for video playback or game playback, since most CPU is consumed
to copy around the data.
that is wrong. Copying 640x480x2 bytes is not worth mentioning! In real
life applications this is hardly noticeable.
While this might be true for just copying raw data, when you get
into transparent blits it becomes quite a different story.
yes, if you use RLE transparent compression it gets even less noticeable

I have found it to be very noticeable in both SDL and Xlib(using MIT SHM).
For example, I stopped using isometric background tiles just so I could
avoid the transparent blits from tiling the background.
SDL has RLE blitters, right? Use them ;-)On Fri, 17 Dec 1999 hayward at slothmud.org wrote:
–
Daniel Vogel
666 @ http://grafzahl.de
Kenton Varda wrote:
DRI will speed up 3D support, but not 2D. The GLX code that I am writing now
will support it. I believe 3D will be equally fast in a window and fullscreen.
I don’t think it can be as fast in a window, with DRI; integration with
the X server will incur some overhead, according to Precision Insight,
despite the use of DMA buffers. In fullscreen mode there would be no
necessity.
MJP
I found you can pass SDL_RLEACCEL to SDL_SetColorKey(), but that is the
only reference to RLE blitting I could find anywhere.
- how do you create an image in SDL that is RLE encoded? I think it
might be done with SDL_ConvertSurface(), but I haven’t been able to find
the correct flags or fmt info to do it. Does anyone have a suggestion?
Thanks,
Brian Hayward>yes, if you use RLE transparent compression it gets even less noticeable

I have found it to be very noticeable in both SDL and Xlib(using MIT SHM).
For example, I stopped using isometric background tiles just so I could
avoid the transparent blits from tiling the background.
SDL has RLE blitters, right? Use them 
–
Daniel Vogel
666 @ http://grafzahl.de
hi`
For example doing 640x480 in a window, you can forget to get
25fps for video playback or game playback, since most CPU is consumed
to copy around the data.
that is wrong. Copying 640x480x2 bytes is not worth mentioning! In real
life applications this is hardly noticeable.
But it would be nice to have a way to mmap() the video memory directly into
userspace mem of the app even while in windowed mode
isn’t that done using DGA? I don’t know anything about DGA, but I always
thought that this is the purpose of it…
I can only say that looking at “top” runnnig the SDL demos at 512x512 windowed,
the X server consumes over 60% of the CPU.
My box is a Celeron366 + RIVA TNT2 …
the 512x512 demos (tunnel scrolling etc) get about 15fps , which is FAR away
from the hardware performance.
(I would say >factor 2-3)
Benno.On Fri, 17 Dec 1999, Daniel Vogel wrote:
On Fri, 17 Dec 1999, Benno Senoner wrote:
At least Daryll Strauss of PI and Alan Cox told me, that you can use the
overlay surface (like a texture bitmap for a 3d object) to speed up greatly
DVD playback for example.
I have too few knowledge in this field, but under windoze I can see this clearly
using a software DVD player:
almost the same performance in windowed mode as in fullscreen mode.
Why shouldn’t this be possible in Linux ?
Benno.On Fri, 17 Dec 1999, Kenton Varda wrote:
DRI will speed up 3D support, but not 2D. The GLX code that I am writing now
will support it. I believe 3D will be equally fast in a window and fullscreen.
Benno Senoner wrote:
DRI will speed up 3D support, but not 2D. The GLX code that I am writing now
will support it. I believe 3D will be equally fast in a window and fullscreen.
At least Daryll Strauss of PI and Alan Cox told me, that you can use the
overlay surface (like a texture bitmap for a 3d object) to speed up greatly
DVD playback for example.
I have too few knowledge in this field, but under windoze I can see this clearly
using a software DVD player:
almost the same performance in windowed mode as in fullscreen mode.
Why shouldn’t this be possible in Linux ?
It is; terms like “2D” and “3D” have little or no meaning. What is “2D
graphics” and what is “3D graphics”? If you are painting a block of
planar, orthogonally-viewed points to the screen in “2D graphics”, you
blit them. If you are doing the same thing in “3D graphics”, you
create a flat polygon and texture it. In other words, if DRI speeds up
GLX calls, it should provide a general speedup to any “2D graphics” if
they are layered over GLX. The architecture of the underlying “2D
graphics” code is significant.
MJP> On Fri, 17 Dec 1999, Kenton Varda wrote: