在 VMware Workstation 15 Player 下更改 Ubuntu 18.04 VM 中的 Mesa 驱动程序

在 VMware Workstation 15 Player 下更改 Ubuntu 18.04 VM 中的 Mesa 驱动程序

我在 VMware Workstation 15 Player 下运行 Ubuntu 18.04 VM。

我想要运行的一个应用程序崩溃了,因为它带有自己的 LLVM 共享库,这些库会干扰系统的库,特别是 Mesa OpenGL 驱动程序使用的 LLVM 库。

以下是相关的输出glxinfo

$ glxinfo
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    [snip]
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    [snip]
GLX version: 1.4
GLX extensions:
    [snip]
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: VMware, Inc. (0x15ad)
    Device: SVGA3D; build: RELEASE;  LLVM; (0x405)
    Version: 19.0.8
    Accelerated: no
    Video memory: 1MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 2.0
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: SVGA3D; build: RELEASE;  LLVM;
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.0.8
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

有没有办法指示 Mesa 使用不依赖 LLVM 的其他后端?我可以接受渲染性能严重下降。

就我的尝试而言,基于https://www.mesa3d.org/envvars.html,我尝试过设置GALLIUM_DRIVERsoftpipeswr但似乎没有任何效果,应用程序仍然会崩溃。

以下是应用程序崩溃时调用堆栈的相关部分:

#0  0x00007fffe32cff5b in llvm::RegisterPassParser<llvm::MachineSchedRegistry>::NotifyAdd(llvm::StringRef, void* (*)(), llvm::StringRef) ()
   from /home/franz/Projects/prebuilt-linux-deps/lib/libLLVMCodeGen.so.5
#1  0x00007fffc88cb43d in ?? () from /usr/lib/x86_64-linux-gnu/libLLVM-7.so.1
#2  0x00007ffff7de5733 in call_init (env=0x555555eef760, argv=0x7fffffffde08, argc=1, l=<optimized out>) at dl-init.c:72
#3  _dl_init (main_map=main_map@entry=0x555556009f40, argc=1, argv=0x7fffffffde08, env=0x555555eef760) at dl-init.c:119
#4  0x00007ffff7dea1ff in dl_open_worker (a=a@entry=0x7fffffffc7b0) at dl-open.c:522
#5  0x00007ffff32c22df in __GI__dl_catch_exception (exception=0x7fffffffc790, operate=0x7ffff7de9dc0 <dl_open_worker>, args=0x7fffffffc7b0) at dl-error-skeleton.c:196
#6  0x00007ffff7de97ca in _dl_open (file=0x7fffffffca40 "/usr/lib/x86_64-linux-gnu/dri/vmwgfx_dri.so", mode=-2147483390, caller_dlopen=0x7fffd966dfca, nsid=<optimized out>, argc=1, argv=<optimized out>, 
    env=0x555555eef760) at dl-open.c:605
#7  0x00007ffff1dd6f96 in dlopen_doit (a=a@entry=0x7fffffffc9e0) at dlopen.c:66
#8  0x00007ffff32c22df in __GI__dl_catch_exception (exception=exception@entry=0x7fffffffc980, operate=0x7ffff1dd6f40 <dlopen_doit>, args=0x7fffffffc9e0) at dl-error-skeleton.c:196
#9  0x00007ffff32c236f in __GI__dl_catch_error (objname=0x555555ba6270, errstring=0x555555ba6278, mallocedp=0x555555ba6268, operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:215
#10 0x00007ffff1dd7735 in _dlerror_run (operate=operate@entry=0x7ffff1dd6f40 <dlopen_doit>, args=args@entry=0x7fffffffc9e0) at dlerror.c:162
#11 0x00007ffff1dd7051 in __dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:87
#12 0x00007fffd966dfca in ?? () from /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
#13 0x00007fffd967109e in ?? () from /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
#14 0x00007fffd9648e34 in ?? () from /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
#15 0x00007fffd9644af2 in ?? () from /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
#16 0x00007fffd9645e42 in ?? () from /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
#17 0x00007ffff179d651 in glXChooseFBConfig () from /usr/lib/x86_64-linux-gnu/libGLX.so.0
#18 0x00007ffff7feb30f in ?? () from /home/franz/anaconda3/plugins/xcbglintegrations/libqxcb-glx-integration.so
#19 0x00007ffff7feb505 in ?? () from /home/franz/anaconda3/plugins/xcbglintegrations/libqxcb-glx-integration.so
#20 0x00007ffff7fe88d1 in ?? () from /home/franz/anaconda3/plugins/xcbglintegrations/libqxcb-glx-integration.so
#21 0x00007fffdc59a4ea in QXcbWindow::create() () from /home/franz/anaconda3/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#22 0x00007fffdc58caec in QXcbIntegration::createPlatformWindow(QWindow*) const () from /home/franz/anaconda3/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#23 0x00007ffff3dfb62d in QWindowPrivate::create(bool, unsigned long long) () from /home/franz/anaconda3/lib/libQt5Gui.so.5

正如我们所见,libGLX_mesa.so.0最终调用/home/franz/Projects/prebuilt-linux-deps/lib/libLLVMCodeGen.so.5(应用程序的 LLVM 共享库)并崩溃。

相关内容