Grease Pencil: drawing shapes on surface causes intense viewport flickering #65955
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#65955
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Linux-4.13.10-041310-generic-x86_64-with-debian-stretch-sid 64 Bits
Graphics card: GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.67
Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-06-19 18:29, hash:
d30f72dfd8
Drawing GP shapes on the surface of an object causes viewport flickering.
See video demo .
grease_pencil_shape_on_surface_viewport_flicker.blend
Exact steps for others to reproduce the error
Added subscriber: @MACHIN3
Added subscriber: @MizManFryinPan
Can confirm. Doesn't work on 'd30f72dfd8ac'
Seems to have worked fine on Hash: '12da679fa094' though it could've also worked later on. Its just the latest one before today's build that I have on my computer.
Added subscriber: @brecht
Caused by
741641f4c3
.Ok it is caused by a VERY bad usage of DRW in GPencil. My patch just unveiled the problem.
Added subscribers: @antoniov, @fclem
@antoniov The issue comes from these lines. When drawing a line, the draw depth function is called first, and only used basic engine and GPencil. But then when the viewport is redrawn, an other set of engine is enabled which reset all engines data for this viewport.
This makes
stl->storage->buffer_stroke
false even if the stl->storage->buffer_stroke is still valid. That leads to memory leak and otherSo the easy fix should be to free just after finishing drawing.
In the long run we should reuse the batches to avoid memory allocations.
Source of the issue.
Don't use e_data for things that will change or can be volatile. Use stl->g_data for that and be sure to reset it before reuse
Pretty much all these vars should be inside stl->g_data
If you are using temp textures, then you cannot assume they will be the same when the next redraw comes up. Use txl and real texture for that.
@fclem I will take a look of the bug, but not sure now it's the moment to make the other changes so near of 2.80 release date. I thinkis better wait for 2.81.
I have tested and in Windows 10 NVIDIA RTX2080TI I'm unable to reproduce it.
EDIT: With a new file I can reproduce it now.
Working in the fix in D5115
This issue was referenced by
8bf1977d31
Changed status from 'Open' to: 'Resolved'