GHOST Vulkan Backend API. #93031
Labels
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#93031
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
Supported backends
Compile directive
There will be a new compile directive
WITH_VULKAN_BACKEND
this compile directive will enable adding vulkan context in ghost backend systems.Creating a vulkan context
Vulkan contexts can be created by passing
GHOST_kDrawingContextTypeVulkan
when creating window/context.Device selection
There can be multiple vulkan compatible devices inside a system. User should be able to select a device via the user preferences. When selecting a different device blender should be restarted by the user. When no specific device is selected a best matching device should be selected.
GHOST_VulkanDeviceListHandle* GHOST_GetVulkanAvailableDevices(GHOST_SystemHandle,...)
: returns a list of all devices that match requirements. When constructing a window/context a specific device should be given.int64_t GHOST_VulkanDeviceListNumDevices(GHOST_VulkanDeviceListHandle* handle)
will return the number of devices foundGHOST_Success GHOST_GetVulkanDeviceListItem(GHOST_VulkanDeviceListHandle* handle, int64_t index, GHOST_VulkanPhysicalDevice * r_device)
will fill r_device with available data return the vendor and device id and a number to make the device unique.GHOST_DestroyVulkanDeviceList
should be called to free the GHOST_VulkanDeviceListHandle.GHOST_VulkanPhysicalDevice
is based onVkPhysicalDeviceProperties
but has a additional attribute to make the Vendor+Device unique. the combination of those 3 fields will allow to select a unique device.GHOST_GLSettings
will get anGHOST_VulkanPhysicalDeviceID*
attribute for device selection.When
NULL
is passed for GHOST_VulkanPhysicalDeviceID or the passed device couldn't be found during context creation GHOST will automatically select the best available device based on the device type (discrete before integrated before virtual [before cpu?]).NOTE: The VkQueryAPI requires an VkInstance. So we can only do this on an initialized GHOST_Context We could use a offscreen context for this.
Command queues
GHOST_GetVulkanBackbuffer(GHOST_WindowHandle
will get the handles of the given window.For offscreen rendering
GHOST_GetVulkanHandles
will retrieve the device handles and the command queue etc should be constructed by the caller.Smaller tasks
rename
GHOST_CreateOpenGLContext
toGHOST_CreateDrawingContext
. renameGHOST_DisposeOpenGLContext
toGHOST_DisposeDrawingContext
.rename
GHOST_ActivateOpenGLContext
toGHOST_ActivateDrawingContext
. renameGHOST_ReleaseOpenGLContext
toGHOST_ReleaseDrawingContext
.** Unclear if we need to rename
GHOST_GetDefaultOpenGLFramebuffer
andGHOST_GetContextDefaultOpenGLFramebuffer
or that we will have specific versions for Vulkan.Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @Jeroen-Bakker
Added subscriber: @GeorgiaPacific
Added subscriber: @Lain-Iwakura
Added subscriber: @Emi_Martinez
Added subscriber: @vnapdv
Added subscriber: @fanny
This issue was referenced by
6dac345a64
Jeroen Bakker referenced this issue2023-02-17 12:03:37 +01:00