protonscr

Remove use of deprecated GL_ARB_imaging in runtime + overlay

steamclosed reviewed
ValveSoftware/steam-for-linux#4657 · opened 2016-10-12 by ikeydoherty · updated 2018-05-12 · 5 comments · github
Iikeydoherty 2016-10-12 github
  • Steam client version: ALL.
  • Distribution (e.g. Ubuntu): Solus
  • Opted into Steam client beta?: [Yes]
  • Have you checked for system updates?: [Yes]

Steam makes use of deprecated Mesa functionality, notably the GL_ARB_imaging extension.
In all versions of Mesa in the last few years, this extension is no longer supported. This currently
only works within Steam's own runtime which is using an ancient version of Mesalib from Ubuntu
Precise (8.0.4 specifically). This in turn causes issues both with and without the STEAM_RUNTIME enabled.

Exposed:

static const struct extension_info known_gl_extensions[] = {
...
   { GL(ARB_imaging),                    VER(0,0), Y, N, N, N },

All versions since do not support ARB_imaging, which has been completely removed from Mesa.
Any attempt to use it results in:

Mesa: User error: GL_INVALID_ENUM in glMatrixMode(mode)

This is due to calling glMatrixMode(GL_COLOR). This is used in the Steam overlay to save
and restore context currently. I believe it is also being used in other areas, as when Rocket League
launches we also see these invalid ops causing a black screen, because Rocket League is built to use the ancient mesalib version. (This is also seen when switching resolutions on Unreal Engine games, before going full screen)

The Steam runtime itself is very badly out of date at this point, and many have to disable it to have proper functionality, however this reliance on very, very old deprecated extensions only makes the issue worse.

Iikeydoherty 2016-10-12 github

Further to this point, your own instructions are contradicted by the runtime itself:

Intel HD 3000/4000 driver support - you will need to use the latest Mesa drivers, Mesa 9 or later. For installation instructions, see here.

Whilst using Mesa 8 within the runtime

PPlagman 2016-10-14 github

We don't ship Mesa in the runtime, and this extension is not used except to save/restore state before/after overlay rendering. The black screen and resolution issues you're experiencing are unrelated.

Iikeydoherty 2016-10-14 github

is not used except to save/restore state before/after overlay rendering.

And it's an invalid extension which is no longer supported, so you agree with the premise of the bug yet you choose to continue using an unsupported extension?

Iikeydoherty 2016-10-14 github

Also note at no point did I say you ship Mesa.

?ghost 2018-05-12 github

glMatrixMode(GL_COLOR) is deprecated for at least 8 years now and on Linux it does nothing.

There's no point in still using it.

Nothing extracted yet.