[LINUX] Mesa uses wrong OpenGL version

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [LINUX] Mesa uses wrong OpenGL version

Re: [LINUX] Mesa uses wrong OpenGL version

by _mental_ » Tue Nov 07, 2017 3:11 am

Added in f353f8b.

Re: [LINUX] Mesa uses wrong OpenGL version

by Graf Zahl » Mon Nov 06, 2017 2: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.

Re: [LINUX] Mesa uses wrong OpenGL version

by Talon1024 » Mon Nov 06, 2017 1: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 all

$ ./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 all

$ ./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

Re: [LINUX] Mesa uses wrong OpenGL version

by Graf Zahl » Mon Nov 06, 2017 1:17 am

This was precisely what was needed: Someone confirming that it works.

Re: [LINUX] Mesa uses wrong OpenGL version

by Talon1024 » Sun Nov 05, 2017 9: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 all

$ ./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 all

$ ./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

Re: [LINUX] Mesa uses wrong OpenGL version

by Talon1024 » Sun Jul 23, 2017 2: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?

Re: [LINUX] Mesa uses wrong OpenGL version

by Graf Zahl » Sun Jul 16, 2017 7: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.

Re: [LINUX] Mesa uses wrong OpenGL version

by Chris » Sun Jul 16, 2017 6: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.

Re: [LINUX] Mesa uses wrong OpenGL version

by Graf Zahl » Sun Jul 16, 2017 2: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.

Re: [LINUX] Mesa uses wrong OpenGL version

by _mental_ » Sun Jul 16, 2017 1:39 am

Unfortunately I don't have startup logs because it was a year ago or something like that on Windows 10.
I installed Windows 7 after HDD replacement but the latest AMD drivers have unrelated severe issues making them unusable for me.
Drivers from notebook's vendor are OK more or less but they support OpenGL 3.1 only and so GZDoom falls back to legacy render path.

Re: [LINUX] Mesa uses wrong OpenGL version

by Graf Zahl » Sun Jul 16, 2017 1:21 am

The bigger issue here is not this specific hardware but that AMD is abandoning their proprietary driver on Linux entirely and Intel is also depending on MESA which does not implement compatibility profiles at all. Something needs to be done here to ensure that future hardware isn't forced to the legacy path.

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.

@_mental_: Can you post the Windows startup log? That blinking stuff error's cause is known and the feature responsible normally disabled when running an ATI driver, but maybe the check is incomplete.

Re: [LINUX] Mesa uses wrong OpenGL version

by _mental_ » Sun Jul 16, 2017 12:49 am

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

OpenGL 3.3 is available on Windows and drivers compile shaders just fine.
Although rendering is completely broken: missing sprites and constant flickering make the game unplayable.
Older drivers with OpenGL 3.1 support simply crashes on attempt to compile the first shader.

So my case is hardly a platform specific issue, it's rather 'lame vendor' specific.

Re: [LINUX] Mesa uses wrong OpenGL version

by Chris » Sat Jul 15, 2017 9:47 pm

So what should happen with this patch, then? It doesn't seem like a good outcome for auto-selecting a core profile to cause some Radeon devices to fail with a black screen, requiring the user to explicitly pass -glversion 2. It wouldn't even be possible to detect when selecting the renderer, since the core profile doesn't allow access to the fixed-function pipeline used by the legacy renderer. Unless you just want to tell the Mesa/Gallium devs to fix it.

Re: [LINUX] Mesa uses wrong OpenGL version

by Talon1024 » Fri Jul 14, 2017 2:50 am

Have you tried using a newer version of Mesa? Maybe you can upgrade to the latest Mesa drivers using the PPA referenced in this article.

Re: [LINUX] Mesa uses wrong OpenGL version

by _mental_ » Fri Jul 14, 2017 12:40 am

Chris wrote:Don't suppose there's an error from GZDoom about why a shader failed to compile? Perhaps by passing +gl_debug 1 +gl_debug_level 3.
The output remains the same with this command line parameters. Similar issues were already reported before and switching to legacy render path was the only way to workaround the black screen.

Top