Skip to content

Commit bedbd34

Browse files
author
Philip Langdale
committed
vo_gpu: hwdec_vaapi: Synchronise after exporting VA surface
This is documented as required (although we did not do it in the old GL codepath, with no visible problems) and I have seen transient artifacts after seeking which _appear_ to have gone away after introducing this.
1 parent 69c93b6 commit bedbd34

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

video/out/hwdec/hwdec_vaapi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ static void mapper_unmap(struct ra_hwdec_mapper *mapper)
244244
#endif
245245
#if HAVE_VULKAN
246246
const struct pl_gpu *gpu = ra_pl_get(mapper->ra);
247+
//pl_gpu_finish(gpu);
247248
#endif
248249

249250
for (int n = 0; n < 4; n++) {
@@ -423,6 +424,9 @@ static int mapper_map(struct ra_hwdec_mapper *mapper)
423424
p->esh_not_implemented = true;
424425
goto esh_failed;
425426
}
427+
vaSyncSurface(display, va_surface_id(mapper->src));
428+
// No need to error out if sync fails, but good to know if it did.
429+
CHECK_VA_STATUS(mapper, "vaSyncSurface()");
426430
p->surface_acquired = true;
427431

428432
#if HAVE_GL

0 commit comments

Comments
 (0)