Update to libplacebo-3.104.0, patch mpv to cope. from Brad.
This commit is contained in:
parent
a2dbd76405
commit
cdc14c5077
@ -1,13 +1,13 @@
|
||||
# $OpenBSD: Makefile,v 1.5 2020/12/04 12:40:06 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.6 2021/02/06 21:45:41 sthen Exp $
|
||||
|
||||
COMMENT= reusable library for GPU-accelerated video/image rendering
|
||||
|
||||
GH_ACCOUNT= haasn
|
||||
GH_PROJECT= libplacebo
|
||||
GH_TAGNAME= v2.72.2
|
||||
GH_TAGNAME= v3.104.0
|
||||
CATEGORIES= graphics
|
||||
|
||||
SHARED_LIBS= placebo 2.1
|
||||
SHARED_LIBS= placebo 3.0
|
||||
|
||||
MAINTAINER= Brad Smith <brad@comstyle.com>
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (libplacebo-2.72.2.tar.gz) = ZPbhfpQwKDMt7KF/eYIsZhdpiM94aMDIvdgtLoo2bf8=
|
||||
SIZE (libplacebo-2.72.2.tar.gz) = 398317
|
||||
SHA256 (libplacebo-3.104.0.tar.gz) = i6JykWespJpUo/bSAyoNhEEpSevTbONemFVRBZ/c+Dw=
|
||||
SIZE (libplacebo-3.104.0.tar.gz) = 436348
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.3 2020/10/04 18:34:17 sthen Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.4 2021/02/06 21:45:42 sthen Exp $
|
||||
include/libplacebo/
|
||||
include/libplacebo/colorspace.h
|
||||
include/libplacebo/common.h
|
||||
@ -19,6 +19,8 @@ include/libplacebo/shaders/custom.h
|
||||
include/libplacebo/shaders/sampling.h
|
||||
include/libplacebo/swapchain.h
|
||||
include/libplacebo/utils/
|
||||
include/libplacebo/utils/libav.h
|
||||
include/libplacebo/utils/libav_internal.h
|
||||
include/libplacebo/utils/upload.h
|
||||
@static-lib lib/libplacebo.a
|
||||
@lib lib/libplacebo.so.${LIBplacebo_VERSION}
|
||||
|
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.68 2020/12/23 18:30:47 rsadowski Exp $
|
||||
# $OpenBSD: Makefile,v 1.69 2021/02/06 21:45:41 sthen Exp $
|
||||
|
||||
COMMENT = movie player based on MPlayer/mplayer2
|
||||
|
||||
GH_ACCOUNT = mpv-player
|
||||
GH_PROJECT = mpv
|
||||
GH_TAGNAME = v0.33.0
|
||||
REVISION = 1
|
||||
REVISION = 2
|
||||
|
||||
SHARED_LIBS += mpv 0.2 # 1.107
|
||||
|
||||
|
74
multimedia/mpv/patches/patch-video_out_placebo_ra_pl_c
Normal file
74
multimedia/mpv/patches/patch-video_out_placebo_ra_pl_c
Normal file
@ -0,0 +1,74 @@
|
||||
$OpenBSD: patch-video_out_placebo_ra_pl_c,v 1.1 2021/02/06 21:45:41 sthen Exp $
|
||||
|
||||
vo_gpu: placebo: update for upstream API changes.
|
||||
|
||||
Index: video/out/placebo/ra_pl.c
|
||||
--- video/out/placebo/ra_pl.c.orig
|
||||
+++ video/out/placebo/ra_pl.c
|
||||
@@ -144,8 +144,14 @@ bool mppl_wrap_tex(struct ra *ra, const struct pl_tex
|
||||
.blit_dst = pltex->params.blit_dst,
|
||||
.host_mutable = pltex->params.host_writable,
|
||||
.downloadable = pltex->params.host_readable,
|
||||
+#if PL_API_VER >= 103
|
||||
+ // These don't exist upstream, so just pick something reasonable
|
||||
+ .src_linear = pltex->params.format->caps & PL_FMT_CAP_LINEAR,
|
||||
+ .src_repeat = false,
|
||||
+#else
|
||||
.src_linear = pltex->params.sample_mode == PL_TEX_SAMPLE_LINEAR,
|
||||
.src_repeat = pltex->params.address_mode == PL_TEX_ADDRESS_REPEAT,
|
||||
+#endif
|
||||
},
|
||||
.priv = (void *) pltex,
|
||||
};
|
||||
@@ -195,10 +201,12 @@ static struct ra_tex *tex_create_pl(struct ra *ra,
|
||||
.blit_dst = params->blit_dst || params->render_dst,
|
||||
.host_writable = params->host_mutable,
|
||||
.host_readable = params->downloadable,
|
||||
+#if PL_API_VER < 103
|
||||
.sample_mode = params->src_linear ? PL_TEX_SAMPLE_LINEAR
|
||||
: PL_TEX_SAMPLE_NEAREST,
|
||||
.address_mode = params->src_repeat ? PL_TEX_ADDRESS_REPEAT
|
||||
: PL_TEX_ADDRESS_CLAMP,
|
||||
+#endif
|
||||
.initial_data = params->initial_data,
|
||||
});
|
||||
|
||||
@@ -399,7 +407,18 @@ static void blit_pl(struct ra *ra, struct ra_tex *dst,
|
||||
pldst.y1 = MPMIN(MPMAX(dst_rc->y1, 0), dst->params.h);
|
||||
}
|
||||
|
||||
+#if PL_API_VER >= 103
|
||||
+ pl_tex_blit(get_gpu(ra), &(struct pl_tex_blit_params) {
|
||||
+ .src = src->priv,
|
||||
+ .dst = dst->priv,
|
||||
+ .src_rc = plsrc,
|
||||
+ .dst_rc = pldst,
|
||||
+ .sample_mode = src->params.src_linear ? PL_TEX_SAMPLE_LINEAR
|
||||
+ : PL_TEX_SAMPLE_NEAREST,
|
||||
+ });
|
||||
+#else
|
||||
pl_tex_blit(get_gpu(ra), dst->priv, src->priv, pldst, plsrc);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static const enum pl_var_type var_type[RA_VARTYPE_COUNT] = {
|
||||
@@ -627,9 +646,17 @@ static void renderpass_run_pl(struct ra *ra,
|
||||
struct pl_desc_binding bind;
|
||||
switch (inp->type) {
|
||||
case RA_VARTYPE_TEX:
|
||||
- case RA_VARTYPE_IMG_W:
|
||||
- bind.object = (* (struct ra_tex **) val->data)->priv;
|
||||
+ case RA_VARTYPE_IMG_W: {
|
||||
+ struct ra_tex *tex = *((struct ra_tex **) val->data);
|
||||
+ bind.object = tex->priv;
|
||||
+#if PL_API_VER >= 103
|
||||
+ bind.sample_mode = tex->params.src_linear ? PL_TEX_SAMPLE_LINEAR
|
||||
+ : PL_TEX_SAMPLE_NEAREST;
|
||||
+ bind.address_mode = tex->params.src_repeat ? PL_TEX_ADDRESS_REPEAT
|
||||
+ : PL_TEX_ADDRESS_CLAMP;
|
||||
+#endif
|
||||
break;
|
||||
+ }
|
||||
case RA_VARTYPE_BUF_RO:
|
||||
case RA_VARTYPE_BUF_RW:
|
||||
bind.object = (* (struct ra_buf **) val->data)->priv;
|
Loading…
Reference in New Issue
Block a user