|
Blender V4.3
|
#include "GHOST_ContextVK.hh"#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 | SELECT_COMPATIBLE_SURFACES_ONLY false |
| #define | FORMAT_ERROR(X) |
| #define | __STR(A) "" #A |
| #define | VK_CHECK(__expression) |
| #define | DEBUG_PRINTF(...) |
Functions | |
| static const char * | vulkan_error_as_string (VkResult result) |
| 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 | surfaceFormatSupported (const VkSurfaceFormatKHR &surface_format) |
| static bool | selectSurfaceFormat (const VkPhysicalDevice physical_device, const VkSurfaceKHR surface, VkSurfaceFormatKHR &r_surfaceFormat) |
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) |
Definition at line 100 of file GHOST_ContextVK.cc.
| #define DEBUG_PRINTF | ( | ... | ) |
Definition at line 115 of file GHOST_ContextVK.cc.
Referenced by vulkan_error_as_string().
Definition at line 44 of file GHOST_ContextVK.cc.
| #define VK_CHECK | ( | __expression | ) |
Definition at line 101 of file GHOST_ContextVK.cc.
Referenced by GHOST_ContextVK::initializeDrawingContext(), and GHOST_ContextVK::swapBuffers().
|
static |
Definition at line 670 of file GHOST_ContextVK.cc.
Referenced by requireExtension().
|
static |
Definition at line 335 of file GHOST_ContextVK.cc.
References GHOST_GPUDevice::device_id, GHOST_DeviceVK::features, GHOST_kFailure, GHOST_kSuccess, GHOST_DeviceVK::has_extensions(), GHOST_GPUDevice::index, GHOST_DeviceVK::physical_device, GHOST_DeviceVK::properties, GHOST_GPUDevice::vendor_id, and vulkan_device.
Referenced by GHOST_ContextVK::initializeDrawingContext().
|
static |
Definition at line 659 of file GHOST_ContextVK.cc.
Referenced by GHOST_ContextVK::initializeDrawingContext().
|
static |
Definition at line 681 of file GHOST_ContextVK.cc.
References checkExtensionSupport().
Referenced by GHOST_ContextVK::initializeDrawingContext().
|
static |
Definition at line 693 of file GHOST_ContextVK.cc.
References GHOST_kFailure, and GHOST_kSuccess.
|
static |
Select the surface format that we will use.
We will select any 8bit UNORM surface.
Definition at line 769 of file GHOST_ContextVK.cc.
References surfaceFormatSupported().
|
static |
Definition at line 749 of file GHOST_ContextVK.cc.
Referenced by selectSurfaceFormat().
|
static |
Definition at line 50 of file GHOST_ContextVK.cc.
References FORMAT_ERROR.
Referenced by GHOST_ContextVK::swapBuffers().
|
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 333 of file GHOST_ContextVK.cc.
Referenced by ensure_vulkan_device(), GHOST_ContextVK::getVulkanHandles(), GHOST_ContextVK::initializeDrawingContext(), GHOST_ContextVK::swapBuffers(), and GHOST_ContextVK::~GHOST_ContextVK().