Slashdot Mirror


PI Releases DRI to XF86

Frank LaMonica of Precision Insight wrote in to say that they have released the code to their Direct Rendering Infrastructure to the XF86 project. I saw this thing in action at LinuxExpo- very smooth quakin' going on. This is a great step in the right direction of having a fast standard 3D desktop under X. Works with Mesa's GL, and SGIs GLX.

14 of 74 comments (clear)

  1. Re:What about GGI/KGI? by Izaak · · Score: 3
    I don't understand what this 'waste of resources' is, running X to access 3D acceleration for full-screen games. Certainly it's true that the full power of X is not going to be used in this situation, but the DRI that Precision Insight (thanks!) has released will impose almost zero (or maybe exactly zero) overhead on the application once it is running.

    My experience has been that X does impose a small performance hit on 3d rendering. This may just be the specific driver implementations and not something inherent in X, I don't know for certain. I do suspect that the network transparent nature of X, while adding wonderful flexibility, sacrifices some of the speed you can get by having an API that talks directly to the metal. I'll need to learn more about PI's DRI before I form an oppinion.

    My main gripe, however, is with the memory that X soaks up, especially when you are running a decent window manager and/or desktop environment. Not a big deal if you are running latest and greates hardware, but I would like to write games that scale down to older hardware.

    From a philosophical standpoint, I think graphics acceleration should be handled with an abstraction layer / API that sits right on top the hardware and then the windowing system sits on top of that. Graphics can then be accessed by both X and non-X apps.

    GGI does this, and in fact goes a step farther. X itself can be used as a visual target by GGI apps. GGI can sit both under and on top of X, and apps transparently figure out what enviroment they are running in. When I run my game engine, for example, GGI automatically figures out if I am in X windows or on the console and loads the correct visual target automatically. I did not have to write code for this, it is a built in part of GGI's functionality.

    I guess what I am saying here is that, from an architectural standpoint, GGI rocks. It is designed to be very portable and flexible. Writing GGI apps is a breeze (much easier than DirectX in my oppinion). I encourage anyone writing highly graphical apps (such as games) to check it out.

    Thad

  2. Re:Nvidia? by Jburkholder · · Score: 2

    I think if you go to the www.nvidia.com site there is a faq, probably be able to find a mailing list from there, I would suspect.

  3. 3d window managers? by quinine · · Score: 2

    Does this mean I'll finally get to use a version of enlightenment that lets me push and pull windows further and closer to me?

    1. Re:3d window managers? by jandrese · · Score: 2

      Quite possibly. You might even be able to spin a window around while working on it.

      The problem is your input device. Mice are horrible 3D navigation tools, and using a combination of mouse/keyboard to navigate your desktop probabally won't go over that well. Besides, who really needs a 3D destop anyway? :)

      --

      I read the internet for the articles.
    2. Re:3d window managers? by Fizgig · · Score: 2

      I don't think so, at least not this way. For you to do something like that with OpenGL you would have to have a lot of memory. You would of course have to have just as much memory for the actual screen display (1024x768x24bits or whatever) plus each window would have to be a tecture (a very finely detailed one at that). So each window would have to be in memory twice. Then there's all that other stuff, like Z-buffer, that I think takes up memory but I don't know anything about. I recall reading something a year ago or so explaining how we were orders of magnitude of memory away from having working 3d desktops. Of course, we probably do have orders of magnitude more memory now. That SGI thing, on the other hand, doesn't look like a conventional window manager, so who knows how they implement that.

  4. Tip of the, er, hat to Red Hat by jslag · · Score: 2

    Everyone notice the blurb on PI's website thanking Red Hat for funding the DRI project? I'm not normally a big Red hat booster - Debian is more compatible with my preferences - but I have to admit that funding this kind of work is a very Good Thing for linux, and I think it's important that Red Hat gets some recognition for their positive contributions. This is the plus side of having more big-business (read: money) involvement in Linux.

  5. Re:What about GGI/KGI? by Izaak · · Score: 2
    Good question. I would like to see 3d accel for full screen / non X targets. Being forced to run X to access 3d acceleration seems like a waste of resources when all you want to do is play kickass fullscreen video games. The ggi3d project seems to be making progress (thankyou Jon) and hopefully these open source drivers will help. After I finish my ggi2d accel contributions, I might rejoin the ggi3d effort.

    The recent contributions from video hardware vendors really has me stoked. Linux now has the potential to be a killer gaming platform... and I will be able to totally dump windows. :-)

    Thad

  6. Re:What about GGI/KGI? by Allen+Akin · · Score: 2
    From a philosophical standpoint, I think graphics acceleration should be handled with an abstraction layer / API that sits right on top the hardware and then the windowing system sits on top of that.

    Just a general note about something that's not well-understood outside the OpenGL community: OpenGL is a hardware abstraction API that's designed to be the lowest-level interface to graphics hardware. It might seem large compared to common 2D APIs, but in fact it barely covers the hardware functionality available on PC graphics cards that will be shipping by the end of this year. (In fact, in a number of cases it has already been necessary to extend the API to cover special features in existing hardware.)

    The DRI is intended to give OpenGL direct access to hardware that also supports X, without the overhead of another driver interface layer. If one were to attempt to create such a layer, it would necessarily be about as large and complex as OpenGL, and that's not a win with respect to software development effort or performance.

    Of course it is possible to use OpenGL without X. In such a case you might not need a DRI, because OpenGL might be the native graphics interface. That's beyond the scope of current projects, but might be quite reasonable for a future project (putting Linux and OpenGL onto a console-class machine, for example).

    In the meantime, Precision Insight's DRI is intended to solve the specific problem of providing high-performance OpenGL without compromising compatibility with X. The end result should be excellent -- not only will it be possible to play OpenGL-based games like Q3A, but it will be practical to use OpenGL to accelerate graphics operations that have no support in X today. (Consider using OpenGL hardware-accelerated alpha blending, stencilling, and texturing in Enlightenment.)

    Allen
    (Former OpenGL guy at SGI, now project advisor at Precision Insight)

  7. Re:FBDev/XF86_FBDev and OGL accelerated X by Izaak · · Score: 2
    I've actually been itching to upgrade my primary workstation to kernel 2.2 so I can play with fbdev. I haven't been willing to do it while I'm in the middle of a book project; I can't afford the downtime. The project is almost finished, though, so I should be on 2.2 before the month is out. Then I will start playing with 2d acceleration under fbdev.

    Ah, the joys of hacking on linux code! :-)

    Thad

  8. Re:2D vs 3D on Unix by Izaak · · Score: 2
    But I have a question about 2D graphics on X. Is their any good (open) API for doing 2D graphics (and imaging) on X ? X iteself is rather basic in it's functionalities, and is painfully slooooooowwwwww.

    This might not be the answer you are looking for, but I've been working with accelerated 2d graphics under GGI, and I have been very impressed with the speed of the X target. I am getting about 12 frames per second with my diablo-style game engine. Each frame draws about 400+ transparent blit operations with an average image size of about 50x30 with a 16 bit color depth. Note that this is without using any true hardware acceleration, just direct video memory writes and some page flipping to keep the animation smooth. The trick is to hold your images in non-visible video memory and transfer it directly from there to the screen (much faster than hitting the bus). Add hardware accelerating blit to the equation, and the animation should be scorchingly fast (I predict in the 60-80 frames per second range).

    The side benefit to using GGI is that apps will run both in an X window as well as in fullscreen mode. Interestingly, running unaccelerated fullscreen is only a little faster than running under X (13 frames per second). That should improve as the 2d blit code comes along.

    Thad

  9. Re:Nvidia? by Jburkholder · · Score: 2

    >write a 2D driver for the new XFree86 architecture. As far as I know, this hasn't happened with any of the Riva stuff yet.

    You're talking about the XF86 4.0 architecture, right? The current 3.3.1 stuff has plenty of good support for nVidia, I used to run a Riva 128 and recently swapped in a TNT2 and the 2D X server is great.

    BTW, there is a development Mesa/GLX for nVidia project underway (was mentioned in /. a couple weeks ago). Looks like this is moving forward at a pretty good pace. :-)

  10. Re:Nvidia? by Jburkholder · · Score: 2

    > The current 3.3.1

    ACK! Meant to say 3.3.3.1 - of course :-/

  11. Quick status report requested... by GianfrancoZola · · Score: 2

    As long as the discussion is focused on X, 3D, and video cards and such, I'd like someone to help me get back up to speed on some things.

    I definitely don't want this to turn into a chipset war, but a fast summary of who's making what, whose drivers are being open sourced or will be (3dfx, nVidia, Matrox, etc.), the state of 2D support and potential for 3D would be very helpful.

    Mostly because I'm budgeting for a new system later this summer (granted, the pace of things may make forecasts difficult) and I'd like something rock-solid under 2D and hopefully with a bright future as far as 3D is concerned.

    Thanks for any offerings.

    1. Re:Quick status report requested... by bapper · · Score: 2
      I definitely don't want this to turn into a chipset war, but a fast summary of who's making what, whose drivers are being open sourced or will be (3dfx, nVidia, Matrox, etc.), the state of 2D support and potential for 3D would be very helpful.

      nVidia seems to be committed to supplying an XFree86 server, not just binary but also source. At this point they have a server that will do 16bit color with hardware accellerated GLX (no direct rendering yet). There is also a very good Matrox G200 GLX XFree86 server where most new development is happening. The nVidia server is based on the work done with the G200 server. DMA support is being added right now and will make the transition to PI's DRI smoother (John Carmack has been doing a lot of the DMA work for the G200). As soon as we can squeeze Intel for more AGP info we'll be able to take advantage of AGP texturing as well. At this point there is no support for any of AGP's enhanced features, it is just another PCI interface as far as the driver is concerned.

      As for other cards, you can probably expect support for any new nVidia cards and the new Matrox G400 as well. It would be nice if 3DLabs showed some support for the Permedia 3, I think all they have given XFree86 is the 2D specs, no 3D. We'll see how things pan out in the next 6 months, there is definately growing support from a number of manufacturers.

      --

      -BAPper