mirror of
https://github.com/mpv-player/mpv
synced 2025-02-28 03:10:55 +00:00
The new status quo is simple: all messages coming from libplacebo are marked "vo/gpu{-next}/libplacebo", regardless of the backend API (vulkan vs opengl/d3d11). Messages coming from mpv's internal vulkan code will continue to come from "vo/gpu{-next}/vulkan", and messages coming from the vo module itself will be marked "vo/gpu{-next}". This is significantly better than the old status quo of vulkan messages coming from "vo/gpu{-next}/vulkan/libplacebo" whereas opengl/d3d11 messages simply came from "vo/gpu{-next}", even when those messages originated from libplacebo. (It's worth noting that the the destructor for the log is redundant because it's attached to the ctx which is freed on uninit anyway)
37 lines
790 B
C
37 lines
790 B
C
#pragma once
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <assert.h>
|
|
|
|
#include "config.h"
|
|
|
|
#include "common/common.h"
|
|
#include "common/msg.h"
|
|
|
|
// We need to define all platforms we want to support. Since we have
|
|
// our own mechanism for checking this, we re-define the right symbols
|
|
#if HAVE_WAYLAND
|
|
#define VK_USE_PLATFORM_WAYLAND_KHR
|
|
#endif
|
|
#if HAVE_X11
|
|
#define VK_USE_PLATFORM_XLIB_KHR
|
|
#endif
|
|
#if HAVE_WIN32_DESKTOP
|
|
#define VK_USE_PLATFORM_WIN32_KHR
|
|
#endif
|
|
|
|
#include <libplacebo/vulkan.h>
|
|
|
|
// Shared struct used to hold vulkan context information
|
|
struct mpvk_ctx {
|
|
pl_log pllog;
|
|
pl_vk_inst vkinst;
|
|
pl_vulkan vulkan;
|
|
pl_gpu gpu; // points to vulkan->gpu for convenience
|
|
pl_swapchain swapchain;
|
|
VkSurfaceKHR surface;
|
|
};
|