107#elif defined(__APPLE__)
120 int contextMajorVersion,
121 int contextMinorVersion,
172 std::function<
void(
const GHOST_VulkanSwapChainData *)> swap_buffer_draw_callback,
173 std::function<
void(
void)> swap_buffer_acquired_callback,
174 std::function<
void(GHOST_VulkanOpenXRData *)> openxr_acquire_framebuffer_image_callback,
175 std::function<
void(GHOST_VulkanOpenXRData *)> openxr_release_framebuffer_image_callback)
211#elif defined(__APPLE__)
212 CAMetalLayer *metal_layer_;
224 const int context_major_version_;
225 const int context_minor_version_;
232 VkSurfaceKHR surface_;
233 VkSwapchainKHR swapchain_;
234 std::vector<GHOST_SwapchainImage> swapchain_images_;
235 std::vector<GHOST_Frame> frame_data_;
239 VkExtent2D render_extent_;
240 VkExtent2D render_extent_min_;
241 VkSurfaceFormatKHR surface_format_;
242 bool use_hdr_swapchain_;
244 std::optional<uint32_t> acquired_swapchain_image_index_;
246 std::function<void(
const GHOST_VulkanSwapChainData *)> swap_buffer_draw_callback_;
247 std::function<void(
void)> swap_buffer_acquired_callback_;
248 std::function<void(GHOST_VulkanOpenXRData *)> openxr_acquire_framebuffer_image_callback_;
249 std::function<void(GHOST_VulkanOpenXRData *)> openxr_release_framebuffer_image_callback_;
251 std::vector<VkFence> fence_pile_;
252 std::map<VkSwapchainKHR, std::vector<VkFence>> present_fences_;
254 const char *getPlatformSpecificSurfaceExtension()
const;
260 void setPresentFence(VkSwapchainKHR swapchain, VkFence fence);
261 void destroySwapchainPresentFences(VkSwapchainKHR swapchain);
GHOST_TVulkanPlatformType
@ GHOST_kVulkanPlatformHeadless
GHOST_TSuccess swapBufferRelease() override
GHOST_TSuccess activateDrawingContext() override
GHOST_TSuccess getVulkanSwapChainFormat(GHOST_VulkanSwapChainData *r_swap_chain_data) override
GHOST_TSuccess getSwapInterval(int &) override
GHOST_TSuccess setSwapInterval(int) override
GHOST_ContextVK(const GHOST_ContextParams &context_params, GHOST_TVulkanPlatformType platform, Window window, Display *display, wl_surface *wayland_surface, wl_display *wayland_display, const GHOST_ContextVK_WindowInfo *wayland_window_info, int contextMajorVersion, int contextMinorVersion, const GHOST_GPUDevice &preferred_device, const GHOST_WindowHDRInfo *hdr_info_=nullptr)
GHOST_TSuccess initializeDrawingContext() override
friend class GHOST_XrGraphicsBindingVulkanD3D
friend class GHOST_XrGraphicsBindingVulkan
GHOST_TSuccess setVulkanSwapBuffersCallbacks(std::function< void(const GHOST_VulkanSwapChainData *)> swap_buffer_draw_callback, std::function< void(void)> swap_buffer_acquired_callback, std::function< void(GHOST_VulkanOpenXRData *)> openxr_acquire_framebuffer_image_callback, std::function< void(GHOST_VulkanOpenXRData *)> openxr_release_framebuffer_image_callback) override
GHOST_TSuccess getVulkanHandles(GHOST_VulkanHandles &r_handles) override
GHOST_TSuccess releaseDrawingContext() override
GHOST_TSuccess swapBufferAcquire() override
GHOST_TSuccess releaseNativeHandles() override
bool isUpsideDown() const override
~GHOST_ContextVK() override
GHOST_Context(const GHOST_ContextParams &context_params)