
Examples of parameters that are passed to the programmable shader stages are constant buffers, (read-write) textures, and (read-write) buffers. A root signature describes the parameters that are passed to the various programmable shader stages of the rendering pipeline. A few properties of the rendering pipeline (such as viewport and scissor rectangle) require additional API calls but most of the configuration of the rendering pipeline is controlled by the PSO.Īnother new concept in DirectX 12 is the root signature. The PSO combines parts of the input assembly ( IA), vertex shader ( VS), hull shader ( HS), domain shader ( DS), geometry shader ( GS), stream output ( SO), rasterizer stage ( RS), pixel shader ( PS), and output merger ( OM) stages of the rendering pipeline. In order to provide better state management in DirectX 12, the pipeline state object ( PSO) is used to describe the various stages of the rendering (and compute) pipeline.

The ID3D12Heap interface allows for various memory mapping techniques to be implemented which may be used to optimize GPU memory utilization. In DirectX 12 the only interface used to describe a resource is the ID3D12Resource interface.ĭirectX 12 also provides more control over the way the resource is stored in GPU memory. For example, a buffer and a texture (1D, 2D, and 3D) each had an interface to describe the resource type.

In previous versions of the DirectX API, there were different interfaces depending on the resource type. One such concept is resource usage in DirectX 12. It is important to understand a few new concepts when working with DirectX 12. If not, please take the time to read the first lesson before reading this one. This lesson assumes you have read and understand the concepts presented in the previous lesson. Texturing and lighting is the subject of a later lesson.
#DIRECTX12 VS OPENGL 4.4 HOW TO#
In this lesson, you learn how to render a simple cube primitive.

At the end of the previous lesson, you had a DirectX 12 application that performed a screen clear but nothing was rendered to the screen. You also learned how to synchronize the CPU and GPU operations in order to correctly implement N-buffered rendering. In the previous lesson you learned how to initialize a DirectX 12 application. 9.12.2 Set Pipeline State and Root Signature.6.2.2 CommandQueue::CreateCommandAllocator.
