|
Blender V5.3
|
#include <vulkan/vulkan_core.h>#include "volk.h"#include "GHOST_ContextVK.hh"#include "GHOST_Types.hh"#include "vulkan/vk_ghost_api.hh"#include "vk_mem_alloc.h"#include "CLG_log.h"#include "BLI_string_ref.hh"#include "BLI_vector.hh"#include <algorithm>#include <array>#include <cassert>#include <cinttypes>#include <cstdio>#include <cstdlib>#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 | VOLK_NAMESPACE |
| #define | VOLK_NO_DEVICE_PROTOTYPES |
| #define | VK_NO_PROTOTYPES |
| #define | VMA_EXTERNAL_MEMORY_WIN32 0 |
| #define | __STR(A) |
| #define | VK_CHECK(__expression, fail_value) |
| #define | __has_feature(x) |
Functions | |
| static const char * | to_string_vk_format (VkFormat format) |
| static const char * | to_string_vk_color_space (VkColorSpaceKHR color_space) |
| static const char * | to_string_vk_present_mode (VkPresentModeKHR present_mode) |
| 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"} |
Vulkan Instance Extensions Query | |
| static std::optional< GHOST_InstanceVK > | vulkan_instance |
| #define __has_feature | ( | x | ) |
| #define __STR | ( | A | ) |
Definition at line 67 of file GHOST_ContextVK.cc.
| #define VK_CHECK | ( | __expression, | |
| fail_value ) |
Definition at line 68 of file GHOST_ContextVK.cc.
Referenced by GHOST_InstanceVK::create_instance(), GHOST_DeviceVK::init_extensions(), GHOST_InstanceVK::init_extensions(), and GHOST_ContextVK::initializeDrawingContext().
| #define VK_NO_PROTOTYPES |
Definition at line 13 of file GHOST_ContextVK.cc.
| #define VMA_EXTERNAL_MEMORY_WIN32 0 |
Definition at line 39 of file GHOST_ContextVK.cc.
| #define VOLK_NAMESPACE |
Definition at line 11 of file GHOST_ContextVK.cc.
| #define VOLK_NO_DEVICE_PROTOTYPES |
Definition at line 12 of file GHOST_ContextVK.cc.
|
static |
Definition at line 1343 of file GHOST_ContextVK.cc.
References CLOG_WARN, GHOST_kSuccess, GHOST_kVSyncModeOff, GHOST_kVSyncModeUnset, LOG, and selectPresentMode().
Referenced by selectPresentMode().
|
static |
Select the surface format that we will use.
We will select any 8bit UNORM surface.
Definition at line 1393 of file GHOST_ContextVK.cc.
References selectSurfaceFormat(), and VK_FORMAT_R8G8B8A8_UNORM.
Referenced by selectSurfaceFormat().
|
static |
Definition at line 1299 of file GHOST_ContextVK.cc.
References STRINGIFY, STRINGIFY_ARG, and to_string_vk_color_space().
Referenced by to_string_vk_color_space().
|
static |
Definition at line 1285 of file GHOST_ContextVK.cc.
References STRINGIFY, STRINGIFY_ARG, to_string_vk_format(), and VK_FORMAT_R8G8B8A8_UNORM.
Referenced by to_string_vk_format().
|
static |
Definition at line 1327 of file GHOST_ContextVK.cc.
References STRINGIFY, STRINGIFY_ARG, and to_string_vk_present_mode().
Referenced by to_string_vk_present_mode().
|
static |
Definition at line 65 of file GHOST_ContextVK.cc.
Referenced by GHOST_InstanceVK::create_device(), GHOST_ExtensionsVK::disable(), GHOST_ExtensionsVK::enable(), GHOST_InstanceVK::GHOST_InstanceVK(), 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 873 of file GHOST_ContextVK.cc.
Referenced by GHOST_ContextVK::getVulkanHandles(), GHOST_ContextVK::initializeDrawingContext(), GHOST_ContextVK::is_device_extension_enabled(), GHOST_ContextVK::is_instance_extension_enabled(), GHOST_ContextVK::swapBufferAcquire(), GHOST_ContextVK::swapBufferRelease(), and GHOST_ContextVK::~GHOST_ContextVK().