Manuel Stoeckl
82b4bc3f5f
renderer: add field to indicate color transform support
7 months ago
Manuel Stoeckl
ffdbfdbbbd
render/vulkan: add support for output color transforms
7 months ago
Simon Ser
895e3d18b9
render/color: introduce wlr_color_transform
...
Co-authored-by: Manuel Stoeckl <code@mstoeckl.com>
7 months ago
Simon Ser
ebef710746
renderer: replace get_render_buffer_caps() with struct field
7 months ago
Simon Ser
0686666cf5
render: drop wlr_renderer_get_dmabuf_texture_formats()
...
wlr_renderer_get_texture_formats() with WLR_BUFFER_CAP_DMABUF is
the replacement.
7 months ago
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.
7 months ago
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.
12 months ago
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.
12 months ago
Alexander Orzechowski
6e03d3015e
swapchain: Add wlr_swapchain_has_buffer
12 months ago
Alexander Orzechowski
d3a339a03e
renderer: Drop buffer binding
12 months ago
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.
12 months ago
Alexander Orzechowski
57b18d26d0
wlr_texture: Introduce wlr_texture_preferred_read_format
12 months ago
Alexander Orzechowski
e85e8bc324
wlr_texture: Introduce wlr_texture_read_pixels_options helpers
12 months ago
Alexander Orzechowski
4c6caa7c48
wlr_texture: Introduce wlr_texture_read_pixels
12 months ago
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.
12 months ago
Simon Ser
1208ba6c28
render/gles2: document EGL context gotchas
12 months ago
Alexander Orzechowski
d7ecdad4e0
render: Drop rendering_with_buffer
...
This is always true now that we can only render with a buffer.
12 months ago
Alexander Orzechowski
3faf9883dc
renderer: Drop wlr_renderer_begin
12 months ago
Simon Ser
41494244df
render: drop legacy rendering API
1 year ago
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.
1 year ago
Alexander Orzechowski
5299d973d5
render/pass: Introduce wlr_render_rect_options_get_box
1 year ago
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.
1 year ago
Simon Ser
d3d3e19ffd
render: split render pass API into separate header
...
Keeps the main wlr_renderer.h a tad more tidy.
1 year ago
Simon Ser
4811d9fb18
render: document wlr_buffer_pass_options.timer
1 year ago
Simon Ser
b7dca21c2b
render: constify struct wlr_buffer_pass_options
...
Let's not allow renderer implementations to mutate the passed in
options.
1 year ago
Alexander Orzechowski
2044cc2311
render: Introduce wlr_render_texture_options.blend_mode
1 year ago
Alexander Orzechowski
6bd44c4fcd
renderer: Introduce wlr_scale_filter_mode
1 year ago
Rose Hudson
45ca284eee
render/gles2: implement timer API
1 year ago
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.
1 year ago
Alexander Orzechowski
300bd80772
wlr_drm_format_set: Store formats on array
2 years ago
Alexander Orzechowski
340700cb70
wlr_drm_format: Change wlr_drm_format_dup to copy
2 years ago
Alexander Orzechowski
e6879616e7
wlr_drm_format: Make structure constant length
...
Don't store modifiers as part of the struct.
2 years ago
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.
2 years ago
Alexander Orzechowski
b45396c790
wlr_drm_format: Introduce drm_format_finish
2 years ago
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.
2 years ago
Alexander Orzechowski
1ee75786b4
drm_format_set_union: Require initialized dst and remove assert
2 years ago
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.
2 years ago
Austin Shafer
ec37d55a5e
Add union function for format sets
2 years ago
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.
2 years ago
Simon Ser
4a1ad32534
render: add render pass helpers
2 years ago
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
2 years ago
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.
2 years ago
Alexander Orzechowski
db0e962368
wlr_texture: Expose owning renderer
2 years ago
Simon Ser
0fa5743c26
render/gles2, render/pixman: stop pulling <wlr/backend.h>
...
No reason why the GLES2/Pixman renderers should depend on the
backend.
2 years ago
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>.
2 years ago
Simon Ser
31ea61b390
render: add wlr_renderer.events.lost
2 years ago
Simon Ser
a541c9510a
render: make wlr_renderer_begin return a bool
2 years ago
Simon Ser
23540b5579
render: allow wlr_renderer_impl.begin to fail
...
Make it return a bool to indicate success/failure. Adapt the
various implementations to check errors.
2 years ago
Simon Ser
4a70172e26
render: make some wlr_renderer fields private
2 years ago
Simon Ser
5451cbd183
render: add docs for wlr_renderer
2 years ago