mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-02 05:12:02 +00:00
[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:
@@ -36,6 +36,19 @@ add_feature_info(ENABLE_EGL ENABLE_EGL "EGL renderer.")
|
||||
option(ENABLE_TEST_TRANSPORT "Enable the test transport" OFF)
|
||||
add_feature_info(ENABLE_TEST_TRANSPORT ENABLE_TEST_TRANSPORT
|
||||
"Synthetic frames for graphics-pipeline validation.")
|
||||
if(ENABLE_TEST_TRANSPORT)
|
||||
add_definitions(-D ENABLE_TEST_TRANSPORT)
|
||||
endif()
|
||||
|
||||
option(ENABLE_RENDER_TESTS "Build framebuffer rendering integration tests" OFF)
|
||||
add_feature_info(ENABLE_RENDER_TESTS ENABLE_RENDER_TESTS
|
||||
"Pixel-accurate EGL rendering tests using the test transport.")
|
||||
if(ENABLE_RENDER_TESTS AND NOT ENABLE_TEST_TRANSPORT)
|
||||
message(FATAL_ERROR "ENABLE_RENDER_TESTS requires ENABLE_TEST_TRANSPORT")
|
||||
endif()
|
||||
if(ENABLE_RENDER_TESTS AND NOT ENABLE_EGL)
|
||||
message(FATAL_ERROR "ENABLE_RENDER_TESTS requires ENABLE_EGL")
|
||||
endif()
|
||||
|
||||
option(ENABLE_BACKTRACE "Enable backtrace support on crash" ON)
|
||||
add_feature_info(ENABLE_BACKTRACE ENABLE_BACKTRACE "Backtrace support.")
|
||||
@@ -205,6 +218,12 @@ target_link_libraries(looking-glass-client
|
||||
cimgui
|
||||
)
|
||||
|
||||
if(ENABLE_RENDER_TESTS)
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
if (ENABLE_PIPEWIRE OR ENABLE_PULSEAUDIO)
|
||||
add_definitions(-D ENABLE_AUDIO)
|
||||
add_subdirectory(audiodevs)
|
||||
|
||||
Reference in New Issue
Block a user