Page MenuHome

GPencil – Fills are Flickering
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Linux-5.3.0-40-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 1660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 435.21

Blender Version
Broken: version: 2.83 (sub 8), branch: master, commit date: 2020-03-11 16:35, hash: rB19b46b2fca79
Worked: (optional)

Short description of error
While scrolling or hovering over the Viewport Gizmos the Fills starting to flicker. In some cases these artifacts will also be rendered. See screencast (At second 24, I discovered that hovering over the Gizmo made it worse^^):

Exact steps for others to reproduce the error

Open the attached blend file and hover over the Viewport Gizmo, or

  1. Open Blender with 2D Animation workspace
  2. Draw a closed shape
  3. Fill the shape with a fill color
  4. Press Tab twice to change into Object Mode (this step is not necessary but in Object Mode it seems to be where the problem is most acute)
  5. Zoom in and out and hover over the Gizmo.

––––––––––––––––––––––––––

I don't have any silly jokes for you today.^^

Event Timeline

ronsn created this task.Wed, Mar 11, 8:48 PM
ronsn added a project: Grease Pencil.
Antonio Vazquez (antoniov) changed the task status from Needs Triage to Needs Developer to Reproduce.Thu, Mar 12, 10:26 AM

With the file you provide as example, I cannot reproduce any flickering in my system.

@Clément Foucault (fclem) Do you any idea? can you reproduce it?

I cannot reproduce either. We had an issue with drivers older than 440. Try udpating your drivers to see if it helps.

@ronsn Fun Fact: This also happens when you click in and out of text boxes.
...Also, I had no idea this was happening to you, *too*. Thank you, Richard Antalik, for leading me straight to this.

ronsn added a comment.EditedThu, Mar 12, 9:26 PM

@Clément Foucault (fclem) I had to enable the developer mode for my system, to be able to install the driver (440.59).

I tested it also on another laptop, where it hasn't this issue.

I used the attached blend file above and the following Blender version for both.

And this are the results:

Blender Version
2.83 (sub 8), branch: master, commit date: 2020-03-12 00:33, hash: rB8751af6d1902

DOES NOT WORK ON THIS SYSTEM:

System Information
Operating system: Linux-5.3.0-40-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 1660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.59

WORKS ON THIS SYSTEM:

System Information
Operating system: Linux-4.15.0-88-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) Intel Open Source Technology Center 4.5 (Core Profile) Mesa 19.2.8

––––––––––––––––––––––––––––––

Anything else I can do? University is closed because of Corona, so I have a little bit more time^^

ronsn added a comment.Thu, Mar 12, 9:50 PM

Btw. the issue occurs not only in the attached blend file above, but also with Suzanne in the General workspace:

I have bisected th error and it looks the flickering was introduced in commit c971e812d5e2

@Antonio Vazquez (antoniov) That would mean, that the parent commit bf1b323b154433ab4701a7ab455cdecaa3867819 does not have this issue? I compiled that version and the issue is there as well:
Or did I misunderstand something?

ronsn added a comment.EditedSun, Mar 15, 1:58 AM

Puhh, I was able to make a bisect too without running into compiling errors all the time.

I choose my borders like this:

git bisect start
git bisect good 94335f798997f6b5bbde685fb3d2ef2315fac34c
git bisect bad ad8ec8d8283c6bd8e811db8f1f44a21280b3a0a0

Which I tested pretty hard and long. The flickering occurs sometimes a little bit less and sometimes a little bit more and sometimes less often. Which is why I had to test it a little bit longer. And this are my results:

.
.
.
117fc08e51926cdd425aec23c6491cd33ee1de58 is (gp-branch) bad

8b6ecdb77f697a4897be2bfd0d5aef8730df3ebc is (gp-branch; 11.02. 15:18) bad => first bad commit

8f3e4c8625fbd67d2162b180dd9f6e4dd16940b0 is (gp-branch; 11.02. 11:58) good
.
.
.

So it seems, that rB8b6ecdb77f697a4897be2bfd0d5aef8730df3ebc is the one commit, which introduced the issue.

If you want me to make a recording between those two versions where one is good and the next is bad, I'll make it, but now it's a little bit late here, so I have to leave you for now. :)

Addendum: Even if this was the first bad commit, doesn't mean that there are no other newer commits, which repeated and/or increased the issue.

I'm experiencing the same issue, too. My environment is as follows.

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 442.19

Blender Version
Broken: version: 2.83 (sub 9), branch: master, commit date: 2020-03-14 18:05, hash: rBa210b8297f5a

I builded and tested c971e812d5e2 and the earlier bf1b323b1544.
As @Antonio Vazquez (antoniov) mentioned, I confirmed that this issue begun from c971e812d5e2 at least in my environment.

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 442.19

Blender Version
Broken: version: 2.83 (sub 7), branch: test, commit date: 2020-03-10 03:47, hash: rBbf1b323b1544

There is no issue.

Blender Version
Broken: version: 2.83 (sub 7), branch: test2, commit date: 2020-03-10 03:47, hash: rBc971e812d5e2

Flickering happens.

Antonio Vazquez (antoniov) changed the task status from Needs Developer to Reproduce to Confirmed.Wed, Mar 18, 4:09 PM

Only confirmed in Windows with NVIDIA cards.

Antonio Vazquez (antoniov) triaged this task as High priority.Wed, Mar 18, 4:09 PM

@n1729 (n1729) @ronsn I did a test to verify if it's related to ivec4 parameter.

Here P1305 you have a small patch for testing.

If you could compile and test to see if you have the problem still, we could be sure if the bug relates to that or not.

ronsn added a comment.Thu, Mar 19, 4:12 PM

@Antonio Vazquez (antoniov) With patch P1305 applied the fills are still flickering on my system⁽¹⁾.

Building Blender with your patch went successful:

make
...

[ 73%] Building C object source/blender/draw/CMakeFiles/bf_draw.dir/intern/draw_cache_impl_gpencil.c.o
[ 73%] Building C object source/blender/draw/CMakeFiles/bf_draw.dir/engines/gpencil/shaders/gpencil_common_lib.glsl.c.o
[ 73%] Building C object source/blender/draw/CMakeFiles/bf_draw.dir/engines/overlay/shaders/edit_gpencil_vert.glsl.c.o

...

[100%] Linking CXX executable ../../bin/blender
now run: "make install" to copy runtime files and scripts to 2.83
[100%] Built target blender
Install the project...
-- Install configuration: "Release"
-- Installing: /home/lynx/blender-git/build_linux/bin/./readme.html

edit build configuration with: /home/lynx/blender-git/build_linux/CMakeCache.txt run make again to rebuild.
Blender successfully built, run from: /home/lynx/blender-git/build_linux/bin/blender

–––––––––––
(1): System Information
Operating system: Linux-5.3.0-40-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 1660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.59

Blender Version
Broken: version: 2.83 (sub 10), branch: master (modified), commit date: 2020-03-19 14:26, hash: rB2982c9ba0a9c

Thank you, @Antonio Vazquez (antoniov)

I tested P1305. The vec4 version seems to alleviate flickering pretty well, but even so flickering still sometimes happens.
I had never found any single flickering as of the point bf1b323b1544, which is earlier than c971e812d5e2.

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 442.19

Before applying the patch: version: 2.83 (sub 9), branch: test3, commit date: 2020-03-18 10:12, hash: rB12720d8b9b38

After applying the patch: version: 2.83 (sub 9), branch: test3, commit date: 2020-03-19 15:20, hash: rB2f78389bbb8a
Please pay attention to the monkey's right ear.

ronsn added a comment.Mon, Mar 23, 6:58 PM

@Antonio Vazquez (antoniov) I wasn't sure if your patch P1305 made it better, but now I have a "better" opportunity to compare the current master branch version without and with your patch. And it seems that your patch made it better as @n1729 (n1729) stated out.

I used the following blend file:

Here I also made a comparison screencast without and with your patch:

@Brecht Van Lommel (brecht) We have been looking at the code and running debugs with RenderDoc a NVIDIA tools and it looks a NVDIA driver issue. Could you make a test in a NVIDIA machine to see if you can see what is going on.

Here you have a video inside NVIDIA tool and you can see the flickering when moving the mouse.

@Clément Foucault (fclem) and I were looking the code again and again and we are not able to find any mistake. This is a very important bug and we don't know how fix it.

Brecht Van Lommel (brecht) changed the subtype of this task from "Report" to "Bug".Thu, Mar 26, 11:39 AM

Just something I noticed, if it hasn’t already been by others, is that the border of the flickering area occurs where the vertices flip from being inside the fill in edit mode to outside and vice versa.

@Antonio Vazquez (antoniov), I looked at this for a bit but also couldn't see the cause. Maybe it's a driver bug.

To pinpoint the cause this I guess you'd have to kind of bisect the change, changing the code incrementally to see which exact part of that commit caused the problem.

If you can't find a solution, an option is to use the new code only for Apple, or the old code only for NVIDIA.