|
Blender V5.0
|
#include "GHOST_ContextVK.hh"#include "vulkan/vk_ghost_api.hh"#include "vk_mem_alloc.h"#include "CLG_log.h"#include <algorithm>#include <array>#include <cassert>#include <cstdio>#include <cstring>#include <iostream>#include <mutex>#include <optional>#include <sstream>#include <vector>#include <sys/stat.h>Go to the source code of this file.
Classes | |
| struct | GHOST_ExtensionsVK |
| class | GHOST_DeviceVK |
| struct | GHOST_InstanceVK |
Macros | |
| #define | VMA_EXTERNAL_MEMORY_WIN32 0 |
| #define | FORMAT_ERROR(X) |
| #define | __STR(A) |
| #define | VK_CHECK(__expression, fail_value) |
Functions | |
| static const char * | vulkan_error_as_string (VkResult result) |
| static GHOST_TSuccess | selectPresentMode (const GHOST_TVSyncModes vsync, VkPhysicalDevice device, VkSurfaceKHR surface, VkPresentModeKHR *r_presentMode) |
| static bool | selectSurfaceFormat (const VkPhysicalDevice physical_device, const VkSurfaceKHR surface, bool use_hdr_swapchain, VkSurfaceFormatKHR &r_surfaceFormat) |
Variables | |
| static CLG_LogRef | LOG = {"ghost.context"} |
| static std::optional< GHOST_InstanceVK > | vulkan_instance |
| #define __STR | ( | A | ) |
Definition at line 99 of file GHOST_ContextVK.cc.
| #define FORMAT_ERROR | ( | X | ) |
Referenced by vulkan_error_as_string().
| #define VK_CHECK | ( | __expression, | |
| fail_value ) |
Definition at line 100 of file GHOST_ContextVK.cc.
Referenced by GHOST_InstanceVK::create_device(), GHOST_InstanceVK::create_instance(), GHOST_DeviceVK::init_extensions(), GHOST_InstanceVK::init_extensions(), and GHOST_ContextVK::initializeDrawingContext().
| #define VMA_EXTERNAL_MEMORY_WIN32 0 |
Definition at line 26 of file GHOST_ContextVK.cc.
|
static |
Definition at line 1035 of file GHOST_ContextVK.cc.
References CLOG_WARN, GHOST_kSuccess, GHOST_kVSyncModeOff, GHOST_kVSyncModeUnset, and LOG.
|
static |
Select the surface format that we will use.
We will select any 8bit UNORM surface.
Definition at line 1084 of file GHOST_ContextVK.cc.
|
static |
Definition at line 49 of file GHOST_ContextVK.cc.
References FORMAT_ERROR, and result.
Referenced by GHOST_ContextVK::swapBufferRelease().
|
static |
Definition at line 47 of file GHOST_ContextVK.cc.
Referenced by GHOST_ExtensionsVK::enable(), and GHOST_InstanceVK::select_physical_device().
|
static |
A shared device between multiple contexts.
The logical device needs to be shared as multiple contexts can be created and the logical vulkan device they share should be the same otherwise memory operations might be done on the incorrect device.
Definition at line 663 of file GHOST_ContextVK.cc.
Referenced by GHOST_ContextVK::getVulkanHandles(), GHOST_ContextVK::initializeDrawingContext(), GHOST_ContextVK::swapBufferAcquire(), GHOST_ContextVK::swapBufferRelease(), and GHOST_ContextVK::~GHOST_ContextVK().