2017/06/25 19:03 | |
2016/09/12 15:46 | |
2016/09/24 16:33 | |
2016/09/21 11:01 |
Windows 10 | Linux | Android | |
---|---|---|---|
GeForce Fermi | N | N | N |
GeForce Kepler | Y | Y | Y? |
GeForce Maxwell | Y | Y | Y? |
GeForce Pascal | Y | Y | ? |
RADEON GCN 1.0/1.1/1.2 | Y | Y? | ? |
RADEON GCN Polaris | Y | Y | ? |
Intel HD Graphics Gen7 | N | Y | ? |
Intel HD Graphics Gen7.5 | N | Y | ? |
Intel HD Graphics Gen8 | N | Y | ? |
Intel HD Graphics Gen9 | Y (beta) | Y | ? |
PowerVR Series 6 Rogue | N | ? | Y |
Snapdragon Adreno 400 | N | ? | Y |
Driver とヘッダファイルだけで構成されていた OpenGL と違い、Vulkan は Tool と Library が必要です。 SDK が用意されています。 直接 build することもできます。
GitHub の code を直接ビルドすることができます。
Windows の Build 手順
glslang と Vulkan-LoaderAndValidationLayers は同じ階層に配置しておいてください。
> git clone https://github.com/KhronosGroup/glslang.git > git clone https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers.git > cd glslang > mkdir build_win64 > cd build_win64 > cmake .. -G "Visual Studio 14 Win64"
同じ手順を Vulkan-LoaderAndValidationLayers でも行います。
> cd Vulkan-LoaderAndValidationLayers > mkdir build_win64 > cd build_win64 > cmake .. -G "Visual Studio 14 Win64"
glslangValidator -V <shader_source> -o <output_binary.spv>
入力ファイルの拡張子で shader type を判別するので注意が必要です。
現在わかっている範囲でのまとめ。
Vulkan は新しい世代の 3D API です。特徴は下記の通り。
Direct3D の低レベル API が Direct3D 12 であるように、Vulkan は位置づけ的には OpenGL の流れを汲む低レベル API に相当します。 ただし OpenGL との互換性はありません。
Direct3D 12 や Metal と同じように CPU 負荷を大幅に削減しており、効率化は動作速度を引き上げると同時にバッテリーへの負担も減らすことになります。
Direct3D が Windows のみ、Metal が Apple platform のみサポートしているのに対して、Vulkan は唯一の Multi platform に対応した低レベル API となります。
これも Direct3D 12, Metal 同様、新しい API の特徴です。Metal はすでに iOS/OS X の両方に対応していますし、Vulkan も Android が対応することを発表しています。
Direct3D12, Metal の対応状況からの推測では下記の通り。
現在の低レベル API は下記の 2系列あります。
Vulkan の API セットは Direct3D 12 にある程度似ているものになると考えられます。
Direct3D 12 | Vulkan | Metal |
---|---|---|
RootSignature | Pipeline Layout | – |
Descriptor Heap | Descriptor Pool | – |
Descriptor | Descriptor Set / ImageView | – |
CommandList | Command Buffer | CommandBuffer |
CommandAllocator | Command Pool | – |
CommandQueue | Command Queue | CommandQueue |
PipelineState | Pipeline State | PipelineState, DepthStencilState, RenderState |
– | Render Pass | RenderPassDesc (RenderCommandEncoder) |
ResourceBarrier | Pipeline Barrier | (TextureBarrier) |