[Fixed] [LINUX] Mesa uses wrong OpenGL version

Bugs that have been investigated and resolved somehow.

Moderators: Developers, ZDoom.org Team

Re: [LINUX] Mesa uses wrong OpenGL version

Postby Graf Zahl » Sun Jul 16, 2017 3:34 am

_mental_ wrote:Unfortunately I don't have startup logs because it was a year ago or something like that on Windows 10.


Then the bug should be fixed by now. The clip planes are broken in those drivers and it took me a bit of remote debugging to find this out.

Long term I see AMD's pre-GCN hardware as a complete losing proposition. It's deprecated, the drivers mostly suck, on Linux the proprietary driver that at least worked is being replaced with an utter piece of shit (with no chance of getting fixed because the hardware is deprecated) and other problems are sure to surface in the future. I only can recommend everybody owning such a piece of junk to replace it, if it's not part of a laptop.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [LINUX] Mesa uses wrong OpenGL version

Postby Chris » Sun Jul 16, 2017 7:12 am

_mental_ wrote:I doubt that somebody will fix drivers for eight years old hardware.

You might be surprised. Depending on what exactly the error is, someone might be able to identify and quickly fix the issue. Being open source, someone else could track down the issue and provide a patch. It's also possible someone else ran into a similar issue and knows of a workaround (either for the user, or for the offending shader code that's tripping up the driver). Never know what the response might be.

Graf Zahl wrote:To be blunt: I think the only way to solve this mess is to generally force all AMD/ATI hardware which does not return a GL 4.4 context down to legacy. I know that this is ridiculous but what else can we do? This long deprecated hardware's drivers just seem too broken across the board.

I'm not too sure, at least for Linux. Up to now it's only ever used a compatibility context because SDL never requested anything different, and that's supposed to be max GL3.0 according to GLX_ARB_create_context_profile. Now that it's using a core context with this patch, it's the first time any AMD card has provided GL3.3+ features for GZDoom on Linux (using the open source drivers at least). This might not be a widespread issue that requires blacklisting all pre-GL4.4 AMD cards/drivers from using the more modern renderer. More testing of this patch from other AMD users would be helpful, as would knowing if anything comes from a report to the Gallium devs. FWIW, Talon1024 said it worked for them to hack in a request for a core 3.3 context, and though that was an Intel device, there's a fair amount of shared code for the open source drivers. It might not be that dire.
User avatar
Chris
 
Joined: 17 Jul 2003

Re: [LINUX] Mesa uses wrong OpenGL version

Postby Graf Zahl » Sun Jul 16, 2017 8:01 am

Chris wrote:I'm not too sure, at least for Linux. Up to now it's only ever used a compatibility context because SDL never requested anything different, and that's supposed to be max GL3.0 according to GLX_ARB_create_context_profile. Now that it's using a core context with this patch, it's the first time any AMD card has provided GL3.3+ features for GZDoom on Linux (using the open source drivers at least).


The part in parentheses is important here. This mess only started when Ubuntu abandoned the closed source driver for their LTS release and from what I read the replacement is a piece of shit for older hardware. The curse of nobody caring because the hardware is deprecated, I guess.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [LINUX] Mesa uses wrong OpenGL version

Postby Talon1024 » Sun Jul 23, 2017 3:53 pm

Well, the proprietary fglrx (Catalyst) driver is still available on Ubuntu 14.04 LTS, which is supported until April 2019.

FWIW, Talon1024 said it worked for them to hack in a request for a core 3.3 context, and though that was an Intel device, there's a fair amount of shared code for the open source drivers. It might not be that dire.


Samsai is using an Asus R7 370 (you can see his rig specs here under "Samsai's Hardware") with the radeon/radeonSI open source drivers. He said this workaround worked for him as well when I sent it to him. Maybe I could build a patched version of GZDoom 3.1.0 and send it to him?
Talon1024
 
Joined: 27 Jun 2016

Re: [LINUX] Mesa uses wrong OpenGL version

Postby Talon1024 » Sun Nov 05, 2017 10:58 pm

Heya. Just wondering what else needs to be done before Chris' patch gets applied and merged into the main GZDoom codebase. I applied Chris' patch to this commit locally, compiled a GZDoom build from it on a Linux laptop (using the Intelgrated graphics and Mesa driver), and tested it on WolfenDoom: Blade of Agony C1M2.

As far as I can tell, everything is working fine. The -glversion command line parameter works, and I get an OpenGL 4.2 core context without using -glversion, and an OpenGL 3.0 compatibility context if I use -glversion 2.

Here are the startup logs, with and without -glversion 2:
Code: Select allExpand view
$ ./gzdoom -file boa_c2.pk3 -skill 1 +map c1m2
GZDoom g3.3pre-58-gd4ebe51-m - 2017-11-05 15:35:03 +0100 - SDL version
Compiled on Nov  5 2017

M_LoadDefaults: Load system defaults.
W_Init: Init WADfiles.
 adding /home/kevinc/Games/doom/gzdoom-master-20171105/gzdoom.pk3, 671 lumps
 adding /home/kevinc/Games/doom/IWADS/DOOM2.WAD, 2919 lumps
 adding lights.pk3, 6 lumps
 adding brightmaps.pk3, 500 lumps
 adding ../MusicPacks/Doom2PK3.pk3, 22 lumps
 adding /media/kevinc/OS/Games/doom/gzdoom/Doom2Mods/boa_c2.pk3, 14296 lumps
I_Init: Setting up machine state.
CPU Vendor ID: GenuineIntel
  Name: Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz
  Family 6, Model 58, Stepping 9
  Features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
I_InitSound: Initializing OpenAL
  Opened device Built-in Audio Analog Stereo
  EFX enabled
V_Init: allocate screen.
S_Init: Setting up sound.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
Script warning, "boa_c2.pk3:scripts/menus/iconlistmenu.txt" line 311:
Usage of uninitialized variable 'iconSize' defined at line 301
Script warning, "boa_c2.pk3:scripts/menus/iconlistmenu.txt" line 385:
Usage of uninitialized variable 'maxWidth' defined at line 371
Script warning, "boa_c2.pk3:scripts/conversations/conversationmenucomponents.txt" line 126:
Usage of uninitialized variable 'Index' defined at line 120
Script warning, "boa_c2.pk3:scripts/conversations/conversationmenucomponents.txt" line 139:
Usage of uninitialized variable 'Count' defined at line 121
Script warning, "boa_c2.pk3:scripts/actors/player.txt" line 216:
Usage of uninitialized variable 'mo' defined at line 206
Script warning, "boa_c2.pk3:scripts/actors/player.txt" line 216:
Usage of uninitialized variable 'mo' defined at line 206
script parsing took 402.40 ms
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading custom status bar definition.
a Realm667 project
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Using video driver x11
GL_VENDOR: Intel Open Source Technology Center
GL_RENDERER: Mesa DRI Intel(R) Ivybridge Mobile
GL_VERSION: 4.2 (Core Profile) Mesa 17.1.2 (Core profile)
GL_SHADING_LANGUAGE_VERSION: 4.20

Max. texture size: 16384
Max. texture units: 16
Max. varying: 128
Max. uniform block size: 65536
Uniform block alignment: 16
Resolution: 1366 x 768


c1m2 - Operation: Exodus
Code: Select allExpand view
$ ./gzdoom -glversion 2 -file boa_c2.pk3 -skill 1 +map c1m2
GZDoom g3.3pre-58-gd4ebe51-m - 2017-11-05 15:35:03 +0100 - SDL version
Compiled on Nov  5 2017

M_LoadDefaults: Load system defaults.
W_Init: Init WADfiles.
 adding /home/kevinc/Games/doom/gzdoom-master-20171105/gzdoom.pk3, 671 lumps
 adding /home/kevinc/Games/doom/IWADS/DOOM2.WAD, 2919 lumps
 adding lights.pk3, 6 lumps
 adding brightmaps.pk3, 500 lumps
 adding ../MusicPacks/Doom2PK3.pk3, 22 lumps
 adding /media/kevinc/OS/Games/doom/gzdoom/Doom2Mods/boa_c2.pk3, 14296 lumps
I_Init: Setting up machine state.
CPU Vendor ID: GenuineIntel
  Name: Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz
  Family 6, Model 58, Stepping 9
  Features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
I_InitSound: Initializing OpenAL
  Opened device Built-in Audio Analog Stereo
  EFX enabled
V_Init: allocate screen.
S_Init: Setting up sound.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
Script warning, "boa_c2.pk3:scripts/menus/iconlistmenu.txt" line 311:
Usage of uninitialized variable 'iconSize' defined at line 301
Script warning, "boa_c2.pk3:scripts/menus/iconlistmenu.txt" line 385:
Usage of uninitialized variable 'maxWidth' defined at line 371
Script warning, "boa_c2.pk3:scripts/conversations/conversationmenucomponents.txt" line 126:
Usage of uninitialized variable 'Index' defined at line 120
Script warning, "boa_c2.pk3:scripts/conversations/conversationmenucomponents.txt" line 139:
Usage of uninitialized variable 'Count' defined at line 121
Script warning, "boa_c2.pk3:scripts/actors/player.txt" line 216:
Usage of uninitialized variable 'mo' defined at line 206
Script warning, "boa_c2.pk3:scripts/actors/player.txt" line 216:
Usage of uninitialized variable 'mo' defined at line 206
script parsing took 404.66 ms
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading custom status bar definition.
a Realm667 project
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Using video driver x11
Emulating OpenGL v 2
GL_VENDOR: Intel Open Source Technology Center
GL_RENDERER: Mesa DRI Intel(R) Ivybridge Mobile
GL_VERSION: 3.0 Mesa 17.1.2 (Compatibility profile)
GL_SHADING_LANGUAGE_VERSION: 1.30

Max. texture size: 16384
Max. texture units: 16
Max. varying: 128
Resolution: 1366 x 768


c1m2 - Operation: Exodus
Talon1024
 
Joined: 27 Jun 2016

Re: [LINUX] Mesa uses wrong OpenGL version

Postby Graf Zahl » Mon Nov 06, 2017 2:17 am

This was precisely what was needed: Someone confirming that it works.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [LINUX] Mesa uses wrong OpenGL version

Postby Talon1024 » Mon Nov 06, 2017 2:47 pm

Here are the startup logs from the same build of GZDoom on my main gaming PC, which is Ubuntu 16.04 with an NVidia graphics card, and uses the NVidia proprietary blob driver, without and with the -glversion parameter respectively:
Code: Select allExpand view
$ ./gzdoom -file boa_c2.pk3 -skill 1 +map c1m2
GZDoom g3.3pre-58-gd4ebe51-m - 2017-11-05 15:35:03 +0100 - SDL version
Compiled on Nov  6 2017

M_LoadDefaults: Load system defaults.
W_Init: Init WADfiles.
 adding /home/kevinc/Games/doom/gzdoom-d4ebe51-20171105/gzdoom.pk3, 671 lumps
 adding /home/kevinc/Games/doom/IWADS/DOOM2.WAD, 2919 lumps
 adding lights.pk3, 6 lumps
 adding brightmaps.pk3, 500 lumps
 adding ../gzdoom/pk_doom_sfx_20120224.wad, 77 lumps
 adding ../gzdoom/MusicPacks/Doom2PK3.pk3, 22 lumps
 adding ../gzdoom/TCMods/boa_c2.pk3, 14296 lumps
I_Init: Setting up machine state.
CPU Vendor ID: GenuineIntel
  Name: Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz
  Family 6, Model 60, Stepping 3
  Features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
I_InitSound: Initializing OpenAL
  Opened device ALSA Default
  EFX enabled
V_Init: allocate screen.
S_Init: Setting up sound.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
Script warning, "boa_c2.pk3:scripts/menus/iconlistmenu.txt" line 311:
Usage of uninitialized variable 'iconSize' defined at line 301
Script warning, "boa_c2.pk3:scripts/menus/iconlistmenu.txt" line 385:
Usage of uninitialized variable 'maxWidth' defined at line 371
Script warning, "boa_c2.pk3:scripts/conversations/conversationmenucomponents.txt" line 126:
Usage of uninitialized variable 'Index' defined at line 120
Script warning, "boa_c2.pk3:scripts/conversations/conversationmenucomponents.txt" line 139:
Usage of uninitialized variable 'Count' defined at line 121
Script warning, "boa_c2.pk3:scripts/actors/player.txt" line 216:
Usage of uninitialized variable 'mo' defined at line 206
Script warning, "boa_c2.pk3:scripts/actors/player.txt" line 216:
Usage of uninitialized variable 'mo' defined at line 206
script parsing took 211.44 ms
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading custom status bar definition.
a Realm667 project
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Using video driver x11
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce GTX 970/PCIe/SSE2
GL_VERSION: 4.5.0 NVIDIA 387.12 (Core profile)
GL_SHADING_LANGUAGE_VERSION: 4.50 NVIDIA

Max. texture size: 16384
Max. texture units: 32
Max. varying: 124
Max. combined shader storage blocks: 96
Max. vertex shader storage blocks: 16
Resolution: 1280 x 1024
16 bots read from bots.cfg


c1m2 - Operation: Exodus

Code: Select allExpand view
$ ./gzdoom -glversion 2 -file boa_c2.pk3 -skill 1 +map c1m2
GZDoom g3.3pre-58-gd4ebe51-m - 2017-11-05 15:35:03 +0100 - SDL version
Compiled on Nov  6 2017

M_LoadDefaults: Load system defaults.
W_Init: Init WADfiles.
 adding /home/kevinc/Games/doom/gzdoom-d4ebe51-20171105/gzdoom.pk3, 671 lumps
 adding /home/kevinc/Games/doom/IWADS/DOOM2.WAD, 2919 lumps
 adding lights.pk3, 6 lumps
 adding brightmaps.pk3, 500 lumps
 adding ../gzdoom/pk_doom_sfx_20120224.wad, 77 lumps
 adding ../gzdoom/MusicPacks/Doom2PK3.pk3, 22 lumps
 adding ../gzdoom/TCMods/boa_c2.pk3, 14296 lumps
I_Init: Setting up machine state.
CPU Vendor ID: GenuineIntel
  Name: Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz
  Family 6, Model 60, Stepping 3
  Features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
I_InitSound: Initializing OpenAL
  Opened device ALSA Default
  EFX enabled
V_Init: allocate screen.
S_Init: Setting up sound.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
Script warning, "boa_c2.pk3:scripts/menus/iconlistmenu.txt" line 311:
Usage of uninitialized variable 'iconSize' defined at line 301
Script warning, "boa_c2.pk3:scripts/menus/iconlistmenu.txt" line 385:
Usage of uninitialized variable 'maxWidth' defined at line 371
Script warning, "boa_c2.pk3:scripts/conversations/conversationmenucomponents.txt" line 126:
Usage of uninitialized variable 'Index' defined at line 120
Script warning, "boa_c2.pk3:scripts/conversations/conversationmenucomponents.txt" line 139:
Usage of uninitialized variable 'Count' defined at line 121
Script warning, "boa_c2.pk3:scripts/actors/player.txt" line 216:
Usage of uninitialized variable 'mo' defined at line 206
Script warning, "boa_c2.pk3:scripts/actors/player.txt" line 216:
Usage of uninitialized variable 'mo' defined at line 206
script parsing took 205.50 ms
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init menus.
P_Init: Init Playloop state.
ParseSBarInfo: Loading custom status bar definition.
a Realm667 project
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
Using video driver x11
Emulating OpenGL v 2
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce GTX 970/PCIe/SSE2
GL_VERSION: 4.6.0 NVIDIA 387.12 (Compatibility profile)
GL_SHADING_LANGUAGE_VERSION: 4.60 NVIDIA

Max. texture size: 16384
Max. texture units: 32
Max. varying: 124
Resolution: 1280 x 1024
16 bots read from bots.cfg


c1m2 - Operation: Exodus
Talon1024
 
Joined: 27 Jun 2016

Re: [LINUX] Mesa uses wrong OpenGL version

Postby Graf Zahl » Mon Nov 06, 2017 3:04 pm

That's to be expected. NVidia supports the compatibility profile for all versions of OpenGL. Mesa only supports it up to 3.0.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [LINUX] Mesa uses wrong OpenGL version

Postby _mental_ » Tue Nov 07, 2017 4:11 am

Added in f353f8b.
_mental_
 
 
 
Joined: 07 Aug 2011

Previous

Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest