Simon Ser
30aca4df0d
backend/drm: introduce wlr_drm_mode_get_info()
...
This allows compositors to get back the raw drmModeModeInfo and
look at DRM-specific fields and flags.
2023-05-31 22:37:12 +00:00
Simon Ser
ba276e5ac2
render/vulkan: handle vulkan_record_stage_cb() failures
2023-05-31 19:40:59 +00:00
Simon Ser
3f0487d310
backend/drm: move forward decl up for drmModeModeInfo
...
This allows doc generators to properly associate the doc comment
with the function instead of the typedef.
2023-05-31 00:08:49 +00:00
Simon Ser
5bcd537ff4
output/cursor: use new rendering API
2023-05-30 16:18:19 +00:00
Simon Ser
8e81b4bb42
examples: convert to new rendering API
...
Left out multi-pointer (will be removed) and quads (requires
arbitrary rotation).
2023-05-30 16:18:19 +00:00
Simon Ser
8fe29e6bd1
backend/drm: use new rendering API
2023-05-30 16:18:19 +00:00
Simon Ser
93a6acae9f
output: add wlr_output_begin_render_pass()
2023-05-30 16:18:19 +00:00
Alexander Orzechowski
95062904c7
wlr_scene: Introduce wlr_scene_buffer_set_opacity
2023-05-30 15:43:29 +00:00
Alexander Orzechowski
2346b90a9f
wlr_scene: Make scene_rect_from_node public
...
This is in an effort to be more consistent with both already public
getters: wlr_scene_buffer_from_node and wlr_scene_tree_from_node
2023-05-30 15:40:41 +00:00
Alexander Orzechowski
88f80c4a7c
wlr_scene: Make scene_tree_from_node public
...
This is to allow for compositors that want to be more implicit about
how their scene is organized. Such a compositor may want to walk up
at a certain scene node to find something such as a surface to focus on.
2023-05-30 15:40:41 +00:00
Alexander Orzechowski
61c157269e
wlr_scene: Add documentation to wlr_scene_buffer_from_node
2023-05-30 15:40:41 +00:00
Simon Ser
e07c77f846
render/vulkan: implement render pass API
2023-05-30 09:42:19 +00:00
Alexander Orzechowski
8af00d5534
renderer/gles2: Implement render pass interface
2023-05-28 14:53:34 -04:00
Alexander Orzechowski
b1d26ed47b
renderer/gles2: Compute texture coordinates based off of vertex positions
2023-05-28 14:53:34 -04:00
Alexander Orzechowski
45b2a8eee2
renderer/gles2: Merge get_buffer and create_buffer
2023-05-28 14:53:34 -04:00
Alexander Orzechowski
6f67bfe5ab
renderer/gles2: Interpret matrix as column major in shader
...
Avoids us needing to transpose.
2023-05-28 14:53:34 -04:00
Simon Ser
3de330ec85
render/vulkan: add 10, 12, and 16-bit YCbCr formats
2023-05-28 14:51:19 +00:00
Simon Ser
2c6aeed7d6
output: use pending render format if any
...
If a modeset contains a render format change, use that instead of
the current one stored in wlr_output.render_format.
This fixes render_bit_depth configuration not being applied without
a second modeset in Sway.
2023-05-26 16:50:58 +00:00
Simon Ser
28e8d92263
render/vulkan: document TEXTURE_TRANSFORM_* in shader
2023-05-26 12:29:30 +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
4d634276a4
render/egl: check for EGL_EXT_device_query in get_egl_device_from_drm_fd()
...
We use eglQueryDeviceStringEXT() later on, which is optional and
requires support for the EGL_EXT_device_query extension.
2023-05-24 13:06:19 +00:00
Simon Ser
7099fa2ea4
render/vulkan: de-dup pipeline layout initialization
2023-05-24 08:58:59 +00:00
Simon Ser
16dea12dae
render/vulkan: add more YCbCr formats
...
The Vulkan spec states:
> For the purposes of range expansion and Y′CBCR model conversion,
> the R and B components contain color difference (chroma) values
> and the G component contains luma.
The equations below that sentence also help understand the mapping.
2023-05-24 08:58:59 +00:00
Simon Ser
a682fa6c21
render/vulkan: require support for linear filter for YCbCr
...
YCBCR_CONVERSION_LINEAR_FILTER is not enough: this one only covers
chromaFilter. For magFilter/minFilter we need FILTER_LINEAR as well.
2023-05-24 08:58:59 +00:00
Simon Ser
91d469d8c0
render/vulkan: check format support before creating YCbCr sampler
...
We need to check whether the format supports dma_tex_ycbcr_features
before creating the YCbCr sampler.
2023-05-24 08:58:59 +00:00
Simon Ser
c7ae9dfaf8
render/vulkan: generalize YCbCr format support
2023-05-24 08:58:59 +00:00
Simon Ser
50b494d0f9
render/vulkan: add init_{default,ycbcr}_pipeline_layout()
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
Simon Ser
db619009dc
render/vulkan: use same sampler params for RGBA and NV12
2023-05-24 08:58:59 +00:00
Simon Ser
9755016422
render/vulkan: use VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE for default sampler
...
We don't actually need the REPEAT mode, and this makes things more
consistent with the YCbCr sampler (which requires CLAMP_TO_EDGE for
spec compliance).
Also drop borderColor which is unused for this mode.
2023-05-24 08:58:59 +00:00
Simon Ser
fe7c998666
render/vulkan: use identity swizzle for YCbCr formats
...
Fixes the following validation error:
[ VUID-VkImageViewCreateInfo-pNext-01970 ] Object 0: handle = 0x62e00003c400, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf378e14b | vkCreateImageView(): If there is a VkSamplerYcbcrConversion, the imageView must be created with the identity swizzle.
2023-05-24 08:58:59 +00:00
Simon Ser
091aa5582a
render/vulkan: fix VkPipelineLayout when texturing NV12
...
The default pipeline layout was always passed. However, for NV12 we
need to pass a different one.
2023-05-24 08:58:59 +00:00
Simon Ser
fc3ad784e0
render/vulkan: extract quad pipeline init to separate function
...
Makes it clearer that all of these structs are for the quad pipeline.
2023-05-24 08:58:59 +00:00
Kirill Primak
dc6402d153
util/box: transform empty boxes' origins
...
Not a huge fan of this, but changing this behavior would be a breaking change
to a stable API.
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3650
2023-05-24 08:55:15 +00:00
Simon Ser
09f5a00585
render/vulkan: fix YCbCr format check in vulkan_texture_from_pixels()
2023-05-23 20:31:42 +02:00
Kirill Primak
5f4a35290d
util/box: always treat NULL boxes as empty
2023-05-23 21:08:22 +03:00
Kirill Primak
5d67bbde86
util/box: simplify empty box case in wlr_box_intersection()
2023-05-23 21:02:18 +03:00
Alexander Orzechowski
d495fb8c04
wlr_{box, fbox}_equal: Consider empty boxes NULL
2023-05-23 17:57:16 +00:00
Alexander Orzechowski
acaf57dcca
wlr_{box, fbox}_equal: Handle NULL
2023-05-23 17:57:16 +00:00
Simon Ser
d7bebb0a4c
render/vulkan: drop unnecessary comments
...
Some comments in here are noise.
2023-05-22 18:53:15 +02:00
Simon Ser
17b10746b4
render/pixel-format: add YVYU and VYUY
2023-05-21 20:28:45 +00:00
Simon Ser
96f3f3c92e
render/pixel-format: add support for block-based formats
...
Some formats like sub-sampled YCbCr use a block of bytes to
store the color values for more than one pixel. Update our format
table to be able to handle such formats.
2023-05-21 20:28:45 +00:00
Simon Ser
78a1ac540e
render/pixel-format: add docs
2023-05-21 20:28:45 +00:00
Simon Ser
a0ebc401d0
linux-dmabuf-v1: fix wlr_drm_format_set leak in feedback_compile()
...
Fixes: 43b25fd34e
("dmabuf: Remove assumption that all mods are in fallback tranche")
2023-05-18 11:20:21 +02:00
Austin Shafer
43b25fd34e
dmabuf: Remove assumption that all mods are in fallback tranche
...
According to the spec the compositor should send scanout modifiers in
their respective device tranches, and all other texture modifiers
in the main tranche. Currently wlroots expects all modifiers to be
present in the last (i.e. "fallback") tranche, this removes that assumption
in the feedback compilation stage so that scanout modifiers for secondary
device can be advertised.
"The full-screen feedback parameters have two tranches: one with the
format/modifier pairs supported by the KMS plane, with the scanout flag
set in the tranche_flags event and with tranche_target_device set to the
KMS scan-out device; the other with the rest of the format/modifier
pairs (supported for texturing, but not for scan-out), without the
scanout flag set in the tranche_flags event, an"
2023-05-18 09:08:18 +00:00
Alexander Orzechowski
c4bed48fcc
output_pick_format: Fail if no format could be chosen
2023-05-18 07:05:30 +00:00
Kirill Primak
75293d5fb0
keyboard: use the new data in wlr_keyboard_set_keymap()
...
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3647
2023-05-18 08:39:24 +03:00
Simon Ser
e2647c5151
keyboard: add support for resetting the keymap
2023-05-17 22:08:34 +00:00