Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Codes4Fun/RBDOOM-3-BFG segfault #65
Comments
ChristophHaag
commented
Jul 18, 2017
|
Didn't actually compile with latest gcc, so I used clang: CXX=clang++ cmake . |
danginsburg
commented
Jul 18, 2017
|
Can you post ~/.steam/steam/logs/vrclient_RBDoom3BFG.txt to a gist? |
ChristophHaag
commented
Jul 18, 2017
|
It's not so long.
|
danginsburg
commented
Jul 19, 2017
|
I tried this with lostgoat's wip-mem-obj-v4, but the vrcompositor fails to start. The problem is that we switched SteamVR to require the KHR external memory extensions, specifically: VK_KHR_external_memory, VK_KHR_external_memory_fd, VK_KHR_dedicated_allocation, VK_KHR_get_memory_requirements2 which are not on the wip-mem-obj-v4 branch. Can you test with https://github.com/airlied/mesa/tree/radv-wip-steamvr-master and at least confirm that is working for you? That branch has those extensions. Unfortunately, the radv-wip-steamvr-master branch does not have the OpenGL interop extensions which it looks like is what you are wanting to test. What you need is the radv-wip-steamvr-master branch + lostgoat's OpenGL interop extensions. |
danginsburg
commented
Jul 19, 2017
|
Also, for the record, I know you are not on NVIDIA but 381.26.08 is required on NVIDIA to get the new KHR extensions + GL interop. |
ChristophHaag
commented
Jul 19, 2017
|
I have those two branches merged (https://github.com/ChristophHaag/mesa-mesa/commits/master). SteamVR home etc. works. Vivecraft is actually playbable now. |
danginsburg
commented
Jul 19, 2017
|
OK, so OpenGL interop is working for you in general, but not RBDoom3BFG? I'll need to get that to try to repro. |
ChristophHaag
commented
Jul 19, 2017
•
|
It's not directly related to this bug report, but maybe still useful for testing: ChimeraX is a closed source OpenGL application. It works, but runs at like 5 fps, though that might be the application's fault. https://www.rbvi.ucsf.edu/chimerax/download.html / https://www.rbvi.ucsf.edu/chimerax/docs/user/vr.html JanusVR is a closed source OpenGL application. It renders garbage in the right eye, but the left eye works with good performance. In the past it has rendered both eyes correctly, but back then of course very slow. www.janusvr.com/download.php Vivecraft seems to fully work and runs relatively smoothly, but still slightly stutters. |
danginsburg
commented
Jul 19, 2017
|
I'm still trying to understand the problem and what RBDoom3BFG is doing to trigger it, but I do have a workaround. What is happening is that inside of steamvr when we call vkEnumerateInstanceExtensionProperties to determine the list of instance extensions supported by the Vulkan driver, for some reason the libvulkan.so.1 in the steam-runtime is not returning all of the extensions. This is odd, because it seems to work fine on other applications I've tried, so I'm not sure what about Doom 3 is triggering the problem yet. However, one thing you can do is download https://vulkan.lunarg.com/sdk/home#sdk/downloadConfirm/1.0.54.0/linux/vulkansdk-linux-x86_64-1.0.54.0.run Unzip it to a directory, then put at the front of your LD_LIBRARY_PATH something like: LD_LIBRARY_PATH=/path/to/VulkanSDK/1.0.54.0/x86_64/lib: This gets me further, although I'm getting a bunch of errors during startup about GLSL 1.50 not being supported so it's just rendering black, but it avoids the crash. |
danginsburg
self-assigned this
Jul 19, 2017
ChristophHaag
commented
Jul 19, 2017
|
I think it was working with |
danginsburg
commented
Jul 19, 2017
|
Actually, digging into this more, I think I have a handle on the problem. The issues are:
which you will notice does not end up including VK_KHR_external_memory_capabilities and VK_KHR_external_semaphore_capabilities in the list of "Instance Extensions".
In the meantime, both problems can be worked around by the aforementioned use of the 1.0.54.0 vulkan loader in your LD_LIBRARY_PATH, but I'll work on getting these two issues fixed and pushed out. Unfortunately I missed this because when I was testing vrclient with validation I had been using the v1.0.54.0 SDK so the extensions were getting exposed for me. |
danginsburg
commented
Jul 19, 2017
|
Using MESA_GL_VERSION_OVERRIDE=4.5COMPAT MESA_GLSL_VERSION_OVERRIDE=450 I do see a brief loading screen in the HMD but then black. |
ChristophHaag
commented
Jul 19, 2017
|
It actually works. while the menu is shown in the preview window, nothing is displayed in the hmd. you have to navigate witha combination of mouse input and the hmd orientation to the menu in the preview window and start a game. Then it works. |
danginsburg
commented
Jul 19, 2017
•
|
Yeah, OK, I figured that out. I was able to navigate the menu and start a new campaign but didn't actually get into the game. Seemed to be working well up until that point. (Edit: nevermind, had to click on the window...running now) |
ChristophHaag
commented
Jul 19, 2017
danginsburg
commented
Jul 19, 2017
|
OK, you can file a separate issue on perf if you think there's an issue there. On RX 480 I've found I've needed to do this to get performance with VR otherwise it downclocks: sudo echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level I'll note that mesa is currently missing the GL interop semaphore extensions which should help performance some by avoiding a glFinish() during the Submit() call. The support is there in SteamVR and works on NVIDIA, the extensions are still being worked on for mesa. |
ChristophHaag
commented
Jul 19, 2017
|
Yes, I'm running with dpm on high and also the cpu governor on performance. There's already #23 but let's wait until everything is implemented. Afaik only the kernel patch and libdrm patch are on the mailing lists and the radv integration hasn't been written yet. |
danginsburg
commented
Jul 20, 2017
|
@ChristophHaag I was trying to look into the right eye corruption in JanusVR, but can't figure out how to launch it to use the Vive. Can you post repro instructions? |
danginsburg
commented
Jul 20, 2017
|
Regarding ChimeraX, the application is GPU limited. If you do "lighting simple" prior to "vr on" it runs at 90hz. |
ChristophHaag
commented
Jul 20, 2017
|
You're right, ChimeraX runs perfect with "lighting simple". Thanks for checking. JanusVR uses steamvr when I just run it as |
danginsburg
commented
Jul 20, 2017
|
The issue with janusvr was that I couldn't run it from the steam-runtime and vrclient.so depends on libudev.so.0 which was not on my system. Installing that corrected it, I've repro'd the right eye bug. |
beniwtv
commented
Jul 21, 2017
|
I noticed some jerkyines on OpenGL applications still as well - also have an RX480. Might be because of that lostgoat's wip-mem-obj-v4 branch I'm missing here. Vulkan does work fine as of semi-latest (need to update, my build is a few days old) Mesa-Master Git (no special branches or merges) and latest SteamVR, without any perf overrides, at least on Serious Sam: First encounter HD and on SteamVR Home. |
ChristophHaag
commented
Jul 21, 2017
|
Without the wip-mem-obj-v4 branch, OpenGL applications should not be just a bit jerky, but really, really bad. Anyway, if you have at least 4.13-rc1 and the latest libdrm, you can use https://github.com/airlied/mesa/commits/radv-wip-shared-sem to get a proper implementation of VK_KHR_external_semaphore. The default summit pavillion in SteamVR Home is working okay, but is very gpu intensive, reprojection is always on and just rotation the head left and right for a while shows short freezes every couple of seconds, I'm guessing this is because the gpu load is so high, so I'm hoping once we have high priority rendering this will be much better. Speaking of high load, wow, Vivecraft is much more cpu and gpu intensive than I thought it should be. |
danginsburg
commented
Jul 21, 2017
|
This bug has morphed into a bunch of issues, but the next SteamVR Beta update will have the following fixes from this bug:
If you guys have other issues with other apps, please open a new issue so they can be tracked separately. Thanks @ChristophHaag for the great bug reporting. I'll keep this one open until the next SteamVR beta update ships. |
danginsburg
commented
Jul 24, 2017
|
The fixes for the issues here are in the latest SteamVR Beta update: http://steamcommunity.com/games/250820/announcements/detail/1423552564379225564 |
ChristophHaag
commented
Jul 24, 2017
|
It does. It also fixes some corruption in Vivecraft, the dialog box over the left controller "look around etc." was corrupted before, now it's fine. Thanks. |


ChristophHaag commentedJul 18, 2017
Your system information
Please describe your issue in as much detail as possible:
Code from this repository: https://github.com/Codes4Fun/RBDOOM-3-BFG/
build with cd neo; cmake .; make
start ./RBDoom3BFG
segfault:
The same code has worked in earlier SteamVR versions, see Codes4Fun/RBDOOM-3-BFG#83 (comment)