Commit graph

1366 commits

Author SHA1 Message Date
UjinT34
47e2d599e6
renderer/groupbar: fix gradients rendering (#13875) 2026-03-28 15:21:29 +00:00
Vaxry
2c4852e31f
renderer/deco: add glow decoration (#13862) 2026-03-27 14:08:56 +00:00
ee7f68820b
render/pass: fix debug:pass rendering 2026-03-26 16:39:52 +00:00
Pppp1116
855b1cba40
renderer: small fixes in OpenGL.cpp and OpenGL.hpp (#13842)
* render: add EGL error details to dmabuf query failures

* linux-dmabuf: tighten plane modifier checks and feedback safety
2026-03-26 00:08:49 +00:00
Visal Vijay
dc24eb1cf0
renderer: guard against null monitor in renderMonitor (#13823) 2026-03-23 12:52:24 +00:00
Vaxry
8726a7363e
config: cleanup the entire config infrastructure (#13785)
Massively refactors the config infrastructure, sorely
needed and will be req'd for the lua stuff
2026-03-20 17:52:37 +00:00
nikitax44
ad46ff635b
renderer: fix crash when shader path isn't a file (#13756) 2026-03-19 13:17:56 +00:00
902e8de7f0
source: c-f for new clang version 2026-03-15 15:23:21 -05:00
staz
9bf8fe7a52
renderer: fix blockBlurOptimization check (#13685) 2026-03-13 16:59:28 -05:00
ItsOhen
8aff500351
internal: fix relative path header locations (#13650)
Or plugins can't build.
2026-03-13 08:53:07 -05:00
UjinT34
8662ecba03
renderer: fix share window projection (#13695) 2026-03-11 20:48:48 +00:00
Tom Englund
a714c7fe0e
shader: delete shader on success path (#13682)
dont leak glsl shader on success path.
2026-03-10 17:46:54 +00:00
matjam
5389990724 renderer: fix crash on null blur framebuffer during monitor disconnect
Guard all m_blurFB dereferences against null. The blur framebuffer is reset during monitor disconnect but layer surface snapshots use a simple render path that skips framebuffer allocation.
2026-03-10 10:06:24 +00:00
UjinT34
03f444e0ab
renderer: fix crash with nullptr FBs (#13641) 2026-03-09 11:10:08 +00:00
UjinT34
4aee773d9b
renderer: fix sdr mod (#13630) 2026-03-07 18:56:55 +00:00
UjinT34
02f30ea15b
renderer: refactor gl renderer (#13488) 2026-03-07 18:21:23 +00:00
UjinT34
b227efc849
renderer: refactor projection setting (#13485) 2026-03-07 15:23:54 +00:00
UjinT34
73fca55e7c
renderer: move m_renderData to renderer (#13474) 2026-03-07 13:47:13 +00:00
UjinT34
966f20d305
renderer: refactor resources and flags (#13471) 2026-03-07 13:13:34 +00:00
UjinT34
32e75e3e32
renderer: refactor render elements (#13438)
Part 2 of renderer refactors
2026-03-07 10:27:47 +00:00
36b19075f3
deco/border: fix damage region 2026-03-07 10:26:37 +00:00
UjinT34
4152ac76d0
renderer: refactor Texture, Framebuffer and Renderbuffer (#13437)
Part 1 of the renderer refactors
2026-03-06 21:44:10 +00:00
UjinT34
a5858018d8
renderer: shader variants refactor (#13434)
Part 0 of renderer reworks.
2026-03-06 21:05:10 +00:00
Vaxry
972f23efe8
screencopy: fix isOutputBeingSSd (#13586)
use sessions instead of pending frames
2026-03-05 15:14:13 +00:00
Vaxry
10754745a9
render/cm: add ICC profile pipeline (#12711)
Adds an ICC profile pipeline, loading via config and applying via 3D LUTs.
2026-03-04 19:50:28 +00:00
Vaxry
ff0b706ea3
renderer: fix crash on mirrored outputs needing recalc (#13534)
ref https://github.com/hyprwm/Hyprland/discussions/13517
2026-03-03 11:25:58 +00:00
85c2764f5e
deco/border: fix damageEntire 2026-02-28 22:03:14 +00:00
UjinT34
c71fbd854d
renderer: better sdr eotf settings (#12812) 2026-02-26 12:01:59 +00:00
Vaxry
b88813c7ef
event: refactor HookSystem into a typed event bus (#13333)
Refactors the old HookSystem into a typed event bus with clear
separation,
discovery and types.
2026-02-22 23:30:10 +00:00
Ikalco
b4ee4674f9
protocols: implement image-capture-source-v1 and image-copy-capture-v1 (#11709)
Implements the new screencopy protocols
2026-02-22 12:30:11 +00:00
Vaxry
723870337f
layout: rethonk layouts from the ground up (#12890)
Rewrites layouts to be much smaller, and deal with much less annoying
BS. Improves the overall architecture, unifies handling of pseudotiling,
and various other improvements.
2026-02-21 21:30:39 +00:00
Tom Englund
63eb6b3bda
opengl: add debug:gl_debugging (#13183)
add debug:gl_debugging so we can disable gl debugging entirerly,
both glGetError and enabling EGL_KHR_debug has its cost, we still have
EXT_create_context_robustness and glGetGraphicsResetStatus that should
catch context loss, and is generally cheap to call it only checks a flag
set.

glGetError might cause a implicit flush to get any pending calls sent to
the gpu.

however to get EGL_KHR_debug back enabled we now require a restart of
the compositor after changing debug:gl_debugging
2026-02-06 21:02:20 +00:00
9ce9ef2705
decorations/border: fix damage scheduling after #12665 2026-02-05 18:07:03 +00:00
UjinT34
02ff413002
monitor: fix DS deactivation (#13188) 2026-02-04 12:42:43 +00:00
UjinT34
9433060760
renderer: fix screen export back to srgb (#13148) 2026-02-02 20:33:03 +00:00
jmanc3
db6114c6c5
renderer/pass: fix surface opaque region bounds used in occluding (#13124) 2026-01-31 13:39:22 +00:00
Szwagi
cbeb6984e7
renderer: fix mouse motion in VRR (#12665) 2026-01-31 13:37:01 +00:00
Tom Englund
ec120d5732
opengl: set EGL_CONTEXT_RELEASE_BEHAVIOR_KHR if supported (#13114)
EGL_CONTEXT_RELEASE_BEHAVIOR_KHR determines what happends with implicit
flushes when context changes, on multigpu scenario we change context
frequently when blitting content. while we still rely on explicit sync
fences, the flush is destroying driver optimisations.

setting it to EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR essentially mean
just swap context and continue processing on the next context.
2026-01-30 19:42:01 +00:00
jmanc3
c8b5023bb0
opengl: allow texture filter to be changed (#13078)
* opengl: allow texture filter to be changed

* format

* correct filter

* Moved from OpenGL.hpp to Texture.hpp

* Shortened names
2026-01-27 21:21:53 +00:00
Tom Englund
2a2c2b0e28
opengl/fb: use GL_DEPTH24_STENCIL8 instead of GL_STENCIL_INDEX8 (#13067)
older drivers lack support for GL_STENCIL_INDEX8 so use
GL_DEPTH24_STENCIL8 but explicitly disable the depth.
2026-01-23 20:09:39 +00:00
UjinT34
82de66a030
renderer: fix frame sync (#13061)
* fix commit timing timer

* fix surface state lock/unlock

* debug state sync todos

* debug solitary vrr
2026-01-22 15:16:52 +00:00
UjinT34
6c3ebed76e
renderer: add surface shader variants with less branching and uniforms (#13030)
* shader variant features

* getSurfaceShader variant with feats

* split surface shaders by features

* cleanup old shaders
2026-01-21 15:54:14 +00:00
UjinT34
55f40ecc95
renderer: fix non shader cm reset (#13027) 2026-01-21 14:03:37 +00:00
Tom Englund
c99eb23869
renderer: optimise shader usage further, split shaders and add more caching (#12992)
* shader: split CM rgba/rgbx into discard ones

make it branchless if we have no discards.

* shader: ensure we dont stall on vbo uv buffer

if we render a new texture before the previous was done gpu wise its
going to stall until done, call glBufferData to orphan the data.
this allows the driver to return a new memory block immediately
if the GPU is still reading from the previous one

* protocols: ensure we reset GL_PACK_ALIGNMENT

reset GL_PACK_ALIGNMENT back to the default initial value of 4

* shader: use unsigned short in VAO

loose a tiny bit of precision but gain massive bandwidth reductions.
use GL_UNSIGNED_SHORT and set it as normalized. clamp and round the UV
for uint16_t in customUv.

* shader: interleave vertex buffers

use std::array for fullverts, use a single interleaved buffer for
position and uv, should in theory improve cache locality. and also remove
the need to have two buffers around.

* shader: revert precision drop

we need the float precision because we might have 1.01 or similiar
floats entering CM shader maths, and rounding/clamping those means the
maths turns out wrong. so revert back to float, sadly higher bandwidth
usage.

* update doColorManagement api

* convert primaries to XYZ on cpu

* remove unused primaries uniform

---------

Co-authored-by: UjinT34 <ujint34@mail.ru>
2026-01-17 15:31:19 +01:00
eff484b96c
core: optimize some common branches 2026-01-16 16:40:48 +01:00
UjinT34
e0cf88809d
protocols/cm: Fix image description info events (#12781)
* fix image description info events

* always send some target primaries

* set edid values as target primaries and luminances

* init monitor image description

* set default luminances for tf

* fix BT1886 luminances

* fix mastering values and overrides

* set maxCLL & maxFALL

* typo

* add FALL & CLL to preferred HDR image description

* fix ref luminances
2026-01-13 16:44:36 +01:00
Tom Englund
e43f949f8a
shm: ensure we use right gl unpack alignment (#12975)
gl defaults to 4 and not all formats is divisible with 4 meaning its
going to pad out ouf bounds and cause issues. check if the stride is
divisible with 4 otherwise set it to 1, aka disable it.

GL_UNPACK_ALIGNMENT only takes 1,2,4,8 but formats like RGB888 has
bytesPerBlock 3.
2026-01-13 16:42:31 +01:00
Tom Englund
5e18111121
renderer: shader code refactor (#12926)
* shader: begin the shader refactor

make SShader a class and rename it to CShader, move createprogram,
compileshader, logshadererror to CShader.

* shader: move uniform creation to CShader

move uniform creation to CShader, reduces tons of duplicated effort,
however forcing uniform names to be same in all shaders.

* shader: move to array based frag handling

use an array with an enum so it gets easier dealing with multiple
shaders, move creating program to a for loop and array, reduces line of
code a lot.

* shader: use shared ptr for frags

with smart pointers we can now rename useProgram to useShader and return
the shader directly, means only place we have to decide the shader frag
is when calling useShader. easier for future shader splitting to reduce
branching.

* shader: move unneded public members to private

move structs and uniforms to private add a get/set for initialtime
and add a getUniformLocation to make the code tell what its doing,
instead of direct array getting when all we wanted to get was its value,
also limits the setting of uniformLocations to the createProgram as it should
be.

* shader: fix style nits

set first enum member to 0 , remove extra {}

* shader: dont show a failed notif on success

the logic got inverted in the refactor here.

* shader: split CM shader to rgba/rgbx variants

split shader to rgba/rgbx variants, use bool, and reduce branching.

* shader: split up blurprepare CM and non CM

split up blurprepare, remove skipcm, move gain to gain.glsl.
remove ternary operator and reduce branching by using step() and mix()
use vec3 for gain, make brightness a cheap mulitplication with max.

* shader: split up border to CM/noncm variants

splitup border shader to CM/noncm variant, move common used things to
border.glsl , there is room for optimisations here but its a complex
shader im putting it for future PR.

* shader: touchup blurfinish

make brightness a cheap multiplication instead of branching.
mod is redundant, fract in hash already returns a value in [0.0, 1.0]
2026-01-12 18:27:16 +01:00
zacoons
8f8b31e7a6
decoration: take desiredExtents on all sides into account (#12935) 2026-01-10 20:53:57 +01:00
John Mylchreest
5b1b79c29c
fix: handle fullscreen windows on special workspaces (#12851)
* fix: handle fullscreen windows on special workspaces

inFullscreenMode() only checked m_activeWorkspace, missing fullscreen
windows on special workspaces. This caused crashes and incorrect
behavior when fullscreen windows were on special workspaces.

Changes:
- inFullscreenMode() now checks special workspace first since it
  renders on top of regular workspaces
- Added getFullscreenWindow() helper to safely get fullscreen window
  from either active or special workspace
- Updated callers (shouldSkipScheduleFrameOnMouseEvent, Renderer,
  getFSImageDescription) to use the new helper
- Reset m_aboveFullscreen for layer surfaces when opening, closing,
  or stealing special workspaces between monitors

* test: add special workspace fullscreen detection tests

Add tests for the new special workspace fullscreen handling introduced
in the previous commit. The tests cover:

1. Fullscreen detection on special workspace - verifies that a window
   made fullscreen on a special workspace is correctly detected

2. Special workspace fullscreen precedence - verifies that when both
   regular and special workspaces have fullscreen windows, the special
   workspace window can be focused when the special workspace is opened

3. Toggle special workspace behavior - verifies that toggling the
   special workspace off properly hides it and returns focus to the
   regular workspace's fullscreen window

These tests exercise the key code paths modified in the fix:
- inFullscreenMode() checking special workspace first
- getFullscreenWindow() helper returning correct window
- Layer surface m_aboveFullscreen reset on special workspace toggle
2026-01-08 22:27:00 +01:00