Hyprland/src/render
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
..
decorations decoration: take desiredExtents on all sides into account (#12935) 2026-01-10 20:53:57 +01:00
pass debug: move to hyprutils' logger (#12673) 2025-12-18 17:23:24 +00:00
shaders/glsl renderer: optimise shader usage further, split shaders and add more caching (#12992) 2026-01-17 15:31:19 +01:00
AsyncResourceGatherer.hpp renderer: asynchronously load background tex (#11749) 2025-09-18 22:10:30 +02:00
Framebuffer.cpp renderer/gl: add internal gl formats and reduce internal driver format conversions (#12879) 2026-01-07 19:53:42 +01:00
Framebuffer.hpp renderer/gl: add internal gl formats and reduce internal driver format conversions (#12879) 2026-01-07 19:53:42 +01:00
OpenGL.cpp renderer: optimise shader usage further, split shaders and add more caching (#12992) 2026-01-17 15:31:19 +01:00
OpenGL.hpp renderer: optimise shader usage further, split shaders and add more caching (#12992) 2026-01-17 15:31:19 +01:00
Renderbuffer.cpp renderer: minor framebuffer and renderbuffer changes (#12831) 2026-01-03 15:13:01 +01:00
Renderbuffer.hpp renderer: minor framebuffer and renderbuffer changes (#12831) 2026-01-03 15:13:01 +01:00
Renderer.cpp core: optimize some common branches 2026-01-16 16:40:48 +01:00
Renderer.hpp tablet: added option to hide cursor (#12525) 2025-12-19 16:14:22 +00:00
Shader.cpp renderer: optimise shader usage further, split shaders and add more caching (#12992) 2026-01-17 15:31:19 +01:00
Shader.hpp renderer: optimise shader usage further, split shaders and add more caching (#12992) 2026-01-17 15:31:19 +01:00
Texture.cpp shm: ensure we use right gl unpack alignment (#12975) 2026-01-13 16:42:31 +01:00
Texture.hpp renderer/gl: add internal gl formats and reduce internal driver format conversions (#12879) 2026-01-07 19:53:42 +01:00
Transformer.cpp Renderer: rewrite render scheduling (#8683) 2024-12-22 17:12:09 +01:00
Transformer.hpp Renderer: rewrite render scheduling (#8683) 2024-12-22 17:12:09 +01:00