Skip to main content

Posts

Showing posts with the label mac

Optimizing Wine on OS X

I've been doing some performance analysis of EVE running under Wine on OS X. My main test cases are a series of scenes run with the EVE Probe - our internal benchmarking tool. This is far more convenient than running the full EVE client, as it focuses purely on the graphics performance and does not require any user input. Wine Staging One thing I tried was to build Wine Staging . On its own, that did not really change anything. Turning on CSMT, on the other hand, made quite a difference, taking the average frame time down by 30% for the test scene I used. While the performance boost was significant there were also significant glitches in the rendering, with parts of the scene flickering in and out. Too bad - it means I can't consider this yet for EVE, but I will monitor the progress of this. OpenGL Profiler Apple has the very useful OpenGL profiler available for download . I tried running one of the simpler scenes under the profiler to capture statistics on the...

Building Wine on Mac

The EVE launcher downloads a version of Wine that is built from CCP's own fork of Wine. This fork lives on GitHub at https://github.com/ccpgames/wine.git. If you want to build this version yourself, here are some instructions to get you started. Wine has quite a few dependencies we have to fulfil before attempting to build. The first one is Xcode - if you don't have that already installed, get it from the App Store. Note that after installing Xcode you need to run it once to accept the license agreement before being able to use it in the build scripts later. The other dependencies are easiest to get via brew - get it from brew.sh if you haven't already. Wine already exists as a brew recipe, and we can use that to pull down the dependencies. First, though, we need to get XQuartz: brew install Caskroom/cask/xquartz Then to get Wine and its dependencies: brew install --devel wine This takes an hour or so, just so you know. Now everything should be ready to g...

SSL issues in the ingame browser

EVE Online has an ingame browser, and under Wine that browser has issues with opening some websites using https. Those sites work in the game under Windows, so I knew it wasn't a browser issue per se. It wasn't an issue with all sites using https, either, so it wasn't a matter of SSL not working at all, either. With the help of CCP's security expert, we noticed that the sites that were failing had certificate chains up to a root certificate with a very strong signature algorithm, ecdsa-with-SHA384, and chances were that Wine did not support that particular algorithm. Now what? Personally I'm no expert in security algorithms, SSL or TSL or anything like that, so I wasn't sure where to even begin looking at Wine source code to see if this algorithm was supported. After some digging around I decided to look at the output of the secur32 channel: export WINEDEBUG=+secur32 Then I started up the EVE client and opened up the browser, entering https://zkillboar...

The ever growing window

One issue with the EVE client running under Wine is that when starting in windowed mode, the window would grow by a few pixels every time. I spent some time trying to figure this out and wanted to document my findings here before forgetting all the details. Rather than digging directly into Wine source code I started by looking at how the window is created in our code. That code is a bit convoluted, to say the least, and largely hasn't been touched in years. But hey, it works, right, and if it ain't broken don't fix it. There are two parts to the story when creating the window - there is the window itself, and the Direct3D backbuffer that is drawn in the window. When the window is resized, the backbuffer is recreated to fit the window. The Python code calls trinity.app.ChangeDevice, which internally creates the window if it doesn't already exist, then creates a backbuffer of the appropriate size. The window proc for the window handles the WM_ENTERSIZEMOVE and WM_...