Vulkan: Performance Improvements #113918

Open
opened 2023-10-19 08:24:00 +02:00 by Jeroen Bakker · 1 comment
Member

Vulkan performance isn't what we are targeting. This is by approach where we first focused on quality, support and feature completeness. This tasks collects some ideas that we have to improve the performance.

The Vulkan API is designed on knowing up front what you want to do, and redo this over and over. These recipes are called pipelines in vulkan. This is fine in gaming where every frame is drawn fairly the same. For Blender (and I assume) other professional applications this isn't the case. Blender still uses immediate mode emulation in pretty much everywhere. Where state is set and draw commands are executed on the active state.

Vulkan has an extension that provides this workflow (VK_EXT_shader_object), but isn't widely supported (https://vulkan.gpuinfo.org/listdevicescoverage.php?extension=VK_EXT_shader_object). At the time of writing only supported by NVidia and llvmpipe.

Here is a list of ideas that we can do to improve the performance in the short term. More evasive ideas might require a big overhaul of the GPU module API.

  • Use multiple VkCommandBuffers.
    • One dedicated to data transfers and blit operations
    • One command buffer dedicated to compute operations
    • One command buffer dedicated to graphics operations
    • These command buffers will have some ordering when they will be sent to the device queue. When sent additional synchronization rules can be added for better performance.
  • Add support for multi draw commands (draw list)
  • Render passes, subpasses, framebuffers are tightly together would benefit recipes.
    • When using framebuffer transitions, first provide the transitions up front when binding the framebuffer. Use GPU_framebuffer_subpass_next` or something to perform the subpass transition.
  • Add support for VkPipelineCache
Vulkan performance isn't what we are targeting. This is by approach where we first focused on quality, support and feature completeness. This tasks collects some ideas that we have to improve the performance. The Vulkan API is designed on knowing up front what you want to do, and redo this over and over. These recipes are called pipelines in vulkan. This is fine in gaming where every frame is drawn fairly the same. For Blender (and I assume) other professional applications this isn't the case. Blender still uses immediate mode emulation in pretty much everywhere. Where state is set and draw commands are executed on the active state. Vulkan has an extension that provides this workflow (VK_EXT_shader_object), but isn't widely supported (https://vulkan.gpuinfo.org/listdevicescoverage.php?extension=VK_EXT_shader_object). At the time of writing only supported by NVidia and llvmpipe. Here is a list of ideas that we can do to improve the performance in the short term. More evasive ideas might require a big overhaul of the GPU module API. * [ ] Use multiple VkCommandBuffers. * One dedicated to data transfers and blit operations * One command buffer dedicated to compute operations * One command buffer dedicated to graphics operations * These command buffers will have some ordering when they will be sent to the device queue. When sent additional synchronization rules can be added for better performance. * [ ] Add support for multi draw commands (draw list) * [ ] Render passes, subpasses, framebuffers are tightly together would benefit recipes. * When using framebuffer transitions, first provide the transitions up front when binding the framebuffer. Use GPU_framebuffer_subpass_next` or something to perform the subpass transition. * [ ] Add support for VkPipelineCache
Jeroen Bakker added this to the 4.2 LTS milestone 2023-10-19 08:24:00 +02:00
Jeroen Bakker added the
Interest
Vulkan
Type
To Do
labels 2023-10-19 08:24:00 +02:00
Jeroen Bakker added this to the EEVEE & Viewport project 2023-10-19 08:24:02 +02:00
Jeroen Bakker changed title from Vulkan: Performance to Vulkan: Performance Improvements 2023-10-19 08:24:26 +02:00
Jeroen Bakker self-assigned this 2023-10-19 08:28:13 +02:00
Contributor

I recently summarized the policy regarding renderpass transitions.
issue

I recently summarized the policy regarding renderpass transitions. [issue](https://projects.blender.org/vnapdv/tmp-vulkan/issues/9)
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 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#113918
No description provided.