Regression: going in and out of full screen causes the compositor to re-calculate unnecessarily. #97575

Closed
opened 2022-04-23 22:03:25 +02:00 by michael campbell · 15 comments

System Information
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.12

Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-04-13 23:49, hash: 0ba061c3bc
Worked: 2.83.0
Worked: 2.82a

This is a regression caused by 23b5e10dbd

with the compositor workspace open drop in any image and then connect it to a denoise node or some other expensive node (lens distort set to one for example), connect it to a viewer and ensure backdrop is enabled.

Go to full screen by pressing ctrl space, it'll recalculate, then go back out of full screen by pressing ctrl space again, it'll recalculate again. I haven't tested, but virtually everything causes a frame change event so I wouldn't be surprised if this is the case here too.

**System Information** Operating system: Windows-10-10.0.19042-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.12 **Blender Version** Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-04-13 23:49, hash: `0ba061c3bc` Worked: 2.83.0 Worked: 2.82a This is a regression caused by 23b5e10dbd with the compositor workspace open drop in any image and then connect it to a denoise node or some other expensive node (lens distort set to one for example), connect it to a viewer and ensure backdrop is enabled. Go to full screen by pressing ctrl space, it'll recalculate, then go back out of full screen by pressing ctrl space again, it'll recalculate again. I haven't tested, but virtually everything causes a frame change event so I wouldn't be surprised if this is the case here too.

Added subscriber: @3di

Added subscriber: @3di
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Can confirm, will check.

Can confirm, will check.

Thanks. Perhaps this also sheds some light on the other bug report you looked at regarding the persistent data being partially lost when going full screen. Perhaps render.render is being called each time full screen is entered/left with the composite node temporarily disabled to get the refresh?

Thanks. Perhaps this also sheds some light on the other bug report you looked at regarding the persistent data being partially lost when going full screen. Perhaps render.render is being called each time full screen is entered/left with the composite node temporarily disabled to get the refresh?
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

This is a regression caused by 23b5e10dbd

Not totally sure about design here, but a SpaceType refresh callback usually seems to be responsible for refreshing pretty much everything, so we might do a bit much here now.
For me, this raises following questions:

  • should screen editing really enforce such a prominent refresh?
  • is there another place where the VSE could ensure valid region sizes and remove handlers of invisible regions?

notes:

  • ED_screen_state_toggle does ED_area_tag_refresh
  • ED_area_do_refresh causes node_area_refresh

The regression is quite old and correctness is certainly more important than performance, but will still raise priority to get the eyes of developers looking at this...

CC @JulianEisel

This is a regression caused by 23b5e10dbd Not totally sure about design here, but a `SpaceType` `refresh` callback usually seems to be responsible for refreshing pretty much everything, so we *might* do a bit much here now. For me, this raises following questions: - should screen editing really enforce such a prominent refresh? - is there another place where the VSE could ensure valid region sizes and remove handlers of invisible regions? notes: - `ED_screen_state_toggle` does `ED_area_tag_refresh` - `ED_area_do_refresh` causes `node_area_refresh` The regression is quite old and correctness is certainly more important than performance, but will still raise priority to get the eyes of developers looking at this... CC @JulianEisel
Philipp Oeser changed title from going in and out of full screen causes the compositor to re-calculate unnecessarily. to Regression: going in and out of full screen causes the compositor to re-calculate unnecessarily. 2022-04-25 14:05:32 +02:00
Member

In #97575#1346211, @3di wrote:
Thanks. Perhaps this also sheds some light on the other bug report you looked at regarding the persistent data being partially lost when going full screen. Perhaps render.render is being called each time full screen is entered/left with the composite node temporarily disabled to get the refresh?

Would have to look at how renderengines react to this callback.
Does it (the issue from the other report, #96033 btw) behave better in 2.82a for you?

> In #97575#1346211, @3di wrote: > Thanks. Perhaps this also sheds some light on the other bug report you looked at regarding the persistent data being partially lost when going full screen. Perhaps render.render is being called each time full screen is entered/left with the composite node temporarily disabled to get the refresh? Would have to look at how renderengines react to this callback. Does it (the issue from the other report, #96033 btw) behave better in 2.82a for you?

Added subscribers: @Jeroen-Bakker, @Sergey

Added subscribers: @Jeroen-Bakker, @Sergey

Doing space refresh on fullscreen changes sounds reasonable to me. I wouldn't know of another way of ensuring space is in the consistent state after the screen layout changed.

The actual problem to me seems that compositor uses area refresh and notifiers mechanisms to inform that re-compositing is needed. This is how it was initially implemented, and there is still comment about it: /* default now: refresh node is starting preview */.

The easiest solution which does not lead to a big refactor seems to be to set a special "need compositor job" flag from the notifier listener, and check for it from the area refresh: P2919

@Jeroen-Bakker, @JulianEisel, can you think of something better what we can do for 3.2?

Doing space refresh on fullscreen changes sounds reasonable to me. I wouldn't know of another way of ensuring space is in the consistent state after the screen layout changed. The actual problem to me seems that compositor uses area refresh and notifiers mechanisms to inform that re-compositing is needed. This is how it was initially implemented, and there is still comment about it: `/* default now: refresh node is starting preview */`. The easiest solution which does not lead to a big refactor seems to be to set a special "need compositor job" flag from the notifier listener, and check for it from the area refresh: [P2919](https://archive.blender.org/developer/P2919.txt) @Jeroen-Bakker, @JulianEisel, can you think of something better what we can do for 3.2?
Member

Not really familiar with this mechanism and its reasoning

Not really familiar with this mechanism and its reasoning
Member

Doing space refresh on fullscreen changes sounds reasonable to me. I wouldn't know of another way of ensuring space is in the consistent state after the screen layout changed.

Exactly, the refresh shouldn't be an issue, the way the compositor uses it is.

Your proposed solution looks fine to me. Although naming could be a bit more descriptive, it's unclear what "job" it refers to (I guess this was just a quick patch though) :)

> Doing space refresh on fullscreen changes sounds reasonable to me. I wouldn't know of another way of ensuring space is in the consistent state after the screen layout changed. Exactly, the refresh shouldn't be an issue, the way the compositor uses it is. Your proposed solution looks fine to me. Although naming could be a bit more descriptive, it's unclear what "job" it refers to (I guess this was just a quick patch though) :)

Naming -- sure. It was really a quick PoC.
I'll do some improvements to it and submit as a more proper review.

Naming -- sure. It was really a quick PoC. I'll do some improvements to it and submit as a more proper review.

This issue was referenced by b891c72d2d

This issue was referenced by b891c72d2da6c0e04569baac32da23c8b736aacf

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sergey Sharybin self-assigned this 2022-05-05 15:40:05 +02:00
Sign in to join this conversation.
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
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#97575
No description provided.