Skip to content

vulkan: implement caching of frequently used resources (fences, trashes, descriptor sets)

Matthew Waters requested to merge ystreet/gst-plugins-bad:vulkan into master

commit 6085cecd

vulkan: implement caching and reuse of a couple of vulkan resources

Includes a new GstVulkanHandlePool base class for pooling different
resources togther.  The descriptor cache object is ported to
GstVulkanHandlePool with the exact same functionality.

A new GstVulkanFenceCache is also implemented for caching fences
which is used internally by GstVulkanDevice for creating or reusing
fences.

The existing GstVulkanTrashFenceList object now caches trash objects.

commit 37866c55

vulkan/trash: remove free functions covered by GstVulkanHandle

commit b29d3b16

vulkancolorconvert: disable YUY2 conversion

It doesn't work and never seemed to

commit 16942ad2

vulkan: split vkfullscreenrender into two

Part 1 is a base class (vkvideofilter) that handles instance, device,
queue retrieval and holding that has been moved to the library
Part 2 is a fullscreenrenderquad that is still in the plugin that
performs all of the previous vulkan-specific functionality.

commit 2d82e45c

vulkan/upload: allocate from the correct pool

Only relevant when upstream does not use our provided pool.

commit 319426dd

vulkan/handle: add some handle types

commit b764921a

vulkan/image: don't rely on weak-ref notifies for views

Weak refs don't quite work here correctly as there is always a race with
taking the lock between find_view() and remove_view().  If find_view()
returns a view that is going to removed by remove_view() then we have an
interesting situation.

In theory, the number and type of views for an image are relatively
constant and should not change one they've been set up which means that
it is actually practical to perform pool-like reference counting here
where the image holds a pool of different views that it can give out
as necessary.

commit 393bf81e

vulkan: add a couple of missing fence unrefs

commit b08b0255

vulkan/colorconvert: zero out sampler create struct

Merge request reports