#11648 closed defect (fixed)

mpv cannot use vulkan decoder since ReBAR check

Reported by: Luis Owned by:
Priority: normal Component: avutil
Version: git-master Keywords:
Cc: Luis Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Since the commit 27590d86534b0c94f12b9a206410f475fb008e72, mpv fails to use vulkan decoding. Vulkan decoding using ffmpeg directly works but, for some reason, with mpv it prints "[ffmpeg] Vulkan: No memory type found for flags 0x1" and fails.

There have been some updates since then, like 60fc0288ae39c3294091c2a4e06816836be95740 which is pretty close to the solution @haasn gave to me, but they are not enough apparently. The only patch fixing the issue is this one:

--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2019,6 +2019,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
     if (!hwctx->unlock_queue)
         hwctx->unlock_queue = unlock_queue;
 
+    vk->GetPhysicalDeviceMemoryProperties(hwctx->phys_dev, &p->mprops);
+    
     p->vkctx.device = ctx;
     p->vkctx.hwctx = hwctx;
 

I don't know why that works. As I said @haasn was kind enough to propose that solution and it is the only fix I found so far.

You can find the full log attached.

Attachments (1)

log.txt (26.2 KB ) - added by Luis 10 months ago.
Full mpv log for debugging

Download all attachments as: .zip

Change History (3)

by Luis, 10 months ago

Attachment: log.txt added

Full mpv log for debugging

comment:1 by Luis, 10 months ago

This has also been reported as a mpv issue, even though it is a ffmpeg issue.

comment:2 by Luis, 10 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.