Commit graph

41 commits

Author SHA1 Message Date
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
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
columbarius
f10e8d2717 vulkan: Export functions to handle implicit_fd 2024-04-09 09:05:03 +00:00
columbarius
c845338d81 vulkan: Add blit utils 2024-02-04 09:27:56 +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
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
b8c91f7e54 vulkan: Synchronize in and out buffers 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
columbarius
2068972bb3 vulkan: Add wait functions
vulkan_wait_idle waits until the device is idle and all referenced
objects can be destroyed.
vulkan_wait_fence waits until a fence is triggered by a finished
queueSubmit.

vulkan: wait on fence
2023-08-31 10:08:06 +00:00
columbarius
0bb662f2e7 vulkan: limit supported modifiers with DMABUF_MAX_PLANES 2023-08-31 10:08:06 +00:00
columbarius
58853eb2c7 vulkan: Add function to query format and modifier information 2023-08-31 10:08:06 +00:00
columbarius
cf0e3a35ba vulkan: Add format convertion functions 2023-08-31 10:08:06 +00:00
columbarius
ea2a2c47c7 vulkan: split vulkan-utils into generic and compute part
This commit should just shuffle code around with no functional changes.
The goal is to ease development of simple vulkan nodes by providing
generic helpers.
2023-08-31 10:08:06 +00:00
columbarius
e7b4129944 vulkan: use SPDX tags to specify copyright information 2023-08-31 10:08:06 +00:00
Lucas Holt
4c3f5a7655 When adding MidnightBSD support, I inversed the condition here. 2022-07-08 12:25:58 +02:00
Lucas Holt
6a15a02ec2 Add support for MidnightBSD
Fix build issue

Fix build issue
2022-06-19 18:22:47 +00:00
Wim Taymans
80f317344e vulkan: fix validation errors 2022-06-06 12:13:20 +02:00
Wim Taymans
d40e6aeedd vulkan: use image sampler 2022-06-06 12:13:20 +02:00
Wim Taymans
b02ebec954 vulkan: use images
The filter can now run shadertoy filters.
2022-06-06 12:13:20 +02:00
Wim Taymans
24fc972164 vulkan: add some more error checks 2022-06-06 12:13:20 +02:00
Wim Taymans
6e681fc98d vulkan: more improvements 2022-06-06 12:13:19 +02:00
Wim Taymans
e6f01563ab vulkan: support multiple streams of buffers 2022-06-06 12:13:19 +02:00
Barnabás Pőcze
f5d51162c4 treewide: mark things static and const
Mark some structures, arrays static/const at various places.
In some cases this prevents unnecessary initialization
when a function is entered.

All in all, the text segments across all shared
libraries are reduced by about 2 KiB. However,
the total size increases by about 2 KiB as well.
2021-06-30 14:44:08 +02:00
Wim Taymans
4f60dcadc6 vulkan: check results of stat 2020-05-20 15:24:25 +02:00
Wim Taymans
f1dc3d9728 vulkan: fix macro variables 2020-05-20 15:24:25 +02:00
Wim Taymans
ab3a6d3441 Fix some compiler warnings on arm 2020-04-03 13:18:02 +02:00
Gleb Popov
b552863ec9 Don't include alloca.h on FreeBSD. 2020-03-31 12:16:45 +02:00
Wim Taymans
990ecd20c5 vulkan: handle older versions
Fixes #183
2019-09-27 10:53:36 +02:00
Wim Taymans
4f31ca5383 vulkan: only send out buffers when ready
Keep track of the buffer that is rendering and when it finishes,
move it to the ready queue.
2019-08-19 18:16:32 +02:00
Wim Taymans
38169ec5db vulkan: update some properties 2019-08-19 16:47:02 +02:00
Wim Taymans
9799b0e679 vulkan: add vulkan compute source
Add a source that runs a compute shader and exports the GPU buffer
as a DmaBuf to the clients.
2019-08-19 16:32:22 +02:00