Forgot your password?
typodupeerror
Graphics Windows Linux

DX11 Coming To Linux (But Not XP) 370

Posted by CmdrTaco
from the speaking-directly-to-you dept.
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?"
This discussion has been archived. No new comments can be posted.

DX11 Coming To Linux (But Not XP)

Comments Filter:
  • by Anonymous Coward on Tuesday September 21, 2010 @01:53PM (#33653046)

    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.

  • by ChienAndalu (1293930) on Tuesday September 21, 2010 @01:59PM (#33653168)

    This is what the developer wrote in the commit message [freedesktop.org]:

    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.

  • An insider view (Score:5, Informative)

    by DMiax (915735) on Tuesday September 21, 2010 @02:08PM (#33653292)
    Disregarding for a moment the fact that this was announced a few months ago, here is an explanation [blogspot.com] 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.
  • by joelholdsworth (1095165) on Tuesday September 21, 2010 @02:19PM (#33653456)
    ...this probably won't help Wine much. As this post explains http://www.winehq.org/pipermail/wine-devel/2010-September/086885.html [winehq.org] : "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."
  • by kazade84 (1078337) on Tuesday September 21, 2010 @02:21PM (#33653472)

    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.

  • by EyelessFade (618151) on Tuesday September 21, 2010 @02:22PM (#33653492) Homepage
    And all who make games for Consoles. Remember only Xbox uses DirectX, all the other uses OpenGL or a derivate from it.
  • by Anonymous Coward on Tuesday September 21, 2010 @02:34PM (#33653634)

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

  • by zooblethorpe (686757) on Tuesday September 21, 2010 @02:37PM (#33653680)

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

    Cheers,

  • Re:Phoronix (Score:3, Informative)

    by MrHanky (141717) on Tuesday September 21, 2010 @02:58PM (#33653968) Homepage Journal

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

  • Re:"not XP" (Score:3, Informative)

    by MostAwesomeDude (980382) on Tuesday September 21, 2010 @03:07PM (#33654078) Homepage

    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.

  • by PhrostyMcByte (589271) <phrosty@gmail.com> on Tuesday September 21, 2010 @03:13PM (#33654158) Homepage

    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.

  • by Anonymous Coward on Tuesday September 21, 2010 @03:19PM (#33654246)

    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.

  • by brainnolo (688900) on Tuesday September 21, 2010 @03:24PM (#33654304) Homepage
    What about SDL? They seem to handle those aspects pretty well
  • by tepples (727027) <tepples&gmail,com> on Tuesday September 21, 2010 @03:38PM (#33654484) Homepage Journal

    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.

  • by TheRaven64 (641858) on Tuesday September 21, 2010 @03:42PM (#33654538) Journal

    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.

  • by tepples (727027) <tepples&gmail,com> on Tuesday September 21, 2010 @03:43PM (#33654552) Homepage Journal

    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.

  • by TheRaven64 (641858) on Tuesday September 21, 2010 @03:48PM (#33654648) Journal

    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.

  • by oh_my_080980980 (773867) on Tuesday September 21, 2010 @03:50PM (#33654682)
    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.
  • by h4rr4r (612664) on Tuesday September 21, 2010 @04:53PM (#33655564)

    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 [microsoft.com]

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

  • by kikito (971480) on Tuesday September 21, 2010 @06:45PM (#33656544) Homepage

    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.

  • by darthdavid (835069) on Wednesday September 22, 2010 @12:35AM (#33658950) Homepage Journal
    Honestly, stop dicking around and just use gparted or something.
  • Re:In ten years (Score:3, Informative)

    by dbIII (701233) on Wednesday September 22, 2010 @03:47AM (#33659642)
    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.

In a consumer society there are inevitably two kinds of slaves: the prisoners of addiction and the prisoners of envy.

Working...