* 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.
* 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.
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.
only scan connected connectors when deciding which gpu to become primary
mux switched laptops still have connectors for internal panel but not
connected.
* 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
* do not set cursor planeProps unless smth changed
* do not skip cursor state flag setting
* drm: scan only cards and not outputs, safeguard against null renderer (#106)
* drm: dont scan card outputs
no need to scan for card[0-9]* and probe card0-eDP etc if they are kms,
bootvga and rendernodes etc. skip the wildcard and remove a unused
size_t variable.
* drm: dont commit state if renderer is missing
setting certain env vars to force egl implentations makes the render
creation fail on the second gpu. instead of causing a coredump,
safeguard commitState and let the monitor turn blank instead.
* props: bump version to 0.5.0
* drm: Validate conn before dereference in CDRMAtomicRequest::commit() (#108)
During startup, CDRMAtomicImpl::reset() may emit a call to method
commit of a CDRMAtomicRequest instance with member "conn" uninitialized,
leading to a segfault. Validate the the pointer before dereference it as
a workaround.
Fixes: 55ac962 ("DRM: preliminary atomic support")
Closes: https://github.com/hyprwm/aquamarine/issues/107
Signed-off-by: Yao Zi <ziyao@disroot.org>
* buffer: remove useless forward def
* drm: clearer flow when rescanning connectors (#113)
* consolidates into checkOutput for clearer flow when rescanning connectors
* add error log
* drm: allow multigpu blit from explicit to implicit (#114)
* version: bump to 0.5.1
* flake.lock: update
* flake.nix: gcc13 -> gcc14 (#118)
* drm: udev scan only drm_minor, not connectors (#119)
* drm: log errno set by drmModeAtomicCommit (#120)
* drm: moved null check for renderer to shouldBlit() (#109) (#121)
* drm: only fail INVALID format when enabled (#122)
* flake.lock: update
* drm: only clear buffers when fullReconfigure succeeds (#124)
* core/drm: Add HDR Support (#112)
* version: bump to 0.6.0
* drm: limit udev drm_minor to Linux after a132fa41be (#129)
Not implemented by libudev-devd yet:
[ERR] [AQ] drm: No gpus in scanGPUs.
[ERR] [AQ] drm: Found no gpus to use, cannot continue
[ERR] [AQ] DRM Backend failed
* do not set cursor planeProps unless smth changed
* test separate cursor commits
* do not change hdr blob unless asked to
* rebase
* split atomic commit processing and move hdr & colorspace into modeset
* fix wide color gamut flag & cleanup
* remove unused debug var
---------
Signed-off-by: Yao Zi <ziyao@disroot.org>
Co-authored-by: Tom Englund <tomenglund26@gmail.com>
Co-authored-by: Vaxry <vaxry@vaxry.net>
Co-authored-by: Ziyao <ziyao@disroot.org>
Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com>
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Co-authored-by: Austin Horstman <khaneliman12@gmail.com>
Co-authored-by: Richard Henninger <56615615+richen604@users.noreply.github.com>
Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
Not implemented by libudev-devd yet:
[ERR] [AQ] drm: No gpus in scanGPUs.
[ERR] [AQ] drm: Found no gpus to use, cannot continue
[ERR] [AQ] DRM Backend failed