JayFoxRox / xqemu-espes

Archive only. Repository moved to JayFoxRox/xqemu
https://github.com/JayFoxRox/xqemu
24 stars 1 forks source link

Switch from GLEW to epoxy #29

Closed JayFoxRox closed 6 years ago

JayFoxRox commented 6 years ago

This implements epoxy as backend for glo (which used to use GLEW). As epoxy does not do context management, I decided to stick to glo (QEMU uses EGL exclusively)

I did not integrate epoxy directly in our codebase yet due to unfamiliarity with their API, and because I didn't want to delay fixing master.

The display flickers with Gtk, but works fine with SDL. As I can't run XQEMU without this patch, I don't know if this change is responsible for that problem or not.


As I'm almost exclusively Linux (GLX) user. Therefore I depend on test results by macOS (CGL) and Windows (WGL) users. Please confirm that XQEMU compiles and runs fine on those platforms with these changes.


TODO:

illwieckz commented 6 years ago

It works on my end, obsoleting xqemu/xqemu#13 and fixing xqemu/xqemu#53 and xqemu/xqemu#20

I tested it on this system:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04 LTS
Release:    18.04
Codename:   bionic

$ uname -a
Linux gollum 4.16.0-16.2-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix 4.16-9.1~sid (2018-06-19) x86_64 x86_64 x86_64 GNU/Linux

$ glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: AMD Radeon (TM) R9 390 Series (HAWAII, DRM 3.23.0, 4.16.0-16.2-liquorix-amd64, LLVM 6.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.1.1 - padoka PPA
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 18.1.1 - padoka PPA
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.1.1 - padoka PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

$ dpkg -l | grep 'mesa.*-dev:\|epoxy.*-dev:'
ii  libegl1-mesa-dev:amd64                        18.1.1-0~b~padoka0                                                          amd64        free implementation of the EGL API -- development files
ii  libepoxy-dev:amd64                            1.4.3-1                                                                     amd64        OpenGL function pointer management library- development
ii  libgl1-mesa-dev:amd64                         18.1.1-0~b~padoka0                                                          amd64        free implementation of the OpenGL API -- GLX development files
ii  libgles2-mesa-dev:amd64                       18.1.1-0~b~padoka0                                                          amd64        free implementation of the OpenGL|ES 2.x API -- development files
ii  libglu1-mesa-dev:amd64                        9.0.0-2.1build1                                                             amd64        Mesa OpenGL utility library -- development files
ii  mesa-common-dev:amd64                         18.1.1-0~b~padoka0                                                          amd64        Developer documentation for Mesa
mborgerson commented 6 years ago

Please add "-lepoxy" on line ./configure line 2951 such that:

if test "$darwin" = "yes" ; then
    sdl_libs="$sdl_libs -framework OpenGL -lepoxy"
...
JayFoxRox commented 6 years ago
mborgerson commented 6 years ago

Appears to be crashing in Windows for unknown reasons. Needs further investigation before merging.

JayFoxRox commented 6 years ago

Moved to https://github.com/JayFoxRox/xqemu/pull/1 to kickoff another CI. I'll integrate all reports from this one in the new repo and make sure the existing review / testing is not forgotten in upstream PR.