Hello.
I'm trying to get Desktop Duplication to work on HDR and 10bit displays. But for some reason DuplicateOutput function doesn't convert the output to R8G8B8A8.
If I do
IDXGIOutputDuplicationPtr duplication;
const DXGI_FORMAT DesktopFormats[] = { DXGI_FORMAT_B8G8R8A8_UNORM };
const unsigned DesktopFormatsCounts = ARRAYSIZE(DesktopFormats);
hr = output6->DuplicateOutput1(device, 0, DesktopFormatsCounts, DesktopFormats, &duplication);
DXGI_OUTDUPL_DESC duplDesc;
duplication->GetDesc(&duplDesc);
And I look into the duplDesc, it say Format = R16G16B16A16_FLOAT (when I have enabled HDR in windows).
But from Remarks here it should convert the format: https://learn.microsoft.com/en-us/windows/win32/api/dxgi1_5/nf-dxgi1_5-idxgioutput5-duplicateoutput1
DXGI will pick one of the supplied formats and convert the fullscreen buffer to that format before returning from IDXGIOutputDuplication::AcquireNextFrame
Thanks