summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.cpp
Commit message (Collapse)AuthorAgeFilesLines
* renderer: add an option to disable cm and auto-skip cm if not necessaryvaxerski2025-03-181-5/+10
| | | | | | fixes #9641 adds render:cm_enabled default true
* opengl: simplify cm pipelineVaxry2025-03-161-60/+53
| | | | | | fixes a few mistakes, and skips the CM shader in cpu instead of adding a costly branch ref #9641
* renderer: don't crash if cm fails to compileVaxry2025-03-141-45/+50
|
* syncobj: use eventfd instead of stalling fd checks (#9437)Tom Englund2025-03-141-47/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * syncobj: cleanup and use uniqueptrs cleanup a bit missing removals if resource not good, erasing from containers etc. make use of unique ptrs instead. and add default destructors. * syncobj: rework syncobj entirerly remove early buffer release that was breaking explicit sync, the buffer needs to exist until the surface commit event has been emitted and draw calls added egl sync points, move to eventfd signaling instead of stalling sync point checks, and recommit pending commits if waiting on a signal. add a CDRMSyncPointState helper class. move a few weak pointers to shared pointers so they dont destruct before we need to use them. * syncobj: queue pending states for eventfd eventfd requires us to queue pending stats until ready and then apply to current, and also when no ready state exist commit the client commit on the current existing buffer, if there is one. * syncobj: clear current buffer damage clear current buffer damage on current buffer commits. * syncobj: cleanup code and fix hyprlock remove unused code, and ensure we dont commit a empty texture causing locksession protocol and gtk4-layer-shell misbehaving. * syncobj: ensure buffers are cleaned up ensure the containers having the various buffers actually gets cleaned up from their containers, incase the CSignal isnt signaled because of expired smart pointers or just wrong order destruction because mishaps. also move the acquire/point setting to buffer attaching. instead of on precommit. * syncobj: remove unused code, optimize remove unused code and merge sync fds if fence is valid, remove manual directscanout buffer dropping that signals release point on pageflip, it can cause us to signal the release point while still keeping the current buffer and rendering it yet again causing wrong things. * syncobj: delay buffer release on non syncobj delay buffer releases on non syncobj surfaces until next commit, and check on async buffers if syncobj and drop and signal the release point on backend buffer release. * syncobj: ensure we follow protocol ensure we follow protocol by replacing acquire/release points if they arrive late and replace already existing ones. also remove unneded brackets, and dont try to manual lock/release buffers when it comes to explicit protocol. it doesnt care about buffer releases only about acquire and release points and signaling them. * syncobj: lets not complicate things set points in precommit, before checking protocol errors and we catch any pending acquire/release points arriving late. * syncobj: move SSurfaceState to types remove destructor resource destroying, let resources destroys them on their events, and move SSurfaceStates to types/SurfaceState.hpp * syncobj: actually store the merged fd have to actually store the mergedfd to use it. * syncobj: cleanup a bit around fences ensure the current asynchronous buffer is actually released on pageflip not the previous. cleanup a bit FD handling in commitPendingAndDoExplicitSync, and reuse the in fence when syncing surfaces. * syncobjs: ensure fence FD doesnt leak calling resetexplicitfence without properly ensuring the FD is closed before will leak it, store it per monitor and let it close itself with the CFileDescriptor class. * syncobj: ensure buffers are actually released buffers were never being sent released properly. * types: Defer buffer sync releaser until unlock * syncobj: store directscanout fence in monitor ensure the infence fd survives the scope of attemptdirectscanout so it doesnt close before it should have. * syncobj: check if if acquire is expired we might hit a race to finish on exit where the timeline just has destructed but the buffer waiter is still pending. and such we removeAllWaiters null dereferences. * syncobj: code style changes remove quack comment, change to m_foo and use a std::vector and weakpointer in the waiter for removal instead of a std::list. * syncobj: remove unused async buffer drop remove unused async buffer drop, only related to directscanout and is handled elsewhere. --------- Co-authored-by: Lee Bousfield <ljbousfield@gmail.com>
* renderer: add simple color management (#9506)UjinT342025-03-141-3/+95
| | | Adds proper color management and transformations for CM surfaces.
* hyprctl/config: fixup config descriptions, fill out missing ones, provide ↵Vaxry2025-02-251-9/+1
| | | | | | more data adds current and explicit, better parsing, and fixes missing / invalid ones
* core: add an ANR dialogVaxry2025-02-181-5/+11
| | | | | | for xdg-shell, we can ping the wm_base, and thus render an ANR dialog if an app dies for XWayland, there probably is a similar method, but I don't know about it and don't care.
* core: avoid .at() and use [] operator (#9347)Tom Englund2025-02-061-4/+4
| | | avoid .at() where it makes sense and use [] operator in loops.
* render: enforce framebuffer offloading and remove introspection toggle (#9217)nyx2025-01-311-137/+10
|
* core: begin using CFileDescriptor from hyprutils (#9122)Tom Englund2025-01-301-24/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * config: make fd use CFileDescriptor make use of the new hyprutils CFileDescriptor instead of manual FD handling. * hyprctl: make fd use CFileDescriptor make use of the new hyprutils CFileDescriptor instead of manual FD handling. * ikeyboard: make fd use CFileDescriptor make use of the new CFileDescriptor instead of manual FD handling, also in sendKeymap remove dead code, it already early returns if keyboard isnt valid, and dont try to close the FD that ikeyboard owns. * core: make SHMFile functions use CFileDescriptor make SHMFile misc functions use CFileDescriptor and its associated usage in dmabuf and keyboard. * core: make explicit sync use CFileDescriptor begin using CFileDescriptor in explicit sync and its timelines and eglsync usage in opengl, there is still a bit left with manual handling that requires future aquamarine change aswell. * eventmgr: make fd and sockets use CFileDescriptor make use of the hyprutils CFileDescriptor instead of manual FD and socket handling and closing. * eventloopmgr: make timerfd use CFileDescriptor make the timerfd use CFileDescriptor instead of manual fd handling * opengl: make gbm fd use CFileDescriptor make the gbm rendernode fd use CFileDescriptor instead of manual fd handling * core: make selection source/offer use CFileDescriptor make data selection source and offers use CFileDescriptor and its associated use in xwm and protocols * protocols: convert protocols fd to CFileDescriptor make most fd handling use CFileDescriptor in protocols * shm: make SHMPool use CfileDescriptor make SHMPool use CFileDescriptor instead of manual fd handling. * opengl: duplicate fd with CFileDescriptor duplicate fenceFD with CFileDescriptor duplicate instead. * xwayland: make sockets and fds use CFileDescriptor instead of manual opening/closing make sockets and fds use CFileDescriptor * keybindmgr: make sockets and fds use CFileDescriptor make sockets and fds use CFileDescriptor instead of manual handling.
* renderer: calculate UV using both pixel and monitor dimensions (#9210)nyx2025-01-291-5/+11
|
* renderer: fix funky cornersVaxry2025-01-261-4/+4
| | | | oopsie
* renderer/internal: stop using box pointersVaxry2025-01-261-97/+85
| | | | in favor of const refs
* opengl: use uv to avoid rendering the entire blurboxVaxry2025-01-231-4/+13
| | | | | | additionally can use smoothing for rounding fixes #9086
* protocols: add hyprland_surface_v1.set_visible_region implementation (#9120)outfoxxed2025-01-231-3/+14
|
* core: reserve vector sizes as much as we can (#9118)Tom Englund2025-01-191-3/+11
| | | | | avoid reallocations as much as possible with a few edge cases where the reservation overshoots a tiny bit. but a few bytes of memory short term is better used then the overhead of potential reallocation.
* core: cleanup header includes (#9088)user1111111111111111111111111111111112025-01-171-0/+3
| | | Cleanup some unneeded includes to speed up compilation
* renderer: unload background texture if it's disabledvaxerski2025-01-141-7/+14
| | | | ref #9031
* opengl: fix crash on null fb stencil opvaxerski2025-01-081-2/+5
|
* opengl: only allocate offMainFB on demandvaxerski2025-01-081-1/+9
| | | | These are not used by hyprland, only potentially plugins. No need to keep the VRAM allocated all the time
* core: move parts of the animation system to hyprutils (#8868)Maximilian Seidler2025-01-071-4/+4
| | | | | | | | | | | | | * core: change animation manager to use Hyprutils::Animation * config: move animation config to hyprutils animation tree * use g_pAnimationManager->createAnimation and the new PHLANIMVAR template * core: use CGenericAnimatedVariabled::{enabled,setConfig,getStyle} and adapt callbacks * core: adapt animated variable usage (dereference the shared pointer) * misc: bump CMakeLists to hyprutils 0.3.3
* renderer: Add supercircular window corners (#8943)Pollux2025-01-051-47/+59
| | | | | | | renderer: Add supercircular shadows and borders config: Add rounding_power to default and example configs rule: add `roundingpower` window rule
* groupbar: fix missing ellipsize for textvaxerski2025-01-041-1/+7
| | | | fixes #8938
* groupbar: unify title renderingvaxerski2025-01-021-2/+2
| | | | moves the text renderer to the unified opengl impl
* protocols: add hyprland_surface_v1 implementation (#8877)outfoxxed2025-01-011-3/+4
|
* Renderer: rewrite render scheduling (#8683)Vaxry2024-12-221-269/+53
| | | This rewrites renderer scheduling. Occlusion is now unified in a new Pass type.
* internal: Make static analysis more happy (#8767)Ikalco2024-12-191-1/+1
| | | | | | | | | * make functions used in 1 file static * fix invalid substr param -1 * give default initializer to borderGradier * move RASSERT from printf to std::print
* internal: remove dead code (#8748)Ikalco2024-12-171-7/+0
|
* opengl: fixup missed /4 in oklab parsingVaxry2024-12-161-1/+1
|
* opengl: fixup invalid ogl uniform readsVaxry2024-12-161-2/+3
|
* core: Add clang-tidy (#8664)Vaxry2024-12-071-12/+9
| | | | | This adds a .clang-tidy file for us. It's not a strict requirement to be compliant, but I tuned it to be alright.
* core: move colorspace handling to oklab (#8635)Vaxry2024-12-031-25/+132
| | | | | | | | | | | * Meson: add hyprgraphics * Nix: add hyprgraphics * CI/setup_base: get hyprgraphics-git --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* renderer: simplify blur enabling logicVaxry2024-11-171-3/+1
|
* renderer: don't rely on datarootdir for local shareVaxry2024-11-061-0/+1
|
* shadow: fix double premultiplicationVaxry2024-11-051-1/+1
| | | | shader takes straight alpha aaaa
* shadow: add sharp and refactor optionsVaxry2024-11-051-3/+3
| | | | options moved to decoration:shadow:
* renderer: safeguard against non-sampleable currentFB in blurMainFbVaxry2024-11-031-0/+5
| | | | fixes #8325
* renderer: improve api around new framebuffer changesVaxry2024-11-021-35/+40
| | | | ref #8325
* renderer: Add a missing texture asset and a user checkVaxry2024-11-011-44/+103
| | | | | | | | When an asset is missing, instead of a black screen, render an obnoxious, yet standard, missing texture. Additionally, warn the user assets failed to load. Shoutout to Arch for having their assets broken for months. Fix your shit. I am tired of it, and it's negatively impacting users.
* core: move internal structures to monitor pointers (#8266)Vaxry2024-10-271-6/+6
|
* internal: Move CMonitor to SP (#8178)Vaxry2024-10-191-11/+11
| | | | | * move monitors to sp * XD
* opengl: use GL_CLAMP_TO_EDGE instead of GL_CLAMPVaxry2024-10-051-2/+2
| | | | avoid error spam on select hw
* renderer: Fix resize artifacts (stretching, bumps) (#7499)Vaxry2024-10-051-0/+3
|
* opengl: remove debug logVaxry2024-09-261-2/+0
|
* Internal: move to Mat3x3 from hyprutils (#7902)Vaxry2024-09-251-82/+60
| | | | | | | | | * Meson: require hyprutils >= 0.2.3 * flake.lock: update hyprutils --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* xdg-dialog: implement new protocolVaxry2024-08-301-3/+2
|
* renderer: better lockscreen dead behavior (#7574)Vaxry2024-08-291-9/+110
| | | | | --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* misc: constify the remaining for loops (#7534)Tom Englund2024-08-261-27/+27
| | | now we roll loops at blazing constified speed.
* core: make most for loops use const references (#7527)Tom Englund2024-08-261-4/+4
| | | | why not let the compiler optimise things for us at hyprspeeds when we can.
* logs: Add file path to asset ERR log (#7336)davc0n2024-08-141-1/+1
|