|
Blender V4.5
|
#include "GHOST_ContextVK.hh"#include "vulkan/vk_ghost_api.hh"#include "CLG_log.h"#include <vector>#include <cassert>#include <cstdio>#include <cstring>#include <iostream>#include <mutex>#include <optional>#include <sstream>#include <sys/stat.h>Go to the source code of this file.
Classes | |
| class | GHOST_DeviceVK |
Macros | |
| #define | FORMAT_ERROR(X) |
| #define | __STR(A) |
| #define | VK_CHECK(__expression) |
Functions | |
| static const char * | vulkan_error_as_string (VkResult result) |
| static bool | contains_extension (const vector< VkExtensionProperties > &extension_list, const char *extension_name) |
| static vector< VkExtensionProperties > | getExtensionsAvailable () |
| static bool | checkExtensionSupport (const vector< VkExtensionProperties > &extensions_available, const char *extension_name) |
| static void | requireExtension (const vector< VkExtensionProperties > &extensions_available, vector< const char * > &extensions_enabled, const char *extension_name) |
| static GHOST_TSuccess | selectPresentMode (VkPhysicalDevice device, VkSurfaceKHR surface, VkPresentModeKHR *r_presentMode) |
| static bool | selectSurfaceFormat (const VkPhysicalDevice physical_device, const VkSurfaceKHR surface, VkSurfaceFormatKHR &r_surfaceFormat) |
Variables | |
| static CLG_LogRef | LOG = {"ghost.vulkan"} |
Vulkan Device | |
| static std::optional< GHOST_DeviceVK > | vulkan_device |
| static GHOST_TSuccess | ensure_vulkan_device (VkInstance vk_instance, VkSurfaceKHR vk_surface, const GHOST_GPUDevice &preferred_device, const vector< const char * > &required_extensions) |
| #define __STR | ( | A | ) |
Definition at line 94 of file GHOST_ContextVK.cc.
| #define FORMAT_ERROR | ( | X | ) |
Referenced by vulkan_error_as_string().
| #define VK_CHECK | ( | __expression | ) |
Definition at line 95 of file GHOST_ContextVK.cc.
Referenced by GHOST_ContextVK::initializeDrawingContext().
|
static |
Definition at line 807 of file GHOST_ContextVK.cc.
Referenced by requireExtension().
|
static |
Definition at line 107 of file GHOST_ContextVK.cc.
Referenced by GHOST_ContextVK::initializeDrawingContext().
|
static |
Definition at line 455 of file GHOST_ContextVK.cc.
References CLOG_ERROR, GHOST_GPUDevice::device_id, GHOST_DeviceVK::features, GHOST_kFailure, GHOST_kSuccess, blender::gpu::GPU_vulkan_is_supported_driver(), GHOST_DeviceVK::has_extensions(), GHOST_GPUDevice::index, LOG, GHOST_DeviceVK::physical_device, GHOST_DeviceVK::properties, GHOST_GPUDevice::vendor_id, and vulkan_device.
Referenced by GHOST_ContextVK::initializeDrawingContext().
|
static |
Definition at line 796 of file GHOST_ContextVK.cc.
Referenced by GHOST_ContextVK::initializeDrawingContext().
|
static |
Definition at line 818 of file GHOST_ContextVK.cc.
References checkExtensionSupport(), CLOG_ERROR, and LOG.
Referenced by GHOST_ContextVK::initializeDrawingContext().
|
static |
Definition at line 830 of file GHOST_ContextVK.cc.
References GHOST_kSuccess.
|
static |
Select the surface format that we will use.
We will select any 8bit UNORM surface.
Definition at line 862 of file GHOST_ContextVK.cc.
|
static |
Definition at line 44 of file GHOST_ContextVK.cc.
References FORMAT_ERROR, and result.
Referenced by GHOST_ContextVK::swapBuffers().
|
static |
Definition at line 42 of file GHOST_ContextVK.cc.
Referenced by GHOST_DeviceVK::ensure_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 453 of file GHOST_ContextVK.cc.
Referenced by ensure_vulkan_device(), GHOST_ContextVK::getVulkanHandles(), GHOST_ContextVK::initializeDrawingContext(), GHOST_ContextVK::swapBuffers(), and GHOST_ContextVK::~GHOST_ContextVK().