libplacebo: switch to new target format API

`target_dummy` got deprecated in version v4.169. We unfortunately have
to hide this behind an #if for the time being.
This commit is contained in:
Niklas Haas 2022-01-11 13:42:05 +01:00 committed by Niklas Haas
parent d59eb58007
commit 5d31c7310c
1 changed files with 6 additions and 1 deletions

View File

@ -515,9 +515,14 @@ static struct ra_renderpass *renderpass_create_pl(struct ra *ra,
pl_params.vertex_shader = params->vertex_shader;
pl_params.vertex_type = PL_PRIM_TRIANGLE_LIST;
pl_params.vertex_stride = params->vertex_stride;
pl_params.target_dummy.params.format = params->target_format->priv;
pl_params.load_target = !params->invalidate_target;
#if PL_API_VER >= 169
pl_params.target_format = params->target_format->priv;
#else
pl_params.target_dummy.params.format = params->target_format->priv;
#endif
if (params->enable_blend) {
pl_params.blend_params = &blend_params;
blend_params = (struct pl_blend_params) {