summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2021-10-04 06:13:34 +0200
committerNiklas Haas <github-daiK1o@haasn.dev>2021-10-04 12:09:58 +0200
commit48e8cb6a8994eff198543bd576935054d4ac827c (patch)
treeda0465b204bc5b0a7c1bd419c229b3ad2395a1a9
parentef2cd3a663c3d7204b09dfc4bdb088d5776fa4c2 (diff)
downloadmpv-48e8cb6a8994eff198543bd576935054d4ac827c.tar.bz2
mpv-48e8cb6a8994eff198543bd576935054d4ac827c.tar.xz
vo_gpu: libplacebo: drop code deprecated in libplacebo v3
This is only needed for back-compat with libplacebo v2, and will break due to upstream removal starting with libplacebo v4.
-rw-r--r--video/out/hwdec/hwdec_cuda_vk.c2
-rw-r--r--video/out/hwdec/hwdec_vaapi_vk.c2
-rw-r--r--video/out/placebo/ra_pl.c11
3 files changed, 2 insertions, 13 deletions
diff --git a/video/out/hwdec/hwdec_cuda_vk.c b/video/out/hwdec/hwdec_cuda_vk.c
index b8eb153ae1..0378dd2b7c 100644
--- a/video/out/hwdec/hwdec_cuda_vk.c
+++ b/video/out/hwdec/hwdec_cuda_vk.c
@@ -63,8 +63,6 @@ static bool cuda_ext_vk_init(struct ra_hwdec_mapper *mapper,
.d = 0,
.format = ra_pl_fmt_get(format),
.sampleable = true,
- .sample_mode = format->linear_filter ? PL_TEX_SAMPLE_LINEAR
- : PL_TEX_SAMPLE_NEAREST,
.export_handle = p_owner->handle_type,
};
diff --git a/video/out/hwdec/hwdec_vaapi_vk.c b/video/out/hwdec/hwdec_vaapi_vk.c
index 24cdce760e..328560b0ab 100644
--- a/video/out/hwdec/hwdec_vaapi_vk.c
+++ b/video/out/hwdec/hwdec_vaapi_vk.c
@@ -75,8 +75,6 @@ static bool vaapi_vk_map(struct ra_hwdec_mapper *mapper, bool probing)
.d = 0,
.format = format->priv,
.sampleable = true,
- .sample_mode = format->linear_filter ? PL_TEX_SAMPLE_LINEAR
- : PL_TEX_SAMPLE_NEAREST,
.import_handle = PL_HANDLE_DMA_BUF,
.shared_mem = (struct pl_shared_mem) {
.handle = {
diff --git a/video/out/placebo/ra_pl.c b/video/out/placebo/ra_pl.c
index 09ff742d38..168450a269 100644
--- a/video/out/placebo/ra_pl.c
+++ b/video/out/placebo/ra_pl.c
@@ -235,7 +235,6 @@ static bool tex_upload_pl(struct ra *ra, const struct ra_tex_upload_params *para
if (stride != params->stride) {
// Fall back to uploading via a staging buffer prepared in CPU
staging = pl_buf_create(gpu, &(struct pl_buf_params) {
- .type = PL_BUF_TEX_TRANSFER,
.size = lines * stride,
.memory_type = PL_BUF_MEM_HOST,
.host_mapped = true,
@@ -293,16 +292,10 @@ static bool tex_download_pl(struct ra *ra, struct ra_tex_download_params *params
static struct ra_buf *buf_create_pl(struct ra *ra,
const struct ra_buf_params *params)
{
- static const enum pl_buf_type buf_type[] = {
- [RA_BUF_TYPE_TEX_UPLOAD] = PL_BUF_TEX_TRANSFER,
- [RA_BUF_TYPE_SHADER_STORAGE] = PL_BUF_STORAGE,
- [RA_BUF_TYPE_UNIFORM] = PL_BUF_UNIFORM,
- [RA_BUF_TYPE_SHARED_MEMORY] = 0,
- };
-
const struct pl_buf *plbuf = pl_buf_create(get_gpu(ra), &(struct pl_buf_params) {
- .type = buf_type[params->type],
.size = params->size,
+ .uniform = params->type == RA_BUF_TYPE_UNIFORM,
+ .storable = params->type == RA_BUF_TYPE_SHADER_STORAGE,
.host_mapped = params->host_mapped,
.host_writable = params->host_mutable,
.initial_data = params->initial_data,