Vulkan: Separate DataTransfer, Compute, Graphics Commands #114104

Merged
Jeroen Bakker merged 23 commits from Jeroen-Bakker/blender:vulkan/specialized-command-buffers into main 2023-10-30 14:21:24 +01:00
Member

Goal is to reduce the number of command buffer flushes by tracking what is
happening in the different command queues. This is an initial step towards
advanced queue-ing strategies.

The new (intermediate) strategy records commands to different command
buffers based on what they do. There is a command buffer for data transfers,
compute pipelines and graphics pipelines.

When a compute command is recorded it ensures that all graphic commands
are finished. When a graphic command is recorded it ensures all compute
commands are finished. When a graphic or compute command is scheduled
all recorded data transfer commands are scheduled as well.

Some improvements are expected as multiple compute and data transfers
commands can now be scheduled at the same time and don't need to unbind
and rebind render passes. Especially when using EEVEE-Next which is
compute centric the performance change is visible for the user.

Goal is to reduce the number of command buffer flushes by tracking what is happening in the different command queues. This is an initial step towards advanced queue-ing strategies. The new (intermediate) strategy records commands to different command buffers based on what they do. There is a command buffer for data transfers, compute pipelines and graphics pipelines. When a compute command is recorded it ensures that all graphic commands are finished. When a graphic command is recorded it ensures all compute commands are finished. When a graphic or compute command is scheduled all recorded data transfer commands are scheduled as well. Some improvements are expected as multiple compute and data transfers commands can now be scheduled at the same time and don't need to unbind and rebind render passes. Especially when using EEVEE-Next which is compute centric the performance change is visible for the user.
Jeroen Bakker added this to the 4.1 milestone 2023-10-24 14:50:56 +02:00
Jeroen Bakker added the
Interest
Vulkan
label 2023-10-24 14:50:56 +02:00
Jeroen Bakker self-assigned this 2023-10-24 14:50:56 +02:00
Jeroen Bakker added 1 commit 2023-10-24 14:51:06 +02:00
Jeroen Bakker added this to the EEVEE & Viewport project 2023-10-24 14:51:15 +02:00
Jeroen Bakker added 1 commit 2023-10-24 15:01:27 +02:00
Contributor

Hello, good job. An important issue in submission is distributing the queue.
Drawing eevee and drawing multiple windows must be executed in multiple threads, so as is, it will always crash. Because it is not possible to use a single queue with multiple threads.
My implementation ended up being that for now it's good to do the queue selection in ContextVK.
Although it is only available on Windows, the implementation is as follows.
f9367b534a/intern/ghost/intern/GHOST_ContextVK.cc (L415)

Hello, good job. An important issue in submission is distributing the queue. Drawing eevee and drawing multiple windows must be executed in multiple threads, so as is, it will always crash. Because it is not possible to use a single queue with multiple threads. My implementation ended up being that for now it's good to do the queue selection in ContextVK. Although it is only available on Windows, the implementation is as follows. https://projects.blender.org/vnapdv/blender/src/commit/f9367b534a326ccc4809cb643d029362b6045d92/intern/ghost/intern/GHOST_ContextVK.cc#L415
Jeroen Bakker added 11 commits 2023-10-24 22:25:38 +02:00
a31882d0cf Cycles: oneAPI: fix device compilation with latest MSVC
<algorithm> header include is missing from some sycl headers, this will
be fixed upstream with https://github.com/intel/llvm/pull/10424,
meanwhile, we work around it by including it directly.
05f5908d5d Cleanup: Strict compiler arning
Unused function argument in the Metal framebuffer.
1812675388 Cleanup: Suppress strict compiler warning for external code
The new Clang which came with XCode 15 introduced the new
warning: -Wsingle-bit-bitfield-constant-conversion. It is a bit
too noisy in the Bullet code.

Since the warning is in the code which we do not maintain suppress
it similar to other similar warnings.

Pull Request: #113136
c3c5432678 GL: Remove Apple platform specific workarounds
We don't ship with OpenGL anymore on Mac platform.
The build option is not even available anymore.

This removes any reference to Apple or Mac in the
Opengl module.

Note that I left the depth_blitting_workaround
even if it originaly meant for Mac because it
might be still useful for other hardware.

Pull Request: #113126
Jeroen Bakker added 2 commits 2023-10-25 21:57:32 +02:00
Jeroen Bakker added 2 commits 2023-10-27 16:36:20 +02:00
Jeroen Bakker added 1 commit 2023-10-27 16:56:49 +02:00
Jeroen Bakker added 2 commits 2023-10-30 10:49:02 +01:00
Jeroen Bakker changed title from WIP: Vulkan: Separate DataTransfer, Compute, Graphics Commands to Vulkan: Separate DataTransfer, Compute, Graphics Commands 2023-10-30 10:55:50 +01:00
Jeroen Bakker changed title from Vulkan: Separate DataTransfer, Compute, Graphics Commands to Vulkan: Seperate DataTransfer, Compute, Graphics Commands 2023-10-30 10:55:58 +01:00
Jeroen Bakker changed title from Vulkan: Seperate DataTransfer, Compute, Graphics Commands to Vulkan: Separate DataTransfer, Compute, Graphics Commands 2023-10-30 10:56:13 +01:00
Jeroen Bakker added 3 commits 2023-10-30 13:38:14 +01:00
Jeroen Bakker merged commit f35b0373d6 into main 2023-10-30 14:21:24 +01:00
Sign in to join this conversation.
No reviewers
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 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#114104
No description provided.