Steam overlay calls glMatrixMode(GL_COLOR) without checking for ARB_imaging support
Your system information
- Steam client version (build number or date): 1599691266 / Sep 9 2020, at 22:05:48
- Distribution (e.g. Ubuntu): Gentoo
- Opted into Steam client beta?: Yes
- Have you checked for system updates?: Yes
- System Information
- glxinfo
Please describe your issue in as much detail as possible:
The Steam overlay calls glMatrixMode() with the invalid enum GL_COLOR. Using this enum requires the ARB_imaging extension which Mesa/radeonsi does not support
With Arx Libertatis, which creates a a KHR_no_error context by default, this causes all textures to be rendered as a single color, see dreamer/luxtorpeda#27.
Describe what you expected should happen and what did happen. Please link any large code pastes as a Github Gist
Steps for reproducing this issue:
- Configure Steam to use Arx Libertatis for Arx Fatalis but leave the overlay enabled.
- Start the game.
- Watch as all textures are gone as soon as the overlay starts up.
Arx Libertatis supports creating a debug context instead using the --debug-gl option, which will print errors while the overlay is open or a notification is shown: [E] GLDebug:90 API error #2: GL_INVALID_ENUM in glMatrixMode
Stack trace:
#0 gldebug::callback (source=33350, type=33356, id=2, severity=37190, length=31, message=0x7ffd16465290 "GL_INVALID_ENUM in glMatrixMode", userParam=0x0)
at /home/dscharrer/pro/arx/src/graphics/opengl/GLDebug.cpp:73
#1 0x00007f6aa826d15b in _mesa_error (ctx=0x56516419a810, error=error@entry=1280, fmtString=fmtString@entry=0x7f6aa89e51a0 "%s")
at ../mesa-9999/src/mesa/main/errors.c:357
#2 0x00007f6aa82d6902 in get_named_matrix_stack (mode=<optimized out>, caller=<optimized out>, ctx=<optimized out>) at ../mesa-9999/src/mesa/main/matrix.c:97
#3 get_named_matrix_stack (ctx=<optimized out>, mode=<optimized out>, caller=<optimized out>) at ../mesa-9999/src/mesa/main/matrix.c:50
#4 0x00007f6aa82d6f91 in _mesa_MatrixMode (mode=6144) at ../mesa-9999/src/mesa/main/matrix.c:282
#5 0x00007f6aab5ef7ff in ?? () from /home/dscharrer/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so
#6 0x00007f6aab5fc480 in ?? () from /home/dscharrer/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so
#7 0x00007f6aab5fe0c8 in ?? () from /home/dscharrer/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so
#8 0x00007f6aab5edf2e in glXSwapBuffers () from /home/dscharrer/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so
#9 0x00007f6aab1f74b3 in X11_GL_SwapWindow (_this=<optimized out>, window=<optimized out>)
at /var/tmp/portage/media-libs/libsdl2-2.0.12-r2/work/SDL2-2.0.12/src/video/x11/SDL_x11opengl.c:931
#10 0x00005651620d6700 in SDL2Window::showFrame (this=<optimized out>) at /home/dscharrer/pro/arx/src/window/SDL2Window.cpp:850
#11 ArxGame::doFrame (this=<optimized out>) at /home/dscharrer/pro/arx/src/core/ArxGame.cpp:1267
#12 0x00005651620d9c58 in ArxGame::run (this=0x565163fd86b0) at /home/dscharrer/pro/arx/src/core/ArxGame.cpp:1132
#13 0x0000565161ea7747 in runGame () at /home/dscharrer/pro/arx/src/core/Core.cpp:246
#14 main (argc=<optimized out>, argv=<optimized out>) at /home/dscharrer/pro/arx/src/core/Startup.cpp:164
I get similar issues in my game engine on Nvidia as well.
I'm pretty sure I'm having this same issue, or if not then something related.
Environment:
- Windows 10
- Nvidia RTX 2070
- Steam Beta, built 2021-07-20
- OpenGL ES 3.0
Running my program normally has no issues, but launching it through Steam (with the overlay enabled in settings) leads to it rendering a single frame, then the program catches an OpenGL INVALID_ENUM error on the start of the next render cycle.
This doesn't look to be a Linux-exclusive problem. If I disable the overlay in settings, then the game runs without issue.
GameOverlayRenderer.dll on Windows also comes with this issue. (I am using Intel UHD 770 which doesn't support ARB_imaging either)