Steam game Haydee leans on implementation-dependent behavior
System information
- OS: Gentoo
- GPU: AMD RX 480 / Intel 630 CFL GT2 (two systems)
- Kernel version: 5.8.10 / 5.4.66
- Mesa version: 20.2.1+llvm 11.0.0 / 20.1.8
If applicable
- Wine/Proton version: Proton 5.0-9
Describe the issue
When launching Haydee, which is an OpenGL 3.3 game for Windows, the game renders a spiral loading placeholder, renders the text of the main menu, then crashes. This was mentioned to the game devs at https://steamcommunity.com/app/530890/discussions/1/2933490248148369383/ and they added some insight that there's a lighting shader with a sometimes unused variable. I've now reproduced the issue locally on both an AMD and Intel system. There's a more detailed assessment is in the linked forum thread.
With a debug build of Mesa, there's a bunch of GL_INVALID_OPERATIONs before the game falls over with what looks like a null pointer access violation.
Mesa: User error: GL_INVALID_OPERATION in glSamplerParameteri(invalid sampler)
Mesa: 1 similar GL_INVALID_OPERATION errors
Mesa: User error: GL_INVALID_OPERATION in glFramebufferTexture2D(window-system framebuffer)
Mesa: User error: GL_INVALID_OPERATION in glSamplerParameteri(invalid sampler)
Mesa: 6599 similar GL_INVALID_OPERATION errors
Mesa: User error: GL_INVALID_OPERATION in glSamplerParameteri(invalid sampler)
Mesa: 9 similar GL_INVALID_OPERATION errors
Mesa: User error: GL_INVALID_OPERATION in glFramebufferTexture2D(window-system framebuffer)
Mesa: 3809 similar GL_INVALID_OPERATION errors
Mesa: User error: GL_INVALID_OPERATION in glUniformMatrix(program not linked)
Mesa: User error: GL_INVALID_OPERATION in glBeginTransformFeedback(no program active)
Mesa: User error: GL_INVALID_OPERATION in glEndTransformFeedback(not active)
Mesa: User error: GL_INVALID_OPERATION in glUniformMatrix(program not linked)
Mesa: User error: GL_INVALID_OPERATION in glBeginTransformFeedback(no program active)
Mesa: User error: GL_INVALID_OPERATION in glEndTransformFeedback(not active)
Mesa: User error: GL_INVALID_OPERATION in glUniformMatrix(program not linked)
Mesa: User error: GL_INVALID_OPERATION in glBeginTransformFeedback(no program active)
Mesa: User error: GL_INVALID_OPERATION in glEndTransformFeedback(not active)
Mesa: User error: GL_INVALID_OPERATION in glUniformMatrix(program not linked)
Mesa: User error: GL_INVALID_OPERATION in glBeginTransformFeedback(no program active)
Mesa: User error: GL_INVALID_OPERATION in glEndTransformFeedback(not active)
Mesa: User error: GL_INVALID_OPERATION in glUniformMatrix(program not linked)
wine: Unhandled page fault on read access to 00000000 at address 1017BFDE (thread 00e4), starting debugger...
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x1017bfde).
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
EIP:1017bfde ESP:0031f798 EBP:0031f858 EFLAGS:00010206( R- -- I - -P- )
EAX:00f805d4 EBX:21bdce28 ECX:00000000 EDX:00000000
ESI:7a8afc10 EDI:7a8b0230
Stack dump:
0x0031f798: 21bdce50 00f805d4 00f805d4 e1a74480
0x0031f7a8: c40c6080 0101821a 00000de1 00000000
0x0031f7b8: 0031f838 0031f818 411c0a14 c24359ca
0x0031f7c8: 413db218 f29a4070 e1a74480 e1ada8e0
0x0031f7d8: 43800000 00000000 00000000 00000000
0x0031f7e8: 00000000 43761280 c28d336b 00000000
Backtrace:
=>0 0x1017bfde EntryPoint+0xffffffff() in haydee (0x0031f858)
1 0x1017cce7 EntryPoint+0xffffffff() in haydee (0x0031f88c)
2 0x019f8063 EntryPoint+0xffffffff() in game (0x0031f9cc)
3 0x1014397e EntryPoint+0xffffffff() in haydee (0x0031f9e8)
4 0x01a0d6b6 EntryPoint+0xffffffff() in game (0x0031fa04)
5 0x101393e5 EntryPoint+0xffffffff() in haydee (0x0031fa20)
6 0x10139f95 EntryPoint+0xffffffff() in haydee (0x0031fa40)
7 0x1013a96e EntryPoint+0xffffffff() in haydee (0x0031fa48)
8 0x101ab743 EntryPoint+0xffffffff() in haydee (0x0031fa54)
9 0x101abc7d EntryPoint+0xffffffff() in haydee (0x0031faa4)
10 0x1013ac99 EntryPoint+0xffffffff() in haydee (0x0031fab4)
11 0x004013dd EntryPoint+0xffffffff() in launcher (0x0031fee4)
12 0x0040162b EntryPoint+0xffffffff() in launcher (0x0031ff30)
13 0x7b4539c2 call_process_entry+0x11() in kernel32 (0x0031ff48)
14 0x7b453da5 start_process+0xb4() in kernel32 (0x0031ffd8)
15 0x7b4539ce __wine_start_process+0x9() in kernel32 (0x0031ffec)
0x1017bfde EntryPoint+0xffffffff in haydee: movl 0x0(%ecx),%eax
As an experiment, I added MESA_NO_ERROR=1 %command%
to the game's launch options, and this had an unexpectedly poor result. With the env variable set, the game quickly fails before showing the loading placeholder with a wine backtrace of:
=>0 0xf2d0b1b7 __driDriverGetExtensions_radeonsi+0x1234e() in radeonsi_dri.so (0x00000001)
0xf2d0b1b7 __driDriverGetExtensions_radeonsi+0x1234e in radeonsi_dri.so: cmpl 0x3c(%esi),%edx
or
=>0 0xf2d362f3 __driDriverGetExtensions_iris+0x111d3() in iris_dri.so (0x7cbeb350)
0xf2d362f3 __driDriverGetExtensions_iris+0x111d3 in iris_dri.so: cmpl 0x3c(%edx),%eax
Also tried fiddling with MESA_GL_VERSION_OVERRIDE
and MESA_GLSL_VERSION_OVERRIDE
to no effect.
Regression
Not a regression.
Any extra information would be greatly appreciated
I made a mild attempt to run apitrace with Proton, but it wasn't obvious how this could be executed.
The game log contains:
Haydee Log:
OpenGL Info:
vendor: Intel
renderer: Mesa Intel(R) UHD Graphics 630 (CFL GT2)
version: 4.6 (Compatibility Profile) Mesa 20.1.8
uniforms: 16384/16384/16384
feedback: 64/4/4
hdALInitEFX: failed alcIsExtensionPresent
HDRProgram::Link: error: fragment shader input `f_TexCoord' has no matching output in the previous stage
HDRProgram::InitProgram: failed to create program
hdRResourceInit: failed to init HDRHemiLightProgram
Since the game is hypothetically looking at a compatibility context, does the rules from the GLSL 430 spec (4.3.4 Input Variables) about not erroring out retroactively apply to this OpenGL 3.3 game? I don't really understand the spec or what the game is actually asking for from the driver, this is just a guess.