GPU Compositor: Avoid global DST lock on Linux #118286

Merged
Sergey Sharybin merged 1 commits from Sergey/blender:compositor_gpu_lock into main 2024-02-14 19:30:50 +01:00

It is not required to hold the lock of DST when performing
compositing on GPU, as the compositor implementation uses the
GPU module directly, bypassing the draw manager.

However, currently this is known to cause issues on macOS,
and is not yet tested on Windows.

On Linux it works correctly, and avoids lock while compositor
is running.

There could still be a small locking hiccup, when the GPU
context is created and disposed. This needs to be looked
into.

It is not required to hold the lock of DST when performing compositing on GPU, as the compositor implementation uses the GPU module directly, bypassing the draw manager. However, currently this is known to cause issues on macOS, and is not yet tested on Windows. On Linux it works correctly, and avoids lock while compositor is running. There could still be a small locking hiccup, when the GPU context is created and disposed. This needs to be looked into.
Sergey Sharybin added the
Interest
Compositing
Module
VFX & Video
labels 2024-02-14 18:17:37 +01:00
Sergey Sharybin added 1 commit 2024-02-14 18:17:45 +01:00
2666f21cf3 GPU Compositor: Avoid global DST lock on Linux
It is not required to hold the lock of DST when performing
compositing on GPU, as the compositor implementation uses the
GPU module directly, bypassing the draw manager.

However, currently this is known to cause issues on macOS,
and is not yet tested on Windows.

On Linux it works correctly, and avoids lock while compositor
is running.

There could still be a small locking hiccup, when the GPU
context is created and disposed. This needs to be looked
into.
Sergey Sharybin requested review from Omar Emara 2024-02-14 18:18:04 +01:00
Sergey Sharybin requested review from Brecht Van Lommel 2024-02-14 18:18:08 +01:00
Brecht Van Lommel reviewed 2024-02-14 18:45:27 +01:00
@ -520,0 +540,4 @@
#if defined(__linux__)
GPU_flush();
GPU_render_end();

in DRW_render_context_disable, GPU_render_end is called after GPU_context_active_set(nullptr). Any reason for the difference?

in `DRW_render_context_disable`, `GPU_render_end` is called after `GPU_context_active_set(nullptr)`. Any reason for the difference?
Author
Owner

Yes. The Eevee department says it should be called in the way it is called here :)

Yes. The Eevee department says it should be called in the way it is called here :)
Brecht Van Lommel approved these changes 2024-02-14 19:27:42 +01:00
Sergey Sharybin merged commit 33af56f13e into main 2024-02-14 19:30:50 +01:00
Sergey Sharybin deleted branch compositor_gpu_lock 2024-02-14 19:30:53 +01: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
2 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#118286
No description provided.