mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-16 04:12:03 +00:00
[idd] hdr: dont advertise non hdr formats as hdr
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
This commit is contained in:
committed by
Geoffrey McRae
parent
2f59de572b
commit
ff1631da67
@@ -366,11 +366,16 @@ bool CSwapChainProcessor::SwapChainNewFrame(ComPtr<IDXGIResource> acquiredBuffer
|
|||||||
srcFormat.height = srcDesc.Height;
|
srcFormat.height = srcDesc.Height;
|
||||||
srcFormat.format = GetFrameType(srcDesc.Format);
|
srcFormat.format = GetFrameType(srcDesc.Format);
|
||||||
|
|
||||||
// Determine HDR status from both format and color space.
|
// Only HDR-capable formats can carry HDR content.
|
||||||
// HDR metadata loading is handled inside each branch so the logic
|
// 8-bit formats (BGRA, RGBA) cannot represent HDR,
|
||||||
// is self-contained: first identify the content type, then load the
|
// even if IsHDRActive() is momentarily stale during mode switches.
|
||||||
// matching metadata.
|
if (srcDesc.Format != DXGI_FORMAT_R16G16B16A16_FLOAT &&
|
||||||
if (srcDesc.Format == DXGI_FORMAT_R16G16B16A16_FLOAT)
|
srcDesc.Format != DXGI_FORMAT_R10G10B10A2_UNORM)
|
||||||
|
{
|
||||||
|
srcFormat.hdr = false;
|
||||||
|
srcFormat.hdrPQ = false;
|
||||||
|
}
|
||||||
|
else if (srcDesc.Format == DXGI_FORMAT_R16G16B16A16_FLOAT)
|
||||||
{
|
{
|
||||||
// FP16 is HDR content (scRGB / linear, not PQ-curve).
|
// FP16 is HDR content (scRGB / linear, not PQ-curve).
|
||||||
// FP16 always carries HDR color data regardless of OS HDR mode,
|
// FP16 always carries HDR color data regardless of OS HDR mode,
|
||||||
@@ -408,7 +413,10 @@ bool CSwapChainProcessor::SwapChainNewFrame(ComPtr<IDXGIResource> acquiredBuffer
|
|||||||
|
|
||||||
// Load HDR metadata; if none is available the frame is not HDR.
|
// Load HDR metadata; if none is available the frame is not HDR.
|
||||||
if (!m_devContext->GetHDRMetadata(srcFormat))
|
if (!m_devContext->GetHDRMetadata(srcFormat))
|
||||||
srcFormat.hdr = false;
|
{
|
||||||
|
srcFormat.hdr = false;
|
||||||
|
srcFormat.hdrPQ = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool postProcessFormatChanged = false;
|
bool postProcessFormatChanged = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user