aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/hwcontext_vulkan.c
Commit message (Collapse)AuthorAgeFilesLines
...
* hwcontext_vulkan: fix inverted condition when exporting images to drm_primeLynne2020-05-101-1/+1
| | | | Calling vkGetImageSubresourceLayout is only legal for linear and drm images.
* hwcontext_vulkan: update debugging layer nameLynne2020-05-101-1/+1
|
* hwcontext_vulkan: remove unused internal REQUIRED extension flagLynne2020-05-101-16/+4
| | | | | This is a leftover from an old version which used the 1.0 Vulkan API with the maintenance extensions being required.
* hwcontext_vulkan: expose enabled device and instance extensionsLynne2020-05-101-9/+31
| | | | | | | This solves a huge oversight - it lets users reliably use their own AVVulkanDeviceContext. Otherwise, the extensions supplied and enabled are not discoverable by anything outside of hwcontext_vulkan. Also clarifies that any user-supplied VkInstance must be at least 1.1.
* hwcontext_vulkan: let users enable device and instance extensions using optionsLynne2020-05-101-7/+66
| | | | | | Also documents all options supported by the hwdevice. This lets users enable all extensions they need without writing their own instance initialization code.
* hwcontext_vulkan: optionally enable the VK_KHR_surface extension if availableLynne2020-05-101-1/+1
| | | | This allows any phys_device derived to be used as a display rendering device.
* hwcontext_vulkan: correctly download and upload flipped imagesLynne2020-04-211-2/+2
| | | | | | | | | | | | We derive the destination buffer stride from the input stride, which meant if the image was flipped with a negative stride, we'd be FFALIGNING a negative number which ends up being huge, thus making the Vulkan buffer allocation fail and the whole image transfer fail. Only found out about this as OpenGL compositors can copy an entire image with a single call if its flipped, rather than iterate over each line.
* hwcontext_vulkan: only use one semaphore per imageLynne2020-04-071-68/+70
| | | | | | The idea was to allow separate planes to be filtered independently, however, in hindsight, literaly nothing uses separate per-plane semaphores and it would only work when each plane is backed by separate device memory.
* hwcontext_vulkan: fix imported image bitmaskLynne2020-03-171-1/+2
|
* hwcontext_vulkan: support more than one plane per DMABUF layerLynne2020-03-121-18/+26
| | | | | Requires the dmabuf modifiers extension. Allows for importing of compressed images with a second plane.
* hwcontext_vulkan: duplicate DMABUF objects before importing themLynne2020-03-121-3/+6
| | | | | | | | The specifications are very vague about who has ownership, and in this case, Vulkan takes ownership of all DMABUF FDs passed to it, causing errors to occur if someone gave us images for mapping which were meant to be kept. The old behavior worked with one-way VAAPI and DMABUF imports, but was broken with clients like wlroots' dmabuf-capture.
* hwcontext_vulkan: initialize semaphores of DMABUF importsLynne2020-03-121-13/+38
| | | | | | | | | There was a recent change in Intel's driver that triggered a driver-internal error if the semaphore given to the command buffer wasn't initialized. Given that the specifications require the semaphore to be initialized, this is within spec. Unlike what's causing it in the first place, which is that there are no ways to extract/import dma sync objects from DMABUFs, so we must leave our semaphores bare.
* hwcontext_vulkan: only convert image layout for transfers if necessaryLynne2020-03-121-17/+29
|
* hwcontext_vulkan: minor corrections for DMABUF mappingLynne2020-03-121-5/+6
| | | | We need to consider the amount of layers instead of the image's planes.
* lavu: add Vulkan hwcontext codeLynne2020-02-041-0/+2825
This commit adds the necessary code to initialize and use a Vulkan device within the hwcontext libavutil framework. Currently direct mapping to VAAPI and DRM frames is functional, and transfers to CUDA and native frames are supported. Lets hope the future Vulkan video decode extension fits well within this framework.