Announcement

Collapse
No announcement yet.

How Valve Made L4D2 Faster On Linux Than Windows

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

  • #11
    Originally posted by kwahoo View Post
    Sony PS3 uses low-level libGCM (no one is using PSGL derived from GL ES 1.1+Cg), Nintendo Wii uses proprietary GX API (GX2 in Wii U).
    And what do you think those libraries are based on? PS3 uses a FreeBSD OS derivative too.

    Comment


    • #12
      - Yes, the way the Source Engine is hitting on OpenGL right now is through a non-deferring, locally-optimizing abstraction layer to basically convert their longstanding Direct3D calls into OpenGL. However, it's not the same way that Wine does Direct3D to OpenGL conversion. The Source Engine targets a D3D9-like API with extensions that translates GL calls dynamically. This also works for Shader Model 2.0b with Shader Model 3.0 support coming soon. Valve's implementation is nearly a 1:1 mapping between D3D and GL concepts.
      When they say it also works for SM2.0b and soon SM3.0, does that mean it's currently translating the vanilla SM2.0 codepath? I wonder if the Linux/OpenGL performance advantage will fall off as they move on to the more complex SM2.0b and SM3.0 paths?

      Comment


      • #13
        Originally posted by Dukenukemx View Post
        So the game isn't truly OpenGL? It just dynamically translates Direct 3D to OpenGL? That's still impressive, but couldn't they get a bigger performance boost by replacing Direct 3D with OpenGL?

        Also, couldn't WINE do this for a performance boost?
        No they're using OpenGL directly. What they mean is that Valve's Source Engine API calls just "look" like the DirectX calls to the game/renderer code, so none of that code has to be change for them to port to OpenGL platforms. There are some areas where DirectX and OpenGL don't match up perfectly, so, for cross-platform code, it's usually best to write ambiguous "higher level" render methods which can fine-tune the direct DX/GL calls to that API's "best practice" respectively. This is most likely what they meant by saying that certain hot-loops and interfaces where re-written to accommodate the differences in graphics APIs.

        Comment


        • #14
          Gamepad?

          What about gamepad support?

          Comment


          • #15
            turn off -fPIC?

            Does this mean they use one huge static binary with no shared libraries?

            Or do they resolve dynamic links at runtime, resulting in selinux violations from writing relocation fixups?

            Will we have to disable selinux to run their apps?

            Comment


            • #16
              Originally posted by Filiprino View Post
              There's only two systems using Direct3D: Xbox and Windows. Everyone else is using OpenGL or an equivalent (Sony, Nintendo, AMD, NVIDIA, Intel, Apple, Google ...)

              For the love of... SONY AND NINTENDO DO NOT USE OPENGL!! At all, period. There is a _proprietary_ heavily-modified "kinda sorta" GL|ES wrapper library for PS3 which essentially nobody uses because making proper use of the PS3 does not fit into the D3D/GL API models. Nintendo has never released any hardware that supports shaders (the Wii U will be their first when it comes out later this year) and their past hardware instead relies on a TEV unit, and also has other various very weird and different hardware behavior that does not at all fit into the D3D/GL model, and they also use a proprietary custom API.

              NVIDIA, AMD, and Intel all produce Direct3D drivers last I checked. They don't "use OpenGL" any more than they use Direct3D.

              Google also does not solely use OpenGL as you think. Chrome on Windows exclusively uses Direct3D, despite having an entire OpenGL layer. They went out of their way to engineer ANGLE specifically to solve the massive real-world problems with OpenGL driver quality from the fine, fine folks at NVIDIA, AMD, and Intel.

              That leaves Apple as the only company in your list that are solely consuming OpenGL and not Direct3D. That alone does not mean anything, of course, but don't go around claiming that somehow it's only Microsoft -- and not practically the entire industry -- that uses Direct3D.

              Especially when it comes to things like gaming and consumer devices, of which Microsoft's platforms still makes up a majority, with Apple and Google picking up the brunt of the weight in the low-end mobile space.

              Comment


              • #17
                bizarre misinterpretation

                Google also does not solely use OpenGL as you think.
                Your entire rant revolves around your use of the word "solely" when it was not implied AT ALL by the message you're responding to.

                The implication of the original message is: "There are people out there who code to OpenGL" and you've twisted it around so you have a vague pretense for your inflammatory and useless rant.

                There is a _proprietary_ heavily-modified "kinda sorta" GL|ES wrapper library for PS3
                Holy Guacamole, Batman, that's EXACTLY what the original poster said!
                Last edited by frantaylor; 10 August 2012, 12:19 AM.

                Comment


                • #18
                  Originally posted by frantaylor View Post
                  Your entire rant revolves around your use of the word "solely" when it was not implied AT ALL by the message you're responding to.
                  Yes, it was. It implied that Direct3D is not relevant and should not be used because the only people who use it is Microsoft (they are not), and that OpenGL is the clear alternative since it is used everywhere (it is not).

                  Holy Guacamole, Batman, that's EXACTLY what the original poster said!
                  No, it isn't. The PS3 does not use OpenGL in any useful capacity, and bringing Sony up as a "user of OpenGL or equivalent" makes no fucking sense. Microsoft is a "user of OpenGL or an equivalent" by that logic. Porting your applications to OpenGL doesn't help in the fucking slightest when it comes to porting to the PS3. Nintendo also absolutely does not even "kinda sorta" use OpenGL.

                  Comment


                  • #19
                    Originally posted by Dukenukemx View Post
                    That's still impressive, but couldn't they get a bigger performance boost by replacing Direct 3D with OpenGL?
                    Yes, because that would remove the translation layer. But it would also involve vast amounts of engine rework, so they chose the sensible option of just adding an abstraction layer.

                    Comment


                    • #20
                      Originally posted by elanthis View Post
                      Yes, it was. It implied that Direct3D is not relevant and should not be used because the only people who use it is Microsoft (they are not), and that OpenGL is the clear alternative since it is used everywhere (it is not).
                      So, who's using d3d except MS and some smartphone vendors who ship crappy windows on their devices? OpenGL is the clear alternative no matter what your biased posts means. dxd is indeed not relevant compared to non d3d devices and OpenGL is the best option to go with.

                      Comment

                      Working...
                      X