Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17925

DX12 Swapchain gamma correction

$
0
0

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 …


Viewing all articles
Browse latest Browse all 17925

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>