summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2022-02-26 15:13:10 +0100
committerNiklas Haas <github-daiK1o@haasn.dev>2022-03-03 13:06:05 +0100
commite2c02a4ce3af792251839307c42c85aa34bdd125 (patch)
tree031999115b57e51d1a4d81b27ac38c37a7c18160 /video/out
parent4387f3bcd0744a81011f65f207e76d919f0cda90 (diff)
downloadmpv-e2c02a4ce3af792251839307c42c85aa34bdd125.tar.bz2
mpv-e2c02a4ce3af792251839307c42c85aa34bdd125.tar.xz
hwdec_vaapi_vk: rename to vaapi_pl
There's really nothing vulkan-specific about this hwdec wrapper, and it actually works perfectly fine with an OpenGL-based ra_pl. This is not hugely important at the time, but I still think it makes sense in case we ever decide to make vo_gpu_next wrap OpenGL contexts to ra_pl instead of exposing the underlying ra_gl.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/hwdec/hwdec_vaapi.c4
-rw-r--r--video/out/hwdec/hwdec_vaapi.h3
-rw-r--r--video/out/hwdec/hwdec_vaapi_pl.c (renamed from video/out/hwdec/hwdec_vaapi_vk.c)18
3 files changed, 12 insertions, 13 deletions
diff --git a/video/out/hwdec/hwdec_vaapi.c b/video/out/hwdec/hwdec_vaapi.c
index 7f3fb5ed25..01b5be476c 100644
--- a/video/out/hwdec/hwdec_vaapi.c
+++ b/video/out/hwdec/hwdec_vaapi.c
@@ -111,8 +111,8 @@ const static vaapi_interop_init interop_inits[] = {
#if HAVE_VAAPI_EGL
vaapi_gl_init,
#endif
-#if HAVE_VAAPI_VULKAN
- vaapi_vk_init,
+#if HAVE_VAAPI_LIBPLACEBO
+ vaapi_pl_init,
#endif
NULL
};
diff --git a/video/out/hwdec/hwdec_vaapi.h b/video/out/hwdec/hwdec_vaapi.h
index 44379e8bf6..76f1c37c13 100644
--- a/video/out/hwdec/hwdec_vaapi.h
+++ b/video/out/hwdec/hwdec_vaapi.h
@@ -52,5 +52,4 @@ struct priv {
typedef bool (*vaapi_interop_init)(const struct ra_hwdec *hw);
bool vaapi_gl_init(const struct ra_hwdec *hw);
-
-bool vaapi_vk_init(const struct ra_hwdec *hw);
+bool vaapi_pl_init(const struct ra_hwdec *hw);
diff --git a/video/out/hwdec/hwdec_vaapi_vk.c b/video/out/hwdec/hwdec_vaapi_pl.c
index 38ac76a3a7..790150e223 100644
--- a/video/out/hwdec/hwdec_vaapi_vk.c
+++ b/video/out/hwdec/hwdec_vaapi_pl.c
@@ -23,7 +23,7 @@
#include "video/out/placebo/ra_pl.h"
#include "video/out/placebo/utils.h"
-static bool vaapi_vk_map(struct ra_hwdec_mapper *mapper, bool probing)
+static bool vaapi_pl_map(struct ra_hwdec_mapper *mapper, bool probing)
{
struct priv *p = mapper->priv;
pl_gpu gpu = ra_pl_get(mapper->ra);
@@ -102,31 +102,31 @@ static bool vaapi_vk_map(struct ra_hwdec_mapper *mapper, bool probing)
return true;
}
-static void vaapi_vk_unmap(struct ra_hwdec_mapper *mapper)
+static void vaapi_pl_unmap(struct ra_hwdec_mapper *mapper)
{
for (int n = 0; n < 4; n++)
ra_tex_free(mapper->ra, &mapper->tex[n]);
}
-bool vaapi_vk_init(const struct ra_hwdec *hw)
+bool vaapi_pl_init(const struct ra_hwdec *hw)
{
struct priv_owner *p = hw->priv;
pl_gpu gpu = ra_pl_get(hw->ra);
if (!gpu) {
- // This is not a Vulkan RA;
+ // This is not a libplacebo RA;
return false;
}
if (!(gpu->import_caps.tex & PL_HANDLE_DMA_BUF)) {
- MP_VERBOSE(hw, "VAAPI Vulkan interop requires support for "
- "dma_buf import in Vulkan.\n");
+ MP_VERBOSE(hw, "VAAPI libplacebo interop requires support for "
+ "PL_HANDLE_DMA_BUF import.\n");
return false;
}
- MP_VERBOSE(hw, "using VAAPI Vulkan interop\n");
+ MP_VERBOSE(hw, "using VAAPI libplacebo interop\n");
- p->interop_map = vaapi_vk_map;
- p->interop_unmap = vaapi_vk_unmap;
+ p->interop_map = vaapi_pl_map;
+ p->interop_unmap = vaapi_pl_unmap;
return true;
}