From 7006d6752d7da21870dfdb2b0d7640a3734f748c Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sat, 10 Nov 2018 12:53:33 +0100 Subject: vo_gpu: vulkan: use libplacebo instead This commit rips out the entire mpv vulkan implementation in favor of exposing lightweight wrappers on top of libplacebo instead, which provides much of the same except in a more up-to-date and polished form. This (finally) unifies the code base between mpv and libplacebo, which is something I've been hoping to do for a long time. Note: The ra_pl wrappers are abstract enough from the actual libplacebo device type that we can in theory re-use them for other devices like d3d11 or even opengl in the future, so I moved them to a separate directory for the time being. However, the rest of the code is still vulkan-specific, so I've kept the "vulkan" naming and file paths, rather than introducing a new `--gpu-api` type. (Which would have been ended up with significantly more code duplicaiton) Plus, the code and functionality is similar enough that for most users this should just be a straight-up drop-in replacement. Note: This commit excludes some changes; specifically, the updates to context_win and hwdec_cuda are deferred to separate commits for authorship reasons. --- video/out/vulkan/context.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'video/out/vulkan/context.h') diff --git a/video/out/vulkan/context.h b/video/out/vulkan/context.h index a64d39f125..30c97cfb4f 100644 --- a/video/out/vulkan/context.h +++ b/video/out/vulkan/context.h @@ -7,7 +7,9 @@ void ra_vk_ctx_uninit(struct ra_ctx *ctx); bool ra_vk_ctx_init(struct ra_ctx *ctx, struct mpvk_ctx *vk, VkPresentModeKHR preferred_mode); -bool ra_vk_ctx_resize(struct ra_swapchain *sw, int w, int h); + +// Handles a resize request, and updates ctx->vo->dwidth/dheight +bool ra_vk_ctx_resize(struct ra_ctx *ctx, int width, int height); // May be called on a ra_ctx of any type. struct mpvk_ctx *ra_vk_ctx_get(struct ra_ctx *ctx); -- cgit v1.2.3