summaryrefslogtreecommitdiff
path: root/src/render
Commit message (Collapse)AuthorAgeFilesLines
* opengl: add debug:gl_debugging (#13183)Tom Englund2026-02-061-5/+10
| | | | | | | | | | | | | 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
* decorations/border: fix damage scheduling after #12665Vaxry2026-02-051-1/+1
|
* monitor: fix DS deactivation (#13188)UjinT342026-02-041-1/+3
|
* renderer: fix screen export back to srgb (#13148)UjinT342026-02-021-21/+23
|
* renderer/pass: fix surface opaque region bounds used in occluding (#13124)jmanc32026-01-311-1/+10
|
* renderer: fix mouse motion in VRR (#12665)Szwagi2026-01-312-27/+27
|
* opengl: set EGL_CONTEXT_RELEASE_BEHAVIOR_KHR if supported (#13114)Tom Englund2026-01-302-0/+8
| | | | | | | | | 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.
* opengl: allow texture filter to be changed (#13078)jmanc32026-01-272-4/+7
| | | | | | | | | | | * opengl: allow texture filter to be changed * format * correct filter * Moved from OpenGL.hpp to Texture.hpp * Shortened names
* opengl/fb: use GL_DEPTH24_STENCIL8 instead of GL_STENCIL_INDEX8 (#13067)Tom Englund2026-01-231-4/+10
| | | | older drivers lack support for GL_STENCIL_INDEX8 so use GL_DEPTH24_STENCIL8 but explicitly disable the depth.
* renderer: fix frame sync (#13061)UjinT342026-01-221-37/+37
| | | | | | | | | * fix commit timing timer * fix surface state lock/unlock * debug state sync todos * debug solitary vrr
* renderer: add surface shader variants with less branching and uniforms (#13030)UjinT342026-01-2127-414/+273
| | | | | | | | | * shader variant features * getSurfaceShader variant with feats * split surface shaders by features * cleanup old shaders
* renderer: fix non shader cm reset (#13027)UjinT342026-01-211-1/+1
|
* renderer: optimise shader usage further, split shaders and add more caching ↵Tom Englund2026-01-1711-96/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#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>
* core: optimize some common branchesVaxry2026-01-162-20/+20
|
* protocols/cm: Fix image description info events (#12781)UjinT342026-01-132-7/+5
| | | | | | | | | | | | | | | | | | | | | | | * 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
* shm: ensure we use right gl unpack alignment (#12975)Tom Englund2026-01-131-2/+23
| | | | | | | | 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.
* renderer: shader code refactor (#12926)Tom Englund2026-01-1214-790/+832
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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]
* decoration: take desiredExtents on all sides into account (#12935)zacoons2026-01-101-15/+15
|
* fix: handle fullscreen windows on special workspaces (#12851)John Mylchreest2026-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* renderer/gl: add internal gl formats and reduce internal driver format ↵Tom Englund2026-01-076-24/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conversions (#12879) * format: add internal formats for drm formats cross referenced with weston and added internal formats and types for a lot of missing ones. also added a isFormatYUV helper. * framebuffer: ensure we use right internalformat ensure we use the right internal format to avoid internal driver blitting, also since we only attach the GL_STENCIL_ATTACHMENT we might just aswell only use the GL_STENCIL_INDEX8 to not confuse drivers that we want a depth aswell. * texture: use external on yuv or non linear mods using external makes us use the gpu's internal detiler. and this is makes intel a lot happier then having to format convert it to a linear format internally. * shaders: add external support to CM frag add external support to CM frag, and correct ext.frag typo. * formats: remove duplicates and fix a typo in cm.frag remove duplicate formats and a typo in cm.frag * formats: add swizzle logic to all formats add swizzle logic from weston for all formats and use it in shm texture paths. * format: more format changes use monitor drm format instead of forcing something different. * shader: remove external from cm.frag drivers want this resolved at compiletime cant use both samplerExternalOES and sampler2d and then runtime branch it. * screencopy: swizzle textures in screencopy swizzle textures in screencopy, to get the right colors when copying. * screencopy: restore old behaviour try restore old behaviour before the gles3 format changes. glReadPixels had the wrong format, so i went to far trying to mitigate it. should be like before now.
* groupbar: added group:groupbar:text_padding (#12818)wbg2026-01-071-6/+8
| | | Co-authored-by: Roman Weinberger // ACL <roman.weinberger@acl.at>
* renderer/opengl: invalidate intermediate FBs post render, avoid stencil if ↵Vaxry2026-01-053-57/+46
| | | | possible (#12848)
* framebuffer: revert viewport (#12842)Tom Englund2026-01-041-1/+1
| | | | to much stuff are relying on the viewport being set like this, just revert it to not regress further. this needs a overhaul.
* renderer/fb: dont forget to set m_drmFormat (#12833)Tom Englund2026-01-031-1/+2
| | | | fab3370 accidently removed the setting of m_drmFormat, causing it to think format changed on each alloc.
* renderer: minor framebuffer and renderbuffer changes (#12831)Tom Englund2026-01-033-19/+12
| | | | | | | | | | | | | | | | | | | | | * framebuffer: dont release if format or size changes we dont have to release and recreate both the texture and framebuffer if size or format changes, we can just bind the texture and call glTexImage2D with the new format and size. * framebuffer: set the alloced viewport size if monitor size mismatch with the allocated m_size its going to set a mismatched viewport and cause rendering issues. and if they are mismatching there is a missing alloc call. * renderbuffer: cleanup unneded binds the renderbuffer is attached to the fbo and trying to rebind it in bind() is causing unnecessery state changes, just bind the fbo. add safeguard in the destructor, the constructor can return early on failure and leave m_rbo empty or m_image as EGL_NO_IMAGE_KHR.
* opengl: properly combine transforms in renderTextureVaxry2025-12-271-4/+5
| | | | ref #12666
* render/cm: various updates, remove old protocols (#12693)UjinT342025-12-274-53/+59
| | | | | | | | | | | | | * fix named primaries * default to gamma22 * mark mastering primaries as supported * remove xx-cm and frog support * immutable primaries and image descriptions * clang-format
* rules/windowRuleApplicator: fix min/max size effects (#12491)Vaxry2025-12-272-25/+25
| | | fixes #12412
* tablet: added option to hide cursor (#12525)fuyu1472025-12-192-2/+9
|
* debug: move to hyprutils' logger (#12673)Vaxry2025-12-188-123/+126
|
* renderer: add zoom with detached camera (#12548)jmanc32025-12-141-15/+3
|
* cm: handle CM for SDR content with cm=hdr, cm_sdr_eotf=2 (#12127)Dominick DiMaggio2025-12-111-1/+3
|
* desktop/view: use aliveAndVisible for most things (#12631)Vaxry2025-12-111-4/+5
|
* opengl: default initialize m_capStatus (#12619)Tom Englund2025-12-111-1/+1
| | | | | | | ubsan reports under wonky situation a runtime error of uninitialized value lookups because of m_capStatus isnt initialized. so default initialize it. OpenGL.cpp:3331:26: runtime error: load of value 190, which is not a valid value for type 'bool'
* desktop: cleanup, unify desktop elements as views (#12563)Vaxry2025-12-0810-100/+84
|
* renderer/cm: make needsHDRupdate per-monitor state (#12564)byddha2025-12-071-6/+4
| | | Co-authored-by: drzbida <55928036+drzbida@users.noreply.github.com>
* renderer/cm: higher-quality tonemapping (#12204)Dominick DiMaggio2025-12-074-25/+32
|
* renderer: avoid crash on arrangeLayers for an empty monVaxry2025-12-061-1/+1
|
* desktop: rewrite reserved area handling + improve tests (#12383)Vaxry2025-12-051-30/+5
|
* renderer: remove unnecessary assert from renderRoundedShadow (#12540)jmanc32025-12-041-1/+0
|
* renderer: fix uv sufrace calc with scales < 1 (#12481)EvilLary2025-11-291-1/+1
|
* compositor: Configurable behavior when window to be focused conflicts with ↵Nikolai Nechaev2025-11-254-17/+21
| | | | | | | | | | fullscreen (#12033) 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.
* renderer: stop looping over null texture surfaces (#12446)Vaxry2025-11-241-2/+46
| | | fixes #12445
* animation: improve animations on multi refresh rate monitors (#12418)bea4dev2025-11-231-0/+3
|
* renderer: fix render_unfocusedVaxry2025-11-211-0/+7
|
* windowrules: rewrite completely (#12269)Vaxry2025-11-175-30/+31
| | | | | | | Reworks the window rule syntax completely --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* groupbar: fix rounding logic for edge cases (#12366)Jochim2025-11-171-7/+9
|
* renderer: fix fractional scale artifacts (#12287)bea4dev2025-11-161-2/+6
|
* i18n: init localization for ANR, Permissions and Notifications (#12316)Vaxry2025-11-162-2/+5
| | | | | | | | Adds localization support for en, it, pl and jp --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net> Co-authored-by: Aaron Blasko <blaskoazzolaaaron@gmail.com>
* deco/groupbar: add groupbar blur (#12310)Jochim2025-11-161-37/+24
|