0
$\begingroup$

I don't think there is much to explain here, since the question is pretty much in the title, but i'll try to explain myself better:

My current laptop's gpu does not support Vulkan, so i was wondering if it was possible to do something like d3d12 does, where if a specific function is not able to be performed by the gpu, it can be emulated by the cpu, while maintaing the program running and functioning, at the obvious cost of performance.

Can I achive something like that using Vulkan?

$\endgroup$
4
$\begingroup$

It's possible to emulate Vulkan on a sufficiently capable non-Vulkan API. This is the point of the Vulkan Portability Initiative. Indeed, there is already a Vulkan implementation on top of the Apple proprietary API Metal, and there is work being done to implement Vulkan on top of D3D12.

It probably would be possible to implement a version of Vulkan that ran partially on a GPU (to which you had some other API access) and partially in software on the CPU, but unless you're working with some kind of mobile device with integrated memory, the performance of such a system would probably be utter garbage.

If your goal is to better understand and develop for Vulkan, I'd suggest you investigate some of the existing efforts at creating a fully software Vulkan implementation.

If you're just trying to get some game to run better, I suggest you get a better laptop.

$\endgroup$
3
  • $\begingroup$ Do you have a few pointers to those existing efforts - assuming that we're indeed talking about CPU-based implementations, or ones that offload to OpenGL where that's possible? I've been looking at such projects but nowadays all one seems to find are projects that implement some other API on top of Vulkan... $\endgroup$ – RJVB Apr 3 at 9:51
  • $\begingroup$ This chart covers a lot of the "Vulkan implemented on top of X" projects: github.com/KhronosGroup/Vulkan-Guide/blob/master/chapters/… I don't know of any concerted effort to implment a fully software Vulkan system. If it exists it's probably part of the Mesa project: mesa3d.org $\endgroup$ – Jherico Apr 4 at 22:00
  • $\begingroup$ There’s Google’s Swiftshader project which claims to be CPU-based but which isn’t 100% that on all supported platforms. On Mac, it depends on both Metal and MoltenVK... $\endgroup$ – RJVB Apr 5 at 12:16
0
$\begingroup$

Yes this is exactly what Mesa does. Also note that many older GPU's (prior to 2015, when Vulkan got released) support Vulkan (approx 2012, both nVidia and AMD), although this isn't the case for the Laptop variants. ymmv.

$\endgroup$
1
  • $\begingroup$ FWIW, Mesa's implementation is strictly X11 and Wayland, and requires DRI3 in the former. It does seem to work quite nicely. $\endgroup$ – RJVB Apr 3 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.