Announcement

Collapse
No announcement yet.

ATI R600g Gains Mip-Map, Face Culling Support

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

  • #41
    @Agrd,
    gallium is not like Direct3D at al. Not even remotely close.

    Gallium is not a driver, nor a 3D library. Gallium is a layer for modern GPU's. That layer is a sort of API. On top of that API functionality can be written, like OpenGL, OpenCL, DirectX, Glide, X.org, vector graphics acceleration, database crawlers, number crushers and whatever you can think of, which is why you _do NOT_ want fglrx take its place.
    Below that layer is a driver that exposes that Gallium API and _that_ is where the floss drivers kick in.

    Comment


    • #42
      Originally posted by V!NCENT View Post
      @Agrd,
      gallium is not like Direct3D at al. Not even remotely close.

      Below that layer is a driver that exposes that Gallium API and _that_ is where the floss drivers kick in.
      The Gallium API is very close to the Direct3D 10/11 API, especially the user-mode "DDI" API that Windows device drivers implement.

      If you actually look at it, you'll notice that Gallium functions essentially map 1:1 to Direct3D functions (e.g. pipe_context::create_rasterizer_state vs ID3D10Device::CreateRasterizerState).

      Of course there are some differences, and some features that one supports and the other doesn't, but the general structure is identical (unlike OpenGL, which is a completely different API).

      Comment


      • #43
        All good questions, although I've answered them all a few times before. Maybe I need to write a book

        Originally posted by V!NCENT View Post
        So Bridgman, if your fglrx team would have the same documentation (not counting DRM) as AMD is going to give to the public, how much of a performance decreas would we be talking about? Zero?
        Somewhere on the order of "a few percent", certainly less than 5%. The primary reason for the performance difference between proprietary and open driver stacks is that the proprietary drivers get maybe 50x the development resources because the work is shared across the entire PC market rather than being specific to one OS.

        Originally posted by Agdr View Post
        I'd like to thank you for engaging the community, but I find this reasoning quite puzzling. The only DRM that I can think of is the one related to the playback of BluRay and other HDCP protected media, and that surely doesn't impact the 3D driver. It seems you should be able to open source both fglrx and the Windows driver except for the video acceleration+DRM parts relatively easily.
        On the DRM side, the problem is that we have to protect not only the bits of code which are actually doing DRM-ey things (which are as small as you expect) but also all of the code *below* them (ie between that code and the hardware) in order to protect against attackers interposing code between the DRM-specific bits and the hardware.

        The 3D part of the driver uses all many of the same lower level bits (surface management, memory management, command submission etc..).

        Originally posted by Agdr View Post
        Besides, all video DRM seems completely cracked and BluRay releases seem widely available on public BitTorrent sites, so I don't think you could possibly make the situation worse for content producers.
        The problem is that IHVs (HW vendors like us) are required to meet specific standards of robustness rather than "not making things any worse than they already are", ie our DRM-related obligations do not go down if other parts of the DRM stack are broken. For better or for worse, that's how content providers ensure that DRM does not collapse into rubble as soon as the first big cracks start to appear.

        Originally posted by Agdr View Post
        The argument of wanting to keep the driver secret to not give a free gift to competitors seems instead much more understandable. Is this the real reason? However, opening some things like your AMD IL -> r600+ ISA compiler/optimizer shouldn't give any competitive advantage to Intel/nVidia since they use completely different non-VLIW architectures. It would be great and very interesting to have a much more detailed and accurate rationale for why you could or cannot open each component of fglrx/Catalyst.
        Yep, on the 3D side the reasons for not opening the code are more related to competition than to DRM. Two main issues :

        1. We regard our shader compiler technology as part of the "secret sauce" which allows us to use a VLIW hardware approach which, in turn, gives us advantages in performance vs transistor count / die size / cost.

        2. If you limit the discussion to our major competitor in the discrete GPU market, we both have roughly the same features and performance but I'm sure our code has clever ideas that our competitor doesn't have and that their code has clever ideas we don't have. If one competitor opens their code while the other does not, that tips the balance subtly (again, probably only a few percent but those few percent are worth a lot of $$).

        Originally posted by Agdr View Post
        And opening fglrx and your Windows driver would have several advantages:
        1. Having bugs actually fixed by third parties, or at least more detailed bug reports
        2. Rock solid Linux support and dominance of the Linux market (all Linux distributions and enthusiasts would be in the position to recommend buying ATI GPUs exclusively)
        3. More mindshare among commercial game programmers, resulting in games that work better on your hardware. This would be due to the obvious advantage of being able to find out exactly what the driver is spending CPU time on and look intimately at what 3D calls are being translated to and how the hardware actually works.
        4. Possibly getting commercial game developers to help you in tuning your drivers for their games (without needing cumbersome NDAs), resulting in better performance on your cards compared to competitors, especially in things like multi-GPU support
        Yep, there are definitely benefits, but again the number of outside developers who can *and* are likely to work on the drivers is sufficiently small that it's *really* hard to make the costs and benefits work out. We have driver developers with source access working side-by-side with outside ISV developers already so I *think* the largest potential area of gain from opening the driver is already covered.

        Opening code is about a thousand times as cumbersome as a source license agreement, and maybe 10 thousand times as cumbersome as an NDA

        Originally posted by Agdr View Post
        So, for parts of the driver where DRM, third party code, or competitive advantage concerns don't apply, I think you should consider opening the code (for both Linux and Windows).
        Yep, and that's what we are doing. It's just that the "parts of the driver where DRM, third party code, or competitive advantage concerns don't apply" are much smaller than you might think. The driver stack was not written with an eye to opening it, and so opening almost any part of it requires some refactoring to move out the sensitive stuff which doesn't *have* to be in that part of the code but which was put there anyways because it made the code simpler/cleaner/faster.

        I don't really see much chance of opening up the Windows parts of the code, but we would like to open up some more of the Linux-specific bits over time.

        Originally posted by rohcQaH View Post
        Try to imagine sifting through a few hundred thousand lines of fglrx code to determine if it contains any licensed code that mustn't be shared, uses any patents that aren't covered outside of fglrx or tells internals about the hardware which AMD wants to keep secret.
        Yep, and we're talking about >>10 million lines of code here.

        Originally posted by Agdr View Post
        I think it should take much less time to review code than to rewrite it from scratch, obviously, especially for very non-trivial parts like how to maximize utilization of the r600+ VLIW ALUs.
        Sure, but the whole point is that we are not rewriting it from scratch. The open source driver is not trying to duplicate fglrx, it's trying to be "<5% of the code size delivering 80-90% of the results", so the comparison is between inspecting and sanitizing the entire stack vs rewriting 5% of it.

        Originally posted by Agdr View Post
        As long as the open driver is separate from the primary driver, hardware will always be supported months late (e.g. no HD 5xxx 3D support almost a year after release!), and the driver won't be competitive for 3D gaming, which is definitely not a desirable outcome for users, and arguably not desirable for AMD either (unless other concerns are more important).
        Nope, you need to consider the "catch-up" work that has been happening, with community and AMD developer resources working first on getting support in place for older GPUs and second on bringing the open source graphics architecture up to date (KMS, GEM/TTM, Gallium3D) before working on the newest GPUs. Even Evergreen support work started well after launch because the devs were finishing off support for previous generations.

        Our goal is to be more or less caught up by the time the first Fusion parts start to ship, and from that point on I expect we should be able to start at least some of the open source support work before subsequent parts are launched.

        Our launch-time focus will still be on the proprietary drivers because the ability to share common code across 100% of the PC market is too useful to ignore, but everyone needs to avoid falling into the trap of believing that just because we restarted open source support in 2007 and worked in part on hardware dating back to 2000 that means we'll be stuck with that initial backlog forever.
        Test signature

        Comment


        • #44
          Originally posted by bridgman View Post
          All good questions, although I've answered them all a few times before. Maybe I need to write a book
          Thanks for your answers. A detailed FAQ would probably be helpful, maybe with a sticky post here pointing to it, so you could then just point people to it, and chastise them for not having read it beforehand

          Originally posted by bridgman View Post
          Somewhere on the order of "a few percent", certainly less than 5%. The primary reason for the performance difference between proprietary and open driver stacks is that the proprietary drivers get maybe 50x the development resources because the work is shared across the entire PC market rather than being specific to one OS.
          Yes, and that's why it would be nice to have all that work benefit the open driver at least partially, if it were somehow possible to arrange.

          Originally posted by bridgman View Post
          On the DRM side, the problem is that we have to protect not only the bits of code which are actually doing DRM-ey things (which are as small as you expect) but also all of the code *below* them (ie between that code and the hardware) in order to protect against attackers interposing code between the DRM-specific bits and the hardware.

          The 3D part of the driver uses all many of the same lower level bits (surface management, memory management, command submission etc..).
          OK, but what if you released both an open driver without the DRM, and a monolithic blob with DRM?

          This would only be a problem if contracts specifically said that the source code for any part of the whole driver including DRM cannot be publicly released (which seems pretty draconian, but I guess possible).

          Originally posted by bridgman View Post
          Yep, on the 3D side the reasons for not opening the code are more related to competition than to DRM. Two main issues :

          1. We regard our shader compiler technology as part of the "secret sauce" which allows us to use a VLIW hardware approach which, in turn, gives us advantages in performance vs transistor count / die size / cost.
          I thought the idea of nVidia or Intel moving to a VLIW architecture and taking advantage of your ideas/code was considered unrealistic, but evidently you don't, and might be right at that.

          Originally posted by bridgman View Post
          2. If you limit the discussion to our major competitor in the discrete GPU market, we both have roughly the same features and performance but I'm sure our code has clever ideas that our competitor doesn't have and that their code has clever ideas we don't have. If one competitor opens their code while the other does not, that tips the balance subtly (again, probably only a few percent but those few percent are worth a lot of $$).
          Yes, you would face the risk of an hypothetical slight loss of your competitive edge, which could be perhaps compensated by other advantages.

          Another theoretical option would be to attempt to make an agreement with nVidia to both open your drivers, although I suppose that is very unrealistic.

          Yep, there are definitely benefits, but again the number of outside developers who can *and* are likely to work on the drivers is sufficiently small that it's *really* hard to make the costs and benefits work out. We have driver developers with source access working side-by-side with outside ISV developers already so I *think* the largest potential area of gain from opening the driver is already covered.

          Opening code is about a thousand times as cumbersome as a source license agreement, and maybe 10 thousand times as cumbersome as an NDA
          It's more cumbersome for you, but much less cumbersome for third parties, which means you get more contributions and more developer mindshare. Of course whether this is significant is debatable.

          There is also the Linux market advantage, where a top performing open driver could possibly lead to near total dominance of the Linux enthusiast market, and workstations users might be influenced too once RHEL and other enterprise distribution start advertising better or exclusive support for ATI and Intel cards as opposed to nVidia ones (and the Intel ones are of course useless for the workstation market).

          Right now people seem to still buy nVidia cards for Linux use because the open drivers are not competitive and they either deem fglrx inferior to nvidia, or consider them equivalent and go nVidia for other reasons.
          An open fglrx might change this, and make ATI cards a must, while with the current strategy, this won't happen at least for a few years, if at all (i.e. not until Mesa supports the latest OpenGL release and performance is almost that of fglrx).

          Obviously it's a much smaller market than Windows, but being recommended by Linux users might somewhat affect the Windows market too, and the fact that Linux is likely more prevalent among developers and GPU compute users might increase its importance.

          Anyway, I guess you already analyzed this, and decided the possible gains would be lower than the risk of reducing your competitive advantage and the cost of the effort.

          Originally posted by bridgman View Post
          I don't really see much chance of opening up the Windows parts of the code, but we would like to open up some more of the Linux-specific bits over time.
          I think it would be nice to have the closed source 3D userspace optionally work with the open DRM driver, and an open X driver, enhancing them if necessary beforehand (possibly with Linux-specific code from fglrx if applicable).

          This should be doable (except possibly for the video DRM stuff, which I think you could just not support in this mode of operation), and would eliminate a lot of the major issues with a closed 3D driver like trouble with newer kernels and X servers, system crashes, security issues, kernel taint, and make it very easy to switch between fglrx and the Mesa/Gallium stack, and even use them side by side.
          It would be an unique advantage over nVidia and Nouveau and would also possibly allow you to eventually drop the kernel and X driver, and focus only on the proprietary OpenGL/OpenCL userspace.

          Comment


          • #45
            All good questions, although I've answered them all a few times before. Maybe I need to write a book
            Wikis are good for this sort of thing.



            @Agdr:

            ATI survives based on the superiority and competitiveness of their proprietary driver. Nvidia in the past almost killed them off back in the day because Nvidia came out with a new driver architecture that netted them as little as a 10-15% boost in performance on benchmarks and nobody in ATI is going to forget that.

            It's going to take a huge amount of effort to prove to ATI that spending resources on being open is the way to go. HUGE. This is something that I do not see happening any time this decade. Badgering poor Bridgeman is not going to make any difference.

            Hell, I expect a complete re-architecture from bottom to top of the PC architecture and the elimination of GPU as a discrete processor long before ATI or Nvidia will be convinced that their source code 'secret sauce' is not nearly as precious as they think it is.

            Comment


            • #46
              Originally posted by V!NCENT View Post
              @Agrd,
              gallium is not like Direct3D at al. Not even remotely close.

              Gallium is not a driver, nor a 3D library. Gallium is a layer for modern GPU's. That layer is a sort of API. On top of that API functionality can be written, like OpenGL, OpenCL, DirectX, Glide, X.org, vector graphics acceleration, database crawlers, number crushers and whatever you can think of, which is why you _do NOT_ want fglrx take its place.
              Below that layer is a driver that exposes that Gallium API and _that_ is where the floss drivers kick in.
              So it sounds more like DirectX than Direct3D (except that DirectX still handles lots of other stuff too than Gallium3D). DirectCompute on DirectX vs OpenCL on Gallium3D, Direct3D on DirectX vs OpenGL on Gallium3D etc.

              Comment


              • #47
                Originally posted by nanonyme View Post
                So it sounds more like DirectX than Direct3D (except that DirectX still handles lots of other stuff too than Gallium3D). DirectCompute on DirectX vs OpenCL on Gallium3D, Direct3D on DirectX vs OpenGL on Gallium3D etc.
                Wrong thinking. Direct3D in DirectX is like pipe_context in Gallium. DirectShow in DirectX is like pipe_video_context in Gallium. A 3D game engine atop DirectX is like OpenGL atop Gallium.

                Indeed, Gallium looks the same as Direct3D 10/11. There is even a comparison between the two APIs:

                Comment


                • #48
                  Originally posted by netkas View Post
                  it already can, but - shadows doesnt work, and screen rotatin on cube - all broken, but windows wobling
                  Ok, I meant (and should have written) how close is it to properly running Compiz?

                  Comment


                  • #49
                    Originally posted by Agdr View Post
                    OK, but what if you released both an open driver without the DRM, and a monolithic blob with DRM?
                    Removing DRM from the open driver wouldn't make any difference. An attacker would still be able to use the open code as a guide to attacking the blob.

                    Originally posted by Agdr View Post
                    This would only be a problem if contracts specifically said that the source code for any part of the whole driver including DRM cannot be publicly released (which seems pretty draconian, but I guess possible).
                    The contracts don't specifically require holdback of source code, but they require specific levels of robustness and immunity from attack which so far have not been achievable if source code is released.

                    Put differently, the contract doesn't say that you have to stay in the armoured car but it does say that you have to survive when everyone is shooting at you

                    Originally posted by Agdr View Post
                    I thought the idea of nVidia or Intel moving to a VLIW architecture and taking advantage of your ideas/code was considered unrealistic, but evidently you don't, and might be right at that.
                    Doesn't have to be an existing competitor. If we say "hey folks, here's everything you need to design & build your own GPU HW/SW without spending hundreds of milions on R&D" we might as well just shut the company down today. A new competitor would not be able to keep up with evolution in the high end of the market but they would easily be able to compete in the high volume portion of the market which actually pays for most of the ongoing R&D.

                    Originally posted by Agdr View Post
                    Yes, you would face the risk of an hypothetical slight loss of your competitive edge, which could be perhaps compensated by other advantages.
                    Yep, that's the core tradeoff. The problem is that the advantages are ephemeral and hard to quantify, while the costs and risks are very real and easy to quantify. The upside is that people might like us better and we might get some nice contributions. The downside is that we would be betting the company, or at least the graphics business, to a much greater extent than we are today.

                    Originally posted by Agdr View Post
                    Another theoretical option would be to attempt to make an agreement with nVidia to both open your drivers, although I suppose that is very unrealistic.
                    Talking with your competitors about anything these days brings an extraordinarily high risk of being hammered by government lawsuits. I don't think either of us would want to take that chance.

                    Originally posted by Agdr View Post
                    It's more cumbersome for you, but much less cumbersome for third parties, which means you get more contributions and more developer mindshare. Of course whether this is significant is debatable.
                    Yep, and again there's a cost trade-off -- is it cheaper to open the code and get a few contributions from outside than to work with our partners and implement the same contributions ourselves ? So far the numbers work out about 100:1 in favour of not opening the code.

                    Originally posted by Agdr View Post
                    There is also the Linux market advantage, where a top performing open driver could possibly lead to near total dominance of the Linux enthusiast market, and workstations users might be influenced too once RHEL and other enterprise distribution start advertising better or exclusive support for ATI and Intel cards as opposed to nVidia ones (and the Intel ones are of course useless for the workstation market).
                    Again, if we picked up 100% of the Linux enthusiast market it might make us enough money to cover the cost of the current open source work. Any chance of even "breaking even" would have to come from the workstation market.

                    Originally posted by Agdr View Post
                    Right now people seem to still buy nVidia cards for Linux use because the open drivers are not competitive and they either deem fglrx inferior to nvidia, or consider them equivalent and go nVidia for other reasons. An open fglrx might change this, and make ATI cards a must, while with the current strategy, this won't happen at least for a few years, if at all (i.e. not until Mesa supports the latest OpenGL release and performance is almost that of fglrx).
                    For reasons I don't fully understand, perception of driver quality has much less impact on hardware market share for Linux consumer users than you might expect. There has been a slight change over the last few years, coincident with supporting open source driver development and making massive improvements in the proprietary driver, but all indications are that the shift in Linux market share is actually *smaller* than the shift in Windows market share. Go figure.

                    Originally posted by Agdr View Post
                    Obviously it's a much smaller market than Windows, but being recommended by Linux users might somewhat affect the Windows market too, and the fact that Linux is likely more prevalent among developers and GPU compute users might increase its importance.
                    Yep, if it wasn't for indirect factors like this it would be really hard to justify spending any $$ on Linux support. Linux is a huge factor in the server market (which is one reason that AMD has always been supportive of open source work) but so far Linux has not shown any signs of being a substantial part of the client PC market outside of the embedded and small-footprint (tablets etc...) segments.

                    Originally posted by Agdr View Post
                    Anyway, I guess you already analyzed this, and decided the possible gains would be lower than the risk of reducing your competitive advantage and the cost of the effort.
                    Correct, and unfortunately the numbers aren't even close. That said, the world is constantly changing and we are always looking ahead to where things might be a few years from now.

                    Originally posted by Agdr View Post
                    I think it would be nice to have the closed source 3D userspace optionally work with the open DRM driver, and an open X driver, enhancing them if necessary beforehand (possibly with Linux-specific code from fglrx if applicable). This should be doable (except possibly for the video DRM stuff, which I think you could just not support in this mode of operation), and would eliminate a lot of the major issues with a closed 3D driver like trouble with newer kernels and X servers, system crashes, security issues, kernel taint, and make it very easy to switch between fglrx and the Mesa/Gallium stack, and even use them side by side. It would be an unique advantage over nVidia and Nouveau and would also possibly allow you to eventually drop the kernel and X driver, and focus only on the proprietary OpenGL/OpenCL userspace.
                    Yep, that was one of the first options we looked at, and still seems like one of the most attractive. The downsides are (a) we would need to refactor a big chunk of proprietary code so that the low-level fglrx code we released into the open stack would not put our proprietary DRM at risk in other OSes, and (b) the open drivers are community-controlled not AMD-controlled and so far the community is not real enthusiastic about constraining what they do with an open kernel driver in order to avoid breaking a proprietary user-space driver. We can fork the open kernel & userspace X driver code and ship our own (slightly different) version with the proprietary stack but then we lose a bunch of potential gains from having a common open driver.

                    There are also a number of places where proprietary drivers over-write chunks of the common framework in order to add proprietary features, where the complexity/functionality tradeoff makes it hard for the community to justify adding that functionality to the common code. Features like Multiview and Crossfire both involve a lot of code outside the 3D driver as well as the obvious 3D changes. This will get easier over time, however -- Eyefinity does reduce the importance of Multiview, for example, and ever-increasing 3D performance may mean we can compete without Crossfire at some point in the future -- but IMO we also need to get to the point where the open source driver community is willing to live with at least a subset of the constraints that come from hosting a proprietary 3D stack on the same code, and I don't feel like we are there yet. The solution may be as simple as branching and re-merging the kernel & X driver code at the right times; it feels do-able anyways.

                    The bigger task would be re-factoring, opening and merging in the proprietary low-level code from fglrx into the open drivers (basically memory management and command submission) and having that accepted by the open source driver community for use with the open drivers as well.

                    Anyways, bottom line is that we are always looking at this stuff, that passage of time makes some of it easier, that we are heading in the direction you want, and that it's a lot harder than it appears at first glance
                    Test signature

                    Comment


                    • #50
                      Originally posted by bridgman View Post
                      Removing DRM from the open driver wouldn't make any difference. An attacker would still be able to use the open code as a guide to attacking the blob.
                      Yes, but given the high skill of crackers, and the fact that you can trace (and alter) the GPU command stream anyway (see renouveau and revenge), it's not obvious that it makes a significant difference (especially if the open code is just a minimal command submission/resource manager layer).

                      Originally posted by bridgman View Post
                      Doesn't have to be an existing competitor. If we say "hey folks, here's everything you need to design & build your own GPU HW/SW without spending hundreds of milions on R&D" we might as well just shut the company down today. A new competitor would not be able to keep up with evolution in the high end of the market but they would easily be able to compete in the high volume portion of the market which actually pays for most of the ongoing R&D.
                      Yes, that could be a concern.
                      It's interesting to note though that in the x86 market you don't even need a software stack, and the architecture is very well documented (including performance aspects and sometimes architecture details), yet no one manages to compete with AMD and Intel outside perhaps of very low-end markets (e.g. VIA).

                      Originally posted by bridgman View Post
                      For reasons I don't fully understand, perception of driver quality has much less impact on hardware market share for Linux consumer users than you might expect. There has been a slight change over the last few years, coincident with supporting open source driver development and making massive improvements in the proprietary driver, but all indications are that the shift in Linux market share is actually *smaller* than the shift in Windows market share. Go figure.
                      Interesting.
                      Perhaps the reason is that the perception of the drivers has actually improved much less than the drivers themselves? (due to the open drivers still being primitive and fglrx's past inferiority).

                      While trivial, perhaps renaming "fglrx" to "Catalyst" and favorable independent comparisons with nVidia could help shed those old perceptions.

                      Originally posted by bridgman View Post
                      Yep, that was one of the first options we looked at, and still seems like one of the most attractive. The downsides are (a) we would need to refactor a big chunk of proprietary code so that the low-level fglrx code we released into the open stack would not put our proprietary DRM at risk in other OSes,
                      Would you really need to release substantial code?
                      Isn't the current open Radeon kernel driver already good enough at least for supporting fglrx in single GPU configurations where KMS already works?

                      Or maybe you have a different and better kernel architecture (e.g. userspace vs kernel command submission) and thus would need to open that?

                      Originally posted by bridgman View Post
                      and (b) the open drivers are community-controlled not AMD-controlled and so far the community is not real enthusiastic about constraining what they do with an open kernel driver in order to avoid breaking a proprietary user-space driver. We can fork the open kernel & userspace X driver code and ship our own (slightly different) version with the proprietary stack but then we lose a bunch of potential gains from having a common open driver.
                      Why not just adapt to the changes in the open drivers?
                      The Linux kernel has an approximately 3 month release cycle, which should give time to prepare at least a Linux-only update for any ABI changes.
                      Also, incompatible changes to the ABI tend to be frowned upon (see the Nouveau ABI break debate for instance).

                      Originally posted by bridgman View Post
                      ever-increasing 3D performance may mean we can compete without Crossfire at some point in the future
                      Really? I would expect multi-GPU instead to be more prominent in the future, as software support improves and compute gets more prevalent (with "GPU SMP" systems becoming standard for compute servers).

                      Originally posted by bridgman View Post
                      Anyways, bottom line is that we are always looking at this stuff, that passage of time makes some of it easier, that we are heading in the direction you want, and that it's a lot harder than it appears at first glance
                      Great, thanks

                      Comment

                      Working...
                      X