[Libre-soc-bugs] [Bug 251] Initial 3D MESA non-accelerated software-only driver is needed
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Sat Aug 15 13:54:01 BST 2020
https://bugs.libre-soc.org/show_bug.cgi?id=251
--- Comment #36 from vivekvpandya <vivekvpandya at gmail.com> ---
I studies mesa source code for vulkan drivers and I have following very
high-level plan (Note: we may face difficulties executing it)
Step1: Testing Setup
This includes a Linux machine in which we can run vulkan tests trough mesa
built libvulkan_intel.so
Step 2:
Start a simple project under mesa source tree which can create a simple
libvulkan_ppc.so. However this lib will not actually do anything and on
pipeline creation
it should just return some error code as VkResult. In this task we may
start by just copying code for
https://gitlab.freedesktop.org/mesa/mesa/-/tree/master/src/intel/vulkan abd
then remove all files from meson.build and just keep minimal files which are
required to create a broken pipeline.
Test this setup with by forcing application to use this driver. Need to
figure out way how to force it. May be through VK_ICD_FILENAMES.
Step3: Once we have above broken driver ready we can start enabling code
required to process "COMPUTE" shaders.
And we should be able dump spriv text format and fail.
Step4: Use spriv to nir converter available in
https://gitlab.freedesktop.org/mesa/mesa/-/tree/master/src/compiler/spirv and
dump NIR and fail.
Step5: Copy NIR to LLVM ir converions from
https://gitlab.freedesktop.org/mesa/mesa/-/tree/master/src/amd/vulkan and use
it to generate LLVM that suites our need. Dump LLVM IR and fail.
Here if possible we can create some mechanism such that we can move
https://gitlab.freedesktop.org/mesa/mesa/-/blob/master/src/amd/vulkan/radv_nir_to_llvm.c
to common compiler folder.
One possible thing is to have a simple file that maps NIR operations to
target specific intrinsics for (AMDGPU, PPC) and use that in above code.
Step6: Use LLVM's JIT capabilities to execute IR generated in Step5
After these steps we have a simple mesa driver working for COMPUTE shader.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list