[client] egl: make native HDR encoding-safe

Request true floating-point EGL configs for scRGB and expose the native
encodings supported by the selected surface. Fall back to software HDR
mapping when the surface cannot represent the incoming wire format.

Resample PQ in linear light, keep SDR-only effects out of native PQ
chains, and consume the cursor-specific white level without changing
binary monochrome cursor mask operations.
This commit is contained in:
Geoffrey McRae
2026-07-19 04:42:30 +10:00
parent 20225f05d1
commit 70b795c5ba
10 changed files with 160 additions and 42 deletions

View File

@@ -52,7 +52,9 @@ LG_RendererParams;
typedef enum LG_RendererSupport
{
LG_SUPPORTS_DMABUF
LG_SUPPORTS_DMABUF,
LG_SUPPORTS_HDR_PQ,
LG_SUPPORTS_HDR_SCRGB
}
LG_RendererSupport;
@@ -163,6 +165,10 @@ typedef struct LG_RendererOps
void (*onMouseColorTransform)(LG_Renderer * renderer,
const KVMFRColorTransform * transform);
/* updates the cursor-specific SDR white level reported by IddCx
* Context: cursorThread */
void (*onMouseWhiteLevel)(LG_Renderer * renderer, uint32_t sdrWhiteLevel);
/* called when the mouse has moved or changed visibillity
* Context: cursorThread */
bool (*onMouseEvent)(LG_Renderer * renderer, const bool visible, int x, int y,