Page 1 of 1

Loading RenderSystem_Vulkan

Posted: Sat Jun 10, 2023 7:11 pm
by jwwalker

What happens if you try to load the RenderSystem_Vulkan plugin on a PC that does not have Vulkan installed on it? Does the load fail, or if it does, is there some other way of telling that it's not going to work?


Re: Loading RenderSystem_Vulkan

Posted: Sun Jun 11, 2023 1:14 am
by dark_sylinc

Hi!

Short Version

The RenderSystem will be unavailable and the other RenderSystems would have to be used.

The config dialog (i.e. the one provided via mRoot->showConfigDialog + ogre.cfg + plugins.cfg) handles this. If you manually setup the RenderSystem, make sure to check if mRoot->getRenderSystemByName( "Vulkan Rendering Subsystem" ); returns a nullptr.

If you're manually using mRoot->loadPlugin() make sure to tag the Vulkan RenderSystem as optional (normally plugins.cfg handles calling loadPlugin, where the rendersystems are specified via the PluginOptional setting).

If the app crashes, it is likely an OgreNext bug.

Long version

There are two possibilities:

  1. The GPU is not Vulkan capable, but the driver knows about Vulkan. Thus the Vulkan loader is installed but it returns 0 devices. OgreNext handles this gracefully, if it doesn't it's a bug.
    • You can mimic this behavior by removing the ICD *.json files. On Linux they're usually in /usr/share/vulkan/icd.d (there may be more installed under ~/.local/share/vulkan/icd.d). Without those json files, the Vulkan loader doesn't know about the Vulkan drivers present.
  2. The GPU may or may not be Vulkan capable, but the driver is so old it doesn't know about Vulkan. There is no Vulkan loader, and the OS will refuse to load RenderSystem_Vulkan.dll because of a missing dll (vulkan-1.dll). A similar thing happens on Linux. OgreNext handles this gracefully, if it doesn't it's a bug.

We talk a little about PluginOptional in the News post of 2.3's release.

Cheers
Matias