Commit graph

305 commits

Author SHA1 Message Date
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
Lee Bousfield
09b3fd5932
drm: Fix multi-GPU support for Nvidia (#147)
* allocator: Don't force linear for multigpu if unsupported

* drm: Use an intermediate CPU buffer for blit if necessary

* drm: Add comment and cleanup style a bit

* drm: Fix formatting from comment addition

* drm: Use std::vector and std::span for intermediateBuf

* drm: Fix style and add null check

* drm: Remove TODO about pixel buf format
2025-03-02 03:07:00 +01:00
Lee Bousfield
76508fe1ec
drm: Use RAII to manage EGL context (#150) 2025-02-28 02:32:20 +01:00
Ikalco
e62592f0f4
drm/atomic: fix atomic reset being skipped, check nullptr elsewhere instead (#149) 2025-02-27 15:21:05 +01:00
UjinT34
2ff06343aa
drm: get max bpc from drm format (#146) 2025-02-23 18:33:41 +01:00
f239e5aadd backend: log no allocator errors 2025-02-11 18:27:43 +00:00
Ikalco
a3dda0d10c
drm: prioritize gpus with the most internal panels (#144) 2025-02-09 13:22:25 +01:00
427077ca92
CI: remove deprecated magic-nix-cache-action 2025-02-08 23:12:41 +02:00
Ikalco
ecd2c813e0
drm: only allow multigpu blit to implcit, not all external formats (#143) 2025-02-03 20:40:52 +01:00
Honkazel
343178ba45
core: Compiler fixes and options (#141)
* reorder ctors

* sign-compare

* Add some compile options from Hyprland
2025-02-02 13:46:00 +01:00
UjinT34
257b205079
drm/output: add api to set drm content type property (#140) 2025-02-02 01:42:56 +01:00
Ikalco
95506e561d
egl/drm: consolidate EGL init/state (#138)
* move renderer to EGLRenderer

* consolidate EGL state and initialization

* move over eglSync

* unbreak abi
2025-02-01 16:17:49 +01:00
48a000cf35
flake.lock: update 2025-01-29 22:44:05 +02:00
6934e7dc53 version: bump to 0.7.2 2025-01-28 23:45:26 +00:00
a0553cd65e headless/wayland: emit present events after commit
fixes https://github.com/hyprwm/Hyprland/issues/8087
2025-01-28 23:34:19 +00:00
7fe006981f
flake.lock: update 2025-01-23 14:46:37 +02:00
Ikalco
f0519bfebd
headless: fix headless supported formats (#136) 2025-01-23 01:07:33 +01:00
Honkazel
4edeb99390
core: add clang-tidy (#135) 2025-01-22 22:39:30 +01:00