From a852461c7d29f80739385b9175825b9f0af6e8fb Mon Sep 17 00:00:00 2001 From: UjinT34 <41110182+UjinT34@users.noreply.github.com> Date: Mon, 24 Mar 2025 15:56:07 +0300 Subject: renderer: Simplify and fix hdr metadata setting (#9706) * simplify and fix hdr metadata setting * keep incorrect(?) cm skip till #9600 --- src/render/OpenGL.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/render/OpenGL.cpp') diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 6f148ba9..c12db0a3 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -1382,9 +1382,9 @@ void CHyprOpenGLImpl::renderTextureInternalWithDamage(SP tex, const CB const auto imageDescription = m_RenderData.surface.valid() && m_RenderData.surface->colorManagement.valid() ? m_RenderData.surface->colorManagement->imageDescription() : SImageDescription{}; - const bool skipCM = !*PENABLECM /* CM disabled by the user */ - || !m_RenderData.surface /* No surface - no point in CM */ - || !m_bCMSupported /* CM unsupported - hw failed to compile the shader probably */ + const bool skipCM = !*PENABLECM /* CM disabled by the user */ + || !m_RenderData.surface /* FIXME unknown texture settings should be treated as sRGB and go through CM if monitor isn't in sRGB mode */ + || !m_bCMSupported /* CM unsupported - hw failed to compile the shader probably */ || (imageDescription == m_RenderData.pMonitor->imageDescription) /* Source and target have the same image description */ || ((*PPASS == 1 || (*PPASS == 2 && imageDescription.transferFunction == CM_TRANSFER_FUNCTION_ST2084_PQ)) && m_RenderData.pMonitor->activeWorkspace && m_RenderData.pMonitor->activeWorkspace->m_bHasFullscreenWindow && -- cgit v1.2.3