其他分享
首页 > 其他分享> > 微软的HLSL Shader Model 6.0 compiler要转向LLVM了,开源的节奏. Apple/Khronos都有各自计划...

微软的HLSL Shader Model 6.0 compiler要转向LLVM了,开源的节奏. Apple/Khronos都有各自计划...

作者:互联网

 

So, Microsoft is making an opensource HLSL-to-almost-LLVM compiler, and Khronos is making an opensource HLSL/GLSL-to-almost-LLVM compiler.

Apple MetalSL is almost C++ (and new HLSL will get closer to C++). Although Apple's compiler is not open-source.

https://twitter.com/zeuxcg/status/710698923216621568

https://www.pcper.com/news/Graphics-Cards/Microsoft-Publishes-HLSL-Shader-Model-60-MSDN-Docs

https://msdn.microsoft.com/en-us/library/windows/desktop/mt733232%28v=vs.85%29.aspx#hardware_capability

Microsoft Publishes HLSL Shader Model 6.0 MSDN Docs
Subject: Graphics Cards | August 2, 2016 - 07:37 AM | Scott Michaud
Tagged: windows 10, vulkan, microsoft, DirectX 12

Update (August 3rd @ 4:30pm): Turns out Khronos Group announced at SIGGRAPH that Subgroup Instructions have been recently added to SPIR-V (skip video to 21:30), and are a "top priority" for "Vulkan Next". Some (like WaveBallot) are already ARB (multi-vendor) OpenGL extensions, too.

Original post below:

DirectX 12's shading language will receive some new functionality with the new Shader Model 6.0. According to their GDC talks, it is looking like it will be structured similar to SPIR-V in how it's compiled and ingested. Code will be compiled and optimized as an LLVM-style bytecode, which the driver will accept and execute on the GPU. This could make it easy to write DX12-compatible shader code in other languages, like C++, which is a direction that Vulkan is heading, but Microsoft hasn't seemed to announce that yet.

View Full Size

This news shows a bit more of the nitty gritty details. It looks like they added 16-bit signed (short) and unsigned (ushort) integers, which might provide a performance improvement on certain architectures (although I'm not sure that it's new and/or GPUs exist the natively operate upon them) because they operate on half of the data as a standard, 32-bit integer. They have also added more functionality, to both the pixel and compute shaders, to operate in multiple threads, called lanes, similar to OpenCL. This should allow algorithms to work more efficiently in blocks of pixels, rather than needing to use one of a handful of fixed function calls (ex: partial derivates ddx and ddy) to see outside their thread.

When will this land? No idea, but it is conspicuously close to the Anniversary Update. It has been added to Feature Level 12.0, so its GPU support should be pretty good. Also, Vulkan exists, doing its thing. Not sure how these functions overlap with SPIR-V's feature set, but, since SPIR was original for OpenCL, it could be just sitting there for all I know.

 

https://blogs.msdn.microsoft.com/chuckw/2012/05/07/hlsl-fxc-and-d3dcompile/

With Visual Studio 2012 or later, HLSL and the FXC.EXE tool is now integrated into build environment and the Windows 8.x SDK / Windows 10 SDK. If you add .hlsl and .fx extension files to your project, there are properties for controlling how the HLSL compiler is invoked as part of your build including target profile, entry point name, etc. The resulting compiled shader uses the default extension of .cso (Compiled Shader Object). The texture editor supports HLSL colorization, and the Visual Studio Graphics Diagnostics feature provides support for debugging HLSL as well.

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

标签:...,LLVM,HLSL,Shader,will,https,com,compiler
来源: https://blog.csdn.net/weixin_34313182/article/details/94036855