Slashdot Mirror


DX11 Coming To Linux (But Not XP)

gr8_phk writes "As reported over at Phoronix, the Direct X 11 API now has an open source implementation on top of Gallium3d which should ease porting of games to Linux with or without Wine. While still in its infancy, you can see where this is heading. All this while Microsoft hasn't offered DX11 for their own aging WindowsXP. Could it be that Linux may soon support this Microsoft API better than Microsoft itself?"

9 of 370 comments (clear)

  1. Seems sensible enough by Anonymous Coward · · Score: 5, Informative

    D3D 10/11 are pure shaders, the API does little more than compile, upload, and bind data to those shaders.

    So the only 'trick' is to automatically convert HLSL to GLSL, which again, is pretty straightforward, since concepts and structures should pretty much map up 1:1.

    Oh, BTW.. It's not DX11 it's D3D11, DirectX is no longer versioned or packaged as one big 'thing', each component carries it's own version number and release schedule.

  2. Re:Does this smack of a hidden agenda to you? by ChienAndalu · · Score: 5, Informative

    This is what the developer wrote in the commit message:

    Thanks to a very clean and well-though design done from scratch,
    the Direct3D 10/11 APIs are vastly better than OpenGL and can be
    supported with orders of magnitude less code and development time,
    as you can see by comparing the lines of code of this commit and
    those in the existing Mesa OpenGL implementation.

    As somebody who only has little OpenGL coding experience I can't really comment on this.

  3. An insider view by DMiax · · Score: 5, Informative

    Disregarding for a moment the fact that this was announced a few months ago, here is an explanation of what this actually means for developers from a developer of Gallium3D. It explains why there will be no flood of games ported from Windows, and why we should still support a truly open API like OpenGL.

  4. Nothing to see here.. move along by kazade84 · · Score: 4, Informative

    This isn't really that exciting. Firstly it doesn't benefit Wine at all. Wine supports other platforms than Linux and other drivers than Gallium3D and Mesa and so this is useless to them, if that isn't enough the Wine source structure isn't built for this kind of swap out, specifically because Wine limits X interaction to a single DLL, winex11, and the WineD3D stuff doesn't have direct access to X. The Wine D3D developers have long said that a D3D state tracker won't help them.

    Secondly, it's not gonna help porting games to Linux either. D3D is only one part of the DX API and a game does a lot more than just draw stuff. Arguably swapping out D3D for OGL is relatively straightforward in comparison to swapping out sound API, file IO API, network IO API, message handling, etc. etc. that's why some games allow you to switch between the graphics API.

  5. Re:Does this smack of a hidden agenda to you? by EyelessFade · · Score: 4, Informative

    And all who make games for Consoles. Remember only Xbox uses DirectX, all the other uses OpenGL or a derivate from it.

  6. OpenGL not just used on PCs by zooblethorpe · · Score: 4, Informative

    It bears noting that various flavors of OpenGL are used on other hardware, such as Sony's various consoles or the Wii, and it is apparently part of the underlying codebase for the upcoming Nintendo 3DS system. So it looks unlikely to die in the near term, at least.

    Cheers,

    --
    "What in the name of Fats Waller is that?"
    "A four-foot prune."
  7. Re:Does this smack of a hidden agenda to you? by PhrostyMcByte · · Score: 4, Informative

    What he says is a criticism of what happened with OpenGL 3. Despite hopes that the old fixed-function API would all be removed in favor of the modern programmable API, it was all left in--along with the *massive* API and all the extra state and complex code it took to implement it. The Direct3D 10 API was, functionally, what most developers were hoping OpenGL 3 would be--a clean break. Smaller, optimized, easy to use, and easy to implement. OpenGL 3.1 eventually removed all the old fixed-function APIs, and OpenGL 3.2 brought rough feature parity with Direct3D 10.

    Unfortunately, OpenGL was so backwards- and forwards-compatible with itself that many games were made using some mix of the old and new functionality, so even modern games can be found that won't work without an implementation that supports the older stuff. Direct3D is a pretty rigid API without extensions, and Direct3D 10 was not backwards-compatible at all, so code that is written for it is unable to be anything but simple to implement.

    From an implementer's perspective, supporting modern OpenGL use can be a much larger problem than supporting modern Direct3D use. Of course, many games also use older Direct3D versions, and that API is bound to be much more complex too--something he didn't mention.

  8. Re:Does this smack of a hidden agenda to you? by brainnolo · · Score: 4, Informative

    What about SDL? They seem to handle those aspects pretty well

  9. Re:Does this smack of a hidden agenda to you? by TheRaven64 · · Score: 5, Informative

    Gallium drivers are in several layers. The majority of a modern GPU is basically a general-purpose processor optimised for running floating-point heavy, branch-light, programs in parallel. The back end of a gallium driver is just a compiler and runtime that takes TGIR programs and runs them on the GPU (or the CPU if the GPU can't handle them). The front end of the driver generates TGIR programs.

    Because modern GPUs are so flexible, Direct3D 11 and OpenGL 3 are basically APIs for launching shader programs, which do the real work. The front end of the driver compiles GLSL or HLSL programs to TGIR and passes them to the back end. The back end then compiles them for the native architecture and runs them.

    When you use OpenGL 2 or DirectX 9 on Gallium, you have something like Mesa that implements the older, less-flexible (but simpler-to-use) APIs by generating fairly static TGIR programs.

    --
    I am TheRaven on Soylent News