[client] tests: add framebuffer rendering validation

Add an optional EGL framebuffer capture path for the test transport.
Capture the fully composed frame before presentation and retain its
surface format and HDR state for validation.

Add GoogleTest integration tests which run the production client
under a headless Weston compositor and compare every output pixel
against an independent reference implementation.

The matrix covers BGRA, RGBA, BGR32, RGB24, PQ RGBA10 and scRGB
RGBA16F with full, moving, overlapping, maximum-count, invalid, null
and zero-area damage rectangles. Validate HDR-to-SDR conversion and
native HDR output metadata when supported by the compositor.

Keep tests opt-in through ENABLE_RENDER_TESTS and document how to run
the software and native HDR tiers.
This commit is contained in:
Geoffrey McRae
2026-07-30 14:53:38 +10:00
parent a1fc3d20d3
commit 74ae4f543e
11 changed files with 1172 additions and 6 deletions

View File

@@ -236,3 +236,47 @@ jobs:
run: |
cd doc
make dirhtml SPHINXOPTS='-b spelling -W' -j$(nproc)
render-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install \
weston libgtest-dev libgl1-mesa-dri \
libdw-dev libunwind-dev \
libspice-protocol-dev nettle-dev \
libgl-dev libgles-dev \
libx11-dev libxss-dev libxi-dev libxinerama-dev \
libxcursor-dev libxpresent-dev \
libwayland-dev libxkbcommon-dev libfontconfig-dev \
libsamplerate0-dev libpipewire-0.3-dev libpulse-dev
- name: Configure
run: |
cmake -S client -B client/build-render-tests \
-DOPTIMIZE_FOR_NATIVE=OFF \
-DENABLE_LIBDECOR=OFF \
-DENABLE_TEST_TRANSPORT=ON \
-DENABLE_RENDER_TESTS=ON
- name: Build
run: cmake --build client/build-render-tests --parallel
- name: Run rendering matrix
run: |
ctest --test-dir client/build-render-tests \
--output-on-failure \
-R looking-glass-render-tests
- name: Upload failed captures
if: failure()
uses: actions/upload-artifact@v4
with:
name: render-test-failures
path: /tmp/lg-render-case.*