aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-08scene: destroy addons before cleaning up internal stateSimon Ser
This allows addons to access wlr_scene_node/wlr_scene_surface fields to clean up themselves.
2022-11-08scene: fix whitespaceSimon Ser
2022-11-08Revert "render/pixman: apply source image cropping"Kirill Primak
This reverts commit 9fefeb69d6fc1136cfad7d690e1d7385c058fd72. It doesn't really crop anything, actually.
2022-11-08render/vulkan: add some interfaces to allow compositors to integratezccrs
Added wlr_vk_renderer_get_* functions to allow get the VkInstance, VkPhysicalDevice, VkDevice, queue family of a wlr_vk_renderer. Added wlr_vk_renderer_get_current_image_attribs function to allow get the VkImage of current renderer buffer to use on compositors. Added wlr_renderer_is_vk function, it's like the wlr_renderer_is_gles2, returns true if the wlr_renderer is a wlr_vk_renderer. Added wlr_vk_image_get_attribs function to get a VkImage and it's extras information (e.g. a VkImageLayout and VkImageFormat of the VkImage) from a wlr_texture.
2022-11-08render/pixman: apply source image croppingKirill Primak
2022-11-08scene: fix output damage expansionKirill Primak
This fixes e.g. `weston-simple-damage --use-viewport` which technically renders at the buffer scale of 0.5.
2022-11-07render/vulkan: use wl_array for wlr_vk_shared_buffer.allocsSimon Ser
Avoids the need to open-code the realloc() logic.
2022-11-07compositor: use the correct input regionKirill Primak
2022-11-07tinywl: handle view unmap while grabbedKirill Primak
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3372
2022-11-07render/vulkan: fix and add missing wl_list commentsSimon Ser
In wlroots we add comments near struct wl_list members to indicate which type it's linked to. The Vulkan renderer had some comments with mistakes, and some members without a comment.
2022-11-07render/vulkan: simplify texture VkPipelineShaderStageCreateInfoSimon Ser
I simplified the quad VkPipelineShaderStageCreateInfo in [1], but missed the one for texture. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3823
2022-11-06render/vulkan: use struct initializersSimon Ser
Instead of filling the fields one by one, use a struct initializer. This avoids repeating the name of the variable and is more consistent with the wlroots code style.
2022-11-06render/vulkan: simplify extension checksSimon Ser
find_extensions() is clunky to use when checking only a single extension, and it's surprising that it returns NULL on success. Simplify by replacing it with a check_extension() function which just checks whether a single extension is in the list.
2022-11-06compositor: enforce surface destruction orderKirill Primak
2022-11-06compositor: drop role object NULL checks in handlersKirill Primak
Instead, move the check to the caller.
2022-11-06xwayland/xwm: use role object destroy handlerKirill Primak
2022-11-06xdg-shell: use role object destroy handlerKirill Primak
2022-11-06drag-icon: use role object destroy handlerKirill Primak
2022-11-06input-method: use role object destroy handlerKirill Primak
2022-11-06session-lock: use role object destroy handlerKirill Primak
2022-11-06subcompositor: use role object destroy handlerKirill Primak
2022-11-06layer-shell: use role object destroy handlerKirill Primak
2022-11-06compositor: introduce wlr_surface_destroy_role_object()Kirill Primak
2022-11-05xdg-shell: fix geometry typesKirill Primak
2022-11-05scene: fix buffer source box transformingKirill Primak
2022-11-04render/vulkan: drop outdated commentsSimon Ser
2022-11-04render/vulkan: remove exts arg from vulkan_instance_create()Simon Ser
2022-11-04render/vulkan: add caching to vulkan_read_pixelsDavid96
2022-11-02xwayland: split headersSimon Ser
We're about to get one more Xwayland-related thing, and this header already contains two things.
2022-11-02backend/drm: get possible CRTCs in create_drm_connector()Simon Ser
This stuff is immutable for a given connector.
2022-11-02backend/drm: extract create_drm_connector()Simon Ser
Move a bit more logic out of the big loop in scan_drm_connectors().
2022-10-28render/gles2: de-duplicate vertex shadersSimon Ser
The vertex shaders for quads and textures are identical.
2022-10-28render/gles2: move color uniform from quad.vert to quad.fragSimon Ser
We have no use for a v_color varying. We can use the uniform directly from the fragment shader without getting the vertex shader involved.
2022-10-28render/gles2: move shaders to individual filesSimon Ser
Instead of having a C file with strings for each shader, move each shader into its own file. Use a small POSIX shell script to convert the files into C strings (can't wait for C23 #embed...). The benefits from this are: - Improved readability and syntax highlighting. - Line numbers in shader compiler errors are easier to make sense of. - Consistency with the Vulkan renderer. - Shaders will become more complicated as we add color management features.
2022-10-27render/gles2: log error on shader compilation failureSimon Ser
2022-10-25render/gles2: remove stale gles2_texture_from_wl_drm() prototypeSimon Ser
This function doesn't exist anymore.
2022-10-24wlr-output-management: implement adaptive syncIsaac Freund
Version 4 of the protocol adds support for reporting/setting adaptive sync state of outputs. Implement these new requests/events in wlroots.
2022-10-22wlr_scene: Handle fractional scaling betterAlexander Orzechowski
Try to alleviate scaling inaccuracies by implementing a fudge factor.
2022-10-21egl: add WLR_EGL_NO_MODIFIERSSimon Ser
Same as WLR_DRM_NO_MODIFIERS but for EGL. For debugging purposes mostly. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3451
2022-10-20output: clarify custom modes warningSimon Ser
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3514
2022-10-20output: try to use fixed mode in wlr_output_set_custom_mode()Simon Ser
If a fixed mode matching the user requirements is available, use that. This avoids generating the mode with GTF or CVT in the DRM backend, and instead uses mode timings advertised by the output. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3514
2022-10-19xwyland/xwm: simplify unpaired_link handlingSimon Ser
Always keep it initialized, so that we don't have to check for xsurface->surface_id. Will help with WL_SURFACE_SERIAL support, which adds a new way for a surface to be unpaired.
2022-10-19backend/drm: fetch current CRTC once on startupSimon Ser
Once we are DRM master, the CRTC cannot be changed behind our back except during a VT switch. After a VT switch, we try to restore whatever KMS state we had last programmed. Reloading the current CRTC from KMS breaks this and can result in a modeset without a FB. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3432
2022-10-18xwayland: Simplify net_wm_edges_to_wlrAlexander Orzechowski
2022-10-18render/vulkan: add missing entries in vulkan_strerror()Simon Ser
And update the sort order to follow Khronos' <vulkan/vulkan_core.h>.
2022-10-18backend/drm: log failures in drm_surface_blit()Simon Ser
Can make issues like [1] easier to debug. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3451
2022-10-17backend/drm: drop drm_crtc_page_flip()Simon Ser
Inline it in drm_connector_commit_state(). Brings us a step closer to unifying the test code-path and the commit code-path.
2022-10-17backend/drm: log when restoring mode after VT switch failsSimon Ser
Can make it easier to track down issues.
2022-10-17backend/drm: fix EINVAL atomic commits after VT switchSimon Ser
The drm_connector_commit_state() call in handle_session_active() was not resulting in any atomic commit, because it didn't match any of the if branches: active = true, no new buffer was committed, and adaptive sync/gamma LUT were unchanged. Thus the commit was a no-op. Later on, when the compositor performs regular page-flips, the kernel would return EINVAL indicating that a modeset was needed. Rework the logic to use a non-blocking page-flip commit if a buffer was committed, and use a blocking commit if the connector is on or is being disabled. The only case where we should skip the atomic commit is when disabling (active = false) an already-disabled connector (conn->crtc == NULL). Note, 6936e163b514 ("backend/drm: short-circuit no-op commits") has introduced early returns for other situations where we don't need to perform an atomic commit (e.g. updating scale or transform of an output). Fixes: f216e979836a ("backend/drm: drop drm_connector_set_mode()") Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3432
2022-10-17backend/drm: extract current mode logic into separate functionSimon Ser
Extract the logic to fetch the current mode to a separate function to make it more readable. Stop dying in an assert when get_drm_prop_blob() fails. Always make it so the drmModeModeInfo pointer is allocated so that we can free() it unconditionally.