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.
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>
* opengl: use EGLint and we dont have to cast data
use EGLint in the attrib array and we dont have to cast the resulting
data.
* opengl: add linear to correct vector
drop empty check, what if we get mods that isnt linear. then it wont be
added, also add it to the result vector that we actually return.
These are: pointer_shape from the cursor-shape-v1 protocol prepared for v2, along with left_ptr...bottom_right_corner and killing (Hyprland specific)
pointer_shape_previous with
pointer_switch_time to blend between shapes
pointer_size scaled size as used by the normal cursor
pointer_pressed_positions[32] with
pointer_pressed_times[32] and
pointer_pressed_killed(32 bits) for click/touch animations and if they killed something
pointer_inactive_timeout with
pointer_last_active to smoothly fade the pointer out
pointer_hidden to hide it when the cursor is hidden (excluding by cursor:invisible as this config value can be used to turn off the normal cursor, which is useful when drawing it with the screen shader)
setCapStatus is a a heavy used function in hot rendering paths, it
shows up in profiling as using a bit of cpu just because of
unordered_set hashing etc, move to a enum and array and cache only the
heavily used ones.
* syncobj: use rendernode for timelines
use rendernode for timelines instead of the drmfd, some devices dont
support to use the drmfd for this.
* opengl: use rendernode if available
use rendernode if available for CHyprOpenglImpl
* MesaDRM: use the m_drmRenderNodeFD if it exist
try use the rendernode we got from AQ if it exist.
* linuxdmabuf: use rendernode if available
use the rendernode if available already from AQ
* syncobj: prefer rendernode over displaynode
prefer the rendernode over the displaynode, and log a error if
attempting to use the protocol without explicit sync support on any of
the nodes.
* syncobj: check support on both nodes always
check support on both nodes always so it can be used later for
preferring rendernode if possible in syncobj protocol.
* syncobj: remove old var in non linux if else case
remove old m_bDrmSyncobjTimelineSupported from non linux if else case
that will fail to compile on non linux. the nodes sets support by
default to false, and if non linux it wont check for support and set it
to true.
* build: bump aq requirement
bump to 0.9.3 where rendernode support got added.
* flake.lock: update
* renderer: glfinish on software renderer
software renderers apparently bug out on implicit sync, use glfinish as
with nvidia case on implicit paths.
* flake.lock: update
---------
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
use a std::array instead of vector and avoid reallocations.
it should at most be 49 entries, so make the array 50. and RASSERT check
it incase more entries gets added in the future.
missing skipcm if case so the CM uniforms where never added on the
gradient2 renderBorder case, until the non gradient2 one had run atleast
once. causing it to not render on first launch/delayed.
* 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
the legacy renderer is broken and barely used, drop it.
* Nix: drop support for legacyRenderer
---------
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* opengl: remove unnecessery glflush calls
glflushing forces the driver to break batching and issue commands
prematurely and prevents optimisations like command reordering and
merging.
many glFunctions already internally glflushes and eglsync creation still
has a glflush at end render. so lets reduce the overhead of these calls.
* opengl: reduce glUseProgram calls
apitrace shows cases where the same program gets called multiple times,
add a helper function that keeps track of current program and only call
it once on same program. reduces slight overhead.
* opengl: use more efficient vertex array object
use a more modern vertex array object approach with the shaders, makes
it a onetime setup on shader creation instead of once per drawcall, also
should make the driver not have to revalidate the vertex format on each
call.