OpenGL passthrough fails followed by QEMU crashing with Windows 98SE guest
sedme0 opened this issue · comments
When I try to run any OpenGL program, I get the same error, and QEMU always crashes. So far, I've tried Half-Life 1 (unpatched retail release) and a benchmark program called 3dexercizer (it was the first one that came up when I searched for an OpenGL benchmark for Windows 98). I'm using QEMU 5.2.0 on Debian 11. My QEMU settings are as follows:
./qemu-system-x86_64 \
-no-hpet \
-no-reboot \
-m 1024 \
-rtc base=localtime \
-drive file=win98se.qcow2 \
-device ich9-usb-ehci1 \
-device usb-tablet \
-device VGA \
-display sdl \
-M pc \
-device AC97 \
-netdev user,id=net0 -device rtl8139,netdev=net0 \
-L pc-bios
Here's the log:
mesapt: DLL loaded
glcntx: ChoosePixelFormat()
glcntx: FBConfig 0x0a5 visual 0x021 nAux 4 nSamples 0 0 vidMode 1
glcntx: MESAGL window [native 0x7c00028] ready
glcntx: ChoosePixelFormat()
mesapt: ..hooked QueryPerformanceCounter
glcntx: SetPixelFormat()
mesapt: wglCreateContext cntx 0 curr 0
mesapt: wglMakeCurrent cntx 1 curr 0 lvl 0
mesapt: bb591d9-18:28:57 May 16 2022 build WRAPGL32
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 151 (GLX)
Minor opcode of failed request: 26 (X_GLXMakeContextCurrent)
Serial number of failed request: 31
Current serial number in output stream: 31
qemu-system-x86_64: ../src/GLX/libglx.c:970: CommonMakeCurrent: Assertion `oldCtxInfo != NULL' failed.
Aborted
Same thing happens when I use qemu-system-i386
. I'm not using KVM because it makes Windows 98 unbootable on Ryzen CPUs.
Kill the line.
$ grep -nH ALPHA_SIZE ../qemu-5.2.0/ui/sdl2.c
../qemu-5.2.0/ui/sdl2.c:824: SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
It is believed to be the GREEN Goblin Linux OpenGL driver issue. Feel free to report the bug for them to fix it or fork and maintain a working build for them. The BLUE & RED camp are fine.
Kill the line.
$ grep -nH ALPHA_SIZE ../qemu-5.2.0/ui/sdl2.c ../qemu-5.2.0/ui/sdl2.c:824: SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
It is believed to be the GREEN Goblin Linux OpenGL driver issue. Feel free to report the bug for them to fix it or fork and maintain a working build for them. The BLUE & RED camp are fine.
That works! Thanks! Well, it works for Half-Life, that benchmark just shows a striped image of blue and black vertical bars. I'm not really concerned about some random benchmark, though. Are there any side effects to removing that line?