Files
looking-glass-2/client/renderers/EGL/shader/compose.vert
T
donny dfe8edfbc2
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Failing after 27s
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Failing after 28s
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Failing after 28s
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Failing after 21s
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Failing after 20s
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Failing after 21s
build / module (push) Failing after 16s
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Failing after 19s
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Failing after 20s
build / host-linux (push) Failing after 19s
build / host-windows-cross (push) Failing after 17s
build / obs (clang) (push) Failing after 18s
build / docs (push) Failing after 7s
build / obs (gcc) (push) Failing after 20s
build / host-windows-native (push) Canceled after 0s
build / idd (push) Canceled after 0s
Add multi-monitor support via packed atlas frames
Capture every guest display into a single frame and compose it back into
the guest's desktop on the client, so one Looking Glass session can carry
a multi-monitor guest instead of one instance per display.

KVMFR gains a per-frame display layout (version 24). A frame with
displayCount == 0 is a conventional single-display frame and behaves
exactly as before, so existing capture backends are unaffected.

- common: shared display layout and a shelf packer that minimises atlas
  area, plus atlas/desktop coordinate mapping helpers and unit tests
- host: capture interface and host app carry the layout; a layout change
  invalidates the format so clients re-read it
- host/XCB: enumerate RandR monitors and repack the root window into the
  atlas directly in shared memory
- client/EGL: compose the atlas into the presented view as its own pass,
  leaving post processing, HDR, cursor and damage handling unchanged

Also fixes the XCB backend writing a single row per frame instead of the
whole image.
2026-07-28 07:06:32 +00:00

27 lines
765 B
GLSL

#version 300 es
precision highp float;
/* Composes a packed multi-display atlas into the guest's virtual desktop.
*
* Unlike the desktop shader, the texture coordinate is supplied per vertex
* rather than derived from the position: a display's place in the atlas has
* nothing to do with its place on the desktop, so the two cannot be tied
* together. */
layout(location = 0) in vec2 vertex; // position in view pixels
layout(location = 1) in vec2 texture; // source position in atlas pixels
out vec2 uv;
uniform vec2 viewSize;
uniform vec2 atlasSize;
void main()
{
// view pixels -> clip space, with the origin at the top left
vec2 pos = vertex / viewSize * 2.0 - 1.0;
gl_Position = vec4(pos.x, -pos.y, 0.0, 1.0);
uv = texture / atlasSize;
}