Create a D3D12 device ( D3D12CreateDevice) and a D3D12 swap chain ( CreateSwapChain with an ID3D12CommandQueue as an input).Here is a rough outline of the steps to take to do so: See the D3D11On12 sample for example code. Typical usage of D3D11On12 would be to use D2D to render text or images on top of a D3D12 back buffer. A wrapped resource starts out in the “acquired” state, a property which is manipulated by the AcquireWrappedResources and ReleaseWrappedResources methods. This method “promotes” a D3D12 resource to be understandable in D3D11. In order to have both the D3D11 device context and the D3D12 command lists operate on the same resources, it is necessary to create “wrapped resources” using the CreateWrappedResource API. This is the primary interface that is used for interop between D3D11 and D3D12. You can think of this method as creating a D3D11 device with the imaginary driver type D3D_DRIVER_TYPE_11ON12, where the D3D11 driver is responsible for creating objects and submitting command lists to the D3D12 API.Īfter you have a D3D11 device and immediate context, you can QueryInterface off of the device for the ID3D11On12Device interface. These objects are provided as input to the initialization method D3D11On12CreateDevice. To begin using D3D11On12, the first step is to create a D3D12 device and command queue. D3D11On12 makes it simpler than using interop techniques to share resources and synchronize work between the two APIs. D3D11on12 also enables incremental porting of an application from D3D11 to D3D12, by enabling portions of the app to continue targeting D3D11 for simplicity while others target D3D12 for performance, while always having complete and correct rendering. D3D11on12 enables components written using D3D11 (for example, D2D text and UI) to work together with components written targeting the D3D12 API. D3D11On12 is a mechanism by which developers can use D3D11 interfaces and objects to drive the D3D12 API.
0 Comments
Leave a Reply. |