summaryrefslogtreecommitdiff
path: root/src/render/Framebuffer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* refactor: Use new hyprutils casts (#11377)Kamikadze2025-08-141-1/+1
|
* renderer: reduce a lot of glcalls and cache various states (#10757)Tom Englund2025-06-251-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * opengl: cache viewport state according to nvidia docs calling glViewPort unnecessarily on the same already set viewport is wasteful and can cause state changes when not needed. cache it in a struct and only call it when the viewport is actually changing. * opengl: cache glenable/gldisable state avoid making multiple glenable/gldisable calls on already set caps, can cause state changes and incur driver overhead. * opengl: cache glscissor box only call glscissor if the box actually has changed, try to avoid state changes. * opengl: cache gluniform calls cache the gluniform calls, the uniform values are cached in driver per program only the drawcalls setting the uniform yet again with the same value on same location is causing more overhead then caching it ourself and just no oping on it if no changes. * shader: rewrite handling of uniforms and state this is way faster as we don't need to mess with maps (hashing, etc) and instead can just use an array * opengl: stuff and 300 shaders * opengl: typo * opengl: get the uniform locations properly now that the legacy shaders are gone get the uniformlocations for SKIP_CM etc, so they can be properly set and used depending on if cm_enabled is set to false or true, before it was falling back to a legacy shader that didnt even have those uniforms. * opengl: check epsilon on float and remove extra glcall seems an extra unset glcall was added, remove it. and check the float epsilon on the glfloat. * opengl: remove instanced shader draw remove the instanced boolean from the vertex shader, might be neglible differences, needs more benchmark/work to see if its even worth it. * texture: cache texture paramaters parameters where occasionally set twice or more on same texture, short version wrap it and cache it. and move gpu churn to cpu churn. add a bind/unbind to texture aswell. * texture: use fast std::array caching cache the texparameter values in fast array lookups and incase we dont want it cached, apply it anyways. * shader: fix typo and hdr typo actually use Matrix4x2fv in the 4x2fv cache function, and send the proper float array for hdr. * texture: make caching not linear lookup make caching of texture params not linear. * minor style changes * opengl: revert drawarrays revert the mostly code style reduce loc change of drawarrays, and focus on the caching. its a if else case going wrong here breaking blur/contrast amongst others drawing. --------- Co-authored-by: Vaxry <vaxry@vaxry.net>
* core: drop the legacy renderer (#10408)Tom Englund2025-05-151-14/+0
| | | | | | | | | | | * core: drop the legacy renderer the legacy renderer is broken and barely used, drop it. * Nix: drop support for legacyRenderer --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* renderer: always render snapshots as 8bitvaxerski2025-05-091-0/+5
| | | | fixes issues with transparent windows on 10b
* render: refactor class member vars (#10292)davc0n2025-05-051-36/+36
| | | | | * render: refactor class member vars * render: fix clang format
* helpers: refactor class member vars (#10218)davc0n2025-04-301-1/+1
|
* framebuffer: Fix framebuffer size check (#10068)psyvern2025-04-131-1/+1
|
* renderer: various fixes towards improving gpu calls robustness (#9188)Tom Englund2025-02-081-26/+30
| | | | | | | | | | | | | | ensure framebuffer textures are detached and deleted, avoid leaving framebuffers bound when not needed * render: avoid calling glDeleteProgram on no program its safe to do so but it adds a bunch of unnecessery lines in apitrace when tracing. if guard it and return early. * opengl: ensure texture and buffers are unbound ensure bound buffers are unbound after use, also detach textures from framebuffer before deleting it otherwise it will become dangling and essentially leak.
* core: Add clang-tidy (#8664)Vaxry2024-12-071-5/+5
| | | | | This adds a .clang-tidy file for us. It's not a strict requirement to be compliant, but I tuned it to be alright.
* renderer: safeguard against non-sampleable currentFB in blurMainFbVaxry2024-11-031-0/+6
| | | | fixes #8325
* renderer: improve api around new framebuffer changesVaxry2024-11-021-3/+16
| | | | ref #8325
* renderer: Add a missing texture asset and a user checkVaxry2024-11-011-4/+11
| | | | | | | | 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.
* internal: introduce new types to avoid unsigned int rollover and signed int ↵Tom Englund2024-08-081-5/+6
| | | | | | | | | | | | | | | | | | | | overflow (#7216) * framebuffer: avoid gluint overflow GLuint was being initialized to -1 and rolling over to unsigned int max, its defined behaviour but very unnecessery. add a bool and use it for checking if allocated or not. * opengl: avoid gluint rollover -1 rolls over to unsigned int max, use 0xFF instead. * core: big uint64_t to int type conversion there were a few uint64_t to int implicit conversions overflowing int and causing UB, make all monitor/workspaces/windows use the new typedefs. also fix the various related 64 to 32 implicit conversions going around found with -Wshorten-64-to-32
* wayland/core: move to new impl (#6268)Vaxry2024-06-081-13/+14
| | | | | * wayland/core/dmabuf: move to new impl it's the final countdown
* opengl: log framebuffer errorsVaxry2024-04-031-1/+1
|
* framebuffer: ignore addStencil on legacyRendererVaxry2023-12-051-0/+3
| | | | ref #4044
* screencopy: fix shm exports with 10-bitVaxry2023-12-011-7/+1
| | | | fixes #4019
* renderer: Move to a full Hyprland GL rendering pipeline (#3920)Vaxry2023-11-241-0/+15
| | | Also updates wlroots
* renderer: fix legacy_renderer build (#3732)pastalian2023-11-031-1/+7
| | | | In GLES2, `GL_RGB10_A2` and `GL_UNSIGNED_INT_2_10_10_10_REV` are defined as `GL_RGB10_A2_EXT` and `GL_UNSIGNED_INT_2_10_10_10_REV_EXT` respectively.
* renderer: properly pass 10-bit formats to openglVaxry2023-10-301-2/+5
|
* internal: Formatter rework (#3186)Vaxry2023-09-061-3/+3
|
* opengl: cleanup framebuffer stylevaxerski2023-08-291-4/+2
|
* renderer: cleanup old redundancies in CFramebuffervaxerski2023-07-291-3/+3
|
* Added clang format (#1239)Vaxry2022-12-161-9/+9
| | | * clang-format stuff and format files
* Added resize transitionsvaxerski2022-11-061-1/+4
|
* guard primaryFB tex in end()vaxerski2022-10-281-0/+1
|
* Remove trailing whitespace.Felix Dick2022-09-251-2/+2
|
* guard invalid FB allocsvaxerski2022-09-181-0/+1
|
* Fix VRAM memory leak when releasing snapshotsvaxerski2022-07-121-9/+9
|
* What the fuck is going on with git, fix the entire scaling mergevaxerski2022-05-181-1/+1
| | | | This reverts commit 5b15d3b4f43e816b8ff9feefb2e331beebe7e0e1.
* Revert "Merge pull request #88 from vaxerski/scaling"vaxerski2022-05-181-1/+1
| | | | | This reverts commit f68ddc382a2b009dc19491277f6328addcdb8336, reversing changes made to ba573a529afdbf368aa632cf70b41c9a0595578b.
* fixed blur and shitvaxerski2022-05-161-1/+1
|
* oops, fixed regular renderervaxerski2022-04-131-0/+1
|
* Added legacy GLES2 renderer optionvaxerski2022-04-131-1/+7
|
* fixed blur rendering, stencil and gles3vaxerski2022-04-111-0/+11
|
* Rendering now to a HyprFramebuffervaxerski2022-04-091-1/+1
|
* fadeout done 🎉vaxerski2022-04-051-0/+62