client: fix the composed desktop being rendered upside down
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Failing after 20s
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Failing after 34s
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Failing after 44s
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Failing after 27s
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 20s
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Failing after 22s
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Failing after 20s
build / module (push) Failing after 19s
build / host-linux (push) Failing after 21s
build / host-windows-cross (push) Failing after 21s
build / obs (clang) (push) Failing after 21s
build / docs (push) Failing after 13s
build / obs (gcc) (push) Failing after 20s
build / host-windows-native (push) Canceled after 0s
build / idd (push) Canceled after 0s
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Failing after 20s
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Failing after 34s
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Failing after 44s
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Failing after 27s
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 20s
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Failing after 22s
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Failing after 20s
build / module (push) Failing after 19s
build / host-linux (push) Failing after 21s
build / host-windows-cross (push) Failing after 21s
build / obs (clang) (push) Failing after 21s
build / docs (push) Failing after 13s
build / obs (gcc) (push) Failing after 20s
build / host-windows-native (push) Canceled after 0s
build / idd (push) Canceled after 0s
The composition pass flipped Y when writing into its framebuffer, but the desktop shader that samples it treats row 0 as the top, so the composed desktop reached the screen inverted. The layout metadata was correct throughout, which is why the geometry checks never caught it. Adds a rendering test that catches this class of bug: a synthetic host publishes three displays stacked vertically in the atlas but laid out in a row on the desktop, and the client is rendered into a virtual X server and sampled. Each display carries a marker in its top left corner, so an inverted or transposed composition fails even though the colours would otherwise land in the right places.
This commit is contained in:
1 parent
18c6326e35
commit
e35d51ea39
3 files changed
+413
-3
No files matched your search
@@ -18,9 +18,14 @@ 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);
|
||||
/* View pixels to clip space.
|
||||
*
|
||||
* Y is deliberately not flipped. This shader renders into a framebuffer
|
||||
* whose texture is then sampled by the desktop shader, which treats row 0
|
||||
* of the image as the top, matching the order rows arrive in the frame.
|
||||
* Writing clip Y directly keeps the composed texture in that same order;
|
||||
* flipping here would hand the next stage an upside down desktop. */
|
||||
gl_Position = vec4(vertex / viewSize * 2.0 - 1.0, 0.0, 1.0);
|
||||
|
||||
uv = texture / atlasSize;
|
||||
}
|
||||
Reference in new issue
Block a user