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
Hello.
Well now I will look like an idiot, but where should I look? :D
I'm totally new to this, the project is this: https://github.com/psieg/Lightpack/blob/3dae6479de97a4e8adc58d170ea18c91cd769ec8/Software/grab/DDuplGrabber.cpp
I'm trying to learn something "on the way" but I must say that this is pretty hard.
EDIT:
The dxgiSwapChainDesc.BufferDesc contain dxgiModeDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
I fail to reproduce this issue because I got
DXGI_ERROR_UNSUPPORTED
error when callingDxgiOutput5->DuplicateOutput1()
. Could you share (via GitHub) a mini, complete and reproducible sample so I can do a further investigation? Please make sure your private date removed before sharing. Thanks.Hello.
In this branch is updated DXGI to 1_6: https://github.com/Benik3/Lightpack/tree/dxgi+HDR_older
Hi. I added below updated Microsoft example of DDupl to test this behaviour...
Sign in to comment