This patch seems similar to glSDL where it wraps SDL's 2d API to OpenGL. The good thing about this it can provide acceleration and not require root like DGA. The bad thing with this idea is that it can't be used on older video cards or even some newer ones that lack proper direct rendering. Am I correct that even when just doing depth conversions, without direct rendering it will still be slow?
Perhaps I should clarify some misunderstandings that some people have. (I hope I explain it correctly) Basicly DirectDraw provides a mechanism to directly access the framebuffer of the videocard. This is the fastest way to render 2D images on the screen. Games like StarCraft, Total Annihilation, C&C and lots of others use DirectDraw in this way. Second there's another class of games like Age Of Empires2, Heroes of Might and Magic IV and others which mix ddraw with GDI. They for instance render a image using ddraw and then use GetDC/ReleaseDC to get a device context so that they can draw in the surface. (directly into the video memory)
In case of X direct framebuffer access is only possible through DGA but it is unsecure and has other issues. When DGA works correctly it can accelerate games like StarCraft. Further DGA doesn't have any depth conversion issues as it does depth switching. Without DGA the rendering operations need to go through X. Because of limitations of X, depth conversion problems appear when the depth of the desktop and X aren't the same.
For depth conversion purposes Wine's DirectDraw uses a DIB section. Basicly all pixels of an image are translated to the depth of X. This is slow and especially for the case when the application requests 8bit paletted mode using a 24bit desktop. In this case a color lookup needs to happen in a palette for each pixel. The end result is then shown on the screen (if the game is of the StarCraft type)
Games that use GetDC/ReleaseDC can't work using DGA. The performance in general isn't great as lots of X calls happen. (things like conversions from XPixmap to XImages and the way around and also depth conversions happen a lot)
The patch I sent works for both classes of games though it won't help much for the second class as GetDC/ReleaseDC stuff is slow. As explained before the patch uploads the surface to a texture which is then rendered using OpenGL. This is quite fast and as a bonus the videocard can do all depth conversion for us as it isn't limited to rendering textures which are at the same depth as X.
For old videocards the GL renderer won't work and the old code should work fine (except for performance issues). You might have heard people talking about a 'dibengine' which would let Wine do all DIB related operations in software which would save a lot of XImage/XPixmap conversions. (conversion is only needed for the final rendering stage) This dibengine would mainly accelerate games that use GetDC/ReleaseDC. It won't help games like StarCraft (much) as for those DIBs were only used for depth conversion and the conversion algorithm stays the same (it can't be tweaked much if at all). So there's not really a way to speedup games like StarCraft for old videocards. Perhaps XShm might be of use but not sure how much it would help. (think it would only be usefull for GetDC/ReleaseDC games)
Roderick
Roderick Colenbrander wrote:
For old videocards the GL renderer won't work and the
The current state of open source video drivers for Linux is as far as I know that they only do basic 2D. For 3D you have to use closed-source drivers, which is simply not an option for a lot of people, be that because of stability, compatability or other issues.
Which means that your patch only helps the select few that are using closed-source video drivers, is that correct?
For everybody else, your patch will mean a tremendous slowdown instead, is that correct?
old code should work fine (except for performance issues).
I've never had a performance issue with Starcraft under (recent) Wine, so I don't think improving Starcraft performance is a very good argument. Better to promote other apps from http://appdb.winehq.org/votestats.php that actually run sluggish? Just MHO.
That said, I *will* test your patch when I get home ;-).
On 12/15/05, Molle Bestefich molle.bestefich@gmail.com wrote:
Roderick Colenbrander wrote:
For old videocards the GL renderer won't work and the
The current state of open source video drivers for Linux is as far as I know that they only do basic 2D. For 3D you have to use closed-source drivers, which is simply not an option for a lot of people, be that because of stability, compatability or other issues.
Which means that your patch only helps the select few that are using closed-source video drivers, is that correct?
For everybody else, your patch will mean a tremendous slowdown instead, is that correct?
I have 3D acceleration in open source using DRI. This patch will help us too.
old code should work fine (except for performance issues).
I've never had a performance issue with Starcraft under (recent) Wine, so I don't think improving Starcraft performance is a very good argument. Better to promote other apps from http://appdb.winehq.org/votestats.php that actually run sluggish? Just MHO.
That said, I *will* test your patch when I get home ;-).
Both computers have gotten faster and Wine has probably improved in performance (Like in Dsound) to make Starcraft faster. Even though Starcraft has gotten faster, technically, Starcraft still has the software depth conversion bottleneck. It will continue to be like this until we get rootless DGA or OpenGL handles the 2D.
That said, it does seem that most other 2D games I've tried seem sluggish besides Starcraft.
Jesse Allen wrote:
The current state of open source video drivers for Linux is as far as I know that they only do basic 2D. For 3D you have to use closed-source drivers, which is simply not an option for a lot of people, be that because of stability, compatability or other issues.
Which means that your patch only helps the select few that are using closed-source video drivers, is that correct?
For everybody else, your patch will mean a tremendous slowdown instead, is that correct?
I have 3D acceleration in open source using DRI. This patch will help us too.
I wonder who "us" is :-). What hardware do you have?
I've got ATI and the fglrx driver works like fixing a wristclock with a large brick works. Not good. So I'm on the open source wagon. I imagine that lots of other people are using OS drivers too. Does anyone have a good overview of how many of the more popular OS video drivers actually implement enough 3D for the patch to be a Good Thing?
The patch is fine and all, but if I'm right and there's a lot of people using OS drivers that doesn't support the features needed (thus making performance worse), this patch should be optional and not replace the current working stuff..
.02 €/£/$/¥
On 12/15/05, Molle Bestefich molle.bestefich@gmail.com wrote:
Jesse Allen wrote:
The current state of open source video drivers for Linux is as far as I know that they only do basic 2D. For 3D you have to use closed-source drivers, which is simply not an option for a lot of people, be that because of stability, compatability or other issues.
Which means that your patch only helps the select few that are using closed-source video drivers, is that correct?
For everybody else, your patch will mean a tremendous slowdown instead, is that correct?
I have 3D acceleration in open source using DRI. This patch will help us too.
I wonder who "us" is :-). What hardware do you have?
I've got ATI and the fglrx driver works like fixing a wristclock with a large brick works. Not good. So I'm on the open source wagon. I imagine that lots of other people are using OS drivers too. Does anyone have a good overview of how many of the more popular OS video drivers actually implement enough 3D for the patch to be a Good Thing?
I have Radeon 9200, using the r200 driver from dri.sourceforge.net. The r200 is good enough to play most all games. r300 works I hear, but not on my IGP X300. I do think OS drivers are the way to go so I hope to help the r300 project out in the the future.
I have no idea on fglrx, never used and don't plan to.
The patch is fine and all, but if I'm right and there's a lot of people using OS drivers that doesn't support the features needed (thus making performance worse), this patch should be optional and not replace the current working stuff..
.02 €/£/$/¥
I dunno, it is a legitimate complaint, but it is optional. I think the patch requires a registry setting to activate the Opengl depth conversion stuff.
Molle Bestefich schrieb:
The patch is fine and all, but if I'm right and there's a lot of people using OS drivers that doesn't support the features needed (thus making performance worse), this patch should be optional and not replace the current working stuff..
as far as I understood it this patch has no drawback for users without the needed OpenGL features. If your driver supports them, fine and things will speed up. Otherwise it's done the same way like before(with the same performance).
.02 €/£/$/¥
--- Ursprüngliche Nachricht --- Von: Molle Bestefich molle.bestefich@gmail.com An: Jesse Allen the3dfxdude@gmail.com Kopie: Roderick Colenbrander thunderbird2k@gmx.net, wine-devel@winehq.org Betreff: Re: DirectDraw over Direct3D Datum: Thu, 15 Dec 2005 20:03:32 +0100
Jesse Allen wrote:
The current state of open source video drivers for Linux is as far as I know that they only do basic 2D. For 3D you have to use closed-source drivers, which is simply not an option for a lot of people, be that because of stability, compatability or other issues.
Which means that your patch only helps the select few that are using closed-source video drivers, is that correct?
For everybody else, your patch will mean a tremendous slowdown instead, is that correct?
I have 3D acceleration in open source using DRI. This patch will help
us too.
I wonder who "us" is :-). What hardware do you have?
I've got ATI and the fglrx driver works like fixing a wristclock with a large brick works. Not good. So I'm on the open source wagon. I imagine that lots of other people are using OS drivers too. Does anyone have a good overview of how many of the more popular OS video drivers actually implement enough 3D for the patch to be a Good Thing?
The patch is fine and all, but if I'm right and there's a lot of people using OS drivers that doesn't support the features needed (thus making performance worse), this patch should be optional and not replace the current working stuff..
.02 /£/$/¥