Announcement

Collapse
No announcement yet.

Port fglrx openGL stack to Gallium3D

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Port fglrx openGL stack to Gallium3D

    With OSS ATI drivers moving to the Gallium3D architecture in the medium/long term, could the fglrx openGL/openCL stack be ported over to become a Gallium3D state tracker and released as a BLOB?

    While this would certainly require a large initial cost in time and resources, in the long run would have a lot of benefits. Firstly it would help reduce the massive duplication of code in having two drivers. It would also allow for the proprietary code to have a stable ABI to work with as oppose to constantly chasing the kernel and xorg unstable ABIs. This in turn could also enable AMD to concentrate development on the OSS drivers. In addition, having a advanced openGL state tracker would be a big benefit to other gallium drivers such as nouveau.

    So what do you think? Could we build the cathedral on top of the bazaar?

  • #2
    Fglrx already uses a framework similar to G3D internally. They wouldn't gain much from switching over. They could re-use G3Ds state trackers... but they already have their own, so why replace them?

    Switching to G3D might make sense if AMD could use G3D for both their linux and their windows drivers. But I doubt that's going to happen soon, G3D isn't mature enough yet. But even if it was, I'm sceptical that the initial costs would ever pay off.

    Besides, G3D doesn't magically solve the problem of kernel and xorg ABIs.


    There's quite a few people at AMD that know way more about their drivers, their customers and their markets than we do. If it would solve their problems, they'd already be doing it

    Comment


    • #3
      Fglrx already uses a framework similar to G3D internally. They wouldn't gain much from switching over. They could re-use G3Ds state trackers... but they already have their own, so why replace them?
      You have what I mean backwards, port the openGL part to G3D and drop the hardware specific part. So the new graphics stack would have fglrx openGL state tracker and OSS G3D driver

      Fglrx already uses a framework similar to G3D internally
      If they already use something similar to G3D to separate the cross-platform code, then I could see that as being an issue as it would interfere with the Windows and OSX drivers. Having G3D drivers across all platforms would be really cool but I doubt AMD would have the much of a reason to do it in the foreseeable future.

      But I doubt that's going to happen soon, G3D isn't mature enough yet
      Im thinking at least a year or two down the line considering the current G3D drivers are still quite early in development anyway

      Besides, G3D doesn't magically solve the problem of kernel and xorg ABIs
      If the fglrx devs were only working on the state tracker they would only have to deal with the G3D ABI.

      There's quite a few people at AMD that know way more about their drivers, their customers and their markets than we do. If it would solve their problems, they'd already be doing it
      Didn't mean to come across as arrogant or anything, your entirely correct in what you say. I'm just curious from a hypothetical perspective if the above approach would be feasible.

      Comment


      • #4
        Originally posted by cobalt View Post
        You have what I mean backwards, port the openGL part to G3D and drop the hardware specific part. So the new graphics stack would have fglrx openGL state tracker and OSS G3D driver
        G3D already has a functional OpenGL 2.x state tracker, and will hopefully soon have OpenGL 3.x and OpenCL 1.0 state trackers. What is missing, assuming you are using a r600|r700|evergreen variant, is the G3D hardware driver. I am under the impression that this work has already started, but is living in a separate branch that is not ready for end users. If you are however using a r300|r400|r500 variant, the hardware driver sits in the mainline code, and is maturing rapidly.

        AMD has stated multiple times on these forums that they have no intention of releasing the source code for FGLRX due to legal issues related to DRM. They have also stated that they have no intention of releasing a binary hardware driver for G3D, preferring a FOSS solution instead.

        If you are using a r600|r700|evergreen based card, your best bet is to use either FGLRX, or the classic Mesa driver for your 3D needs. FGLRX now supports OpenGL 3.3/4.0 if you want the most out of your card. The classic Mesa driver only supports OpenGL 2.0, but is an excellent option if you require a FOSS solution.

        If you are using a r300|r400|r500 based card, your best bet is to use either the classic Mesa driver or the G3D driver. Both of these drivers are fairly mature, and should provide the majority of the features that you will need. If you are running a supported kernel and xorg, you can try running the last version of FGLRX that supported these chips, 9.3.

        Comment


        • #5
          Originally posted by cobalt View Post
          With OSS ATI drivers moving to the Gallium3D architecture in the medium/long term, could the fglrx openGL/openCL stack be ported over to become a Gallium3D state tracker and released as a BLOB?
          I don't see how this could ever work. The Gallium3D driver interface is a pretty fast moving beast, with API changes every week (one was just 15 hours ago), that means everything proprietary relying on this interface would need to be fixed too so that it works with the latest version. A non-blob might work though.

          A much better plan would be to replace Gallium3D with the fglrx driver stack entirely, but that's just as crazy as the former idea.

          Comment


          • #6
            Yeah, I don't see how this would work either. We already have a hardware layer abstraction that supports OpenGL 4.0, OpenCL etc., and have years of performance tuning invested in it. As marek said, the kernel and xorg APIs are probably always going to be a lot more stable than the Gallium3D API, for the simple reason that new userspace APIs are going to come along more often than the kernel and/or X see major design changes.

            I'm not sure how having a second state tracker (fglrx + mesa) would help either.

            In many ways running the fglrx 3D userspace driver over the open source kernel driver would be less work *and* more useful. Even that would be a *lot* of work, however, since the memory management abstractions are quite different.

            I guess the key point here is that the *current* Gallium3D implementation (and API) is probably going to need significant changes before it can support GL 4.0 and OpenCL. That doesn't mean it's not still a Good Thing, just that it's not likely to be the free (or at least cheap) lunch you might hope for.
            Test signature

            Comment


            • #7
              I guess the key point here is that the developers are saying "the cool new stuff users want to see is going to come after we move to Gallium3D", but sometimes that is being interpreted as "Gallium3D gives us all this stuff for free", rather than "the developers generally think the Gallium3D architecture is the right place to invest their time, so they're going to try to move to Gallium3D early rather than adding a bunch of features to the classic HW driver and *then* moving to Gallium3D and abandoning the code they just enhanced.

              Sorry about the long sentence

              We are doing new HW support on the classic HW driver model but that doesn't require a big investment in *improving* the driver code, just adding new paths to the existing code.
              Test signature

              Comment


              • #8
                i dont wanna be rude or anything but i think port fglrx 3d part to g3d even will be a pain in the ass for both parties. lets face it fglrx 3d stack is very far from been optimal to begin with, let's no talk about stability and compatibility(i know is shared code and some ppl work hard to make it better, but well). what possible benefit you can get from that stack? and how many and i mean time of bugfixing you think will require from part of AMD to polish that mess, if even today in their own stack is that bugged (i know wine issues are both parties faults and using very old kernel/xorg helps too, and passing a number of parameters to the kernel boot process you can even get something that works semi decently, but the point is im not supposed to do all that in a commertial product, especially since i payed 600$ for my gfx's).

                now on the other hand the OSS 3d stack is getting very rock solid and stable and everyday you discover something new working very cool, really im not having any issues in anything using mesa since really long time ago.

                lol, im using the latest git code around, the latest kernel code available, lol even the unstable kms/drm branches in all my amd gfx pc and amazingly i never have more than 1% or less of the issues i've been having with the latest fglrx, that tell you something you know. i know some stuff is missing and some native games dont work just yet, well hon and nexuiz are actually quite good in mesa 7.9 but well you get the idea. actually for average joe desktop use the oss driver is ligth years superior to fglrx already (i meant fast 2d render, web browsing, basic 3d stuff, some games like nexuiz or hon(playable not fps king) and an excelent compiz/kwin composite experience).

                now i agree OSS is in heavy developemnt and g3d is wip so we dont have a fully featured stable driver to compare with, but the solution is not port fglrx mess to oss, the solution is give time to the OSS new stack to get feature parity (not that far away, mesa 7.9 is getting really close to support GL 2.1, which basically what you need for everything for now) and mesa 8.0 probably will bring GL3 or stack optimization or both

                now about wine, well i've foreseen that wine will work better with mesa/nvidia blob before it works well with fglrx (actually wine 2d apps like adobe cs4 suite works like a charm with the OSS driver unlike fglrx), well i actually dont blame the wine project cuz well mesa was in very bad shape until the new stack in recent versions and well fglrx is barely usable since not too long ago, so the only available "workable" solution was nvidia, lol if my employee's threated me to resign if we dont drop support for AMD linux, and we were only trying to add some basic telemetry 3d representations of geological/petroleum data (which is supposed to be a "simple" task, at least compared to real 3d complex stuff) i dont wanna imagine how should be with something so massive like write an entire emulation layer for DX9/10 in opengl.

                maybe in Q2 or Q3 of 2011, we should have a feature wise graphic stack, not the fastest but good enough until optimization come in play aka GL 2.1/3.3, opencl tracker and better or optimal PM in the OSS stack.

                about bluray and drm crap around, well that is surprisingly easy to hack from the hdmi part to the codec encrypt, so non an issue in any os actually and well stuff like dxt3 and blah blah, that can be easily hacked without much trouble and having opencl 1.0 working, i think devs wouldnt even need to know how the gfx do it in C, they can just create an equivalent directly in opencl and make it a plugin legal limbo

                about UVD, well having an opencl tracker, i dont see the need of it anymore, just accelarating the codec in ffmpeg/theora/etc and XV should be enough to anything you need

                so by that time AMD can drop or worry less about radeon cards and focus fglrx entirely on firegl cards, wich i think is the best solution we can both have aka superb OSS driver for mainstream and super closed driver for the drm junkies with the big $$$ cards

                Comment


                • #9
                  mm hate limit and edit stuff arggh

                  btw guy outstanding job in the OSS driver, now even my lolgfx in my laptop can play flash video fullscreen under kwin composite perfectly fluid using yesterday mesa git +1, i love ya

                  Comment


                  • #10
                    Originally posted by jrch2k8 View Post
                    lets face it fglrx 3d stack is very far from been optimal to begin with
                    Let's face it, fglrx stack is 10 times larger project than OSS graphics driver stack if not more (and probably larger than kernel), is better in pretty much every aspect (not counting the little regressions which make users so angry), and has tons and tons of great features Gallium will slowly be picking up throughout the following years. I mean if they made it open source, there would no longer be a need to develop drivers in Mesa anymore, those little fglrx regressions and other deficiencies would get fixed by the community, and open source graphics would jump from GL2.1 and no OpenCL to GL4.0 and working OpenCL with an advanced shader compiler and optimizer, memory manager, and whatnot. And Mesa/Gallium would slowly die because no one would care about it anymore.... that's how I see it.

                    Comment

                    Working...
                    X