It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
I said in the announcement thread that I wouldn't touch this unless I had confirmation that this works in Wine+Mesa. I guess I lied (or at least I'm an idiot). Since the bug mentioned in the release thread (https://bugs.winehq.org/show_bug.cgi?id=43357) implied that it might work, I bought it anyway. And, as expected, it did not work, even with the patch from the bug report. At least the problem I found was easy enough to fix.

At startup, it compiles a bunch of shaders, and fails (and exits the program) on many of them. Well, at least unlike many other modern games, it tells me that it failed, rather than assuming success and crashing later on. The reason they fail to compile is that Mesa considers texture2DLod to be a GLSL 1.3+ function, but all the shaders claim to be 1.2. I manually edited the version number on all failed shaders (24 of them), and got to the main menu. Previous versions seemed to just hang on generating the galaxy, but as of the latest version, the game finally starts, but reports additional failed shader compiles. I manually edited the version number on these 3 as well, and finally have what appears to be a working game. However, given the manual process I used to edit the shaders (MESA_SHADER_DUMP_PATH+game crash+edit+MESA_SHADER_READ_PATH), I expect the game will fail randomly at some point in the future, as well. There are better solutions:

1) Ashdar Games could fix the shaders. Note that I cannot manually edit the shaders directly, as they are hidden in some archive. I expect this will involve fixing some cg compiler configuration.
2) A shim could auto-edit the shaders. I can't use Linux .so overrides, because Wine manually loads and binds the functions from the GL library. This leaves some sort of Windows library override or Wine redirect, neither of which I know how to do (and the latter of which is only available on staging, anyway).
3) Run a custom version of Wine and/or Mesa which addresses this issue. I don't really like munging system libraries just to play a game, unless it is an actual bug fix or feature extension.

Maybe I'll work on #2 and/or #3, or maybe somebody who actually knows what they're doing can tell me an easier fix. In the mean time, I'll just play other games.
avatar
darktjm: 1) Ashdar Games could fix the shaders. Note that I cannot manually edit the shaders directly, as they are hidden in some archive. I expect this will involve fixing some cg compiler configuration.
The guts get a bit complex, because SiS uses Cg shaders (compiled to NVIDIA's old fp40 spec) in the case that we're running on NVIDIA hardware, but, GLSL shaders (cross compiled via Cg) if we're running on anything else.

I would bet it's the cross compiled shaders that have the 1.2 version string written into them, and as they're actually being written by an old Cg subroutine, this isn't as trivial a fix as it might appear. NVIDIA stopped officially supporting Cg years ago, and the latest 'official' GLSL build has some strange issues targeting GLSL versions higher than 1.2.

(Note: this isn't to say that higher versions of GLSL can't be targeted, just that if you target them, Cg has a tendency to output buggy code -- meanwhile, internally, Cg never appears to believe that the device it's running on is capable of executing anything more sophisticated than 1.2 code -- which is also odd.)

The easiest fix workaround (that doesn't involve introducing strange bugs by asking Cg to output more sophisticated GLSL code), is probably just to run a string replace over the GLSL source code output by Cg. I'd try to following patch:

On line 407 of Lua state/shaders.lua, add the command:

src=src:gsub('version 120', 'version 130')


And please let me know if that helps anything. (As best as I can tell, this is a fairly harmless substitution on any of the hardware that we're officially supporting, so if it does improve things on Mesa/Wine I'd be happy to merge it into the main branch.)
avatar
sven2718: And please let me know if that helps anything. (As best as I can tell, this is a fairly harmless substitution on any of the hardware that we're officially supporting, so if it does improve things on Mesa/Wine I'd be happy to merge it into the main branch.)
Also: I probably should have posted this reply with my official 'dev' account. Um, Sven==Ashdar Games Inc. ;-)
Post edited July 30, 2017 by ashdar_games_inc
avatar
sven2718: On line 407 of Lua state/shaders.lua, add the command:

src=src:gsub('version 120', 'version 130')
OK... Well, this morning I ran into another shader compile failure, and with no net access, I didn't see your response. Instead, I went ahead and made a small hack/shim library to replace glShaderSource for Wine, which does pretty much the same thing (option #2 in my post above). Works fine. However, I went ahead and tried your solution as well (moved up a few lines, so before the load_glsl_shader line), and that works fine, too. Thanks.

Note that the wine version I'm using now is wine-2.13-staging, which needs no patch for bug#43357, so with the version mangling patch above (or my own patch, which I'll probably stop using), the game appears to work fine (both sis.exe and sis64.exe, although I probably won't be testing/running sis.exe any more since sis64.exe is noticably faster).
avatar
darktjm: with no net access, I didn't see your response.
Sorry you went through this hassle -- but thanks for the debugging work. I believe there are a number of Linux users who will be happy to see improved Wine compatibility.
avatar
darktjm: I went ahead and tried your solution as well (moved up a few lines, so before the load_glsl_shader line), and that works fine, too. Thanks. Note that the wine version I'm using now is wine-2.13-staging, which needs no patch for bug#43357...
Cool (and thanks for catching the line-number bug). I've checked the GLSL version patch into the main branch, it should roll out broadly as part of the next official update. However, if anyone wants to opt-in now, they should be able to get it via GoG Galaxy by going into Settings, and switching to the 'Patch Testing' branch.

All that said, with my official Ashdar Games Inc. hat on, I should stress that any kind of Linux compatibility remains unsupported / experimental. (In all honesty, I don't know nearly enough about debugging Wine issues to respond to the sorts of issues that are likely to come up when other people start trying this.)