[Bug 104865] Mapping a DMABUF frame as a VkImage and then copying/blitting the image to another produces blank output

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 30 19:02:21 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=104865

            Bug ID: 104865
           Summary: Mapping a DMABUF frame as a VkImage and then
                    copying/blitting the image to another produces blank
                    output
           Product: Mesa
           Version: git
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Vulkan/intel
          Assignee: intel-3d-bugs at lists.freedesktop.org
          Reporter: atomnuker at gmail.com
        QA Contact: intel-3d-bugs at lists.freedesktop.org
                CC: jason at jlekstrand.net

Hi,

As the title says, mapping a DMABUF image via
VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT or
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR (both work the same) and then
trying to vkCmdBlitImage or vkCmdCopyImage to another image results in a blank
output image (all 0's). The aim is to detile the image.

You can replicate if you clone this repo (sorry I couldn't make a small
standalone program):
https://github.com/atomnuker/FFmpeg/tree/exp_vulkan
Configure with ./configure --enable-libdrm --enable-vulkan
Run with: sudo ./ffmpeg_g -init_hw_device
"vulkan=sl:0,extensions=VK_EXT_debug_report" -device /dev/dri/card0 -crtc_id 0
-framerate 60 -format bgr0 -f kmsgrab -i /dev/zero -filter_hw_device sl -vf
hwmap,chromaticaberration_vulkan,hwdownload,format=bgr0 -y -loglevel trace -c:v
rawvideo out.nut
Playing back the .nut file via mpv should display a recording of the screen but
instead its blank.

The odd thing is that if the VkImage is created with linear tiling (and
misinforming the driver by doing so) then the output will not be a blank image
but a tiled recording of the screen.

Here's the code which does the mapping:
https://github.com/atomnuker/FFmpeg/blob/exp_vulkan/libavutil/hwcontext_vulkan.c#L1186
Here's the command buffer:
https://github.com/atomnuker/FFmpeg/blob/exp_vulkan/libavfilter/vf_caberration_vulkan.c#L196

The repo requires the newest version of the validation layer and libvulkan.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20180130/6c33eab6/attachment-0001.html>


More information about the intel-3d-bugs mailing list