Simon Ser
d9bfb47648
render/drm_syncobj: add helpers to wait for timeline points
...
References: https://patchwork.freedesktop.org/patch/506761/
2024-06-12 18:39:45 +02:00
Simon Ser
ea75aa3065
render/drm_syncobj: add wlr_drm_syncobj_timeline_import()
2024-06-12 18:38:42 +02:00
Simon Ser
7fc00ef777
render/drm_syncobj: introduce wlr_drm_syncobj_timeline
...
wlr_drm_syncobj_timeline is a synchronization primitive based on
drm_syncobj timelines. They are heavily inspired from Vulkan
timeline semaphores [1].
[1]: https://www.khronos.org/blog/vulkan-timeline-semaphores
2024-06-12 17:45:06 +02:00
Simon Ser
8cd58bc53c
render/allocator: document struct wlr_allocator
2024-05-25 13:28:19 +00:00
Manuel Stoeckl
82b4bc3f5f
renderer: add field to indicate color transform support
2024-04-26 17:17:36 +00:00
Manuel Stoeckl
ffdbfdbbbd
render/vulkan: add support for output color transforms
2024-04-26 17:17:36 +00:00
Simon Ser
895e3d18b9
render/color: introduce wlr_color_transform
...
Co-authored-by: Manuel Stoeckl <code@mstoeckl.com>
2024-04-26 17:17:36 +00:00
Simon Ser
ebef710746
renderer: replace get_render_buffer_caps() with struct field
2024-04-22 11:38:30 +02:00
Simon Ser
0686666cf5
render: drop wlr_renderer_get_dmabuf_texture_formats()
...
wlr_renderer_get_texture_formats() with WLR_BUFFER_CAP_DMABUF is
the replacement.
2024-04-21 11:27:29 +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
Roman Gilg
3531007b75
render/pixman: add wlr_pixman_renderer_get_buffer_image()
...
This is similar to wlr_pixman_texture_get_image and can be useful for
compositors to access the rendering data.
2023-12-11 19:47:55 +01:00
Simon Ser
1f64f3925c
render/gles2: add wlr_gles2_renderer_get_buffer_fbo()
...
Replacement for wlr_gles2_renderer_get_current_fbo(). Wayfire uses
it for instance.
2023-12-05 18:57:43 +01:00
Alexander Orzechowski
6e03d3015e
swapchain: Add wlr_swapchain_has_buffer
2023-12-03 05:29:05 +00:00
Alexander Orzechowski
d3a339a03e
renderer: Drop buffer binding
2023-11-30 20:11:50 -05:00
Alexander Orzechowski
3ed1268f64
render: Nuke old read pixels API
...
Sadly, the new API is not backwards compatible with the old API. Since
we have already switched all users in wlroots to the new API compositors
are already practically mandated to implement the new API. Let's get rid
of the old one since there is no point.
2023-11-30 20:01:12 -05:00
Alexander Orzechowski
57b18d26d0
wlr_texture: Introduce wlr_texture_preferred_read_format
2023-11-30 19:56:54 -05:00
Alexander Orzechowski
e85e8bc324
wlr_texture: Introduce wlr_texture_read_pixels_options helpers
2023-11-30 19:55:51 -05:00
Alexander Orzechowski
4c6caa7c48
wlr_texture: Introduce wlr_texture_read_pixels
2023-11-30 19:55:12 -05:00
Simon Ser
e8b187cc92
render/gles2: save/restore context when creating/submitting a render pass
...
This is useful for e.g. lazily blitting a texture for readback
purposes while rendering.
2023-11-30 17:47:11 +01:00
Simon Ser
1208ba6c28
render/gles2: document EGL context gotchas
2023-11-30 17:46:50 +01:00
Alexander Orzechowski
d7ecdad4e0
render: Drop rendering_with_buffer
...
This is always true now that we can only render with a buffer.
2023-11-29 16:00:24 -05:00
Alexander Orzechowski
3faf9883dc
renderer: Drop wlr_renderer_begin
2023-11-29 15:13:24 -05:00
Simon Ser
41494244df
render: drop legacy rendering API
2023-11-22 11:43:05 +01:00
Simon Ser
e58c7bb792
render/drm_format_set: use published kernel doc URL
...
The kernel patch has been merged, so this is available in the
official docs now.
2023-10-05 21:29:25 +00:00
Alexander Orzechowski
5299d973d5
render/pass: Introduce wlr_render_rect_options_get_box
2023-09-21 02:25:34 -04:00
Manuel Stoeckl
a94168b5fe
render: ensure wlr_render_rect_options->box is nonempty
...
This optimization also fixes an validation error with the Vulkan
renderer by ensuring vkCmdClearAttachments does not receive empty
regions.
2023-08-23 18:28:58 +00:00
Simon Ser
d3d3e19ffd
render: split render pass API into separate header
...
Keeps the main wlr_renderer.h a tad more tidy.
2023-08-16 19:20:12 +02:00
Simon Ser
4811d9fb18
render: document wlr_buffer_pass_options.timer
2023-07-11 18:19:03 +00:00
Simon Ser
b7dca21c2b
render: constify struct wlr_buffer_pass_options
...
Let's not allow renderer implementations to mutate the passed in
options.
2023-07-11 18:19:03 +00:00
Alexander Orzechowski
2044cc2311
render: Introduce wlr_render_texture_options.blend_mode
2023-06-19 13:16:34 -04:00
Alexander Orzechowski
6bd44c4fcd
renderer: Introduce wlr_scale_filter_mode
2023-06-19 12:25:38 -04:00
Rose Hudson
45ca284eee
render/gles2: implement timer API
2023-06-05 19:50:07 +00:00
Rose Hudson
9e8947e4d5
add render timer API
...
Based on five calls:
wlr_render_timer_create - creates a timer which can be reused across
frames on the same renderer
wlr_renderer_begin_buffer_pass - now takes a timer so that backends can
record when the rendering starts and finishes
wlr_render_timer_get_time - should be called as late as possible so that
queries can make their way back from the GPU
wlr_render_timer_destroy - self-explanatory
The timer is exposed as an opaque `struct wlr_render_timer` so that
backends can store whatever they want in there.
2023-06-05 19:50:07 +00:00
Alexander Orzechowski
300bd80772
wlr_drm_format_set: Store formats on array
2023-05-11 18:25:52 +02:00
Alexander Orzechowski
340700cb70
wlr_drm_format: Change wlr_drm_format_dup to copy
2023-05-11 18:24:43 +02:00
Alexander Orzechowski
e6879616e7
wlr_drm_format: Make structure constant length
...
Don't store modifiers as part of the struct.
2023-05-11 03:51:01 -04:00
Alexander Orzechowski
84d07e7119
wlr_drm_format_set: Remove redundant text in comment for finish function
...
This is implied by the fact that this function finishes the state instead
of destroying it.
2023-05-11 03:51:01 -04:00
Alexander Orzechowski
b45396c790
wlr_drm_format: Introduce drm_format_finish
2023-05-11 03:51:01 -04:00
Alexander Orzechowski
5adb1be3a7
drm_format_set_intersect: Require initialized dst and remove assert
...
The usages in linux_dmabuf zero out the dst before passing it so this
change should be fine.
2023-05-04 18:19:33 +00:00
Alexander Orzechowski
1ee75786b4
drm_format_set_union: Require initialized dst and remove assert
2023-05-04 18:19:33 +00:00
Alexander Orzechowski
2dd9549085
drm_format_set: Mark as unstable
...
This is supposed to be an unstable interface and it was a mistake that
this header was not included.
2023-05-03 19:08:14 +02:00
Austin Shafer
ec37d55a5e
Add union function for format sets
2023-05-03 12:06:48 -04:00
Simon Ser
a93fc8afd6
render: introduce blend mode
...
Allow callers to pick the blend mode when rendering a rect. The
"none" mode can be used to disable blending and clear rects.
2023-05-02 21:32:51 +02:00
Simon Ser
4a1ad32534
render: add render pass helpers
2023-04-25 17:25:10 +02:00
Simon Ser
756dedae20
Add a new renderer API
...
Goals:
- Extensibility: we need to be able to add new params to the calls
to render a texture/rect. For instance we'll need to add fences to
the render texture operation for explicit sync purposes.
- No implicit state: no more bind_buffer, begin, end.
- No matrices: these hurt Pixman and we don't need them.
- Clip regions for optimized damage repainting.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3188
2023-04-25 17:25:10 +02:00
Simon Ser
b33ab26fe7
render/swapchain: make public
...
We've had this struct for a while. It'd be useful for compositors
if they want to manage the swap chains themselves instead of being
forced to use wlr_output's. Some compositors might also want to use
a swapchain without an output.
2023-02-21 17:14:31 +01:00
Alexander Orzechowski
db0e962368
wlr_texture: Expose owning renderer
2022-12-01 04:41:43 -05:00
Simon Ser
0fa5743c26
render/gles2, render/pixman: stop pulling <wlr/backend.h>
...
No reason why the GLES2/Pixman renderers should depend on the
backend.
2022-11-24 21:50:28 +00:00
Simon Ser
99134c26b8
render: stop pulling <wlr/backend.h>
...
Let's just forward-declare struct wlr_backend instead.
We need to fixup the Vulkan renderer: it needs makedev(), which
got included by chance via <wlr/backend.h> → <wlr/backend/session.h>
→ <libudev.h>.
2022-11-24 21:50:28 +00:00
Simon Ser
31ea61b390
render: add wlr_renderer.events.lost
2022-11-15 15:50:19 +00:00