Commit Graph

2080 Commits

Author SHA1 Message Date
Yuxuan Shui
e8d42885fa backend: gl: don't force fbconfig info on to heap
It's fairly small, so it's reasonable to put it on the stack.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-14 19:42:40 +00:00
Yuxuan Shui
e948b74363 backend: gl: remove an unused type
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-14 19:42:16 +00:00
Maxim Solovyov
28cb220b5b Merge pull request #1194 from yshui/update-clang
ci: update git-clang-format
2024-02-14 20:37:34 +03:00
Yuxuan Shui
c6db632d9d ci: update git-clang-format
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-14 17:29:11 +00:00
Yuxuan Shui
f28905b62d Merge pull request #1192 from absolutelynothelix/ci-fixes 2024-02-14 02:40:21 +01:00
Maxim Solovyov
53dd8a4e66 fix most of build warnings on openbsd
sorry openbsd people, we're not going to use the snprintf function.
2024-02-14 02:19:16 +03:00
Maxim Solovyov
f179119d84 ci: use meson setup instead of meson 2024-02-14 00:21:03 +03:00
Maxim Solovyov
466fb4c9e0 ci: update github actions to use node.js 20 2024-02-14 00:20:45 +03:00
Yuxuan Shui
4f792243c1 Update CHANGELOG.md
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-13 10:44:38 +00:00
Maxim Solovyov
9392829d84 backend: xrender: cache the present region
to avoid creating and destroying it every frame

(cherry picked from commit 5a1990b236c85f1222098ef147398855cbb3af69)
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-13 10:27:51 +00:00
Maxim Solovyov
a4ec70982c x: add the x_set_region function
it sets an x region to a pixman region

(cherry picked from commit efb7a1430f2c530c7b9cc0cb6d6d6cff95d8a4d9)
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-13 10:27:41 +00:00
Yuxuan Shui
0ab3e0740e Update CHANGELOG.md
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-11 23:18:47 +00:00
Yuxuan Shui
7ada6db4a3 Merge pull request #1181 from yshui/defroster
See #1145 and #1166
2024-02-12 00:12:50 +01:00
Yuxuan Shui
75d0b7ba1e core: don't flush X connection before go to sleep
See the added comments for details.

Fixes #1145
Fixes #1166
Fixes #1040?

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-11 23:11:10 +00:00
Yuxuan Shui
a5826b6fb0 event: fix dumb bug in repair_win
Basically we won't call xcb_damage_subtract if show_all_xerrors is set,
which is very bad.

Fixes that, and also make sure the damage subtract request is flushed in
all branches.

Fixes: 1307d9ec70
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-11 23:05:53 +00:00
Yuxuan Shui
bdc0943399 event: make sure ev_property_notify flushes its requests
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-11 21:20:19 +00:00
Yuxuan Shui
baeafb3a3b event: tweak ev_reparent_notify
Instead of change window attributes back and forth, calculate the evmask
and set it just once. And also make sure the request is flushed.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-11 21:20:17 +00:00
Maxim Solovyov
037be5cca2 update contributors list 2024-02-11 21:33:14 +03:00
Yuxuan Shui
0e1628e031 Merge pull request #1189 from yshui/libepoxy
Use libepoxy + fix OpenBSD build
2024-02-11 17:27:32 +01:00
Yuxuan Shui
642a43acbb Update README.md and CHANGELOG.md
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-11 02:07:07 +00:00
Yuxuan Shui
755996a42c backend: gl: use libepoxy's has_*_extension
So we don't need maintain our own version.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-11 02:07:05 +00:00
Yuxuan Shui
eb723eee29 backend: gl: use libepoxy
There is actually no specification what symbols are exported from a
libGL implementation. The (extremely outdated) OpenGL ABI specification
says only GL 1.2 functions are guaranteed. Don't know how relevant that
is now, but different libGL implementations do export different set of
symbols. On Linux we are most likely to be linked with libglvnd, which
has everything we need. But on other platforms this is not necessarily
the case, for example on OpenBSD we are missing glGetQueryObjectui64v.

Use libepoxy so we can outsource this problem and never worry about it
ever again. Plus it also saves us from calling GetProcAddress ourselves.

Changes other than trivial build fixes I have to make:

1. Can't use eglCreatePlatformWindowSurface/eglGetPlatformDisplay.
   libepoxy checks for EGL 1.5 when resolving these functions. But
   without a current context, libepoxy assumes we only have EGL 1.4.
   This creates a chicken and egg problem - we need a display to call
   eglGetPlatformDisplay. We have to use the *EXT version instead.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-10 20:36:02 +00:00
Yuxuan Shui
fcd51e7373 build: add libepoxy
Add libepoxy dependency to CI manifest and Nix.

For Nix, we need to set shellHook to workaround a NixOS limitation, see:

https://github.com/NixOS/nixpkgs/issues/287763

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-10 20:35:24 +00:00
Yuxuan Shui
dff77aae27 core: use pthread_setschedparam across the board
I think I was trying to avoid introducing pthread as a dependency, but
now we are using pthread for SGI_video_sync thread anyway. Let's remove
the ifdefs.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-10 20:32:45 +00:00
Yuxuan Shui
709f0168d9 ci: build on OpenBSD
Building on OpenBSD fails currently.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-10 10:22:16 +00:00
Yuxuan Shui
726b8d0e28 Merge pull request #1188 from yukiteruamano/next
Partially fix building on OpenBSD
2024-02-10 11:21:30 +01:00
Jose Maldonado aka Yukiteru
023103c620 core: use pthread_setschedparam on OpenBSD
OpenBSD don't have support for sched_getparam(), sched_setparam(), or
sched_setscheduler() functions (yet). In this case, we need use
pthead-equivalents for real-time sched for picom. Theses changes add
this support.

Authored-by: Jose Maldonado aka Yukiteru <josemald89@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-10 10:18:28 +00:00
Yuxuan Shui
0f22b70705 Merge pull request #1183 from yshui/gl-leak 2024-02-09 00:43:16 +01:00
Yuxuan Shui
f265e049a8 backend: gl: don't leak resources
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-07 23:42:38 +00:00
Yuxuan Shui
a39cd94e1f Merge pull request #1179 from absolutelynothelix/inherit-shader-on-decouple 2024-02-07 13:47:53 +01:00
Yuxuan Shui
7fad0d51d7 Merge pull request #1178 from absolutelynothelix/postprocess-corner-radius-rules
Fixes #1177
2024-02-07 00:00:36 +01:00
Yuxuan Shui
9204426caf backend: gl: don't use present shader for decoupling
Present shader optionally does dithering, but that's not needed for
decoupling.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-06 22:58:39 +00:00
Yuxuan Shui
0d3d18cd88 backend: gl: remove unused field from gl_win_shader_t
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-06 13:19:49 +00:00
Yuxuan Shui
c738400058 backend: clarify what clone_image does
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-06 12:56:55 +00:00
Maxim Solovyov
eb39426b08 backend: gl: inherit image's inner properties in the gl_image_decouple function
Image decouple should keep all the image properies from the source
image, so shader must be copied. And there are also some internal
properties what should be inherited but wasn't.

In particular this prevents images from losing their shaders when
alpha is applied.

Fixes #1174
2024-02-06 12:54:59 +00:00
Maxim Solovyov
0ed8d0cadf picom: post-process and free the corner radius rules list
to make conditions based on non-standard atoms in this list work.
2024-02-02 17:06:18 +03:00
Yuxuan Shui
bbc657e4bc Merge pull request #984 from absolutelynothelix/fix-binding-root-back-pixmap
fix binding the root background pixmap in case of depth mismatch
2024-02-02 10:44:10 +00:00
Maxim Solovyov
839a101527 Merge pull request #1176 from Reith77/next
Update README.md (Fedora Build Dependencies)
2024-02-02 10:32:56 +03:00
Reith
5c640ac452 Update README.md
Updated README.md to include xcb-util-devel package for fedora
2024-02-02 12:17:42 +05:30
Maxim Solovyov
4a79e7b777 render: fix binding the root background pixmap in case of depth mismatch
fix the same issue in the legacy backends, see the previous commit for
details. this commit also removes the x_validate_pixmap function because
it was used only in the get_root_tile function and the fix pretty much
implies and embeds it.
2024-02-02 02:04:45 +03:00
Maxim Solovyov
a655730e49 picom: fix binding the root background pixmap in case of depth mismatch
if the root background pixmap's depth doesn't match the root window's
depth, find a suitable visual for the root background pixmap's depth and
use it instead of the root window's visual
2024-02-02 02:04:35 +03:00
Maxim Solovyov
4401666cfb x: add the x_get_visual_for_depth function
it returns the first found visual for the given depth
2024-02-01 02:31:29 +03:00
Maxim Solovyov
90f5f4ca29 fix a bunch of typos in comments 2024-01-31 06:09:28 +03:00
Yuxuan Shui
c1b4ede06e Merge pull request #1172 from yshui/nvidia-suspend
workaround for a NVIDIA driver bug, fixes #1168
2024-01-30 22:44:01 +00:00
Yuxuan Shui
238c3cc833 vblank: reset SGI_video_sync scheduler if it's getting nonsense
If resetting fails, set a flag so all future schedule calls will fail.

Fixes #1168

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-01-30 22:41:03 +00:00
Yuxuan Shui
0638de5c56 Update CHANGELOG.md
On a second thought, the `corner-radius-rules` is a user noticeable
behavioral change, it should be more prominent.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-01-30 22:40:19 +00:00
Yuxuan Shui
fdbcd15975 backend: fix clang warning
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-01-29 23:57:11 +00:00
Yuxuan Shui
bacdb919c7 Update CHANGELOG.md
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-01-29 23:56:30 +00:00
Yuxuan Shui
733113c691 Merge pull request #1171 from absolutelynothelix/corner-radius-rules-only 2024-01-29 23:53:24 +00:00
Yuxuan Shui
14a345a817 vblank: make init fallible
Improve error handling in sgi_video_sync_scheduler_init a bit.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-01-29 22:11:01 +00:00