You are not logged in.

Read the FAQ and Knowledge Base before posting.
We won't make a 3DS/2DS emulator.



#1 2014-07-12 10:28:04

RAMChYLD
Member
Registered: 2014-07-11
Posts: 1

DeSmuMe linux: OSMesaCreateContext failed

First post here, forgive me if I posted to the wrong place.

I'm trying to build DeSmuMe on Ubuntu Linux 14.04. I've built things for my own for years and know how to pull down the necessary dev files.

The first problem I encountered during build is that DeSmuMe keeps saying that I do not have Lua even though I do. I realized that it's looking for lua.pc when on my distribution the file is usually named lua<version number>.pc, ie lua5.2.pc. Creating a symlink fixed that, but it would be nice if configure can be made to look for lua*.pc instead of a lua.pc

My second problem is this. Building the software went fine, but when I try to run it with OpenGL hardware acceleration, I get the error

OSMesaCreateContext failed!
Failed to initialise openGL 3D emulation; removing 3D support

Which  is puzzling as I have the required libraries and dev files installed.

$ dpkg -l | grep osmesa
ii  libosmesa6:amd64                                            10.3.0~git20140710.acaed8f4-0ubuntu0sarvatt~trusty     amd64        Mesa Off-screen rendering extension
ii  libosmesa6:i386                                             10.3.0~git20140710.acaed8f4-0ubuntu0sarvatt~trusty     i386         Mesa Off-screen rendering extension
ii  libosmesa6-dev                                              10.3.0~git20140710.acaed8f4-0ubuntu0sarvatt~trusty     amd64        Mesa Off-screen rendering extension -- development files

As a result it keeps using swrast which has awful performance.

Any help on where I went wrong would be great. Thanks.

----

Edit:
Ok, so I disabled osmesa support and OpenGL now works, but performance is still horrible. I need to figure out how to enable JIT and change other settings in Linux.

I'd use the Windows version, but for some reason the touch screen I have refuses to cooperate in Windows (the cursor keeps jumping all over the place when I try to use it in-game).

Last edited by RAMChYLD (2014-07-12 11:03:44)

Offline

#2 2014-07-13 03:46:37

alvinhochun
Member
Registered: 2014-02-07
Posts: 61

Re: DeSmuMe linux: OSMesaCreateContext failed

Well I've never touched the OpenGL renderer because the software rasterizer is perfect for me and I figured out OpenGL wouldn't help much.

Same for LUA since I have no use with that at the moment. Though the dependency resolution should depend on pkg-config, perhaps it isn't related to DeSmuME's build scripts.

About performance, have you read the WiKi about optimization? The performance will be absolutely terrible without aggressive optimization. See http://wiki.desmume.org/index.php?title … e_on_Linux and http://wiki.desmume.org/index.php?title … tion#Linux

To enable jit, run with `desmume --cpu-mode=1`

Last edited by alvinhochun (2014-07-13 03:50:41)

Offline

#3 2014-07-22 02:29:18

axfelix
Member
Registered: 2014-07-22
Posts: 3

Re: DeSmuMe linux: OSMesaCreateContext failed

I've actually never been able to get good performance in DeSmuME out of OpenGL on Linux -- the strange thing is that when I enable it, it gives the version string as 2.1 as though it's using the Gallium Intel drivers rather than the 3.1 drivers that are available in the default context, and I haven't been able to fix that by setting any environment variables.

I can get fullspeed no problem when using the software rasterizer and the JIT, but the graphics seem to be buffered in some awful way that makes otherwise nicely-animated 2D games run at what looks to be 30fps or worse, so I wish I had a solution ... the --opengl-2d argument mentioned in the wiki appears to be unrecognized, and I don't have any other ideas.

Last edited by axfelix (2014-07-22 02:31:14)

Offline

#4 2014-07-22 06:03:44

axfelix
Member
Registered: 2014-07-22
Posts: 3

Re: DeSmuMe linux: OSMesaCreateContext failed

Nevermind, problem solved by compiling myself smile

I think the Debian package that's pulled upstream into Ubuntu is perhaps compiled a bit too conservatively -- I almost never need to compile things on my own for performance reasons but this made a huge difference.

Offline

#5 2014-07-23 06:59:56

alvinhochun
Member
Registered: 2014-02-07
Posts: 61

Re: DeSmuMe linux: OSMesaCreateContext failed

axfelix wrote:

Nevermind, problem solved by compiling myself smile

I think the Debian package that's pulled upstream into Ubuntu is perhaps compiled a bit too conservatively -- I almost never need to compile things on my own for performance reasons but this made a huge difference.

The Debian/Ubuntu package is crap and hasn't been updated for years. The more recent svn version has a new display code, frameskip code and fps limiter for GTK+ written by myself and it runs much better.

When using Linux, always compile yourself if possible.

Last edited by alvinhochun (2014-07-23 07:19:28)

Offline

#6 2014-07-26 17:29:15

axfelix
Member
Registered: 2014-07-22
Posts: 3

Re: DeSmuMe linux: OSMesaCreateContext failed

Generally I disagree -- I like package managers! -- but it definitely helped in this case!

Offline

Board footer

Powered by FluxBB