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?"

22 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. Don't get too carried away... by joelholdsworth · · Score: 2, Informative

    ...this probably won't help Wine much. As this post explains http://www.winehq.org/pipermail/wine-devel/2010-September/086885.html : "IIRC, it's been discussed before, and it simply wouldn't work. D3D has too many ties to the Windows API that a non-Windows based implementation wouldn't be appropriate for Wine (try getting an HDC from a D3D resource, or passing an HWND to D3D). Gallium would have to substitute these for X11 resources, or custom resources that tie into X, so wouldn't reflect the Wine's internal state. Additionally, not all drivers will support Gallium (eg. nVidia binaries), so a D3D10->GL path will still be needed."

  5. 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.

  6. 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.

  7. Re:Does this smack of a hidden agenda to you? by Anonymous Coward · · Score: 1, Informative

    No, the Wii uses Nintendo's in-house graphics API, not OpenGL.

  8. 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."
    1. Re:OpenGL not just used on PCs by Anonymous Coward · · Score: 1, Informative

      Incorrect. The PS3 implemented a sort of GL like library at first, which has now been mostly forgotten in preference for libGCM - which is a library for writing directly into the RSX's command buffer. The Wii implements a library that looks a little like GL at first glance, but is actually vastly different in so many areas.

  9. Re:Phoronix by MrHanky · · Score: 2, Informative

    $cd tmp/mesa
    $ git pull
    $ ls src/gallium/state_trackers/d3d1x/
    d3d1xshader docs dxgid3d11 gd3d1x Makefile.inc tools
    d3d1xstutil dxgi gd3d10 gd3dapi mstools w32api
    d3dapi dxgid3d10 gd3d11 Makefile progs

    Only about 11%, it seems.

  10. Re:"not XP" by MostAwesomeDude · · Score: 2, Informative

    Gallium requires some sort of adapter to interface with hardware. There are no such adapters for any MS kernel, save for the closed-source VMWare stuff.

    --
    ~ C.
  11. 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.

  12. 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

  13. OEM vs. retail pricing; pro vs. home by tepples · · Score: 2, Informative

    Windows 7 Home Premium is only $99 from Newegg.

    As I understand it, that's the price of the OEM version, and the OEM version is available only when purchased on the same invoice as a motherboard. Otherwise, you have to buy the retail version, which is $100 more. Besides, a lot of people who need features found only in the Professional edition don't want to have to dual boot Windows XP Professional and Windows 7 Home Premium.

    1. Re:OEM vs. retail pricing; pro vs. home by h4rr4r · · Score: 2, Informative

      OEM versions are only for new machines that will be resold. You cannot build your own machine this way.

      http://www.microsoft.com/oem/en/licensing/sblicensing/pages/licensing_for_hobbyists.aspx

      OEM System Builder Software
      Must be preinstalled on a PC and sold to another unrelated party.

  14. 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
  15. Re:Does this smack of a hidden agenda to you? by tepples · · Score: 3, Informative

    the Wii uses Nintendo's in-house graphics API, not OpenGL.

    If the Wii graphics API (GX) is anything like the DS graphics API (also called GX), it's OpenGL with the serial numbers filed off.

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

    Sounds about right. Direct3D uses COM interfaces. This means that each version require an entirely new interface. All of the new stuff is in a separate function pointer table (COM object) and all of the new stuff is in the old one. OpenGL, in contrast, uses C functions, and new versions just add new ones (although with 3.x they've started deprecating / removing them).

    This means that the DirectX 11 API can be very clean, however the DirectX11 library also includes the DirectX 1 to 10 interfaces. Implementing DirectX 11 is probably an order of magnitude or two easier than implementing OpenGL 3.0 or 3.1, but implementing DirectX 1 to 11 is probably about as hard. If you only want to support the new APIs, then it's easy. OpenGL ES 2.0 is probably about as complicated.

    The latest versions of both APIs dispense with all of the old fixed-function stuff. In slightly earlier versions, the driver was responsible for basically providing a complete software emulator for an old fixed-function card that ran on newer completely programmable ones.

    --
    I am TheRaven on Soylent News
  17. Re:Response to rampant speculation by oh_my_080980980 · · Score: 3, Informative

    Oh dear god you trolls. The point about the comment is that DX11 is not supported on Windows XP. Microsoft has no intention of supporting DX11 on XP and they want to kill XP. Thing is a lot of users still use XP.

  18. Re:Response to rampant speculation by kikito · · Score: 3, Informative

    I'd like to point out that comparing linux with Home Premium isn't fair either.

    Linux only comes in one version: Awesome.

    You should compare it with the Win7 Awesome version, whatever it's called.

  19. Re:Response to rampant speculation by darthdavid · · Score: 2, Informative

    Honestly, stop dicking around and just use gparted or something.

  20. Re:In ten years by dbIII · · Score: 2, Informative

    Had that fifteen years ago when Win95 was a disappointment, and at least twelve years ago when the Enlightenment window manager had Win7 style window thumbnail pics in the icon box.