Vulkan: Enable as Experimental Option #113057
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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.
Depends on
#113007 Vulkan: Wayland Windowing
blender/blender
Reference: blender/blender#113057
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Jeroen-Bakker/blender:vulkan/enable-as-experimental"
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?
This PR enables vulkan backend as experimental option.
It will only be available in alpha builds on Linux and Windows.
This option is highly experimental and enabled to get some insight
on supported platforms. Don't expect a fully working Blender
yet. Also don't expect it to have usable performance.
What is known to not work?
on those platforms.
doesn't support the needed vertex format. Comment out
DRW_draw_cursor
inDRW_draw_region_info
.tweaks are also needed to do correct depth testing.
which isn't supported yet. (#113141)
default engine. For now disable GPU depth picking in the preferences.
Cuda <-> Vulkan interop might require a different approach than OpenGL as Vulkan doesn't allow
importing memory from a Cuda context. EEVEE uses features that aren't available yet in the backend
works on a single object. Changes are expected in EEVEE-Next that will break Vulkan compatibility
in the near future.
on asserts.
for the missing features still need to be implemented.
A word about performance
In the project planning we focus first on stability and platform support. The performance of Vulkan is
around 20% of what we want to achieve. The reason is that each command sent to the
GPU is done one at a time. The implementation even waits until we have feedback that the GPU
is idle again.
Geometry is currently stored in System RAM. The GPU will read and cache the data when
accessing geometry. This slows down when using objects with much geometry.
Some performance features like MDI (Multi-Draw-Indirect) hasn't been implemented and
falls back to Single Draw Indirect.
Why enable it is an experimental option?
there are special cases that we are not aware of. Main development
environment has been Linux/X11 with occasionally testing using Windows.
gpu
module.config. We expect it to be able to compile without installing the Vulkan SDK.
The Vulkan SDK is a very powerful tool, but only when actually doing GPU
development. Otherwise it is an overhead which slows down other
activities.
How can the backend be enabled?
Currently the Vulkan backend can be enabled per Blender session by starting
with the command line argument
--gpu-backend vulkan
. In the future, afterthe backend is proven to work, we will add a user preference to switch between
OpenGL and Vulkan.
@blender-bot package
Package build started. Download here when ready.
I added the platform maintainers as reviewer, and Bastien as being the admin associated with the Vulkan Backend.
Seems like the linux build is failing as it is looking for the OS vulkan library (libvulkan.so) on the buildbot worker, who might be head-less. Solution might be to use https://github.com/KhronosGroup/Vulkan-Loader or https://github.com/zeux/volk/
Volk seems like the most easy to integrate with least amount of overhead. Will integrate volk.
Vulkan: Enable as Experimental Optionto WIP: Vulkan: Enable as Experimental OptionSo this would be the equivalent of glew/epoxy? Would it be in extern/ or a new library dependency?
@ -107,3 +105,1 @@
find_package(ShaderC REQUIRED)
find_package(Vulkan REQUIRED)
endif()
set(WITH_VULKAN_BACKEND OFF)
Generally prefer to make the option unavailable rather than silently disabling it like this.
As noted by @LazyDodo on chat, Vulkan Loader is already part of the precompiled libraries, and perhaps the only thing missing is installing the relevant shared libraries?
For Linux this would be done with
add_bundled_libraries(vulkan/lib)
.That's not the OS vulkan library, that's the vulkan loader from our library folder, which we linked, but seemingly didn't copy to our bin folder just yet.
will fix the issue for the windows bots,
linux will need something similarbrecht already posted the linux fix@blender-bot package
Package build started. Download here when ready.
WIP: Vulkan: Enable as Experimental Optionto Vulkan: Enable as Experimental Option@brecht @LazyDodo yes that seems to work! Thanks.
I downloaded the windows build on a laptop, but it couldn't find a suitable vulkan device. Will look in more depth why it couldn't detect the device.
"Works for me", downloaded the build off the bots and blender started just fine (validated it was using vulkan by switching to wireframe mode to make it crash), whatever it is must be local to your laptop. Then again odds are whatever is happening may be happening on other systems as well, any diagnostics you could add there would help future triagers.
@ -805,0 +803,4 @@
WITH_VULKAN_BACKEND
WITH_VULKAN_GUARDEDALLOC
)
else()
not needed, we don't do this for other variables like the wayland stuff either, any non existent variable is equal to false in cmake.
@ -46,6 +46,9 @@ else()
endif()
endif()
if (NOT WITH_EXPERIMENTAL_FEATURES)
Code is duplicated between the linux and windows platform file, there must be a better place for this
I found out that the platform I used doesn't support
VK_KHR_maintenance4
which was added for performance reasons.Seems like we need to only enable this when it is available. Can be fixed by updating drivers. Currently around 20% of all platforms
support this extension. Which is fine as it also counts platforms that existed before this extension was introduced :-)
https://vulkan.gpuinfo.org/listdevicescoverage.php?extensionname=VK_KHR_maintenance4&extensionfeature=maintenance4&platform=all
I'm a bit confused on the actual solution you are suggesting here, is it
a) update your drivers, we need
VK_KHR_maintenance4
otherwise blender won't run, in which case we need to communicate this with the users, ie a popup going "no, sorry" beats a crash.b) We shouldn't rely on it, unless it's available, we'll fix the code so it's used when available, and if not, no big deal blender will still run (although it's best to update your drivers for optimal performance) ?
This one. Still need to test on a not supporting device (#113239)
@blender-bot package
Package build started. Download here when ready.
Running on Intel Iris Plus (Vulkan 1.2)
@blender-bot package
Package build started. Download here when ready.
Starting with the following
.blend
file on the command line hangs with a black non-full-screen window, but starting without a filename and then opening this same file works.../build_linux/bin/blender --gpu-backend vulkan ~/Blender/background.blend
hangs.../build_linux/bin/blender --gpu-backend vulkan
and then Open and the same file works.Hi @Bill-Spitzak can you create a report and make sure to attach the system-info.txt generated from Blenders help menu.
When creating the report mention that I told you to create a report :-)
#126263 (comment)