[ZZ] A Proposal For Compiling Direct3D HLSL With LLVM (Written by Michael Larabel )

http://www.phoronix.com/scan.php?page=news_item&px=OTI2NA

Note:  Something very instersting to wine translating

这个点子是对于GPU virtualization有启发。。。不过有很多技术和专利上的问题。

MSFT HSLS -> LLVM IR -> Windows graphics driver or Linux graphic drivers.

Apple GLSL -> LLVM IR -> ??

 

A Proposal For Compiling Direct3D HLSL With LLVM
Written by Michael Larabel in Compiler on 28 March 2011 at 10:54 PM EDT. 6 Comments
COMPILER --
Lately we have been talking a lot about this year's Google Summer of Code whereby Google pays student developers to work on various free software projects over the summer. While GSoC has been taking place for several years, this year there's been several interesting proposals expressed. Among the proposals to catch our attention has been experimental work on KDE's KWin for Wayland, an OpenGL 4.1 Gallium3D state tracker that's now turned into a video acceleration state tracker for WebM/VP8 on VDPAU, better multi-GPU support, and ReactOS improvements, among many other expressed proposals from dozens of free software projects. Another one was just brought up by a student developer and that's to provide support for compiling Microsoft Direct3D HLSL in LLVM.

This proposal by Charles Davis, an American university student, is entitled "Microsoft Direct3D shader bytecode backend." Here's the abstract from the proposal:

    There is a distinct lack of open-source frameworks for compiling HLSL, the shader language used by Direct3D, into bytecode that D3D can understand. Currently, the only such framework is Ryan Gordon's MojoShader, whose HLSL compiler component is still under heavy development. By utilizing LLVM, it may be possible to generate high-performance shader code from HLSL, just as Apple is known to do for GLSL. The first step is a backend to generate D3D bytecode from LLVM IR.


Basically it's doing what Apple does with LLVM for GL Shading Language (GLSL) work on Mac OS X and what Linux developers have begun to do in the Linux world with Gallium3D, but to apply this to Direct3D and HLSL, the Microsoft High Level Shader Language.

Not only would the Low-Level Virtual Machine be compiling the HLSL, but it would take advantage of the LLVM optimizers to generate more efficient and higher-performing HLSL. Right now under Windows, most HLSL is generated by Microsoft's compiler in DirectX. As part of the HLSL compiler, the LLVM back-end would generate Direct3D shader byte-code from LLVM IR.

What makes this work particularly interesting is that the proposal has the interest of the Wine project. In fact, it was Dan Kegel who brought up this idea of using LLVM for a Direct3D/HLSL compiler. Wine's in need of a shader compiler and so they hope this work will come to fruition. Dan Kegel in fact a well known Wine figure and is employed by Google and was the Wine 1.0 release manager. There is also the Direct3D 10/11 state tracker for Mesa's Gallium3D architecture, but that hasn't garnered the interest of Wine.

If this proposal is accepted and ends up materializing, this could -- in the long run -- end up improving Wine's support for modern Direct3D titles and when optimized with LLVM could provide faster performance.

 

转载于:https://www.cnblogs.com/kylegui/p/6235062.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值