|Summary:||[i965] >Observer_ issue|
|Product:||Mesa||Reporter:||Darius Spitznagel <d.spitznagel>|
|Component:||Drivers/DRI/i965||Assignee:||Tapani Pälli <lemody>|
|Status:||RESOLVED FIXED||QA Contact:||Intel 3D Bugs Mailing List <intel-3d-bugs>|
|i915 platform:||i915 features:|
Apitrace Replay log
turn error to warning
Description Darius Spitznagel 2017-11-17 20:05:07 UTC
Hello Intel team, I took the risk and bought >Observer_ which is not supported on Intel and AMD by the game developers but Nvidia blob. There is an issue where you open a door to enter the next room. You can see the next room through the open door, but when you pass the door the game renders into total black. Moving back renders the first room back and you can see again the second room through the doorway. It's like someone turns off all lights. I did an apitrace of this issue. When I replay it I see nothing but a black window, but the replay definetly shows some GL_INVALID_OPERATION errors in the shell. Did I something wrong??? I used... DEBUGGER="apitrace trace" steam steam://rungameid/514900 Using this command with another appid worked as expected. To whom of you can I send a download link for the trace as I think it's not meant for public? By the way... AMD (radeonsi) users have exactly the same problem when you read the discussions at steam. My specs: Intel Haswell Iris Pro 5200 Libdrm 2.4.84 Kernel 4.9.60 Xorg 1.19.5 darius@pc1:~$ glxinfo | grep OpenGL OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) Haswell Desktop OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.4.0-devel (git-501591e852) OpenGL core profile shading language version string: 4.50 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 3.0 Mesa 17.4.0-devel (git-501591e852) OpenGL shading language version string: 1.30 OpenGL context flags: (none) OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.4.0-devel (git-501591e852) OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10 OpenGL ES profile extensions: Tried also mesa 17.3.0-rc4 and 17.2.5 without luck.
Comment 1 Tapani Pälli 2017-11-19 16:10:56 UTC
Maybe just copy-paste first what kind of errors are visible (log when running apitrace trace)
Comment 2 Darius Spitznagel 2017-11-19 20:38:58 UTC
(In reply to Tapani Pälli from comment #1) > Maybe just copy-paste first what kind of errors are visible (log when > running apitrace trace) How do I log when running "apitrace trace"? There is no option to write a log during trace. I will attach the replay messages from shell.
Comment 3 Darius Spitznagel 2017-11-19 20:40:18 UTC
Created attachment 135591 [details] Apitrace Replay log
Comment 4 Darius Spitznagel 2017-11-19 21:02:03 UTC
Let me know if you need the "verbose" output from the replay.
Comment 5 Tapani Pälli 2017-11-20 07:45:10 UTC
From the logs it seems some program fails to link and causes following usages of this program fail. Bug #97852 has similar compilation error, perhaps even the very same case since it seem this game has been written with UE4.
Comment 6 Darius Spitznagel 2017-11-20 08:24:21 UTC
Yes it is an UE4 game. I think it uses version 4.15.x I followed the link to Bug #97852... Timothee Besset (comment #11) > Possibly related: https://github.com/EpicGames/UnrealEngine/pull/4080/files > (engine side fix) > > While an engine fix is always desireable .. "for the future", I agree that > if this could be turned into a warning on the driver side it would be nice. I think I cloud test this and see what happens. Can you attach a patch which is turning this error into a warning? If this is really an engine error and Nvidia blob is using a workaround (like they often do - grrr) I would contact the game developers and ask for an engine update. Sadly the link from Timothee Besset is dead. This would have been a good point to let the game developrs know.
Comment 7 Tapani Pälli 2017-11-20 11:52:41 UTC
Created attachment 135601 [details] [review] turn error to warning patch for turning linker error as warning
Comment 8 Darius Spitznagel 2017-11-20 12:36:15 UTC
Funny coincidence. Some minutes ago I have tested the SAME patch! :) Turning this into warning indeed fixes the game!!! This reminds me of an older bug we had together... Bug #71870 with METRO LL. Again Mesa developers are too strict and game developers ignore specs;) Please let me know what to do. Should I contact games devs - I don't think this makes sense. Thank you Tapani.
Comment 9 Darius Spitznagel 2017-11-20 13:27:51 UTC
The patch applies also to stable 17.2.5. But I cannot test this right now - my lunch break is over. I will report back when I get home. When it works - i think so - it would be nice if you could push the patch to stable 17.2 and upcoming 17.3. Or maybe better... a new /etc/drirc option?
Comment 10 Tapani Pälli 2017-11-20 13:41:12 UTC
(In reply to Darius Spitznagel from comment #8) > Funny coincidence. Some minutes ago I have tested the SAME patch! :) > > Turning this into warning indeed fixes the game!!! > > This reminds me of an older bug we had together... Bug #71870 with METRO LL. Yeah good times :) > Again Mesa developers are too strict and game developers ignore specs;) > > Please let me know what to do. Should I contact games devs - I don't think > this makes sense. I think drirc option would be the way to go, in Mesa driver we want to follow the specs as is. It might be that the binary drivers have something similar to drirc to apply workarounds as well.
Comment 11 Darius Spitznagel 2017-11-20 16:51:40 UTC
As promised I tested the patch with stable mesa 7.2.5 > works. Tested patch with 17.3.0-rc5 too > works. Now back to bug-hunting... I have 3 more bugs to find:)
Comment 12 Tapani Pälli 2017-11-21 07:12:36 UTC
What is the binary name for this game? (for drirc change)
Comment 13 Darius Spitznagel 2017-11-21 07:58:46 UTC
(In reply to Tapani Pälli from comment #12) > What is the binary name for this game? (for drirc change) TheObserver-Linux-Shipping
Comment 14 Tapani Pälli 2017-11-21 08:46:47 UTC
Created attachment 135624 [details] [review] wokaround here's a workaround attempt
Comment 15 Darius Spitznagel 2017-11-21 16:30:30 UTC
(In reply to Tapani Pälli from comment #14) > Created attachment 135624 [details] [review] [review] > wokaround > > here's a workaround attempt Does not compile with mesa git on my system... snippet: <<<< I/usr/include/libdrm -fvisibility=hidden -DGALLIUM_SOFTPIPE -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/usr/local/src/mesa/master/mesa=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wall -Werror=implicit-function-declaration -Werror=missing-prototypes -Wmissing-prototypes -fno-math-errno -fno-trapping-math -std=c99 -c ../../../../../src/gallium/state_trackers/dri/dri2.c -fPIC -DPIC -o .libs/dri2.o ../../../../../src/gallium/state_trackers/dri/dri_screen.c: In function ‘dri_fill_st_options’: ../../../../../src/gallium/state_trackers/dri/dri_screen.c:84:11: error: ‘struct st_config_options’ has no member named ‘allow_cross_stage_interpolation_mismatch’; did you mean ‘allow_glsl_cross_stage_interpolation_mismatch’? options->allow_cross_stage_interpolation_mismatch = ^~ Makefile:705: recipe for target 'dri_screen.lo' failed make: *** [dri_screen.lo] Error 1 make: *** Waiting for unfinished jobs.... >>>>
Comment 16 Darius Spitznagel 2017-11-21 16:40:11 UTC
Replaced "allow_cross_stage_interpolation_mismatch" with "allow_glsl_cross_stage_interpolation_mismatch" > retry compiling.
Comment 17 Darius Spitznagel 2017-11-21 16:57:53 UTC
(In reply to Darius Spitznagel from comment #16) > Replaced "allow_cross_stage_interpolation_mismatch" with > "allow_glsl_cross_stage_interpolation_mismatch" > retry compiling. With the change above it compiled but the patch did not work. Will check if I send you the right binary name.
Comment 18 Darius Spitznagel 2017-11-21 17:23:46 UTC
Hmmm, binary name is correct. Even starting directly from shell... >allow_glsl_cross_stage_interpolation_mismatch=true steam steam://rungameid/514900 ...did not work.
Comment 19 Tapani Pälli 2017-11-21 18:59:23 UTC
Hmm sorry did not compile test gallium changes ... I think you need to copy the drirc change to your drirc
Comment 20 Darius Spitznagel 2017-11-21 21:48:14 UTC
(In reply to Tapani Pälli from comment #19) > Hmm sorry did not compile test gallium changes ... I think you need to copy > the drirc change to your drirc I did copy the whole drirc and even checked with... cat ~/.drirc ...if its really in > YES it is. It simply does not work and I don't know why. Putting... allow_glsl_cross_stage_interpolation_mismatch=true %command% ... into observer steam options doesn't work too. I'm confused now. Could it be, that this option/workaround needs to enabled in mesa code somewhere else?
Comment 21 Tapani Pälli 2017-11-22 04:36:39 UTC
I'll investigate and come back with better patch
Comment 22 Tapani Pälli 2017-11-22 06:13:53 UTC
Created attachment 135658 [details] [review] workaround OK, here is a fixed patch. This worked for me on i965.
Comment 23 Darius Spitznagel 2017-11-22 16:37:09 UTC
(In reply to Tapani Pälli from comment #22) > Created attachment 135658 [details] [review] [review] > workaround > > OK, here is a fixed patch. This worked for me on i965. Now it works for me, too, thank you Tapani. This report can be closed.
Comment 24 Tapani Pälli 2017-11-30 11:25:37 UTC
workaround pushed to Mesa master --- 8< --- commit faccbaf3faf9a7cdcda3e4032fafd0f6064459bd Author: Tapani Pälli <email@example.com> Date: Fri Nov 24 07:46:07 2017 +0200 mesa: add AllowGLSLCrossStageInterpolationMismatch workaround This fixes issues seen with certain versions of Unreal Engine 4 editor and games built with that using GLSL 4.30. v2: add driinfo_gallium change (Emil Velikov) Signed-off-by: Tapani Pälli <firstname.lastname@example.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97852 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103801 Acked-by: Andres Gomez <email@example.com> Reviewed-by: Kenneth Graunke <firstname.lastname@example.org>