POPPUR爱换

 找回密码
 注册

QQ登录

只需一步,快速开始

手机号码,快捷登录

搜索
查看: 1732|回复: 8
打印 上一主题 下一主题

Linux 实现 DirectX 10/11 原生执行

[复制链接]
跳转到指定楼层
1#
发表于 2010-9-22 08:56 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
http://www.phoronix.com/scan.php ... m3d_d3d11&num=1

It's a pity Luca Barbieri or any Mesa / Gallium3D developers are not at Oktoberfest as they are deserving of more than a few Maß of Augustiner. In fact, today a new Gallium3D state tracker was pushed into Mesa and it's perhaps the most interesting state tracker for this open-source graphics driver architecture yet. It's a state tracker that exposes Microsoft's DirectX 10/11 API on Linux! And it's already working and can be hooked into Wine!



Luca Barbieri made a rather significant commit today that adds a state tracker dubbed "d3d1x", which implements the Direct3D 10/11 COM API in Gallium3D. Luca says this is just the initial version, but it's already working and can run a few DirectX 10/11 texturing demos on Linux at the moment. This is not a matter of simply translating the Direct3D calls and converting them to OpenGL like how Wine currently handles it, but is natively implemented within Gallium3D and TGSI to speak directly to the underlying graphics driver and hardware. Thanks to Gallium3D's architecture, this Direct3D support essentially becomes "free" to all Linux drivers with little to no work required.

As said in the commit, "The primary goal is to realize Gallium's promise of multiple API support, and provide an API that can be easily implemented with just a very thin wrapper over Gallium, instead of the enormous amount of complex code needed for OpenGL. The secondary goal is to run Windows Direct3D 10/11 games on Linux using Wine."

In regards to Wine taking advantage of this state tracker, no DLLs have been published yet for Wine to hook into this state tracker, but Luca says that should be quite easy to accomplish.

If things could not get any better, "Fglrx and nvidia drivers can also be supported by writing a Gallium driver that talks to them using OpenGL, which is a relatively easy task. Thanks to the great design of Direct3D 10/11 and closeness to Gallium, this approach should not result in detectable overhead, and is the most maintainable way to do it, providing a path to switch to the open Gallium drivers once they are on par with the proprietary ones."

This is incredible news especially as Wine only has limited DirectX 10.0 support and lacks no form of DirectX 11.0 at the moment.

As another goal of this state tracker, "The third goal is to provide a superior alternative to OpenGL for graphics programming on non-Windows systems, particularly Linux and other free and open systems. 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."

For those thinking that Direct3D 10/11 on Linux will be sub-par, "Finally, a mature Direct3D 10/11 implementation is intrinsically going to be faster and more reliable than an OpenGL implementation, thanks to the dramatically smaller API and the segregation of all nontrivial work to object creation that the application must perform ahead of time."

VMware previously was working on a Direct3D state tracker and it was not going to be open-source and primarily targeted for Gallium3D on Windows, but this is different and is open-source thanks to its development by a community members. This VMware / Tungsten state tracker also targeted Direct3D 9.0.

  

Prost to Gallium3D and the open-source Mesa developers for making this milestone possible! Hopefully soon we can finally see an OpenGL 3.x/4.0 state tracker too. Implementing Direct3D 10/11 on Linux required around 26,000 lines of code to be added to Mesa. I have to wonder though what the Microsoft executive that was buying me beers has to say about Direct3D on Linux.
2#
发表于 2010-9-22 09:01 | 只看该作者
干杯
回复 支持 反对

使用道具 举报

3#
发表于 2010-9-22 09:02 | 只看该作者
干杯
回复 支持 反对

使用道具 举报

4#
发表于 2010-9-22 11:05 | 只看该作者
如果Wine下面能实现原生执行DX10/11,那Mac OSX理论上来说也没什么问题了吧
回复 支持 反对

使用道具 举报

5#
发表于 2010-9-22 11:19 | 只看该作者
效率呢?
回复 支持 反对

使用道具 举报

头像被屏蔽
6#
发表于 2010-9-22 11:31 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

7#
发表于 2010-9-22 11:34 | 只看该作者
回复 5# luckissy


    目标就是代码复杂度、应用方便性和速度均超过OPENGL
回复 支持 反对

使用道具 举报

8#
发表于 2010-9-22 11:36 | 只看该作者
继DX9后,DX10/11也在Linux上实现了,微软开心了
回复 支持 反对

使用道具 举报

nemol_xc 该用户已被删除
9#
发表于 2010-9-22 20:30 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

广告投放或合作|网站地图|处罚通告|

GMT+8, 2025-9-14 05:14

Powered by Discuz! X3.4

© 2001-2017 POPPUR.

快速回复 返回顶部 返回列表