Bug 105895 - Insurgency fire effects creates black circles around it
Summary: Insurgency fire effects creates black circles around it
Status: RESOLVED NOTOURBUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-05 01:47 UTC by leozinho29_eu
Modified: 2019-07-03 15:35 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Video showing the bug (1.98 MB, video/webm)
2018-04-05 01:47 UTC, leozinho29_eu
Details
Black_polygons (1.28 MB, image/png)
2018-05-02 11:11 UTC, vadym
Details
Fire effect with fixed uniform value on Intel GPU (104.35 KB, image/jpeg)
2018-05-29 11:13 UTC, Danylo
Details

Description leozinho29_eu 2018-04-05 01:47:03 UTC
Created attachment 138611 [details]
Video showing the bug

Overview: In the game Insurgency, fire effects (as those from Molotov Cocktail) create black circles around the fire, creating difficulties to see what is behind the fire.

I have tried to change graphical settings, and no setting solved this.

Insurgency is a 32-bit game, so it is required to build 32-bit mesa.

Steps to Reproduce:
1) Open the game Insurgency;
2) Choose a server to enter;
3) Play with a class with Molotov Cocktail;
4) Throw Molotov;
5) See the black circles around the fire.

Actual Results: black circles with variable radius appear around the fire, making it nearly impossible to see behind the fire.

Expected Results: there is a reddish/orange lightning and there are no black or non transparent circles.

Hardware: Intel Core i3-6100U
Intel HD Graphics 520
8 GB RAM

Operating system: Xubuntu 18.04 Bionic Beaver (development branch) amd64

Kernel version: 4.16.0-041600-generic

Mesa version: 18.1.0-devel (git-498d9d0f4d)

glxinfo:
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)  (0x1916)
    Version: 18.1.0
    Accelerated: yes
    Video memory: 3072MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.1.0-devel (git-498d9d0f4d)
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.0 Mesa 18.1.0-devel (git-498d9d0f4d)
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.1.0-devel (git-498d9d0f4d)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Build options for mesa 64-bit:
./configure --with-dri-drivers=i965 swrast --with-vulkan-drivers=intel --with-dri-driverdir=/usr/local/mesa/lib/dri --prefix=/usr/local/mesa --with-gallium-drivers=i915 svga swrast --with-platforms=x11,drm,wayland,surfaceless --enable-texture-float --enable-gbm --enable-glx-tls --enable-glx --enable-dri3 --enable-lmsensors --enable-gles1 --enable-gles2 --enable-opencl --enable-opencl-icd --enable-va --enable-xa --enable-osmesa --enable-shared-glapi --enable-vdpau --enable-libglvnd --enable-llvm --enable-valgrind --enable-debug

Build options for mesa 32-bit:
./configure --with-dri-drivers=i965 swrast --with-vulkan-drivers=intel --with-dri-driverdir=/usr/local/mesa32/lib/dri --prefix=/usr/local/mesa32 --with-gallium-drivers=i915 svga swrast --with-platforms=x11,drm,wayland,surfaceless --enable-texture-float --enable-gbm --enable-glx-tls --enable-glx --enable-dri3 --enable-lmsensors --enable-gles1 --enable-gles2 --enable-opencl --enable-opencl-icd --enable-va --enable-xa --enable-osmesa --enable-shared-glapi --enable-vdpau --enable-libglvnd --enable-llvm --enable-valgrind --enable-debug
Comment 1 Mark Janes 2018-04-05 03:38:30 UTC
an apitrace of this would help us understand what is going on.  Are you able to trace it?
Comment 2 leozinho29_eu 2018-04-05 06:03:17 UTC
I have traced it, but I don't know what to do with them and the files are very big (the smallest one has 410 MB), so I can't upload them here.
Comment 3 Denis 2018-04-05 09:32:10 UTC
Hello. You can use anything, like, google drive sharing, or any other "sharing" tool (search in google "file sharing web site" etc.
Also please archive it before uploading, it will decrease size.
Comment 4 leozinho29_eu 2018-04-05 13:47:26 UTC
Here is the compressed trace file: https://mega.nz/#!llQgCRhB!SHYZwE0Qy7_dcKQaUC1YpTPajXb0wKgS0D0RZBu2kxA
Comment 5 vadym 2018-05-02 11:11:11 UTC
Issue is reproduced on Haswell and Kabylake but not reproducible with radeon cards. I also noticed another one issue which is quite similar to the original one: when shooting on the water area there are some black polygons rendered (see attached screen shot).

For the original issue with the Molotov Cocktail I found fragment shader which looks like causes rendering issues: 

FS_19de0fe8981e63840fa1221c1fc63023e07bc23d.glsl

Replacing last line in the shader with "gl_FragData[0] = vec4( 0.0, 0.0, 0.0, 0.0);" fixing this issue. But I'm not sure if this a mesa issue or not.

Issue with the black polygons on the water area can be fixed in the following fragment shader: 

FS_de1d07fa3423da72aa5d7a866fdd522ebb2fd0b4.glsl

using the same workaround as above.
Comment 6 vadym 2018-05-02 11:11:57 UTC
Created attachment 139268 [details]
Black_polygons
Comment 7 Danylo 2018-05-29 11:12:42 UTC
Hello, I have found the issue which seems not to be in Mesa.

In shader FS_19de0fe8981e63840fa1221c1fc63023e07bc23d.glsl (shader for fire) there is a 'uniform vec4 pc[2]' which has different values on Intel and Radeon GPU:
Intel - set program 1564 uniform "pc" (loc 62, type "vec4", length 2, transpose = false) to: 0 2 0 1 , 0.214041 0 0 0
Radeon - set program 1623 uniform "pc" (loc 62, type "vec4", length 2, transpose = false) to: 0 2 0 1 , 0.5 0 0 0

In shader 'pc[1].x' is used several times which leads to the found visual difference. When changing usage of 'pc[1].x' to '0.5' the results are visually identical.
I have attached the result of changing 'pc[1].x' into '0.5' on Intel GPU.

Also when I debugged Mesa I saw that the memory from where pc uniform is taken is always changed by game including setting of value '0.214041': 

#0  0xf7c4506a in ?? () from /lib/i386-linux-gnu/libc.so.6
#1  0xefddf6ba in ?? () from insurgency2/bin/shaderapidx9.so
#2  0xeda2e338 in ?? () from insurgency2/bin/stdshader_dx9.so
#3  0xeda7a423 in ?? () from insurgency2/bin/stdshader_dx9.so
#4  0xf1d51d28 in ?? () from insurgency2/bin/materialsystem.so
#5  0xf1ce7dba in ?? () from insurgency2/bin/materialsystem.so
Comment 8 Danylo 2018-05-29 11:13:51 UTC
Created attachment 139828 [details]
Fire effect with fixed uniform value on Intel GPU
Comment 9 Kenneth Graunke 2018-05-29 16:47:09 UTC
Oh.  Does UNITY_DISABLE_GRAPHICS_DRIVER_WORKAROUNDS=1 help?
Comment 10 Danylo 2018-05-30 07:57:57 UTC
UNITY_DISABLE_GRAPHICS_DRIVER_WORKAROUNDS=1 doesn't help, unfortunately.
Comment 11 leozinho29_eu 2018-07-06 22:42:28 UTC
Hi, is there something I can do to make the bug disappear then while playing the game? If yes, how do I do?

Thank you.
Comment 12 Maik Stratemeyer 2019-03-29 12:19:01 UTC
Is there a solution yet?



Where can I find the fire shader file or the PC[1].x file?
Comment 13 Danylo 2019-03-29 14:17:43 UTC
Hi,

Unfortunately the way I *fixed* it is not something common user can and should do.
It is an error in the game itself and could be only fixed by its developers.
Comment 14 Denis 2019-07-03 15:35:37 UTC
as it was proved that issue in the game, I created report in steam =>
https://steamcommunity.com/app/222880/discussions/0/1643167006282747346/

closing current ticket.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.