Simon Ser
ae85c31176
render/vulkan: add luminance multiplier for texture shader
2025-06-18 19:37:55 +00:00
Simon Ser
a8144088df
render/vulkan: add support for PQ for textures
2025-06-18 19:37:55 +00:00
Simon Ser
3a51a5c623
render/vulkan: add texture color transformation matrix
2025-06-18 19:37:55 +00:00
Simon Ser
56d95c2ecb
render/vulkan: introduce wlr_vk_frag_texture_pcr_data
...
Contains UBOs for texture.frag.
2025-06-18 19:37:55 +00:00
Simon Ser
8d1c6e42ac
render/vulkan: add support for texture transfer functions
2025-06-18 19:37:55 +00:00
Simon Ser
b1a9dab03e
render/vulkan: fix typo in wlr_vk_texture.views comment
2025-06-18 19:37:55 +00:00
Simon Ser
0ee0452af0
render/color, render/vulkan: add EXT_LINEAR to enum wlr_color_transfer_function
2025-06-18 19:37:55 +00:00
Simon Ser
7b6eec530c
render/vulkan: add luminance multipler for output shader
2025-06-18 00:11:33 +02:00
Simon Ser
8430a1922d
render/vulkan: add PQ inverse EOTF to output shader
2025-06-18 00:09:25 +02:00
Simon Ser
f3524de980
render, render/vulkan: add primaries to wlr_buffer_pass_options
2025-06-18 00:07:35 +02:00
Simon Ser
2ea0e386c4
render/vulkan: add color transformation matrix
2025-06-17 18:47:50 +02:00
Simon Ser
3665b53e29
render/color: replace COLOR_TRANSFORM_LUT_3D with COLOR_TRANSFORM_LCMS2
...
Converting the LCMS2 transform to a 3D LUT early causes issues:
- It's a lossy process, the consumer will not be able to pick a
3D LUT size on their own.
- It requires unnecessary conversions and allocations: an intermediate
3D LUT is allocated, but the renderer already allocates one.
- It makes it harder to support arbitrary color transforms in the
renderer, because each type needs to be handled differently.
Instead, expose a function to evaluate a color transform, and use
that to build the 3D LUT in the renderer.
2025-06-16 09:06:10 +00:00
Kenny Levinsen
1f13bc72fe
render/vulkan: Garbage collect unused buffers
...
Perform a primitive garbage collection of buffers that have not been
used in the past 10 seconds, an arbitrarily selected number.
As garbage collection also makes span buffer allocation happen much more
often, logging on allocation activity leads to a lot of log noise so get
rid of that while at it.
2024-11-07 09:49:29 +00:00
Simon Ser
3bbfae73ae
render/vulkan: add support for explicit sync
2024-10-28 17:51:21 +00:00
Kirill Primak
67b88e46b0
Fix __VA_OPT__ macro invocations
2024-06-30 09:01:15 +03:00
Simon Ser
3880ee15d7
Use standard __VA_OPT__ instead of GNU's ##__VA_ARGS__
...
C23 has standardized a way to write variadic macros that accept
zero arguments:
https://open-std.org/JTC1/SC22/WG14/www/docs/n3033.htm
Use that instead of the GNU extension when available.
2024-06-27 18:13:05 +00:00
Kenny Levinsen
47c578945c
render/vulkan: Recycle memory maps for stage spans
...
Remapping buffers on every use causes a lot of unwanted pagefaults.
Reuse the mapping to significantly speed up the memcpy.
2024-06-24 15:55:10 +00:00
Manuel Stoeckl
ffdbfdbbbd
render/vulkan: add support for output color transforms
2024-04-26 17:17:36 +00:00
Manuel Stoeckl
e443434876
render/vulkan: create plain framebuffers on demand
...
This change makes it possible to support both the direct srgb-format
pipeline and indirect (color-managed, or non-srgb-format) pipeline
for the same render buffer.
2024-04-26 17:17:36 +00:00
Manuel Stoeckl
adbfd3c321
render/vulkan: add lut3d output shader option
...
While a corresponding pipeline is created, it is not yet used.
2024-04-26 17:17:36 +00:00
Manuel Stoeckl
c64144a39b
render/vulkan: add dummy 3d lookup table to output shader
...
Later commits will add shader options that use a real 3d
lookup table.
2024-04-26 17:17:36 +00:00
Simon Ser
85c1eda721
render: unify getter for texture formats
...
Instead of having separate getters for shm formats and DMA-BUF
formats, use the same pattern as wlr_output_impl.get_primary_formats
with a single function which takes buffer caps as input.
2024-04-21 11:27:29 +00:00
Manuel Stoeckl
d6859da3b4
render/vulkan: use _SRGB image view when possible
...
This is the last of a set of commits which ensures that both textures
and render buffers can be accessed through _UNORM and _SRGB image
views. While _UNORM image views are not yet used for 8-bpc image
formats, they will be needed in the future to support color transforms
for both textures and render buffers.
2023-12-04 15:13:31 +00:00
Manuel Stoeckl
566c413d8f
render/vulkan: constify vulkan_format_props_find_modifier
2023-12-04 15:13:31 +00:00
Manuel Stoeckl
fd4548bb93
render/vulkan: detect which _UNORM formats support _SRGB views
2023-12-04 15:13:31 +00:00
Manuel Stoeckl
eab89d6c76
render/vulkan: track and use _UNORM variants of _SRGB formats
...
Later commits will start using _SRGB image views again,
where appropriate.
2023-12-04 15:13:31 +00:00
Alexander Orzechowski
d3a339a03e
renderer: Drop buffer binding
2023-11-30 20:11:50 -05:00
Alexander Orzechowski
09f16b2a9c
render/vulkan: Implement texture_read_pixels
2023-11-30 19:56:54 -05:00
Simon Ser
9a0a4ce221
render/vulkan: drop current_command_buffer
...
This was used by the legacy rendering API. Since begin()/end()
only need to set current_render_buffer and nothing else, we can
drop all of these bits.
2023-11-28 12:56:30 +00:00
Manuel Stoeckl
e0adaaffb6
render/vulkan: constrain blend to output subpass to redrawn region
...
This commit only applies to the render pass API.
2023-10-05 11:45:32 +00:00
Simon Ser
65bbbbbf0c
render/vulkan: de-duplicate VkImageUsageFlags
...
The flags passed to vkCreateImage() must match the flags used when
querying formats. Make this clearer by using the same variable.
2023-09-09 23:32:28 +00:00
Alexander Orzechowski
6bd44c4fcd
renderer: Introduce wlr_scale_filter_mode
2023-06-19 12:25:38 -04:00
Alexander Orzechowski
3ee0f52e09
render/vulkan: Dynamically create texture views
...
Now that we are dynamically creating pipeline layouts, we need separate
texture views for each pipeline layout we choose to use with a texture.
2023-06-17 21:21:35 -04:00
Alexander Orzechowski
8a387b5558
render/vulkan: Dynamically create pipeline layouts
...
These will happen lazily when pipelines get created.
2023-06-17 21:21:31 -04:00
Alexander Orzechowski
3623005858
render/vulkan/pipeline_key: Add blending
...
This will become necessary when we switch away from scissoring. For the
time being, this cleans things up a bit and allows for a trivial
blending implementation for textures when that comes.
2023-06-16 19:20:04 -04:00
Alexander Orzechowski
9d31372930
render/vulkan: Handle quad pipeline through generic pipeline path
2023-06-16 19:20:03 -04:00
Alexander Orzechowski
97fdd57eb2
render/vulkan: Dynamically handle pipeline creation for textures
...
If we ever wanted to handle dynamic state that requires new pipelines
such as using different texture filters those can be added here with more
ease.
2023-06-16 19:09:23 -04:00
Simon Ser
0ba3ea3bcd
render/vulkan: improve error handling in render_pass_submit()
...
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3644
2023-06-01 10:42:56 +02:00
Simon Ser
e07c77f846
render/vulkan: implement render pass API
2023-05-30 09:42:19 +00:00
Simon Ser
f60b367db7
render/vulkan: drop unused vulkan_has_extension()
2023-05-26 12:25:53 +00:00
Simon Ser
42eec38ab6
render/vulkan: drop unused vulkan_change_layout_queue()
2023-05-26 12:25:53 +00:00
Simon Ser
c7ae9dfaf8
render/vulkan: generalize YCbCr format support
2023-05-24 08:58:59 +00:00
Simon Ser
5ea0eb3468
render/vulkan: add vulkan_get_pipeline_layout()
...
Will make it easier to add more pipeline layouts for other YCbCr
formats.
2023-05-24 08:58:59 +00:00
Simon Ser
fd38761676
render/vulkan: introduce struct wlr_vk_pipeline_layout
...
This will make it easier to create one pipeline layout (plus related
objects) per YCbCr format.
2023-05-24 08:58:59 +00:00
Manuel Stoeckl
10dd416694
render/vulkan: allow rendering to non-8-bit buffers
...
This is implemented by a two-subpass rendering scheme; the first
subpass draws (and blends) onto a linear R16G16B16A16_SFLOAT buffer,
while the second subpass performs linear->srgb conversion, writing
onto the actual output buffer.
2023-05-12 15:09:02 +00:00
Simon Ser
b03f71fe5f
render/vulkan: add support for NV12
2023-05-04 20:07:20 +00:00
Simon Ser
f5a5712a02
render/vulkan: use VK_KHR_synchronization2
...
This simplifies the vkQueueSubmit call, removing the need to pass
timeline semaphore point values as separate arrays.
2023-04-28 15:36:39 +00:00
Simon Ser
92b726ef67
render/vulkan: use full names for extension command fields
...
This makes grepping much easier.
2023-04-18 15:58:55 +00:00
Simon Ser
40117e1e0d
render/vulkan: prefer render node for wlr_renderer_get_drm_fd()
...
Instead of returning a primary node from wlr_renderer_get_drm_fd(),
prefer to return a render node if any.
2023-02-28 14:25:21 +00:00
Simon Ser
8456ac6fa9
render/vulkan: wait for DMA-BUF fences
...
The Vulkan spec doesn't guarantee that the driver will wait for
implicitly synchronized client buffers before texturing from them.
radv happens to perform the wait, but anv doesn't.
Fix this by extracting implicit fences from DMA-BUFs, importing
them into Vulkan as a VkSemaphore objects, and make the render pass
wait on these VkSemaphores.
2022-12-06 14:54:09 +00:00