mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-22 07:12:04 +00:00
[client] egl: fix SPICE video rendering to a HDR surface
If the last state had HDR enabled, the spice video surface was being rendered as HDR even though the SPICE video content is SDR. This corrects this.
This commit is contained in:
@@ -464,12 +464,13 @@ bool egl_desktopRender(EGL_Desktop * desktop, unsigned int outputWidth,
|
||||
egl_desktopRectsUpdate(desktop->mesh, rects, width, height);
|
||||
|
||||
*fullFrame = false;
|
||||
const bool hdr = desktop->hdr && !desktop->useSpice;
|
||||
const bool processFrame = atomic_exchange(&desktop->processFrame, false) ||
|
||||
egl_postProcessConfigModified(desktop->pp);
|
||||
if (processFrame &&
|
||||
egl_postProcessRun(desktop->pp, tex, desktop->mesh,
|
||||
width, height, outputWidth, outputHeight, dma,
|
||||
desktop->hdr && desktop->hdrPQ) &&
|
||||
hdr && desktop->hdrPQ) &&
|
||||
egl_postProcessNeedsFullFrame(desktop->pp))
|
||||
{
|
||||
/* The filter output may have changed everywhere, but this only applies to
|
||||
@@ -529,7 +530,7 @@ bool egl_desktopRender(EGL_Desktop * desktop, unsigned int outputWidth,
|
||||
egl_uniformMatrix3x2fv(shader->uTransform , 1, GL_FALSE, desktop->matrix);
|
||||
egl_uniform1f (shader->uNVGain , desktop->nvGain);
|
||||
egl_uniform1i (shader->uCBMode , desktop->cbMode);
|
||||
egl_uniform1i (shader->uIsHDR , desktop->hdr);
|
||||
egl_uniform1i (shader->uIsHDR , hdr);
|
||||
egl_uniform1i (shader->uMapHDRtoSDR, desktop->mapHDRtoSDR && !desktop->nativeHDR);
|
||||
egl_uniform1f (shader->uMapHDRGain , mapHDRGain);
|
||||
egl_uniform1i (shader->uMapHDRPQ , desktop->hdrPQ);
|
||||
|
||||
Reference in New Issue
Block a user