* pointermgr: damage only the surface size
CWaylandOutput returns a vector2d with -1, -1 set as a "no limit",
passing that down into beginSimple and the renderer it hits pixman bug
of invalid sizes and wrong rectangles gets created.
causing bunch of
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
set the damage either to cursor plane size or fallback to 256x256.
* pointermgr: dedup if hw cursorsize checks
dedup a bit if else casing
* multigpu: fix multi gpu checking
drmFD() from allocators is not always equal, because we reopen them
inside AQ for refcounting, meaning they get duplicated and become their
own fds, so checking if fd1 == fd2 ends up wrong.
introduce sameGpu in MiscFunctions that checks the actual drmDevice
meaning we can now even check if a rendernode is the same gpu as a
display node if we want.
* multigpu: move sameGpu to DRM namespace
move sameGpu out of MiscFunctions to DRM namespace.
set the damage to cursor plane size instead of INT16_MAX and remove
onRenderbufferDestroy, renderbuffer already have a listener that
destroys when buffer is destroyed.
Renames `misc:new_window_takes_over_fullscreen` into
`misc:on_focus_under_fullscreen` and implements the following behavior:
- By default, when a tiling window is being focused on a workspace where
a fullscreen/maximized window exists, respect
the `misc:on_focus_under_fullscreen` config variable.
* syncobj: use rendernode for timelines
use rendernode for timelines instead of the drmfd, some devices dont
support to use the drmfd for this.
* opengl: use rendernode if available
use rendernode if available for CHyprOpenglImpl
* MesaDRM: use the m_drmRenderNodeFD if it exist
try use the rendernode we got from AQ if it exist.
* linuxdmabuf: use rendernode if available
use the rendernode if available already from AQ
* syncobj: prefer rendernode over displaynode
prefer the rendernode over the displaynode, and log a error if
attempting to use the protocol without explicit sync support on any of
the nodes.
* syncobj: check support on both nodes always
check support on both nodes always so it can be used later for
preferring rendernode if possible in syncobj protocol.
* syncobj: remove old var in non linux if else case
remove old m_bDrmSyncobjTimelineSupported from non linux if else case
that will fail to compile on non linux. the nodes sets support by
default to false, and if non linux it wont check for support and set it
to true.
* build: bump aq requirement
bump to 0.9.3 where rendernode support got added.
* flake.lock: update
* renderer: glfinish on software renderer
software renderers apparently bug out on implicit sync, use glfinish as
with nvidia case on implicit paths.
* flake.lock: update
---------
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* opengl: remove unnecessery glflush calls
glflushing forces the driver to break batching and issue commands
prematurely and prevents optimisations like command reordering and
merging.
many glFunctions already internally glflushes and eglsync creation still
has a glflush at end render. so lets reduce the overhead of these calls.
* opengl: reduce glUseProgram calls
apitrace shows cases where the same program gets called multiple times,
add a helper function that keeps track of current program and only call
it once on same program. reduces slight overhead.
* opengl: use more efficient vertex array object
use a more modern vertex array object approach with the shaders, makes
it a onetime setup on shader creation instead of once per drawcall, also
should make the driver not have to revalidate the vertex format on each
call.
remove unused timeline and waitpoint in texpass and especially remove
the passing it to renderTextureInternalWithDamage that implicitly
converted it to bool. setting discardActive and allowCustomUV