columbarius
5e988e91ea
Merge branch 'videoconvert-vulkan' into 'master'
...
Draft: videoconvert: Add vulkan converter, take 2
See merge request pipewire/pipewire!1830
2026-03-22 19:52:46 +00:00
Siva Mahadevan
0393fd8a72
spa/plugins: include <stdlib.h> for alloca() on non-linux
2026-03-12 09:21:40 +00:00
Barnabás Pőcze
ca47d0ef15
spa: vulkan: map VK_INCOMPLETE to ENOSPC
...
`VK_INCOMPLETE` means "A return array was too small for the result",
so map it to `ENOSPC` since that describes it better than `EBUSY`.
2025-07-12 19:54:14 +00:00
Wim Taymans
c45d667934
loop: spa_loop_invoke -> spa_loop_locked where possible
...
When we simply need to change some state for the code executed in the
loop, we can use locked() instead of invoke(). This is more efficient
and avoids some context switches in the normal case.
2025-05-30 11:59:35 +02:00
Barnabás Pőcze
01d1e29402
spa: vulkan: simplify kernel version parsing
...
Use a single `sscanf()` instead of multiple `strtok()`, `atoi()` calls.
After this change all three components are required to be present.
2025-05-14 18:37:54 +02:00
Barnabás Pőcze
11e0492f79
spa: vulkan: simplify memcpy() call
2024-12-14 23:28:43 +01:00
Barnabás Pőcze
04450e14a4
treewide: fix more -Wformat issues
...
See !2057
2024-06-30 19:22:17 +00:00
Wim Taymans
69251948ee
vulkan: fix compilation
2024-06-18 15:16:06 +02:00
Diego Viola
7410755c03
Fix typos
...
found them with codespell.
Signed-off-by: Diego Viola <diego.viola@gmail.com>
2024-05-22 09:19:34 +02:00
columbarius
c223e02d9b
vulkan: Complete vulkan_pass
...
vulkan_pass now contains everything required for a single blit pass.
2024-04-09 09:05:03 +00:00
columbarius
11ff1471e9
vulkan: Cache buffer_type
...
All buffers should have the same type.
2024-04-09 09:05:03 +00:00
columbarius
f935a191ad
vulkan: Move vulkan_pass handling to filter
...
The current buffers are directly tracked by vulkan_pass.
2024-04-09 09:05:03 +00:00
columbarius
75daa140f3
vulkan: Split buffer import into CPU and GPU part
2024-04-09 09:05:03 +00:00
columbarius
3f47825082
vulkan: Introduce vulkan_pass for blit operations
2024-04-09 09:05:03 +00:00
columbarius
522546e8d3
vulkan: Sync buffers on in and export in blit
2024-04-09 09:05:03 +00:00
columbarius
f10e8d2717
vulkan: Export functions to handle implicit_fd
2024-04-09 09:05:03 +00:00
columbarius
7206980023
vulkan: Sync renderer for blit filters
...
A spa_node has callback both on the main and data thread, which can
modify the internal state of vulkan_blit_state. Especially critical are
functions, which might drop buffers currently in use. To mitigate this
a read-write lock is used. The data thread shall try to aquire a read
lock before accessing the buffers, while the main thread has to aquire
exclusive access via a write lock before modifying the buffers.
2024-04-08 20:24:30 +00:00
columbarius
2010fa1349
vulkan: Name params
2024-04-08 20:24:30 +00:00
Pauli Virtanen
e784de3933
spa: use log topics everywhere
...
Use log topics properly everywhere, convert from "#define NAME".
2024-03-11 18:45:21 +02:00
columbarius
9f45238a8c
vulkan: Add videoconvert plugin
2024-02-29 02:54:57 +01:00
Gleb Popov
d2750420c6
Fix build of vulkan/dmabuf_fallback.c
2024-02-10 20:52:25 +03:00
columbarius
bcf3cdc159
vulkan: Update logging in compute plugins
...
Use SPA_LOG_TOPIC_DEFAULT to name the log messages
2024-02-04 09:27:56 +00:00
columbarius
a1615fe6a3
vulkan: Add vulkan-blit-dsp-filter
2024-02-04 09:27:56 +00:00
columbarius
3e3a13c567
vulkan: Add vulkan-blit-filter
2024-02-04 09:27:56 +00:00
columbarius
c845338d81
vulkan: Add blit utils
2024-02-04 09:27:56 +00:00
columbarius
2b2e53ad90
vulkan: Return early in use_buffers
...
This fixes accesing a buffer in [1] when none is provided.
[1] 3f80bc2e70
2024-02-04 09:27:56 +00:00
columbarius
3f80bc2e70
vulkan: Support MemPtr as import for compute
2024-01-29 08:44:25 +00:00
columbarius
7ffd8ff4de
vulkan: Add function to upload data to a staging buffer
2024-01-29 08:44:25 +00:00
columbarius
36aa413cd7
vulkan: Add functions to create staging buffers
2024-01-29 08:44:25 +00:00
columbarius
c3327742cc
vulkan: Add pixel-formats to query format properties
...
We need a database of pixel format properties to remove hardcoded magic
numbers. This commit creates a simple function to query the bytes per
pixel for common RGBA formats.
This should be promoted to or superseeded by a common spa namespaced
version.
2024-01-22 14:00:41 +00:00
columbarius
49b67742c6
vulkan: move format enumeration into utils functions
...
This splots the format enumeration into a helper for dsp and raw pod
creation and a common function for the compute filters.
Counting formats with modifiers will be usefull to announce dsp and
raw formats from the same node.
No functional changes.
2024-01-22 14:00:41 +00:00
columbarius
02779fe28b
vulkan: create validation function for dmabuf properties
...
Validation of properties is moved from the import and allocation
functions into a separate function. This allows later separation of
modifier informations from the base struct.
2024-01-22 14:00:41 +00:00
columbarius
08216be3b1
vulkan: use extension VK_EXT_QUEUE_FAMILY_FOREIGN
...
This extension is required for the aquire and release barriers
to transfer the buffer ownership from and two an external queue.
This removes a warning from the validation layers.
2024-01-22 14:00:41 +00:00
columbarius
1cad9ebb0d
vulkan: Move vulkan_stream into vulkan-compute-utils
...
vulkan_stream will store compute specific properties.
No functional changes.
2024-01-22 14:00:41 +00:00
columbarius
e5f89e09d1
vulkan: Move vulkan_fence_create to vulkan-utils
...
This function is independent from compute.
No functional changes.
2024-01-22 14:00:41 +00:00
columbarius
51b7d49cff
vulkan: namespace functions in compute-utils to spa_vulkan_compute
...
Rename compute functions to allow for shared common functions for
non oppinionated vulkan helpers.
No functional changes.
2024-01-22 14:00:41 +00:00
columbarius
8bbc1c1abf
vulkan: fix uninitialized writeDescriptor
2023-08-31 10:08:06 +00:00
columbarius
00c475e646
vulkan: download buffer to MemPtr
2023-08-31 10:08:06 +00:00
columbarius
73d6c20225
vulkan: spa_vulkan_use_buffers support datatype MemPtr
2023-08-31 10:08:06 +00:00
columbarius
eea8096b12
vulkan: Track spa_buffers for stream
2023-08-31 10:08:06 +00:00
columbarius
2456d58397
vulkan: Only allocate buffers when DMABUFS are used
2023-08-31 10:08:06 +00:00
columbarius
b8c91f7e54
vulkan: Synchronize in and out buffers
2023-08-31 10:08:06 +00:00
columbarius
412b0c7b49
vulkan: Add dmabuf sync helpers from wlroots
...
These helpers are obtained from the wlroots project at
https://gitlab.freedesktop.org/wlroots/wlroots/
2023-08-31 10:08:06 +00:00
columbarius
2c65eb6c2c
vulkan: vulkan_compute fixate modifier
...
If the modifier for a format is not fixated yet, we will use vulkan to
fixate a modifier, update the parsed format, change the EnumFormats mask
and exit early. This triggers a new enum_params with EnumFormats and a
new set_param for Format.
2023-08-31 10:08:06 +00:00
columbarius
a673c56eea
vulkan: announce SPA_PARAM_BUFFERS wrt. modifiers
2023-08-31 10:08:06 +00:00
columbarius
3274880e8e
vulkan: use capability flags to enumerate formats
2023-08-31 10:08:06 +00:00
columbarius
d549d9e595
vulkan: vulkan_compute enumerate format with modifiers
2023-08-31 10:08:06 +00:00
columbarius
06a1d5151b
vulkan: vulkan_compute initialize base on plugin creation
2023-08-31 10:08:06 +00:00
columbarius
402ed65a79
vulkan: Add {spa_,}vulkan_fixate_modifier
2023-08-31 10:08:06 +00:00
columbarius
35b080ec61
vulkan: split spa_vulkan_use_buffers into separate allocation and import functions
...
This commit add helpers to create and to import a DmaBuf via the
external_dmabuf_info struct.
The import path is based on the image creation of wlroots and the create path is
inspired by the wlroots vulkan allocator MR.
2023-08-31 10:08:06 +00:00