Commit graph

322 commits

Author SHA1 Message Date
a20a0e67a3
version: bump to 0.10.0 2025-11-23 18:33:09 +00:00
23e4e25dd3
backend: implement hyprutils' cli::logger 2025-11-23 16:57:12 +00:00
André Silva
6d0b356758
drm: prevent nullptr deref during DRM backend shutdown (#218) 2025-11-05 15:31:59 +00:00
Tom Englund
62479232aa renderer: drop the mods.empty() check
what if the driver did return modifiers that isnt linear, this wont be
added because of the .empty check.
2025-10-25 20:34:59 +01:00
Tom Englund
79b515fc44 renderer: use array and EGLint in creating image
lets use array and eglint in creating eglimage reduces vector
reallocations and unnecessery casting of data.
2025-10-25 20:34:59 +01:00
1826a99238
wayland: send commit after frame 2025-10-10 14:06:57 +01:00
jaro
3b3d8a8bde
drm: ensure disconnect called for removed connectors (#215)
Originally disconnected monitors were not removed from hyprland
correctly and duplications were created when an external monitor was
reattached leading to invalid behavior when switching
(empty desktop is visible).

Now removed monitors are explicitly disconnected during connectors
scanning.
2025-10-07 13:44:35 +02:00
Tom Englund
81a0ddf42f rendernode: dont bother finding one on evdi
evdi/displaylink devices doesnt give us a rendernode at all, and asahi
was hard to associate if a rendernode was related to the
displaynode/card so we fallback to just first found if that occurs.
might be more appropiate to figure out a proper way to deal with these
cases then workaround ever single driver that doesnt give rendernodes
but so far seems only to be evdi.

problem that occured is a 3 gpu situation, the evdi card ended up using
a rendernode for a complete different gpu because it fallbacked to that.
2025-10-06 13:04:33 +02:00
655e067f96
version: bump to 0.9.5 2025-10-03 14:58:18 +01:00
Vaxry
11406cc23a
backend: add a null backend (#209)
Adds a null backend. A null backend doesn't do anything, but allows us to use e.g. the GBM allocator and swapchains by manually passing a drm fd
2025-09-19 19:21:29 +02:00
81584dae2d version: bump to 0.9.4 2025-08-23 12:55:32 +02:00
25fba03140
flake.lock: update hyprutils 2025-08-22 10:56:54 +03:00
adb34ed5e3
nix: make mold optional 2025-08-22 10:49:22 +03:00
Tom Englund
50637ed23e
drm: revert #203 and half of #202 (#204)
either there is a fd going wrong here or certain drivers just plain
fails with this. revert for now. but leave the cdrmrenderer using
rendernode.
2025-08-19 20:44:40 +01:00
Tom Englund
84d53cadf8
drmdumb: reopen displaynode (#203)
if the backends now gets a rendernode it wont call the authmagic on the
displaynode making dumb buffer creation failing on certain drivers. so
reopen it again in the creation of the CDRMDumbAllocator.
2025-08-17 20:16:10 +01:00
98968ac769 version: bump to 0.9.3 2025-08-17 16:13:30 +02:00
Tom Englund
498f46686d
renderer: use rendernode if available (#202)
* renderer: use rendernode if available

init the CDRMRenderer on the rendernode if available otherwise fallback
to the displaynode.

* backend: use rendernode if available

use rendernode if available for the backends, or fallback to display
node. make cdrmrenderer use backend fd.
2025-08-12 17:06:31 +01:00
Lee Bousfield
be166e11d8
gbm: Default to forcing linear blit for multigpu (#197) 2025-07-22 22:26:59 +02:00
Tom Englund
f0db9b7eed
core: introduce drmRenderNodeFD() (#193)
make a getter for drmRenderNodeFD() so we can create sync timelines on
the rendernode on devices not supporting fences on the card* device
directly.
2025-07-21 20:57:00 +02:00
Maxime Nordier
141a991678
libinput: handle tablet axis on proximity, tip and button events (#194)
There can be axis changes on other tablet events, so we need to handle
axis changes on proximity, tip and button events too.
2025-07-19 16:46:21 +02:00
e31b575d19
version: bump to 0.9.2 2025-07-17 11:11:11 +02:00
Tom Englund
dfe9601119
allocator: workaround linear blitting (#174)
so nvidia as main gpu cant create linear modifiers and will give us a null
bo if forced to linear, meanwhile without linear modifiers blitting
fallbacks to cpu copying that is slow. so force linear mods, try create
bo and if all else fails try again without. this way intel/amd as main
and nvidia as dgpu will create linears and if nvidia is main it will be
using cpu copying and still work but a bit slow.

hide all of this behind AQ_FORCE_LINEAR_BLIT env var. since its a bit
hackish.
2025-07-09 14:40:09 +02:00
Tiago Dinis
8b22613953
hdr: don't skip setting up HDR even when the modes are the same (#188)
* hdr: don't skip setting up HDR even when the modes are the same

* i hate c++
2025-07-09 11:18:54 +02:00
Tom Englund
d04e01e70c
core: use -Wpedantic and fix warnings (#187)
* core: use -Wpedantic and fix warnings

dont use anonymous structs, iso c++ forbids it. compound literals is a
c99 thing use designated c++20 initializing instead.

* flake.lock: update

* core: rename .bits to .values

make the name more appropiate to its usage.

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2025-07-08 12:25:39 +02:00
664b2766bc
version: bump to 0.9.1 2025-07-07 17:58:11 +02:00
c1fb82dd3e
backend: don't use a shorthand for SP
fixes build with hl
2025-07-07 17:57:50 +02:00
Tiago Dinis
e2e3f8b4d8
drm: Avoid unnecessary modeset (fixed) (#184)
* feat: only do modeset when the mode is different from the current one

* style: remove braces around 1-line if

* fmt: run clang-format

* drm: add reset function back and remove reset from start

* drm: fix dpms on fastboot

* fmt: run clang-format

* Update Atomic.cpp
2025-07-07 16:19:52 +02:00
dfc1db15a0
version: bump to 0.9.0 2025-07-05 20:42:27 +02:00
0bd03a8e26
swapchain: fix age 2025-07-05 13:02:31 +02:00
b3208e82ec
wayland: don't force the swapchain to length 2025-07-05 13:01:27 +02:00
33ebde1c30
drm: revert "Avoid unnecessary modesetting (#183)"
This reverts commit c0c56dde3e.

Breaks dpms
2025-07-04 13:40:05 +02:00
Tiago Dinis
c0c56dde3e
drm: Avoid unnecessary modesetting (#183) 2025-07-03 21:08:03 +02:00
Tom Englund
dc45d00900
drm/renderer: optimize blitting and use gles3 shaders (#179)
* renderer: use gles3 shaders

move over to gles3 shaders.

* renderer: cleanup some code

cleanup some code, use nullptr instead of void zero cast, use empty
instead of .size() and cache last viewport size. dont wait on the waitFd
if its already readable.

* renderer: make sgltex a class

make sgltex a class, cache the textureparameters to not set it twice or
more, and add a bind/unbind function.
2025-06-29 17:20:23 +02:00
dd92142139
core: Use new typed signals from hyprutils (#178) 2025-06-26 23:44:32 +02:00
7cef49d261
CI/Nix: add cache-nix-action
Use nixbuild/nix-quick-install-action which pairs well with
nix-community/cache-nix-action.

Should help with build times by reducing the number of packages needing
to be re-downloaded on each run.

Parameters are taken from https://github.com/nix-community/cache-nix-action
and may be tweaked later.
2025-06-20 01:29:45 +03:00
Friday
94981cf75a
nix: use gcc15 (#176)
also updated dependencies
2025-06-05 21:28:30 +01:00
Tom Englund
560926d3b9
drm: reduce a bit of local temporary copies going around in renderer (#175)
* renderer: const reference dmabufs

const reference dmabufs to avoid local temporaries.

* renderer: make sgltex a unique ptr

make sgltex a uniqueptr and use weak pointers to reference it, reduces a
bit of local temporar copies going around.
2025-05-25 22:29:26 +02:00
Tom Englund
389372c5f4
drm/renderer: depend on gles3 and use vertex array objects (#173)
* drm/renderer: use gles3 vertex array objects

depend on gles3 and use vertex array objects in shaders, and upon drawing
only bind/unbind the vao instead of calling glVertexAttribPointer every blit.

* renderer: ensure same program is used once

ensure we only call glUseProgram on same program once.

* renderer: remove gles2 context creation

we are now using gles3 functions that will not work in a gles2 context,
remove any attempts of using it.

* renderer: move SShader functions to source

move SShader out of gl struct and move createVao and destructor to
source file.
2025-05-21 23:54:09 +02:00
Tom Englund
9d38b6a888
gl: a few small renderer optimisations (#172)
* renderer: remove unnecessery glflushes

dont glflush when its not needed.

* renderer: avoid vector reallocations

avoid vector reallocations by using a fixed size std:array

* renderer: dont call glgeterror unless trace

glgeterror causes overhead and driver synchronisations overhead if
called in hot paths, the GLCALL macro is used in a lot of places, guard
it behind the AQ_TRACE env var. at the cost of less debug output unless
AQ_TRACE is used.
2025-05-19 23:02:30 +02:00
Honkazel
a19cf76ee1
clang-tidy: fix some errors (#166)
* clang-tidy: fix some errors

* ...Eh?
2025-04-22 23:23:23 +02:00
Tom Englund
c8282f4982
atomic: fix compiler warning with string (#164)
the compiler tries to optimize this and inlines the +=, which might involve raw memcpy operations,
and in doing so, it thinks there is a chance that the internal buffer doesnt have enough space.
use ostringstream instead, and return the string from that.
2025-04-10 14:47:15 +02:00
UjinT34
1d2dbd72c2
drm: restore hdr metadata after vt switch (#163) 2025-03-29 17:25:29 +01:00
Lee Bousfield
484b732195
backend: Fix compiler warnings (#160) 2025-03-17 13:07:53 +01:00
1c8fa0bf04 version: bump to 0.8.0 2025-03-16 22:00:48 +00:00
Lee Bousfield
b058847592
backend, allocator: Fix mGPU backend + allocator swapchain combos (#159) 2025-03-16 22:52:24 +01:00
André Silva
bea48d0bbe nix: mesa -> libgbm
d209d800b7
2025-03-14 08:35:25 +02:00
Lee Bousfield
258cfeb3d0
misc: Fix Attachment shared pointer reinterpret (#154) 2025-03-10 18:41:37 +01:00
Lee Bousfield
81498562d0
wayland: Fix backend idleCallbacks destruction (#151) 2025-03-06 18:37:11 +01:00
Tom Englund
b236a43699
drm: only scan connected connectors (#155)
only scan connected connectors when deciding which gpu to become primary
mux switched laptops still have connectors for internal panel but not
connected.
2025-03-04 14:58:38 +01:00
Lee Bousfield
7b5db3d8a2
drm: Add strict typing to attachment manager (#152)
* misc: Add strict typing to attachment manager

* misc: Trim down CAttachmentManager comments

* misc: Return full pointer in attachment manager
2025-03-02 22:32:33 +01:00