DX11 Coming To Linux (But Not XP) 370
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?"
Seems sensible enough (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.
Re:Does this smack of a hidden agenda to you? (Score:5, Informative)
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)
Don't get too carried away... (Score:2, Informative)
Nothing to see here.. move along (Score:5, 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.
Re:Does this smack of a hidden agenda to you? (Score:5, Informative)
Re:Does this smack of a hidden agenda to you? (Score:1, Informative)
No, the Wii uses Nintendo's in-house graphics API, not OpenGL.
OpenGL not just used on PCs (Score:5, Informative)
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)
$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)
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.
Re:Does this smack of a hidden agenda to you? (Score:5, 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.
Re:OpenGL not just used on PCs (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.
Re:Does this smack of a hidden agenda to you? (Score:5, Informative)
OEM vs. retail pricing; pro vs. home (Score:3, 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.
Re:Does this smack of a hidden agenda to you? (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.
Re:Does this smack of a hidden agenda to you? (Score:4, 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.
Re:Does this smack of a hidden agenda to you? (Score:3, 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.
Re:Response to rampant speculation (Score:3, Informative)
Re:OEM vs. retail pricing; pro vs. home (Score:3, 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 [microsoft.com]
OEM System Builder Software
Must be preinstalled on a PC and sold to another unrelated party.
Re:Response to rampant speculation (Score:4, 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.
Re:Response to rampant speculation (Score:3, Informative)
Re:In ten years (Score:3, Informative)