Commit graph

31 commits

Author SHA1 Message Date
Xavier Claessens
2efb4a7adb Meson: Use pkg-config generator 2020-10-23 11:14:18 -04:00
Nirbheek Chauhan
d4fa35efb9 meson: Do not warn when a windowing system is not found
Error out when the vulkan option is enabled, and just print
a message() otherwise. This is more correct and also allows us to pass
--fatal-meson-warnings more reliably.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1391>
2020-09-12 23:52:09 +05:30
Wim Taymans
258b2b15dc vulkan: fix the enumtypes install path
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1528>
2020-08-25 00:04:18 +00:00
Matthew Waters
bc95b5d99a build/vulkan: split vulkan gir
also add to docs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1506>
2020-08-15 02:55:30 +00:00
Tim-Philipp Müller
b75ad03313 vulkan: don't run tests or build lib if plugin isn't actually built
The unit tests only checked for vulkan_dep.found(), which can
be true if the libs are there but glslc was not found, in which
case the plugin wouldn't be built and the unit tests would fail
because of missing vulkan plugins.

Doesn't really make much sense to build the vulkan integration lib
either if we're not going to build the vulkan plugin, so just disable
both for now if glslc is not available.

Fixes #1301

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1307>
2020-05-28 19:07:32 +01:00
Matthew Waters
7127e88389 vulkan/window/xcb: implement keyboard support 2020-03-03 05:00:50 +00:00
Matthew Waters
1c6f3e4b84 vulkan/macos: link directly to MoltenVK
It's currently the only sane way we can use MoltenVK functions to
integrate with Metal API.

It also removes the need to specify the VK_ICD_FILENAMES environment
variable pointing to MoltenVK_icd.json.
2019-12-09 01:49:30 +00:00
Matthew Waters
81d1e16b6b vulkan: move fullscreenquad object to library
It's useful and extensible enough to be used by us and other elements
2019-12-04 07:20:27 +00:00
Matthew Waters
24d096597b 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.
2019-11-28 23:27:21 +00:00
Matthew Waters
615022ad93 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.
2019-11-28 23:27:21 +00:00
Matthew Waters
08928541c6 vulkan: add android WSI integration 2019-11-11 11:04:59 +11:00
Matthew Waters
32b3387ae6 vulkan: implement proper descriptor set handling
The major functionality gain this provides is proper reference counting
for a descriptor set.  Overall this allows us to create descriptor sets
when they are needed (or reused from a cache) without violating any of
vulkan's object synchronisation requirements.

As there are a fixed number of sets available in a pool, the number of
descriptors in elements is currently hardcoded to 32.  This can be extended
in a future change to create pools on the fly if that limit is ever overrun.
2019-11-07 20:01:57 +00:00
Matthew Waters
212b313e29 vulkan: add handle type for arbitrary vulkan handles
Serve two purposes:
1. refcounting of vulkan handles with associated destruction.  When
   combined with the trash list, the user can ensure destruction at
   the correct time according to the vulkan rules.
2. avoids polluting our API with 32-bit vs 64-bit integer/pointers
   differences as exposed through the vulkan API.  on 32-bit, vulkan
   non-dispatchable handles are 64-bit integers and on 64-bit, they
   are pointers.
2019-11-07 20:01:57 +00:00
Seungha Yang
1e38255c97 vulkan: Fix build on Windows
* Fix meson build script for Windows. Since the Vulkan dependency
object was declared by us in case of Windows, the dependency object
shouldn't be used for finding header

* Fix build error by including Windows specific header
gstvkdisplay.c(563): error C2065: 'VK_KHR_WIN32_SURFACE_EXTENSION_NAME': undeclared identifier
2019-09-25 22:14:40 +09:00
Matthew Waters
34ff895040 vulkan: remove VkImageView from the memory
There can be multiple views per image for different subresource ranges
or planes in multi-planer images.
2019-09-25 11:11:02 +00:00
Matthew Waters
a03d0a2638 vulkan: remove the winsys-specific headers from gst/vulkan/vulkan.h
Allows not having wayland, xcb, Cocoa, UIKit, windows.h included in the
public GstVulkan API.
2019-09-25 11:11:02 +00:00
Matthew Waters
82e86573b8 vulkan: implement command buffer reuse
Using a similar design for reference counting as
GstBuffer/GstBufferPool.
2019-09-19 02:01:35 +00:00
Matthew Waters
5f76c84feb vulkan: split physical device from logical device 2019-09-17 13:02:44 +10:00
Matthew Waters
96b2413616 vulkan: install public gstvkdebug.h header 2019-09-16 03:15:39 +00:00
Matthew Waters
2b7050120e vulkan: dump most of the device information
Dump anything that can be queried using the physical device like features,
limits, queue properties, memory properties.
2019-09-11 20:22:56 +10:00
Matthew Waters
542af25eb1 vulkan/build: conditionally depend on Vulkan-1.0.gir
Vulkan-1.0.gir is new in gobject-introspection >= 1.61.1
2019-08-28 10:34:39 +00:00
Matthew Waters
d916cad886 vulkan: add a couple of headers to the install list 2019-08-05 11:32:59 +10:00
Matthew Waters
69af8a9360 vulkan: move swapper object to the gstvulkan library
Allows other sinks and/or user code to display to a VkSurface
2019-07-04 14:18:15 +10:00
Matthew Waters
b5256d94fc vulkan: move trash list to library 2019-07-04 14:18:15 +10:00
Matthew Waters
bbdb2f3f17 vulkan: add some information on vulkan formats 2019-06-20 01:41:56 +10:00
Seungha Yang
7b1b3327a0 vulkan: Add support WIN32 for Windows
It's almost a fork of glwindow_win32 implementation.
To build on Windows, Vulkan SDK (at https://vulkan.lunarg.com/sdk/home)
and VK_SDK_PATH environment are required. Note that VK_SDK_PATH environment
setting is a part of the SDK installation.
2019-06-13 04:55:15 +00:00
Matthew Waters
ac09f88eb9 vulkan: implement the correct memory barriers necessary
Vulkan validation layers are finally silent!
2019-06-04 09:03:44 +00:00
Matthew Waters
673d775df0 vkupload: implement buffer to image uploader 2019-06-04 09:03:44 +00:00
Matthew Waters
70fda3ff78 vulkan: large docs update 2019-06-04 09:03:44 +00:00
Matthew Waters
32d217a9df vulkan: add a command pool object for tracking 2019-06-04 09:03:44 +00:00
Matthew Waters
25dd3b32e5 vulkan: make a gstvulkan library out of the existing API 2019-06-04 09:03:44 +00:00