Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
There are a few inaccuracies in the OP but it is correct that the game's vertex shaders redeclare gl_VertexID, which causes them to fail to compile, and the screen to be black. I was able to fix it in my copy of the game by running the following sed command on optimized_opengl.mp and libropengl.so:
This replaces the "#define OPENGL_DECLARE_VERTEX_ID 1" line with a dummy define, preventing the redeclaration. Remove this and the game runs, though it requires MESA_GL_VERSION_OVERRIDE=4.5 and MESA_GLSL_VERSION_OVERRIDE=450 to be set, as it will otherwise attempt to create a compatibility context which is not supported.
I would also like to point out that this is incorrect:
The game does not use the fixed-function pipeline, nor does it require a real compatibility profile. Ever since the game was released, it was universally believed that the Mesa problem was due to the lack of support for compatibility profiles. The real issue is the shaders failing to compile due to the aforementioned redeclaration and it has nothing whatsoever to do with the compatibility profile.
If you run an apitrace on this game (which I did and combed over it for days), you will see glBegin() and other legacy functions being called in Frame 0, probably for the splash screen. That, in fact, is SDL's doing[github.com], and the game does not use such legacy functions past this point.
I believe that the reason that the game needs the GL version overrides is because the developers didn't call SDL_GL_SetAttribute to set SDL_GL_CONTEXT_MAJOR_VERSION and SDL_GL_CONTEXT_MINOR_VERSION (and perhaps SDL_GL_CONTEXT_PROFILE_MASK). By default, SDL requests a OpenGL 2.1 context. Which a driver will convert to a compatibility context. But the game also requires OpenGL 4.4+, and when that's not available as a compatibility profile (as is the case with Mesa), the driver downgrades it to a version that does not support the features that the game needs.
Long story short, to fix that particular problem, you need to tell SDL to give you a core context of a certain version. The above attributes are documented here: https://wiki.libsdl.org/SDL_GL_SetAttribute
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
after 307 requests (307 known processed) with 119 events remaining.
glxinfo:
Techland, please patch this game!
There is a issue however, I appear to have a black square in the middle of screen where the crosshair should be. [nevermind, seems I fixed it somehow]
Game is a little slow and laggy on mesa drivers, I do hope optimizations happen for this game for amd users at some point.