Is gamma correction supposed to work with DX12 swapchains?
The following code snippet works with DX11:
IDXGIOutput* pOutput = NULL;
swapchainData.pSwapChain->GetContainingOutput (&pOutput);
if (pOutput != NULL) {
DXGI_GAMMA_CONTROL_CAPABILITIES gammaCaps;
if (pOutput->GetGammaControlCapabilities (&gammaCaps) == S_OK) {
bool hasGammaramp = (pOutput->GetGammaControl (&swapchainData.defaultGammaControl) == S_OK);
swapchainData.hasDefaultGammaControl = hasGammaramp;
}
pOutput->Release ();
}
But not with DX12.
GetGammaControlCapabilities should return no error when the swapchain is in fullscreen mode but I always get DXGI_ERROR_INVALID_CALL (0x887A0001) for both of my adapters attached to different display outputs.
Experimentally I even put a GetGammaControlCapabilities call into one of the MS DX12 sample app and got the same result.
Did I miss something in the DX docs??