std::memcmp returns a nonzero value when the buffers differ, so
hdrMetadataEqual() returned true for differing metadata and false for
identical metadata. The caller in commitFrame compares
!hdrMetadataEqual(WANTED, CURRENT), which inverted this again: identical
HDR metadata was treated as changed every frame, re-sending
AQ_OUTPUT_STATE_HDR and forcing a full DRM modeset on every commit.
Fixes a per-frame modeset loop on displays with HDR metadata configured
(e.g. cm=hdredid).
Co-authored-by: neonvoidx <me@neonvoid.dev>
* shaders: make each SRC/DST TF a variant
by making each SRC/DS transferunction a variant we reduce the branching
and instruction count by up to 60%, measured with INTEL_DEBUG=fs,gs,vs
* opengl: cache activetex, blendfunc, VBO, FBO
this was about 9% of a 10 second apitrace capture of redundant gl calls
with same things over and over. just cache it like we do with other
things. because i dont trust the driver to even act accordingly.
* hyprctl(repl): go interactive if no Lua was given via args
The previous check would mess up if `-i` was provided, since it'd see
*an argument* and refuse to go interactive, even when it should've (i.e.
`hyprctl -i 0 repl`).
* ipc(socket1): new escape parsing for batch commands
Semicolons are still the command separator, so those have to be escaped
if they appear anywhere inside of commands (e.g. multi-statement Lua
code). Also, literal backslashes need to be escaped as well.
* tests(ipc): add test for hyprctl batch mode
This test case includes slightly weird stuff (semicolons in Lua code;
square brackets) that would break the old parsing logic.
* format: dang braces
Compare the metadata we would send against what is already committed and
send if there is any difference.
Found this testing whether MaxCLL influences in-panel tonemapping.
setHDRMetadata was only called when the monitor entered or left HDR or
in some cases surrounding direct scanout. Changes to the metadata itself
while the monitor stayed in HDR was computed and stored in the image
description, but never sent.
This particularly effects mastering data and min/max/max_avg luminance
changes.
Signed-off-by: Will Temple <will@wtemple.net>
the clear was scissored to m_renderData.damage while we fakeDamaged full
monitor. so in render pass when m_blurFBShouldRender is hit the FB was
cleared over partial damage but rendered over whole monitor causing
stale blur blends into the new outside damage. so save old damage,
render fakeDamage, restore old damage.
invalidate({GL_DEPTH_STENCIL_ATTACHMENT}) at end of
renderTextureWithBlurInternal cant set m_cleared = false because its not
invalidated the COLOR_ATTACHMENT, so guard invalidate.
* Fix group members not having uniform size when FSed
* fix the same bug - but for scrolling
* format
* fix include
* ditto
* groups are evil
* format
* TEST - Default handled FS -- tested in dwindle
Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>
* TEST - Default handled FS -- tested in scrolling
Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>
* TEST - layout handled FS -- Scrolling
Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>
* format and comment fix
* spelling is hard
* slight fix for posterity
* spelling is very hard
* thankyouclangdverycool
* revert change that made all windows in a group show up as FS in hyprctl clients
* change test to reflect the reversion
* mirror mirror can you tell me who forgot to revert that change after it was redundant?
* tribute to the magic mirror
* clean up includes
* format
* Hope is the first step on the road to disappointment
Fix tests failing
---------
Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>
we cant drop dmabuf damage until we have actually hit a frame that reads
it, otherwise clients like firefox attaches a buffer with damage,
eventually sends a .frame() and .commit() then we clear the damage and
the render has nothing to use.
* lua: make HLMonitor:set_workspace "silent" (no focus or mouse move)
* lua: report correct function name when HLMonitor:set_special_workspace errors
* monitor: allow setting special workspace on monitor without focusing that monitor
* lua: make HLMonitor:set_special_workspace also "silent"
* workspace: support not carrying focus with us in moveWorkspaceToMonitor
This leaves focus on the same monitor, rather than carrying it along
with the moved workspace as usual.
* lua: fix HLMonitor:set_workspace placing the same WS on different monitors
I thought this was already handled for me; apparently not.
* lua: support creating new workspaces via HLMonitor:set_workspace(), set_special_workspace()
* monitor: don't send workspace events on non-focusing workspace change
* lua: better handle (non-)?special selectors in HLMonitor:set_workspace(), set_special_workspace()
Both now check that they're given a workspace of the appropriate
special-ness.
* lua: don't require a table arg for HLMonitor:set_workspace(), set_special_workspace()
Also, names given to `set_special_workspace()` no longer require a
`special:` prefix, matching the toggle_special dispatcher's behavior.
* misc: allow getting workspaces relative to a given monitor
Not just the currently focused one.
* lua: reference targeted monitor for relative WS selectors in set_workspace()
Now, e.g. `m+1` selects the next workspace on the *targeted* monitor,
rather than on the focused monitor.
* tests: HLMonitor:set_workspace() behavior
* tests: HLMonitor:set_special_workspace() behavior
* tests: don't force unnecessary refreshes in luaGetWorkspace test
* lua: return workspace name as selector for special workspaces
Previously this would be the ID, which was negative and would then be
interpreted later as a *relative* ID. Normal workspaces can still return
their (positive) IDs, that's fine.
* monitor: properly leave focus behind when stealing a special workspace
if we dont reset surface metadata, the monitor is stuck in using the
surfaces metadata, and doesnt restore back ours. meaning after DS and
gaming and returning, colors stay stuck fringed until a new metadata
modeset.
however this causes a modeset on returning that isnt wanted if a
notification temporarly shows and vanishes. but a future PR in perhaps
using a timer if DS reenters in a short bit we dont care about the notif
fringing?
better then leaving the monitor permanently wrong colors.
* lua: include Lua's error code in eval/repl error responses
* hyprctl: let interactive repl handle multiline input
repl with a simple command (i.e. Lua code provided as a hyprctl arg)
handles multiline input just fine already, but interactive didn't. This
uses the Lua repl's own approach of trying to execute, and letting the
user continue if the exec attempt returns an "unexpected EOF"-type
syntax error. It's a little clunky, but if it's fine for them, it should
be fine for us.
Ref: 7579fc9d7e/lua.c (L569-L582)
* hyprctl: append full multiline command to repl history
* fix format :(
* lua: fix crash on print with no args
Co-authored-by: Dregu <dregu@dreg.us>
---------
Co-authored-by: Dregu <dregu@dreg.us>