[ZZ] A proposal for compiling Direct3D HLSL with LLVM (written by Michael Larabel)

Source: Internet
Author: User

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

Note:something very instersting to wine translating

This idea is inspired for GPU virtualization ... But there are a lot of technical and patent problems.

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 (March) at 10:54 PM EDT. 6 Comments
COMPILER--
Lately we have been talking a IoT about this year's Google Summer of Code whereby Google pays student developers to work O n various free software projects over the summer. While GSoC have been taking place for several years, this year there ' s been several interesting proposals. Among the proposals to catch our attention have been experimental work on KDE's KWin for Wayland, an OpenGL 4.1 gallium3d s Tate tracker that's now turned to a video acceleration state tracker for WEBM/VP8 on VDPAU, better Multi-gpu D ReactOS improvements, among many other expressed proposals from dozens of free software projects. Another one is just brought up by a student developer and so ' s to provide support for compiling Microsoft Direct3D HLSL In LLVM.

This proposal by Charles Davis, a 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 develop ment.by utilizing LLVM, it could be possible-generate High-performance shader code from HLSL, just as Apple is known to does 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 H Ave begun to does in the Linux world with Gallium3D, but to apply this to Direct3D and HLSL, the Microsoft high level Shader Language.

Would the low-level Virtual machine is compiling the HLSL, but it would take advantage of the LLVM optimizers to Generate more efficient and higher-performing HLSL. Right now under Windows, the most HLSL are 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 are that the proposal have the interest of the Wine project. In fact, it is Dan Kegel who brought up the this idea of the using LLVM for a DIRECT3D/HLSL compiler. Wine's in need of a shader compiler and so they hope the work would come to fruition. Dan Kegel In fact a well known wine figure and are 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 was accepted and ends up materializing, this could--in the long run--end up improving Wine ' s support F Or modern Direct3D titles and when optimized with LLVM could provide faster performance.

[ZZ] A proposal for compiling Direct3D HLSL with LLVM (written by Michael Larabel)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.