Friday, January 31, 2020

Vulkan Software render

Google have created software based Vulkan implementation sometime ago as not a official project.
And i have decided to check how it was in compare to other soft rendering implementations. And here are some results with yquake:
  • ref_gl1: 632 frames, 24.4 seconds: 25.9 fps (mesa 19.3.2 llvmpipe LLVM 9.0.1, 128 bits)
  • ref_gl3: 632 frames, 28.9 seconds: 21.9 fps (mesa 19.3.2 llvmpipe LLVM 9.0.1, 128 bits)
  • ref_soft: 632 frames, 10.9 seconds: 57.8 fps (mesa 19.3.2)
  • ref_vk: 632 frames, 98.9 seconds: 6.4 fps (SwiftShader Device LLVM 7.0.1)
Used steps for build SwiftShader are:
  • git clone git@github.com:google/swiftshader.git
  • cd swiftshader/build
  • CC="ccache gcc-8" CXX="ccache g++-8" cmake ..
  • CC="ccache gcc-8" CXX="ccache g++-8" make -j 2 vk_swiftshader
  • sudo cp libvk_swiftshader.so /usr/lib/aarch64-linux-gnu/libvulkan_swiftshader.so
  • sed -i "s|./libvk_swiftshader.so|/usr/lib/aarch64-linux-gnu/libvulkan_swiftshader.so|g" Linux/vk_swiftshader_icd.json
  • sudo cp Linux/vk_swiftshader_icd.json /usr/share/vulkan/icd.d/swiftshader_icd.aarch64.json
  • sudo chmod 644 /usr/share/vulkan/icd.d/swiftshader_icd.aarch64.json
  • sudo chown root:root /usr/share/vulkan/icd.d/swiftshader_icd.aarch64.json
  • sudo chmod 644 /usr/lib/aarch64-linux-gnu/libvulkan_swiftshader.so
  • sudo chown root:root /usr/lib/aarch64-linux-gnu/libvulkan_swiftshader.so
Note: Gcc 8 is preferred compiler for now as gcc-9 produced error with current version of code base.

Used steps for build yQuake2 are:
  • wget -cv https://deponie.yamagi.org/quake2/idstuff/q2-314-demo-x86.exe
  • unzip q2-314-demo-x86.exe
  • git clone git@github.com:yquake2/yquake2.git -b ref_vk
  • cd yquake2
  • make
  • cd ..
  • cp -rv Install/Data/baseq2/pak0.pak yquake2/release/baseq2/
  • cp -rv Install/Data/baseq2/players yquake2/release/baseq2

No comments:

Post a Comment