Ivan Belyavtsev
18.02.2022
Validation layer is a way to check a correctness of API usage.
To engage API validation:
D3D12GetDebugInterface function to get debug controllerEnableDebugLayer method of the debug controllerDXGI_CREATE_FACTORY_DEBUG flag in further DXGI factory creation [1]Visual studio: Output window, Show output from Debug
CLion: Debugger, LLDB window
CreateDXGIFactory* function to create a DXGI factory (don’t forget about flags)EnumAdapters* method to find HWEnumAdapters for adapter #0 gives us a pointer to the primary display adapter [1]Device is a represenation of GPU in DirectX API
To create a device:
D3D12CreateDevice function to create a DX12 deviceCommand queue accumulates command lists to execute on GPU. GPU is able to maintain several commands queue for different purposes. Direct queue is the most powerful type of queues.
CreateCommandQueue method of DX12 device to create a direct queue [1]CreateSwapChainForHwnd method of the DXGI factory with Direct queue, window handler and swap chain descriptorMakeWindowAssociation method of the DXGI factory with window handler and DXGI_MWA_NO_ALT_ENTER