• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 ... 18 19 20 21 22 ... 111 Next »

Issues with Vulkan on Linux dev build
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Issues with Vulkan on Linux dev build
11-16-2016, 01:18 PM
#1
jorwin
Unregistered
 
Hello to all!

I haven't found anything here relating to the problems I'm experiencing with Linux Builds.

I have the NVidia 375.10 driver installed and when I start
Code:
vulkaninfo | grep surface
on a terminal console I get the following:
Code:
VK_KHR_surface                  : extension revision 25
VK_KHR_xcb_surface              : extension revision  6

In newer Dolphin builds I can choose the Vulkan driver (experimental) but when I start a game I get a dialog window with the error 'Failed to create Vulkan instance', when I close the dialog I get another one with 'Fifo shutting down while active', when I close this one I get a new dialog claiming 'Failed to initialize video backend!'. If I change to OpenGL Dolphin refuses to start any game. I have to close Dolphin and restart it to boot a game.

On the console following message appears:
Code:
VideoBackends/Vulkan/VulkanContext.cpp:167 E[Video]: Vulkan: Missing required extension VK_KHR_xlib_surface.
. Which is true, since
Code:
vulkaninfo
shows no such surface extension.

This behaviour is the same on following git pulls:
Vanilla Dolphin: 017ab71fcff8874a23e175b603511814a38ad432
Ishiikura Dolphin: 0c629093d23298a5247b420f7c94e9aa63c43f19

But on the 'vulkan-pr' commit 'b9edfce035648f51676b0a68efaf43071fc06453' I'm able to compile and start Dolphin with the Vulkan backend and start games, on the very same configuration.

I start Dolphin from the
Code:
/home
directory on all three versions, installing it on the
Code:
/usr
directory doesn't help with the issue.

In the directory 'dolphin/Source/VideoBackends/Vulkan' there is an file named
Code:
VulkanLoader.h
, if I comment out
Code:
#define VK_USE_PLATFORM_XLIB_KHR
on line 14 and uncomment
Code:
#define VK_USE_PLATFORM_XCB_KHR
on line 15 it fails on the linking claiming that there's no link to
Code:
XGetXCBConnection
, so no luck there... This is with the Vanilla Dolphin
Code:
017ab71fcff8874a23e175b603511814a38ad432
pull.

As stated before 'vulkan-pr' from
Code:
Stenzek <stenzek@gmail.com>
, pull
Code:
b9edfce035648f51676b0a68efaf43071fc06453
, on the
Code:
Sun Aug 14 00:40:04 2016 +1000
, with the comment
Code:
Vulkan: Support frame dumping/screenshots
, it starts with the Vulkan driver and you can boot games without errors.

Copying the Vulkan files from 'vulkan-pr' to the vanilla Dolphin didn't help either since there are undefined variables.

Has anyone an idea on what's wrong?

Thank you in advance and for your time!
Reply
11-16-2016, 07:43 PM (This post was last modified: 11-16-2016, 07:44 PM by Stenzek.)
#2
Stenzek Offline
Junior Member
**
Posts: 17
Threads: 0
Joined: Nov 2016
The issue here I believe is the Vulkan runtime being compiled without xlib support. Not sure which distribution you're using, but I know the one that ships with Ubuntu is like this. If you download the SDK from LunarG and use this version instead, it won't have this problem.

Alternatively, if you want to use XCB instead, what you have done is correct, you're just missing the linkage with libX11-xcb. To specify this, open Source/Core/VideoBackends/Vulkan/CMakeLists.txt, and add "libX11-xcb" without the quotes to the target_link_libraries line, after glslang.

The reason we don't do this is because the backend gets passed a XLib handle, and I'm not sure assuming it is a wrapped xcb handle is the best idea.
Find
Reply
11-17-2016, 06:23 PM
#3
Anti-Ultimate Offline
Above and Beyond
*******
Posts: 1,957
Threads: 29
Joined: May 2010
Ubuntu compiles it completely fine for me, not sure what the issue is.

Find
Reply
11-26-2016, 07:41 AM
#4
jorwin
Unregistered
 
(11-16-2016, 07:43 PM)Stenzek Wrote: The issue here I believe is the Vulkan runtime being compiled without xlib support. Not sure which distribution you're using, but I know the one that ships with Ubuntu is like this. If you download the SDK from LunarG and use this version instead, it won't have this problem.

Alternatively, if you want to use XCB instead, what you have done is correct, you're just missing the linkage with libX11-xcb. To specify this, open Source/Core/VideoBackends/Vulkan/CMakeLists.txt, and add "libX11-xcb" without the quotes to the target_link_libraries line, after glslang.

The reason we don't do this is because the backend gets passed a XLib handle, and I'm not sure assuming it is a wrapped xcb handle is the best idea.

Hi Stenzek

thank you for your fast reply and sorry for my late answer.

You were right, with Ubuntu 16.04 LTS, you seem to have to install the LunarG libraries and binaries to get XLIB support. I had to copy the libraries and binaries by hand to

Code:
/usr/lib
/usr/bin

as the installer seems to do nothing than check if you're root.

But then I could use the Vulkan driver.

As for the alternative, it didn't work on Ubuntu 16.10LTS, it also failed on linking, it gurgled that there was no -llibX11. I made a softlink from the libX11 that was a directory beneath /usr/lib to /usr/lib proper and it still failed with the linking.

Vulkan is quite faster on Ubuntu + Ishiikura than OpenGL and a NVidia 980. One game that I measured is around 10* frames per second faster in Vulkan than OpenGL.

*actually with the newest pull its around 25 frames, 45-50 vs 25, at least that's what the FPS show.

Thank you very much for your help!

To whom do I report rendering errors on games? I have one GC game that renders fine in OpenGL but has, probably, missing layers/effects in Vulkan (Vanilla Dolphin and Ishiikura), to you directly?
Reply
11-26-2016, 07:46 AM
#5
jorwin
Unregistered
 
(11-17-2016, 06:23 PM)Anti-Ultimate Wrote: Ubuntu compiles it completely fine for me, not sure what the issue is.

Yes Dolphin compiles fine, but apparently you can't start a game with the Vulkan driver. It seems that the Vulkan library packages provided by Canonical don't have XLIB support compiled in them, only XCB.

You seem to have to install/copy the libraries and binaries from the LunarG Vulkan SDK to get the Vulkan support in Ubuntu.
Reply
12-20-2016, 10:12 AM (This post was last modified: 12-20-2016, 10:44 AM by JesusXP.)
#6
JesusXP Offline
Junior Member
**
Posts: 5
Threads: 2
Joined: Jul 2016
Hi - sorry guys, complete newb here but having issues with getting Vulkan to load with Dolphin - getting the failed to create vulkan instance - even though I have it installed (ubuntu 16.04 and Radeon RX460 - I saw the appImage that the guy has hosted kindly - but how do you use those with Ubuntu? It did not recognize it as a filetype.

I was looking for the vulkan librairies in /usr/lib but did not see anything that I would copy to /usr/bin - can you advise of which files would help me to get this to work?

edit: Had success running the PR-vulkan 5.0.441 from the appimage you have! Thanks. It runs with the vulkan driver it appears. I would like to successfully run the development build without having to resort to this - so I could have everything running properly from a native install. Is that possible to help me with?
Find
Reply
03-17-2017, 02:20 AM
#7
garant
Unregistered
 
I signed up just so I could post here with my solution, which I put in another thread on this site that isn't very high in the Google results. I'm putting it here, too, so others can find it more easily.


Code:
Ubuntu 16.04.2, Kernel 4.8, Mesa 17.0.X (via Padoka stable PPA), Radeon RX480, open source AMDGPU driver

I had the same issues just recently; took a few hours, but finally got it. Here's the process I had to go through:


1) I installed the LunarG Vulkan SDK. It can be found at https://vulkan.lunarg.com/sdk/home#linux, with instructions at https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html

This may or may not be applicable, but it was suggested in this thread, so I tried it. Still no luck. However, upon attempting to run one of the examples included with the SDK, I got an error that lead me to this post: https://patchwork.freedesktop.org/patch/139829/

2) I enabled DRI3. The quickest advice I can give is to:

Code:
Code:
sudo nano /etc/X11/xorg.conf

if empty, put this block into file for Nvidia proprietary driver users:

Code:
Section "Device"
       Identifier "GTX 1060"
       Driver "nvidia"
       Option "DRI" "3"
EndSection

With whatever "name" you want to give your graphics card.

Or, for *OPEN SOURCE* AMD users:

Code:
Section "Device"
       Identifier "RX 480"
       Driver "amdgpu"
       Option "DRI" "3"
EndSection

If not empty, you might have to start reading up a bit more, but just adding that Option of DRI3 to the same section you see it in above would probably work. You will also have to find the correct Driver parameter if you are using amdgpu-pro, but I'd recommend upgrading with the Padoka PPA for AMD users and just using that anyway.

After you've made your edits, do a quick reboot and see what happens. By the way, I'd recommend the xorg.conf edit as step 1, as it is much quicker and easier than getting the Vulkan SDK installed.

If your xorg.conf is not empty, make a backup right next to it so you can just rename them in recovery mode if something goes wrong.
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode