Loading RenderSystem_Vulkan Topic is solved

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
jwwalker
Goblin
Posts: 224
Joined: Thu Aug 12, 2021 10:06 pm
Location: San Diego, CA, USA
x 17
Contact:

Loading RenderSystem_Vulkan

Post 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?

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Loading RenderSystem_Vulkan

Post 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

Post Reply