kjliew / qemu-3dfx

MESA GL/3Dfx Glide pass-through for QEMU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

qemu crashing when starting mesapt

casasfernando opened this issue · comments

commented

I searched the issues but couldn't find anything.
Whenever I try to load any application that uses OpenGL (e.g.: wglgears) qemu is crashing with the following error:

Soldier Of Fortune:

mesapt: DLL loaded
glcntx: ChoosePixelFormat()
glcntx: FBConfig 0x17c visual 0x021 nAux 0 nSamples 0 0 vidMode 1 
glcntx: MESAGL window [native (nil)] ready
mesapt: ..hooked timeGetTime
glcntx: SetPixelFormat()
mesapt: wglCreateContext cntx 0 curr 0
mesapt: wglMakeCurrent cntx 1 curr 0 lvl 0
mesapt: b2a5d4c-18:36:57 Jul 27 2023 build WRAPGL32
mesapt: VertexArrayCache 32MB
mesapt: DispTimerSched 2000ms
mesapt: MappedBufferObject One-copy
mesapt: Guest GL Extensions pass-through for Year ALL Length ANY
mesapt: Mesa Intel(R) Xe Graphics (TGL GT2) [ 36 ]
mesapt: Intel [ 6 ]
mesapt: Mesa Intel(R) Xe Graphics (TGL GT2) [ 36 ]
mesapt: 4.6 (Compatibility Profile) Mesa 22.2.5-0ubuntu0.1~22.04.3 [ 59 ]
mesapt: Guest GL Extensions limit to Year 2000
mesapt: Mesa Intel(R) Xe Graphics (TGL GT2) [ 36 ]
mesapt: Intel [ 6 ]
mesapt: Mesa Intel(R) Xe Graphics (TGL GT2) [ 36 ]
mesapt: 4.6 (Compatibility Profile) Mesa 22.2.5-0ubuntu0.1~22.04.3 [ 59 ]
mesapt: Guest GL Extensions limit to Year 2000
glcntx: wglSwapIntervalEXT(1) ret 1                       
X Error of failed request:  GLXBadDrawable
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  11 (X_GLXSwapBuffers)
  Serial number of failed request:  31
  Current serial number in output stream:  31

wglgears.exe:

mesapt: DLL loaded
glcntx: ChoosePixelFormat()
glcntx: SetPixelFormat()
mesapt: wglCreateContext cntx 0 curr 0
mesapt: wglMakeCurrent cntx 1 curr 0 lvl 0
mesapt: b2a5d4c-18:36:57 Jul 27 2023 build WRAPGL32
mesapt: VertexArrayCache 32MB
mesapt: DispTimerSched 2000ms
mesapt: MappedBufferObject One-copy
mesapt: Guest GL Extensions pass-through for Year ALL Length ANY
X Error of failed request:  GLXBadDrawable
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  11 (X_GLXSwapBuffers)
  Serial number of failed request:  34
  Current serial number in output stream:  34

wglinfo.exe runs fine:

mesapt: DLL loaded
glcntx: ChoosePixelFormat()
glcntx: FBConfig 0x17c visual 0x021 nAux 0 nSamples 0 0 vidMode 1 
glcntx: MESAGL window [native (nil)] ready
glcntx: SetPixelFormat()
mesapt: wglCreateContext cntx 0 curr 0
mesapt: wglMakeCurrent cntx 1 curr 0 lvl 0
mesapt: b2a5d4c-18:36:57 Jul 27 2023 build WRAPGL32
mesapt: VertexArrayCache 32MB
mesapt: DispTimerSched 2000ms
mesapt: MappedBufferObject One-copy
mesapt: Guest GL Extensions pass-through for Year ALL Length ANY
mesapt: Mesa Intel(R) Xe Graphics (TGL GT2) [ 36 ]
mesapt: Mesa Intel(R) Xe Graphics (TGL GT2) [ 36 ]
mesapt: Intel [ 6 ]
mesapt: 4.6 (Compatibility Profile) Mesa 22.2.5-0ubuntu0.1~22.04.3 [ 59 ]
mesapt: 4.60 [ 5 ]
mesapt: Guest GL Extensions limit to Year 2000
mesapt: wglDeleteContext cntx 1 curr 1 lvl 0
mesapt: VertexArrayStats: elemMax 000000 vertexCache 0000
mesapt: MGLStats: fifo 0x0000000 data 0x0000000
mesapt: DLL unloaded

System details:

OS: elementary OS 7 Horus x86_64 
Host: XPS 13 9310 
Kernel: 5.19.0-50-generic 
Mesa: 22.2.5
Resolution: 3840x2400 
DE: Pantheon 
WM: Mutter(Gala) 
Terminal: io.elementary.t 
CPU: 11th Gen Intel i7-1185G7 (8) @ 4.800GHz 
GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics] 
Memory: 15700MiB 

I suspect I need to tune mesa's parameters on my host (e.g.: MESA_GL_VERSION_OVERRIDE) on top of limiting GL extensions, but I'm a bit lost.

Any ideas?

Thanks

commented

Nevermind. The problem was caused by me building qemu-3dfx in a Debian 12 environment and then trying to use the same bits on an elementary OS 7 machine.
I thought it may work (I'm doing something similar with other software pieces) but it's not the case.

Do you think that this scenario would work?
1- Different qemu-3dfx builds on different systems. On each system using the local distro environment and built against the same qemu-3dfx revision (commit).
2- Only one portable guest VM disk containing the wrappers (3dfx + mesa) built against the same qemu-3dfx revision (commit) used in point 1.

I'm thinking about having a VM image that I can play with on different machines (laptop, desktop, steam deck) running different distros and versions but maybe it's too much.

Thanks

commented

This fork solved the problem you have.
hughobrien#16

"Build once, use many" is unfortunately a pipe dream for Linux distros.

commented

"Build once, use many" is unfortunately a pipe dream for Linux distros.

And yet we have AppImage that many emulators use successfully, including XEMU (qemu based as well), RPCS3, PCSX2, etc. I guess I was trying to achieve something similar.

Thanks for looking into this.

commented

True, AppImage and Flatpak alike are trying to address the problem to offer the "Windows" experience in apps distribution. They may work for some though IMHO they are hardly the ideal solution for Open Source philosophy.